binman support for FIT

new UCLASS_SOC
 patman switch 'test' command
 minor fdt fixes
 patman usability improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAl8V+WQRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIrebNgAgAmgHHPakg1fkJT8xZkbPD53r21t5fkF7h
 JTLVU93BKfC+Zz2bbizCEkCl9L9bdHSaSzJY5rb07E24yV/zwDcIkRApCmkDjVHN
 EHOb0P36Ht9acowSd5kN66wd2z0Q/V+7lfEdB6Adtprh0vVaWIKYtLPxogpRv6k9
 l/CaGsBCwvupmPeHZcE3pVQlflbKyYzp62VObEBI4RIJLisvDXaPRUcBa4vz904P
 yu0baIYW8hWBcZhb0Lkex/9x7ys2T1bnnw8G7WL05GtHSZfVvT46Y70o+3i5ycBh
 GAI93Lx4r1gCjol9LVE4i1bewbPiMqyNXOtKGPRt/IIvYI4HZ67lFA==
 =YIpM
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm

binman support for FIT
new UCLASS_SOC
patman switch 'test' command
minor fdt fixes
patman usability improvements
This commit is contained in:
Tom Rini 2020-07-23 15:56:06 -04:00
commit 5d3a21df66
319 changed files with 2503 additions and 653 deletions

View File

@ -158,7 +158,7 @@ jobs:
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
./tools/buildman/buildman -t
./tools/dtoc/dtoc -t
./tools/patman/patman --test
./tools/patman/patman test
make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
EOF
cat build.sh

3
.gitignore vendored
View File

@ -92,3 +92,6 @@ GTAGS
*.orig
*~
\#*#
# Python cache
__pycache__

View File

@ -169,7 +169,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
./tools/buildman/buildman -t;
./tools/dtoc/dtoc -t;
./tools/patman/patman --test;
./tools/patman/patman test;
make testconfig
Run tests for Nokia RX-51 (aka N900):

View File

@ -257,7 +257,7 @@ script:
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
./tools/patman/patman --test &&
./tools/patman/patman test &&
./tools/buildman/buildman -t &&
./tools/dtoc/dtoc -t &&
make testconfig;

View File

@ -62,4 +62,9 @@
clocks = <&k3_clks 115 1>;
power-domains = <&k3_pds 115 TI_SCI_PD_EXCLUSIVE>;
};
chipid: chipid@43000014 {
compatible = "ti,am654-chipid";
reg = <0x43000014 0x4>;
};
};

View File

@ -246,3 +246,7 @@
u-boot,dm-spl;
};
};
&chipid {
u-boot,dm-spl;
};

View File

@ -211,3 +211,7 @@
&mcu_fss0_ospi1_pins_default {
u-boot,dm-spl;
};
&chipid {
u-boot,dm-spl;
};

View File

@ -316,4 +316,9 @@
ti,cpts-periodic-outputs = <2>;
};
};
chipid: chipid@43000014 {
compatible = "ti,am654-chipid";
reg = <0x0 0x43000014 0x0 0x4>;
};
};

View File

