summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2025-04-08 13:01:00 -0500
committerMatt DeVillier <matt.devillier@gmail.com>2025-04-21 17:01:15 +0000
commitfc8e88da9bd9b03da9e84cdf7795db4d1009e7ef (patch)
tree4321f728bc81f67c6ad5b3e7f2960f179b9be285 /src
parentd04d7d80b05b4d18c1a4a0dcfd821becdbd4f341 (diff)
downloadcoreboot-fc8e88da9bd9b03da9e84cdf7795db4d1009e7ef.tar.gz
coreboot-fc8e88da9bd9b03da9e84cdf7795db4d1009e7ef.tar.bz2
coreboot-fc8e88da9bd9b03da9e84cdf7795db4d1009e7ef.zip
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87249 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/intel/mipi_camera/camera.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c
index bf457f5b4eda..4268646de8ff 100644
--- a/src/drivers/intel/mipi_camera/camera.c
+++ b/src/drivers/intel/mipi_camera/camera.c
@@ -930,10 +930,9 @@ static void camera_fill_ssdt(const struct device *dev)
{
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 @@ static void camera_fill_ssdt(const struct device *dev)
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 @@ static void camera_fill_ssdt(const struct device *dev)
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);
}
}