aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-23 20:02:45 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-23 20:42:50 +0100
commitc65e90d63de3030a63afc07e0243234ee1a206a1 (patch)
tree5878296e0eff7b9da12e0220c0f489f843cc7b87
parent3057d4bfa90f3709b665426df76cc02cfab79572 (diff)
e1: remove set_default_working_clock()
This was from the example where I copy+pasted code, it has no use in the context of the E1 Interface
-rw-r--r--sam/applications/sam_e1/main.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/sam/applications/sam_e1/main.c b/sam/applications/sam_e1/main.c
index a4142061..9843a50a 100644
--- a/sam/applications/sam_e1/main.c
+++ b/sam/applications/sam_e1/main.c
@@ -57,50 +57,6 @@ volatile uint32_t g_ul_ms_ticks;
volatile uint32_t g_ul_button_pressed = 0;
static struct idt82 g_idt;
-
-/**
- * \brief Set default clock (MCK = 24MHz).
- */
-static void set_default_working_clock(void)
-{
-#if (SAMG)
- /* Switch MCK to slow clock */
- pmc_switch_mck_to_sclk(PMC_MCKR_PRES_CLK_1);
-
- /*
- * Configure PLL and switch clock.
- * MCK = XTAL * (PLL_DEFAULT_MUL+1) / PLL_DEFAULT_DIV / MCK_DEFAULT_DIV
- * = 24 MHz
- */
- example_switch_clock(PLL_DEFAULT_MUL, PLL_COUNT, PLL_DEFAULT_DIV,
- MCK_DEFAULT_DIV);
-#else
- /* Switch MCK to slow clock */
- pmc_switch_mck_to_sclk(PMC_MCKR_PRES_CLK_1);
-
- /* Switch mainck to external xtal */
- pmc_switch_mainck_to_xtal(0, BOARD_OSC_STARTUP_US);
-
- /*
- * Configure PLL and switch clock.
- * MCK = XTAL * (PLL_DEFAULT_MUL+1) / PLL_DEFAULT_DIV / MCK_DEFAULT_DIV
- * = 24 MHz
- */
- example_switch_clock(PLL_DEFAULT_MUL, PLL_COUNT, PLL_DEFAULT_DIV,
- MCK_DEFAULT_DIV);
-
- /* Disable unused clock to save power */
- pmc_osc_disable_fastrc();
-#endif
-
- /* Save current clock */
-#if SAMG55
- g_ul_current_mck = 48000000; /* 48MHz */
-#else
- g_ul_current_mck = 24000000; /* 24MHz */
-#endif
-}
-
/**
* Configure UART console.
*/
@@ -329,7 +285,6 @@ int main(void)
microvty_register(&tca_write_cmd);
/* Set default clock and re-configure UART */
- set_default_working_clock();
reconfigure_console(g_ul_current_mck, CONF_UART_BAUDRATE);
/* Output example information */