diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:05 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:05 -0400 |
commit | 7c4b4773b9b6c440837e5a479204d7bd1b804a43 (patch) | |
tree | 301d6fa8994fd27002b5c7a80edfd8cb1258c225 /arch/mips | |
parent | e5d77754c5e1a54f9eb61c03085d7932a0b6b738 (diff) |
[MIPS] Sibyte: cleanup static inline forward declarations.
In fact there are no foward declarations at all needed when moving things
into the right order.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/sibyte/bcm1480/setup.c | 78 | ||||
-rw-r--r-- | arch/mips/sibyte/sb1250/setup.c | 74 |
2 files changed, 76 insertions, 76 deletions
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c index 7e1aa348b8e0..05ed92c92b69 100644 --- a/arch/mips/sibyte/bcm1480/setup.c +++ b/arch/mips/sibyte/bcm1480/setup.c | |||
@@ -43,16 +43,49 @@ static unsigned int part_type; | |||
43 | static char *soc_str; | 43 | static char *soc_str; |
44 | static char *pass_str; | 44 | static char *pass_str; |
45 | 45 | ||
46 | static inline int setup_bcm1x80_bcm1x55(void); | 46 | static int __init setup_bcm1x80_bcm1x55(void) |
47 | { | ||
48 | int ret = 0; | ||
49 | |||
50 | switch (soc_pass) { | ||
51 | case K_SYS_REVISION_BCM1480_S0: | ||
52 | periph_rev = 1; | ||
53 | pass_str = "S0 (pass1)"; | ||
54 | break; | ||
55 | case K_SYS_REVISION_BCM1480_A1: | ||
56 | periph_rev = 1; | ||
57 | pass_str = "A1 (pass1)"; | ||
58 | break; | ||
59 | case K_SYS_REVISION_BCM1480_A2: | ||
60 | periph_rev = 1; | ||
61 | pass_str = "A2 (pass1)"; | ||
62 | break; | ||
63 | case K_SYS_REVISION_BCM1480_A3: | ||
64 | periph_rev = 1; | ||
65 | pass_str = "A3 (pass1)"; | ||
66 | break; | ||
67 | case K_SYS_REVISION_BCM1480_B0: | ||
68 | periph_rev = 1; | ||
69 | pass_str = "B0 (pass2)"; | ||
70 | break; | ||
71 | default: | ||
72 | printk("Unknown %s rev %x\n", soc_str, soc_pass); | ||
73 | periph_rev = 1; | ||
74 | pass_str = "Unknown Revision"; | ||
75 | break; | ||
76 | } | ||
77 | |||
78 | return ret; | ||
79 | } | ||
47 | 80 | ||
48 | /* Setup code likely to be common to all SiByte platforms */ | 81 | /* Setup code likely to be common to all SiByte platforms */ |
49 | 82 | ||
50 | static inline int sys_rev_decode(void) | 83 | static int __init sys_rev_decode(void) |
51 | { | 84 | { |
52 | int ret = 0; | 85 | int ret = 0; |
53 | 86 | ||
54 | switch (soc_type) { | 87 | switch (soc_type) { |
55 | case K_SYS_SOC_TYPE_BCM1x80: | 88 | case K_SYS_SOC_TYPE_BCM1x80: |
56 | if (part_type == K_SYS_PART_BCM1480) | 89 | if (part_type == K_SYS_PART_BCM1480) |
57 | soc_str = "BCM1480"; | 90 | soc_str = "BCM1480"; |
58 | else if (part_type == K_SYS_PART_BCM1280) | 91 | else if (part_type == K_SYS_PART_BCM1280) |
@@ -62,7 +95,7 @@ static inline int sys_rev_decode(void) | |||
62 | ret = setup_bcm1x80_bcm1x55(); | 95 | ret = setup_bcm1x80_bcm1x55(); |
63 | break; | 96 | break; |
64 | 97 | ||
65 | case K_SYS_SOC_TYPE_BCM1x55: | 98 | case K_SYS_SOC_TYPE_BCM1x55: |
66 | if (part_type == K_SYS_PART_BCM1455) | 99 | if (part_type == K_SYS_PART_BCM1455) |
67 | soc_str = "BCM1455"; | 100 | soc_str = "BCM1455"; |
68 | else if (part_type == K_SYS_PART_BCM1255) | 101 | else if (part_type == K_SYS_PART_BCM1255) |
@@ -72,49 +105,16 @@ static inline int sys_rev_decode(void) | |||
72 | ret = setup_bcm1x80_bcm1x55(); | 105 | ret = setup_bcm1x80_bcm1x55(); |
73 | break; | 106 | break; |
74 | 107 | ||
75 | default: | 108 | default: |
76 | printk("Unknown part type %x\n", part_type); | 109 | printk("Unknown part type %x\n", part_type); |
77 | ret = 1; | 110 | ret = 1; |
78 | break; | 111 | break; |
79 | } | 112 | } |
80 | return ret; | ||
81 | } | ||
82 | 113 | ||
83 | static inline int setup_bcm1x80_bcm1x55(void) | ||
84 | { | ||
85 | int ret = 0; | ||
86 | |||
87 | switch (soc_pass) { | ||
88 | case K_SYS_REVISION_BCM1480_S0: | ||
89 | periph_rev = 1; | ||
90 | pass_str = "S0 (pass1)"; | ||
91 | break; | ||
92 | case K_SYS_REVISION_BCM1480_A1: | ||
93 | periph_rev = 1; | ||
94 | pass_str = "A1 (pass1)"; | ||
95 | break; | ||
96 | case K_SYS_REVISION_BCM1480_A2: | ||
97 | periph_rev = 1; | ||
98 | pass_str = "A2 (pass1)"; | ||
99 | break; | ||
100 | case K_SYS_REVISION_BCM1480_A3: | ||
101 | periph_rev = 1; | ||
102 | pass_str = "A3 (pass1)"; | ||
103 | break; | ||
104 | case K_SYS_REVISION_BCM1480_B0: | ||
105 | periph_rev = 1; | ||
106 | pass_str = "B0 (pass2)"; | ||
107 | break; | ||
108 | default: | ||
109 | printk("Unknown %s rev %x\n", soc_str, soc_pass); | ||
110 | periph_rev = 1; | ||
111 | pass_str = "Unknown Revision"; | ||
112 | break; | ||
113 | } | ||
114 | return ret; | 114 | return ret; |
115 | } | 115 | } |
116 | 116 | ||
117 | void bcm1480_setup(void) | 117 | void __init bcm1480_setup(void) |
118 | { | 118 | { |
119 | uint64_t sys_rev; | 119 | uint64_t sys_rev; |
120 | int plldiv; | 120 | int plldiv; |
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index 2d5c6d8b41f2..0444da1e23c2 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -40,43 +40,6 @@ static char *soc_str; | |||
40 | static char *pass_str; | 40 | static char *pass_str; |
41 | static unsigned int war_pass; /* XXXKW don't overload PASS defines? */ | 41 | static unsigned int war_pass; /* XXXKW don't overload PASS defines? */ |
42 | 42 | ||
43 | static inline int setup_bcm1250(void); | ||
44 | static inline int setup_bcm112x(void); | ||
45 | |||
46 | /* Setup code likely to be common to all SiByte platforms */ | ||
47 | |||
48 | static int __init sys_rev_decode(void) | ||
49 | { | ||
50 | int ret = 0; | ||
51 | |||
52 | war_pass = soc_pass; | ||
53 | switch (soc_type) { | ||
54 | case K_SYS_SOC_TYPE_BCM1250: | ||
55 | case K_SYS_SOC_TYPE_BCM1250_ALT: | ||
56 | case K_SYS_SOC_TYPE_BCM1250_ALT2: | ||
57 | soc_str = "BCM1250"; | ||
58 | ret = setup_bcm1250(); | ||
59 | break; | ||
60 | case K_SYS_SOC_TYPE_BCM1120: | ||
61 | soc_str = "BCM1120"; | ||
62 | ret = setup_bcm112x(); | ||
63 | break; | ||
64 | case K_SYS_SOC_TYPE_BCM1125: | ||
65 | soc_str = "BCM1125"; | ||
66 | ret = setup_bcm112x(); | ||
67 | break; | ||
68 | case K_SYS_SOC_TYPE_BCM1125H: | ||
69 | soc_str = "BCM1125H"; | ||
70 | ret = setup_bcm112x(); | ||
71 | break; | ||
72 | default: | ||
73 | printk("Unknown SOC type %x\n", soc_type); | ||
74 | ret = 1; | ||
75 | break; | ||
76 | } | ||
77 | return ret; | ||
78 | } | ||
79 | |||
80 | static int __init setup_bcm1250(void) | 43 | static int __init setup_bcm1250(void) |
81 | { | 44 | { |
82 | int ret = 0; | 45 | int ret = 0; |
@@ -120,6 +83,7 @@ static int __init setup_bcm1250(void) | |||
120 | } | 83 | } |
121 | break; | 84 | break; |
122 | } | 85 | } |
86 | |||
123 | return ret; | 87 | return ret; |
124 | } | 88 | } |
125 | 89 | ||
@@ -158,6 +122,42 @@ static int __init setup_bcm112x(void) | |||
158 | printk("Unknown %s rev %x\n", soc_str, soc_pass); | 122 | printk("Unknown %s rev %x\n", soc_str, soc_pass); |
159 | ret = 1; | 123 | ret = 1; |
160 | } | 124 | } |
125 | |||
126 | return ret; | ||
127 | } | ||
128 | |||
129 | /* Setup code likely to be common to all SiByte platforms */ | ||
130 | |||
131 | static int __init sys_rev_decode(void) | ||
132 | { | ||
133 | int ret = 0; | ||
134 | |||
135 | war_pass = soc_pass; | ||
136 | switch (soc_type) { | ||
137 | case K_SYS_SOC_TYPE_BCM1250: | ||
138 | case K_SYS_SOC_TYPE_BCM1250_ALT: | ||
139 | case K_SYS_SOC_TYPE_BCM1250_ALT2: | ||
140 | soc_str = "BCM1250"; | ||
141 | ret = setup_bcm1250(); | ||
142 | break; | ||
143 | case K_SYS_SOC_TYPE_BCM1120: | ||
144 | soc_str = "BCM1120"; | ||
145 | ret = setup_bcm112x(); | ||
146 | break; | ||
147 | case K_SYS_SOC_TYPE_BCM1125: | ||
148 | soc_str = "BCM1125"; | ||
149 | ret = setup_bcm112x(); | ||
150 | break; | ||
151 | case K_SYS_SOC_TYPE_BCM1125H: | ||
152 | soc_str = "BCM1125H"; | ||
153 | ret = setup_bcm112x(); | ||
154 | break; | ||
155 | default: | ||
156 | printk("Unknown SOC type %x\n", soc_type); | ||
157 | ret = 1; | ||
158 | break; | ||
159 | } | ||
160 | |||
161 | return ret; | 161 | return ret; |
162 | } | 162 | } |
163 | 163 | ||