1/* 2 * Raspberry Pi support 3 */ 4 5#ifndef _PEXPERT_BCM2835_H_ 6#define _PEXPERT_BCM2835_H_ 7 8#include <mach/mach_types.h> 9 10#define PUT32(addr, val) *((volatile uint32_t*) (addr)) = (val); 11#define GET32(addr) (*((volatile uint32_t*) (addr))) 12#define GET64(addr) (*((volatile uint64_t*) (addr))) 13 14/* UART */ 15#define GP_BASE 0x20200000 16#define GPFSEL1 0x04 17#define GPSET0 0x1C 18#define GPCLR0 0x28 19#define GPPUD 0x94 20#define GPPUDCLK0 0x98 21 22#define AUX_BASE 0x20215000 23#define AUX_ENABLES 0x04 24#define AUX_MU_IO_REG 0x40 25#define AUX_MU_IER_REG 0x44 26#define AUX_MU_IIR_REG 0x48 27#define AUX_MU_LCR_REG 0x4C 28#define AUX_MU_MCR_REG 0x50 29#define AUX_MU_LSR_REG 0x54 30#define AUX_MU_MSR_REG 0x58 31#define AUX_MU_SCRATCH 0x5C 32#define AUX_MU_CNTL_REG 0x60 33#define AUX_MU_STAT_REG 0x64 34#define AUX_MU_BAUD_REG 0x68 35 36/* Timer */ 37#define SYSTIMER_BASE 0x20003000 38#define SYSTIMERCLK 0x04 39 40/* Framebuffer */ 41#define MAILBOX_BASE 0x2000B880 42 43#define MB_READ 0x00 44#define MB_POLL 0x10 45#define MB_SENDER 0x14 46#define MB_STATUS 0x18 47#define MB_CFG 0x1C 48#define MB_WRITE 0x20 49 50struct fb_info { 51 uint32_t phys_w; 52 uint32_t phys_h; 53 uint32_t virt_w; 54 uint32_t virt_h; 55 uint32_t gpu_pitch; 56 uint32_t bpp; 57 uint32_t x; 58 uint32_t y; 59 void *gpu_ptr; 60 uint32_t gpu_size; 61}; 62 63#endif /* !_PEXPERT_BCM2835_H_ */ 64