lpss 131 drivers/mfd/intel-lpss.c static void intel_lpss_cache_ltr(struct intel_lpss *lpss) lpss 133 drivers/mfd/intel-lpss.c lpss->active_ltr = readl(lpss->priv + LPSS_PRIV_ACTIVELTR); lpss 134 drivers/mfd/intel-lpss.c lpss->idle_ltr = readl(lpss->priv + LPSS_PRIV_IDLELTR); lpss 137 drivers/mfd/intel-lpss.c static int intel_lpss_debugfs_add(struct intel_lpss *lpss) lpss 141 drivers/mfd/intel-lpss.c dir = debugfs_create_dir(dev_name(lpss->dev), intel_lpss_debugfs); lpss 146 drivers/mfd/intel-lpss.c intel_lpss_cache_ltr(lpss); lpss 148 drivers/mfd/intel-lpss.c debugfs_create_x32("capabilities", S_IRUGO, dir, &lpss->caps); lpss 149 drivers/mfd/intel-lpss.c debugfs_create_x32("active_ltr", S_IRUGO, dir, &lpss->active_ltr); lpss 150 drivers/mfd/intel-lpss.c debugfs_create_x32("idle_ltr", S_IRUGO, dir, &lpss->idle_ltr); lpss 152 drivers/mfd/intel-lpss.c lpss->debugfs = dir; lpss 156 drivers/mfd/intel-lpss.c static void intel_lpss_debugfs_remove(struct intel_lpss *lpss) lpss 158 drivers/mfd/intel-lpss.c debugfs_remove_recursive(lpss->debugfs); lpss 163 drivers/mfd/intel-lpss.c struct intel_lpss *lpss = dev_get_drvdata(dev); lpss 171 drivers/mfd/intel-lpss.c ltr = readl(lpss->priv + LPSS_PRIV_ACTIVELTR); lpss 186 drivers/mfd/intel-lpss.c if (ltr == lpss->active_ltr) lpss 189 drivers/mfd/intel-lpss.c writel(ltr, lpss->priv + LPSS_PRIV_ACTIVELTR); lpss 190 drivers/mfd/intel-lpss.c writel(ltr, lpss->priv + LPSS_PRIV_IDLELTR); lpss 193 drivers/mfd/intel-lpss.c intel_lpss_cache_ltr(lpss); lpss 196 drivers/mfd/intel-lpss.c static void intel_lpss_ltr_expose(struct intel_lpss *lpss) lpss 198 drivers/mfd/intel-lpss.c lpss->dev->power.set_latency_tolerance = intel_lpss_ltr_set; lpss 199 drivers/mfd/intel-lpss.c dev_pm_qos_expose_latency_tolerance(lpss->dev); lpss 202 drivers/mfd/intel-lpss.c static void intel_lpss_ltr_hide(struct intel_lpss *lpss) lpss 204 drivers/mfd/intel-lpss.c dev_pm_qos_hide_latency_tolerance(lpss->dev); lpss 205 drivers/mfd/intel-lpss.c lpss->dev->power.set_latency_tolerance = NULL; lpss 208 drivers/mfd/intel-lpss.c static int intel_lpss_assign_devs(struct intel_lpss *lpss) lpss 213 drivers/mfd/intel-lpss.c type = lpss->caps & LPSS_PRIV_CAPS_TYPE_MASK; lpss 230 drivers/mfd/intel-lpss.c lpss->cell = devm_kmemdup(lpss->dev, cell, sizeof(*cell), GFP_KERNEL); lpss 231 drivers/mfd/intel-lpss.c if (!lpss->cell) lpss 234 drivers/mfd/intel-lpss.c lpss->type = type; lpss 239 drivers/mfd/intel-lpss.c static bool intel_lpss_has_idma(const struct intel_lpss *lpss) lpss 241 drivers/mfd/intel-lpss.c return (lpss->caps & LPSS_PRIV_CAPS_NO_IDMA) == 0; lpss 244 drivers/mfd/intel-lpss.c static void intel_lpss_set_remap_addr(const struct intel_lpss *lpss) lpss 246 drivers/mfd/intel-lpss.c resource_size_t addr = lpss->info->mem->start; lpss 248 drivers/mfd/intel-lpss.c lo_hi_writeq(addr, lpss->priv + LPSS_PRIV_REMAP_ADDR); lpss 251 drivers/mfd/intel-lpss.c static void intel_lpss_deassert_reset(const struct intel_lpss *lpss) lpss 256 drivers/mfd/intel-lpss.c writel(value, lpss->priv + LPSS_PRIV_RESETS); lpss 259 drivers/mfd/intel-lpss.c static void intel_lpss_init_dev(const struct intel_lpss *lpss) lpss 264 drivers/mfd/intel-lpss.c writel(0, lpss->priv + LPSS_PRIV_RESETS); lpss 266 drivers/mfd/intel-lpss.c intel_lpss_deassert_reset(lpss); lpss 268 drivers/mfd/intel-lpss.c intel_lpss_set_remap_addr(lpss); lpss 270 drivers/mfd/intel-lpss.c if (!intel_lpss_has_idma(lpss)) lpss 274 drivers/mfd/intel-lpss.c if (lpss->type == LPSS_DEV_SPI) lpss 275 drivers/mfd/intel-lpss.c writel(value, lpss->priv + LPSS_PRIV_SSP_REG); lpss 289 drivers/mfd/intel-lpss.c static int intel_lpss_register_clock_divider(struct intel_lpss *lpss, lpss 298 drivers/mfd/intel-lpss.c lpss->priv, 0, 0, NULL); lpss 304 drivers/mfd/intel-lpss.c 0, lpss->priv, 1, 15, 16, 15, 0, lpss 312 drivers/mfd/intel-lpss.c CLK_SET_RATE_PARENT, lpss->priv, 31, 0, NULL); lpss 320 drivers/mfd/intel-lpss.c static int intel_lpss_register_clock(struct intel_lpss *lpss) lpss 322 drivers/mfd/intel-lpss.c const struct mfd_cell *cell = lpss->cell; lpss 327 drivers/mfd/intel-lpss.c if (!lpss->info->clk_rate) lpss 331 drivers/mfd/intel-lpss.c clk = clk_register_fixed_rate(NULL, dev_name(lpss->dev), NULL, 0, lpss 332 drivers/mfd/intel-lpss.c lpss->info->clk_rate); lpss 336 drivers/mfd/intel-lpss.c snprintf(devname, sizeof(devname), "%s.%d", cell->name, lpss->devid); lpss 342 drivers/mfd/intel-lpss.c if (lpss->type != LPSS_DEV_I2C) { lpss 343 drivers/mfd/intel-lpss.c ret = intel_lpss_register_clock_divider(lpss, devname, &clk); lpss 351 drivers/mfd/intel-lpss.c lpss->clock = clkdev_create(clk, lpss->info->clk_con_id, "%s", devname); lpss 352 drivers/mfd/intel-lpss.c if (!lpss->clock) lpss 355 drivers/mfd/intel-lpss.c lpss->clk = clk; lpss 365 drivers/mfd/intel-lpss.c static void intel_lpss_unregister_clock(struct intel_lpss *lpss) lpss 367 drivers/mfd/intel-lpss.c if (IS_ERR_OR_NULL(lpss->clk)) lpss 370 drivers/mfd/intel-lpss.c clkdev_drop(lpss->clock); lpss 371 drivers/mfd/intel-lpss.c intel_lpss_unregister_clock_tree(lpss->clk); lpss 377 drivers/mfd/intel-lpss.c struct intel_lpss *lpss; lpss 383 drivers/mfd/intel-lpss.c lpss = devm_kzalloc(dev, sizeof(*lpss), GFP_KERNEL); lpss 384 drivers/mfd/intel-lpss.c if (!lpss) lpss 387 drivers/mfd/intel-lpss.c lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET, lpss 389 drivers/mfd/intel-lpss.c if (!lpss->priv) lpss 392 drivers/mfd/intel-lpss.c lpss->info = info; lpss 393 drivers/mfd/intel-lpss.c lpss->dev = dev; lpss 394 drivers/mfd/intel-lpss.c lpss->caps = readl(lpss->priv + LPSS_PRIV_CAPS); lpss 396 drivers/mfd/intel-lpss.c dev_set_drvdata(dev, lpss); lpss 398 drivers/mfd/intel-lpss.c ret = intel_lpss_assign_devs(lpss); lpss 402 drivers/mfd/intel-lpss.c lpss->cell->properties = info->properties; lpss 404 drivers/mfd/intel-lpss.c intel_lpss_init_dev(lpss); lpss 406 drivers/mfd/intel-lpss.c lpss->devid = ida_simple_get(&intel_lpss_devid_ida, 0, 0, GFP_KERNEL); lpss 407 drivers/mfd/intel-lpss.c if (lpss->devid < 0) lpss 408 drivers/mfd/intel-lpss.c return lpss->devid; lpss 410 drivers/mfd/intel-lpss.c ret = intel_lpss_register_clock(lpss); lpss 414 drivers/mfd/intel-lpss.c intel_lpss_ltr_expose(lpss); lpss 416 drivers/mfd/intel-lpss.c ret = intel_lpss_debugfs_add(lpss); lpss 420 drivers/mfd/intel-lpss.c if (intel_lpss_has_idma(lpss)) { lpss 421 drivers/mfd/intel-lpss.c ret = mfd_add_devices(dev, lpss->devid, &intel_lpss_idma64_cell, lpss 428 drivers/mfd/intel-lpss.c ret = mfd_add_devices(dev, lpss->devid, lpss->cell, lpss 438 drivers/mfd/intel-lpss.c intel_lpss_debugfs_remove(lpss); lpss 439 drivers/mfd/intel-lpss.c intel_lpss_ltr_hide(lpss); lpss 440 drivers/mfd/intel-lpss.c intel_lpss_unregister_clock(lpss); lpss 443 drivers/mfd/intel-lpss.c ida_simple_remove(&intel_lpss_devid_ida, lpss->devid); lpss 451 drivers/mfd/intel-lpss.c struct intel_lpss *lpss = dev_get_drvdata(dev); lpss 454 drivers/mfd/intel-lpss.c intel_lpss_debugfs_remove(lpss); lpss 455 drivers/mfd/intel-lpss.c intel_lpss_ltr_hide(lpss); lpss 456 drivers/mfd/intel-lpss.c intel_lpss_unregister_clock(lpss); lpss 457 drivers/mfd/intel-lpss.c ida_simple_remove(&intel_lpss_devid_ida, lpss->devid); lpss 482 drivers/mfd/intel-lpss.c struct intel_lpss *lpss = dev_get_drvdata(dev); lpss 487 drivers/mfd/intel-lpss.c lpss->priv_ctx[i] = readl(lpss->priv + i * 4); lpss 494 drivers/mfd/intel-lpss.c if (lpss->type != LPSS_DEV_UART) lpss 495 drivers/mfd/intel-lpss.c writel(0, lpss->priv + LPSS_PRIV_RESETS); lpss 503 drivers/mfd/intel-lpss.c struct intel_lpss *lpss = dev_get_drvdata(dev); lpss 506 drivers/mfd/intel-lpss.c intel_lpss_deassert_reset(lpss); lpss 510 drivers/mfd/intel-lpss.c writel(lpss->priv_ctx[i], lpss->priv + i * 4); lpss 76 drivers/tty/serial/8250/8250_lpss.c struct lpss8250 *lpss = to_lpss8250(p->private_data); lpss 77 drivers/tty/serial/8250/8250_lpss.c unsigned long fref = lpss->board->freq, fuart = baud * 16; lpss 120 drivers/tty/serial/8250/8250_lpss.c static int byt_serial_setup(struct lpss8250 *lpss, struct uart_port *port) lpss 122 drivers/tty/serial/8250/8250_lpss.c struct dw_dma_slave *param = &lpss->dma_param; lpss 148 drivers/tty/serial/8250/8250_lpss.c lpss->dma_maxburst = 16; lpss 170 drivers/tty/serial/8250/8250_lpss.c static void qrk_serial_setup_dma(struct lpss8250 *lpss, struct uart_port *port) lpss 172 drivers/tty/serial/8250/8250_lpss.c struct uart_8250_dma *dma = &lpss->data.dma; lpss 173 drivers/tty/serial/8250/8250_lpss.c struct dw_dma_chip *chip = &lpss->dma_chip; lpss 174 drivers/tty/serial/8250/8250_lpss.c struct dw_dma_slave *param = &lpss->dma_param; lpss 202 drivers/tty/serial/8250/8250_lpss.c lpss->dma_maxburst = 8; lpss 205 drivers/tty/serial/8250/8250_lpss.c static void qrk_serial_exit_dma(struct lpss8250 *lpss) lpss 207 drivers/tty/serial/8250/8250_lpss.c struct dw_dma_chip *chip = &lpss->dma_chip; lpss 208 drivers/tty/serial/8250/8250_lpss.c struct dw_dma_slave *param = &lpss->dma_param; lpss 218 drivers/tty/serial/8250/8250_lpss.c static void qrk_serial_setup_dma(struct lpss8250 *lpss, struct uart_port *port) {} lpss 219 drivers/tty/serial/8250/8250_lpss.c static void qrk_serial_exit_dma(struct lpss8250 *lpss) {} lpss 222 drivers/tty/serial/8250/8250_lpss.c static int qrk_serial_setup(struct lpss8250 *lpss, struct uart_port *port) lpss 235 drivers/tty/serial/8250/8250_lpss.c qrk_serial_setup_dma(lpss, port); lpss 239 drivers/tty/serial/8250/8250_lpss.c static void qrk_serial_exit(struct lpss8250 *lpss) lpss 241 drivers/tty/serial/8250/8250_lpss.c qrk_serial_exit_dma(lpss); lpss 255 drivers/tty/serial/8250/8250_lpss.c static int lpss8250_dma_setup(struct lpss8250 *lpss, struct uart_8250_port *port) lpss 257 drivers/tty/serial/8250/8250_lpss.c struct uart_8250_dma *dma = &lpss->data.dma; lpss 261 drivers/tty/serial/8250/8250_lpss.c if (!lpss->dma_param.dma_dev) lpss 272 drivers/tty/serial/8250/8250_lpss.c *rx_param = lpss->dma_param; lpss 273 drivers/tty/serial/8250/8250_lpss.c dma->rxconf.src_maxburst = lpss->dma_maxburst; lpss 275 drivers/tty/serial/8250/8250_lpss.c *tx_param = lpss->dma_param; lpss 276 drivers/tty/serial/8250/8250_lpss.c dma->txconf.dst_maxburst = lpss->dma_maxburst; lpss 289 drivers/tty/serial/8250/8250_lpss.c struct lpss8250 *lpss; lpss 296 drivers/tty/serial/8250/8250_lpss.c lpss = devm_kzalloc(&pdev->dev, sizeof(*lpss), GFP_KERNEL); lpss 297 drivers/tty/serial/8250/8250_lpss.c if (!lpss) lpss 300 drivers/tty/serial/8250/8250_lpss.c lpss->board = (struct lpss8250_board *)id->driver_data; lpss 306 drivers/tty/serial/8250/8250_lpss.c uart.port.private_data = &lpss->data; lpss 310 drivers/tty/serial/8250/8250_lpss.c uart.port.uartclk = lpss->board->base_baud * 16; lpss 318 drivers/tty/serial/8250/8250_lpss.c ret = lpss->board->setup(lpss, &uart.port); lpss 324 drivers/tty/serial/8250/8250_lpss.c ret = lpss8250_dma_setup(lpss, &uart); lpss 332 drivers/tty/serial/8250/8250_lpss.c lpss->data.line = ret; lpss 334 drivers/tty/serial/8250/8250_lpss.c pci_set_drvdata(pdev, lpss); lpss 338 drivers/tty/serial/8250/8250_lpss.c if (lpss->board->exit) lpss 339 drivers/tty/serial/8250/8250_lpss.c lpss->board->exit(lpss); lpss 345 drivers/tty/serial/8250/8250_lpss.c struct lpss8250 *lpss = pci_get_drvdata(pdev); lpss 347 drivers/tty/serial/8250/8250_lpss.c serial8250_unregister_port(lpss->data.line); lpss 349 drivers/tty/serial/8250/8250_lpss.c if (lpss->board->exit) lpss 350 drivers/tty/serial/8250/8250_lpss.c lpss->board->exit(lpss);