@ -25,6 +25,7 @@
#include <fs.h>
#include <env.h>
#include <elf.h>
#include <soc.h>
struct ti_sci_handle *get_ti_sci_handle(void)
{
@ -308,38 +309,27 @@ void reset_cpu(ulong ignored)
#if defined(CONFIG_DISPLAY_CPUINFO)
int print_cpuinfo(void)
{
u32 soc, rev;
char *name;
soc = (readl(CTRLMMR_WKUP_JTAG_ID) &
JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT;
rev = (readl(CTRLMMR_WKUP_JTAG_ID) &
JTAG_ID_VARIANT_MASK) >> JTAG_ID_VARIANT_SHIFT;
struct udevice *soc;
char name[64];
int ret;
printf("SoC: ");
switch (soc) {
case AM65X:
name = "AM65x";
break;
case J721E:
name = "J721E";
break;
default:
name = "Unknown Silicon";
};
printf("%s SR ", name);
switch (rev) {
case REV_PG1_0:
name = "1.0";
break;
case REV_PG2_0:
name = "2.0";
break;
default:
name = "Unknown Revision";
};
printf("%s\n", name);
ret = soc_get(&soc);
if (ret) {
printf("UNKNOWN\n");
return 0;
}
ret = soc_get_family(soc, name, 64);
if (!ret) {
printf("%s ", name);
}
ret = soc_get_revision(soc, name, 64);
if (!ret) {
printf("%s\n", name);
}
return 0;
}

View File

@ -8,12 +8,6 @@
#include <asm/armv7_mpu.h>
#define AM65X 0xbb5a
#define J721E 0xbb64
#define REV_PG1_0 0
#define REV_PG2_0 1
struct fwl_data {
const char *name;
u16 fwl_id;

View File

@ -15,7 +15,6 @@
#endif
/* Assuming these addresses and definitions stay common across K3 devices */
#define CTRLMMR_WKUP_JTAG_ID 0x43000014
#define JTAG_ID_VARIANT_SHIFT 28
#define JTAG_ID_VARIANT_MASK (0xf << 28)
#define JTAG_ID_PARTNO_SHIFT 12

View File

@ -114,7 +114,7 @@ static int msm_clk_probe(struct udevice *dev)
{
struct msm_clk_priv *priv = dev_get_priv(dev);
priv->base = devfdt_get_addr(dev);
priv->base = dev_read_addr(dev);
if (priv->base == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -56,7 +56,7 @@ static int msm_pinctrl_probe(struct udevice *dev)
{
struct msm_pinctrl_priv *priv = dev_get_priv(dev);
priv->base = devfdt_get_addr(dev);
priv->base = dev_read_addr(dev);
priv->data = (struct msm_pinctrl_data *)dev->driver_data;
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;

View File

@ -79,7 +79,8 @@ int arch_cpu_init_dm(void)
return 0;
}
static int altera_nios2_get_desc(struct udevice *dev, char *buf, int size)
static int altera_nios2_get_desc(const struct udevice *dev, char *buf,
int size)
{
const char *cpu_name = "Nios-II";
@ -90,7 +91,8 @@ static int altera_nios2_get_desc(struct udevice *dev, char *buf, int size)
return 0;
}
static int altera_nios2_get_info(struct udevice *dev, struct cpu_info *info)
static int altera_nios2_get_info(const struct udevice *dev,
struct cpu_info *info)
{
info->cpu_freq = gd->cpu_clk;
info->features = (1 << CPU_FEAT_L1_CACHE) |
@ -99,7 +101,7 @@ static int altera_nios2_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
static int altera_nios2_get_count(struct udevice *dev)
static int altera_nios2_get_count(const struct udevice *dev)
{
return 1;
}

View File

@ -521,6 +521,10 @@
};
};
chipid: chipid {
compatible = "sandbox,soc";
};
i2s: i2s {
compatible = "sandbox,i2s";
#sound-dai-cells = <1>;

View File

@ -9,7 +9,7 @@
#include <asm/cpu_common.h>
#include <asm/cpu_x86.h>
static int apl_get_info(struct udevice *dev, struct cpu_info *info)
static int apl_get_info(const struct udevice *dev, struct cpu_info *info)
{
return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
}

View File

@ -150,7 +150,7 @@ static unsigned long tsc_freq(void)
return bclk * ((platform_info.lo >> 8) & 0xff);
}
static int baytrail_get_info(struct udevice *dev, struct cpu_info *info)
static int baytrail_get_info(const struct udevice *dev, struct cpu_info *info)
{
info->cpu_freq = tsc_freq();
info->features = 1 << CPU_FEAT_L1_CACHE | 1 << CPU_FEAT_MMU;
@ -158,7 +158,7 @@ static int baytrail_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
static int baytrail_get_count(struct udevice *dev)
static int baytrail_get_count(const struct udevice *dev)
{
int ecx = 0;

View File

@ -626,12 +626,12 @@ void cpu_set_power_limits(int power_limit_1_time)
}
}
static int broadwell_get_info(struct udevice *dev, struct cpu_info *info)
static int broadwell_get_info(const struct udevice *dev, struct cpu_info *info)
{
return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
}
static int broadwell_get_count(struct udevice *dev)
static int broadwell_get_count(const struct udevice *dev)
{
return 4;
}

View File

@ -26,7 +26,7 @@ int cpu_x86_bind(struct udevice *dev)
return 0;
}
int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size)
int cpu_x86_get_vendor(const struct udevice *dev, char *buf, int size)
{
const char *vendor = cpu_vendor_name(gd->arch.x86_vendor);
@ -38,7 +38,7 @@ int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size)
return 0;
}
int cpu_x86_get_desc(struct udevice *dev, char *buf, int size)
int cpu_x86_get_desc(const struct udevice *dev, char *buf, int size)
{
char *ptr;
@ -52,7 +52,7 @@ int cpu_x86_get_desc(struct udevice *dev, char *buf, int size)
return 0;
}
int cpu_x86_get_count(struct udevice *dev)
int cpu_x86_get_count(const struct udevice *dev)
{
int node, cpu;
int num = 0;

View File

@ -410,14 +410,15 @@ static int model_206ax_init(struct udevice *dev)
return 0;
}
static int model_206ax_get_info(struct udevice *dev, struct cpu_info *info)
static int model_206ax_get_info(const struct udevice *dev,
struct cpu_info *info)
{
return cpu_intel_get_info(info, INTEL_BCLK_MHZ);
return 0;
}
static int model_206ax_get_count(struct udevice *dev)
static int model_206ax_get_count(const struct udevice *dev)
{
return 4;
}

View File

@ -10,7 +10,7 @@
#include <qfw.h>
#include <asm/cpu.h>
int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size)
int cpu_qemu_get_desc(const struct udevice *dev, char *buf, int size)
{
if (size < CPU_MAX_NAME_LEN)
return -ENOSPC;
@ -20,7 +20,7 @@ int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size)
return 0;
}
static int cpu_qemu_get_count(struct udevice *dev)
static int cpu_qemu_get_count(const struct udevice *dev)
{
return qemu_fwcfg_online_cpus();
}

View File

@ -28,7 +28,7 @@ int cpu_x86_bind(struct udevice *dev);
* @size: Size of string space
* @return: 0 if OK, -ENOSPC if buffer is too small, other -ve on error
*/
int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
int cpu_x86_get_desc(const struct udevice *dev, char *buf, int size);
/**
* cpu_x86_get_count() - Get the number of cores for an x86 CPU
@ -40,7 +40,7 @@ int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
* @return: Number of cores if successful,
* -ENOENT if not "/cpus" entry is found in the device tree
*/
int cpu_x86_get_count(struct udevice *dev);
int cpu_x86_get_count(const struct udevice *dev);
/**
* cpu_x86_get_vendor() - Get a vendor string for an x86 CPU
@ -53,6 +53,6 @@ int cpu_x86_get_count(struct udevice *dev);
* @size: Size of string space
* @return: 0 if OK, -ENOSPC if buffer is too small, other -ve on error
*/
int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size);
int cpu_x86_get_vendor(const struct udevice *dev, char *buf, int size);
#endif /* _ASM_CPU_X86_H */

View File

@ -33,12 +33,12 @@ int fdtdec_board_setup(const void *fdt_blob)
int dram_init(void)
{
return fdtdec_setup_mem_size_base_fdt(gd->fdt_blob);
return fdtdec_setup_mem_size_base();
}
int dram_init_banksize(void)
{
fdtdec_setup_memory_banksize_fdt(gd->fdt_blob);
fdtdec_setup_memory_banksize();
return 0;
}

