1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

cros_ec: Drop unused CONFIG_DM_CROS_EC

Since all supported boards enable this option now, we can remove it along
with the old code.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2015-03-26 09:29:32 -06:00
parent e96fc7dfc8
commit 60f37fc6aa
10 changed files with 1 additions and 506 deletions

View File

@@ -15,18 +15,8 @@
DECLARE_GLOBAL_DATA_PTR;
#ifndef CONFIG_DM_CROS_EC
struct local_info {
struct cros_ec_dev *cros_ec_dev; /* Pointer to cros_ec device */
int cros_ec_err; /* Error for cros_ec, 0 if ok */
};
static struct local_info local;
#endif
struct cros_ec_dev *board_get_cros_ec_dev(void)
{
#ifdef CONFIG_DM_CROS_EC
struct udevice *dev;
int ret;
@@ -36,30 +26,15 @@ struct cros_ec_dev *board_get_cros_ec_dev(void)
return NULL;
}
return dev_get_uclass_priv(dev);
#else
return local.cros_ec_dev;
#endif
}
static int board_init_cros_ec_devices(const void *blob)
{
#ifndef CONFIG_DM_CROS_EC
local.cros_ec_err = cros_ec_init(blob, &local.cros_ec_dev);
if (local.cros_ec_err)
return -1; /* Will report in board_late_init() */
#endif
return 0;
}
int cros_ec_board_init(void)
{
return board_init_cros_ec_devices(gd->fdt_blob);
return 0;
}
int cros_ec_get_error(void)
{
#ifdef CONFIG_DM_CROS_EC
struct udevice *dev;
int ret;
@@ -68,7 +43,4 @@ int cros_ec_get_error(void)
return ret;
return 0;
#else
return local.cros_ec_err;
#endif
}