18 #ifndef LIBBSP_MIPS_MALTA_BSP_H 19 #define LIBBSP_MIPS_MALTA_BSP_H 42 #define BSP_FEATURE_IRQ_EXTENSION 43 #define BSP_SHARED_HANDLER_SUPPORT 1 45 #define REVISION_REGISTER_ADDRESS 0x1fc00010 46 #define PRORV_MASK 0x0000000f 47 #define PROID_MASK 0x000000f0 48 #define CORRV_MASK 0x00000300 49 #define CORID_MASK 0x0000fc00 50 #define FPGRV_MASK 0x00ff0000 51 #define BSP_8259_BASE_ADDRESS (0x18000000UL | 0xa0000000UL) 52 #define BSP_PCI_BASE_ADDRESS (0x1be00000UL | 0xa0000000UL) 53 #define BSP_NIC_IO_BASE (0x10000000UL | 0xa0000000UL) 54 #define PCI0_IO_BASE (0x18000000UL | 0xa0000000UL) 55 #define BSP_NIC_MEM_BASE (0x00000000UL | 0xa0000000UL) 58 #define WRITE_PROTECTED_UINT8( _addr, _value ) \ 60 volatile uint8_t *_ptr = _addr | 0x80000000; \ 63 #define WRITE_PROTECTED_UINT16( _addr, _value ) \ 65 volatile uint16_t *_ptr = _addr | 0x80000000; \ 68 #define WRITE_PROTECTED_UINT32( _addr, _value ) \ 70 volatile uint32_t *_ptr = _addr | 0x80000000; \ 73 #define READ_PROTECTED_UINT8( _addr, _value ) \ 75 volatile uint8_t *_ptr = _addr | 0x80000000; \ 78 #define READ_PROTECTED_UINT16( _addr, _value ) \ 80 volatile uint16_t *_ptr = _addr | 0x80000000; \ 83 #define READ_PROTECTED_UINT32( _addr, _value ) \ 85 volatile uint32_t *_ptr = _addr | 0x80000000; \ 89 #define READ_UINT8( _register_, _value_ ) \ 90 ((_value_) = *((volatile unsigned char *)(_register_))) 92 #define WRITE_UINT8( _register_, _value_ ) \ 93 (*((volatile unsigned char *)(_register_)) = (_value_)) 95 #define READ_UINT16( _register_, _value_ ) \ 96 ((_value_) = *((volatile unsigned short *)(_register_))) 98 #define WRITE_UINT16( _register_, _value_ ) \ 99 (*((volatile unsigned short *)(_register_)) = (_value_)) 101 void simple_out_32(uint32_t base, uint32_t addr, uint32_t val);
102 void simple_out_le32(uint32_t base, uint32_t addr, uint32_t val);
103 uint8_t simple_in_8( uint32_t base, uint32_t addr );
104 void simple_out_8( uint32_t base, uint32_t addr, uint8_t val );
105 int16_t simple_in_le16( uint32_t base, uint32_t addr );
106 int16_t simple_in_16( uint32_t base, uint32_t addr );
107 uint32_t simple_in_le32( uint32_t base, uint32_t addr );
108 uint32_t simple_in_32( uint32_t base, uint32_t addr );
109 void simple_out_le16( uint32_t base, uint32_t addr, uint16_t val );
110 void simple_out_16( uint32_t base, uint32_t addr, uint16_t val );
116 void resettlb(
int i);
DEFAULT_INITIAL_EXTENSION Support.