diff options
author | Lothar Rubusch <l.rubusch@gmail.com> | 2024-05-03 21:10:53 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-05-10 17:15:25 +0800 |
commit | e05ce444e9e59f924b53da8209bfb7208653817c (patch) | |
tree | 5503d5206154a6b54fdcc70947f59ba1b3f502ab /drivers/crypto/atmel-i2c.h | |
parent | 3f5f746165f7082f3c3f2f4b464e554c05a2621e (diff) | |
download | linux-e05ce444e9e59f924b53da8209bfb7208653817c.tar.gz linux-e05ce444e9e59f924b53da8209bfb7208653817c.tar.bz2 linux-e05ce444e9e59f924b53da8209bfb7208653817c.zip |
crypto: atmel-sha204a - add reading from otp zone
Provide a read function reading the otp zone. The otp zone can be used for
storing serial numbers. The otp zone, as also data zone, are only
accessible if the chip was locked before. Locking the chip is a post
production customization and has to be done manually i.e. not by this
driver. Without this step the chip is pretty much not usable, where
putting or not putting data into the otp zone is optional.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-i2c.h')
-rw-r--r-- | drivers/crypto/atmel-i2c.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/crypto/atmel-i2c.h b/drivers/crypto/atmel-i2c.h index 275297a8208b..72f04c15682f 100644 --- a/drivers/crypto/atmel-i2c.h +++ b/drivers/crypto/atmel-i2c.h @@ -64,6 +64,10 @@ struct atmel_i2c_cmd { /* Definitions for eeprom organization */ #define CONFIGURATION_ZONE 0 +#define OTP_ZONE 1 + +/* Definitions for eeprom zone sizes */ +#define OTP_ZONE_SIZE 64 /* Definitions for Indexes common to all commands */ #define RSP_DATA_IDX 1 /* buffer index of data in response */ @@ -179,6 +183,7 @@ void atmel_i2c_flush_queue(void); int atmel_i2c_send_receive(struct i2c_client *client, struct atmel_i2c_cmd *cmd); void atmel_i2c_init_read_config_cmd(struct atmel_i2c_cmd *cmd); +int atmel_i2c_init_read_otp_cmd(struct atmel_i2c_cmd *cmd, u16 addr); void atmel_i2c_init_random_cmd(struct atmel_i2c_cmd *cmd); void atmel_i2c_init_genkey_cmd(struct atmel_i2c_cmd *cmd, u16 keyid); int atmel_i2c_init_ecdh_cmd(struct atmel_i2c_cmd *cmd, |