mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
Move global io_base_addr into compilation units
Corresponding to flashrom svn r1813. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
parent
72d42f87a9
commit
0ccec8f212
2
atahpt.c
2
atahpt.c
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#define PCI_VENDOR_ID_HPT 0x1103
|
#define PCI_VENDOR_ID_HPT 0x1103
|
||||||
|
|
||||||
|
static uint32_t io_base_addr = 0;
|
||||||
|
|
||||||
const struct dev_entry ata_hpt[] = {
|
const struct dev_entry ata_hpt[] = {
|
||||||
{0x1103, 0x0004, NT, "Highpoint", "HPT366/368/370/370A/372/372N"},
|
{0x1103, 0x0004, NT, "Highpoint", "HPT366/368/370/370A/372/372N"},
|
||||||
{0x1103, 0x0005, NT, "Highpoint", "HPT372A/372N"},
|
{0x1103, 0x0005, NT, "Highpoint", "HPT372A/372N"},
|
||||||
|
@ -89,7 +89,7 @@ int gfxnvidia_init(void)
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
io_base_addr = pcidev_readbar(dev, PCI_BASE_ADDRESS_0);
|
uint32_t io_base_addr = pcidev_readbar(dev, PCI_BASE_ADDRESS_0);
|
||||||
if (!io_base_addr)
|
if (!io_base_addr)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
2
it8212.c
2
it8212.c
@ -59,7 +59,7 @@ int it8212_init(void)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Bit 0 is address decode enable, 17-31 the base address, everything else reserved/zero. */
|
/* Bit 0 is address decode enable, 17-31 the base address, everything else reserved/zero. */
|
||||||
io_base_addr = pcidev_readbar(dev, PCI_ROM_ADDRESS) & 0xFFFFFFFE;
|
uint32_t io_base_addr = pcidev_readbar(dev, PCI_ROM_ADDRESS) & 0xFFFFFFFE;
|
||||||
if (!io_base_addr)
|
if (!io_base_addr)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#define PCI_VENDOR_ID_3COM 0x10b7
|
#define PCI_VENDOR_ID_3COM 0x10b7
|
||||||
|
|
||||||
|
static uint32_t io_base_addr = 0;
|
||||||
static uint32_t internal_conf;
|
static uint32_t internal_conf;
|
||||||
static uint16_t id;
|
static uint16_t id;
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ int nicintel_spi_init(void)
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
io_base_addr = pcidev_readbar(dev, PCI_BASE_ADDRESS_0);
|
uint32_t io_base_addr = pcidev_readbar(dev, PCI_BASE_ADDRESS_0);
|
||||||
if (!io_base_addr)
|
if (!io_base_addr)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#define BOOT_ROM_ADDR 0x50
|
#define BOOT_ROM_ADDR 0x50
|
||||||
#define BOOT_ROM_DATA 0x54
|
#define BOOT_ROM_DATA 0x54
|
||||||
|
|
||||||
|
static uint32_t io_base_addr = 0;
|
||||||
const struct dev_entry nics_natsemi[] = {
|
const struct dev_entry nics_natsemi[] = {
|
||||||
{0x100b, 0x0020, NT, "National Semiconductor", "DP83815/DP83816"},
|
{0x100b, 0x0020, NT, "National Semiconductor", "DP83815/DP83816"},
|
||||||
{0x100b, 0x0022, NT, "National Semiconductor", "DP83820"},
|
{0x100b, 0x0022, NT, "National Semiconductor", "DP83820"},
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#define PCI_VENDOR_ID_REALTEK 0x10ec
|
#define PCI_VENDOR_ID_REALTEK 0x10ec
|
||||||
#define PCI_VENDOR_ID_SMC1211 0x1113
|
#define PCI_VENDOR_ID_SMC1211 0x1113
|
||||||
|
|
||||||
|
static uint32_t io_base_addr = 0;
|
||||||
static int bios_rom_addr, bios_rom_data;
|
static int bios_rom_addr, bios_rom_data;
|
||||||
|
|
||||||
const struct dev_entry nics_realtek[] = {
|
const struct dev_entry nics_realtek[] = {
|
||||||
|
@ -132,7 +132,7 @@ int ogp_spi_init(void)
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
io_base_addr = pcidev_readbar(dev, PCI_BASE_ADDRESS_0);
|
uint32_t io_base_addr = pcidev_readbar(dev, PCI_BASE_ADDRESS_0);
|
||||||
if (!io_base_addr)
|
if (!io_base_addr)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
1
pcidev.c
1
pcidev.c
@ -25,7 +25,6 @@
|
|||||||
#include "programmer.h"
|
#include "programmer.h"
|
||||||
#include "hwaccess.h"
|
#include "hwaccess.h"
|
||||||
|
|
||||||
uint32_t io_base_addr;
|
|
||||||
struct pci_access *pacc;
|
struct pci_access *pacc;
|
||||||
|
|
||||||
enum pci_bartype {
|
enum pci_bartype {
|
||||||
|
@ -173,8 +173,7 @@ struct bitbang_spi_master {
|
|||||||
struct pci_dev;
|
struct pci_dev;
|
||||||
|
|
||||||
/* pcidev.c */
|
/* pcidev.c */
|
||||||
// FIXME: These need to be local, not global
|
// FIXME: This needs to be local, not global(?)
|
||||||
extern uint32_t io_base_addr;
|
|
||||||
extern struct pci_access *pacc;
|
extern struct pci_access *pacc;
|
||||||
int pci_init_common(void);
|
int pci_init_common(void);
|
||||||
uintptr_t pcidev_readbar(struct pci_dev *dev, int bar);
|
uintptr_t pcidev_readbar(struct pci_dev *dev, int bar);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user