riscv: Remove common.h usage

We can remove common.h from most cases of the code here, and only a few
places need an additional header instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Rick Chen <rick@andestech.com>
This commit is contained in:
Tom Rini 2023-10-12 19:03:59 -04:00
parent 8991fed97d
commit 0b9441ae76
34 changed files with 9 additions and 32 deletions

View file

@ -6,7 +6,6 @@
#include <asm/csr.h> #include <asm/csr.h>
#include <asm/asm.h> #include <asm/asm.h>
#include <common.h>
#include <cache.h> #include <cache.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <dm.h> #include <dm.h>

View file

@ -5,7 +5,6 @@
*/ */
/* CPU specific code */ /* CPU specific code */
#include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <irq_func.h> #include <irq_func.h>
#include <asm/cache.h> #include <asm/cache.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2023 Andes Technology Corporation * Copyright (C) 2023 Andes Technology Corporation
* Rick Chen, Andes Technology Corporation <rick@andestech.com> * Rick Chen, Andes Technology Corporation <rick@andestech.com>
*/ */
#include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <hang.h> #include <hang.h>
#include <init.h> #include <init.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <cpu.h> #include <cpu.h>
#include <dm.h> #include <dm.h>
#include <dm/lists.h> #include <dm/lists.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <fdtdec.h> #include <fdtdec.h>
#include <init.h> #include <init.h>
#include <asm/global_data.h> #include <asm/global_data.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <fdtdec.h> #include <fdtdec.h>
#include <init.h> #include <init.h>
#include <linux/sizes.h> #include <linux/sizes.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <irq_func.h> #include <irq_func.h>
#include <asm/cache.h> #include <asm/cache.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <fdtdec.h> #include <fdtdec.h>
#include <init.h> #include <init.h>
#include <asm/global_data.h> #include <asm/global_data.h>

View file

@ -4,7 +4,6 @@
* Author: Yanhong Wang <yanhong.wang@starfivetech.com> * Author: Yanhong Wang <yanhong.wang@starfivetech.com>
*/ */
#include <common.h>
#include <fdtdec.h> #include <fdtdec.h>
#include <init.h> #include <init.h>
#include <linux/sizes.h> #include <linux/sizes.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2022 StarFive Technology Co., Ltd. * Copyright (C) 2022 StarFive Technology Co., Ltd.
* Author: Yanhong Wang<yanhong.wang@starfivetech.com> * Author: Yanhong Wang<yanhong.wang@starfivetech.com>
*/ */
#include <common.h>
#include <asm/arch/eeprom.h> #include <asm/arch/eeprom.h>
#include <asm/csr.h> #include <asm/csr.h>
#include <asm/sections.h> #include <asm/sections.h>

View file

@ -11,7 +11,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <asm/encoding.h> #include <asm/encoding.h>
#ifdef CONFIG_32BIT #ifdef CONFIG_32BIT

View file

@ -11,7 +11,6 @@
#include <asm-offsets.h> #include <asm-offsets.h>
#include <config.h> #include <config.h>
#include <common.h>
#include <elf.h> #include <elf.h>
#include <system-constants.h> #include <system-constants.h>
#include <asm/encoding.h> #include <asm/encoding.h>

View file

@ -7,6 +7,7 @@
#define _ASM_ANDES_CSR_H #define _ASM_ANDES_CSR_H
#include <asm/asm.h> #include <asm/asm.h>
#include <linux/bitops.h>
#include <linux/const.h> #include <linux/const.h>
#define CSR_MCACHE_CTL 0x7ca #define CSR_MCACHE_CTL 0x7ca

View file

@ -7,6 +7,8 @@
#ifndef _ASM_RISCV_EEPROM_H #ifndef _ASM_RISCV_EEPROM_H
#define _ASM_RISCV_EEPROM_H #define _ASM_RISCV_EEPROM_H
#include <linux/types.h>
u8 get_pcb_revision_from_eeprom(void); u8 get_pcb_revision_from_eeprom(void);
u32 get_ddr_size_from_eeprom(void); u32 get_ddr_size_from_eeprom(void);

View file

@ -9,7 +9,6 @@
#ifndef __ASM_RISCV_DMA_MAPPING_H #ifndef __ASM_RISCV_DMA_MAPPING_H
#define __ASM_RISCV_DMA_MAPPING_H #define __ASM_RISCV_DMA_MAPPING_H
#include <common.h>
#include <linux/types.h> #include <linux/types.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <cpu_func.h> #include <cpu_func.h>

View file

@ -7,6 +7,8 @@
#ifndef _ASM_RISCV_SMP_H #ifndef _ASM_RISCV_SMP_H
#define _ASM_RISCV_SMP_H #define _ASM_RISCV_SMP_H
#include <linux/types.h>
/** /**
* struct ipi_data - Inter-processor interrupt (IPI) data structure * struct ipi_data - Inter-processor interrupt (IPI) data structure
* *

View file

@ -8,7 +8,6 @@
* associated with software and timer interrupts. * associated with software and timer interrupts.
*/ */
#include <common.h>
#include <dm.h> #include <dm.h>
#include <regmap.h> #include <regmap.h>
#include <syscon.h> #include <syscon.h>

View file

