14 #include <soc/iomap.h>
17 #include <soc/pci_devs.h>
44 for (i = 0; i < 8; ++i)
87 u8 int_pin = 0, int_line = 0;
122 CONFIG_MAINBOARD_POWER_FAILURE_STATE);
137 state =
"state keep";
201 RCBA32_OR(0x1114, (1 << 15) | (1 << 14)),
207 if (
CONFIG(SERIRQ_CONTINUOUS_MODE))
224 RCBA32(0x3314) = 0x00012fff;
228 RCBA32(0x3324) = 0x04000000;
229 RCBA32(0x3368) = 0x00041400;
230 RCBA32(0x3388) = 0x3f8ddbff;
231 RCBA32(0x33ac) = 0x00007001;
232 RCBA32(0x33b0) = 0x00181900;
233 RCBA32(0x33c0) = 0x00060A00;
234 RCBA32(0x33d0) = 0x06200840;
235 RCBA32(0x3a28) = 0x01010101;
236 RCBA32(0x3a2c) = 0x040c0404;
237 RCBA32(0x3a9c) = 0x9000000a;
238 RCBA32(0x2b1c) = 0x03808033;
239 RCBA32(0x2b34) = 0x80000009;
240 RCBA32(0x3348) = 0x022ddfff;
241 RCBA32(0x334c) = 0x00000001;
242 RCBA32(0x3358) = 0x0001c000;
243 RCBA32(0x3380) = 0x3f8ddbff;
244 RCBA32(0x3384) = 0x0001c7e1;
245 RCBA32(0x338c) = 0x0001c7e1;
246 RCBA32(0x3398) = 0x0001c000;
247 RCBA32(0x33a8) = 0x00181900;
248 RCBA32(0x33dc) = 0x00080000;
249 RCBA32(0x33e0) = 0x00000001;
250 RCBA32(0x3a20) = 0x0000040c;
251 RCBA32(0x3a24) = 0x01010101;
252 RCBA32(0x3a30) = 0x01010101;
261 RCBA32(0x33b4) = 0x00007001;
262 RCBA32(0x3350) = 0x022ddfff;
263 RCBA32(0x3354) = 0x00000001;
269 RCBA32(0x2b10) = 0x0000883c;
270 RCBA32(0x2b14) = 0x1e0a4616;
271 RCBA32(0x2b24) = 0x40000005;
272 RCBA32(0x2b20) = 0x0005db01;
273 RCBA32(0x3a80) = 0x05145005;
274 RCBA32(0x3a84) = 0x00001005;
283 u32 data_and = 0xffffffff;
284 u32 data_or = (1 << 14) | (1 << 13) | (1 << 12);
289 data_and &= ~((1 << 7) | (1 << 6) | (1 << 3));
290 data_or |= (1 << 5) | (1 << 4);
295 strap19 &= ((1 << 31) | (1 << 30));
300 "control in single domain\n");
301 }
else if (strap19 == 0) {
303 "control in split domains\n");
306 "Strap 19 configuration\n");
324 if (
config->deep_sx_enable_ac) {
329 if (
config->deep_sx_enable_dc) {
334 if (
config->deep_sx_enable_ac ||
config->deep_sx_enable_dc)
352 RCBA32_OR(0x2b1c, (1 << 22) | (1 << 14) | (1 << 13));
353 RCBA32(0x33e4) = 0x16bf0002;
380 reg16 |= (1 << 5) | (1 << 6) | (1 << 7) | (1 << 12);
399 if (
RCBA32(0x3454) & (1 << 4))
405 if (
RCBA32(0x3454) & (1 << 4))
472 res->
base = default_decode_base;
473 res->
size = 0 - default_decode_base;
477 if (default_decode_base > CONFIG_FIXED_RCBA_MMIO_BASE) {
479 res->
base = CONFIG_FIXED_RCBA_MMIO_BASE;
480 res->
size = CONFIG_RCBA_LENGTH;
489 if (reg < default_decode_base) {
492 res->
size = 16 * 1024;
500 #define LPC_DEFAULT_IO_RANGE_LOWER 0
501 #define LPC_DEFAULT_IO_RANGE_UPPER 0x1000
590 unsigned long current,
593 if (
CONFIG(SERIALIO_UART_CONSOLE)) {
595 (CONFIG_UART_FOR_CONSOLE == 1) ?
unsigned long acpi_write_hpet(const struct device *device, unsigned long current, acpi_rsdp_t *rsdp)
unsigned long acpi_write_dbg2_pci_uart(acpi_rsdp_t *rsdp, unsigned long current, const struct device *dev, uint8_t access_size)
static int acpi_is_wakeup_s3(void)
void setup_ioapic(void *ioapic_base, u8 ioapic_id)
void ioapic_set_max_vectors(void *ioapic_base, int mre_count)
void enable_alt_smi(uint32_t mask)
#define MAINBOARD_POWER_ON
#define MAINBOARD_POWER_OFF
#define MAINBOARD_POWER_KEEP
void enable_all_gpe(uint32_t set1, uint32_t set2, uint32_t set3, uint32_t set4)
#define printk(level,...)
void outb(u8 val, u16 port)
void outl(u32 val, u16 port)
DEVTREE_CONST struct device *DEVTREE_CONST all_devices
Linked list of ALL devices.
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
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 i8259_configure_irq_trigger(int int_num, int is_level_triggered)
Configure IRQ triggering in the i8259 compatible Interrupt Controller.
#define ACPI_ACCESS_SIZE_DWORD_ACCESS
#define APM_CNT_ACPI_DISABLE
static __always_inline void pci_and_config8(const struct device *dev, u16 reg, u8 andmask)
static __always_inline void pci_update_config32(const struct device *dev, u16 reg, u32 mask, u32 or)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline void pci_or_config8(const struct device *dev, u16 reg, u8 ormask)
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 GPIO_BASE_ADDRESS
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
unsigned int get_uint_option(const char *name, const unsigned int fallback)
#define PCI_INTERRUPT_PIN
#define PCI_INTERRUPT_LINE
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 IORESOURCE_RESERVE
#define IORESOURCE_ASSIGNED
void scan_static_bus(struct device *bus)
#define PCH_LPT_LP_SAMPLE
#define PCH_WPT_BDW_Y_SAMPLE
#define PCH_LPT_LP_MAINSTREAM
#define PCH_WPT_BDW_U_SAMPLE
#define PCH_WPT_HSW_U_SAMPLE
#define PCH_WPT_BDW_Y_BASE
#define PCH_LPT_LP_PREMIUM
#define PCH_WPT_BDW_Y_PREMIUM
#define PCH_WPT_BDW_U_BASE
u32 pch_read_soft_strap(int id)
#define PCH_WPT_BDW_U_PREMIUM
#define PCH_IOAPIC_PCI_SLOT
#define PCH_HPET_PCI_SLOT
#define PCH_IOAPIC_PCI_BUS
#define PCH_DISABLE_HD_AUDIO
#define PCH_DISABLE_ADSPD
#define DEEP_SX_WAKE_PIN_EN
#define DEEP_SX_GP27_PIN_EN
static void pch_power_options(struct device *dev)
static struct device_operations device_ops
static void pch_lpc_read_resources(struct device *dev)
static void pch_lpc_add_gen_io_resources(struct device *dev, int reg_value, int index)
static int pch_io_range_in_default(int base, int size)
#define LPC_DEFAULT_IO_RANGE_LOWER
static void enable_hpet(struct device *dev)
static void pch_init_deep_sx(struct device *dev)
static void pch_lpc_add_io_resources(struct device *dev)
static void pch_set_acpi_mode(void)
static void pch_pm_init(struct device *dev)
static unsigned long broadwell_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp)
static void pch_lpc_add_io_resource(struct device *dev, u16 base, u16 size, int index)
static void lpc_init(struct device *dev)
static const struct pci_driver pch_lpc __pci_driver
static const unsigned short pci_device_ids[]
static void pch_enable_mphy(void)
static void pch_enable_ioapic(struct device *dev)
static void pch_pirq_init(struct device *dev)
static void pch_lpc_add_mmio_resources(struct device *dev)
static void pch_pm_init_magic(struct device *dev)
static void pch_cg_init(struct device *dev)
#define LPC_DEFAULT_IO_RANGE_UPPER
static void pch_misc_init(struct device *dev)
void pch_iobp_update(u32 address, u32 andvalue, u32 orvalue)
int gpio_is_native(int gpio_num)
#define RCBA32_AND_OR(x, and, or)
void(* read_resources)(struct device *dev)
enum device_path_type type
DEVTREE_CONST struct device * next
DEVTREE_CONST void * chip_info