• Stefan Roese's avatar
    dm: core: Add dev_get_addr_ptr() to return a pointer to the reg address · 28027521
    Stefan Roese authored
    On some platforms (e.g. x86), the return value of dev_get_addr() can't
    be assigned to a pointer type variable directly. As there might be a
    difference between the size of fdt_addr_t and the pointer type. On
    x86 for example, "fdt_addr_t" is 64bit but "void *" only 32bit. So
    assigning the register base directly in dev_get_addr() results in this
    compilation warning:
      warning: cast to pointer from integer of different size
    
    This patch introduces the new function dev_get_addr_ptr() that
    returns a pointer to the 'reg' address that can be used by drivers
    in this case.
    Signed-off-by: 's avatarStefan Roese <sr@denx.de>
    Reviewed-by: 's avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: 's avatarBin Meng <bmeng.cn@gmail.com>
    28027521
Name
Last commit
Last update
..
adc Loading commit data...
bios_emulator Loading commit data...
block Loading commit data...
bootcount Loading commit data...
clk Loading commit data...
core Loading commit data...
cpu Loading commit data...
crypto Loading commit data...
ddr Loading commit data...
demo Loading commit data...
dfu Loading commit data...
dma Loading commit data...
fpga Loading commit data...
gpio Loading commit data...
hwmon Loading commit data...
i2c Loading commit data...
input Loading commit data...
led Loading commit data...
memory Loading commit data...
misc Loading commit data...
mmc Loading commit data...
mtd Loading commit data...
net Loading commit data...
pch Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
pinctrl Loading commit data...
power Loading commit data...
pwm Loading commit data...
qe Loading commit data...
ram Loading commit data...
remoteproc Loading commit data...
rtc Loading commit data...
serial Loading commit data...
soc Loading commit data...
sound Loading commit data...
spi Loading commit data...
spmi Loading commit data...
thermal Loading commit data...
timer Loading commit data...
tpm Loading commit data...
twserial Loading commit data...
usb Loading commit data...
video Loading commit data...
watchdog Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...