[stm32f0xx] Convert dma.c and init.c to new rcc driver.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <arch/arm/cm.h>
|
||||
#include <kernel/event.h>
|
||||
#include <platform/rcc.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stm32f0xx.h>
|
||||
@@ -116,7 +117,7 @@ void dma_wait(dma_channel_t chan)
|
||||
|
||||
void dma_init(void)
|
||||
{
|
||||
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
|
||||
stm32_rcc_set_enable(STM32_RCC_CLK_DMA, true);
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < countof(dma_events); i++) {
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <platform/stm32.h>
|
||||
#include <platform/dma.h>
|
||||
#include <arch/arm/cm.h>
|
||||
#include <stm32f0xx_rcc.h>
|
||||
#include "system_stm32f0xx.h"
|
||||
|
||||
void platform_early_init(void)
|
||||
@@ -36,9 +35,8 @@ void platform_early_init(void)
|
||||
SystemInit();
|
||||
|
||||
// start the systick timer
|
||||
RCC_ClocksTypeDef clocks;
|
||||
RCC_GetClocksFreq(&clocks);
|
||||
arm_cm_systick_init(clocks.SYSCLK_Frequency);
|
||||
// TODO(konkers): get sysclk freq from somewhere.
|
||||
arm_cm_systick_init(48000000);
|
||||
|
||||
stm32_timer_early_init();
|
||||
stm32_gpio_early_init();
|
||||
|
||||
Reference in New Issue
Block a user