Root/
Source at commit 0de2b2b3be81048189a32f7a3d3ba0ba9ec817b6 created 11 years 11 months ago. By Maarten ter Huurne, MIPS: JZ4740: Fixed value for round robin constant. | |
---|---|
1 | #!/bin/awk |
2 | # |
3 | # Awk script to generate include/generated/machtypes.h |
4 | # Heavily based on arch/arm/tools/gen-mach-types |
5 | # |
6 | BEGIN { nr = 0 } |
7 | /^#/ { next } |
8 | /^[ ]*$/ { next } |
9 | |
10 | NF == 2 { |
11 | mach[nr] = $1; |
12 | config[nr] = "CONFIG_"$2; |
13 | nr++; |
14 | } |
15 | |
16 | END { |
17 | printf("/*\n"); |
18 | printf(" * Automagically generated, don't touch.\n"); |
19 | printf(" */\n"); |
20 | printf("#ifndef __ASM_SH_MACHTYPES_H\n"); |
21 | printf("#define __ASM_SH_MACHTYPES_H\n"); |
22 | printf("\n"); |
23 | printf("/*\n"); |
24 | printf(" * We'll use the following MACH_xxx defs for placeholders for the time\n"); |
25 | printf(" * being .. these will all go away once sh_machtype is assigned per-board.\n"); |
26 | printf(" *\n"); |
27 | printf(" * For now we leave things the way they are for backwards compatibility.\n"); |
28 | printf(" */\n"); |
29 | printf("\n"); |
30 | printf("/* Mach types */\n"); |
31 | |
32 | for (i = 0; i < nr; i++) { |
33 | printf("#ifdef %s\n", config[i]); |
34 | printf(" #define MACH_%s\t\t1\n", mach[i]); |
35 | printf("#else\n"); |
36 | printf(" #define MACH_%s\t\t0\n", mach[i]); |
37 | printf("#endif\n"); |
38 | } |
39 | |
40 | printf("\n"); |
41 | printf("/* Machtype checks */\n"); |
42 | for (i = 0; i < nr; i++) |
43 | printf("#define mach_is_%s()\t\t\t(MACH_%s)\n", |
44 | tolower(mach[i]), mach[i]); |
45 | printf("\n"); |
46 | printf("#endif /* __ASM_SH_MACHTYPES_H */\n"); |
47 | } |
48 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9