Date: Tue, 5 May 2015 00:19:05 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282440 - head/sys/arm/broadcom/bcm2835 Message-ID: <201505050019.t450J56s035416@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: loos Date: Tue May 5 00:19:04 2015 New Revision: 282440 URL: https://svnweb.freebsd.org/changeset/base/282440 Log: Fix DMA on RPi 2. BCM2836 has a different base address for peripherals. Obtained from: netbsd Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Mon May 4 22:27:55 2015 (r282439) +++ head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Tue May 5 00:19:04 2015 (r282440) @@ -37,14 +37,20 @@ #define BCM2835_VCBUS_IO_BASE 0x7E000000 #define BCM2835_VCBUS_SDRAM_UNCACHED 0xC0000000 +#ifdef SOC_BCM2836 +#define BCM2835_ARM_IO_BASE 0x3f000000 +#define BCM2835_VCBUS_SDRAM_BASE BCM2835_VCBUS_SDRAM_UNCACHED +#else #define BCM2835_ARM_IO_BASE 0x20000000 -#define BCM2835_ARM_IO_SIZE 0x02000000 +#define BCM2835_VCBUS_SDRAM_BASE BCM2835_VCBUS_SDRAM_CACHED +#endif +#define BCM2835_ARM_IO_SIZE 0x01000000 /* * Convert physical address to VC bus address. Should be used * when submitting address over mailbox interface */ -#define PHYS_TO_VCBUS(pa) ((pa) + BCM2835_VCBUS_SDRAM_CACHED) +#define PHYS_TO_VCBUS(pa) ((pa) + BCM2835_VCBUS_SDRAM_BASE) /* Check whether pa bellong top IO window */ #define BCM2835_ARM_IS_IO(pa) (((pa) >= BCM2835_ARM_IO_BASE) && \ @@ -61,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_CACHED) +#define VCBUS_TO_PHYS(vca) ((vca) - BCM2835_VCBUS_SDRAM_BASE) #endif /* _BCM2835_VCBUS_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505050019.t450J56s035416>