• 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: default avatarStefan Roese <sr@denx.de>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
    28027521
Name
Last commit
Last update
Licenses Loading commit data...
api Loading commit data...
arch Loading commit data...
board Loading commit data...
cmd Loading commit data...
common Loading commit data...
configs Loading commit data...
disk Loading commit data...
doc Loading commit data...
drivers Loading commit data...
dts Loading commit data...
examples Loading commit data...
fs Loading commit data...
include Loading commit data...
lib Loading commit data...
net Loading commit data...
post Loading commit data...
scripts Loading commit data...
test Loading commit data...
tools Loading commit data...
.checkpatch.conf Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
README Loading commit data...
config.mk Loading commit data...
snapshot.commit Loading commit data...