Sugnan Prabhu S has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44025 )
Change subject: drivers/intel/mipi_camera: Handling IPU generic device ......................................................................
drivers/intel/mipi_camera: Handling IPU generic device
Includes changes in mipi_camera driver to handle generic device which fixes the IPU device probing.
Change-Id: I309edd065719cb8250f1241898bb5854004d2a9f Signed-off-by: Sugnan Prabhu S sugnan.prabhu.s@intel.com --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 22 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/44025/1
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index 51686d0..6f237a9 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -761,8 +761,6 @@
static void write_pci_camera_device(const struct device *dev) { - struct drivers_intel_mipi_camera_config *config = dev->chip_info; - if (dev->path.type != DEVICE_PATH_PCI) { printk(BIOS_ERR, "CIO2/IMGU devices require PCI\n"); return; @@ -770,8 +768,7 @@
acpigen_write_device(acpi_device_name(dev)); acpigen_write_ADR_pci_device(dev); - acpigen_write_name_string("_DDN", config->device_type == INTEL_ACPI_CAMERA_CIO2 ? - "Camera and Imaging Subsystem" : "Imaging Unit"); + acpigen_write_name_string("_DDN", "Camera and Imaging Subsystem"); }
static void write_i2c_camera_device(const struct device *dev, const char *scope) @@ -784,11 +781,6 @@ .resource = scope, };
- if (dev->path.type != DEVICE_PATH_I2C) { - printk(BIOS_ERR, "Non-CIO2/IMGU devices require I2C\n"); - return; - } - acpigen_write_device(acpi_device_name(dev));
/* add power resource */ @@ -930,18 +922,29 @@ acpigen_pop_len(); /* Guarded power resource operations scope */ }
- /* Device */ - scope = acpi_device_scope(dev); - if (!scope) - return; + switch (dev->path.type) { + case DEVICE_PATH_I2C: + scope = acpi_device_scope(dev); + if (!scope) + return;
- acpigen_write_scope(scope); - - if (config->device_type == INTEL_ACPI_CAMERA_CIO2 || - config->device_type == INTEL_ACPI_CAMERA_IMGU) - write_pci_camera_device(dev); - else + acpigen_write_scope(scope); write_i2c_camera_device(dev, scope); + break; + case DEVICE_PATH_GENERIC: + pdev = dev->bus->dev; + scope = acpi_device_scope(pdev); + if (!scope) + return; + + acpigen_write_scope(scope); + write_pci_camera_device(pdev); + break; + default: + printk(BIOS_ERR, "Unsupported device type: %x\n" + "OS camera driver will likely not work\n", dev->path.type); + return; + }
write_camera_device_common(dev);
Hello Varshit B Pandya, build bot (Jenkins), Tim Wawrzynczak, Rizwan Qureshi, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44025
to look at the new patch set (#2).
Change subject: drivers/intel/mipi_camera: Handling IPU generic device ......................................................................
drivers/intel/mipi_camera: Handling IPU generic device
Includes changes in mipi_camera driver to handle generic device which fixes the IPU device probing.
Change-Id: I309edd065719cb8250f1241898bb5854004d2a9f Signed-off-by: Sugnan Prabhu S sugnan.prabhu.s@intel.com --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 22 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/44025/2
Hello Varshit B Pandya, build bot (Jenkins), Tim Wawrzynczak, Rizwan Qureshi, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44025
to look at the new patch set (#3).
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU device ......................................................................
drivers/intel/mipi_camera: Fix SSDT generation for IPU device
Includes changes in mipi_camera driver to fix SSDT generation for IPU device.
Change-Id: I309edd065719cb8250f1241898bb5854004d2a9f Signed-off-by: Sugnan Prabhu S sugnan.prabhu.s@intel.com --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 22 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/44025/3
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44025 )
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU device ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44025/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44025/3//COMMIT_MSG@10 PS3, Line 10: device. Add just a little bit about what you fixed?
Hello Varshit B Pandya, build bot (Jenkins), Tim Wawrzynczak, Rizwan Qureshi, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44025
to look at the new patch set (#4).
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU devices ......................................................................
drivers/intel/mipi_camera: Fix SSDT generation for IPU devices
Includes changes in mipi_camera driver to fix following issues related to SSDT generation for IPU devices. 1. acpigen_write_device was not getting called for IPU devices 2. acpigen_pop_len was called for a generic devices without calling acpigen_write_device
Change-Id: I309edd065719cb8250f1241898bb5854004d2a9f Signed-off-by: Sugnan Prabhu S sugnan.prabhu.s@intel.com --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 22 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/44025/4
Sugnan Prabhu S has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44025 )
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU devices ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44025/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44025/3//COMMIT_MSG@10 PS3, Line 10: device.
Add just a little bit about what you fixed?
Done
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44025 )
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU devices ......................................................................
Patch Set 4: Code-Review+2
Hello Varshit B Pandya, build bot (Jenkins), Tim Wawrzynczak, Rizwan Qureshi, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44025
to look at the new patch set (#5).
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU devices ......................................................................
drivers/intel/mipi_camera: Fix SSDT generation for IPU devices
Includes changes in mipi_camera driver to fix following issues related to SSDT generation for IPU devices. 1. acpigen_write_device was not getting called for IPU devices 2. acpigen_pop_len was called for a generic devices without calling acpigen_write_device
Change-Id: I309edd065719cb8250f1241898bb5854004d2a9f Signed-off-by: Sugnan Prabhu S sugnan.prabhu.s@intel.com --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 22 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/44025/5
Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44025 )
Change subject: drivers/intel/mipi_camera: Fix SSDT generation for IPU devices ......................................................................
drivers/intel/mipi_camera: Fix SSDT generation for IPU devices
Includes changes in mipi_camera driver to fix following issues related to SSDT generation for IPU devices. 1. acpigen_write_device was not getting called for IPU devices 2. acpigen_pop_len was called for a generic devices without calling acpigen_write_device
Change-Id: I309edd065719cb8250f1241898bb5854004d2a9f Signed-off-by: Sugnan Prabhu S sugnan.prabhu.s@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/44025 Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/drivers/intel/mipi_camera/camera.c 1 file changed, 22 insertions(+), 19 deletions(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index 51686d0..6f237a9 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -761,8 +761,6 @@
static void write_pci_camera_device(const struct device *dev) { - struct drivers_intel_mipi_camera_config *config = dev->chip_info; - if (dev->path.type != DEVICE_PATH_PCI) { printk(BIOS_ERR, "CIO2/IMGU devices require PCI\n"); return; @@ -770,8 +768,7 @@
acpigen_write_device(acpi_device_name(dev)); acpigen_write_ADR_pci_device(dev); - acpigen_write_name_string("_DDN", config->device_type == INTEL_ACPI_CAMERA_CIO2 ? - "Camera and Imaging Subsystem" : "Imaging Unit"); + acpigen_write_name_string("_DDN", "Camera and Imaging Subsystem"); }
static void write_i2c_camera_device(const struct device *dev, const char *scope) @@ -784,11 +781,6 @@ .resource = scope, };
- if (dev->path.type != DEVICE_PATH_I2C) { - printk(BIOS_ERR, "Non-CIO2/IMGU devices require I2C\n"); - return; - } - acpigen_write_device(acpi_device_name(dev));
/* add power resource */ @@ -930,18 +922,29 @@ acpigen_pop_len(); /* Guarded power resource operations scope */ }
- /* Device */ - scope = acpi_device_scope(dev); - if (!scope) - return; + switch (dev->path.type) { + case DEVICE_PATH_I2C: + scope = acpi_device_scope(dev); + if (!scope) + return;
- acpigen_write_scope(scope); - - if (config->device_type == INTEL_ACPI_CAMERA_CIO2 || - config->device_type == INTEL_ACPI_CAMERA_IMGU) - write_pci_camera_device(dev); - else + acpigen_write_scope(scope); write_i2c_camera_device(dev, scope); + break; + case DEVICE_PATH_GENERIC: + pdev = dev->bus->dev; + scope = acpi_device_scope(pdev); + if (!scope) + return; + + acpigen_write_scope(scope); + write_pci_camera_device(pdev); + break; + default: + printk(BIOS_ERR, "Unsupported device type: %x\n" + "OS camera driver will likely not work\n", dev->path.type); + return; + }
write_camera_device_common(dev);