diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-23 18:59:13 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-24 13:17:17 +0200 |
commit | d938ae692cfc720210236eccd7910abe15c761c0 (patch) | |
tree | 1826a2135820122c17a3beb43a78e03e4b4eea77 /firmware/target/arm/imx233/ocotp-imx233.h | |
parent | be5fadff942ad83aec9a73f34cf39f55bca13a80 (diff) | |
download | rockbox-d938ae692cfc720210236eccd7910abe15c761c0.tar.gz rockbox-d938ae692cfc720210236eccd7910abe15c761c0.tar.bz2 rockbox-d938ae692cfc720210236eccd7910abe15c761c0.zip |
imx233: fix ocotop/debug and usb-core for stmp3600
Currently we don't know where the serial number is stored on the
stmp3600. It is probably using the laser fuses but this needs to
be investigated
Change-Id: I1ac25e38b8f65635abb68788ceb65df0a740dabd
Diffstat (limited to 'firmware/target/arm/imx233/ocotp-imx233.h')
-rw-r--r-- | firmware/target/arm/imx233/ocotp-imx233.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/ocotp-imx233.h b/firmware/target/arm/imx233/ocotp-imx233.h index 635d7c9267..0827ea0d19 100644 --- a/firmware/target/arm/imx233/ocotp-imx233.h +++ b/firmware/target/arm/imx233/ocotp-imx233.h @@ -24,9 +24,12 @@ #include "config.h" #include "system.h" -#include "regs/regs-ocotp.h" +/** STMP3700 and over have OCOTP registers + * where STMP3600 has laser fuses. */ #if IMX233_SUBTARGET >= 3700 +#include "regs/regs-ocotp.h" + #define IMX233_NUM_OCOTP_CUST 4 #define IMX233_NUM_OCOTP_CRYPTO 4 #define IMX233_NUM_OCOTP_HWCAP 6 @@ -53,6 +56,18 @@ static inline uint32_t imx233_ocotp_read(volatile uint32_t *reg) imx233_ocotp_open_banks(false); return val; } +#else +#include "regs/regs-rtc.h" + +#define IMX233_NUM_OCOTP_LASERFUSE 12 + +static inline uint32_t imx233_ocotp_read(volatile uint32_t *reg) +{ + BF_WR_V(RTC_UNLOCK, KEY, VAL); + uint32_t val = *reg; + BF_WR(RTC_UNLOCK, KEY, 0); + return val; +} #endif #endif /* OCOTP_IMX233_H */ |