Skip to content

Commit a22f0ac

Browse files
alexanderwachtercarlescufi
authored andcommitted
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 <[email protected]>
1 parent 4cfd4a7 commit a22f0ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/hwinfo/hwinfo_sam.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ static int hwinfo_sam_init(struct device *arg)
7373

7474
/* Disable code loop optimization and sequential code optimization. */
7575
fmr = efc->EEFC_FMR;
76+
77+
#ifndef CONFIG_SOC_SERIES_SAM3X
7678
efc->EEFC_FMR = (fmr & (~EEFC_FMR_CLOE)) | EEFC_FMR_SCOD;
79+
#else
80+
/* SAM3x does not have loop optimization (EEFC_FMR_CLOE) */
81+
efc->EEFC_FMR |= EEFC_FMR_SCOD;
82+
#endif
7783

7884
/* Read the device ID using code in RAM */
7985
hwinfo_sam_read_device_id();

0 commit comments

Comments
 (0)