18 #include <soc/iomap.h>
21 #include <soc/pci_devs.h>
23 #include <soc/ramstage.h>
65 (CONFIG_COREBOOT_ROMSIZE_KB *
KiB));
71 #define LPC_DEFAULT_IO_RANGE_LOWER 0
72 #define LPC_DEFAULT_IO_RANGE_UPPER 0x1000
110 "because 'global_braswell_irq_route' structure does not exist\n");
134 if (targ_dev ==
NULL || new_int_pin < 1)
144 if (ir->
pcidev[device_num] == 0) {
146 "skipping it\n", device_num);
151 pirq = (ir->
pcidev[device_num] >> ((new_int_pin - 1) * 4))
171 if (parent_bdf != current_bdf)
176 'A' +
pirq, int_line, int_line);
265 write8((
void *)(pr_base + i*
sizeof(ir->
pic[i])), ir->
pic[i]);
279 if (
config->disable_slp_x_stretch_sus_fail) {
312 #define SET_DIS_MASK(name_) \
313 case PCI_DEVFN(name_ ## _DEV, name_ ## _FUNC): \
314 mask |= name_ ## _DIS
316 #define SET_DIS_MASK2(name_) \
317 case PCI_DEVFN(name_ ## _DEV, name_ ## _FUNC): \
318 mask2 |= name_ ## _DIS
448 #define DEV_CASE(name_) \
449 case PCI_DEVFN(name_ ## _DEV, name_ ## _FUNC)
518 "Could not place %02x.%01x into D3Hot. "
519 "Keeping device visible.\n", slot, func);
540 static const struct pci_driver southcluster
__pci_driver = {
static void write8(void *addr, uint8_t val)
static void write32(void *addr, uint32_t val)
static uint16_t read16(const void *addr)
static uint32_t read32(const void *addr)
static uint8_t read8(const void *addr)
static void write16(void *addr, uint16_t val)
#define PIRQ_PIC_IRQDISABLE
#define SLPSX_STR_POL_LOCK
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, finalize_chipset, NULL)
void southcluster_enable_dev(struct device *dev)
const struct soc_irq_route global_soc_irq_route
#define PIRQ_PIC_UNKNOWN_UNUSED
static void add_mmio_resource(struct device *dev, int i, unsigned long addr, unsigned long size)
static struct device_operations device_ops
static void sc_enable_serial_irqs(struct device *dev)
#define SET_DIS_MASK2(name_)
static void sc_add_io_resources(struct device *dev)
#define SET_DIS_MASK(name_)
#define LPC_DEFAULT_IO_RANGE_LOWER
static void sc_add_mmio_resources(struct device *dev)
static void sc_read_resources(struct device *dev)
static const struct pci_driver southcluster __pci_driver
static void finalize_chipset(void *unused)
static void write_pci_config_irqs(void)
static void sc_set_serial_irqs_mode(struct device *dev, enum serirq_mode mode)
static int place_device_in_d3hot(struct device *dev)
static void sc_disable_devfn(struct device *dev)
static void hda_work_around(struct device *dev)
static void set_d3hot_bits(struct device *dev, int offset)
static void sc_init(struct device *dev)
static int io_range_in_default(int base, int size)
static void sc_add_io_resource(struct device *dev, int base, int size, int index)
#define LPC_DEFAULT_IO_RANGE_UPPER
#define printk(level,...)
DEVTREE_CONST struct device *DEVTREE_CONST all_devices
Linked list of ALL devices.
struct resource * new_resource(struct device *dev, unsigned int index)
See if a resource structure already exists for a given index and if not allocate one.
const char * dev_path(const struct device *dev)
int mainboard_get_spi_vscc_config(struct vscc_config *cfg)
void i8259_configure_irq_trigger(int int_num, int is_level_triggered)
Configure IRQ triggering in the i8259 compatible Interrupt Controller.
#define IRQ_LEVEL_TRIGGERED
static DEVTREE_CONST void * config_of(const struct device *dev)
#define mmio_resource(dev, idx, basek, sizek)
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline u16 pci_find_capability(const struct device *dev, u16 cap)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
#define ACPI_BASE_ADDRESS
#define DIS_SLP_X_STRCH_SUS_UP
#define PUNIT_BASE_ADDRESS
#define TEMP_BASE_ADDRESS
#define RCBA_BASE_ADDRESS
#define GPIO_BASE_ADDRESS
#define MPHY_BASE_ADDRESS
#define ABORT_BASE_ADDRESS
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
#define BIOS_WARNING
BIOS_WARNING - Bad configuration.
#define PCI_DEVFN(slot, func)
#define PCI_COMMAND_SPECIAL
#define PCI_INTERRUPT_PIN
#define PCI_INTERRUPT_LINE
#define PCI_COMMAND_MASTER
#define PCI_COMMAND_MEMORY
#define PCI_BASE_ADDRESS_0
#define PCI_BASE_ADDRESS_1
const char * pin_to_str(int pin)
Take an INT_PIN number (0, 1 - 4) and convert it to a string ("NO PIN", "PIN A" - "PIN D")
int get_pci_irq_pins(struct device *dev, struct device **parent_bdg)
Given a device structure 'dev', find its interrupt pin and its parent bridge 'parent_bdg' device stru...
void pci_dev_read_resources(struct device *dev)
void pci_dev_set_resources(struct device *dev)
#define IORESOURCE_ASSIGNED
void scan_static_bus(struct device *bus)
struct pci_operations soc_pci_ops
unsigned long southcluster_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp)
void spi_finalize_ops(void)
void(* read_resources)(struct device *dev)
enum device_path_type type
DEVTREE_CONST struct bus * bus
DEVTREE_CONST struct device * next
uint16_t pcidev[NUM_IR_DEVS]