]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/chrome: Prevent build for big-endian systems
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 31 May 2026 13:20:16 +0000 (15:20 +0200)
committerTzung-Bi Shih <tzungbi@kernel.org>
Tue, 2 Jun 2026 03:14:10 +0000 (03:14 +0000)
Both ARM and ARM64 which are a dependency for CHROME_PLATFORMS have
seldomly used big-endian variants.

The ChromeOS EC framework and drivers are written under the assumption
that they will be running on a little-endian systems. Code which would
be broken on big-endian can be found trivially.

Some examples:
cros_ec.c: suspend_params.sleep_timeout_ms = ec_dev->suspend_timeout_ms
cros_ec_debugfs.c: resp->time_since_ec_boot_ms
cros_ec_wdt.c: arg.req.reboot_timeout_sec = wdd->timeout

Prevent the build for big-endian systems.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20260531-cros-big-endian-v1-2-0cc90f39c636@weissschuh.net
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/Kconfig

index 78acc052377b6e235370e4c8e851300ca008bd93..ca2e8442026e03ffa56334253af3829249e68ef0 100644 (file)
@@ -6,6 +6,7 @@
 menuconfig CHROME_PLATFORMS
        bool "Platform support for Chrome hardware"
        depends on X86 || ARM || ARM64 || COMPILE_TEST
+       depends on !CPU_BIG_ENDIAN || COMPILE_TEST
        help
          Say Y here to get to see options for platform support for
          various Chromebooks and Chromeboxes. This option alone does