drivers: hwinfo: Don't disable CLOE on SAM3x seies
CLOE (Code Loop Optimization) does not exist on SAM3x. Make the EEFC_FMR_CLOE disable depending on CONFIG_SOC_SERIES_SAM3X. Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This commit is contained in:
parent
4cfd4a707d
commit
a22f0ac1ab
1 changed files with 6 additions and 0 deletions
|
@ -73,7 +73,13 @@ static int hwinfo_sam_init(struct device *arg)
|
|||
|
||||
/* Disable code loop optimization and sequential code optimization. */
|
||||
fmr = efc->EEFC_FMR;
|
||||
|
||||
#ifndef CONFIG_SOC_SERIES_SAM3X
|
||||
efc->EEFC_FMR = (fmr & (~EEFC_FMR_CLOE)) | EEFC_FMR_SCOD;
|
||||
#else
|
||||
/* SAM3x does not have loop optimization (EEFC_FMR_CLOE) */
|
||||
efc->EEFC_FMR |= EEFC_FMR_SCOD;
|
||||
#endif
|
||||
|
||||
/* Read the device ID using code in RAM */
|
||||
hwinfo_sam_read_device_id();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue