]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: migrate hardware.h inclusion into appropriate files
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Mon, 11 Mar 2024 12:01:56 +0000 (13:01 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 13 Mar 2024 10:14:19 +0000 (18:14 +0800)
hardware.h is only defining macros which are "wrappers" around writel().

writel() is however not available in hardware.h, <asm/io.h> needs to be
included. This means in order to use the wrappers in hardware.h, one
also needs to include the <asm/io.h> header.

However, this cannot be done currently because hardware.h is included in
include/configs files, which are implicitly included by every code file
by default, which makes the compilation of arch/arm/cpu/armv8/u-boot.lds
fail because ALIGN (the ARM assembly directive) got redefined by some
of the include files coming from <asm.io.h>.

Because nothing in the include/configs file actually use hardware.h,
let's remove the inclusion of hardware.h from the include/configs files
and explicitly add it wherever it is required.

This prepares for the next commit where <asm/io.h> will be included in
hardware.h.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
arch/arm/mach-rockchip/rk3066/rk3066.c
drivers/ram/rockchip/dmc-rk3368.c
drivers/ram/rockchip/sdram_rk3188.c
drivers/ram/rockchip/sdram_rk3288.c
include/configs/rk3036_common.h
include/configs/rk3066_common.h
include/configs/rk3188_common.h
include/configs/rk322x_common.h
include/configs/rk3288_common.h
include/configs/rk3368_common.h
include/configs/rv1108_common.h

index 78c7d894f90cc2adc46ee2070fa40ff3d2800d81..6661b788295cf5cb95bd66553d1a8131fe17ccc0 100644 (file)
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/grf_rk3066.h>
+#include <asm/arch-rockchip/hardware.h>
 
 #define GRF_BASE       0x20008000
 
index f36be941a38c3b93d21d1f7c88fc4fced88e9752..859fc47030fd32efff8940037a0ae9e4e11e13aa 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru_rk3368.h>
 #include <asm/arch-rockchip/grf_rk3368.h>
+#include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/ddr_rk3368.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
index ad9f936df55a775a2f9ad5c7768b088b77405eca..d23d4231798925e2bfc58ce3d40b153da9049ea5 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/arch-rockchip/cru_rk3188.h>
 #include <asm/arch-rockchip/ddr_rk3188.h>
 #include <asm/arch-rockchip/grf_rk3188.h>
+#include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/pmu_rk3188.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
index c99118fd6123b7ed3e258de3fa4bde6ce6cb1d8c..3177051dd128782444e6fe627c85d5b9dde5c2cd 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/arch-rockchip/cru.h>
 #include <asm/arch-rockchip/ddr_rk3288.h>
 #include <asm/arch-rockchip/grf_rk3288.h>
+#include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/pmu_rk3288.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
index c2abd14e114b31f39eb0a1a65e7c5940f3bb4775..0bf9e8b9a2e6f1b445784a450e419aa1cabb0421 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef __CONFIG_RK3036_COMMON_H
 #define __CONFIG_RK3036_COMMON_H
 
-#include <asm/arch-rockchip/hardware.h>
 #include "rockchip-common.h"
 
 #define CFG_SYS_HZ_CLOCK               24000000
index d70c8f77d487568c67a7e6206c9e5edd80783916..6a3b6900463a5580762bc307a1dd72e27e54f6c6 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __CONFIG_RK3066_COMMON_H
 #define __CONFIG_RK3066_COMMON_H
 
-#include <asm/arch-rockchip/hardware.h>
 #include "rockchip-common.h"
 
 #define CFG_IRAM_BASE          0x10080000
index a8cee1e44d4dee125b7663346bfa055aed0e289c..98f2c25f3cf97a2e8d8c0b4e4314d34b851cc955 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __CONFIG_RK3188_COMMON_H
 #define __CONFIG_RK3188_COMMON_H
 
-#include <asm/arch-rockchip/hardware.h>
 #include "rockchip-common.h"
 
 #define CFG_IRAM_BASE  0x10080000
index 15f77df3e17e56be27517c306987397bb63d4efb..bab4ca015f7435523d67f218fc1ca68e51feae9e 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef __CONFIG_RK322X_COMMON_H
 #define __CONFIG_RK322X_COMMON_H
 
-#include <asm/arch-rockchip/hardware.h>
 #include "rockchip-common.h"
 
 #define CFG_SYS_HZ_CLOCK               24000000
index 3063076a97afb69a923315e63d001057253848cf..0c449e310999146e4948e09a696f8c29e2a70aa6 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __CONFIG_RK3288_COMMON_H
 #define __CONFIG_RK3288_COMMON_H
 
-#include <asm/arch-rockchip/hardware.h>
 #include "rockchip-common.h"
 
 #define CFG_SYS_HZ_CLOCK               24000000
index ccb5369b90180106ac5b4035ed1d76603c20fadf..d488f8d477a3bbc6cb8808fcfadeee48991482de 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "rockchip-common.h"
 
-#include <asm/arch-rockchip/hardware.h>
 #include <linux/sizes.h>
 
 #define CFG_SYS_SDRAM_BASE             0
index 3bf70a0e0ae2e271f8c9ef0262d7978f3cd27d90..ff28236a21d68b8db1624f9c6caed7da29d33306 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef __CONFIG_RV1108_COMMON_H
 #define __CONFIG_RV1108_COMMON_H
 
-#include <asm/arch-rockchip/hardware.h>
 #include "rockchip-common.h"
 
 #define CFG_IRAM_BASE          0x10080000