diff options
author | Anton Vorontsov <avorontsov@mvista.com> | 2010-07-08 13:16:16 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-07-11 12:04:06 -0400 |
commit | af71bcfeaaaad92147922282341d394093a4fc9b (patch) | |
tree | 21195287b429f52c270f6d19a54265e3c8a14c77 | |
parent | 2069a6ae19a34d96cc9cb284eb645b165138e03f (diff) |
powerpc/cpm1: Mark micropatch code/data static and __init
This saves runtime memory and fixes lots of sparse warnings like this:
CHECK arch/powerpc/sysdev/micropatch.c
arch/powerpc/sysdev/micropatch.c:27:6: warning: symbol 'patch_2000'
was not declared. Should it be static?
arch/powerpc/sysdev/micropatch.c:146:6: warning: symbol 'patch_2f00'
was not declared. Should it be static?
...
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/include/asm/cpm1.h | 3 | ||||
-rw-r--r-- | arch/powerpc/sysdev/micropatch.c | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/cpm1.h b/arch/powerpc/include/asm/cpm1.h index 81b01192f440..bd07650dca56 100644 --- a/arch/powerpc/include/asm/cpm1.h +++ b/arch/powerpc/include/asm/cpm1.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #ifndef __CPM1__ | 17 | #ifndef __CPM1__ |
18 | #define __CPM1__ | 18 | #define __CPM1__ |
19 | 19 | ||
20 | #include <linux/init.h> | ||
20 | #include <asm/8xx_immap.h> | 21 | #include <asm/8xx_immap.h> |
21 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
22 | #include <asm/cpm.h> | 23 | #include <asm/cpm.h> |
@@ -54,7 +55,7 @@ extern cpm8xx_t __iomem *cpmp; /* Pointer to comm processor */ | |||
54 | 55 | ||
55 | extern void cpm_setbrg(uint brg, uint rate); | 56 | extern void cpm_setbrg(uint brg, uint rate); |
56 | 57 | ||
57 | extern void cpm_load_patch(cpm8xx_t *cp); | 58 | extern void __init cpm_load_patch(cpm8xx_t *cp); |
58 | 59 | ||
59 | extern void cpm_reset(void); | 60 | extern void cpm_reset(void); |
60 | 61 | ||
diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c index 6c56ae902d4c..c0bb76ef7242 100644 --- a/arch/powerpc/sysdev/micropatch.c +++ b/arch/powerpc/sysdev/micropatch.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * also relocates SMC2, but this would require additional changes | 4 | * also relocates SMC2, but this would require additional changes |
5 | * to uart.c, so I am holding off on that for a moment. | 5 | * to uart.c, so I am holding off on that for a moment. |
6 | */ | 6 | */ |
7 | #include <linux/init.h> | ||
7 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
8 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
@@ -25,7 +26,7 @@ | |||
25 | 26 | ||
26 | #ifdef CONFIG_I2C_SPI_UCODE_PATCH | 27 | #ifdef CONFIG_I2C_SPI_UCODE_PATCH |
27 | 28 | ||
28 | uint patch_2000[] = { | 29 | static uint patch_2000[] __initdata = { |
29 | 0x7FFFEFD9, | 30 | 0x7FFFEFD9, |
30 | 0x3FFD0000, | 31 | 0x3FFD0000, |
31 | 0x7FFB49F7, | 32 | 0x7FFB49F7, |
@@ -144,7 +145,7 @@ uint patch_2000[] = { | |||
144 | 0x5F8247F8 | 145 | 0x5F8247F8 |
145 | }; | 146 | }; |
146 | 147 | ||
147 | uint patch_2f00[] = { | 148 | static uint patch_2f00[] __initdata = { |
148 | 0x3E303430, | 149 | 0x3E303430, |
149 | 0x34343737, | 150 | 0x34343737, |
150 | 0xABF7BF9B, | 151 | 0xABF7BF9B, |
@@ -183,7 +184,7 @@ uint patch_2f00[] = { | |||
183 | 184 | ||
184 | #ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH | 185 | #ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH |
185 | 186 | ||
186 | uint patch_2000[] = { | 187 | static uint patch_2000[] __initdata = { |
187 | 0x3fff0000, | 188 | 0x3fff0000, |
188 | 0x3ffd0000, | 189 | 0x3ffd0000, |
189 | 0x3ffb0000, | 190 | 0x3ffb0000, |
@@ -506,7 +507,7 @@ uint patch_2000[] = { | |||
506 | 0x6079e2bb | 507 | 0x6079e2bb |
507 | }; | 508 | }; |
508 | 509 | ||
509 | uint patch_2f00[] = { | 510 | static uint patch_2f00[] __initdata = { |
510 | 0x30303030, | 511 | 0x30303030, |
511 | 0x3e3e3434, | 512 | 0x3e3e3434, |
512 | 0xabbf9b99, | 513 | 0xabbf9b99, |
@@ -573,7 +574,7 @@ uint patch_2f00[] = { | |||
573 | 0xf22f3f23 | 574 | 0xf22f3f23 |
574 | }; | 575 | }; |
575 | 576 | ||
576 | uint patch_2e00[] = { | 577 | static uint patch_2e00[] __initdata = { |
577 | 0x27eeeeee, | 578 | 0x27eeeeee, |
578 | 0xeeeeeeee, | 579 | 0xeeeeeeee, |
579 | 0xeeeeeeee, | 580 | 0xeeeeeeee, |
@@ -599,7 +600,7 @@ uint patch_2e00[] = { | |||
599 | 600 | ||
600 | #ifdef CONFIG_USB_SOF_UCODE_PATCH | 601 | #ifdef CONFIG_USB_SOF_UCODE_PATCH |
601 | 602 | ||
602 | uint patch_2000[] = { | 603 | static uint patch_2000[] __initdata = { |
603 | 0x7fff0000, | 604 | 0x7fff0000, |
604 | 0x7ffd0000, | 605 | 0x7ffd0000, |
605 | 0x7ffb0000, | 606 | 0x7ffb0000, |
@@ -614,15 +615,14 @@ uint patch_2000[] = { | |||
614 | 0x60750000 | 615 | 0x60750000 |
615 | }; | 616 | }; |
616 | 617 | ||
617 | uint patch_2f00[] = { | 618 | static uint patch_2f00[] __initdata = { |
618 | 0x3030304c, | 619 | 0x3030304c, |
619 | 0xcab9e441, | 620 | 0xcab9e441, |
620 | 0xa1aaf220 | 621 | 0xa1aaf220 |
621 | }; | 622 | }; |
622 | #endif | 623 | #endif |
623 | 624 | ||
624 | void | 625 | void __init cpm_load_patch(cpm8xx_t *cp) |
625 | cpm_load_patch(cpm8xx_t *cp) | ||
626 | { | 626 | { |
627 | volatile uint *dp; /* Dual-ported RAM. */ | 627 | volatile uint *dp; /* Dual-ported RAM. */ |
628 | volatile cpm8xx_t *commproc; | 628 | volatile cpm8xx_t *commproc; |