Merge tag 'u-boot-atmel-fixes-2021.01-b' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / drivers / misc / cros_ec_lpc.c
index 4ad6c8c..e0002b9 100644 (file)
 #define debug_trace(fmt, b...)
 #endif
 
+/* Timeout waiting for a flash erase command to complete */
+static const int CROS_EC_CMD_TIMEOUT_MS = 5000;
+
 static int wait_for_sync(struct cros_ec_dev *dev)
 {
        unsigned long start;
 
        start = get_timer(0);
        while (inb(EC_LPC_ADDR_HOST_CMD) & EC_LPC_STATUS_BUSY_MASK) {
-               if (get_timer(start) > 1000) {
+               if (get_timer(start) > CROS_EC_CMD_TIMEOUT_MS) {
                        debug("%s: Timeout waiting for CROS_EC sync\n",
                              __func__);
                        return -1;
@@ -243,8 +246,8 @@ static const struct udevice_id cros_ec_ids[] = {
        { }
 };
 
-U_BOOT_DRIVER(cros_ec_lpc) = {
-       .name           = "cros_ec_lpc",
+U_BOOT_DRIVER(google_cros_ec_lpc) = {
+       .name           = "google_cros_ec_lpc",
        .id             = UCLASS_CROS_EC,
        .of_match       = cros_ec_ids,
        .probe          = cros_ec_probe,