-
Notifications
You must be signed in to change notification settings - Fork 0
/
hw.h
72 lines (63 loc) · 2.35 KB
/
hw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef HW_H
#define HW_H
#include <stdbool.h>
#include "regs.h"
#define NUM_CLASS_PE 6
#define NUM_TMU_PE 4
#define CLASS_DMEM_SIZE 0x2000
#define CLASS_IMEM_SIZE 0x8000
#define TMU_DMEM_SIZE 0x800
#define TMU_IMEM_SIZE 0x2000
#define UTIL_DMEM_SIZE 0x2000
extern volatile struct bmu_regs *bmu1;
extern volatile struct bmu_regs *bmu2;
extern volatile uint8_t *cbus;
extern volatile struct class_csr_regs *class_csr;
extern volatile uint32_t *clkreset;
extern volatile uint8_t *ddr;
extern volatile struct gpi_regs *egpi1;
extern volatile struct gpi_regs *egpi2;
extern volatile struct gpi_regs *egpi3;
extern volatile struct emac_regs *emac1;
extern volatile struct emac_regs *emac2;
extern volatile struct emac_regs *emac3;
extern volatile struct gpi_regs *hgpi;
extern volatile struct hif_regs *hif;
extern volatile struct hif_desc *hif_rx_descs;
extern volatile struct hif_desc *hif_tx_descs;
extern volatile struct hif_nocpy_regs *hif_nocpy;
extern volatile uint8_t *lmem;
extern volatile struct tmu_csr_regs *tmu_csr;
extern volatile struct util_csr_regs *util_csr;
uint32_t bmu_alloc(volatile struct bmu_regs *bmu);
void bmu_disable(volatile struct bmu_regs *bmu);
void bmu_dump_regs(volatile struct bmu_regs *bmu);
int bmu_dump(unsigned int bmuno);
void bmu_enable(volatile struct bmu_regs *bmu);
void bmu_free(volatile struct bmu_regs *bmu, uint32_t addr);
void bmu_init(volatile struct bmu_regs *bmu, uint32_t base, uint16_t num,
uint16_t log2_len);
bool bmu_is_enabled(volatile struct bmu_regs *bmu);
void bmu_reset(volatile struct bmu_regs *bmu);
void bmu1_init(void);
void bmu2_init(void);
void emac_dump_regs(volatile struct emac_regs *emac);
int emac_dump(unsigned int emacno);
void emac_init(volatile struct emac_regs *emac);
void gpi_disable(volatile struct gpi_regs *gpi);
void gpi_dump_regs(volatile struct gpi_regs *gpi);
void gpi_enable(volatile struct gpi_regs *gpi);
void gpi_init(volatile struct gpi_regs *gpi);
bool gpi_is_enabled(volatile struct gpi_regs *gpi);
void gpi_reset(volatile struct gpi_regs *gpi);
int egpi_dump(unsigned int egpino);
int hgpi_dump(void);
void hif_dump_regs(volatile struct hif_regs *hif);
void hif_dump(void);
void hif_init_rx_bds(void);
void hif_init_tx_bds(void);
void hif_nocpy_dump_regs(volatile struct hif_nocpy_regs *hif);
void hif_nocpy_dump(void);
void hif_nocpy_init(void);
void hif_rx_ack_bd(volatile struct hif_desc *bd);
#endif