Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/broadcom Add BCM2835_PERIPHERALS_TO_BUS() macro...



details:   https://anonhg.NetBSD.org/src/rev/43323c7ff9a6
branches:  trunk
changeset: 332233:43323c7ff9a6
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Fri Sep 12 17:31:32 2014 +0000

description:
Add BCM2835_PERIPHERALS_TO_BUS() macro to convert ARM physical address to
VideoCore bus address, needed when programing the DMA engine with hardware
FIFO register addresses.

diffstat:

 sys/arch/arm/broadcom/bcm2835reg.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 9f406d94cb7c -r 43323c7ff9a6 sys/arch/arm/broadcom/bcm2835reg.h
--- a/sys/arch/arm/broadcom/bcm2835reg.h        Fri Sep 12 16:40:38 2014 +0000
+++ b/sys/arch/arm/broadcom/bcm2835reg.h        Fri Sep 12 17:31:32 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835reg.h,v 1.11 2014/09/07 14:15:59 jmcneill Exp $ */
+/*     $NetBSD: bcm2835reg.h,v 1.12 2014/09/12 17:31:32 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -40,6 +40,9 @@
 
 #define        BCM2835_PERIPHERALS_BASE        0x20000000
 #define        BCM2835_PERIPHERALS_SIZE        0x01000000      /* 16MBytes */
+#define        BCM2835_PERIPHERALS_BASE_BUS    0x7e000000
+#define        BCM2835_PERIPHERALS_TO_BUS(a) \
+    ((a) - BCM2835_PERIPHERALS_BASE + BCM2835_PERIPHERALS_BASE_BUS)
 
 #define        BCM2835_STIMER_BASE     (BCM2835_PERIPHERALS_BASE + 0x00003000)
 #define        BCM2835_DMA0_BASE       (BCM2835_PERIPHERALS_BASE + 0x00007000)



Home | Main Index | Thread Index | Old Index