Commit 305a7e6c authored by Declan Snyder's avatar Declan Snyder Committed by Daniel DeGrasse
Browse files

soc: nxp: imxrt: Remove ifdef around DCDC



The DCDC should be on all the platforms and the functions and structs
should therefore be defined on all the platforms. So the ifdef is not
needed, we can remove it to increase code compilation coverage unity
across configurations slightly. Compiler should optimize out the block
when IS_ENABLED is false statically.

Signed-off-by: default avatarDeclan Snyder <declan.snyder@nxp.com>
parent 16e74b92
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -114,15 +114,15 @@ __weak void clock_init(void)
	/* Set PERIPH_CLK MUX to PERIPH_CLK2 */
	CLOCK_SetMux(kCLOCK_PeriphMux, 0x1);

#if CONFIG_ADJUST_DCDC
	if (IS_ENABLED(CONFIG_ADJUST_DCDC)) {
		/* Setting the VDD_SOC value */
	DCDC->REG3 = (DCDC->REG3 & (~DCDC_REG3_TRG_MASK)) | DCDC_REG3_TRG(CONFIG_DCDC_VALUE);
		DCDC->REG3 = (DCDC->REG3 & (~DCDC_REG3_TRG_MASK)) |
				DCDC_REG3_TRG(CONFIG_DCDC_VALUE);
		/* Waiting for DCDC_STS_DC_OK bit is asserted */
	while (DCDC_REG0_STS_DC_OK_MASK !=
			(DCDC_REG0_STS_DC_OK_MASK & DCDC->REG0)) {
		while (DCDC_REG0_STS_DC_OK_MASK != (DCDC_REG0_STS_DC_OK_MASK & DCDC->REG0)) {
			;
		}
#endif
	}

#ifdef CONFIG_INIT_ARM_PLL
	/* ARM PLL configuration for RUN mode */
+3 −3
Original line number Diff line number Diff line
@@ -133,9 +133,9 @@ __weak void clock_init(void)
{
	clock_root_config_t rootCfg = {0};

#if CONFIG_ADJUST_DCDC
	if (IS_ENABLED(CONFIG_ADJUST_DCDC)) {
		DCDC_SetVDD1P0BuckModeTargetVoltage(DCDC, kDCDC_1P0BuckTarget1P15V);
#endif
	}

/* RT1160 does not have Forward Body Biasing on the CM7 core */
#if defined(CONFIG_SOC_MIMXRT1176_CM4) || defined(CONFIG_SOC_MIMXRT1176_CM7)