summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/Kconfig2
-rw-r--r--drivers/Makefile1
-rw-r--r--drivers/bootcount/bootcount_env.c2
-rw-r--r--drivers/ddr/fsl/fsl_ddr_gen4.c1
-rw-r--r--drivers/ddr/fsl/interactive.c1
-rw-r--r--drivers/ddr/fsl/options.c1
-rw-r--r--drivers/dfu/dfu.c1
-rw-r--r--drivers/fastboot/fb_command.c1
-rw-r--r--drivers/fastboot/fb_common.c1
-rw-r--r--drivers/fastboot/fb_getvar.c1
-rw-r--r--drivers/fastboot/fb_mmc.c1
-rw-r--r--drivers/input/i8042.c1
-rw-r--r--drivers/input/input.c1
-rw-r--r--drivers/misc/fs_loader.c1
-rw-r--r--drivers/mmc/hi6220_dw_mmc.c29
-rw-r--r--drivers/mtd/cfi_flash.c3
-rw-r--r--drivers/mtd/jedec_flash.c1
-rw-r--r--drivers/mtd/mtd_uboot.c1
-rw-r--r--drivers/net/dc2114x.c1
-rw-r--r--drivers/net/fec_mxc.c2
-rw-r--r--drivers/net/fm/b4860.c1
-rw-r--r--drivers/net/fm/fdt.c1
-rw-r--r--drivers/net/fm/fm.c2
-rw-r--r--drivers/net/fsl-mc/mc.c1
-rw-r--r--drivers/net/fsl_mcdmafec.c2
-rw-r--r--drivers/net/ftmac100.c1
-rw-r--r--drivers/net/lan91c96.c1
-rw-r--r--drivers/net/mcffec.c2
-rw-r--r--drivers/net/ne2000_base.c12
-rw-r--r--drivers/net/netconsole.c5
-rw-r--r--drivers/net/phy/micrel_ksz90x1.c1
-rw-r--r--drivers/net/sandbox-raw.c1
-rw-r--r--drivers/net/sh_eth.c2
-rw-r--r--drivers/net/ti/cpsw-common.c1
-rw-r--r--drivers/pci/fsl_pci_init.c1
-rw-r--r--drivers/pci/pci.c1
-rw-r--r--drivers/pci/pci_common.c1
-rw-r--r--drivers/pci/pcie_intel_fpga.c18
-rw-r--r--drivers/pcmcia/Kconfig0
-rw-r--r--drivers/pcmcia/Makefile6
-rw-r--r--drivers/pcmcia/marubun_pcmcia.c99
-rw-r--r--drivers/qe/qe.c1
-rw-r--r--drivers/reset/reset-socfpga.c1
-rw-r--r--drivers/rtc/m41t60.c1
-rw-r--r--drivers/scsi/scsi.c1
-rw-r--r--drivers/serial/serial-uclass.c2
-rw-r--r--drivers/serial/serial.c2
-rw-r--r--drivers/serial/serial_lpuart.c8
-rw-r--r--drivers/serial/usbtty.c1
-rw-r--r--drivers/tee/sandbox.c8
-rw-r--r--drivers/usb/gadget/designware_udc.c1
-rw-r--r--drivers/usb/gadget/ether.c2
-rw-r--r--drivers/usb/gadget/f_dfu.c1
-rw-r--r--drivers/usb/gadget/f_fastboot.c1
-rw-r--r--drivers/usb/gadget/f_rockusb.c1
-rw-r--r--drivers/usb/gadget/f_sdp.c1
-rw-r--r--drivers/usb/host/ehci-fsl.c1
-rw-r--r--drivers/video/ati_radeon_fb.c1
-rw-r--r--drivers/video/cfb_console.c2
-rw-r--r--drivers/video/mb862xx.c1
-rw-r--r--drivers/video/mx3fb.c1
-rw-r--r--drivers/video/mxsfb.c1
-rw-r--r--drivers/video/videomodes.c1
63 files changed, 100 insertions, 152 deletions
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 5a9d01b508..350acf81f3 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -70,8 +70,6 @@ source "drivers/pci_endpoint/Kconfig"
source "drivers/pch/Kconfig"
-source "drivers/pcmcia/Kconfig"
-
source "drivers/phy/Kconfig"
source "drivers/phy/allwinner/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index 41933605ce..a4bb5e4975 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -88,7 +88,6 @@ obj-y += misc/
obj-$(CONFIG_MMC) += mmc/
obj-$(CONFIG_NVME) += nvme/
obj-$(CONFIG_PCI_ENDPOINT) += pci_endpoint/
-obj-y += pcmcia/
obj-y += dfu/
obj-$(CONFIG_PCH) += pch/
obj-y += phy/allwinner/
diff --git a/drivers/bootcount/bootcount_env.c b/drivers/bootcount/bootcount_env.c
index 9084ca8a6e..b75c9002b2 100644
--- a/drivers/bootcount/bootcount_env.c
+++ b/drivers/bootcount/bootcount_env.c
@@ -5,7 +5,7 @@
*/
#include <common.h>
-#include <environment.h>
+#include <env.h>
void bootcount_store(ulong a)
{
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index 30f7863b39..17a4a8282b 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <env.h>
#include <asm/io.h>
#include <fsl_ddr_sdram.h>
#include <asm/processor.h>
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index 4de0eae5f2..8e171e67fe 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <cli.h>
+#include <env.h>
#include <linux/ctype.h>
#include <asm/types.h>
#include <asm/io.h>
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index 4573ffa115..b9179315f2 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <env.h>
#include <hwconfig.h>
#include <fsl_ddr_sdram.h>
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 318949529b..d2b67b18cf 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <env.h>
#include <errno.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 200f9910c5..4864344853 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <env.h>
#include <fastboot.h>
#include <fastboot-internal.h>
#include <fb_mmc.h>
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 17eca73be0..e76af8ecc3 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <env.h>
#include <fastboot.h>
#include <net/fastboot.h>
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index ebe5c8a104..95cb434189 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <env.h>
#include <fastboot.h>
#include <fastboot-internal.h>
#include <fb_mmc.h>
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 0a335db3a6..b0b19c5762 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
#include <blk.h>
+#include <env.h>
#include <fastboot.h>
#include <fastboot-internal.h>
#include <fb_mmc.h>
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 9a5dc46207..98015899f2 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
#include <i8042.h>
#include <input.h>
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 4f514dba56..6ab378b979 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <console.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
#include <stdio_dev.h>
#include <input.h>
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index f42eeff8f6..88e486e9d5 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
#include <blk.h>
#include <fs.h>
diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
index effd1e4c7c..6de7924383 100644
--- a/drivers/mmc/hi6220_dw_mmc.c
+++ b/drivers/mmc/hi6220_dw_mmc.c
@@ -22,6 +22,11 @@ struct hi6220_dwmmc_priv_data {
struct dwmci_host host;
};
+struct hisi_mmc_data {
+ unsigned int clock;
+ bool use_fifo;
+};
+
static int hi6220_dwmmc_ofdata_to_platdata(struct udevice *dev)
{
struct hi6220_dwmmc_priv_data *priv = dev_get_priv(dev);
@@ -49,13 +54,17 @@ static int hi6220_dwmmc_probe(struct udevice *dev)
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct hi6220_dwmmc_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
+ struct hisi_mmc_data *mmc_data;
+
+ mmc_data = (struct hisi_mmc_data *)dev_get_driver_data(dev);
/* Use default bus speed due to absence of clk driver */
- host->bus_hz = 50000000;
+ host->bus_hz = mmc_data->clock;
dwmci_setup_cfg(&plat->cfg, host, host->bus_hz, 400000);
host->mmc = &plat->mmc;
+ host->fifo_mode = mmc_data->use_fifo;
host->mmc->priv = &priv->host;
upriv->mmc = host->mmc;
host->mmc->dev = dev;
@@ -75,9 +84,23 @@ static int hi6220_dwmmc_bind(struct udevice *dev)
return 0;
}
+static const struct hisi_mmc_data hi3660_mmc_data = {
+ .clock = 3200000,
+ .use_fifo = true,
+};
+
+static const struct hisi_mmc_data hi6220_mmc_data = {
+ .clock = 50000000,
+ .use_fifo = false,
+};
+
static const struct udevice_id hi6220_dwmmc_ids[] = {
- { .compatible = "hisilicon,hi6220-dw-mshc" },
- { .compatible = "hisilicon,hi3798cv200-dw-mshc" },
+ { .compatible = "hisilicon,hi6220-dw-mshc",
+ .data = (ulong)&hi6220_mmc_data },
+ { .compatible = "hisilicon,hi3798cv200-dw-mshc",
+ .data = (ulong)&hi6220_mmc_data },
+ { .compatible = "hisilicon,hi3660-dw-mshc",
+ .data = (ulong)&hi3660_mmc_data },
{ }
};
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 6b97e145e9..c59254c76e 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -19,13 +19,14 @@
#include <common.h>
#include <console.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
#include <fdt_support.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
-#include <environment.h>
+#include <env_internal.h>
#include <mtd/cfi_flash.h>
#include <watchdog.h>
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index a3540c1115..f59b2bc62f 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -15,7 +15,6 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/byteorder.h>
-#include <environment.h>
#define P_ID_AMD_STD CFI_CMDSET_AMD_LEGACY
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 0a41ed477c..5574227598 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -4,6 +4,7 @@
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*/
#include <common.h>
+#include <env.h>
#include <dm/device.h>
#include <dm/uclass-internal.h>
#include <jffs2/jffs2.h> /* LEGACY */
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index e3c403c13f..43c2253f10 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
+#include <env.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 96e3ad9a1a..080dbcf7db 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <dm.h>
-#include <environment.h>
+#include <env.h>
#include <malloc.h>
#include <memalign.h>
#include <miiphy.h>
diff --git a/drivers/net/fm/b4860.c b/drivers/net/fm/b4860.c
index 1e20685803..5be0ad2ab3 100644
--- a/drivers/net/fm/b4860.c
+++ b/drivers/net/fm/b4860.c
@@ -4,6 +4,7 @@
* Roy Zang <tie-fei.zang@freescale.com>
*/
#include <common.h>
+#include <env.h>
#include <phy.h>
#include <fm_eth.h>
#include <asm/io.h>
diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c
index 6125797125..72d1294751 100644
--- a/drivers/net/fm/fdt.c
+++ b/drivers/net/fm/fdt.c
@@ -3,6 +3,7 @@
* Copyright 2016 Freescale Semiconductor, Inc.
*/
#include <asm/io.h>
+#include <env.h>
#include <fsl_qe.h> /* For struct qe_firmware */
#ifdef CONFIG_SYS_DPAA_FMAN
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 0a43dfe74e..4c9dce8dc5 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -4,6 +4,7 @@
* Dave Liu <daveliu@freescale.com>
*/
#include <common.h>
+#include <env.h>
#include <malloc.h>
#include <asm/io.h>
#include <linux/errno.h>
@@ -14,7 +15,6 @@
#include <nand.h>
#include <spi_flash.h>
#include <mmc.h>
-#include <environment.h>
#ifdef CONFIG_ARM64
#include <asm/armv8/mmu.h>
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index cc59b21f9f..1d96e4bdc2 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -5,6 +5,7 @@
* Copyright 2017-2018 NXP
*/
#include <common.h>
+#include <env.h>
#include <errno.h>
#include <linux/bug.h>
#include <asm/io.h>
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 88309b186c..e66fb16de8 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -8,7 +8,7 @@
*/
#include <common.h>
-#include <environment.h>
+#include <env.h>
#include <malloc.h>
#include <command.h>
#include <config.h>
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index c08889c4b1..d8f1dde657 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
+#include <env.h>
#include <malloc.h>
#include <net.h>
#include <linux/io.h>
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index f2489aaf82..c08bd21f95 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -46,6 +46,7 @@
#include <common.h>
#include <command.h>
+#include <env.h>
#include <malloc.h>
#include "lan91c96.h"
#include <net.h>
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 2b54e3a549..fb93041256 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -8,7 +8,7 @@
*/
#include <common.h>
-#include <environment.h>
+#include <env.h>
#include <malloc.h>
#include <command.h>
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 421aa20ea6..a240d06ad4 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -74,7 +74,7 @@ Add SNMP
#include <common.h>
#include <command.h>
-#include <environment.h>
+#include <env.h>
#include <net.h>
#include <malloc.h>
#include <linux/compiler.h>
@@ -693,16 +693,6 @@ static int ne2k_setup_driver(struct eth_device *dev)
}
}
-#ifdef CONFIG_DRIVER_NE2000_CCR
- {
- vu_char *p = (vu_char *) CONFIG_DRIVER_NE2000_CCR;
-
- PRINTK("CCR before is %x\n", *p);
- *p = CONFIG_DRIVER_NE2000_VAL;
- PRINTK("CCR after is %x\n", *p);
- }
-#endif
-
nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE;
nic.data = nic.base + DP_DATA;
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index ce5a15ef57..73005ff94d 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <env.h>
#include <stdio_dev.h>
#include <net.h>
@@ -55,7 +56,7 @@ static int is_broadcast(struct in_addr ip)
static struct in_addr netmask;
static struct in_addr our_ip;
static int env_changed_id;
- int env_id = get_env_id();
+ int env_id = env_get_id();
/* update only when the environment has changed */
if (env_changed_id != env_id) {
@@ -75,7 +76,7 @@ static int refresh_settings_from_env(void)
{
const char *p;
static int env_changed_id;
- int env_id = get_env_id();
+ int env_id = env_get_id();
/* update only when the environment has changed */
if (env_changed_id != env_id) {
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index f18e40a2fe..0105fc5af1 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
#include <micrel.h>
#include <phy.h>
diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 7e6625d020..3707ee35eb 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -9,6 +9,7 @@
#include <asm/eth-raw-os.h>
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <malloc.h>
#include <net.h>
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 2d5c97062f..749f651920 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -10,7 +10,7 @@
#include <config.h>
#include <common.h>
-#include <environment.h>
+#include <env.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c
index ac12cfe9b8..21b8bbda3d 100644
--- a/drivers/net/ti/cpsw-common.c
+++ b/drivers/net/ti/cpsw-common.c
@@ -7,7 +7,6 @@
#include <common.h>
#include <dm.h>
-#include <environment.h>
#include <fdt_support.h>
#include <asm/io.h>
#include <cpsw.h>
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index b4c8556686..ab5e49941f 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <env.h>
#include <malloc.h>
#include <asm/fsl_serdes.h>
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e2195726c8..5db24f1c51 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <command.h>
+#include <env.h>
#include <errno.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c
index 9f2d2678e3..5231b69dc9 100644
--- a/drivers/pci/pci_common.c
+++ b/drivers/pci/pci_common.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
#include <pci.h>
#include <asm/io.h>
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 3cdf05b314..a5ea4888f3 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -36,16 +36,18 @@
#define RP_CFG_ADDR(pcie, reg) \
((pcie->hip_base) + (reg) + (1 << 20))
+#define RP_SECONDARY(pcie) \
+ readb(RP_CFG_ADDR(pcie, PCI_SECONDARY_BUS))
#define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn))
#define TLP_CFGRD_DW0(pcie, bus) \
- ((((bus != pcie->first_busno) ? TLP_FMTTYPE_CFGRD0 \
- : TLP_FMTTYPE_CFGRD1) << 24) | \
+ ((((bus > RP_SECONDARY(pcie)) ? TLP_FMTTYPE_CFGRD1 \
+ : TLP_FMTTYPE_CFGRD0) << 24) | \
TLP_PAYLOAD_SIZE)
#define TLP_CFGWR_DW0(pcie, bus) \
- ((((bus != pcie->first_busno) ? TLP_FMTTYPE_CFGWR0 \
- : TLP_FMTTYPE_CFGWR1) << 24) | \
+ ((((bus > RP_SECONDARY(pcie)) ? TLP_FMTTYPE_CFGWR1 \
+ : TLP_FMTTYPE_CFGWR0) << 24) | \
TLP_PAYLOAD_SIZE)
#define TLP_CFG_DW1(pcie, tag, be) \
@@ -56,7 +58,7 @@
#define TLP_COMP_STATUS(s) (((s) >> 13) & 7)
#define TLP_BYTE_COUNT(s) (((s) >> 0) & 0xfff)
#define TLP_HDR_SIZE 3
-#define TLP_LOOP 500
+#define TLP_LOOP 20000
#define DWORD_MASK 3
#define IS_ROOT_PORT(pcie, bdf) \
@@ -161,8 +163,10 @@ static int tlp_read_packet(struct intel_fpga_pcie *pcie, u32 *value)
dw[count++] = cra_readl(pcie, RP_RXCPL_REG);
if (ctrl & RP_RXCPL_EOP) {
comp_status = TLP_COMP_STATUS(dw[1]);
- if (comp_status)
- return -EFAULT;
+ if (comp_status) {
+ *value = pci_get_ff(PCI_SIZE_32);
+ return 0;
+ }
if (value &&
TLP_BYTE_COUNT(dw[1]) == sizeof(u32) &&
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
deleted file mode 100644
index e69de29bb2..0000000000
--- a/drivers/pcmcia/Kconfig
+++ /dev/null
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
deleted file mode 100644
index 8374a56c34..0000000000
--- a/drivers/pcmcia/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2000-2007
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-
-obj-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o
diff --git a/drivers/pcmcia/marubun_pcmcia.c b/drivers/pcmcia/marubun_pcmcia.c
deleted file mode 100644
index b2eea6c601..0000000000
--- a/drivers/pcmcia/marubun_pcmcia.c
+++ /dev/null
@@ -1,99 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Marubun MR-SHPC-01 PCMCIA controller device driver
- *
- * (c) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
- */
-
-#include <common.h>
-#include <config.h>
-#include <pcmcia.h>
-#include <asm/io.h>
-
-#undef CONFIG_PCMCIA
-
-#if defined(CONFIG_CMD_PCMCIA)
-#define CONFIG_PCMCIA
-#endif
-
-#if defined(CONFIG_IDE)
-#define CONFIG_PCMCIA
-#endif
-
-#if defined(CONFIG_PCMCIA)
-
-/* MR-SHPC-01 register */
-#define MRSHPC_MODE (CONFIG_SYS_MARUBUN_MRSHPC + 4)
-#define MRSHPC_OPTION (CONFIG_SYS_MARUBUN_MRSHPC + 6)
-#define MRSHPC_CSR (CONFIG_SYS_MARUBUN_MRSHPC + 8)
-#define MRSHPC_ISR (CONFIG_SYS_MARUBUN_MRSHPC + 10)
-#define MRSHPC_ICR (CONFIG_SYS_MARUBUN_MRSHPC + 12)
-#define MRSHPC_CPWCR (CONFIG_SYS_MARUBUN_MRSHPC + 14)
-#define MRSHPC_MW0CR1 (CONFIG_SYS_MARUBUN_MRSHPC + 16)
-#define MRSHPC_MW1CR1 (CONFIG_SYS_MARUBUN_MRSHPC + 18)
-#define MRSHPC_IOWCR1 (CONFIG_SYS_MARUBUN_MRSHPC + 20)
-#define MRSHPC_MW0CR2 (CONFIG_SYS_MARUBUN_MRSHPC + 22)
-#define MRSHPC_MW1CR2 (CONFIG_SYS_MARUBUN_MRSHPC + 24)
-#define MRSHPC_IOWCR2 (CONFIG_SYS_MARUBUN_MRSHPC + 26)
-#define MRSHPC_CDCR (CONFIG_SYS_MARUBUN_MRSHPC + 28)
-#define MRSHPC_PCIC_INFO (CONFIG_SYS_MARUBUN_MRSHPC + 30)
-
-int pcmcia_on (void)
-{
- printf("Enable PCMCIA " PCMCIA_SLOT_MSG "\n");
-
- /* Init */
- outw( 0x0000 , MRSHPC_MODE );
-
- if ((inw(MRSHPC_CSR) & 0x000c) == 0){ /* if card detect is true */
- if ((inw(MRSHPC_CSR) & 0x0080) == 0){
- outw(0x0674 ,MRSHPC_CPWCR); /* Card Vcc is 3.3v? */
- }else{
- outw(0x0678 ,MRSHPC_CPWCR); /* Card Vcc is 5V */
- }
- udelay( 100000 ); /* wait for power on */
- }else{
- return 1;
- }
- /*
- * PC-Card window open
- * flag == COMMON/ATTRIBUTE/IO
- */
- /* common window open */
- outw(0x8a84,MRSHPC_MW0CR1); /* window 0xb8400000 */
- if ((inw(MRSHPC_CSR) & 0x4000) != 0)
- outw(0x0b00,MRSHPC_MW0CR2); /* common mode & bus width 16bit SWAP = 1 */
- else
- outw(0x0300,MRSHPC_MW0CR2); /* common mode & bus width 16bit SWAP = 0 */
-
- /* attribute window open */
- outw(0x8a85,MRSHPC_MW1CR1); /* window 0xb8500000 */
- if ((inw(MRSHPC_CSR) & 0x4000) != 0)
- outw(0x0a00,MRSHPC_MW1CR2); /* attribute mode & bus width 16bit SWAP = 1 */
- else
- outw(0x0200,MRSHPC_MW1CR2); /* attribute mode & bus width 16bit SWAP = 0 */
-
- /* I/O window open */
- outw(0x8a86,MRSHPC_IOWCR1); /* I/O window 0xb8600000 */
- outw(0x0008,MRSHPC_CDCR); /* I/O card mode */
- if ((inw(MRSHPC_CSR) & 0x4000) != 0)
- outw(0x0a00,MRSHPC_IOWCR2); /* bus width 16bit SWAP = 1 */
- else
- outw(0x0200,MRSHPC_IOWCR2); /* bus width 16bit SWAP = 0 */
-
- outw(0x0000,MRSHPC_ISR);
- outw(0x2000,MRSHPC_ICR);
- outb(0x00,(CONFIG_SYS_MARUBUN_MW2 + 0x206));
- outb(0x42,(CONFIG_SYS_MARUBUN_MW2 + 0x200));
-
- return 0;
-}
-
-int pcmcia_off (void)
-{
- printf ("Disable PCMCIA " PCMCIA_SLOT_MSG "\n");
-
- return 0;
-}
-
-#endif /* CONFIG_PCMCIA */
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 505ae9b45f..6e4d732a07 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -14,7 +14,6 @@
#include <linux/immap_qe.h>
#include <fsl_qe.h>
#include <mmc.h>
-#include <environment.h>
#ifdef CONFIG_ARCH_LS1021A
#include <asm/arch/immap_ls102xa.h>
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 822a3fe265..93ec9cfdb6 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <dm/lists.h>
#include <dm/of_access.h>
+#include <env.h>
#include <reset-uclass.h>
#include <linux/bitops.h>
#include <linux/io.h>
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index c84c8e11b3..532d2105e1 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <command.h>
+#include <env.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 75900d8228..48cb2a2818 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <pci.h>
#include <scsi.h>
#include <dm/device-internal.h>
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index d4488a2cc2..dcdaedefe7 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <dm.h>
-#include <environment.h>
+#include <env_internal.h>
#include <errno.h>
#include <os.h>
#include <serial.h>
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 09365ba6a1..b907508dbe 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -5,7 +5,7 @@
*/
#include <common.h>
-#include <environment.h>
+#include <env_internal.h>
#include <serial.h>
#include <stdio_dev.h>
#include <post.h>
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 57dd4a72c6..4b0a964d1b 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -106,7 +106,7 @@ u32 __weak get_lpuart_clk(void)
return CONFIG_SYS_CLK_FREQ;
}
-#if IS_ENABLED(CONFIG_CLK)
+#if CONFIG_IS_ENABLED(CLK)
static int get_lpuart_clk_rate(struct udevice *dev, u32 *clk)
{
struct clk per_clk;
@@ -148,7 +148,7 @@ static void _lpuart_serial_setbrg(struct udevice *dev,
u16 sbr;
int ret;
- if (IS_ENABLED(CONFIG_CLK)) {
+ if (CONFIG_IS_ENABLED(CLK)) {
ret = get_lpuart_clk_rate(dev, &clk);
if (ret)
return;
@@ -237,7 +237,7 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,
u32 clk;
int ret;
- if (IS_ENABLED(CONFIG_CLK)) {
+ if (CONFIG_IS_ENABLED(CLK)) {
ret = get_lpuart_clk_rate(dev, &clk);
if (ret)
return;
@@ -306,7 +306,7 @@ static void _lpuart32_serial_setbrg(struct udevice *dev,
u32 sbr;
int ret;
- if (IS_ENABLED(CONFIG_CLK)) {
+ if (CONFIG_IS_ENABLED(CLK)) {
ret = get_lpuart_clk_rate(dev, &clk);
if (ret)
return;
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index d0465b844e..76d9c8a3a6 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <config.h>
#include <circbuf.h>
+#include <env.h>
#include <stdio_dev.h>
#include <asm/unaligned.h>
#include "usbtty.h"
diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c
index 2f3355c7b7..4b91e7db1b 100644
--- a/drivers/tee/sandbox.c
+++ b/drivers/tee/sandbox.c
@@ -79,7 +79,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params,
struct tee_param *params)
{
struct sandbox_tee_state *state = dev_get_priv(dev);
- ENTRY e, *ep;
+ struct env_entry e, *ep;
char *name;
u32 res;
uint slot;
@@ -174,7 +174,7 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params,
e.key = name;
e.data = NULL;
- hsearch_r(e, FIND, &ep, &state->pstorage_htab, 0);
+ hsearch_r(e, ENV_FIND, &ep, &state->pstorage_htab, 0);
if (!ep)
return TEE_ERROR_ITEM_NOT_FOUND;
@@ -198,13 +198,13 @@ static u32 ta_avb_invoke_func(struct udevice *dev, u32 func, uint num_params,
e.key = name;
e.data = NULL;
- hsearch_r(e, FIND, &ep, &state->pstorage_htab, 0);
+ hsearch_r(e, ENV_FIND, &ep, &state->pstorage_htab, 0);
if (ep)
hdelete_r(e.key, &state->pstorage_htab, 0);
e.key = name;
e.data = value;
- hsearch_r(e, ENTER, &ep, &state->pstorage_htab, 0);
+ hsearch_r(e, ENV_ENTER, &ep, &state->pstorage_htab, 0);
if (!ep)
return TEE_ERROR_OUT_OF_MEMORY;
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index fa947dade6..432f312cee 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <asm/io.h>
+#include <env.h>
#include <usbdevice.h>
#include "ep0.h"
#include <usb/designware_udc.h>
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 0b5a1a4796..a118283984 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <console.h>
-#include <environment.h>
+#include <env.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index e27f146605..6756155133 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -14,6 +14,7 @@
* (C) Copyright 2006 by Harald Welte <hwelte at hmw-consulting.de>
*/
+#include <env.h>
#include <errno.h>
#include <common.h>
#include <malloc.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 3ad4346f2d..fc27dbe8de 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -11,6 +11,7 @@
*/
#include <config.h>
#include <common.h>
+#include <env.h>
#include <errno.h>
#include <fastboot.h>
#include <malloc.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index f3d24772cd..1cfeabcd31 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -6,6 +6,7 @@
*/
#include <config.h>
#include <common.h>
+#include <env.h>
#include <errno.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index fab7ce6f97..bcd1c5d47c 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <common.h>
#include <console.h>
+#include <env.h>
#include <malloc.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index b8f8e7a794..ced295ef0f 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <env.h>
#include <pci.h>
#include <usb.h>
#include <asm/io.h>
diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c
index 87557e52c0..6fce033636 100644
--- a/drivers/video/ati_radeon_fb.c
+++ b/drivers/video/ati_radeon_fb.c
@@ -19,6 +19,7 @@
#include <command.h>
#include <bios_emul.h>
+#include <env.h>
#include <pci.h>
#include <asm/processor.h>
#include <linux/errno.h>
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 636c3e8c18..e5c077e4f5 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -65,7 +65,9 @@
*/
#include <common.h>
+#include <env.h>
#include <fdtdec.h>
+#include <gzip.h>
#include <version.h>
#include <malloc.h>
#include <video.h>
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index 1a3c970b3d..301c1f0df1 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <asm/io.h>
+#include <env.h>
#include <pci.h>
#include <video_fb.h>
#include "videomodes.h"
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 176ae70b7c..a984443ef9 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -6,6 +6,7 @@
* HALE electronic GmbH, <helmut.raiger@hale.at>
*/
#include <common.h>
+#include <env.h>
#include <malloc.h>
#include <video_fb.h>
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 6c9a7c05e8..6922a130c6 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <linux/errno.h>
#include <malloc.h>
#include <video.h>
diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c
index d7614329ff..ac25b45f81 100644
--- a/drivers/video/videomodes.c
+++ b/drivers/video/videomodes.c
@@ -58,6 +58,7 @@
#include <common.h>
#include <edid.h>
+#include <env.h>
#include <errno.h>
#include <linux/ctype.h>