summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/Kconfig11
-rw-r--r--drivers/misc/cros_ec.c11
-rw-r--r--drivers/misc/cros_ec_sandbox.c4
-rw-r--r--drivers/misc/i2c_eeprom_emul.c2
-rw-r--r--drivers/misc/imx_ele/ele_api.c32
-rw-r--r--drivers/misc/imx_ele/ele_mu.c2
-rw-r--r--drivers/misc/k3_avs.c4
-rw-r--r--drivers/misc/qfw.c2
-rw-r--r--drivers/misc/qfw_acpi.c1
9 files changed, 51 insertions, 18 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index ea785793d18..44415f24ae1 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -71,9 +71,9 @@ config ATSHA204A
select BITREVERSE
depends on MISC
help
- Enable support for I2C connected Atmel's ATSHA204A
- CryptoAuthentication module found for example on the Turris Omnia
- board.
+ Enable support for I2C connected Atmel's ATSHA204A
+ CryptoAuthentication module found for example on the Turris Omnia
+ board.
config GATEWORKS_SC
bool "Gateworks System Controller Support"
@@ -94,7 +94,7 @@ config QCOM_GENI
etc.
config ROCKCHIP_EFUSE
- bool "Rockchip e-fuse support"
+ bool "Rockchip e-fuse support"
depends on MISC
help
Enable (read-only) access for the e-fuse block found in Rockchip
@@ -505,7 +505,7 @@ config TURRIS_OMNIA_MCU
board power off.
config USB_HUB_USB251XB
- tristate "USB251XB Hub Controller Configuration Driver"
+ bool "USB251XB Hub Controller Configuration Driver"
depends on I2C
help
This option enables support for configuration via SMBus of the
@@ -647,6 +647,7 @@ config IHS_FPGA
gdsys devices, which supply the majority of the functionality offered
by the devices. This driver supports both CON and CPU variants of the
devices, depending on the device tree entry.
+
config ESM_K3
bool "Enable K3 ESM driver"
depends on ARCH_K3
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index fabe4964a33..e163224b8e3 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -258,7 +258,7 @@ static int send_command_proto3(struct cros_ec_dev *cdev,
const void *dout, int dout_len,
uint8_t **dinp, int din_len)
{
- struct dm_cros_ec_ops *ops;
+ const struct dm_cros_ec_ops *ops;
int out_bytes, in_bytes;
int rv;
@@ -287,7 +287,7 @@ static int send_command(struct cros_ec_dev *dev, uint cmd, int cmd_version,
const void *dout, int dout_len,
uint8_t **dinp, int din_len)
{
- struct dm_cros_ec_ops *ops;
+ const struct dm_cros_ec_ops *ops;
int ret = -1;
/* Handle protocol version 3 support */
@@ -487,7 +487,7 @@ int cros_ec_read_build_info(struct udevice *dev, char **strp)
}
int cros_ec_read_current_image(struct udevice *dev,
- enum ec_current_image *image)
+ enum ec_image *image)
{
struct ec_response_get_version *r;
@@ -756,9 +756,8 @@ int cros_ec_flash_protect(struct udevice *dev, uint32_t set_mask,
static int cros_ec_check_version(struct udevice *dev)
{
struct cros_ec_dev *cdev = dev_get_uclass_priv(dev);
+ const struct dm_cros_ec_ops *ops;
struct ec_params_hello req;
-
- struct dm_cros_ec_ops *ops;
int ret;
ops = dm_cros_ec_get_ops(dev);
@@ -1638,7 +1637,7 @@ int cros_ec_vstore_write(struct udevice *dev, int slot, const uint8_t *data,
int cros_ec_get_switches(struct udevice *dev)
{
- struct dm_cros_ec_ops *ops;
+ const struct dm_cros_ec_ops *ops;
int ret;
ops = dm_cros_ec_get_ops(dev);
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 432b1fbb0c4..9fedca4e6b6 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -100,7 +100,7 @@ struct ec_state {
struct fdt_cros_ec ec_config;
uint8_t *flash_data;
int flash_data_len;
- enum ec_current_image current_image;
+ enum ec_image current_image;
int matrix_count;
struct ec_keymatrix_entry *matrix; /* the key matrix info */
uint8_t keyscan[KEYBOARD_COLS];
@@ -726,7 +726,7 @@ int cros_ec_probe(struct udevice *dev)
return cros_ec_register(dev);
}
-struct dm_cros_ec_ops cros_ec_ops = {
+static const struct dm_cros_ec_ops cros_ec_ops = {
.packet = cros_ec_sandbox_packet,
.get_switches = cros_ec_sandbox_get_switches,
};
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 3ad2e047ee3..40f34ad03a4 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -144,7 +144,7 @@ static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg,
return 0;
}
-struct dm_i2c_ops sandbox_i2c_emul_ops = {
+static const struct dm_i2c_ops sandbox_i2c_emul_ops = {
.xfer = sandbox_i2c_eeprom_xfer,
};
diff --git a/drivers/misc/imx_ele/ele_api.c b/drivers/misc/imx_ele/ele_api.c
index 8ee0a7733ca..355fd86ed8c 100644
--- a/drivers/misc/imx_ele/ele_api.c
+++ b/drivers/misc/imx_ele/ele_api.c
@@ -795,6 +795,38 @@ int ele_generate_dek_blob(u32 key_id, u32 src_paddr, u32 dst_paddr, u32 max_outp
return ret;
}
+int ele_v2x_get_state(struct v2x_get_state *state, u32 *response)
+{
+ struct udevice *dev = gd->arch.ele_dev;
+ int size = sizeof(struct ele_msg);
+ struct ele_msg msg = {};
+ int ret;
+
+ if (!dev) {
+ printf("ele dev is not initialized\n");
+ return -ENODEV;
+ }
+
+ msg.version = ELE_VERSION;
+ msg.tag = ELE_CMD_TAG;
+ msg.size = 1;
+ msg.command = ELE_V2X_GET_STATE_REQ;
+
+ ret = misc_call(dev, false, &msg, size, &msg, size);
+ if (ret)
+ printf("Error: %s: ret %d, response 0x%x\n",
+ __func__, ret, msg.data[0]);
+
+ if (response)
+ *response = msg.data[0];
+
+ state->v2x_state = msg.data[1] & 0xFF;
+ state->v2x_power_state = (msg.data[1] & 0xFF00) >> 8;
+ state->v2x_err_code = msg.data[2];
+
+ return ret;
+}
+
int ele_volt_change_start_req(void)
{
struct udevice *dev = gd->arch.ele_dev;
diff --git a/drivers/misc/imx_ele/ele_mu.c b/drivers/misc/imx_ele/ele_mu.c
index cdb85b999db..65a4779c041 100644
--- a/drivers/misc/imx_ele/ele_mu.c
+++ b/drivers/misc/imx_ele/ele_mu.c
@@ -209,7 +209,7 @@ static int imx8ulp_mu_probe(struct udevice *dev)
debug("%s(dev=%p) (priv=%p)\n", __func__, dev, priv);
- addr = devfdt_get_addr(dev);
+ addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index 0774e0a4c9e..a885c99c547 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -300,7 +300,7 @@ static void k3_avs_program_tshut(struct k3_avs_privdata *priv)
void __iomem *cfg2_base;
void __iomem *fuse_base;
- cfg2_base = (void __iomem *)devfdt_get_addr_index(priv->dev, 1);
+ cfg2_base = (void __iomem *)dev_read_addr_index(priv->dev, 1);
if (IS_ERR(cfg2_base)) {
dev_err(priv->dev, "cfg base is not defined\n");
return;
@@ -319,7 +319,7 @@ static void k3_avs_program_tshut(struct k3_avs_privdata *priv)
*/
if (device_is_compatible(priv->dev, "ti,j721e-vtm")) {
- fuse_base = (void __iomem *)devfdt_get_addr_index(priv->dev, 2);
+ fuse_base = (void __iomem *)dev_read_addr_index(priv->dev, 2);
if (IS_ERR(fuse_base)) {
dev_err(priv->dev, "fuse-base is not defined for J721E Soc\n");
return;
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index 0e002ac25f4..8a11637ca7f 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -152,7 +152,7 @@ UCLASS_DRIVER(qfw) = {
.per_device_auto = sizeof(struct qfw_dev),
};
-struct bootdev_ops qfw_bootdev_ops = {
+static const struct bootdev_ops qfw_bootdev_ops = {
.get_bootflow = qfw_get_bootflow,
};
diff --git a/drivers/misc/qfw_acpi.c b/drivers/misc/qfw_acpi.c
index 721f42ecbc3..afa3b820395 100644
--- a/drivers/misc/qfw_acpi.c
+++ b/drivers/misc/qfw_acpi.c
@@ -265,6 +265,7 @@ out:
struct acpi_rsdp *rsdp = ctx->rsdp;
rsdp->length = sizeof(*rsdp);
+ rsdp->ext_checksum = 0;
rsdp->ext_checksum = table_compute_checksum((u8 *)rsdp, sizeof(*rsdp));
gd_set_acpi_start(acpi_get_rsdp_addr());