View File

@ -65,6 +65,8 @@ int fdt_find_regions(const void *fdt, char * const inc[], int inc_count,
stop_at = offset;
prop = fdt_get_property_by_offset(fdt, offset, NULL);
str = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));
if (!str)
return -FDT_ERR_BADSTRUCTURE;
if (str_in_list(str, exc_prop, exc_prop_count))
include = 0;
break;

View File

@ -816,8 +816,8 @@ static int fdt_del_partitions(void *blob, int parent_offset)
return 0;
}
int fdt_node_set_part_info(void *blob, int parent_offset,
struct mtd_device *dev)
static int fdt_node_set_part_info(void *blob, int parent_offset,
struct mtd_device *dev)
{
struct list_head *pentry;
struct part_info *part;
@ -951,27 +951,35 @@ void fdt_fixup_mtdparts(void *blob, const struct node_info *node_info,
struct mtd_device *dev;
int i, idx;
int noff;
if (mtdparts_init() != 0)
return;
bool inited = false;
for (i = 0; i < node_info_size; i++) {
idx = 0;
noff = fdt_node_offset_by_compatible(blob, -1,
node_info[i].compat);
while (noff != -FDT_ERR_NOTFOUND) {
noff = -1;
while ((noff = fdt_node_offset_by_compatible(blob, noff,
node_info[i].compat)) >= 0) {
const char *prop;
prop = fdt_getprop(blob, noff, "status", NULL);
if (prop && !strcmp(prop, "disabled"))
continue;
debug("%s: %s, mtd dev type %d\n",
fdt_get_name(blob, noff, 0),
node_info[i].compat, node_info[i].type);
if (!inited) {
if (mtdparts_init() != 0)
return;
inited = true;
}
dev = device_find(node_info[i].type, idx++);
if (dev) {
if (fdt_node_set_part_info(blob, noff, dev))
return; /* return on error */
}
/* Jump to next flash node */
noff = fdt_node_offset_by_compatible(blob, noff,
node_info[i].compat);
}
}
}

View File

@ -146,3 +146,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6162
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -120,3 +120,5 @@ CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -148,3 +148,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6162
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -121,3 +121,5 @@ CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -170,3 +170,5 @@ CONFIG_CADENCE_UFS=y
CONFIG_TI_J721E_UFS=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -135,3 +135,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6163
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_FS_EXT4=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -158,3 +158,5 @@ CONFIG_CADENCE_UFS=y
CONFIG_TI_J721E_UFS=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -116,3 +116,5 @@ CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_FS_EXT4=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_SOC_DEVICE=y
CONFIG_SOC_DEVICE_TI_K3=y

View File

@ -118,6 +118,7 @@ CONFIG_LED_GPIO=y
CONFIG_DM_MAILBOX=y
CONFIG_SANDBOX_MBOX=y
CONFIG_MISC=y
CONFIG_SOC_DEVICE=y
CONFIG_CROS_EC=y
CONFIG_CROS_EC_I2C=y
CONFIG_CROS_EC_LPC=y

View File

@ -139,6 +139,7 @@ CONFIG_LED_GPIO=y
CONFIG_DM_MAILBOX=y
CONFIG_SANDBOX_MBOX=y
CONFIG_MISC=y
CONFIG_SOC_DEVICE=y
CONFIG_CROS_EC=y
CONFIG_CROS_EC_I2C=y
CONFIG_CROS_EC_LPC=y

View File

@ -103,6 +103,7 @@ CONFIG_LED_GPIO=y
CONFIG_DM_MAILBOX=y
CONFIG_SANDBOX_MBOX=y
CONFIG_MISC=y
CONFIG_SOC_DEVICE=y
CONFIG_CROS_EC=y
CONFIG_CROS_EC_I2C=y
CONFIG_CROS_EC_LPC=y

View File

@ -120,6 +120,7 @@ CONFIG_LED_GPIO=y
CONFIG_DM_MAILBOX=y
CONFIG_SANDBOX_MBOX=y
CONFIG_MISC=y
CONFIG_SOC_DEVICE=y
CONFIG_CROS_EC=y
CONFIG_CROS_EC_I2C=y
CONFIG_CROS_EC_LPC=y

View File

@ -19,5 +19,6 @@ Driver Model
pmic-framework
remoteproc-framework
serial-howto
soc-framework
spi-howto
usb-info

View File

@ -0,0 +1,68 @@
.. SPDX-License-Identifier: GPL-2.0+
.. (C) Copyright 2020
.. Texas Instruments Incorporated - http://www.ti.com/
SOC ID Framework
================
Introduction
------------
The driver-model SOC ID framework is able to provide identification
information about a specific SoC in use at runtime, and also provide matching
from a set of identification information from an array. This can be useful for
enabling small quirks in drivers that exist between SoC variants that are
impractical to implement using device tree flags. It is based on UCLASS_SOC.
UCLASS_SOC:
- drivers/soc/soc-uclass.c
- include/soc.h
Configuration:
- CONFIG_SOC_DEVICE is selected by drivers as needed.
Implementing a UCLASS_SOC provider
----------------------------------
The purpose of this framework is to allow UCLASS_SOC provider drivers to supply
identification information about the SoC in use at runtime. The framework
allows drivers to define soc_ops that return identification strings. All
soc_ops need not be defined and can be left as NULL, in which case the
framework will return -ENOSYS and not consider the value when doing an
soc_device_match.
It is left to the driver implementor to decide how the information returned is
determined, but in general the same SOC should always return the same set of
identifying information. Information returned must be in the form of a NULL
terminated string.
See include/soc.h for documentation of the available soc_ops and the intended
meaning of the values that can be returned. See drivers/soc/soc_sandbox.c for
an example UCLASS_SOC provider driver.
Using a UCLASS_SOC driver
-------------------------
The framework provides the ability to retrieve and use the identification
strings directly. It also has the ability to return a match from a list of
different sets of SoC data using soc_device_match.
An array of 'struct soc_attr' can be defined, each containing ID information
for a specific SoC, and when passed to soc_device_match, the identifier values
for each entry in the list will be compared against the values provided by the
UCLASS_SOC driver that is in use. The first entry in the list that matches all
non-null values will be returned by soc_device_match.
An example of various uses of the framework can be found at test/dm/soc.c.
Describing the device using device tree
---------------------------------------
.. code-block:: none
chipid: chipid {
compatible = "sandbox,soc";
};
All that is required in a DT node is a compatible for a corresponding
UCLASS_SOC driver.

View File

@ -167,6 +167,15 @@ Specifies that keys used to sign the FIT are required. This means that they
must be verified for the image to boot. Without this option, the verification
will be optional (useful for testing but not for release).
.TP
.BI "\-t
Update the timestamp in the FIT.
Normally the FIT timestamp is created the first time mkimage is run on a FIT,
when converting the source .its to the binary .fit file. This corresponds to
using the -f flag. But if the original input to mkimage is a binary file
(already compiled) then the timestamp is assumed to have been set previously.
.SH EXAMPLES
List image information:

View File

@ -106,7 +106,7 @@ int exynos_adc_ofdata_to_platdata(struct udevice *dev)
struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
struct exynos_adc_priv *priv = dev_get_priv(dev);
priv->regs = (struct exynos_adc_v2 *)devfdt_get_addr(dev);
priv->regs = dev_read_addr_ptr(dev);
if (priv->regs == (struct exynos_adc_v2 *)FDT_ADDR_T_NONE) {
pr_err("Dev: %s - can't get address!", dev->name);
return -ENODATA;

View File

@ -34,7 +34,7 @@ static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
struct dwc_ahci_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
priv->base = map_physmem(devfdt_get_addr(dev), sizeof(void *),
priv->base = map_physmem(dev_read_addr(dev), sizeof(void *),
MAP_NOCACHE);
addr = devfdt_get_addr_index(dev, 1);

View File

@ -553,7 +553,7 @@ static int socfpga_clk_ofdata_to_platdata(struct udevice *dev)
struct socfpga_clk_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
plat->regs = (void __iomem *)addr;

View File

@ -285,7 +285,7 @@ static int socfpga_a10_clk_probe(struct udevice *dev)
socfpga_a10_handoff_workaround(dev);
if (!fdt_node_check_compatible(fdt, offset, "altr,clk-mgr")) {
plat->regs = devfdt_get_addr(dev);
plat->regs = dev_read_addr(dev);
} else {
pdev = dev_get_parent(dev);
if (!pdev)

View File

@ -95,7 +95,7 @@ static int exynos7420_clk_topc_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
base = devfdt_get_addr(dev);
base = dev_read_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
@ -149,7 +149,7 @@ static int exynos7420_clk_top0_probe(struct udevice *dev)
if (!priv)
return -EINVAL;
base = devfdt_get_addr(dev);
base = dev_read_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -283,7 +283,7 @@ int gen2_clk_probe(struct udevice *dev)
u32 cpg_mode;
int ret;
priv->base = (struct gen2_base *)devfdt_get_addr(dev);
priv->base = dev_read_addr_ptr(dev);
if (!priv->base)
return -EINVAL;

View File

@ -359,7 +359,7 @@ int gen3_clk_probe(struct udevice *dev)
u32 cpg_mode;
int ret;
priv->base = (struct gen3_base *)devfdt_get_addr(dev);
priv->base = dev_read_addr_ptr(dev);
if (!priv->base)
return -EINVAL;

View File

@ -253,7 +253,7 @@ static int uniphier_clk_probe(struct udevice *dev)
struct uniphier_clk_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev->parent);
addr = dev_read_addr(dev->parent);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -82,7 +82,8 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
* This is just a 'requested' sequence, and will be
* resolved (and ->seq updated) when the device is probed.
*/
if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) {
if (CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)) {
if (uc->uc_drv->name && ofnode_valid(node))
dev_read_alias_seq(dev, &dev->req_seq);
#if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)

View File

@ -379,7 +379,7 @@ static const struct bmips_cpu_hw bmips_cpu_bcm6838 = {
};
/* Generic CPU Ops */
static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
static int bmips_cpu_get_desc(const struct udevice *dev, char *buf, int size)
{
struct bmips_cpu_priv *priv = dev_get_priv(dev);
const struct bmips_cpu_hw *hw = priv->hw;
@ -387,7 +387,7 @@ static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
return hw->get_cpu_desc(priv, buf, size);
}
static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
static int bmips_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
{
struct bmips_cpu_priv *priv = dev_get_priv(dev);
const struct bmips_cpu_hw *hw = priv->hw;
@ -400,7 +400,7 @@ static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
static int bmips_cpu_get_count(struct udevice *dev)
static int bmips_cpu_get_count(const struct udevice *dev)
{
struct bmips_cpu_priv *priv = dev_get_priv(dev);
const struct bmips_cpu_hw *hw = priv->hw;
@ -408,7 +408,7 @@ static int bmips_cpu_get_count(struct udevice *dev)
return hw->get_cpu_count(priv);
}
static int bmips_cpu_get_vendor(struct udevice *dev, char *buf, int size)
static int bmips_cpu_get_vendor(const struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "Broadcom");

View File

@ -69,7 +69,7 @@ struct udevice *cpu_get_current_dev(void)
return cpu;
}
int cpu_get_desc(struct udevice *dev, char *buf, int size)
int cpu_get_desc(const struct udevice *dev, char *buf, int size)
{
struct cpu_ops *ops = cpu_get_ops(dev);
@ -79,7 +79,7 @@ int cpu_get_desc(struct udevice *dev, char *buf, int size)
return ops->get_desc(dev, buf, size);
}
int cpu_get_info(struct udevice *dev, struct cpu_info *info)
int cpu_get_info(const struct udevice *dev, struct cpu_info *info)
{
struct cpu_ops *ops = cpu_get_ops(dev);
@ -92,7 +92,7 @@ int cpu_get_info(struct udevice *dev, struct cpu_info *info)
return ops->get_info(dev, info);
}
int cpu_get_count(struct udevice *dev)
int cpu_get_count(const struct udevice *dev)
{
struct cpu_ops *ops = cpu_get_ops(dev);
@ -102,7 +102,7 @@ int cpu_get_count(struct udevice *dev)
return ops->get_count(dev);
}
int cpu_get_vendor(struct udevice *dev, char *buf, int size)
int cpu_get_vendor(const struct udevice *dev, char *buf, int size)
{
struct cpu_ops *ops = cpu_get_ops(dev);

View File

@ -8,14 +8,14 @@
#include <dm.h>
#include <cpu.h>
int cpu_sandbox_get_desc(struct udevice *dev, char *buf, int size)
int cpu_sandbox_get_desc(const struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "LEG Inc. SuperMegaUltraTurbo CPU No. 1");
return 0;
}
int cpu_sandbox_get_info(struct udevice *dev, struct cpu_info *info)
int cpu_sandbox_get_info(const struct udevice *dev, struct cpu_info *info)
{
info->cpu_freq = 42 * 42 * 42 * 42 * 42;
info->features = 0x42424242;
@ -24,12 +24,12 @@ int cpu_sandbox_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
int cpu_sandbox_get_count(struct udevice *dev)
int cpu_sandbox_get_count(const struct udevice *dev)
{
return 42;
}
int cpu_sandbox_get_vendor(struct udevice *dev, char *buf, int size)
int cpu_sandbox_get_vendor(const struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "Languid Example Garbage Inc.");

View File

@ -100,7 +100,7 @@ static int cpu_imx_get_temp(struct cpu_imx_platdata *plat)
}
#endif
int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)
int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
int ret, temp;
@ -126,7 +126,7 @@ int cpu_imx_get_desc(struct udevice *dev, char *buf, int size)
return 0;
}
static int cpu_imx_get_info(struct udevice *dev, struct cpu_info *info)
static int cpu_imx_get_info(const struct udevice *dev, struct cpu_info *info)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
@ -135,7 +135,7 @@ static int cpu_imx_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
static int cpu_imx_get_count(struct udevice *dev)
static int cpu_imx_get_count(const struct udevice *dev)
{
ofnode node;
int num = 0;
@ -157,7 +157,7 @@ static int cpu_imx_get_count(struct udevice *dev)
return num;
}
static int cpu_imx_get_vendor(struct udevice *dev, char *buf, int size)
static int cpu_imx_get_vendor(const struct udevice *dev, char *buf, int size)
{
snprintf(buf, size, "NXP");
return 0;

View File

@ -60,7 +60,7 @@ static inline u32 get_spridr(void)
* determine_type() - Determine CPU family of MPC83xx device
* @dev: CPU device from which to read CPU family from
*/
static inline void determine_family(struct udevice *dev)
static inline void determine_family(const struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
/* Upper 12 bits of PARTID field (bits 0-23 in SPRIDR) */
@ -95,7 +95,7 @@ static inline void determine_family(struct udevice *dev)
* determine_type() - Determine CPU type of MPC83xx device
* @dev: CPU device from which to read CPU type from
*/
static inline void determine_type(struct udevice *dev)
static inline void determine_type(const struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
/* Upper 16 bits of PVR (Processor Version Register) */
@ -169,7 +169,7 @@ static inline void determine_type(struct udevice *dev)
* determine_e300_type() - Determine e300 core type of MPC83xx device
* @dev: CPU device from which to read e300 core type from
*/
static inline void determine_e300_type(struct udevice *dev)
static inline void determine_e300_type(const struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
/* Upper 16 bits of PVR (Processor Version Register) */
@ -198,7 +198,7 @@ static inline void determine_e300_type(struct udevice *dev)
* determine_revid() - Determine revision ID of CPU device
* @dev: CPU device from which to read revision ID
*/
static inline void determine_revid(struct udevice *dev)
static inline void determine_revid(const struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
u32 REVID_MAJOR_MASK;
@ -221,7 +221,7 @@ static inline void determine_revid(struct udevice *dev)
* determine_cpu_data() - Determine CPU information from hardware
* @dev: CPU device from which to read information
*/
static void determine_cpu_data(struct udevice *dev)
static void determine_cpu_data(const struct udevice *dev)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
const u32 E_FLAG_MASK = 0x00010000;
@ -239,7 +239,7 @@ static void determine_cpu_data(struct udevice *dev)
priv->is_e_processor = !bitfield_extract_by_mask(spridr, E_FLAG_MASK);
}
static int mpc83xx_cpu_get_desc(struct udevice *dev, char *buf, int size)
static int mpc83xx_cpu_get_desc(const struct udevice *dev, char *buf, int size)
{
struct mpc83xx_cpu_priv *priv = dev_get_priv(dev);
struct clk core_clk;
@ -248,14 +248,14 @@ static int mpc83xx_cpu_get_desc(struct udevice *dev, char *buf, int size)
char csb_freq[32];
int ret;
ret = clk_get_by_index(dev, 0, &core_clk);
ret = clk_get_by_index((struct udevice *)dev, 0, &core_clk);
if (ret) {
debug("%s: Failed to get core clock (err = %d)\n",
dev->name, ret);
return ret;
}
ret = clk_get_by_index(dev, 1, &csb_clk);
ret = clk_get_by_index((struct udevice *)dev, 1, &csb_clk);
if (ret) {
debug("%s: Failed to get CSB clock (err = %d)\n",
dev->name, ret);
@ -278,13 +278,14 @@ static int mpc83xx_cpu_get_desc(struct udevice *dev, char *buf, int size)
return 0;
}
static int mpc83xx_cpu_get_info(struct udevice *dev, struct cpu_info *info)
static int mpc83xx_cpu_get_info(const struct udevice *dev,
struct cpu_info *info)
{
struct clk clock;
int ret;
ulong freq;
ret = clk_get_by_index(dev, 0, &clock);
ret = clk_get_by_index((struct udevice *)dev, 0, &clock);
if (ret) {
debug("%s: Failed to get core clock (err = %d)\n",
dev->name, ret);
@ -303,13 +304,14 @@ static int mpc83xx_cpu_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
static int mpc83xx_cpu_get_count(struct udevice *dev)
static int mpc83xx_cpu_get_count(const struct udevice *dev)
{
/* We have one e300cX core */
return 1;
}
static int mpc83xx_cpu_get_vendor(struct udevice *dev, char *buf, int size)
static int mpc83xx_cpu_get_vendor(const struct udevice *dev, char *buf,
int size)
{
snprintf(buf, size, "NXP");

View File

@ -17,7 +17,7 @@
DECLARE_GLOBAL_DATA_PTR;
static int riscv_cpu_get_desc(struct udevice *dev, char *buf, int size)
static int riscv_cpu_get_desc(const struct udevice *dev, char *buf, int size)
{
const char *isa;
@ -30,7 +30,7 @@ static int riscv_cpu_get_desc(struct udevice *dev, char *buf, int size)
return 0;
}
static int riscv_cpu_get_info(struct udevice *dev, struct cpu_info *info)
static int riscv_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
{
int ret;
struct clk clk;
@ -39,7 +39,7 @@ static int riscv_cpu_get_info(struct udevice *dev, struct cpu_info *info)
u32 d_cache_size;
/* First try getting the frequency from the assigned clock */
ret = clk_get_by_index(dev, 0, &clk);
ret = clk_get_by_index((struct udevice *)dev, 0, &clk);
if (!ret) {
ret = clk_get_rate(&clk);
if (!IS_ERR_VALUE(ret))
@ -67,7 +67,7 @@ static int riscv_cpu_get_info(struct udevice *dev, struct cpu_info *info)
return 0;
}
static int riscv_cpu_get_count(struct udevice *dev)
static int riscv_cpu_get_count(const struct udevice *dev)
{
ofnode node;
int num = 0;

View File

@ -546,7 +546,7 @@ static int ti_edma3_ofdata_to_platdata(struct udevice *dev)
{
struct ti_edma3_priv *priv = dev_get_priv(dev);
priv->base = devfdt_get_addr(dev);
priv->base = dev_read_addr(dev);
return 0;
}

View File

@ -88,7 +88,7 @@ static int altera_pio_ofdata_to_platdata(struct udevice *dev)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
plat->regs = map_physmem(devfdt_get_addr(dev),
plat->regs = map_physmem(dev_read_addr(dev),
sizeof(struct altera_pio_regs),
MAP_NOCACHE);
plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),

View File

@ -299,7 +299,7 @@ static int atmel_pio4_probe(struct udevice *dev)
clk_free(&clk);
addr_base = devfdt_get_addr(dev);
addr_base = dev_read_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -121,7 +121,7 @@ static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -545,7 +545,7 @@ static int davinci_gpio_ofdata_to_platdata(struct udevice *dev)
struct davinci_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -148,7 +148,7 @@ static int rcar_gpio_probe(struct udevice *dev)
int node = dev_of_offset(dev);
int ret;
priv->regs = (void __iomem *)devfdt_get_addr(dev);
priv->regs = dev_read_addr_ptr(dev);
uc_priv->bank_name = dev->name;
ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, node, "gpio-ranges",

View File

@ -112,7 +112,7 @@ static int r7s72100_gpio_probe(struct udevice *dev)
uc_priv->bank_name = dev->name;
dev = dev_get_parent(dev);
addr_base = devfdt_get_addr(dev);
addr_base = dev_read_addr(dev);
if (addr_base == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -142,7 +142,7 @@ static int uniphier_gpio_probe(struct udevice *dev)
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -96,7 +96,7 @@ static int msm_gpio_probe(struct udevice *dev)
{
struct msm_gpio_bank *priv = dev_get_priv(dev);
priv->base = devfdt_get_addr(dev);
priv->base = dev_read_addr(dev);
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
}

View File

@ -90,7 +90,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct mvebu_gpio_priv *priv = dev_get_priv(dev);
priv->regs = (struct mvebu_gpio_regs *)devfdt_get_addr(dev);
priv->regs = dev_read_addr_ptr(dev);
uc_priv->gpio_count = MVEBU_GPIOS_PER_BANK;
priv->name[0] = 'A' + dev->req_seq;
uc_priv->bank_name = priv->name;

View File

@ -300,7 +300,7 @@ static int mxc_gpio_ofdata_to_platdata(struct udevice *dev)
fdt_addr_t addr;
struct mxc_gpio_plat *plat = dev_get_platdata(dev);
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -275,7 +275,7 @@ static int mxs_ofdata_to_platdata(struct udevice *dev)
int node = dev_of_offset(dev);
int ret;
plat->bank = devfdt_get_addr(dev);
plat->bank = dev_read_addr(dev);
if (plat->bank == FDT_ADDR_T_NONE) {
printf("%s: No 'reg' property defined!\n", __func__);
return -EINVAL;

View File

@ -308,7 +308,7 @@ static int omap_gpio_bind(struct udevice *dev)
if (plat)
return 0;
base_addr = devfdt_get_addr(dev);
base_addr = dev_read_addr(dev);
if (base_addr == FDT_ADDR_T_NONE)
return -EINVAL;
@ -347,7 +347,7 @@ static int omap_gpio_ofdata_to_platdata(struct udevice *dev)
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -256,7 +256,7 @@ static int pm8941_pwrkey_probe(struct udevice *dev)
struct pm8916_gpio_bank *priv = dev_get_priv(dev);
int reg;
priv->pid = devfdt_get_addr(dev);
priv->pid = dev_read_addr(dev);
if (priv->pid == FDT_ADDR_T_NONE)
return log_msg_ret("bad address", -EINVAL);

View File

@ -316,7 +316,7 @@ static int gpio_exynos_bind(struct udevice *parent)
if (plat)
return 0;
base = (struct s5p_gpio_bank *)devfdt_get_addr(parent);
base = dev_read_addr_ptr(parent);
for (node = fdt_first_subnode(blob, dev_of_offset(parent)), bank = base;
node > 0;
node = fdt_next_subnode(blob, node), bank++) {
@ -339,7 +339,7 @@ static int gpio_exynos_bind(struct udevice *parent)
dev_set_of_offset(dev, node);
reg = devfdt_get_addr(dev);
reg = dev_read_addr(dev);
if (reg != FDT_ADDR_T_NONE)
bank = (struct s5p_gpio_bank *)((ulong)base + reg);

View File

@ -159,7 +159,7 @@ static int sifive_gpio_ofdata_to_platdata(struct udevice *dev)
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -293,7 +293,7 @@ static int gpio_sunxi_bind(struct udevice *parent)
if (plat)
return 0;
ctlr = (struct sunxi_gpio_reg *)devfdt_get_addr(parent);
ctlr = dev_read_addr_ptr(parent);
for (bank = 0; bank < soc_data->no_banks; bank++) {
struct sunxi_gpio_platdata *plat;
struct udevice *dev;

View File

@ -109,7 +109,7 @@ static int vybrid_gpio_odata_to_platdata(struct udevice *dev)
struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
fdt_addr_t base_addr;
base_addr = devfdt_get_addr(dev);
base_addr = dev_read_addr(dev);
if (base_addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -225,7 +225,7 @@ static int at91_i2c_ofdata_to_platdata(struct udevice *dev)
struct at91_i2c_bus *bus = dev_get_priv(dev);
int node = dev_of_offset(dev);
bus->regs = (struct at91_i2c_regs *)devfdt_get_addr(dev);
bus->regs = dev_read_addr_ptr(dev);
bus->pdata = (struct at91_i2c_pdata *)dev_get_driver_data(dev);
bus->clock_frequency = fdtdec_get_int(blob, node,
"clock-frequency", 100000);

View File

@ -471,7 +471,7 @@ static int davinci_i2c_probe(struct udevice *dev)
struct i2c_bus *i2c_bus = dev_get_priv(dev);
i2c_bus->id = dev->seq;
i2c_bus->regs = (struct i2c_regs *)devfdt_get_addr(dev);
i2c_bus->regs = dev_read_addr_ptr(dev);
i2c_bus->speed = 100000;
_davinci_i2c_init(i2c_bus->regs, i2c_bus->speed, 0);

View File

@ -525,7 +525,7 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
node = dev_of_offset(dev);
i2c_bus->hsregs = (struct exynos5_hsi2c *)devfdt_get_addr(dev);
i2c_bus->hsregs = dev_read_addr_ptr(dev);
i2c_bus->id = pinmux_decode_periph_id(blob, node);

View File

@ -94,7 +94,7 @@ static int uniphier_fi2c_probe(struct udevice *dev)
fdt_addr_t addr;
struct uniphier_fi2c_priv *priv = dev_get_priv(dev);
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -50,7 +50,7 @@ static int uniphier_i2c_probe(struct udevice *dev)
fdt_addr_t addr;
struct uniphier_i2c_priv *priv = dev_get_priv(dev);
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -447,7 +447,7 @@ static int imx_lpi2c_probe(struct udevice *bus)
i2c_bus->driver_data = dev_get_driver_data(bus);
addr = devfdt_get_addr(bus);
addr = dev_read_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -678,7 +678,7 @@ static int iproc_i2c_ofdata_to_platdata(struct udevice *bus)
int node = dev_of_offset(bus);
const void *blob = gd->fdt_blob;
bus_prvdata->base = map_physmem(devfdt_get_addr(bus),
bus_prvdata->base = map_physmem(dev_read_addr(bus),
sizeof(void *),
MAP_NOCACHE);

View File

@ -899,7 +899,7 @@ static int mxc_i2c_probe(struct udevice *bus)
i2c_bus->driver_data = dev_get_driver_data(bus);
addr = devfdt_get_addr(bus);
addr = dev_read_addr(bus);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -1067,7 +1067,7 @@ static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
{
struct omap_i2c_platdata *plat = dev_get_platdata(bus);
plat->base = devfdt_get_addr(bus);
plat->base = dev_read_addr(bus);
plat->speed = dev_read_u32_default(bus, "clock-frequency",
I2C_SPEED_STANDARD_RATE);
plat->ip_rev = dev_get_driver_data(bus);

View File

@ -310,7 +310,7 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
node = dev_of_offset(dev);
i2c_bus->regs = (struct s3c24x0_i2c *)devfdt_get_addr(dev);
i2c_bus->regs = dev_read_addr_ptr(dev);
i2c_bus->id = pinmux_decode_periph_id(blob, node);

View File

@ -291,7 +291,7 @@ static int tegra_kbd_probe(struct udevice *dev)
struct input_config *input = &uc_priv->input;
int ret;
priv->kbc = (struct kbc_tegra *)devfdt_get_addr(dev);
priv->kbc = dev_read_addr_ptr(dev);
if ((fdt_addr_t)priv->kbc == FDT_ADDR_T_NONE) {
debug("%s: No keyboard register found\n", __func__);
return -EINVAL;

View File

@ -153,7 +153,7 @@ static int tegra_hsp_probe(struct udevice *dev)
debug("%s(dev=%p)\n", __func__, dev);
thsp->regs = devfdt_get_addr(dev);
thsp->regs = dev_read_addr(dev);
if (thsp->regs == FDT_ADDR_T_NONE)
return -ENODEV;

View File

@ -73,7 +73,7 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
{
struct altera_sysid_platdata *plat = dev_get_platdata(dev);
plat->regs = map_physmem(devfdt_get_addr(dev),
plat->regs = map_physmem(dev_read_addr(dev),
sizeof(struct altera_sysid_regs),
MAP_NOCACHE);

View File

@ -187,7 +187,7 @@ static int imx8_scu_probe(struct udevice *dev)
debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -26,7 +26,7 @@ static int microchip_flexcom_ofdata_to_platdata(struct udevice *dev)
struct microchip_flexcom_platdata *plat = dev_get_platdata(dev);
int ret;
plat->regs = map_physmem(devfdt_get_addr(dev),
plat->regs = map_physmem(dev_read_addr(dev),
sizeof(struct microchip_flexcom_regs),
MAP_NOCACHE);

View File

@ -34,7 +34,7 @@ static int aspeed_sdhci_probe(struct udevice *dev)
goto free;
host->name = dev->name;
host->ioaddr = (void *)devfdt_get_addr(dev);
host->ioaddr = dev_read_addr_ptr(dev);
max_clk = clk_get_rate(&clk);
if (IS_ERR_VALUE(max_clk)) {

View File

@ -69,7 +69,7 @@ static int atmel_sdhci_probe(struct udevice *dev)
return ret;
host->name = dev->name;
host->ioaddr = (void *)devfdt_get_addr(dev);
host->ioaddr = dev_read_addr_ptr(dev);
host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
host->bus_width = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),

View File

@ -182,7 +182,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
int ret;
int clock_id = (int)dev_get_driver_data(dev);
base = devfdt_get_addr(dev);
base = dev_read_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -766,7 +766,7 @@ static int bcm2835_probe(struct udevice *dev)
upriv->mmc = &plat->mmc;
plat->cfg.name = dev->name;
host->phys_addr = devfdt_get_addr(dev);
host->phys_addr = dev_read_addr(dev);
if (host->phys_addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -62,7 +62,7 @@ static int sdhci_bcmstb_probe(struct udevice *dev)
fdt_addr_t base;
int ret;
base = devfdt_get_addr(dev);
base = dev_read_addr(dev);
if (base == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -395,7 +395,7 @@ static int ftsdc010_mmc_ofdata_to_platdata(struct udevice *dev)
struct ftsdc_priv *priv = dev_get_priv(dev);
struct ftsdc010_chip *chip = &priv->chip;
chip->name = dev->name;
chip->ioaddr = (void *)devfdt_get_addr(dev);
chip->ioaddr = dev_read_addr_ptr(dev);
chip->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"bus-width", 4);
chip->priv = dev;

View File

@ -33,7 +33,7 @@ static int hi6220_dwmmc_ofdata_to_platdata(struct udevice *dev)
struct dwmci_host *host = &priv->host;
host->name = dev->name;
host->ioaddr = (void *)devfdt_get_addr(dev);
host->ioaddr = dev_read_addr_ptr(dev);
host->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"bus-width", 4);

View File

@ -188,7 +188,7 @@ static int iproc_sdhci_probe(struct udevice *dev)
iproc_host->shadow_blk = 0;
host->name = dev->name;
host->ioaddr = (void *)devfdt_get_addr(dev);
host->ioaddr = dev_read_addr_ptr(dev);
host->voltages = MMC_VDD_165_195 |
MMC_VDD_32_33 | MMC_VDD_33_34;
host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B;

View File

@ -450,7 +450,7 @@ static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
struct mmc_config *cfg;
int ret;
priv->regs = map_physmem(devfdt_get_addr(dev), 0x100, MAP_NOCACHE);
priv->regs = map_physmem(dev_read_addr(dev), 0x100, MAP_NOCACHE);
cfg = &plat->cfg;
cfg->name = "MSC";

View File

@ -228,7 +228,7 @@ static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
fdt_addr_t addr;
addr = devfdt_get_addr(dev);
addr = dev_read_addr(dev);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;

View File

@ -171,7 +171,7 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
int node = dev_of_offset(dev);
host->name = strdup(dev->name);
host->ioaddr = (void *)devfdt_get_addr(dev);
host->ioaddr = dev_read_addr_ptr(dev);
host->bus_width = fdtdec_get_int(gd->fdt_blob, node, "bus-width", 4);
host->index = fdtdec_get_uint(gd->fdt_blob, node, "index", 0);
priv->base = (void *)fdtdec_get_addr_size_auto_parent(gd->fdt_blob,

View File

@ -112,7 +112,7 @@ static int mv_sdhci_probe(struct udevice *dev)
int ret;
host->name = MVSDH_NAME;
host->ioaddr = (void *)devfdt_get_addr(dev);
host->ioaddr = dev_read_addr_ptr(dev);
host->quirks = SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_WAIT_SEND_CMD;
host->mmc = &plat->mmc;
host->mmc->dev = dev;

Some files were not shown because too many files have changed in this diff Show More