platform/chrome: cros_ec_lpc: add a "quirks" system
authorDustin L. Howett <dustin@howett.net>
Wed, 3 Apr 2024 00:47:12 +0000 (19:47 -0500)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 24 Apr 2024 08:46:00 +0000 (16:46 +0800)
commite4dbf9d65e421860af09e5cb44177416bb3afe80
tree9bc33048a74780ff3acd30ecb97aa12a467ab20f
parentc0e6ba2d0b117176e1329c2bfe3fa4c79301c6cd
platform/chrome: cros_ec_lpc: add a "quirks" system

Some devices ship a ChromeOS EC in a non-standard configuration. Quirks
allow cros_ec_lpc to account for these non-standard configurations.

It only supports one quirk right now:
- CROS_EC_LPC_QUIRK_REMAP_MEMORY: use a different port I/O base for
  MMIO to the EC's memory region

Signed-off-by: Dustin L. Howett <dustin@howett.net>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Mario Limonciello <superm1@gmail.com>
Link: https://lore.kernel.org/r/20240403004713.130365-4-dustin@howett.net
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_ec_lpc.c