aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/arch-v32/hwregs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-cris/arch-v32/hwregs/Makefile')
-rw-r--r--include/asm-cris/arch-v32/hwregs/Makefile187
1 files changed, 187 insertions, 0 deletions
diff --git a/include/asm-cris/arch-v32/hwregs/Makefile b/include/asm-cris/arch-v32/hwregs/Makefile
new file mode 100644
index 000000000000..c9160f9949a9
--- /dev/null
+++ b/include/asm-cris/arch-v32/hwregs/Makefile
@@ -0,0 +1,187 @@
1# $Id: Makefile,v 1.8 2004/01/07 21:16:18 johana Exp $
2# Makefile to generate or copy the latest register definitions
3# and related datastructures and helpermacros.
4# The offical place for these files is at:
5RELEASE ?= r1_alfa5
6OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/
7
8# which is updated on each new release.
9INCL_ASMFILES =
10INCL_FILES = ata_defs.h
11INCL_FILES += bif_core_defs.h
12INCL_ASMFILES += bif_core_defs_asm.h
13INCL_FILES += bif_slave_defs.h
14#INCL_FILES += bif_slave_ext_defs.h
15INCL_FILES += config_defs.h
16INCL_ASMFILES += config_defs_asm.h
17INCL_FILES += cpu_vect.h
18#INCL_FILES += cris_defs.h
19#INCL_FILES += cris_supp_reg.h # In handcrafted supp_reg.h
20INCL_FILES += dma.h
21INCL_FILES += dma_defs.h
22INCL_FILES += eth_defs.h
23INCL_FILES += extmem_defs.h
24INCL_FILES += gio_defs.h
25INCL_ASMFILES += gio_defs_asm.h
26INCL_FILES += intr_vect.h
27INCL_FILES += intr_vect_defs.h
28INCL_ASMFILES += intr_vect_defs_asm.h
29INCL_FILES += marb_bp_defs.h
30INCL_FILES += marb_defs.h
31INCL_ASMFILES += mmu_defs_asm.h
32#INCL_FILES += mmu_supp_reg.h # In handcrafted supp_reg.h
33#INCL_FILES += par_defs.h # No useful content
34INCL_FILES += pinmux_defs.h
35INCL_FILES += reg_map.h
36INCL_ASMFILES += reg_map_asm.h
37INCL_FILES += reg_rdwr.h
38INCL_FILES += ser_defs.h
39#INCL_FILES += spec_reg.h # In handcrafted supp_reg.h
40INCL_FILES += sser_defs.h
41INCL_FILES += strcop_defs.h
42#INCL_FILES += strcop.h # Where is this?
43INCL_FILES += strmux_defs.h
44#INCL_FILES += supp_reg.h # Handcrafted instead
45INCL_FILES += timer_defs.h
46
47REGDESC =
48REGDESC += $(BASEDIR)/io/ata/rtl/ata_regs.r
49REGDESC += $(BASEDIR)/io/bif/rtl/bif_core_regs.r
50REGDESC += $(BASEDIR)/io/bif/rtl/bif_slave_regs.r
51#REGDESC += $(BASEDIR)/io/bif/sw/bif_slave_ext_regs.r
52REGDESC += $(DESIGNDIR)/top/rtl/config_regs.r
53REGDESC += $(BASEDIR)/mod/dma_common/rtl/dma_regdes.r
54REGDESC += $(BASEDIR)/io/eth/rtl/eth_regs.r
55REGDESC += $(BASEDIR)/io/bif/mod/extmem/extmem_regs.r
56REGDESC += $(DESIGNDIR)/gio/rtl/gio_regs.r
57REGDESC += $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
58REGDESC += $(BASEDIR)/core/memarb/rtl/guinness/marb_top.r
59REGDESC += $(BASEDIR)/core/cpu/mmu/doc/mmu_regs.r
60#REGDESC += $(BASEDIR)/io/par_port/rtl/par_regs.r
61REGDESC += $(BASEDIR)/io/pinmux/rtl/guinness/pinmux_regs.r
62REGDESC += $(BASEDIR)/io/ser/rtl/ser_regs.r
63REGDESC += $(BASEDIR)/core/strcop/rtl/strcop_regs.r
64REGDESC += $(BASEDIR)/io/strmux/rtl/guinness/strmux_regs.r
65REGDESC += $(BASEDIR)/io/timer/rtl/timer_regs.r
66#REGDESC += $(BASEDIR)/io/usb/usb1_1/rtl/usb_regs.r
67
68
69BASEDIR = /n/asic/design
70DESIGNDIR = /n/asic/projects/guinness/design
71RDES2C = /n/asic/bin/rdes2c
72RDES2C = /n/asic/design/tools/rdesc/rdes2c
73RDES2INTR = /n/asic/design/tools/rdesc/rdes2intr
74RDES2TXT = /n/asic/design/tools/rdesc/rdes2txt
75
76## all - Just print help - you probably want to do 'make gen'
77all: help
78
79# Disable implicit rule that may generate deleted files from RCS/ directory.
80%.r:
81
82%.h:
83
84## help - This help
85help:
86 @grep '^## ' Makefile
87
88## gen - Generate include files
89gen: $(INCL_FILES) $(INCL_ASMFILES)
90
91ata_defs.h: $(BASEDIR)/io/ata/rtl/ata_regs.r
92 $(RDES2C) $<
93config_defs.h: $(DESIGNDIR)/top/rtl/config_regs.r
94 $(RDES2C) $<
95config_defs_asm.h: $(DESIGNDIR)/top/rtl/config_regs.r
96 $(RDES2C) -asm $<
97# Can't generate cpu_vect.h yet
98#cpu_vect.h: $(DESIGNDIR)/top/rtl/cpu_vect.r # ????
99# $(RDES2INTR) $<
100cpu_vect.h: $(OFFICIAL_INCDIR)cpu_vect.h
101 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
102dma_defs.h: $(BASEDIR)/core/dma/rtl/common/dma_regdes.r
103 $(RDES2C) $<
104$(BASEDIR)/core/dma/sw/dma.h:
105dma.h: $(BASEDIR)/core/dma/sw/dma.h
106 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
107eth_defs.h: $(BASEDIR)/io/eth/rtl/eth_regs.r
108 $(RDES2C) $<
109extmem_defs.h: $(BASEDIR)/io/bif/mod/extmem/extmem_regs.r
110 $(RDES2C) $<
111gio_defs.h: $(DESIGNDIR)/gio/rtl/gio_regs.r
112 $(RDES2C) $<
113intr_vect_defs.h: $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
114 $(RDES2C) $<
115intr_vect_defs_asm.h: $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
116 $(RDES2C) -asm $<
117# Can't generate intr_vect.h yet
118#intr_vect.h: $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
119# $(RDES2INTR) $<
120intr_vect.h: $(OFFICIAL_INCDIR)intr_vect.h
121 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
122mmu_defs_asm.h: $(BASEDIR)/core/cpu/mmu/doc/mmu_regs.r
123 $(RDES2C) -asm $<
124par_defs.h: $(BASEDIR)/io/par_port/rtl/par_regs.r
125 $(RDES2C) $<
126
127# From /n/asic/projects/guinness/design/
128reg_map.h: $(DESIGNDIR)/top/rtl/global.rmap $(DESIGNDIR)/top/mod/modreg.rmap
129 $(RDES2C) -base 0xb0000000 $^
130reg_map_asm.h: $(DESIGNDIR)/top/rtl/global.rmap $(DESIGNDIR)/top/mod/modreg.rmap
131 $(RDES2C) -base 0xb0000000 -asm -outfile $@ $^
132
133reg_rdwr.h: $(DESIGNDIR)/top/sw/include/reg_rdwr.h
134 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
135
136ser_defs.h: $(BASEDIR)/io/ser/rtl/ser_regs.r
137 $(RDES2C) $<
138strcop_defs.h: $(BASEDIR)/core/strcop/rtl/strcop_regs.r
139 $(RDES2C) $<
140strcop.h: $(BASEDIR)/core/strcop/rtl/strcop.h
141 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
142strmux_defs.h: $(BASEDIR)/io/strmux/rtl/guinness/strmux_regs.r
143 $(RDES2C) $<
144timer_defs.h: $(BASEDIR)/io/timer/rtl/timer_regs.r
145 $(RDES2C) $<
146usb_defs.h: $(BASEDIR)/io/usb/usb1_1/rtl/usb_regs.r
147 $(RDES2C) $<
148
149## copy - Copy files from official location
150copy:
151 @for HFILE in $(INCL_FILES); do \
152 echo " $$HFILE"; \
153 cat $(OFFICIAL_INCDIR)$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
154 done
155 @for HFILE in $(INCL_ASMFILES); do \
156 echo " $$HFILE"; \
157 cat $(OFFICIAL_INCDIR)asm/$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
158 done
159## ls_official - List official location
160ls_official:
161 (cd $(OFFICIAL_INCDIR); ls -l *.h )
162
163## diff_official - Diff current directory with official location
164diff_official:
165 diff . $(OFFICIAL_INCDIR)
166
167## doc - Generate .axw files from register description.
168doc: $(REGDESC)
169 for RDES in $^; do \
170 $(RDES2TXT) $$RDES; \
171 done
172
173.PHONY: axw
174## %.axw - Generate the specified .axw file (doesn't work for all files
175## due to inconsistent naming ir .r files.
176%.axw: axw
177 @for RDES in $(REGDESC); do \
178 if echo "$$RDES" | grep $* ; then \
179 $(RDES2TXT) $$RDES; \
180 fi \
181 done
182
183.PHONY: clean
184## clean - Remove .h files and .axw files.
185clean:
186 rm -rf $(INCL_FILES) *.axw
187