mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
bcm_host: Adjust for 64-bit physical addresses
This commit is contained in:
@@ -150,12 +150,15 @@ static unsigned get_dt_ranges(const char *filename, unsigned offset)
|
||||
unsigned bcm_host_get_peripheral_address(void)
|
||||
{
|
||||
unsigned address = get_dt_ranges("/proc/device-tree/soc/ranges", 4);
|
||||
if (address == 0)
|
||||
address = get_dt_ranges("/proc/device-tree/soc/ranges", 8);
|
||||
return address == ~0 ? 0x20000000 : address;
|
||||
}
|
||||
|
||||
unsigned bcm_host_get_peripheral_size(void)
|
||||
{
|
||||
unsigned address = get_dt_ranges("/proc/device-tree/soc/ranges", 8);
|
||||
unsigned address = get_dt_ranges("/proc/device-tree/soc/ranges", 4);
|
||||
address = get_dt_ranges("/proc/device-tree/soc/ranges", (address == 0) ? 12 : 8);
|
||||
return address == ~0 ? 0x01000000 : address;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user