Fix common misspellings
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / cris / include / arch-v32 / arch / hwregs / iop / Makefile
CommitLineData
51533b61
MS
1# $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $
2# Makefile to generate or copy the latest register definitions
3# and related datastructures and helpermacros.
25985edc 4# The official place for these files is probably at:
51533b61
MS
5RELEASE ?= r1_alfa5
6IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/
7
8IOPROCDIR = /n/asic/design/io/io_proc/rtl
9
10IOPROCINCL_FILES =
11IOPROCINCL_FILES2=
12IOPROCINCL_FILES += iop_crc_par_defs.h
13IOPROCINCL_FILES += iop_dmc_in_defs.h
14IOPROCINCL_FILES += iop_dmc_out_defs.h
15IOPROCINCL_FILES += iop_fifo_in_defs.h
16IOPROCINCL_FILES += iop_fifo_in_xtra_defs.h
17IOPROCINCL_FILES += iop_fifo_out_defs.h
18IOPROCINCL_FILES += iop_fifo_out_xtra_defs.h
19IOPROCINCL_FILES += iop_mpu_defs.h
20IOPROCINCL_FILES2+= iop_mpu_macros.h
21IOPROCINCL_FILES2+= iop_reg_space.h
22IOPROCINCL_FILES += iop_sap_in_defs.h
23IOPROCINCL_FILES += iop_sap_out_defs.h
24IOPROCINCL_FILES += iop_scrc_in_defs.h
25IOPROCINCL_FILES += iop_scrc_out_defs.h
26IOPROCINCL_FILES += iop_spu_defs.h
27# in guiness/
28IOPROCINCL_FILES += iop_sw_cfg_defs.h
29IOPROCINCL_FILES += iop_sw_cpu_defs.h
30IOPROCINCL_FILES += iop_sw_mpu_defs.h
31IOPROCINCL_FILES += iop_sw_spu_defs.h
32#
33IOPROCINCL_FILES += iop_timer_grp_defs.h
34IOPROCINCL_FILES += iop_trigger_grp_defs.h
35# in guiness/
36IOPROCINCL_FILES += iop_version_defs.h
37
38IOPROCASMINCL_FILES = $(patsubst %_defs.h,%_defs_asm.h,$(IOPROCINCL_FILES))
39IOPROCASMINCL_FILES+= iop_reg_space_asm.h
40
41
42IOPROCREGDESC =
43IOPROCREGDESC += $(IOPROCDIR)/iop_crc_par.r
44#IOPROCREGDESC += $(IOPROCDIR)/iop_crc_ser.r
45IOPROCREGDESC += $(IOPROCDIR)/iop_dmc_in.r
46IOPROCREGDESC += $(IOPROCDIR)/iop_dmc_out.r
47IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_in.r
48IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_in_xtra.r
49IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_out.r
50IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_out_xtra.r
51IOPROCREGDESC += $(IOPROCDIR)/iop_mpu.r
52IOPROCREGDESC += $(IOPROCDIR)/iop_sap_in.r
53IOPROCREGDESC += $(IOPROCDIR)/iop_sap_out.r
54IOPROCREGDESC += $(IOPROCDIR)/iop_scrc_in.r
55IOPROCREGDESC += $(IOPROCDIR)/iop_scrc_out.r
56IOPROCREGDESC += $(IOPROCDIR)/iop_spu.r
57IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_cfg.r
58IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_cpu.r
59IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_mpu.r
60IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_spu.r
61IOPROCREGDESC += $(IOPROCDIR)/iop_timer_grp.r
62IOPROCREGDESC += $(IOPROCDIR)/iop_trigger_grp.r
63IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_version.r
64
65
66RDES2C = /n/asic/bin/rdes2c
67RDES2C = /n/asic/design/tools/rdesc/rdes2c
68RDES2INTR = /n/asic/design/tools/rdesc/rdes2intr
69RDES2TXT = /n/asic/design/tools/rdesc/rdes2txt
70
71## all - Just print help - you probably want to do 'make gen'
72all: help
73
74## help - This help
75help:
76 @grep '^## ' Makefile
77
78## gen - Generate include files
79gen: $(IOPROCINCL_FILES) $(IOPROCINCL_FILES2) $(IOPROCASMINCL_FILES)
80 echo "INCL: $(IOPROCINCL_FILES)"
81 echo "INCL2: $(IOPROCINCL_FILES2)"
82 echo "ASMINCL: $(IOPROCASMINCL_FILES)"
83
84# From the official location...
85iop_reg_space.h: $(IOPOFFICIAL_INCDIR)/iop_reg_space.h
86 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
87iop_mpu_macros.h: $(IOPOFFICIAL_INCDIR)/iop_mpu_macros.h
88 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
89
90## copy - Copy files from official location
91copy:
92 @echo "## Copying and fixing iop files ##"
93 @for HFILE in $(IOPROCINCL_FILES); do \
94 echo " $$HFILE"; \
95 cat $(IOPOFFICIAL_INCDIR)$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
96 done
97 @for HFILE in $(IOPROCINCL_FILES2); do \
98 echo " $$HFILE"; \
99 cat $(IOPOFFICIAL_INCDIR)$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
100 done
101 @echo "## Copying and fixing iop asm files ##"
102 @for HFILE in $(IOPROCASMINCL_FILES); do \
103 echo " $$HFILE"; \
104 cat $(IOPOFFICIAL_INCDIR)asm/$$HFILE | sed -e 's/\$$Id\:/id\:/g' > asm/$$HFILE; \
105 done
106
107# I/O processor files:
108## iop - Generate I/O processor include files
109iop: $(IOPROCINCL_FILES) $(IOPROCINCL_FILES2) $(IOPROCASMINCL_FILES)
110iop_sw_%_defs.h: $(IOPROCDIR)/guinness/iop_sw_%.r
111 $(RDES2C) $<
112iop_version_defs.h: $(IOPROCDIR)/guinness/iop_version.r
113 $(RDES2C) $<
114%_defs.h: $(IOPROCDIR)/%.r
115 $(RDES2C) $<
116%_defs_asm.h: $(IOPROCDIR)/%.r
117 $(RDES2C) -asm $<
118iop_version_defs_asm.h: $(IOPROCDIR)/guinness/iop_version.r
119 $(RDES2C) -asm $<
120
121## doc - Generate .axw files from register description.
122doc: $(IOPROCREGDESC)
123 for RDES in $^; do \
124 $(RDES2TXT) $$RDES; \
125 done
126
127.PHONY: axw
128## %.axw - Generate the specified .axw file (doesn't work for all files
129## due to inconsistent naming of .r files.
130%.axw: axw
131 @for RDES in $(IOPROCREGDESC); do \
132 if echo "$$RDES" | grep $* ; then \
133 $(RDES2TXT) $$RDES; \
134 fi \
135 done
136
137.PHONY: clean
138## clean - Remove .h files and .axw files.
139clean:
140 rm -rf $(IOPROCINCL_FILES) *.axw
141
142.PHONY: cleandoc
143## cleandoc - Remove .axw files.
144cleandoc:
145 rm -rf *.axw
146