From ab881a317050f2a348b676b5406653704076b6d6 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Tue, 17 May 2016 16:16:37 +0200 Subject: [PATCH] Rename config register block as config instead of control --- core/system.c | 84 ++++++++++++++++++------------------ core/watchdog.c | 44 +++++++++---------- drivers/adc.c | 10 ++--- drivers/rtc.c | 6 +-- drivers/serial.c | 8 ++-- drivers/ssp.c | 4 +- include/core/lpc_regs_12xx.h | 4 +- 7 files changed, 80 insertions(+), 80 deletions(-) diff --git a/core/system.c b/core/system.c index 1ea1562..6068fce 100644 --- a/core/system.c +++ b/core/system.c @@ -65,14 +65,14 @@ static struct lpc_desc_private lpc_private = { static void flash_accelerator_config(uint32_t freq_sel) { struct lpc_flash_control* fcfg = LPC_FLASH_CONTROL; - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; if (freq_sel & 0x01) { /* 1 cycle read mode */ - sys_ctrl->peripheral_reset_ctrl |= LPC_FLASH_OVERRIDE; + sys_config->peripheral_reset_ctrl |= LPC_FLASH_OVERRIDE; } else { /* multiple cycle flash read mode */ - sys_ctrl->peripheral_reset_ctrl &= ~(LPC_FLASH_OVERRIDE); + sys_config->peripheral_reset_ctrl &= ~(LPC_FLASH_OVERRIDE); fcfg->flash_cfg &= ~(LPC_FLASH_CFG_MASK); fcfg->flash_cfg |= ((freq_sel & 0x06) >> 1); } @@ -81,16 +81,16 @@ static void flash_accelerator_config(uint32_t freq_sel) /* Configure the brown-out detection */ void system_brown_out_detection_config(uint32_t level) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; if (level == 0) { /* Disable Brown-Out Detection, power it down */ - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_BOD; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_BOD; lpc_private.brown_out_detection_enabled = 0; } else { /* Power on Brown-Out Detection. * (Needed for ADC, See Section 19.2 of UM10441 revision 2.1 or newer for more information) */ - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_BOD); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_BOD); lpc_private.brown_out_detection_enabled = 1; /* Configure Brown-Out Detection */ /* FIXME */ @@ -105,9 +105,9 @@ void system_brown_out_detection_config(uint32_t level) */ void system_set_default_power_state(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; /* Start with all memory powered on and nothing else */ - sys_ctrl->sys_AHB_clk_ctrl = LPC_SYS_ABH_CLK_CTRL_MEM_ALL; + sys_config->sys_AHB_clk_ctrl = LPC_SYS_ABH_CLK_CTRL_MEM_ALL; } /* Enter deep sleep. @@ -118,15 +118,15 @@ void system_set_default_power_state(void) */ void enter_deep_sleep(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; /* Ask for the same clock status when waking up */ - sys_ctrl->powerdown_wake_cfg = sys_ctrl->powerdown_run_cfg; + sys_config->powerdown_wake_cfg = sys_config->powerdown_run_cfg; /* Set deep_sleep config */ if (lpc_private.brown_out_detection_enabled) { - sys_ctrl->powerdown_sleep_cfg = LPC_DEEP_SLEEP_CFG_NOWDTLOCK_BOD_ON; + sys_config->powerdown_sleep_cfg = LPC_DEEP_SLEEP_CFG_NOWDTLOCK_BOD_ON; } else { - sys_ctrl->powerdown_sleep_cfg = LPC_DEEP_SLEEP_CFG_NOWDTLOCK_BOD_OFF; + sys_config->powerdown_sleep_cfg = LPC_DEEP_SLEEP_CFG_NOWDTLOCK_BOD_OFF; } /* Enter deep sleep */ /* FIXME */ @@ -135,11 +135,11 @@ void enter_deep_sleep(void) /* Power on or off a subsystem */ void subsystem_power(uint32_t power_bit, uint32_t on_off) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; if (on_off == 1) { - sys_ctrl->sys_AHB_clk_ctrl |= power_bit; + sys_config->sys_AHB_clk_ctrl |= power_bit; } else { - sys_ctrl->sys_AHB_clk_ctrl &= ~(power_bit); + sys_config->sys_AHB_clk_ctrl &= ~(power_bit); } } @@ -163,28 +163,28 @@ static void propagate_main_clock(void); */ void clock_config(uint32_t freq_sel) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; lpc_disable_irq(); /* Turn on IRC */ - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC); - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); /* Use IRC clock for main clock */ - sys_ctrl->main_clk_sel = LPC_MAIN_CLK_SRC_IRC_OSC; + sys_config->main_clk_sel = LPC_MAIN_CLK_SRC_IRC_OSC; lpc_private.need_IRC = 1; /* Switch the main clock source */ - sys_ctrl->main_clk_upd_en = 0; - sys_ctrl->main_clk_upd_en = 1; + sys_config->main_clk_upd_en = 0; + sys_config->main_clk_upd_en = 1; /* Turn off / power off external crystal */ - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_SYS_OSC; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_SYS_OSC; /* Set AHB clock divider : divide by one ... */ - sys_ctrl->sys_AHB_clk_div = 1; + sys_config->sys_AHB_clk_div = 1; /* Configure number of CPU clocks for flash access before setting the new clock */ flash_accelerator_config(freq_sel); /* power off PLL */ - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_SYSPLL; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_SYSPLL; /* If using only internal RC, we are done */ if (freq_sel == FREQ_SEL_IRC) { @@ -205,20 +205,20 @@ void clock_config(uint32_t freq_sel) } lpc_private.main_clock = (((freq_sel >> 3) & 0xFF) * 12 * 1000 * 1000); /* Setup PLL dividers */ - sys_ctrl->sys_pll_ctrl = (((M - 1) & 0x1F) | (N << 5)); + sys_config->sys_pll_ctrl = (((M - 1) & 0x1F) | (N << 5)); /* Set sys_pll_clk to internal RC */ - sys_ctrl->sys_pll_clk_sel = LPC_PLL_CLK_SRC_IRC_OSC; - sys_ctrl->sys_pll_clk_upd_en = 0; /* SYSPLLCLKUEN must go from LOW to HIGH */ - sys_ctrl->sys_pll_clk_upd_en = 1; + sys_config->sys_pll_clk_sel = LPC_PLL_CLK_SRC_IRC_OSC; + sys_config->sys_pll_clk_upd_en = 0; /* SYSPLLCLKUEN must go from LOW to HIGH */ + sys_config->sys_pll_clk_upd_en = 1; /* Power-up PLL */ - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_SYSPLL); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_SYSPLL); /* Wait Until PLL Locked */ - while (!(sys_ctrl->sys_pll_status & 0x01)); + while (!(sys_config->sys_pll_status & 0x01)); /* Use PLL as main clock */ - sys_ctrl->main_clk_sel = LPC_MAIN_CLK_SRC_PLL_OUT; + sys_config->main_clk_sel = LPC_MAIN_CLK_SRC_PLL_OUT; /* Switch the main clock source */ - sys_ctrl->main_clk_upd_en = 0; - sys_ctrl->main_clk_upd_en = 1; + sys_config->main_clk_upd_en = 0; + sys_config->main_clk_upd_en = 1; } /* And call all clock updaters */ @@ -275,21 +275,21 @@ void io_config_clk_off(void) void clkout_on(uint32_t src, uint32_t div) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; /* Select clk_out clock source */ - sys_ctrl->clk_out_src_sel = (src & 0x03); + sys_config->clk_out_src_sel = (src & 0x03); /* Activate clk_out */ - sys_ctrl->clk_out_div = (div & 0xFF); - sys_ctrl->clk_out_upd_en = 0; - sys_ctrl->clk_out_upd_en = 1; + sys_config->clk_out_div = (div & 0xFF); + sys_config->clk_out_upd_en = 0; + sys_config->clk_out_upd_en = 1; } void clkout_off(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; - sys_ctrl->clk_out_div = 0; /* Disable CLKOUT */ - sys_ctrl->clk_out_upd_en = 0; - sys_ctrl->clk_out_upd_en = 1; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; + sys_config->clk_out_div = 0; /* Disable CLKOUT */ + sys_config->clk_out_upd_en = 0; + sys_config->clk_out_upd_en = 1; } diff --git a/core/watchdog.c b/core/watchdog.c index e3731e3..e4c2d79 100644 --- a/core/watchdog.c +++ b/core/watchdog.c @@ -75,15 +75,15 @@ void watchdog_lock_clk_src(void) */ void watchdog_lock_clk_src_power(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_watchdog* wdt = LPC_WDT; if (wdt->clk_src_sel & LPC_WDT_CLK_WDOSC) { - sys_ctrl->powerdown_sleep_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); - sys_ctrl->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); + sys_config->powerdown_sleep_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); + sys_config->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); } else { - sys_ctrl->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC); - sys_ctrl->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); + sys_config->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC); + sys_config->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); } wdt->mode |= LPC_WDT_CLK_POWER_LOCK; } @@ -143,7 +143,7 @@ void watchdog_disable_power_down(void) */ void watchdog_config(const struct wdt_config* wd_conf) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_watchdog* wdt = LPC_WDT; NVIC_DisableIRQ(WDT_IRQ); @@ -161,11 +161,11 @@ void watchdog_config(const struct wdt_config* wd_conf) wdt->timer_const = ((wd_conf->nb_clk >> 2) & LPC_WDT_TIMER_MAX); /* Watchdog clock select */ if (wd_conf->clk_sel == LPC_WDT_CLK_IRC) { - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC); - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); wdt->clk_src_sel = LPC_WDT_CLK_IRC; } else { - sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); + sys_config->powerdown_run_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); wdt->clk_src_sel = LPC_WDT_CLK_WDOSC; } /* Use the windows functionnality ? */ @@ -186,11 +186,11 @@ void watchdog_config(const struct wdt_config* wd_conf) if (wd_conf->locks & WDT_CLK_POWER_LOCK) { mode |= LPC_WDT_CLK_POWER_LOCK; if (wd_conf->clk_sel == LPC_WDT_CLK_WDOSC) { - sys_ctrl->powerdown_sleep_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); - sys_ctrl->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); + sys_config->powerdown_sleep_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); + sys_config->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_WDT_OSC); } else { - sys_ctrl->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC); - sys_ctrl->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); + sys_config->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC); + sys_config->powerdown_wake_cfg &= ~(LPC_POWER_DOWN_IRC_OUT); } } if (wd_conf->locks & WDT_CLK_SRC_LOCK) { @@ -225,7 +225,7 @@ void watchdog_config(const struct wdt_config* wd_conf) */ int stop_watchdog(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_watchdog* wdt = LPC_WDT; int ret = -1; @@ -244,7 +244,7 @@ int stop_watchdog(void) if ((wdt->clk_src_sel == LPC_WDT_CLK_WDOSC) && (wdt->mode & LPC_WDT_CLK_POWER_LOCK)) { wdt->clk_src_sel = LPC_WDT_CLK_IRC; } - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_WDT_OSC; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_WDT_OSC; /* Power wadchdog block before changing it's configuration */ wdt->clk_src_sel = LPC_WDT_CLK_WDOSC; ret = 0; @@ -258,11 +258,11 @@ int stop_watchdog(void) return 0; } /* If main clock and clkout not running from IRC (possibly through PLL), turn off IRC */ - if ((sys_ctrl->main_clk_sel != LPC_MAIN_CLK_SRC_IRC_OSC) && - ((sys_ctrl->main_clk_sel & 0x01) && (sys_ctrl->sys_pll_clk_sel != LPC_PLL_CLK_SRC_IRC_OSC)) && - (sys_ctrl->clk_out_src_sel != LPC_CLKOUT_SRC_IRC_OSC)) { - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_IRC; - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_IRC_OUT; + if ((sys_config->main_clk_sel != LPC_MAIN_CLK_SRC_IRC_OSC) && + ((sys_config->main_clk_sel & 0x01) && (sys_config->sys_pll_clk_sel != LPC_PLL_CLK_SRC_IRC_OSC)) && + (sys_config->clk_out_src_sel != LPC_CLKOUT_SRC_IRC_OSC)) { + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_IRC; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_IRC_OUT; } subsystem_power(LPC_SYS_ABH_CLK_CTRL_Watchdog, 0); return 0; @@ -276,7 +276,7 @@ int stop_watchdog(void) */ void startup_watchdog_disable(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_watchdog* wdt = LPC_WDT; /* Power wadchdog block before changing it's configuration */ @@ -286,7 +286,7 @@ void startup_watchdog_disable(void) watchdog_feed(); /* And power it down */ subsystem_power(LPC_SYS_ABH_CLK_CTRL_Watchdog, 0); - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_WDT_OSC; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_WDT_OSC; NVIC_DisableIRQ(WDT_IRQ); } diff --git a/drivers/adc.c b/drivers/adc.c index 9b85444..a091bde 100644 --- a/drivers/adc.c +++ b/drivers/adc.c @@ -192,7 +192,7 @@ void adc_clk_update(void) void adc_on(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_adc* adc = LPC_ADC; /* Disable ADC Interrupt */ @@ -200,10 +200,10 @@ void adc_on(void) /* Brown-Out detection must be powered to operate the ADC. * See Section 19.2 of UM10441 revision 2.1 or newer for more information */ - sys_ctrl->powerdown_run_cfg &= ~LPC_POWER_DOWN_BOD; + sys_config->powerdown_run_cfg &= ~LPC_POWER_DOWN_BOD; /* Power-up ADC */ - sys_ctrl->powerdown_run_cfg &= ~LPC_POWER_DOWN_ADC; + sys_config->powerdown_run_cfg &= ~LPC_POWER_DOWN_ADC; /* Provide clock to ADC */ subsystem_power(LPC_SYS_ABH_CLK_CTRL_ADC, 1); adc_clk_update(); @@ -220,12 +220,12 @@ void adc_on(void) void adc_off(void) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; /* Disable ADC Interrupt */ NVIC_DisableIRQ(ADC_IRQ); /* Power Down ADC */ - sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_ADC; + sys_config->powerdown_run_cfg |= LPC_POWER_DOWN_ADC; /* Remove clock from ADC block */ subsystem_power(LPC_SYS_ABH_CLK_CTRL_ADC, 0); } diff --git a/drivers/rtc.c b/drivers/rtc.c index 3e90d10..30463a5 100644 --- a/drivers/rtc.c +++ b/drivers/rtc.c @@ -75,7 +75,7 @@ uint32_t rtc_get_count(void) /* In case someone wants the RTC to count something different from seconds */ void rtc_clk_src_select(uint8_t source, uint8_t clk_div) { - struct lpc_sys_control* sysctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_pm_unit* pm_unit = LPC_PMU; uint32_t tmp = 0; @@ -86,9 +86,9 @@ void rtc_clk_src_select(uint8_t source, uint8_t clk_div) pm_unit->system_config = (tmp | ((source & 0x0F) << LPC_RTC_CLK_SRC_SHIFT)); /* Change the RTC Clock divider if source is PCLK */ if (source == LPC_RTC_CLK_PCLK) { - sysctrl->rtc_clk_div = clk_div; + sys_config->rtc_clk_div = clk_div; } else { - sysctrl->rtc_clk_div = 0; + sys_config->rtc_clk_div = 0; } } diff --git a/drivers/serial.c b/drivers/serial.c index 96abc4b..a697b03 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -268,7 +268,7 @@ static struct uart_clk_cfg uart_clk_table[] = { */ static void uart_clk_on(uint32_t uart_num, uint32_t baudrate) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_uart* uart = uarts[uart_num].regs; /* Get the right registers */ uint32_t div = 0, pclk = 0; /* Save baudrate value */ @@ -276,7 +276,7 @@ static void uart_clk_on(uint32_t uart_num, uint32_t baudrate) /* Configure UART clock */ pclk = get_main_clock(); /* See above note */ div = (pclk / (baudrate * 16)); - sys_ctrl->uart_clk_div[uart_num] = 0x01; + sys_config->uart_clk_div[uart_num] = 0x01; /* The easy one : divider is an integer, or baudrate is low enough for the aproximation */ if ((baudrate <= 115200) || ((div * baudrate * 16) == pclk)) { uart->line_ctrl |= LPC_UART_ENABLE_DLAB; @@ -306,10 +306,10 @@ static void uart_clk_on(uint32_t uart_num, uint32_t baudrate) } static void uart_clk_off(uint32_t uart_num) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; /* Erase saved baudrate */ uarts[uart_num].baudrate = 0; - sys_ctrl->uart_clk_div[uart_num] = 0; + sys_config->uart_clk_div[uart_num] = 0; } static uint32_t uart_setup(uint32_t uart_num) diff --git a/drivers/ssp.c b/drivers/ssp.c index 749ba17..256ed53 100644 --- a/drivers/ssp.c +++ b/drivers/ssp.c @@ -256,7 +256,7 @@ int spi_transfer_multiple_frames(uint8_t ssp_num, void* data_out, void* data_in, /***************************************************************************** */ uint32_t ssp_clk_on(uint8_t ssp_num, uint32_t rate) { - struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL; + struct lpc_sys_config* sys_config = LPC_SYS_CONFIG; struct lpc_ssp* ssp_regs = ssps[ssp_num].regs; uint32_t prescale = 0, pclk_div = 0; uint32_t pclk = 0, div = 0; @@ -287,7 +287,7 @@ uint32_t ssp_clk_on(uint8_t ssp_num, uint32_t rate) /* Activate the SSP clock (maybe divide main clock) */ switch (ssp_num) { case 0 : - sys_ctrl->ssp0_clk_div = pclk_div; + sys_config->ssp0_clk_div = pclk_div; break; } diff --git a/include/core/lpc_regs_12xx.h b/include/core/lpc_regs_12xx.h index 1959fff..0f25770 100644 --- a/include/core/lpc_regs_12xx.h +++ b/include/core/lpc_regs_12xx.h @@ -87,7 +87,7 @@ struct lpc_sys_start_logic_ctrl volatile uint32_t reset; /* 0x08 : reset Register 0 (-/W) */ volatile uint32_t status; /* 0x0C : status Register 0 (R/-) */ }; -struct lpc_sys_control +struct lpc_sys_config { volatile uint32_t sys_mem_remap; /* 0x000 System memory remap (R/W) */ volatile uint32_t peripheral_reset_ctrl; /* 0x004 Peripheral reset control (R/W) */ @@ -148,7 +148,7 @@ struct lpc_sys_control volatile const uint32_t device_id; /* 0x3F4 : Device ID (R/ ) */ }; -#define LPC_SYS_CONTROL ((struct lpc_sys_control *) LPC_SYSCON_BASE) +#define LPC_SYS_CONFIG ((struct lpc_sys_config *) LPC_SYSCON_BASE) /* AHB control bits * 0 (System (cortexM0, syscon, PMU, ...)) is a read only bit (system cannot be disabled) -- 2.43.0