summaryrefslogtreecommitdiffstats
path: root/hw/sh7750_regnames.c
blob: 5fcb0d6cca1777ce311af705f4dffdb11f04b470 (plain) (blame)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#include "vl.h"
#include "sh7750_regs.h"

#define REGNAME(r) {r, #r},

typedef struct {
    uint32_t regaddr;
    const char *regname;
} regname_t;

static regname_t regnames[] = {
    REGNAME(SH7750_PTEH_A7)
	REGNAME(SH7750_PTEL_A7)
	REGNAME(SH7750_PTEA_A7)
	REGNAME(SH7750_TTB_A7)
	REGNAME(SH7750_TEA_A7)
	REGNAME(SH7750_MMUCR_A7)
	REGNAME(SH7750_CCR_A7)
	REGNAME(SH7750_QACR0_A7)
	REGNAME(SH7750_QACR1_A7)
	REGNAME(SH7750_TRA_A7)
	REGNAME(SH7750_EXPEVT_A7)
	REGNAME(SH7750_INTEVT_A7)
	REGNAME(SH7750_STBCR_A7)
	REGNAME(SH7750_STBCR2_A7)
	REGNAME(SH7750_FRQCR_A7)
	REGNAME(SH7750_WTCNT_A7)
	REGNAME(SH7750_WTCSR_A7)
	REGNAME(SH7750_R64CNT_A7)
	REGNAME(SH7750_RSECCNT_A7)
	REGNAME(SH7750_RMINCNT_A7)
	REGNAME(SH7750_RHRCNT_A7)
	REGNAME(SH7750_RWKCNT_A7)
	REGNAME(SH7750_RDAYCNT_A7)
	REGNAME(SH7750_RMONCNT_A7)
	REGNAME(SH7750_RYRCNT_A7)
	REGNAME(SH7750_RSECAR_A7)
	REGNAME(SH7750_RMINAR_A7)
	REGNAME(SH7750_RHRAR_A7)
	REGNAME(SH7750_RWKAR_A7)
	REGNAME(SH7750_RDAYAR_A7)
	REGNAME(SH7750_RMONAR_A7)
	REGNAME(SH7750_RCR1_A7)
	REGNAME(SH7750_RCR2_A7)
	REGNAME(SH7750_TOCR_A7)
	REGNAME(SH7750_TSTR_A7)
	REGNAME(SH7750_TCOR0_A7)
	REGNAME(SH7750_TCOR1_A7)
	REGNAME(SH7750_TCOR2_A7)
	REGNAME(SH7750_TCNT0_A7)
	REGNAME(SH7750_TCNT1_A7)
	REGNAME(SH7750_TCNT2_A7)
	REGNAME(SH7750_TCR0_A7)
	REGNAME(SH7750_TCR1_A7)
	REGNAME(SH7750_TCR2_A7)
	REGNAME(SH7750_TCPR2_A7)
	REGNAME(SH7750_BCR1_A7)
	REGNAME(SH7750_BCR2_A7)
	REGNAME(SH7750_WCR1_A7)
	REGNAME(SH7750_WCR2_A7)
	REGNAME(SH7750_WCR3_A7)
	REGNAME(SH7750_MCR_A7)
	REGNAME(SH7750_PCR_A7)
	REGNAME(SH7750_RTCSR_A7)
	REGNAME(SH7750_RTCNT_A7)
	REGNAME(SH7750_RTCOR_A7)
	REGNAME(SH7750_RFCR_A7)
	REGNAME(SH7750_SAR0_A7)
	REGNAME(SH7750_SAR1_A7)
	REGNAME(SH7750_SAR2_A7)
	REGNAME(SH7750_SAR3_A7)
	REGNAME(SH7750_DAR0_A7)
	REGNAME(SH7750_DAR1_A7)
	REGNAME(SH7750_DAR2_A7)
	REGNAME(SH7750_DAR3_A7)
	REGNAME(SH7750_DMATCR0_A7)
	REGNAME(SH7750_DMATCR1_A7)
	REGNAME(SH7750_DMATCR2_A7)
	REGNAME(SH7750_DMATCR3_A7)
	REGNAME(SH7750_CHCR0_A7)
	REGNAME(SH7750_CHCR1_A7)
	REGNAME(SH7750_CHCR2_A7)
	REGNAME(SH7750_CHCR3_A7)
	REGNAME(SH7750_DMAOR_A7)
	REGNAME(SH7750_SCRDR1_A7)
	REGNAME(SH7750_SCRDR2_A7)
	REGNAME(SH7750_SCTDR1_A7)
	REGNAME(SH7750_SCTDR2_A7)
	REGNAME(SH7750_SCSMR1_A7)
	REGNAME(SH7750_SCSMR2_A7)
	REGNAME(SH7750_SCSCR1_A7)
	REGNAME(SH7750_SCSCR2_A7)
	REGNAME(SH7750_SCSSR1_A7)
	REGNAME(SH7750_SCSFR2_A7)
	REGNAME(SH7750_SCSPTR1_A7)
	REGNAME(SH7750_SCSPTR2_A7)
	REGNAME(SH7750_SCBRR1_A7)
	REGNAME(SH7750_SCBRR2_A7)
	REGNAME(SH7750_SCFCR2_A7)
	REGNAME(SH7750_SCFDR2_A7)
	REGNAME(SH7750_SCLSR2_A7)
	REGNAME(SH7750_SCSCMR1_A7)
	REGNAME(SH7750_PCTRA_A7)
	REGNAME(SH7750_PDTRA_A7)
	REGNAME(SH7750_PCTRB_A7)
	REGNAME(SH7750_PDTRB_A7)
	REGNAME(SH7750_GPIOIC_A7)
	REGNAME(SH7750_ICR_A7)
	REGNAME(SH7750_IPRA_A7)
	REGNAME(SH7750_IPRB_A7)
	REGNAME(SH7750_IPRC_A7)
	REGNAME(SH7750_BCR3_A7)
	REGNAME(SH7750_BCR4_A7)
	REGNAME(SH7750_PRECHARGE0_A7)
    REGNAME(SH7750_PRECHARGE1_A7) {(uint32_t) - 1, 0}
};

const char *regname(uint32_t addr)
{
    unsigned int i;

    for (i = 0; regnames[i].regaddr != (uint32_t) - 1; i++) {
	if (regnames[i].regaddr == addr)
	    return regnames[i].regname;
    }

    return "<unknown reg>";
}