Attention is currently required from: Intel coreboot Reviewers.
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/87249?usp=email )
Change subject: drivers/intel/mipi_camera: Rework info print output ......................................................................
drivers/intel/mipi_camera: Rework info print output
Fix the INFO print for a mipi camera device:
- fix device path type for generic devices - print parent device path and PCI devfn for generic devices - reformat the output for both device types to improve readability
before: [INFO ] _SB.PCI0.IPU0.IPU0: Intel MIPI Camera Device I2C address 00h [INFO ] _SB.PCI0.I2C3.CAM0: Intel MIPI Camera Device I2C address 010h [INFO ] _SB.PCI0.I2C3.VCM0: Intel MIPI Camera Device I2C address 0ch [INFO ] _SB.PCI0.I2C3.NVM0: Intel MIPI Camera Device I2C address 050h
after: [INFO ] _SB.PCI0.IPU0: Intel MIPI Camera Device at PCI 05.0 [INFO ] _SB.PCI0.I2C3.CAM0: Intel MIPI Camera Device at I2C 0x10 [INFO ] _SB.PCI0.I2C3.VCM0: Intel MIPI Camera Device at I2C 0x0c [INFO ] _SB.PCI0.I2C3.NVM0: Intel MIPI Camera Device at I2C 0x50
Change-Id: I5c4a072e35c4e0a14b6df0d5f199c5ffb3d61d32 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 6 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/87249/1
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index bf457f5..4268646 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -930,10 +930,9 @@ { struct drivers_intel_mipi_camera_config *config = dev->chip_info; const char *scope = NULL; - const struct device *pdev; + const struct device *pdev = dev->upstream->dev;
if (config->has_power_resource) { - pdev = dev->upstream->dev; if (!pdev || !pdev->enabled) return;
@@ -957,7 +956,6 @@ write_i2c_camera_device(dev, scope); break; case DEVICE_PATH_GENERIC: - pdev = dev->upstream->dev; scope = acpi_device_scope(pdev); if (!scope) return; @@ -976,11 +974,12 @@ acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */
- if (dev->path.type == DEVICE_PATH_PCI) { - printk(BIOS_INFO, "%s: %s PCI address 0%x\n", acpi_device_path(dev), - dev->chip_ops->name, dev->path.pci.devfn); + if (dev->path.type == DEVICE_PATH_GENERIC) { + printk(BIOS_INFO, "%s: %s at PCI %02x.%01x\n", acpi_device_path(pdev), + dev->chip_ops->name, PCI_SLOT(pdev->path.pci.devfn), + PCI_FUNC(pdev->path.pci.devfn)); } else { - printk(BIOS_INFO, "%s: %s I2C address 0%xh\n", acpi_device_path(dev), + printk(BIOS_INFO, "%s: %s at I2C 0x%02x\n", acpi_device_path(dev), dev->chip_ops->name, dev->path.i2c.device); } }