@ -8,7 +8,6 @@
* similar to RISC-V PLIC. * similar to RISC-V PLIC.
*/ */
#include <common.h>
#include <dm.h> #include <dm.h>
#include <asm/global_data.h> #include <asm/global_data.h>
#include <dm/device-internal.h> #include <dm/device-internal.h>

View file

@ -8,7 +8,6 @@
* assembly language modules. * assembly language modules.
*/ */
#include <common.h>
#include <asm/global_data.h> #include <asm/global_data.h>
#include <linux/kbuild.h> #include <linux/kbuild.h>

View file

@ -4,8 +4,7 @@
* Rick Chen, Andes Technology Corporation <rick@andestech.com> * Rick Chen, Andes Technology Corporation <rick@andestech.com>
*/ */
#include <common.h> #include <asm/u-boot.h>
#include <command.h>
unsigned long do_go_exec(ulong (*entry)(int, char * const []), unsigned long do_go_exec(ulong (*entry)(int, char * const []),
int argc, char *const argv[]) int argc, char *const argv[])

View file

@ -6,7 +6,6 @@
* Rick Chen, Andes Technology Corporation <rick@andestech.com> * Rick Chen, Andes Technology Corporation <rick@andestech.com>
*/ */
#include <common.h>
#include <bootstage.h> #include <bootstage.h>
#include <command.h> #include <command.h>
#include <dm.h> #include <dm.h>

View file

@ -4,7 +4,6 @@
* Rick Chen, Andes Technology Corporation <rick@andestech.com> * Rick Chen, Andes Technology Corporation <rick@andestech.com>
*/ */
#include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
void invalidate_icache_all(void) void invalidate_icache_all(void)

View file

@ -6,7 +6,6 @@
#define LOG_CATEGORY LOGC_ARCH #define LOG_CATEGORY LOGC_ARCH
#include <common.h>
#include <fdt_support.h> #include <fdt_support.h>
#include <log.h> #include <log.h>
#include <mapmem.h> #include <mapmem.h>

View file

@ -6,7 +6,6 @@
* Based on arm/lib/image.c * Based on arm/lib/image.c
*/ */
#include <common.h>
#include <image.h> #include <image.h>
#include <mapmem.h> #include <mapmem.h>
#include <errno.h> #include <errno.h>

View file

@ -10,7 +10,6 @@
*/ */
#include <linux/compat.h> #include <linux/compat.h>
#include <common.h>
#include <efi_loader.h> #include <efi_loader.h>
#include <hang.h> #include <hang.h>
#include <irq_func.h> #include <irq_func.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/ */
#include <common.h>
#include <command.h> #include <command.h>
#include <hang.h> #include <hang.h>

View file

@ -7,7 +7,7 @@
* Taken from Linux arch/riscv/kernel/sbi.c * Taken from Linux arch/riscv/kernel/sbi.c
*/ */
#include <common.h> #include <errno.h>
#include <asm/encoding.h> #include <asm/encoding.h>
#include <asm/sbi.h> #include <asm/sbi.h>

View file

@ -4,7 +4,6 @@
* Lukas Auer <lukas.auer@aisec.fraunhofer.de> * Lukas Auer <lukas.auer@aisec.fraunhofer.de>
*/ */
#include <common.h>
#include <asm/encoding.h> #include <asm/encoding.h>
#include <asm/sbi.h> #include <asm/sbi.h>

View file

@ -3,9 +3,9 @@
* Copyright (C) 2021 SiFive, Inc * Copyright (C) 2021 SiFive, Inc
*/ */
#include <common.h>
#include <cache.h> #include <cache.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <log.h>
#include <dm.h> #include <dm.h>
void enable_caches(void) void enable_caches(void)

View file

@ -4,7 +4,6 @@
* Lukas Auer <lukas.auer@aisec.fraunhofer.de> * Lukas Auer <lukas.auer@aisec.fraunhofer.de>
*/ */
#include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <dm.h> #include <dm.h>
#include <asm/barrier.h> #include <asm/barrier.h>

View file

@ -3,7 +3,6 @@
* Copyright (C) 2019 Fraunhofer AISEC, * Copyright (C) 2019 Fraunhofer AISEC,
* Lukas Auer <lukas.auer@aisec.fraunhofer.de> * Lukas Auer <lukas.auer@aisec.fraunhofer.de>
*/ */
#include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <hang.h> #include <hang.h>
#include <init.h> #include <init.h>

View file

@ -4,7 +4,7 @@
* Rick Chen, Andes Technology Corporation <rick@andestech.com> * Rick Chen, Andes Technology Corporation <rick@andestech.com>
*/ */
#include <common.h> #include <config.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <flash.h> #include <flash.h>
#include <image.h> #include <image.h>

View file

@ -9,7 +9,6 @@
* Timur Tabi (timur@freescale.com) * Timur Tabi (timur@freescale.com)
*/ */
#include <common.h>
#include <command.h> #include <command.h>
#include <env.h> #include <env.h>
#include <i2c.h> #include <i2c.h>

View file

@ -6,7 +6,6 @@
* Pragnesh Patel <pragnesh.patel@sifive.com> * Pragnesh Patel <pragnesh.patel@sifive.com>
*/ */
#include <common.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <dm.h> #include <dm.h>
#include <asm/sections.h> #include <asm/sections.h>