diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-27 07:54:08 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-27 07:54:08 -0400 |
commit | eda3d8f5604860aae1bb9996bb5efc4213778369 (patch) | |
tree | 9d3887d2665bcc5f5abf200758794545c7b2c69b /arch/avr32 | |
parent | 87a9f704658a40940e740b1d73d861667e9164d3 (diff) | |
parent | 8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff) |
Merge commit 'upstream/master'
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/Kconfig | 3 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/Kconfig | 4 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/Makefile | 1 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 78 | ||||
-rw-r--r-- | arch/avr32/kernel/cpu.c | 38 | ||||
-rw-r--r-- | arch/avr32/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/avr32/kernel/stacktrace.c | 1 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 79 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/hsmc.c | 2 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/pio.c | 2 | ||||
-rw-r--r-- | arch/avr32/mm/init.c | 44 | ||||
-rw-r--r-- | arch/avr32/mm/ioremap.c | 1 |
12 files changed, 182 insertions, 73 deletions
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 45d63c986015..7c239a916275 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -10,6 +10,7 @@ config AVR32 | |||
10 | # With EMBEDDED=n, we get lots of stuff automatically selected | 10 | # With EMBEDDED=n, we get lots of stuff automatically selected |
11 | # that we usually don't need on AVR32. | 11 | # that we usually don't need on AVR32. |
12 | select EMBEDDED | 12 | select EMBEDDED |
13 | select HAVE_CLK | ||
13 | select HAVE_OPROFILE | 14 | select HAVE_OPROFILE |
14 | select HAVE_KPROBES | 15 | select HAVE_KPROBES |
15 | help | 16 | help |
@@ -87,7 +88,7 @@ config PLATFORM_AT32AP | |||
87 | select SUBARCH_AVR32B | 88 | select SUBARCH_AVR32B |
88 | select MMU | 89 | select MMU |
89 | select PERFORMANCE_COUNTERS | 90 | select PERFORMANCE_COUNTERS |
90 | select HAVE_GPIO_LIB | 91 | select ARCH_REQUIRE_GPIOLIB |
91 | select GENERIC_ALLOCATOR | 92 | select GENERIC_ALLOCATOR |
92 | 93 | ||
93 | # | 94 | # |
diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig index af90b00100fd..8dc48214f0b7 100644 --- a/arch/avr32/boards/atstk1000/Kconfig +++ b/arch/avr32/boards/atstk1000/Kconfig | |||
@@ -18,6 +18,10 @@ config BOARD_ATSTK1004 | |||
18 | bool "ATSTK1004" | 18 | bool "ATSTK1004" |
19 | select CPU_AT32AP7002 | 19 | select CPU_AT32AP7002 |
20 | 20 | ||
21 | config BOARD_ATSTK1006 | ||
22 | bool "ATSTK1006" | ||
23 | select CPU_AT32AP7000 | ||
24 | |||
21 | endchoice | 25 | endchoice |
22 | 26 | ||
23 | 27 | ||
diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile index beead86462e8..edecee03742d 100644 --- a/arch/avr32/boards/atstk1000/Makefile +++ b/arch/avr32/boards/atstk1000/Makefile | |||
@@ -2,3 +2,4 @@ obj-y += setup.o flash.o | |||
2 | obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o | 2 | obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o |
3 | obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o | 3 | obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o |
4 | obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o | 4 | obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o |
5 | obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o | ||
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index e11659b732fa..14dc5a143695 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ATSTK1002 daughterboard-specific init code | 2 | * ATSTK1002/ATSTK1006 daughterboard-specific init code |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2006 Atmel Corporation | 4 | * Copyright (C) 2005-2007 Atmel Corporation |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -35,6 +35,74 @@ unsigned long at32_board_osc_rates[3] = { | |||
35 | [2] = 12000000, /* 12 MHz on osc1 */ | 35 | [2] = 12000000, /* 12 MHz on osc1 */ |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* | ||
39 | * The ATSTK1006 daughterboard is very similar to the ATSTK1002. Both | ||
40 | * have the AT32AP7000 chip on board; the difference is that the | ||
41 | * STK1006 has 128 MB SDRAM (the STK1002 uses the 8 MB SDRAM chip on | ||
42 | * the STK1000 motherboard) and 256 MB NAND flash (the STK1002 has | ||
43 | * none.) | ||
44 | * | ||
45 | * The RAM difference is handled by the boot loader, so the only | ||
46 | * difference we end up handling here is the NAND flash. | ||
47 | */ | ||
48 | #ifdef CONFIG_BOARD_ATSTK1006 | ||
49 | #include <linux/mtd/partitions.h> | ||
50 | #include <asm/arch/smc.h> | ||
51 | |||
52 | static struct smc_timing nand_timing __initdata = { | ||
53 | .ncs_read_setup = 0, | ||
54 | .nrd_setup = 10, | ||
55 | .ncs_write_setup = 0, | ||
56 | .nwe_setup = 10, | ||
57 | |||
58 | .ncs_read_pulse = 30, | ||
59 | .nrd_pulse = 15, | ||
60 | .ncs_write_pulse = 30, | ||
61 | .nwe_pulse = 15, | ||
62 | |||
63 | .read_cycle = 30, | ||
64 | .write_cycle = 30, | ||
65 | |||
66 | .ncs_read_recover = 0, | ||
67 | .nrd_recover = 15, | ||
68 | .ncs_write_recover = 0, | ||
69 | /* WE# high -> RE# low min 60 ns */ | ||
70 | .nwe_recover = 50, | ||
71 | }; | ||
72 | |||
73 | static struct smc_config nand_config __initdata = { | ||
74 | .bus_width = 1, | ||
75 | .nrd_controlled = 1, | ||
76 | .nwe_controlled = 1, | ||
77 | .nwait_mode = 0, | ||
78 | .byte_write = 0, | ||
79 | .tdf_cycles = 2, | ||
80 | .tdf_mode = 0, | ||
81 | }; | ||
82 | |||
83 | static struct mtd_partition nand_partitions[] = { | ||
84 | { | ||
85 | .name = "main", | ||
86 | .offset = 0x00000000, | ||
87 | .size = MTDPART_SIZ_FULL, | ||
88 | }, | ||
89 | }; | ||
90 | |||
91 | static struct mtd_partition *nand_part_info(int size, int *num_partitions) | ||
92 | { | ||
93 | *num_partitions = ARRAY_SIZE(nand_partitions); | ||
94 | return nand_partitions; | ||
95 | } | ||
96 | |||
97 | struct atmel_nand_data atstk1006_nand_data __initdata = { | ||
98 | .cle = 21, | ||
99 | .ale = 22, | ||
100 | .rdy_pin = GPIO_PIN_PB(30), | ||
101 | .enable_pin = GPIO_PIN_PB(29), | ||
102 | .partition_info = nand_part_info, | ||
103 | }; | ||
104 | #endif | ||
105 | |||
38 | struct eth_addr { | 106 | struct eth_addr { |
39 | u8 addr[6]; | 107 | u8 addr[6]; |
40 | }; | 108 | }; |
@@ -218,6 +286,12 @@ static int __init atstk1002_init(void) | |||
218 | 286 | ||
219 | at32_add_system_devices(); | 287 | at32_add_system_devices(); |
220 | 288 | ||
289 | #ifdef CONFIG_BOARD_ATSTK1006 | ||
290 | smc_set_timing(&nand_config, &nand_timing); | ||
291 | smc_set_configuration(3, &nand_config); | ||
292 | at32_add_device_nand(0, &atstk1006_nand_data); | ||
293 | #endif | ||
294 | |||
221 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 295 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
222 | at32_add_device_usart(1); | 296 | at32_add_device_usart(1); |
223 | #else | 297 | #else |
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index b8409caeb23d..e84faffbbeca 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c | |||
@@ -26,14 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be | 26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be |
27 | * made, we must make sure that the code executes on the correct CPU. | 27 | * made, we must make sure that the code executes on the correct CPU. |
28 | */ | 28 | */ |
29 | static ssize_t show_pc0event(struct sys_device *dev, char *buf) | 29 | static ssize_t show_pc0event(struct sys_device *dev, |
30 | struct sysdev_attribute *attr, char *buf) | ||
30 | { | 31 | { |
31 | unsigned long pccr; | 32 | unsigned long pccr; |
32 | 33 | ||
33 | pccr = sysreg_read(PCCR); | 34 | pccr = sysreg_read(PCCR); |
34 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); | 35 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); |
35 | } | 36 | } |
36 | static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | 37 | static ssize_t store_pc0event(struct sys_device *dev, |
38 | struct sysdev_attribute *attr, const char *buf, | ||
37 | size_t count) | 39 | size_t count) |
38 | { | 40 | { |
39 | unsigned long val; | 41 | unsigned long val; |
@@ -46,15 +48,17 @@ static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | |||
46 | sysreg_write(PCCR, val); | 48 | sysreg_write(PCCR, val); |
47 | return count; | 49 | return count; |
48 | } | 50 | } |
49 | static ssize_t show_pc0count(struct sys_device *dev, char *buf) | 51 | static ssize_t show_pc0count(struct sys_device *dev, |
52 | struct sysdev_attribute *attr, char *buf) | ||
50 | { | 53 | { |
51 | unsigned long pcnt0; | 54 | unsigned long pcnt0; |
52 | 55 | ||
53 | pcnt0 = sysreg_read(PCNT0); | 56 | pcnt0 = sysreg_read(PCNT0); |
54 | return sprintf(buf, "%lu\n", pcnt0); | 57 | return sprintf(buf, "%lu\n", pcnt0); |
55 | } | 58 | } |
56 | static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | 59 | static ssize_t store_pc0count(struct sys_device *dev, |
57 | size_t count) | 60 | struct sysdev_attribute *attr, |
61 | const char *buf, size_t count) | ||
58 | { | 62 | { |
59 | unsigned long val; | 63 | unsigned long val; |
60 | char *endp; | 64 | char *endp; |
@@ -67,14 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | |||
67 | return count; | 71 | return count; |
68 | } | 72 | } |
69 | 73 | ||
70 | static ssize_t show_pc1event(struct sys_device *dev, char *buf) | 74 | static ssize_t show_pc1event(struct sys_device *dev, |
75 | struct sysdev_attribute *attr, char *buf) | ||
71 | { | 76 | { |
72 | unsigned long pccr; | 77 | unsigned long pccr; |
73 | 78 | ||
74 | pccr = sysreg_read(PCCR); | 79 | pccr = sysreg_read(PCCR); |
75 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); | 80 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); |
76 | } | 81 | } |
77 | static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | 82 | static ssize_t store_pc1event(struct sys_device *dev, |
83 | struct sysdev_attribute *attr, const char *buf, | ||
78 | size_t count) | 84 | size_t count) |
79 | { | 85 | { |
80 | unsigned long val; | 86 | unsigned long val; |
@@ -87,14 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | |||
87 | sysreg_write(PCCR, val); | 93 | sysreg_write(PCCR, val); |
88 | return count; | 94 | return count; |
89 | } | 95 | } |
90 | static ssize_t show_pc1count(struct sys_device *dev, char *buf) | 96 | static ssize_t show_pc1count(struct sys_device *dev, |
97 | struct sysdev_attribute *attr, char *buf) | ||
91 | { | 98 | { |
92 | unsigned long pcnt1; | 99 | unsigned long pcnt1; |
93 | 100 | ||
94 | pcnt1 = sysreg_read(PCNT1); | 101 | pcnt1 = sysreg_read(PCNT1); |
95 | return sprintf(buf, "%lu\n", pcnt1); | 102 | return sprintf(buf, "%lu\n", pcnt1); |
96 | } | 103 | } |
97 | static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | 104 | static ssize_t store_pc1count(struct sys_device *dev, |
105 | struct sysdev_attribute *attr, const char *buf, | ||
98 | size_t count) | 106 | size_t count) |
99 | { | 107 | { |
100 | unsigned long val; | 108 | unsigned long val; |
@@ -108,14 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | |||
108 | return count; | 116 | return count; |
109 | } | 117 | } |
110 | 118 | ||
111 | static ssize_t show_pccycles(struct sys_device *dev, char *buf) | 119 | static ssize_t show_pccycles(struct sys_device *dev, |
120 | struct sysdev_attribute *attr, char *buf) | ||
112 | { | 121 | { |
113 | unsigned long pccnt; | 122 | unsigned long pccnt; |
114 | 123 | ||
115 | pccnt = sysreg_read(PCCNT); | 124 | pccnt = sysreg_read(PCCNT); |
116 | return sprintf(buf, "%lu\n", pccnt); | 125 | return sprintf(buf, "%lu\n", pccnt); |
117 | } | 126 | } |
118 | static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | 127 | static ssize_t store_pccycles(struct sys_device *dev, |
128 | struct sysdev_attribute *attr, const char *buf, | ||
119 | size_t count) | 129 | size_t count) |
120 | { | 130 | { |
121 | unsigned long val; | 131 | unsigned long val; |
@@ -129,14 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | |||
129 | return count; | 139 | return count; |
130 | } | 140 | } |
131 | 141 | ||
132 | static ssize_t show_pcenable(struct sys_device *dev, char *buf) | 142 | static ssize_t show_pcenable(struct sys_device *dev, |
143 | struct sysdev_attribute *attr, char *buf) | ||
133 | { | 144 | { |
134 | unsigned long pccr; | 145 | unsigned long pccr; |
135 | 146 | ||
136 | pccr = sysreg_read(PCCR); | 147 | pccr = sysreg_read(PCCR); |
137 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); | 148 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); |
138 | } | 149 | } |
139 | static ssize_t store_pcenable(struct sys_device *dev, const char *buf, | 150 | static ssize_t store_pcenable(struct sys_device *dev, |
151 | struct sysdev_attribute *attr, const char *buf, | ||
140 | size_t count) | 152 | size_t count) |
141 | { | 153 | { |
142 | unsigned long pccr, val; | 154 | unsigned long pccr, val; |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 6cf9df176274..ff820a9e743a 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -31,7 +31,7 @@ void cpu_idle(void) | |||
31 | { | 31 | { |
32 | /* endless idle loop with no priority at all */ | 32 | /* endless idle loop with no priority at all */ |
33 | while (1) { | 33 | while (1) { |
34 | tick_nohz_stop_sched_tick(); | 34 | tick_nohz_stop_sched_tick(1); |
35 | while (!need_resched()) | 35 | while (!need_resched()) |
36 | cpu_idle_sleep(); | 36 | cpu_idle_sleep(); |
37 | tick_nohz_restart_sched_tick(); | 37 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/avr32/kernel/stacktrace.c b/arch/avr32/kernel/stacktrace.c index f4bdb448049c..c09f0d8dd679 100644 --- a/arch/avr32/kernel/stacktrace.c +++ b/arch/avr32/kernel/stacktrace.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/stacktrace.h> | 11 | #include <linux/stacktrace.h> |
12 | #include <linux/thread_info.h> | 12 | #include <linux/thread_info.h> |
13 | #include <linux/module.h> | ||
13 | 14 | ||
14 | register unsigned long current_frame_pointer asm("r7"); | 15 | register unsigned long current_frame_pointer asm("r7"); |
15 | 16 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 30c7cdab28d0..5f30b353a27f 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/clk.h> | 8 | #include <linux/clk.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/dw_dmac.h> | ||
10 | #include <linux/fb.h> | 11 | #include <linux/fb.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
@@ -594,6 +595,17 @@ static void __init genclk_init_parent(struct clk *clk) | |||
594 | clk->parent = parent; | 595 | clk->parent = parent; |
595 | } | 596 | } |
596 | 597 | ||
598 | static struct dw_dma_platform_data dw_dmac0_data = { | ||
599 | .nr_channels = 3, | ||
600 | }; | ||
601 | |||
602 | static struct resource dw_dmac0_resource[] = { | ||
603 | PBMEM(0xff200000), | ||
604 | IRQ(2), | ||
605 | }; | ||
606 | DEFINE_DEV_DATA(dw_dmac, 0); | ||
607 | DEV_CLK(hclk, dw_dmac0, hsb, 10); | ||
608 | |||
597 | /* -------------------------------------------------------------------- | 609 | /* -------------------------------------------------------------------- |
598 | * System peripherals | 610 | * System peripherals |
599 | * -------------------------------------------------------------------- */ | 611 | * -------------------------------------------------------------------- */ |
@@ -708,17 +720,6 @@ static struct clk pico_clk = { | |||
708 | .users = 1, | 720 | .users = 1, |
709 | }; | 721 | }; |
710 | 722 | ||
711 | static struct resource dmaca0_resource[] = { | ||
712 | { | ||
713 | .start = 0xff200000, | ||
714 | .end = 0xff20ffff, | ||
715 | .flags = IORESOURCE_MEM, | ||
716 | }, | ||
717 | IRQ(2), | ||
718 | }; | ||
719 | DEFINE_DEV(dmaca, 0); | ||
720 | DEV_CLK(hclk, dmaca0, hsb, 10); | ||
721 | |||
722 | /* -------------------------------------------------------------------- | 723 | /* -------------------------------------------------------------------- |
723 | * HMATRIX | 724 | * HMATRIX |
724 | * -------------------------------------------------------------------- */ | 725 | * -------------------------------------------------------------------- */ |
@@ -831,7 +832,7 @@ void __init at32_add_system_devices(void) | |||
831 | platform_device_register(&at32_eic0_device); | 832 | platform_device_register(&at32_eic0_device); |
832 | platform_device_register(&smc0_device); | 833 | platform_device_register(&smc0_device); |
833 | platform_device_register(&pdc_device); | 834 | platform_device_register(&pdc_device); |
834 | platform_device_register(&dmaca0_device); | 835 | platform_device_register(&dw_dmac0_device); |
835 | 836 | ||
836 | platform_device_register(&at32_tcb0_device); | 837 | platform_device_register(&at32_tcb0_device); |
837 | platform_device_register(&at32_tcb1_device); | 838 | platform_device_register(&at32_tcb1_device); |
@@ -1869,6 +1870,58 @@ fail: | |||
1869 | #endif | 1870 | #endif |
1870 | 1871 | ||
1871 | /* -------------------------------------------------------------------- | 1872 | /* -------------------------------------------------------------------- |
1873 | * NAND Flash / SmartMedia | ||
1874 | * -------------------------------------------------------------------- */ | ||
1875 | static struct resource smc_cs3_resource[] __initdata = { | ||
1876 | { | ||
1877 | .start = 0x0c000000, | ||
1878 | .end = 0x0fffffff, | ||
1879 | .flags = IORESOURCE_MEM, | ||
1880 | }, { | ||
1881 | .start = 0xfff03c00, | ||
1882 | .end = 0xfff03fff, | ||
1883 | .flags = IORESOURCE_MEM, | ||
1884 | }, | ||
1885 | }; | ||
1886 | |||
1887 | struct platform_device *__init | ||
1888 | at32_add_device_nand(unsigned int id, struct atmel_nand_data *data) | ||
1889 | { | ||
1890 | struct platform_device *pdev; | ||
1891 | |||
1892 | if (id != 0 || !data) | ||
1893 | return NULL; | ||
1894 | |||
1895 | pdev = platform_device_alloc("atmel_nand", id); | ||
1896 | if (!pdev) | ||
1897 | goto fail; | ||
1898 | |||
1899 | if (platform_device_add_resources(pdev, smc_cs3_resource, | ||
1900 | ARRAY_SIZE(smc_cs3_resource))) | ||
1901 | goto fail; | ||
1902 | |||
1903 | if (platform_device_add_data(pdev, data, | ||
1904 | sizeof(struct atmel_nand_data))) | ||
1905 | goto fail; | ||
1906 | |||
1907 | set_ebi_sfr_bits(HMATRIX_BIT(CS3A)); | ||
1908 | if (data->enable_pin) | ||
1909 | at32_select_gpio(data->enable_pin, | ||
1910 | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); | ||
1911 | if (data->rdy_pin) | ||
1912 | at32_select_gpio(data->rdy_pin, 0); | ||
1913 | if (data->det_pin) | ||
1914 | at32_select_gpio(data->det_pin, 0); | ||
1915 | |||
1916 | platform_device_add(pdev); | ||
1917 | return pdev; | ||
1918 | |||
1919 | fail: | ||
1920 | platform_device_put(pdev); | ||
1921 | return NULL; | ||
1922 | } | ||
1923 | |||
1924 | /* -------------------------------------------------------------------- | ||
1872 | * AC97C | 1925 | * AC97C |
1873 | * -------------------------------------------------------------------- */ | 1926 | * -------------------------------------------------------------------- */ |
1874 | static struct resource atmel_ac97c0_resource[] __initdata = { | 1927 | static struct resource atmel_ac97c0_resource[] __initdata = { |
@@ -2051,7 +2104,7 @@ struct clk *at32_clock_list[] = { | |||
2051 | &smc0_mck, | 2104 | &smc0_mck, |
2052 | &pdc_hclk, | 2105 | &pdc_hclk, |
2053 | &pdc_pclk, | 2106 | &pdc_pclk, |
2054 | &dmaca0_hclk, | 2107 | &dw_dmac0_hclk, |
2055 | &pico_clk, | 2108 | &pico_clk, |
2056 | &pio0_mck, | 2109 | &pio0_mck, |
2057 | &pio1_mck, | 2110 | &pio1_mck, |
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c index fa427ed42787..b2d9bc61a35c 100644 --- a/arch/avr32/mach-at32ap/hsmc.c +++ b/arch/avr32/mach-at32ap/hsmc.c | |||
@@ -278,4 +278,4 @@ static int __init hsmc_init(void) | |||
278 | { | 278 | { |
279 | return platform_driver_register(&hsmc_driver); | 279 | return platform_driver_register(&hsmc_driver); |
280 | } | 280 | } |
281 | arch_initcall(hsmc_init); | 281 | core_initcall(hsmc_init); |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 60da03ba7117..296294f8ed81 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -360,6 +360,8 @@ static int __init pio_probe(struct platform_device *pdev) | |||
360 | pio->chip.label = pio->name; | 360 | pio->chip.label = pio->name; |
361 | pio->chip.base = pdev->id * 32; | 361 | pio->chip.base = pdev->id * 32; |
362 | pio->chip.ngpio = 32; | 362 | pio->chip.ngpio = 32; |
363 | pio->chip.dev = &pdev->dev; | ||
364 | pio->chip.owner = THIS_MODULE; | ||
363 | 365 | ||
364 | pio->chip.direction_input = direction_input; | 366 | pio->chip.direction_input = direction_input; |
365 | pio->chip.get = gpio_get; | 367 | pio->chip.get = gpio_get; |
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c index 3f90a87527bb..fa92ff6d95f7 100644 --- a/arch/avr32/mm/init.c +++ b/arch/avr32/mm/init.c | |||
@@ -38,45 +38,6 @@ EXPORT_SYMBOL(empty_zero_page); | |||
38 | */ | 38 | */ |
39 | unsigned long mmu_context_cache = NO_CONTEXT; | 39 | unsigned long mmu_context_cache = NO_CONTEXT; |
40 | 40 | ||
41 | void show_mem(void) | ||
42 | { | ||
43 | int total = 0, reserved = 0, cached = 0; | ||
44 | int slab = 0, free = 0, shared = 0; | ||
45 | pg_data_t *pgdat; | ||
46 | |||
47 | printk("Mem-info:\n"); | ||
48 | show_free_areas(); | ||
49 | |||
50 | for_each_online_pgdat(pgdat) { | ||
51 | struct page *page, *end; | ||
52 | |||
53 | page = pgdat->node_mem_map; | ||
54 | end = page + pgdat->node_spanned_pages; | ||
55 | |||
56 | do { | ||
57 | total++; | ||
58 | if (PageReserved(page)) | ||
59 | reserved++; | ||
60 | else if (PageSwapCache(page)) | ||
61 | cached++; | ||
62 | else if (PageSlab(page)) | ||
63 | slab++; | ||
64 | else if (!page_count(page)) | ||
65 | free++; | ||
66 | else | ||
67 | shared += page_count(page) - 1; | ||
68 | page++; | ||
69 | } while (page < end); | ||
70 | } | ||
71 | |||
72 | printk ("%d pages of RAM\n", total); | ||
73 | printk ("%d free pages\n", free); | ||
74 | printk ("%d reserved pages\n", reserved); | ||
75 | printk ("%d slab pages\n", slab); | ||
76 | printk ("%d pages shared\n", shared); | ||
77 | printk ("%d pages swap cached\n", cached); | ||
78 | } | ||
79 | |||
80 | /* | 41 | /* |
81 | * paging_init() sets up the page tables | 42 | * paging_init() sets up the page tables |
82 | * | 43 | * |
@@ -119,8 +80,7 @@ void __init paging_init(void) | |||
119 | unsigned long zones_size[MAX_NR_ZONES]; | 80 | unsigned long zones_size[MAX_NR_ZONES]; |
120 | unsigned long low, start_pfn; | 81 | unsigned long low, start_pfn; |
121 | 82 | ||
122 | start_pfn = pgdat->bdata->node_boot_start; | 83 | start_pfn = pgdat->bdata->node_min_pfn; |
123 | start_pfn >>= PAGE_SHIFT; | ||
124 | low = pgdat->bdata->node_low_pfn; | 84 | low = pgdat->bdata->node_low_pfn; |
125 | 85 | ||
126 | memset(zones_size, 0, sizeof(zones_size)); | 86 | memset(zones_size, 0, sizeof(zones_size)); |
@@ -129,7 +89,7 @@ void __init paging_init(void) | |||
129 | printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", | 89 | printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", |
130 | nid, start_pfn, low); | 90 | nid, start_pfn, low); |
131 | 91 | ||
132 | free_area_init_node(nid, pgdat, zones_size, start_pfn, NULL); | 92 | free_area_init_node(nid, zones_size, start_pfn, NULL); |
133 | 93 | ||
134 | printk("Node %u: mem_map starts at %p\n", | 94 | printk("Node %u: mem_map starts at %p\n", |
135 | pgdat->node_id, pgdat->node_mem_map); | 95 | pgdat->node_id, pgdat->node_mem_map); |
diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c index 3437c82434ac..f03b79f0e0ab 100644 --- a/arch/avr32/mm/ioremap.c +++ b/arch/avr32/mm/ioremap.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | #include <linux/vmalloc.h> | 8 | #include <linux/vmalloc.h> |
9 | #include <linux/mm.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/io.h> | 11 | #include <linux/io.h> |
11 | 12 | ||