aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>2015-10-30 00:24:37 +0000
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>2015-10-30 00:24:37 +0000
commit5ab55ce3980a783b20f42501aee9e9e85c70ecd6 (patch)
tree5b3b8126fc3d0adcdcf43ca07924bbdf14a38b4b /sys/arm/broadcom/bcm2835/bcm2835_vcbus.h
parent243c115e92c118a85934e95d82e5f20bc59ae51a (diff)
Fix framebuffer compatibility with new RPi firmware. Framebuffer driver
receives video memory address from VideoCore through property mailbox channel. Older versions of firmware (and the one that is currently part of sysutils/u-boot-rpi and sysutils/u-boot-rpi2) returned real physical address, newer one returns VideoCore bus address, so we need to convert it to actual physical address. this version works with both older and newer interface.
Notes
Notes: svn path=/head/; revision=290171
Diffstat (limited to 'sys/arm/broadcom/bcm2835/bcm2835_vcbus.h')
-rw-r--r--sys/arm/broadcom/bcm2835/bcm2835_vcbus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h b/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h
index 7b79b1ab5ea4..e1d44b31f76d 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h
+++ b/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h
@@ -67,6 +67,6 @@
* when address is returned by VC over mailbox interface. e.g.
* framebuffer base
*/
-#define VCBUS_TO_PHYS(vca) ((vca) - BCM2835_VCBUS_SDRAM_BASE)
+#define VCBUS_TO_PHYS(vca) ((vca) & ~(BCM2835_VCBUS_SDRAM_BASE))
#endif /* _BCM2835_VCBUS_H_ */