aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-10-23 09:24:10 -0400
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-10-23 09:24:10 -0400
commitd9214556b11a8d18ff588e60824c12041d30f791 (patch)
tree04ab59d13961675811a55c96fb12b2b167b72318 /arch/avr32
parent72a1419a9d4c859a3345e4b83f8ef7d599d3818c (diff)
parente82c6106b04b85879d802bbbeaed30d9b10a92e2 (diff)
Merge branches 'boards' and 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/Kconfig2
-rw-r--r--arch/avr32/boards/atngw100/setup.c2
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c2
-rw-r--r--arch/avr32/boards/atstk1000/atstk1003.c2
-rw-r--r--arch/avr32/boards/atstk1000/atstk1004.c2
-rw-r--r--arch/avr32/include/asm/a.out.h20
-rw-r--r--arch/avr32/include/asm/elf.h2
-rw-r--r--arch/avr32/include/asm/thread_info.h1
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c7
-rw-r--r--arch/avr32/mach-at32ap/cpufreq.c15
-rw-r--r--arch/avr32/mach-at32ap/extint.c8
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h10
12 files changed, 35 insertions, 38 deletions
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 5252e15445b0..26eca87f6735 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -72,6 +72,8 @@ config GENERIC_BUG
72 72
73source "init/Kconfig" 73source "init/Kconfig"
74 74
75source "kernel/Kconfig.freezer"
76
75menu "System Type and features" 77menu "System Type and features"
76 78
77source "kernel/time/Kconfig" 79source "kernel/time/Kconfig"
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index af38ab3e4502..32fb9ba0fbdf 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -177,8 +177,6 @@ static int __init atngw100_init(void)
177 * reserve any pins for it. 177 * reserve any pins for it.
178 */ 178 */
179 179
180 at32_add_system_devices();
181
182 at32_add_device_usart(0); 180 at32_add_device_usart(0);
183 181
184 set_hw_addr(at32_add_device_eth(0, &eth_data[0])); 182 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 29e5b51a7fd2..5c5cdf3b464f 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -305,8 +305,6 @@ static int __init atstk1002_init(void)
305 at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ 305 at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */
306 at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ 306 at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */
307 307
308 at32_add_system_devices();
309
310#ifdef CONFIG_BOARD_ATSTK1006 308#ifdef CONFIG_BOARD_ATSTK1006
311 smc_set_timing(&nand_config, &nand_timing); 309 smc_set_timing(&nand_config, &nand_timing);
312 smc_set_configuration(3, &nand_config); 310 smc_set_configuration(3, &nand_config);
diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c
index be089d7f37eb..134b566630b0 100644
--- a/arch/avr32/boards/atstk1000/atstk1003.c
+++ b/arch/avr32/boards/atstk1000/atstk1003.c
@@ -149,8 +149,6 @@ static int __init atstk1003_init(void)
149 at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ 149 at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */
150 at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ 150 at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */
151 151
152 at32_add_system_devices();
153
154#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM 152#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
155 at32_add_device_usart(1); 153 at32_add_device_usart(1);
156#else 154#else
diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c
index 248ef237c167..cb32eb844aa7 100644
--- a/arch/avr32/boards/atstk1000/atstk1004.c
+++ b/arch/avr32/boards/atstk1000/atstk1004.c
@@ -132,8 +132,6 @@ void __init setup_board(void)
132 132
133static int __init atstk1004_init(void) 133static int __init atstk1004_init(void)
134{ 134{
135 at32_add_system_devices();
136
137#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM 135#ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
138 at32_add_device_usart(1); 136 at32_add_device_usart(1);
139#else 137#else
diff --git a/arch/avr32/include/asm/a.out.h b/arch/avr32/include/asm/a.out.h
deleted file mode 100644
index e46375a34a72..000000000000
--- a/arch/avr32/include/asm/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef __ASM_AVR32_A_OUT_H
2#define __ASM_AVR32_A_OUT_H
3
4struct exec
5{
6 unsigned long a_info; /* Use macros N_MAGIC, etc for access */
7 unsigned a_text; /* length of text, in bytes */
8 unsigned a_data; /* length of data, in bytes */
9 unsigned a_bss; /* length of uninitialized data area for file, in bytes */
10 unsigned a_syms; /* length of symbol table data in file, in bytes */
11 unsigned a_entry; /* start address */
12 unsigned a_trsize; /* length of relocation info for text, in bytes */
13 unsigned a_drsize; /* length of relocation info for data, in bytes */
14};
15
16#define N_TRSIZE(a) ((a).a_trsize)
17#define N_DRSIZE(a) ((a).a_drsize)
18#define N_SYMSIZE(a) ((a).a_syms)
19
20#endif /* __ASM_AVR32_A_OUT_H */
diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
index 64ce40ee1d58..d5d1d41c600a 100644
--- a/arch/avr32/include/asm/elf.h
+++ b/arch/avr32/include/asm/elf.h
@@ -103,6 +103,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
103 103
104#define ELF_PLATFORM (NULL) 104#define ELF_PLATFORM (NULL)
105 105
106#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 106#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
107 107
108#endif /* __ASM_AVR32_ELF_H */ 108#endif /* __ASM_AVR32_ELF_H */
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h
index 294b25f9323d..4442f8d2d423 100644
--- a/arch/avr32/include/asm/thread_info.h
+++ b/arch/avr32/include/asm/thread_info.h
@@ -96,6 +96,7 @@ static inline struct thread_info *current_thread_info(void)
96#define _TIF_MEMDIE (1 << TIF_MEMDIE) 96#define _TIF_MEMDIE (1 << TIF_MEMDIE)
97#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) 97#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
98#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) 98#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
99#define _TIF_FREEZE (1 << TIF_FREEZE)
99 100
100/* Note: The masks below must never span more than 16 bits! */ 101/* Note: The masks below must never span more than 16 bits! */
101 102
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index caec25a2eec6..0c6e02f80a31 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -813,7 +813,7 @@ static struct resource pio4_resource[] = {
813DEFINE_DEV(pio, 4); 813DEFINE_DEV(pio, 4);
814DEV_CLK(mck, pio4, pba, 14); 814DEV_CLK(mck, pio4, pba, 14);
815 815
816void __init at32_add_system_devices(void) 816static int __init system_device_init(void)
817{ 817{
818 platform_device_register(&at32_pm0_device); 818 platform_device_register(&at32_pm0_device);
819 platform_device_register(&at32_intc0_device); 819 platform_device_register(&at32_intc0_device);
@@ -832,7 +832,10 @@ void __init at32_add_system_devices(void)
832 platform_device_register(&pio2_device); 832 platform_device_register(&pio2_device);
833 platform_device_register(&pio3_device); 833 platform_device_register(&pio3_device);
834 platform_device_register(&pio4_device); 834 platform_device_register(&pio4_device);
835
836 return 0;
835} 837}
838core_initcall(system_device_init);
836 839
837/* -------------------------------------------------------------------- 840/* --------------------------------------------------------------------
838 * PSIF 841 * PSIF
@@ -1474,7 +1477,7 @@ at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,
1474 pin_mask = ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL; 1477 pin_mask = ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL;
1475 1478
1476 /* LCDC on port C */ 1479 /* LCDC on port C */
1477 portc_mask = (pin_mask & 0xfff80000) >> 19; 1480 portc_mask = pin_mask & 0xfff80000;
1478 select_peripheral(PIOC, portc_mask, PERIPH_A, 0); 1481 select_peripheral(PIOC, portc_mask, PERIPH_A, 0);
1479 1482
1480 /* LCDC on port D */ 1483 /* LCDC on port D */
diff --git a/arch/avr32/mach-at32ap/cpufreq.c b/arch/avr32/mach-at32ap/cpufreq.c
index 5dd8d25428bf..024c586e936c 100644
--- a/arch/avr32/mach-at32ap/cpufreq.c
+++ b/arch/avr32/mach-at32ap/cpufreq.c
@@ -40,6 +40,9 @@ static unsigned int at32_get_speed(unsigned int cpu)
40 return (unsigned int)((clk_get_rate(cpuclk) + 500) / 1000); 40 return (unsigned int)((clk_get_rate(cpuclk) + 500) / 1000);
41} 41}
42 42
43static unsigned int ref_freq;
44static unsigned long loops_per_jiffy_ref;
45
43static int at32_set_target(struct cpufreq_policy *policy, 46static int at32_set_target(struct cpufreq_policy *policy,
44 unsigned int target_freq, 47 unsigned int target_freq,
45 unsigned int relation) 48 unsigned int relation)
@@ -61,8 +64,19 @@ static int at32_set_target(struct cpufreq_policy *policy,
61 freqs.cpu = 0; 64 freqs.cpu = 0;
62 freqs.flags = 0; 65 freqs.flags = 0;
63 66
67 if (!ref_freq) {
68 ref_freq = freqs.old;
69 loops_per_jiffy_ref = boot_cpu_data.loops_per_jiffy;
70 }
71
64 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 72 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
73 if (freqs.old < freqs.new)
74 boot_cpu_data.loops_per_jiffy = cpufreq_scale(
75 loops_per_jiffy_ref, ref_freq, freqs.new);
65 clk_set_rate(cpuclk, freq); 76 clk_set_rate(cpuclk, freq);
77 if (freqs.new < freqs.old)
78 boot_cpu_data.loops_per_jiffy = cpufreq_scale(
79 loops_per_jiffy_ref, ref_freq, freqs.new);
66 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 80 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
67 81
68 pr_debug("cpufreq: set frequency %lu Hz\n", freq); 82 pr_debug("cpufreq: set frequency %lu Hz\n", freq);
@@ -87,7 +101,6 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
87 policy->cur = at32_get_speed(0); 101 policy->cur = at32_get_speed(0);
88 policy->min = policy->cpuinfo.min_freq; 102 policy->min = policy->cpuinfo.min_freq;
89 policy->max = policy->cpuinfo.max_freq; 103 policy->max = policy->cpuinfo.max_freq;
90 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
91 104
92 printk("cpufreq: AT32AP CPU frequency driver\n"); 105 printk("cpufreq: AT32AP CPU frequency driver\n");
93 106
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index c36a6d59d6f0..310477ba1bbf 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -191,7 +191,7 @@ static int __init eic_probe(struct platform_device *pdev)
191 struct eic *eic; 191 struct eic *eic;
192 struct resource *regs; 192 struct resource *regs;
193 unsigned int i; 193 unsigned int i;
194 unsigned int nr_irqs; 194 unsigned int nr_of_irqs;
195 unsigned int int_irq; 195 unsigned int int_irq;
196 int ret; 196 int ret;
197 u32 pattern; 197 u32 pattern;
@@ -224,7 +224,7 @@ static int __init eic_probe(struct platform_device *pdev)
224 eic_writel(eic, IDR, ~0UL); 224 eic_writel(eic, IDR, ~0UL);
225 eic_writel(eic, MODE, ~0UL); 225 eic_writel(eic, MODE, ~0UL);
226 pattern = eic_readl(eic, MODE); 226 pattern = eic_readl(eic, MODE);
227 nr_irqs = fls(pattern); 227 nr_of_irqs = fls(pattern);
228 228
229 /* Trigger on low level unless overridden by driver */ 229 /* Trigger on low level unless overridden by driver */
230 eic_writel(eic, EDGE, 0UL); 230 eic_writel(eic, EDGE, 0UL);
@@ -232,7 +232,7 @@ static int __init eic_probe(struct platform_device *pdev)
232 232
233 eic->chip = &eic_chip; 233 eic->chip = &eic_chip;
234 234
235 for (i = 0; i < nr_irqs; i++) { 235 for (i = 0; i < nr_of_irqs; i++) {
236 set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, 236 set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
237 handle_level_irq); 237 handle_level_irq);
238 set_irq_chip_data(eic->first_irq + i, eic); 238 set_irq_chip_data(eic->first_irq + i, eic);
@@ -256,7 +256,7 @@ static int __init eic_probe(struct platform_device *pdev)
256 eic->regs, int_irq); 256 eic->regs, int_irq);
257 dev_info(&pdev->dev, 257 dev_info(&pdev->dev,
258 "Handling %u external IRQs, starting with IRQ %u\n", 258 "Handling %u external IRQs, starting with IRQ %u\n",
259 nr_irqs, eic->first_irq); 259 nr_of_irqs, eic->first_irq);
260 260
261 return 0; 261 return 0;
262 262
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index c48386d66bc3..aafaf7a78886 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -14,8 +14,14 @@
14 */ 14 */
15extern unsigned long at32_board_osc_rates[]; 15extern unsigned long at32_board_osc_rates[];
16 16
17/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ 17/*
18void at32_add_system_devices(void); 18 * This used to add essential system devices, but this is now done
19 * automatically. Please don't use it in new board code.
20 */
21static inline void __deprecated at32_add_system_devices(void)
22{
23
24}
19 25
20#define ATMEL_MAX_UART 4 26#define ATMEL_MAX_UART 4
21extern struct platform_device *atmel_default_console_device; 27extern struct platform_device *atmel_default_console_device;