00001
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #ifndef _HMATRIX_H_
00049 #define _HMATRIX_H_
00050
00051 #include <avr32/io.h>
00052 #include "compiler.h"
00053
00054
00058 enum e_granting_schemes {
00059 no_default_master,
00060 last_accessed_master,
00061 fixed_default_master
00062 };
00063 typedef enum e_granting_schemes granting_scheme_t;
00064
00068 enum e_burst_types {
00069 infinite = 0,
00070 single = 1,
00071 four_beat = 2,
00072 eight_beat = 3,
00073 sixteen_beat = 4
00074 };
00075 typedef enum e_burst_types burst_type_t;
00076
00080 enum e_arbitration_types {
00081 round_robin = 0,
00082 fixed_priority = 1
00083 };
00084 typedef enum e_arbitration_types arbitration_type_t;
00085
00086 #ifdef CPU_TYPE
00087 #if CPU_TYPE==ap7000
00088
00092 enum e_hsb_masters {
00093 cpu_data_cache = 0,
00094 cpu_instruction_cache = 1,
00095 hsb_hsb_bridge = 2,
00096 isi = 3,
00097 usb = 4,
00098 lcd = 5,
00099 macb0 = 6,
00100 macb1 = 7,
00101 dmac0 = 8,
00102 dmac1 = 9
00103 };
00104 typedef enum e_hsb_masters hsb_master_t;
00105
00109 enum e_hsb_slaves {
00110 sram0 = 0,
00111 sram1 = 1,
00112 pba = 2,
00113 pbb = 3,
00114 ebi = 4,
00115 usb_data = 5,
00116 lcd_configuration = 6,
00117 dmac_configuration = 7
00118 };
00119 typedef enum e_hsb_slaves hsb_slave_t;
00120
00124 enum e_memory_devices {
00125 SDRAM = 1,
00126 NAND = 3,
00127 CompactFlash0 = 4,
00128 CompactFlash1 = 5
00129 };
00130 typedef enum e_memory_devices memory_devices_t;
00131 #else
00132 #error "High Speed Bus Matrix operations for your chosen CPU is not supported"
00133 #endif
00134 #endif
00135
00142 void hmatrix_set_master_burst_type(hsb_master_t master, burst_type_t burst_type);
00143
00152 void hmatrix_configure_slave(hsb_slave_t slave, \
00153 U8 max_cycles_per_burst, \
00154 granting_scheme_t default_master_type, \
00155 hsb_master_t default_master, \
00156 arbitration_type_t arb_type );
00157
00164 U32 hmatrix_master_remap_address_decoding(hsb_master_t master, bool enable);
00165
00173 U32 hmatrix_slave_set_master_access_priority( hsb_slave_t slave,
00174 hsb_master_t master,
00175 U8 priority);
00176
00177 #endif // _HMATRIX_H_