Searched hist:"28027521 be95d27fcb83669e09ce3563bb4dd977" (Results 1 – 2 of 2) sorted by relevance
| /rk3399_rockchip-uboot/include/dm/ |
| H A D | device.h | 28027521be95d27fcb83669e09ce3563bb4dd977 Thu Apr 21 05:11:34 UTC 2016 Stefan Roese <sr@denx.de> dm: core: Add dev_get_addr_ptr() to return a pointer to the reg address
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: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|
| /rk3399_rockchip-uboot/drivers/core/ |
| H A D | device.c | 28027521be95d27fcb83669e09ce3563bb4dd977 Thu Apr 21 05:11:34 UTC 2016 Stefan Roese <sr@denx.de> dm: core: Add dev_get_addr_ptr() to return a pointer to the reg address
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: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|