diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-03 22:20:22 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-03 22:20:22 -0400 |
commit | d6faedca7670a0b4862cace2f3189998cbec87d8 (patch) | |
tree | 387ca6154bbfb29b7ff30946cac70036146c5cb6 /include | |
parent | 68941e3b2c217907a49aa66af8bb65729b913397 (diff) | |
parent | 23552ba142860205c4ddec414417cdc251f8cb79 (diff) |
Merge branch '2020-08-01-misc-cleanups'
- Further cleanup of common.h and dm.h usage in headers
Diffstat (limited to 'include')
-rw-r--r-- | include/dm-demo.h | 2 | ||||
-rw-r--r-- | include/dm.h | 4 | ||||
-rw-r--r-- | include/dm/read.h | 1 | ||||
-rw-r--r-- | include/dm/test.h | 3 | ||||
-rw-r--r-- | include/efi_driver.h | 2 | ||||
-rw-r--r-- | include/eth_phy.h | 3 | ||||
-rw-r--r-- | include/fs_loader.h | 2 | ||||
-rw-r--r-- | include/kendryte/bypass.h | 2 | ||||
-rw-r--r-- | include/linux/clk-provider.h | 8 | ||||
-rw-r--r-- | include/phy.h | 9 | ||||
-rw-r--r-- | include/phy_interface.h | 2 | ||||
-rw-r--r-- | include/spi-mem.h | 5 | ||||
-rw-r--r-- | include/spi.h | 2 | ||||
-rw-r--r-- | include/spi_flash.h | 3 | ||||
-rw-r--r-- | include/test/ut.h | 1 | ||||
-rw-r--r-- | include/thermal.h | 2 | ||||
-rw-r--r-- | include/w1.h | 2 | ||||
-rw-r--r-- | include/wdt.h | 4 |
18 files changed, 27 insertions, 30 deletions
diff --git a/include/dm-demo.h b/include/dm-demo.h index c9a82c7e52..7b6d0d80ff 100644 --- a/include/dm-demo.h +++ b/include/dm-demo.h @@ -6,8 +6,6 @@ #ifndef __DM_DEMO_H #define __DM_DEMO_H -#include <dm.h> - /** * struct dm_demo_pdata - configuration data for demo instance * diff --git a/include/dm.h b/include/dm.h index 2e1afda440..a1b84169e6 100644 --- a/include/dm.h +++ b/include/dm.h @@ -3,6 +3,10 @@ * Copyright (c) 2013 Google, Inc */ +#ifdef _DM_H_ +#warning "Suspect dm.h is included from a header file - please fix" +#endif + #ifndef _DM_H_ #define _DM_H_ diff --git a/include/dm/read.h b/include/dm/read.h index b1a6108544..487ec9e9c9 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -11,6 +11,7 @@ #include <linux/errno.h> +#include <dm/device.h> #include <dm/fdtaddr.h> #include <dm/ofnode.h> #include <dm/uclass.h> diff --git a/include/dm/test.h b/include/dm/test.h index d39686cde2..2c92d41278 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -6,9 +6,6 @@ #ifndef __DM_TEST_H #define __DM_TEST_H -#include <dm.h> -#include <test/test.h> - /** * struct dm_test_cdata - configuration data for test instance * diff --git a/include/efi_driver.h b/include/efi_driver.h index 840483a416..2b62219c5b 100644 --- a/include/efi_driver.h +++ b/include/efi_driver.h @@ -8,8 +8,6 @@ #ifndef _EFI_DRIVER_H #define _EFI_DRIVER_H 1 -#include <common.h> -#include <dm.h> #include <efi_loader.h> /* diff --git a/include/eth_phy.h b/include/eth_phy.h index 19c496551b..be6c881527 100644 --- a/include/eth_phy.h +++ b/include/eth_phy.h @@ -6,9 +6,10 @@ #ifndef _eth_phy_h_ #define _eth_phy_h_ -#include <dm.h> #include <phy.h> +struct udevice; + int eth_phy_binds_nodes(struct udevice *eth_dev); int eth_phy_set_mdio_bus(struct udevice *eth_dev, struct mii_dev *mdio_bus); struct mii_dev *eth_phy_get_mdio_bus(struct udevice *eth_dev); diff --git a/include/fs_loader.h b/include/fs_loader.h index b728c06fcf..1b3c58086f 100644 --- a/include/fs_loader.h +++ b/include/fs_loader.h @@ -6,7 +6,7 @@ #ifndef _FS_LOADER_H_ #define _FS_LOADER_H_ -#include <dm.h> +struct udevice; /** * struct phandle_part - A place for storing phandle of node and its partition diff --git a/include/kendryte/bypass.h b/include/kendryte/bypass.h index a081cbd12f..ab85bbcbfc 100644 --- a/include/kendryte/bypass.h +++ b/include/kendryte/bypass.h @@ -5,7 +5,7 @@ #ifndef K210_BYPASS_H #define K210_BYPASS_H -#include <clk.h> +struct clk; struct k210_bypass { struct clk clk; diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 8a20743ad8..79dce8f0ad 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -9,12 +9,13 @@ #ifndef __LINUX_CLK_PROVIDER_H #define __LINUX_CLK_PROVIDER_H -#include <dm.h> #include <linux/bitops.h> #include <linux/err.h> #include <clk-uclass.h> #include <linux/err.h> +struct udevice; + static inline void clk_dm(ulong id, struct clk *clk) { if (!IS_ERR(clk)) @@ -188,8 +189,5 @@ struct clk *clk_register_mux(struct device *dev, const char *name, const char *clk_hw_get_name(const struct clk *hw); ulong clk_generic_get_rate(struct clk *clk); -static inline struct clk *dev_get_clk_ptr(struct udevice *dev) -{ - return (struct clk *)dev_get_uclass_priv(dev); -} +struct clk *dev_get_clk_ptr(struct udevice *dev); #endif /* __LINUX_CLK_PROVIDER_H */ diff --git a/include/phy.h b/include/phy.h index fedd146091..1dbbf65111 100644 --- a/include/phy.h +++ b/include/phy.h @@ -9,14 +9,17 @@ #ifndef _PHY_H #define _PHY_H -#include <dm.h> +#include <log.h> +#include <phy_interface.h> +#include <dm/ofnode.h> +#include <dm/read.h> #include <linux/errno.h> #include <linux/list.h> #include <linux/mii.h> #include <linux/ethtool.h> #include <linux/mdio.h> -#include <log.h> -#include <phy_interface.h> + +struct udevice; #define PHY_FIXED_ID 0xa5a55a5a #define PHY_NCSI_ID 0xbeefcafe diff --git a/include/phy_interface.h b/include/phy_interface.h index 882e4af8ff..841ade311e 100644 --- a/include/phy_interface.h +++ b/include/phy_interface.h @@ -10,6 +10,8 @@ #ifndef _PHY_INTERFACE_H #define _PHY_INTERFACE_H +#include <string.h> + typedef enum { PHY_INTERFACE_MODE_MII, PHY_INTERFACE_MODE_GMII, diff --git a/include/spi-mem.h b/include/spi-mem.h index 893f7bd733..ca0f55c8fd 100644 --- a/include/spi-mem.h +++ b/include/spi-mem.h @@ -11,10 +11,7 @@ #ifndef __UBOOT_SPI_MEM_H #define __UBOOT_SPI_MEM_H -#include <common.h> -#include <dm.h> -#include <errno.h> -#include <spi.h> +struct udevice; #define SPI_MEM_OP_CMD(__opcode, __buswidth) \ { \ diff --git a/include/spi.h b/include/spi.h index 98ba9e796d..ef8c1f6692 100644 --- a/include/spi.h +++ b/include/spi.h @@ -146,8 +146,6 @@ struct spi_slave { #define SPI_XFER_BEGIN BIT(0) /* Assert CS before transfer */ #define SPI_XFER_END BIT(1) /* Deassert CS after transfer */ #define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) -#define SPI_XFER_MMAP BIT(2) /* Memory Mapped start */ -#define SPI_XFER_MMAP_END BIT(3) /* Memory Mapped End */ }; /** diff --git a/include/spi_flash.h b/include/spi_flash.h index b336619487..85cae32cc7 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -9,10 +9,11 @@ #ifndef _SPI_FLASH_H_ #define _SPI_FLASH_H_ -#include <dm.h> /* Because we dereference struct udevice here */ #include <linux/types.h> #include <linux/mtd/spi-nor.h> +struct udevice; + /* by default ENV use the same parameters than SF command */ #ifndef CONFIG_ENV_SPI_BUS # define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS diff --git a/include/test/ut.h b/include/test/ut.h index 99bbb1230c..6ab2f8830d 100644 --- a/include/test/ut.h +++ b/include/test/ut.h @@ -11,6 +11,7 @@ #include <command.h> #include <hexdump.h> #include <linux/err.h> +#include <test/test.h> struct unit_test_state; diff --git a/include/thermal.h b/include/thermal.h index 11d75256e0..52a3317fd5 100644 --- a/include/thermal.h +++ b/include/thermal.h @@ -7,7 +7,7 @@ #ifndef _THERMAL_H_ #define _THERMAL_H_ -#include <dm.h> +struct udevice; int thermal_get_temp(struct udevice *dev, int *temp); diff --git a/include/w1.h b/include/w1.h index b958b1c92c..77f439e587 100644 --- a/include/w1.h +++ b/include/w1.h @@ -8,7 +8,7 @@ #ifndef __W1_H #define __W1_H -#include <dm.h> +struct udevice; #define W1_FAMILY_DS24B33 0x23 #define W1_FAMILY_DS2431 0x2d diff --git a/include/wdt.h b/include/wdt.h index d2ccfbc62e..bc242c2eb2 100644 --- a/include/wdt.h +++ b/include/wdt.h @@ -6,9 +6,7 @@ #ifndef _WDT_H_ #define _WDT_H_ -#include <dm.h> -#include <log.h> -#include <dm/read.h> +struct udevice; /* * Implement a simple watchdog uclass. Watchdog is basically a timer that |