From 1d4321a85727420c019f675aebe9f644a9078908 Mon Sep 17 00:00:00 2001 From: Zhongfu Luo Date: Mon, 24 Jun 2019 16:14:04 +0800 Subject: [PATCH] unifykey: support operate efusekey for 32bit [1/1] PD#TV-7131 Problem: unifykey: can operate efusekey under 32bit Solution: unifykey: add operate efusekey support for 32bit Verify: TL1 skt board verify pass Change-Id: I0e0175554e180bb70da01e751ec5bcde4771c7a6 Signed-off-by: Zhongfu Luo --- drivers/amlogic/unifykey/unifykey.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/unifykey/unifykey.c b/drivers/amlogic/unifykey/unifykey.c index d2a9fad..a6d828c 100644 --- a/drivers/amlogic/unifykey/unifykey.c +++ b/drivers/amlogic/unifykey/unifykey.c @@ -285,7 +285,8 @@ static int key_efuse_init(struct key_info_t *uk_info, static int key_efuse_write(char *keyname, unsigned char *keydata, unsigned int datalen) { -#if defined(CONFIG_ARM64) && defined(CONFIG_AMLOGIC_EFUSE) +#if (defined(CONFIG_ARM64) || defined(CONFIG_ARM64_A32)) \ + && defined(CONFIG_AMLOGIC_EFUSE) char *title = keyname; struct efusekey_info info; @@ -308,7 +309,8 @@ static int key_efuse_write(char *keyname, unsigned char *keydata, static int key_efuse_read(char *keyname, unsigned char *keydata, unsigned int datalen, unsigned int *reallen) { -#if defined(CONFIG_ARM64) && defined(CONFIG_AMLOGIC_EFUSE) +#if (defined(CONFIG_ARM64) || defined(CONFIG_ARM64_A32)) \ + && defined(CONFIG_AMLOGIC_EFUSE) char *title = keyname; struct efusekey_info info; int err = 0; @@ -339,7 +341,8 @@ static int key_efuse_read(char *keyname, unsigned char *keydata, static int key_efuse_query(char *keyname, unsigned int *keystate) { int err = -EINVAL; -#if defined(CONFIG_ARM64) && defined(CONFIG_AMLOGIC_EFUSE) +#if (defined(CONFIG_ARM64) || defined(CONFIG_ARM64_A32)) \ + && defined(CONFIG_AMLOGIC_EFUSE) int i; char *title = keyname; struct efusekey_info info; @@ -545,7 +548,8 @@ int key_unify_size(struct aml_unifykey_dev *ukdev, if (unifykey->permit & KEY_M_PERMIT_READ) { switch (unifykey->dev) { -#if defined(CONFIG_ARM64) && defined(CONFIG_AMLOGIC_EFUSE) +#if (defined(CONFIG_ARM64) || defined(CONFIG_ARM64_A32)) \ + && defined(CONFIG_AMLOGIC_EFUSE) case KEY_M_EFUSE: { struct efusekey_info info; -- 2.7.4