diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 07:04:37 -0400 |
commit | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (patch) | |
tree | 869d633803eb7c429624d3bd16a6117816849763 /arch/mips/ar7 | |
parent | ddd559b13f6d2fe3ad68c4b3f5235fd3c2eae4e3 (diff) | |
parent | b7cfda9fc3d7aa60cffab5367f2a72a4a70060cd (diff) |
Merge branch 'master' into devel
Diffstat (limited to 'arch/mips/ar7')
-rw-r--r-- | arch/mips/ar7/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/ar7/clock.c | 13 | ||||
-rw-r--r-- | arch/mips/ar7/memory.c | 2 | ||||
-rw-r--r-- | arch/mips/ar7/platform.c | 10 | ||||
-rw-r--r-- | arch/mips/ar7/prom.c | 2 | ||||
-rw-r--r-- | arch/mips/ar7/setup.c | 1 |
6 files changed, 8 insertions, 21 deletions
diff --git a/arch/mips/ar7/Makefile b/arch/mips/ar7/Makefile index 7435e44b3964..26bc5da18997 100644 --- a/arch/mips/ar7/Makefile +++ b/arch/mips/ar7/Makefile | |||
@@ -8,3 +8,4 @@ obj-y := \ | |||
8 | platform.o \ | 8 | platform.o \ |
9 | gpio.o \ | 9 | gpio.o \ |
10 | clock.o | 10 | clock.o |
11 | EXTRA_CFLAGS += -Werror | ||
diff --git a/arch/mips/ar7/clock.c b/arch/mips/ar7/clock.c index 27dc6663f2fa..cc65c8eb391b 100644 --- a/arch/mips/ar7/clock.c +++ b/arch/mips/ar7/clock.c | |||
@@ -264,19 +264,6 @@ static void __init tnetd7300_init_clocks(void) | |||
264 | iounmap(bootcr); | 264 | iounmap(bootcr); |
265 | } | 265 | } |
266 | 266 | ||
267 | static int tnetd7200_get_clock(int base, struct tnetd7200_clock *clock, | ||
268 | u32 *bootcr, u32 bus_clock) | ||
269 | { | ||
270 | int divisor = ((readl(&clock->prediv) & 0x1f) + 1) * | ||
271 | ((readl(&clock->postdiv) & 0x1f) + 1); | ||
272 | |||
273 | if (*bootcr & BOOT_PLL_BYPASS) | ||
274 | return base / divisor; | ||
275 | |||
276 | return base * ((readl(&clock->mul) & 0xf) + 1) / divisor; | ||
277 | } | ||
278 | |||
279 | |||
280 | static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock, | 267 | static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock, |
281 | int prediv, int postdiv, int postdiv2, int mul, u32 frequency) | 268 | int prediv, int postdiv, int postdiv2, int mul, u32 frequency) |
282 | { | 269 | { |
diff --git a/arch/mips/ar7/memory.c b/arch/mips/ar7/memory.c index 46fed44825a6..696c723dc6d4 100644 --- a/arch/mips/ar7/memory.c +++ b/arch/mips/ar7/memory.c | |||
@@ -52,7 +52,7 @@ static int __init memsize(void) | |||
52 | size <<= 1; | 52 | size <<= 1; |
53 | } while (size < (64 << 20)); | 53 | } while (size < (64 << 20)); |
54 | 54 | ||
55 | writel(tmpaddr, &addr); | 55 | writel((u32)tmpaddr, &addr); |
56 | 56 | ||
57 | return size; | 57 | return size; |
58 | } | 58 | } |
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 542244961780..2ecab6155932 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/serial_8250.h> | 28 | #include <linux/serial_8250.h> |
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/version.h> | ||
32 | #include <linux/vlynq.h> | 31 | #include <linux/vlynq.h> |
33 | #include <linux/leds.h> | 32 | #include <linux/leds.h> |
34 | #include <linux/string.h> | 33 | #include <linux/string.h> |
@@ -243,13 +242,13 @@ static struct platform_device physmap_flash = { | |||
243 | .num_resources = 1, | 242 | .num_resources = 1, |
244 | }; | 243 | }; |
245 | 244 | ||
246 | static u64 cpmac_dma_mask = DMA_32BIT_MASK; | 245 | static u64 cpmac_dma_mask = DMA_BIT_MASK(32); |
247 | static struct platform_device cpmac_low = { | 246 | static struct platform_device cpmac_low = { |
248 | .id = 0, | 247 | .id = 0, |
249 | .name = "cpmac", | 248 | .name = "cpmac", |
250 | .dev = { | 249 | .dev = { |
251 | .dma_mask = &cpmac_dma_mask, | 250 | .dma_mask = &cpmac_dma_mask, |
252 | .coherent_dma_mask = DMA_32BIT_MASK, | 251 | .coherent_dma_mask = DMA_BIT_MASK(32), |
253 | .platform_data = &cpmac_low_data, | 252 | .platform_data = &cpmac_low_data, |
254 | }, | 253 | }, |
255 | .resource = cpmac_low_res, | 254 | .resource = cpmac_low_res, |
@@ -261,7 +260,7 @@ static struct platform_device cpmac_high = { | |||
261 | .name = "cpmac", | 260 | .name = "cpmac", |
262 | .dev = { | 261 | .dev = { |
263 | .dma_mask = &cpmac_dma_mask, | 262 | .dma_mask = &cpmac_dma_mask, |
264 | .coherent_dma_mask = DMA_32BIT_MASK, | 263 | .coherent_dma_mask = DMA_BIT_MASK(32), |
265 | .platform_data = &cpmac_high_data, | 264 | .platform_data = &cpmac_high_data, |
266 | }, | 265 | }, |
267 | .resource = cpmac_high_res, | 266 | .resource = cpmac_high_res, |
@@ -481,6 +480,7 @@ static void __init detect_leds(void) | |||
481 | static int __init ar7_register_devices(void) | 480 | static int __init ar7_register_devices(void) |
482 | { | 481 | { |
483 | int res; | 482 | int res; |
483 | #ifdef CONFIG_SERIAL_8250 | ||
484 | static struct uart_port uart_port[2]; | 484 | static struct uart_port uart_port[2]; |
485 | 485 | ||
486 | memset(uart_port, 0, sizeof(struct uart_port) * 2); | 486 | memset(uart_port, 0, sizeof(struct uart_port) * 2); |
@@ -512,7 +512,7 @@ static int __init ar7_register_devices(void) | |||
512 | if (res) | 512 | if (res) |
513 | return res; | 513 | return res; |
514 | } | 514 | } |
515 | 515 | #endif /* CONFIG_SERIAL_8250 */ | |
516 | res = platform_device_register(&physmap_flash); | 516 | res = platform_device_register(&physmap_flash); |
517 | if (res) | 517 | if (res) |
518 | return res; | 518 | return res; |
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c index a320bceb2f9d..5ad6f1db6567 100644 --- a/arch/mips/ar7/prom.c +++ b/arch/mips/ar7/prom.c | |||
@@ -144,7 +144,7 @@ static char * __init lookup_psp_var_map(u8 num) | |||
144 | { | 144 | { |
145 | int i; | 145 | int i; |
146 | 146 | ||
147 | for (i = 0; i < sizeof(psp_var_map); i++) | 147 | for (i = 0; i < ARRAY_SIZE(psp_var_map); i++) |
148 | if (psp_var_map[i].num == num) | 148 | if (psp_var_map[i].num == num) |
149 | return psp_var_map[i].value; | 149 | return psp_var_map[i].value; |
150 | 150 | ||
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c index 6ebb5f16d967..39f6b5b96463 100644 --- a/arch/mips/ar7/setup.c +++ b/arch/mips/ar7/setup.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/version.h> | ||
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |