static void bootblock_ec_init(void) { uint16_t ec_ioport_base; size_t ec_ioport_size; /* * Set up LPC decoding for the ChromeEC I/O port ranges: * - Ports 62/66, 60/64, and 200->208 * - ChromeEC specific communication I/O ports. */ lpc_enable_fixed_io_ranges(IOE_EC_62_66 | IOE_KBC_60_64 | IOE_LGE_200); google_chromeec_ioport_range(&ec_ioport_base, &ec_ioport_size); lpc_open_pmio_window(ec_ioport_base, ec_ioport_size); }
static void pch_lpc_loop_resources(struct device *dev) { struct resource *res; for (res = dev->resource_list; res; res = res->next) { if (res->flags & IORESOURCE_IO) lpc_open_pmio_window(res->base, res->size); if (res->flags & IORESOURCE_MEM) { /* Check if this is already decoded. */ if (lpc_fits_fixed_mmio_window(res->base, res->size)) continue; lpc_open_mmio_window(res->base, res->size); } } pch_lpc_set_child_resources(dev); }