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
This commit is contained in:
Amaury Pouly 2013-06-23 18:59:13 +02:00
parent be5fadff94
commit d938ae692c
3 changed files with 36 additions and 9 deletions

View file

@ -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 */