Skip to content

Commit 7171d99

Browse files
stm32mp: stpmic1: remove the debug unit request by debugger
Depending on backup register value, U-Boot SPL maintains the debug unit powered-on for debugging purpose; only BUCK1 is required for powering the debug unit, so revert the setting for all the other power lanes, except BUCK3 that has to be always on. To be functional this patch requires a modification in the debugger ,openocd for example, to update the STM32MP15 backup register when it is required to debug SPL after reset. After deeper analysis this behavior will be never supported in tools so the associated code, will be never used and the associated code can be removed. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
1 parent 89c30ae commit 7171d99

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

arch/arm/mach-stm32mp/include/mach/stm32.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ enum boot_device {
135135
#define TAMP_BOOT_DEVICE_MASK GENMASK(7, 4)
136136
#define TAMP_BOOT_INSTANCE_MASK GENMASK(3, 0)
137137
#define TAMP_BOOT_FORCED_MASK GENMASK(7, 0)
138-
#define TAMP_BOOT_DEBUG_ON BIT(16)
139138

140139
enum forced_boot_mode {
141140
BOOT_NORMAL = 0x00,

board/st/common/stpmic1.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,4 @@ void stpmic1_init(u32 voltage_mv)
202202
STPMIC1_BUCKS_MRST_CR,
203203
STPMIC1_MRST_BUCK(STPMIC1_BUCK3),
204204
STPMIC1_MRST_BUCK(STPMIC1_BUCK3));
205-
206-
/* Check if debug is enabled to program PMIC according to the bit */
207-
if (readl(TAMP_BOOT_CONTEXT) & TAMP_BOOT_DEBUG_ON) {
208-
log_info("Keep debug unit ON\n");
209-
210-
pmic_clrsetbits(dev, STPMIC1_BUCKS_MRST_CR,
211-
STPMIC1_MRST_BUCK_DEBUG,
212-
STPMIC1_MRST_BUCK_DEBUG);
213-
214-
if (STPMIC1_MRST_LDO_DEBUG)
215-
pmic_clrsetbits(dev, STPMIC1_LDOS_MRST_CR,
216-
STPMIC1_MRST_LDO_DEBUG,
217-
STPMIC1_MRST_LDO_DEBUG);
218-
}
219205
}

include/power/stpmic1.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@
2323

2424
/* BUCKS_MRST_CR */
2525
#define STPMIC1_MRST_BUCK(buck) BIT(buck)
26-
#define STPMIC1_MRST_BUCK_DEBUG (STPMIC1_MRST_BUCK(STPMIC1_BUCK1) | \
27-
STPMIC1_MRST_BUCK(STPMIC1_BUCK3))
2826

2927
/* LDOS_MRST_CR */
3028
#define STPMIC1_MRST_LDO(ldo) BIT(ldo)
31-
#define STPMIC1_MRST_LDO_DEBUG 0
3229

3330
/* BUCKx_MAIN_CR (x=1...4) */
3431
#define STPMIC1_BUCK_ENA BIT(0)

0 commit comments

Comments
 (0)