platform/chrome: cros_ec_lpc: Handle EC without CRS section
Fix logic to support GOOG0004 device without CRS section.
Instead of failing, assume there are not memory mapped EC registers.
Fixes: be4fccb5e1 ("platform/chrome: cros_ec_lpc: Support direct EC register memory access")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20250114202122.2352277-1-gwendal@chromium.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
committed by
Tzung-Bi Shih
parent
15fa0621d7
commit
fccebbdde2
@@ -562,11 +562,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev)
|
||||
*/
|
||||
status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
|
||||
cros_ec_lpc_resources, ec_lpc);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
dev_err(dev, "failed to get resources\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
if (ec_lpc->mem32.address_length) {
|
||||
if (ACPI_SUCCESS(status) && ec_lpc->mem32.address_length) {
|
||||
ec_lpc->base = devm_ioremap(dev,
|
||||
ec_lpc->mem32.address,
|
||||
ec_lpc->mem32.address_length);
|
||||
|
||||
Reference in New Issue
Block a user