common: Drop asm/global_data.h from common header
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#ifndef __AUDIO_CODEC_H__
|
||||
#define __AUDIO_CODEC_H__
|
||||
|
||||
struct udevice;
|
||||
|
||||
/*
|
||||
* An audio codec turns digital data into sound with various parameters to
|
||||
* control its operation.
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _AXI_H_
|
||||
#define _AXI_H_
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* enum axi_size_t - Determine size of AXI transfer
|
||||
* @AXI_SIZE_8: AXI sransfer is 8-bit wide
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _BACKLIGHT_H
|
||||
#define _BACKLIGHT_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
enum {
|
||||
BACKLIGHT_MAX = 100,
|
||||
BACKLIGHT_MIN = 0,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define _BOOTCOUNT_H__
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <env.h>
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef __CACHE_H
|
||||
#define __CACHE_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
/*
|
||||
* Structure for the cache controller
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <stdio.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/u-boot.h> /* boot information for Linux kernel */
|
||||
#include <asm/global_data.h> /* global data used for startup functions */
|
||||
#include <display_options.h>
|
||||
#include <vsprintf.h>
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef __CPU_H
|
||||
#define __CPU_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* struct cpu_plat - platform data for a CPU
|
||||
* @cpu_id: Platform-specific way of identifying the CPU.
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#if !defined(__ACPI__)
|
||||
|
||||
struct nhlt;
|
||||
struct udevice;
|
||||
|
||||
/** enum acpi_dump_option - selects what ACPI information to dump */
|
||||
enum acpi_dump_option {
|
||||
|
||||
@@ -379,6 +379,8 @@ bool ofnode_read_bool(ofnode node, const char *propname);
|
||||
ofnode ofnode_find_subnode(ofnode node, const char *subnode_name);
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_INLINE_OFNODE)
|
||||
#include <asm/global_data.h>
|
||||
|
||||
static inline bool ofnode_is_enabled(ofnode node)
|
||||
{
|
||||
if (ofnode_is_np(node)) {
|
||||
|
||||
@@ -695,6 +695,7 @@ int dev_decode_display_timing(const struct udevice *dev, int index,
|
||||
struct display_timing *config);
|
||||
|
||||
#else /* CONFIG_DM_DEV_READ_INLINE is enabled */
|
||||
#include <asm/global_data.h>
|
||||
|
||||
static inline int dev_read_u32(const struct udevice *dev,
|
||||
const char *propname, u32 *outp)
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct udevice;
|
||||
|
||||
/*
|
||||
* enum dma_direction - dma transfer direction indicator
|
||||
* @DMA_MEM_TO_MEM: Memcpy mode
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __EXPORTS_H__
|
||||
|
||||
#include <irq_func.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef __EXT_COMMON__
|
||||
#define __EXT_COMMON__
|
||||
|
||||
#include <compiler.h>
|
||||
|
||||
struct cmd_tbl;
|
||||
|
||||
#define SECTOR_SIZE 0x200
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#define QE_DATAONLY_BASE 0
|
||||
#define QE_DATAONLY_SIZE (QE_MURAM_SIZE - QE_DATAONLY_BASE)
|
||||
|
||||
struct udevice;
|
||||
|
||||
/* QE threads SNUM
|
||||
*/
|
||||
typedef enum qe_snum_state {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright 2014 Broadcom Corporation.
|
||||
*/
|
||||
|
||||
#include <compiler.h>
|
||||
#include <part.h>
|
||||
#include <sparse_format.h>
|
||||
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
#ifndef __INIT_H_
|
||||
#define __INIT_H_ 1
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct global_data;
|
||||
|
||||
#ifndef __ASSEMBLY__ /* put C only stuff in this section */
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
#define ll_boot_init() false
|
||||
#else
|
||||
#include <asm/global_data.h>
|
||||
|
||||
#define ll_boot_init() (!(gd->flags & GD_FLG_SKIP_LL_INIT))
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ typedef int (*init_fnc_t)(void);
|
||||
#ifdef CONFIG_EFI_APP
|
||||
#include <efi.h>
|
||||
#endif
|
||||
#include <asm/global_data.h>
|
||||
|
||||
/*
|
||||
* To enable debugging. add #define DEBUG at the top of the including file.
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef __LED_H
|
||||
#define __LED_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* struct led_uc_plat - Platform data the uclass stores about each device
|
||||
*
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef _MISC_H_
|
||||
#define _MISC_H_
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* misc_read() - Read the device to buffer, optional.
|
||||
* @dev: the device
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#define _NETDEV_H_
|
||||
#include <phy_interface.h>
|
||||
|
||||
struct udevice;
|
||||
|
||||
/*
|
||||
* Board and CPU-specific initialization functions
|
||||
* board_eth_init() has highest priority. cpu_eth_init() only
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef __POWER_AS3722_H__
|
||||
#define __POWER_AS3722_H__
|
||||
|
||||
struct udevice;
|
||||
|
||||
#define AS3722_GPIO_OUTPUT_VDDH (1 << 0)
|
||||
#define AS3722_GPIO_INVERT (1 << 1)
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _INCLUDE_REGULATOR_H_
|
||||
#define _INCLUDE_REGULATOR_H_
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* U-Boot Voltage/Current Regulator
|
||||
* ================================
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#ifndef _pwm_h_
|
||||
#define _pwm_h_
|
||||
|
||||
struct udevice;
|
||||
|
||||
/* struct pwm_ops: Operations for the PWM uclass */
|
||||
struct pwm_ops {
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef __RAM_H
|
||||
#define __RAM_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
struct ram_info {
|
||||
phys_addr_t base;
|
||||
size_t size;
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <asm/cache.h>
|
||||
#include <linux/dma-direction.h>
|
||||
|
||||
struct udevice;
|
||||
|
||||
struct scsi_cmd {
|
||||
unsigned char cmd[16]; /* command */
|
||||
/* for request sense */
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#define SOC_MAX_STR_SIZE 128
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* struct soc_attr - Contains SoC identify information to be used in
|
||||
* SoC matching. An array of these structs
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
|
||||
*/
|
||||
|
||||
struct udevice;
|
||||
|
||||
/*
|
||||
* This uclass encapsulates hardware methods to gather information about a
|
||||
* sysinfo or a specific device such as hard-wired GPIOs on GPIO expanders,
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef __SYSRESET_H
|
||||
#define __SYSRESET_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
enum sysreset_t {
|
||||
SYSRESET_WARM, /* Reset CPU, keep GPIOs active */
|
||||
SYSRESET_COLD, /* Reset CPU and GPIOs */
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#define __TEE_H
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
#define TEE_UUID_LEN 16
|
||||
|
||||
#define TEE_GEN_CAP_GP BIT(0) /* GlobalPlatform compliant TEE */
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include <command.h>
|
||||
|
||||
struct udevice;
|
||||
|
||||
enum tpm_duration {
|
||||
TPM_SHORT = 0,
|
||||
TPM_MEDIUM = 1,
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <tpm-common.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
struct udevice;
|
||||
|
||||
/* Useful constants */
|
||||
enum {
|
||||
TPM_REQUEST_HEADER_LENGTH = 10,
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <tpm-common.h>
|
||||
|
||||
struct udevice;
|
||||
|
||||
#define TPM2_DIGEST_LEN 32
|
||||
|
||||
#define TPM2_SHA1_DIGEST_SIZE 20
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _TPS6586X_H_
|
||||
#define _TPS6586X_H_
|
||||
|
||||
struct udevice;
|
||||
|
||||
enum {
|
||||
/* SM0-2 PWM/PFM Mode Selection */
|
||||
TPS6586X_PWM_SM0 = 1 << 0,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
#ifndef _UFS_H
|
||||
#define _UFS_H
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* ufs_probe() - initialize all devices in the UFS uclass
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user