soc: ambiq: Optimize the inclusion relationship of header files

Optimized the inclusion relationship of header files

Signed-off-by: Hao Luo <hluo@ambiq.com>
This commit is contained in:
Hao Luo
2025-04-15 11:07:06 +08:00
committed by Benjamin Cabé
parent 3f59fa36f1
commit 6f4b92d64d
25 changed files with 24 additions and 29 deletions

View File

@@ -16,7 +16,7 @@
#include "adc_context.h"
/* ambiq-sdk includes */
#include <am_mcu_apollo.h>
#include <soc.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_ambiq, CONFIG_ADC_LOG_LEVEL);

View File

@@ -25,7 +25,7 @@ LOG_MODULE_REGISTER(bt_apollox_driver);
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/clock_control/clock_control_ambiq.h>
#include <am_mcu_apollo.h>
#include <soc.h>
#include "apollox_blue.h"
#if (CONFIG_SOC_SERIES_APOLLO4X)
#include "am_devices_cooper.h"

View File

@@ -11,7 +11,7 @@
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/clock_control/clock_control_ambiq.h>
#include <am_mcu_apollo.h>
#include <soc.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(clock_control_ambiq, CONFIG_CLOCK_CONTROL_LOG_LEVEL);

View File

@@ -12,7 +12,7 @@
#include <zephyr/device.h>
#include <zephyr/logging/log.h>
/* ambiq-sdk includes */
#include <am_mcu_apollo.h>
#include <soc.h>
LOG_MODULE_REGISTER(ambiq_counter, CONFIG_COUNTER_LOG_LEVEL);

View File

@@ -11,7 +11,7 @@
#include <zephyr/drivers/flash.h>
#include <zephyr/logging/log.h>
#include <am_mcu_apollo.h>
#include <soc.h>
LOG_MODULE_REGISTER(flash_ambiq, CONFIG_FLASH_LOG_LEVEL);

View File

@@ -14,7 +14,7 @@
#include <zephyr/irq.h>
#include <zephyr/spinlock.h>
#include <am_mcu_apollo.h>
#include <soc.h>
typedef void (*ambiq_gpio_cfg_func_t)(void);

View File

@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <am_mcu_apollo.h>
#include <soc.h>
#include <zephyr/drivers/hwinfo.h>
#include <string.h>
#include <zephyr/sys/byteorder.h>

View File

@@ -13,7 +13,7 @@
#include <zephyr/pm/policy.h>
#include <zephyr/pm/device_runtime.h>
#include <am_mcu_apollo.h>
#include <soc.h>
#include <zephyr/mem_mgmt/mem_attr.h>

View File

@@ -7,7 +7,7 @@
#ifndef MSPI_AMBIQ_H_
#define MSPI_AMBIQ_H_
#include <am_mcu_apollo.h>
#include <soc.h>
/* Hand-calculated minimum heap sizes needed to return a successful
* 1-byte allocation. See details in lib/os/heap.[ch]

View File

@@ -7,7 +7,7 @@
#include <zephyr/drivers/pinctrl.h>
/* ambiq-sdk includes */
#include <am_mcu_apollo.h>
#include <soc.h>
static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin)
{

View File

@@ -15,7 +15,7 @@
LOG_MODULE_REGISTER(ambiq_rtc, CONFIG_RTC_LOG_LEVEL);
#include <am_mcu_apollo.h>
#include <soc.h>
#define AMBIQ_RTC_ALARM_TIME_MASK \
(RTC_ALARM_TIME_MASK_SECOND | RTC_ALARM_TIME_MASK_MINUTE | RTC_ALARM_TIME_MASK_HOUR | \

View File

@@ -17,7 +17,7 @@
#include <zephyr/pm/policy.h>
#include <zephyr/pm/device_runtime.h>
#include <am_mcu_apollo.h>
#include <soc.h>
LOG_MODULE_REGISTER(ambiq_sdio, CONFIG_SDHC_LOG_LEVEL);

View File

@@ -13,7 +13,7 @@
#include <zephyr/pm/policy.h>
#include "uart_pl011_registers.h"
#include <am_mcu_apollo.h>
#include <soc.h>
static inline void pl011_ambiq_enable_clk(const struct device *dev)
{

View File

@@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(spi_ambiq_bleif);
#include <stdlib.h>
#include <errno.h>
#include "spi_context.h"
#include <am_mcu_apollo.h>
#include <soc.h>
struct spi_ambiq_config {
uint32_t base;

View File

@@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(spi_ambiq);
#include <stdlib.h>
#include <errno.h>
#include "spi_context.h"
#include <am_mcu_apollo.h>
#include <soc.h>
#include <zephyr/mem_mgmt/mem_attr.h>

View File

@@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(spi_ambiq_spid);
#include <stdlib.h>
#include <errno.h>
#include "spi_context.h"
#include <am_mcu_apollo.h>
#include <soc.h>
#define SPID_ADDR_INTERVAL 1
struct spi_ambiq_config {

View File

@@ -20,7 +20,7 @@
#include <zephyr/spinlock.h>
/* ambiq-sdk includes */
#include <am_mcu_apollo.h>
#include <soc.h>
#define COUNTER_MAX UINT32_MAX

View File

@@ -5,7 +5,6 @@
*/
#include <soc.h>
#include "am_mcu_apollo.h"
#include <string.h>
#include <zephyr/drivers/clock_control/clock_control_ambiq.h>
#include <zephyr/sys/util.h>

View File

@@ -10,7 +10,7 @@
#include <zephyr/drivers/watchdog.h>
#include <errno.h>
#include <am_mcu_apollo.h>
#include <soc.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(wdt_ambiq, CONFIG_WDT_LOG_LEVEL);

View File

@@ -13,7 +13,7 @@
#include <zephyr/init.h>
/* ambiq-sdk includes */
#include <am_mcu_apollo.h>
#include <soc.h>
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);

View File

@@ -6,7 +6,7 @@
#include <zephyr/init.h>
#include <am_mcu_apollo.h>
#include <soc.h>
extern void ambiq_power_init(void);

View File

@@ -7,10 +7,6 @@
#ifndef __SOC_H__
#define __SOC_H__
#if defined(CONFIG_SOC_APOLLO3P_BLUE)
#include <apollo3p.h>
#elif defined(CONFIG_SOC_APOLLO3_BLUE)
#include <apollo3.h>
#endif
#include <am_mcu_apollo.h>
#endif /* __SOC_H__ */

View File

@@ -13,7 +13,7 @@
#include <zephyr/init.h>
/* ambiq-sdk includes */
#include <am_mcu_apollo.h>
#include <soc.h>
LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL);

View File

@@ -6,7 +6,7 @@
#include <zephyr/init.h>
#include <am_mcu_apollo.h>
#include <soc.h>
extern void ambiq_power_init(void);
void soc_early_init_hook(void)

View File

@@ -7,6 +7,6 @@
#ifndef __SOC_H__
#define __SOC_H__
#include <apollo4p.h>
#include <am_mcu_apollo.h>
#endif /* __SOC_H__ */