21 #include <soc/iomap.h>
23 #include <soc/southbridge.h>
31 if (!
CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI))
33 if (!
CONFIG(SERIRQ_CONTINUOUS_MODE))
115 res->
size = CONFIG_ROM_SIZE;
125 res->
size = 0x00001000;
141 res->
base | spi_enable_bits);
150 u32 rsize = 0, set = 0, set_x = 0;
174 "Southbridge LPC decode:%s, base=0x%08x, end=0x%08x\n",
251 if (res->
size <= rsize) {
262 "Range assigned to wide IO %d\n",
266 "cannot fit LPC decode region:");
268 "%s, base = 0x%08x, end = 0x%08x\n",
301 if (
CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI))
315 #if CONFIG(HAVE_ACPI_TABLES)
326 #if CONFIG(HAVE_ACPI_TABLES)
342 static const struct pci_driver lpc_driver
__pci_driver = {
static void pm_write8(uint8_t reg, uint8_t value)
void setup_ioapic(void *ioapic_base, u8 ioapic_id)
#define PM_SERIRQ_NUM_BITS_21
#define printk(level,...)
void fixed_mem_resource(struct device *dev, unsigned long index, unsigned long basek, unsigned long sizek, unsigned long type)
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.
void compact_resources(struct device *dev)
See if we have unused but allocated resource structures.
resource_t resource_end(const struct resource *resource)
Compute the maximum address that is part of a resource.
struct resource * find_resource(const struct device *dev, unsigned int index)
Return an existing resource structure for a given index.
const char * dev_path(const struct device *dev)
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
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_config8(const struct device *dev, u16 reg, u8 val)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
void cmos_check_update_date(void)
void cmos_init(bool invalid)
void fch_enable_ioapic_decode(void)
void fch_configure_hpet(void)
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
#define PCI_DID_AMD_SB900_LPC
#define PCI_DID_AMD_CZ_LPC
#define IORESOURCE_SUBTRACTIVE
#define IORESOURCE_ASSIGNED
#define IOINDEX_SUBTRACTIVE(IDX, LINK)
void scan_static_bus(struct device *bus)
#define SPI_BASE_ALIGNMENT
#define SPI_BASE_ADDRESS_REGISTER
enum cb_err espi_open_io_window(uint16_t base, size_t size)
enum cb_err espi_open_mmio_window(uint32_t base, size_t size)
#define DECODE_IO_PORT_ENABLE5
#define DECODE_ENABLE_FDC_PORT0
#define DECODE_IO_PORT_ENABLE6
uint16_t lpc_wideio_size(int index)
Find the size of a particular wide IO.
#define LPC_IO_PORT_DECODE_ENABLE
#define PREFETCH_EN_SPI_FROM_HOST
#define DECODE_ENABLE_SERIAL_PORT2
#define DECODE_ENABLE_MIDI_PORT0
#define DECODE_IO_PORT_ENABLE3
#define LPC_MISC_CONTROL_BITS
#define DECODE_ENABLE_SERIAL_PORT3
#define DECODE_IO_PORT_ENABLE2
#define DECODE_ENABLE_SERIAL_PORT1
#define WIDEIO_RANGE_ERROR
#define DECODE_IO_PORT_ENABLE1
#define DECODE_ENABLE_PARALLEL_PORT1
#define LPC_SYNC_TIMEOUT_COUNT_ENABLE
#define LPC_IO_OR_MEM_DECODE_ENABLE
#define DECODE_ENABLE_KBC_PORT
#define DECODE_ENABLE_SERIAL_PORT4
#define DECODE_IO_PORT_ENABLE0
#define DECODE_ENABLE_PARALLEL_PORT0
int lpc_find_wideio_range(uint16_t start, uint16_t size)
Identify if any LPC wide IO is covering the IO range.
#define DECODE_ENABLE_SERIAL_PORT0
int lpc_set_wideio_range(uint16_t start, uint16_t size)
Program a LPC wide IO to support an IO range.
static void lpc_read_resources(struct device *dev)
static void configure_child_lpc_windows(struct device *dev, struct device *child)
static void lpc_enable_resources(struct device *dev)
static struct device_operations lpc_ops
static void lpc_set_resources(struct device *dev)
static void fch_ioapic_init(void)
static void configure_child_espi_windows(struct device *child)
static void setup_serirq(void)
static void lpc_init(struct device *dev)
static void lpc_enable_children_resources(struct device *dev)
static const unsigned short pci_device_ids[]
static const struct pci_driver lpc_driver __pci_driver
static const char * lpc_acpi_name(const struct device *dev)
static unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long start, struct acpi_rsdp *rsdp)
DEVTREE_CONST struct bus * next
DEVTREE_CONST struct device * children
void(* read_resources)(struct device *dev)
enum device_path_type type
DEVTREE_CONST struct device * sibling
DEVTREE_CONST struct bus * link_list
DEVTREE_CONST struct resource * resource_list
DEVTREE_CONST struct resource * next