// SPDX-License-Identifier: GPL-2.0 /* * Dummy driver for Intel's Image Signal Processor found on Bay Trail * and Cherry Trail devices. The sole purpose of this driver is to allow * the ISP to be put in D3. * * Copyright (C) 2018 Hans de Goede <hdegoede@redhat.com> * * Based on various non upstream patches for ISP support: * Copyright (C) 2010-2017 Intel Corporation. All rights reserved. * Copyright (c) 2010 Silicon Hive www.siliconhive.com.
*/
/* Write to ISPSSPM0 bit[1:0] to power on/off the IUNIT */
iosf_mbi_modify(BT_MBI_UNIT_PMC, MBI_REG_READ, ISPSSPM0,
val, ISPSSPM0_ISPSSC_MASK);
/* * There should be no IUNIT access while power-down is * in progress. HW sighting: 4567865. * Wait up to 50 ms for the IUNIT to shut down. * And we do the same for power on.
*/
timeout = jiffies + msecs_to_jiffies(50); do {
u32 tmp;
/* Wait until ISPSSPM0 bit[25:24] shows the right value */
iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, ISPSSPM0, &tmp);
tmp = (tmp & ISPSSPM0_ISPSSS_MASK) >> ISPSSPM0_ISPSSS_OFFSET; if (tmp == val) return 0;
usleep_range(1000, 2000);
} while (time_before(jiffies, timeout));
/* * MRFLD IUNIT DPHY is located in an always-power-on island * MRFLD HW design need all CSI ports are disabled before * powering down the IUNIT.
*/
pci_read_config_dword(pdev, PCI_CSI_CONTROL, &val);
val |= PCI_CSI_CONTROL_PORTS_OFF_MASK;
pci_write_config_dword(pdev, PCI_CSI_CONTROL, val);
/* * We lose config space access when punit power gates * the ISP. Can't use pci_set_power_state() because * pmcsr won't actually change when we write to it.
*/
pci_save_state(pdev);
pdev->current_state = PCI_D3cold;
isp_set_power(pdev, false);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.