/* * STM32 plaform initialization. */ static void __init stm32_init(void) { /* * Configure the IOMUXes of STM32 */ stm32_iomux_init(); #if defined(CONFIG_STM32_DMA) /* * Configure DMA controller and its driver's API */ stm32_dma_init(); #endif #if defined(CONFIG_SERIAL_STM32) /* * Configure the USART devices */ stm32_uart_init(); #endif #if defined(CONFIG_STM32_MAC) /* * Configure the STM32 MAC */ stm32_eth_init(); #endif #if defined(CONFIG_SPI_STM32) /* * Configure the STM32 SPI devices */ stm32_spi_init(); #endif #if defined(CONFIG_I2C_STM32) /* * Configure the STM32 I2C devices */ stm32_i2c_init(); #endif #if defined(CONFIG_MTD_PHYSMAP) /* * Configure external Flash */ stm32_flash_init(); #endif #if defined(CONFIG_MMC_ARMMMCI) /* * Configure SD card controller */ stm32_sdcard_init(); #endif #if defined(CONFIG_RTC_DRV_STM32F2) /* * Initialize the on-chip real-time clock */ stm32_rtc_init(); #endif #if defined(CONFIG_GPIOLIB) /* * Register the MCU GPIO chip */ stm32_gpio_init(); #endif }
/* * STM32 plaform initialization. */ static void __init stm32_init(void) { /* * Configure the IOMUXes of STM32 */ stm32_iomux_init(); #if defined(CONFIG_STM32_DMA) /* * Configure DMA controller and its driver's API */ stm32_dma_init(); #endif #if defined(CONFIG_SERIAL_STM32) /* * Configure the USART devices */ stm32_uart_init(); #endif #if defined(CONFIG_STM32_MAC) /* * Configure the STM32 MAC */ stm32_eth_init(); #endif #if defined(CONFIG_SPI_STM32) /* * Configure the STM32 SPI devices */ stm32_spi_init(); #endif #if defined(CONFIG_I2C_STM32) || defined(CONFIG_I2C_STM32F7) /* * Configure the STM32 I2C devices */ stm32_i2c_init(); #endif #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_STM32F4_MAP) /* * Configure external Flash */ stm32_flash_init(); #endif #if defined(CONFIG_MMC_ARMMMCI) /* * Configure SD card controller */ stm32_sdcard_init(); #endif #if defined(CONFIG_RTC_DRV_STM32F2) /* * Initialize the on-chip real-time clock */ stm32_rtc_init(); #endif #if defined(CONFIG_STM32_USB_OTG_FS) /* * Initialize the USB OTG FS controller */ stm32_usb_otg_fs_init(); #endif #if defined(CONFIG_STM32_USB_OTG_HS) /* * Initialize the USB OTG HS controller */ stm32_usb_otg_hs_init(); #endif #if defined(CONFIG_GPIOLIB) /* * Register the MCU GPIO chip */ stm32_gpio_init(); #endif #if defined(CONFIG_I2C_GPIO) /* * Bit-bang GPIO I2C implementation */ stm32_i2c_gpio_init(); #endif #if defined(CONFIG_STM32_FB) /* * Register LCD controller with the framebuffer driver */ stm32f4x9_fb_init(); #endif }