qe: Add <config.h> to linux/immap_qe.h
Subsystems (13)
PATCH 1/5 qe: Add <config.h> to linux/immap_qe.h
Given how we define QE_MURAM_SIZE today, this header needs to have <config.h> added to it.
--- include/linux/immap_qe.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/immap_qe.h +2 -0
@@ -11,6 +11,8 @@#ifndef __IMMAP_QE_H__#define __IMMAP_QE_H__ +#include <config.h> +#ifdef CONFIG_MPC83xx#if defined(CONFIG_ARCH_MPC8360 )#define QE_MURAM_SIZE 0xc000UL
Signature · 1 line
2.34.1
PATCH 2/5 arc: Cleanup and audit usage of <config.h>
We need to include <config.h> directly when a file needs to have something such as CFG_SYS_SDRAM_SIZE referenced as this file is not automatically globally included and is most commonly indirectly included via common.h. Remove most cases of arc including config.h directly, but add it where needed. Further clean up the tb100 board config.h file so that we don't rely on config.h being included there for a value used in a single place.
---
Cc: Alexey Brodkin <[email protected]>
Cc: Eugeniy Paltsev <[email protected]>
Cc: [email protected]
--- arch/arc/include/asm/arc-bcr.h | 2 -- arch/arc/include/asm/arcregs.h | 1 - arch/arc/include/asm/cache.h | 2 -- arch/arc/lib/cpu.c | 1 + board/abilis/tb100/tb100.c | 4 ++++ include/configs/tb100.h | 21 --------------------- 6 files changed, 5 insertions(+), 26 deletions(-)
arch/arc/include/asm/arc-bcr.h +0 -2
@@ -13,8 +13,6 @@#define __ARC_BCR_H #ifndef __ASSEMBLY__ -#include <config.h> - union bcr_di_cache { struct { #ifdef CONFIG_CPU_BIG_ENDIAN
arch/arc/include/asm/arcregs.h +0 -1
@@ -7,7 +7,6 @@#define _ASM_ARC_ARCREGS_H#include <asm/cache.h> -#include <config.h> /* * ARC architecture has additional address space - auxiliary registers.
arch/arc/include/asm/cache.h +0 -2
@@ -6,8 +6,6 @@#ifndef __ASM_ARC_CACHE_H#define __ASM_ARC_CACHE_H -#include <config.h> -/* * As of today we may handle any L1 cache line length right in software. * For that essentially cache line length is a variable not constant.
arch/arc/lib/cpu.c +1 -0
@@ -3,6 +3,7 @@* Copyright (C) 2013-2014, 2018 Synopsys, Inc. All rights reserved. */ +#include <config.h> #include <clock_legacy.h> #include <init.h> #include <malloc.h>
board/abilis/tb100/tb100.c +4 -0
@@ -14,6 +14,10 @@ void reset_cpu(void)writel (0x1 , (void *)CRM_SWRESET ); } +/* +* Ethernet configuration +*/ +#define ETH0_BASE_ADDRESS 0xFE100000int board_eth_init (struct bd_info *bis) {if (designware_initialize (ETH0_BASE_ADDRESS ,0 ) >=0 )
include/configs/tb100.h +0 -21
@@ -21,25 +21,4 @@*/ #define CFG_SYS_NS16550_CLK 166666666 -/* -* Even though the board houses Realtek RTL8211E PHY -* corresponding PHY driver (drivers/net/phy/realtek.c) behaves unexpectedly. -* In particular "parse_status" reports link is down. -* -* Until Realtek PHY driver is fixed fall back to generic PHY driver -* which implements all required functionality and behaves much more stable. -* -* -*/ - -/* -* Ethernet configuration -*/ -#define ETH0_BASE_ADDRESS 0xFE100000 -#define ETH1_BASE_ADDRESS 0xFE110000 - -/* -* Console configuration -*/ -#endif /* _CONFIG_TB100_H_ */
Signature · 1 line
2.34.1
Re: [PATCH 2/5] arc: Cleanup and audit usage of <config.h>
Quoted 14 lines · Tom Rini
We need to include <
config.h> directly when a file needs to have something such asCFG_SYS_SDRAM_SIZEreferenced as this file is not automatically globally included and is most commonly indirectly included viacommon.h. Remove most cases of arc includingconfig.hdirectly, but add it where needed. Further clean up the tb100 boardconfig.hfile so that we don't rely onconfig.hbeing included there for a value used in a single place.Signed-off-by Tom Rini <[email protected]>---
Cc: Alexey Brodkin <[email protected]>
Cc: Eugeniy Paltsev <[email protected]>
Cc: [email protected]
Quoted 9 lines
--- arch/arc/include/asm/arc-bcr.h | 2 -- arch/arc/include/asm/arcregs.h | 1 - arch/arc/include/asm/cache.h | 2 -- arch/arc/lib/cpu.c | 1 + board/abilis/tb100/tb100.c | 4 ++++ include/configs/tb100.h | 21 --------------------- 6 files changed, 5 insertions(+), 26 deletions(-)
PATCH 3/5 arm: Partial cleanup and audit usage of <config.h>
In reply to Tom RiniWe need to include <config.h> directly when a file needs to have something such as CFG_SYS_SDRAM_SIZE referenced as this file is not automatically globally included and is most commonly indirectly included via common.h. Remove most cases of arm including config.h directly, but add it where needed. This includes a few board-specific fixes.
--- arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h | 2 -- arch/arm/include/asm/arch-ls102xa/fsl_serdes.h | 2 -- arch/arm/include/asm/assembler.h | 1 - arch/arm/include/asm/secure.h | 1 - arch/arm/include/asm/string.h | 2 -- arch/arm/mach-davinci/include/mach/pinmux_defs.h | 1 - arch/arm/mach-exynos/exynos4_setup.h | 1 - arch/arm/mach-exynos/exynos5_setup.h | 1 - arch/arm/mach-k3/common.c | 1 + arch/arm/mach-k3/include/mach/clock.h | 2 -- arch/arm/mach-k3/include/mach/j721e_hardware.h | 1 - arch/arm/mach-k3/include/mach/j721s2_hardware.h | 1 - arch/arm/mach-k3/r5_mpu.c | 1 + board/freescale/ls1088a/eth_ls1088aqds.c | 1 + board/freescale/ls2080aqds/eth.c | 1 + board/toradex/verdin-am62/verdin-am62.c | 1 + drivers/ddr/marvell/axp/ddr3_axp.h | 2 ++ 17 files changed, 7 insertions(+), 15 deletions(-)
arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h +0 -2
@@ -7,8 +7,6 @@#ifndef __FSL_SERDES_H__#define __FSL_SERDES_H__ -#include <config.h> -#ifdef CONFIG_FSL_LSCH3 enum srds_prtcl {/*
arch/arm/include/asm/arch-ls102xa/fsl_serdes.h +0 -2
@@ -6,8 +6,6 @@#ifndef __FSL_SERDES_H#define __FSL_SERDES_H -#include <config.h> - enum srds_prtcl {/* * Nobody will check whether the device 'NONE' has been configured,
arch/arm/include/asm/assembler.h +0 -1
@@ -14,7 +14,6 @@* assembler source. */ -#include <config.h> #include <asm/unified.h> /*
arch/arm/include/asm/secure.h +0 -1
@@ -1,7 +1,6 @@#ifndef __ASM_SECURE_H#define __ASM_SECURE_H -#include <config.h> #include <asm/global_data.h> #define __secure __section("._secure.text")
arch/arm/include/asm/string.h +0 -2
@@ -1,8 +1,6 @@#ifndef __ASM_ARM_STRING_H#define __ASM_ARM_STRING_H -#include <config.h> -/* * We don't do inline string functions, since the * optimised inline asm versions are not small.
arch/arm/mach-davinci/include/mach/pinmux_defs.h +0 -1
@@ -9,7 +9,6 @@#define __ASM_ARCH_PINMUX_DEFS_H#include <asm/arch/davinci_misc.h> -#include <config.h> /* SPI0 pin muxer settings */ extern const struct pinmux_config spi0_pins_base[3 ];
arch/arm/mach-exynos/exynos4_setup.h +0 -1
@@ -8,7 +8,6 @@#ifndef _ORIGEN_SETUP_H#define _ORIGEN_SETUP_H -#include <config.h> #include <asm/arch/cpu.h> /* Bus Configuration Register Address */
arch/arm/mach-exynos/exynos5_setup.h +0 -1
@@ -8,7 +8,6 @@#ifndef _SMDK5250_SETUP_H#define _SMDK5250_SETUP_H -#include <config.h> #include <asm/arch/dmc.h> #define NOT_AVAILABLE 0
arch/arm/mach-k3/common.c +1 -0
@@ -6,6 +6,7 @@* Lokesh Vutla <[email protected]> */ +#include <config.h> #include <cpu_func.h> #include <image.h> #include <init.h>
arch/arm/mach-k3/include/mach/clock.h +0 -2
@@ -7,8 +7,6 @@#ifndef __ASM_ARCH_CLOCK_H#define __ASM_ARCH_CLOCK_H -#include <config.h> -/* Clock Defines */ #define V_OSCK 24000000#define V_SCLK V_OSCK
arch/arm/mach-k3/include/mach/j721e_hardware.h +0 -1
@@ -7,7 +7,6 @@#ifndef __ASM_ARCH_J721E_HARDWARE_H#define __ASM_ARCH_J721E_HARDWARE_H -#include <config.h> #ifndef __ASSEMBLY__#include <linux/bitops.h> #endif
arch/arm/mach-k3/include/mach/j721s2_hardware.h +0 -1
@@ -7,7 +7,6 @@#ifndef __ASM_ARCH_J721S2_HARDWARE_H#define __ASM_ARCH_J721S2_HARDWARE_H -#include <config.h> #ifndef __ASSEMBLY__#include <linux/bitops.h> #endif
arch/arm/mach-k3/r5_mpu.c +1 -0
@@ -6,6 +6,7 @@* Lokesh Vutla <[email protected]> */ +#include <config.h> #include <asm/io.h> #include <linux/kernel.h> #include "common.h"
board/freescale/ls1088a/eth_ls1088aqds.c +1 -0
@@ -3,6 +3,7 @@* Copyright 2017 NXP */ +#include <config.h> #include <vsprintf.h> #include <linux/string.h> #include <asm/io.h>
board/freescale/ls2080aqds/eth.c +1 -0
@@ -3,6 +3,7 @@* Copyright 2015 Freescale Semiconductor, Inc. */ +#include <config.h> #include <vsprintf.h> #include <linux/string.h> #include <asm/io.h>
board/toradex/verdin-am62/verdin-am62.c +1 -0
@@ -6,6 +6,7 @@* */ +#include <config.h> #include <asm/arch/hardware.h> #include <asm/io.h> #include <dm/uclass.h>
drivers/ddr/marvell/axp/ddr3_axp.h +2 -0
@@ -6,6 +6,8 @@#ifndef __DDR3_AXP_H#define __DDR3_AXP_H +#include <config.h> +#define MV_78XX0_Z1_REV 0x0#define MV_78XX0_A0_REV 0x1#define MV_78XX0_B0_REV 0x2
Signature · 1 line
2.34.1
Re: [PATCH 3/5] arm: Partial cleanup and audit usage of <config.h>
Quoted 19 lines · Tom Rini
We need to include <
config.h> directly when a file needs to have something such asCFG_SYS_SDRAM_SIZEreferenced as this file is not automatically globally included and is most commonly indirectly included viacommon.h. Remove most cases of arm includingconfig.hdirectly, but add it where needed. This includes a few board-specific fixes.Signed-off-by Tom Rini <[email protected]>--- arch/arm/include/asm/arch-fsl-layerscape/fsl_serdes.h | 2 -- arch/arm/include/asm/arch-ls102xa/fsl_serdes.h | 2 -- arch/arm/include/asm/assembler.h | 1 - arch/arm/include/asm/secure.h | 1 - arch/arm/include/asm/string.h | 2 -- arch/arm/mach-davinci/include/mach/pinmux_defs.h | 1 - arch/arm/mach-exynos/exynos4_setup.h | 1 - arch/arm/mach-exynos/exynos5_setup.h | 1 - arch/arm/mach-k3/common.c | 1 + arch/arm/mach-k3/include/mach/clock.h | 2 --
Quoted 9 lines
arch/arm/mach-k3/include/mach/j721e_hardware.h | 1 - arch/arm/mach-k3/include/mach/j721s2_hardware.h | 1 - arch/arm/mach-k3/r5_mpu.c | 1 + board/freescale/ls1088a/eth_ls1088aqds.c | 1 + board/freescale/ls2080aqds/eth.c | 1 + board/toradex/verdin-am62/verdin-am62.c | 1 + drivers/ddr/marvell/axp/ddr3_axp.h | 2 ++ 17 files changed, 7 insertions(+), 15 deletions(-)
PATCH 4/5 sandbox: Audit config.h and common.h usage
In reply to Tom RiniRemove and replace common.h and config.h in sandbox when it's not needed and add some explicit includes where needed.
--- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 2 +- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 12 deletions(-)
arch/sandbox/cpu/cache.c +0 -1
@@ -3,7 +3,6 @@* Copyright 2020, Heinrich Schuchardt <[email protected]> */ -#include <common.h> #include <cpu_func.h> #include <asm/state.h>
arch/sandbox/cpu/cpu.c +0 -1
@@ -5,7 +5,6 @@#define LOG_CATEGORY LOGC_SANDBOX -#include <common.h> #include <bootstage.h> #include <cpu_func.h> #include <errno.h>
arch/sandbox/cpu/sdl.c +1 -1
@@ -72,7 +72,7 @@ static struct sdl_info {static void sandbox_sdl_poll_events (void ) {/* -* We don't want to include common.h in this file since it uses +* We don't want to include cpu_func.h in this file since it uses * system headers. So add a declation here. */ extern void reset_cpu (void );
arch/sandbox/cpu/spl.c +0 -1
@@ -3,7 +3,6 @@* Copyright (c) 2016 Google, Inc */ -#include <common.h> #include <dm.h> #include <hang.h> #include <handoff.h>
arch/sandbox/cpu/start.c +1 -1
@@ -3,7 +3,7 @@* Copyright (c) 2011-2012 The Chromium OS Authors. */ -#include <common.h> +#include <config.h> #include <cli.h> #include <command.h> #include <efi_loader.h>
arch/sandbox/cpu/state.c +1 -1
@@ -3,7 +3,7 @@* Copyright (c) 2011-2012 The Chromium OS Authors. */ -#include <common.h> +#include <config.h> #include <autoboot.h> #include <bloblist.h> #include <errno.h>
arch/sandbox/include/asm/io.h +2 -0
@@ -6,6 +6,8 @@#ifndef __SANDBOX_ASM_IO_H#define __SANDBOX_ASM_IO_H +#include <linux/types.h> +enum sandboxio_size_t {SB_SIZE_8 , SB_SIZE_16,
arch/sandbox/include/asm/state.h +0 -1
@@ -6,7 +6,6 @@#ifndef __SANDBOX_STATE_H#define __SANDBOX_STATE_H -#include <config.h> #include <sysreset.h> #include <stdbool.h> #include <linux/list.h>
arch/sandbox/lib/bootm.c +0 -1
@@ -4,7 +4,6 @@* Copyright (c) 2015 Sjoerd Simons <[email protected]> */ -#include <common.h> #include <bootstage.h> #include <image.h> #include <asm/io.h>
arch/sandbox/lib/fdt_fixup.c +0 -1
@@ -2,7 +2,6 @@#define LOG_CATEGORY LOGC_ARCH -#include <common.h> #include <fdt_support.h> #include <log.h>
arch/sandbox/lib/interrupts.c +0 -1
@@ -5,7 +5,6 @@* found in the LICENSE file. */ -#include <common.h> #include <efi_loader.h> #include <irq_func.h> #include <os.h>
arch/sandbox/lib/pci_io.c +0 -1
@@ -8,7 +8,6 @@* IO space access commands. */ -#include <common.h> #include <command.h> #include <dm.h> #include <log.h>
board/sandbox/sandbox.c +1 -1
@@ -3,8 +3,8 @@* Copyright (c) 2011 The Chromium OS Authors. */ -#include <common.h> #include <addr_map.h> +#include <config.h> #include <cpu_func.h> #include <cros_ec.h> #include <dm.h>
Signature · 1 line
2.34.1
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
Hi Tom,
Quoted 5 lines · Tom Rini
Remove and replace
common.handconfig.hin sandbox when it's not needed and add some explicit includes where needed.Signed-off-by Tom Rini <[email protected]>
Quoted 15 lines
--- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 2 +- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 12 deletions(-)
Is it possible to move CFG_SYS_SDRAM_BASE/SIZE to Kconfig?
For CFG_SYS_BAUDRATE_TABLE perhaps we could have a standard set that most boards use, or turn it into a set of word flags with a bit for each rate?
Quoted 154 lines
arch/sandbox/cpu/cache.c +0
-1@@ -3,7 +3,6 @@* Copyright 2020, Heinrich Schuchardt <[email protected]> */ -#include <common.h> #include <cpu_func.h> #include <asm/state.h> arch/sandbox/cpu/cpu.c +0
-1@@ -5,7 +5,6 @@#define LOG_CATEGORY LOGC_SANDBOX -#include <common.h> #include <bootstage.h> #include <cpu_func.h> #include <errno.h> arch/sandbox/cpu/sdl.c +1
-1@@ -72,7 +72,7 @@ static struct sdl_info {static void sandbox_sdl_poll_events (void ) {/* -* We don't want to include common.h in this file since it uses +* We don't want to include cpu_func.h in this file since it uses * system headers. So add a declation here. */ extern void reset_cpu (void );arch/sandbox/cpu/spl.c +0
-1@@ -3,7 +3,6 @@* Copyright (c) 2016 Google, Inc */ -#include <common.h> #include <dm.h> #include <hang.h> #include <handoff.h> arch/sandbox/cpu/start.c +1
-1@@ -3,7 +3,7 @@* Copyright (c) 2011-2012 The Chromium OS Authors. */ -#include <common.h> +#include <config.h> #include <cli.h> #include <command.h> #include <efi_loader.h> arch/sandbox/cpu/state.c +1
-1@@ -3,7 +3,7 @@* Copyright (c) 2011-2012 The Chromium OS Authors. */ -#include <common.h> +#include <config.h> #include <autoboot.h> #include <bloblist.h> #include <errno.h> arch/sandbox/include/asm/io.h +2
-0@@ -6,6 +6,8 @@#ifndef __SANDBOX_ASM_IO_H#define __SANDBOX_ASM_IO_H +#include <linux/types.h> +enum sandboxio_size_t {SB_SIZE_8 , SB_SIZE_16,arch/sandbox/include/asm/state.h +0
-1@@ -6,7 +6,6 @@#ifndef __SANDBOX_STATE_H#define __SANDBOX_STATE_H -#include <config.h> #include <sysreset.h> #include <stdbool.h> #include <linux/list.h> arch/sandbox/lib/bootm.c +0
-1@@ -4,7 +4,6 @@* Copyright (c) 2015 Sjoerd Simons <[email protected]> */ -#include <common.h> #include <bootstage.h> #include <image.h> #include <asm/io.h> arch/sandbox/lib/fdt_fixup.c +0
-1@@ -2,7 +2,6 @@#define LOG_CATEGORY LOGC_ARCH -#include <common.h> #include <fdt_support.h> #include <log.h> arch/sandbox/lib/interrupts.c +0
-1@@ -5,7 +5,6 @@* found in the LICENSE file. */ -#include <common.h> #include <efi_loader.h> #include <irq_func.h> #include <os.h> arch/sandbox/lib/pci_io.c +0
-1@@ -8,7 +8,6 @@* IO space access commands. */ -#include <common.h> #include <command.h> #include <dm.h> #include <log.h> board/sandbox/sandbox.c +0
-0
board/sandbox/sandbox.c line 7
Quoted 6 lines
board/sandbox/sandbox.c +1
-1@@ -3,8 +3,8 @@* Copyright (c) 2011 The Chromium OS Authors. */ -#include <common.h> #include <addr_map.h> +#include <config.h>
It seems strange to add config.h anywhere other than first. But I don't mind if that is what you intend.
Quoted 6 lines
board/sandbox/sandbox.c +0
-1#include <cpu_func.h> #include <cros_ec.h> #include <dm.h> --2.34.1
Regards,
Simon
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
Quoted 24 lines · Simon Glass
Hi Tom,
Quoted 5 lines · Tom Rini
Remove and replace
common.handconfig.hin sandbox when it's not needed and add some explicit includes where needed.Signed-off-by Tom Rini <[email protected]>Quoted 15 lines
--- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 2 +- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 12 deletions(-)
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>Is it possible to move CFG_SYS_SDRAM_BASE/SIZE to
Kconfig?
Possible? Sure. But I think it would end up being fairly horrible. What would be nice I think is some Zephyr-style "convert CONFIG_DEFAULT_DEVICE_TREE to some defines" because we could parse out /memory to CFG_SYS_SDRAM_BASE/SIZE and that's something we _need_ at build time.
Quoted 3 lines
For
CFG_SYS_BAUDRATE_TABLEperhaps we could have a standard set that most boards use, or turn it into a set of word flags with a bit for each rate?
We do, largely, use a default table. I forget which further rework I posted as an RFC a few years ago, but I believe it was largely seen as being uglier than what we have today.
Signature · 1 line
Tom
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
Hi Tom,
Quoted 28 lines · Tom Rini
Quoted 26 lines · Simon Glass
Hi Tom,
Quoted 5 lines · Tom Rini
Remove and replace
common.handconfig.hin sandbox when it's not needed and add some explicit includes where needed.Signed-off-by Tom Rini <[email protected]>Quoted 15 lines
--- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 2 +- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 12 deletions(-)Reviewed-by Simon Glass <[email protected]>
Quoted 7 lines
Quoted 1 line
Is it possible to move CFG_SYS_SDRAM_BASE/SIZE to
Kconfig?Possible? Sure. But I think it would end up being fairly horrible. What would be nice I think is some Zephyr-style "convert
CONFIG_DEFAULT_DEVICE_TREEto some defines" because we could parse out /memory to CFG_SYS_SDRAM_BASE/SIZE and that's something we _need_ at build time.
That would be pretty easy to do. But I would prefer to have it create CONFIG_SYS_SDRAM_BASE/SIZE so that it fits in with Kconfig, just that the value is set for you.
If you like you could create an issue for it.
Quoted 8 lines
Quoted 4 lines
For
CFG_SYS_BAUDRATE_TABLEperhaps we could have a standard set that most boards use, or turn it into a set of word flags with a bit for each rate?We do, largely, use a default table. I forget which further rework I posted as an RFC a few years ago, but I believe it was largely seen as being uglier than what we have today.
I found these:
https://patchwork.ozlabs.org/project/uboot/list/?series=262148&state=*
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
IMO the second one from Pali makes sense, but it was never followed up. It doesn't look too difficult.
We should have a policy that if people complain about a patch but don't follow up, we apply the patch we have.
I would like to drop configs/sandbox.h at some point and these two points are all that is left.
Regards,
Simon
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
Splitting this in to two different threads..
Quoted 39 lines · Simon Glass
Hi Tom,
Quoted 28 lines · Tom Rini
Quoted 26 lines · Simon Glass
Hi Tom,
Quoted 5 lines · Tom Rini
Remove and replace
common.handconfig.hin sandbox when it's not needed and add some explicit includes where needed.Signed-off-by Tom Rini <[email protected]>Quoted 15 lines
--- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 2 +- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 12 deletions(-)Reviewed-by Simon Glass <[email protected]>Quoted 7 lines
Quoted 1 line
Is it possible to move CFG_SYS_SDRAM_BASE/SIZE to
Kconfig?Possible? Sure. But I think it would end up being fairly horrible. What would be nice I think is some Zephyr-style "convert
CONFIG_DEFAULT_DEVICE_TREEto some defines" because we could parse out /memory to CFG_SYS_SDRAM_BASE/SIZE and that's something we _need_ at build time.
Quoted 3 lines
That would be pretty easy to do. But I would prefer to have it create CONFIG_SYS_SDRAM_BASE/SIZE so that it fits in with
Kconfig, just that the value is set for you.
I _think_ we need it to be non-CONFIG namespace or we'll run in to other problems? We could get the new autogenerated header to be included along with generated/autoconf.h but since we couldn't use it within Kconfig logic it would be confusing.
Quoted 1 line
If you like you could create an issue for it.
Please, thanks.
Signature · 1 line
Tom
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
Hi Tom,
Quoted 47 lines · Tom Rini
Splitting this in to two different threads..
Quoted 39 lines · Simon Glass
Hi Tom,
Quoted 28 lines · Tom Rini
Quoted 26 lines · Simon Glass
Hi Tom,
Quoted 5 lines · Tom Rini
Remove and replace
common.handconfig.hin sandbox when it's not needed and add some explicit includes where needed.Signed-off-by Tom Rini <[email protected]>Quoted 15 lines
--- arch/sandbox/cpu/cache.c | 1 - arch/sandbox/cpu/cpu.c | 1 - arch/sandbox/cpu/sdl.c | 2 +- arch/sandbox/cpu/spl.c | 1 - arch/sandbox/cpu/start.c | 2 +- arch/sandbox/cpu/state.c | 2 +- arch/sandbox/include/asm/io.h | 2 ++ arch/sandbox/include/asm/state.h | 1 - arch/sandbox/lib/bootm.c | 1 - arch/sandbox/lib/fdt_fixup.c | 1 - arch/sandbox/lib/interrupts.c | 1 - arch/sandbox/lib/pci_io.c | 1 - board/sandbox/sandbox.c | 2 +- 13 files changed, 6 insertions(+), 12 deletions(-)Reviewed-by Simon Glass <[email protected]>Quoted 7 lines
Quoted 1 line
Is it possible to move CFG_SYS_SDRAM_BASE/SIZE to
Kconfig?Possible? Sure. But I think it would end up being fairly horrible. What would be nice I think is some Zephyr-style "convert
CONFIG_DEFAULT_DEVICE_TREEto some defines" because we could parse out /memory to CFG_SYS_SDRAM_BASE/SIZE and that's something we _need_ at build time.Quoted 3 lines
That would be pretty easy to do. But I would prefer to have it create CONFIG_SYS_SDRAM_BASE/SIZE so that it fits in with
Kconfig, just that the value is set for you.
Quoted 8 lines
I _think_ we need it to be non-CONFIG namespace or we'll run in to other problems? We could get the new autogenerated header to be included along with
generated/autoconf.hbut since we couldn't use it withinKconfiglogic it would be confusing.Quoted 1 line
If you like you could create an issue for it.
Please, thanks.
https://source.denx.de/u-boot/u-boot/-/issues/27
Regards,
Simon
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
In reply to Simon GlassOn Sat, Nov 18, 2023 at 10:58:50AM -0700, Simon Glass wrote:
[snip]
Quoted 10 lines
I found these:
https://patchwork.ozlabs.org/project/uboot/list/?series=262148&state=*
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/IMO the second one from Pali makes sense, but it was never followed up. It doesn't look too difficult.
We should have a policy that if people complain about a patch but don't follow up, we apply the patch we have.
I think the patch from Pali was the right direction, but as I noted, I wanted to see it implemented for some other UARTs as well, and it wasn't high on anyone elses priority list. Covering ns16550-style UARTs too would be good.
Signature · 1 line
Tom
Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage
Hi Tom,
Quoted 12 lines · Tom Rini
On Sat, Nov 18, 2023 at 10:58:50AM -0700, Simon Glass wrote:
[snip]
Quoted 8 lines
I found these:
https://patchwork.ozlabs.org/project/uboot/list/?series=262148&state=*
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/IMO the second one from Pali makes sense, but it was never followed up. It doesn't look too difficult.
Quoted 7 lines
Quoted 2 lines
We should have a policy that if people complain about a patch but don't follow up, we apply the patch we have.
I think the patch from Pali was the right direction, but as I noted, I wanted to see it implemented for some other UARTs as well, and it wasn't high on anyone elses priority list. Covering ns16550-style UARTs too would be good.
https://source.denx.de/u-boot/u-boot/-/issues/28
Regards,
Simon
PATCH 5/5 global: Drop common.h inclusion
In reply to Tom RiniIn order to make it easier to move on to dropping common.h from code directly, remove common.h inclusion from the rest of the header file which had been including it.
--- board/BuR/common/br_resetc.h | 1 - board/CZ.NIC/turris_mox/mox_sp.h | 2 -- board/freescale/common/vsc3316_3308.h | 1 - board/ti/ks2_evm/mux-k2g.h | 1 - board/tq/tqma6/tqma6_bb.h | 2 -- board/xilinx/zynqmp/xil_io.h | 1 - disk/part_amiga.h | 1 - drivers/bios_emulator/include/x86emu.h | 1 - drivers/crypto/fsl/jobdesc.h | 1 - drivers/crypto/fsl/rsa_caam.h | 2 -- drivers/ddr/altera/sdram_soc64.h | 1 - drivers/ddr/marvell/a38x/ddr_ml_wrapper.h | 1 - drivers/net/fm/fm.h | 1 - drivers/net/fsl-mc/dpio/qbman_private.h | 1 - drivers/net/fsl-mc/dpio/qbman_sys.h | 1 + drivers/net/mscc_eswitch/mscc_mac_table.c | 1 + drivers/net/mscc_eswitch/mscc_mac_table.h | 2 -- drivers/net/mscc_eswitch/mscc_xfer.c | 1 + drivers/net/mscc_eswitch/mscc_xfer.h | 2 -- drivers/pci/pcie_layerscape_fixup_common.h | 2 -- drivers/pci_endpoint/pcie-cadence.h | 1 - drivers/pinctrl/mtmips/pinctrl-mtmips-common.h | 2 -- drivers/usb/gadget/bcm_udc_otg.h | 2 -- fs/btrfs/ctree.h | 1 - fs/yaffs2/ydirectenv.h | 1 - lib/libavb/avb_sysdeps.h | 4 +++- lib/zlib/zlib.h | 1 - net/arp.h | 2 -- net/link_local.h | 5 +---- net/net_rand.h | 1 - net/ping.h | 1 - 31 files changed, 7 insertions(+), 40 deletions(-)
board/BuR/common/br_resetc.h +0 -1
@@ -7,7 +7,6 @@*/ #ifndef __CONFIG_BRRESETC_H__#define __CONFIG_BRRESETC_H__ -#include <common.h> int br_resetc_regget (u8 reg,u8 *dst);int br_resetc_regset (u8 reg,u8 val);
board/CZ.NIC/turris_mox/mox_sp.h +0 -2
@@ -6,8 +6,6 @@#ifndef _BOARD_CZNIC_TURRIS_MOX_MOX_SP_H_#define _BOARD_CZNIC_TURRIS_MOX_MOX_SP_H_ -#include <common.h> -enum cznic_a3720_board {BOARD_UNDEFINED =0x0 , BOARD_TURRIS_MOX = 0x1,
board/freescale/common/vsc3316_3308.h +0 -1
@@ -6,7 +6,6 @@#ifndef __VSC_CROSSBAR_H_#define __VSC_CROSSBAR_H_ -#include <common.h> #include <i2c.h> #include <errno.h>
board/ti/ks2_evm/mux-k2g.h +0 -1
@@ -6,7 +6,6 @@* Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include <hang.h> #include <asm/io.h> #include <asm/arch/mux-k2g.h>
board/tq/tqma6/tqma6_bb.h +0 -2
@@ -7,8 +7,6 @@#ifndef __TQMA6_BB__#define __TQMA6_BB__ -#include <common.h> -int tqma6_bb_board_mmc_getwp (struct mmc *mmc);int tqma6_bb_board_mmc_getcd (struct mmc *mmc);int tqma6_bb_board_mmc_init (struct bd_info *bis);
board/xilinx/zynqmp/xil_io.h +0 -1
@@ -5,7 +5,6 @@/* FIXME remove this when vivado is fixed */ #include <asm/io.h> -#include <common.h> #include <linux/delay.h> #define xil_printf (...)
disk/part_amiga.h +0 -1
@@ -7,7 +7,6 @@#ifndef _DISK_PART_AMIGA_H#define _DISK_PART_AMIGA_H -#include <common.h> #if CONFIG_IS_ENABLED (ISO_PARTITION )/* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
drivers/bios_emulator/include/x86emu.h +0 -1
@@ -42,7 +42,6 @@#define __X86EMU_X86EMU_H#include <asm/types.h> -#include <common.h> #include <pci.h> #include <asm/io.h> #define X86API
drivers/crypto/fsl/jobdesc.h +0 -1
@@ -7,7 +7,6 @@#ifndef __JOBDESC_H#define __JOBDESC_H -#include <common.h> #include <asm/io.h> #include "rsa_caam.h"
drivers/crypto/fsl/rsa_caam.h +0 -2
@@ -6,8 +6,6 @@#ifndef __RSA_CAAM_H#define __RSA_CAAM_H -#include <common.h> -/** * struct pk_in_params - holder for input to PKHA block in CAAM * These parameters are required to perform Modular Exponentiation
drivers/ddr/altera/sdram_soc64.h +0 -1
@@ -6,7 +6,6 @@#ifndef _SDRAM_SOC64_H_#define _SDRAM_SOC64_H_ -#include <common.h> #include <linux/sizes.h> struct altera_sdram_priv {
drivers/ddr/marvell/a38x/ddr_ml_wrapper.h +0 -1
@@ -6,7 +6,6 @@#ifndef _DDR_ML_WRAPPER_H#define _DDR_ML_WRAPPER_H -#include <common.h> #include <i2c.h> #include <spl.h> #include <asm/io.h>
drivers/net/fm/fm.h +0 -1
@@ -6,7 +6,6 @@#ifndef __FM_H__#define __FM_H__ -#include <common.h> #include <phy.h> #include <fm_eth.h> #include <fsl_fman.h>
drivers/net/fsl-mc/dpio/qbman_private.h +0 -1
@@ -4,7 +4,6 @@*/ /* Perform extra checking */ -#include <common.h> #include <errno.h> #include <asm/io.h> #include <linux/bug.h>
drivers/net/fsl-mc/dpio/qbman_sys.h +1 -0
@@ -20,6 +20,7 @@/* Trace the 3 different classes of read/write access to QBMan. #undef as * required. */ +#include <config.h> #include <linux/bug.h> #include <linux/printk.h> #undef QBMAN_CCSR_TRACE
drivers/net/mscc_eswitch/mscc_mac_table.c +1 -0
@@ -3,6 +3,7 @@* Copyright (c) 2018 Microsemi Corporation */ +#include <errno.h> #include <linux/bitops.h> #include <linux/io.h> #include "mscc_mac_table.h"
drivers/net/mscc_eswitch/mscc_mac_table.h +0 -2
@@ -3,8 +3,6 @@* Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> -#define ETH_LEN 6#define MAC_VID 1
drivers/net/mscc_eswitch/mscc_xfer.c +1 -0
@@ -3,6 +3,7 @@* Copyright (c) 2018 Microsemi Corporation */ +#include <errno.h> #include <log.h> #include <linux/bitops.h> #include <linux/delay.h>
drivers/net/mscc_eswitch/mscc_xfer.h +0 -2
@@ -3,8 +3,6 @@* Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> -enum mscc_regs_qs {MSCC_QS_XTR_RD ,MSCC_QS_XTR_FLUSH ,
drivers/pci/pcie_layerscape_fixup_common.h +0 -2
@@ -9,8 +9,6 @@#ifndef _PCIE_LAYERSCAPE_FIXUP_COMMON_H_#define _PCIE_LAYERSCAPE_FIXUP_COMMON_H_ -#include <common.h> -void ft_pci_setup_ls (void *blob,struct bd_info *bd);#ifdef CONFIG_PCIE_LAYERSCAPE_GEN4
drivers/pci_endpoint/pcie-cadence.h +0 -1
@@ -11,7 +11,6 @@#ifndef PCIE_CADENCE_H #define PCIE_CADENCE_H -#include <common.h> #include <pci_ep.h> #include <asm/io.h> #include <linux/bitops.h>
drivers/pinctrl/mtmips/pinctrl-mtmips-common.h +0 -2
@@ -8,8 +8,6 @@ #ifndef _PINCTRL_MTMIPS_COMMON_H_ #define _PINCTRL_MTMIPS_COMMON_H_ -#include <common.h> - struct mtmips_pmx_func { const char *name; int value;
drivers/usb/gadget/bcm_udc_otg.h +0 -2
@@ -6,8 +6,6 @@#ifndef __BCM_UDC_OTG_H#define __BCM_UDC_OTG_H -#include <common.h> -static inline void wfld_set (uintptr_t addr,uint32_t fld_val,uint32_t fld_mask) {writel (((readl (addr) & ~(fld_mask)) | (fld_val)), (addr));
fs/btrfs/ctree.h +0 -1
@@ -9,7 +9,6 @@#ifndef __BTRFS_CTREE_H__#define __BTRFS_CTREE_H__ -#include <common.h> #include <compiler.h> #include <linux/rbtree.h> #include <linux/bug.h>
fs/yaffs2/ydirectenv.h +0 -1
@@ -20,7 +20,6 @@#ifndef __YDIRECTENV_H__#define __YDIRECTENV_H__ -#include <common.h> #include <malloc.h> #include <linux/compat.h>
lib/libavb/avb_sysdeps.h +3 -1
@@ -19,7 +19,9 @@ extern "C" {* like uint8_t, uint64_t, and bool (with |false|, |true| keywords) * must be present. */ -#include <common.h> +#include <stdio.h> +#include <stdbool.h> +#include <linux/types.h> /* If you don't have gcc or clang, these attribute macros may need to * be adjusted.
lib/zlib/zlib.h +0 -1
@@ -2,7 +2,6 @@#ifndef __GLUE_ZLIB_H__#define __GLUE_ZLIB_H__ -#include <common.h> #include <linux/compiler.h> #include <asm/unaligned.h> #include <watchdog.h>
net/arp.h +0 -2
@@ -12,8 +12,6 @@#ifndef __ARP_H__#define __ARP_H__ -#include <common.h> -extern struct in_addr net_arp_wait_packet_ip;/* MAC address of waiting packet's destination */ extern uchar *arp_wait_packet_ethaddr;
net/link_local.h +1 -4
@@ -10,15 +10,12 @@* Licensed under the GPL v2 or later */ -#if defined(CONFIG_CMD_LINK_LOCAL ) -#ifndef __LINK_LOCAL_H__#define __LINK_LOCAL_H__ -#include <common.h> +struct arp_hdr ;void link_local_receive_arp (struct arp_hdr *arp,int len);void link_local_start (void );#endif /* __LINK_LOCAL_H__ */ -#endif
net/net_rand.h +0 -1
@@ -9,7 +9,6 @@#ifndef __NET_RAND_H__#define __NET_RAND_H__ -#include <common.h> #include <dm/uclass.h> #include <rng.h>
net/ping.h +0 -1
@@ -12,7 +12,6 @@#ifndef __PING_H__#define __PING_H__ -#include <common.h> #include <net.h> /*
Signature · 1 line
2.34.1
Re: [PATCH 5/5] global: Drop common.h inclusion
Quoted 31 lines · Tom Rini
In order to make it easier to move on to dropping
common.hfrom code directly, removecommon.hinclusion from the rest of the header file which had been including it.Signed-off-by Tom Rini <[email protected]>--- board/BuR/common/br_resetc.h | 1 - board/CZ.NIC/turris_mox/mox_sp.h | 2 -- board/freescale/common/vsc3316_3308.h | 1 - board/ti/ks2_evm/mux-k2g.h | 1 - board/tq/tqma6/tqma6_bb.h | 2 -- board/xilinx/zynqmp/xil_io.h | 1 - disk/part_amiga.h | 1 - drivers/bios_emulator/include/x86emu.h | 1 - drivers/crypto/fsl/jobdesc.h | 1 - drivers/crypto/fsl/rsa_caam.h | 2 -- drivers/ddr/altera/sdram_soc64.h | 1 - drivers/ddr/marvell/a38x/ddr_ml_wrapper.h | 1 - drivers/net/fm/fm.h | 1 - drivers/net/fsl-mc/dpio/qbman_private.h | 1 - drivers/net/fsl-mc/dpio/qbman_sys.h | 1 + drivers/net/mscc_eswitch/mscc_mac_table.c | 1 + drivers/net/mscc_eswitch/mscc_mac_table.h | 2 -- drivers/net/mscc_eswitch/mscc_xfer.c | 1 + drivers/net/mscc_eswitch/mscc_xfer.h | 2 -- drivers/pci/pcie_layerscape_fixup_common.h | 2 -- drivers/pci_endpoint/pcie-cadence.h | 1 - drivers/pinctrl/mtmips/pinctrl-mtmips-common.h | 2 -- drivers/usb/gadget/bcm_udc_otg.h | 2 -- fs/btrfs/ctree.h | 1 -
Quoted 9 lines
fs/yaffs2/ydirectenv.h | 1 - lib/libavb/avb_sysdeps.h | 4 +++- lib/zlib/zlib.h | 1 - net/arp.h | 2 -- net/link_local.h | 5 +---- net/net_rand.h | 1 - net/ping.h | 1 - 31 files changed, 7 insertions(+), 40 deletions(-)
Quoted 9 lines · Tom Rini
Given how we define
QE_MURAM_SIZEtoday, this header needs to have <config.h> added to it.Signed-off-by Tom Rini <[email protected]>--- include/linux/immap_qe.h | 2 ++ 1 file changed, 2 insertions(+)