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