diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-23 15:24:10 +0200 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-23 15:24:10 +0200 |
commit | d9214556b11a8d18ff588e60824c12041d30f791 (patch) | |
tree | 04ab59d13961675811a55c96fb12b2b167b72318 /arch/avr32 | |
parent | 72a1419a9d4c859a3345e4b83f8ef7d599d3818c (diff) | |
parent | e82c6106b04b85879d802bbbeaed30d9b10a92e2 (diff) | |
download | op-kernel-dev-d9214556b11a8d18ff588e60824c12041d30f791.zip op-kernel-dev-d9214556b11a8d18ff588e60824c12041d30f791.tar.gz |
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/Kconfig | 2 | ||||
-rw-r--r-- | arch/avr32/boards/atngw100/setup.c | 2 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 2 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1003.c | 2 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1004.c | 2 | ||||
-rw-r--r-- | arch/avr32/include/asm/a.out.h | 20 | ||||
-rw-r--r-- | arch/avr32/include/asm/elf.h | 2 | ||||
-rw-r--r-- | arch/avr32/include/asm/thread_info.h | 1 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 7 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/cpufreq.c | 15 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/extint.c | 8 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/include/mach/board.h | 10 |
12 files changed, 35 insertions, 38 deletions
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 5252e15..26eca87f 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig @@ -72,6 +72,8 @@ config GENERIC_BUG source "init/Kconfig" +source "kernel/Kconfig.freezer" + menu "System Type and features" source "kernel/time/Kconfig" diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index af38ab3..32fb9ba 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) * reserve any pins for it. */ - at32_add_system_devices(); - at32_add_device_usart(0); set_hw_addr(at32_add_device_eth(0, ð_data[0])); diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 29e5b51..5c5cdf3 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) at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ - at32_add_system_devices(); - #ifdef CONFIG_BOARD_ATSTK1006 smc_set_timing(&nand_config, &nand_timing); smc_set_configuration(3, &nand_config); diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c index be089d7f..134b566 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) at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */ at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */ - at32_add_system_devices(); - #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM at32_add_device_usart(1); #else diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c index 248ef23..cb32eb8 100644 --- a/arch/avr32/boards/atstk1000/atstk1004.c +++ b/arch/avr32/boards/atstk1000/atstk1004.c @@ -132,8 +132,6 @@ void __init setup_board(void) static int __init atstk1004_init(void) { - at32_add_system_devices(); - #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM at32_add_device_usart(1); #else diff --git a/arch/avr32/include/asm/a.out.h b/arch/avr32/include/asm/a.out.h deleted file mode 100644 index e46375a3..0000000 --- a/arch/avr32/include/asm/a.out.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ASM_AVR32_A_OUT_H -#define __ASM_AVR32_A_OUT_H - -struct exec -{ - unsigned long a_info; /* Use macros N_MAGIC, etc for access */ - unsigned a_text; /* length of text, in bytes */ - unsigned a_data; /* length of data, in bytes */ - unsigned a_bss; /* length of uninitialized data area for file, in bytes */ - unsigned a_syms; /* length of symbol table data in file, in bytes */ - unsigned a_entry; /* start address */ - unsigned a_trsize; /* length of relocation info for text, in bytes */ - unsigned a_drsize; /* length of relocation info for data, in bytes */ -}; - -#define N_TRSIZE(a) ((a).a_trsize) -#define N_DRSIZE(a) ((a).a_drsize) -#define N_SYMSIZE(a) ((a).a_syms) - -#endif /* __ASM_AVR32_A_OUT_H */ diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h index 64ce40e..d5d1d41 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; #define ELF_PLATFORM (NULL) -#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) +#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) #endif /* __ASM_AVR32_ELF_H */ diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h index 294b25f..4442f8d 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) #define _TIF_MEMDIE (1 << TIF_MEMDIE) #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) +#define _TIF_FREEZE (1 << TIF_FREEZE) /* Note: The masks below must never span more than 16 bits! */ diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index caec25a..0c6e02f 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -813,7 +813,7 @@ static struct resource pio4_resource[] = { DEFINE_DEV(pio, 4); DEV_CLK(mck, pio4, pba, 14); -void __init at32_add_system_devices(void) +static int __init system_device_init(void) { platform_device_register(&at32_pm0_device); platform_device_register(&at32_intc0_device); @@ -832,7 +832,10 @@ void __init at32_add_system_devices(void) platform_device_register(&pio2_device); platform_device_register(&pio3_device); platform_device_register(&pio4_device); + + return 0; } +core_initcall(system_device_init); /* -------------------------------------------------------------------- * PSIF @@ -1474,7 +1477,7 @@ at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, pin_mask = ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL; /* LCDC on port C */ - portc_mask = (pin_mask & 0xfff80000) >> 19; + portc_mask = pin_mask & 0xfff80000; select_peripheral(PIOC, portc_mask, PERIPH_A, 0); /* LCDC on port D */ diff --git a/arch/avr32/mach-at32ap/cpufreq.c b/arch/avr32/mach-at32ap/cpufreq.c index 5dd8d25..024c586 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) return (unsigned int)((clk_get_rate(cpuclk) + 500) / 1000); } +static unsigned int ref_freq; +static unsigned long loops_per_jiffy_ref; + static int at32_set_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -61,8 +64,19 @@ static int at32_set_target(struct cpufreq_policy *policy, freqs.cpu = 0; freqs.flags = 0; + if (!ref_freq) { + ref_freq = freqs.old; + loops_per_jiffy_ref = boot_cpu_data.loops_per_jiffy; + } + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); + if (freqs.old < freqs.new) + boot_cpu_data.loops_per_jiffy = cpufreq_scale( + loops_per_jiffy_ref, ref_freq, freqs.new); clk_set_rate(cpuclk, freq); + if (freqs.new < freqs.old) + boot_cpu_data.loops_per_jiffy = cpufreq_scale( + loops_per_jiffy_ref, ref_freq, freqs.new); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); pr_debug("cpufreq: set frequency %lu Hz\n", freq); @@ -87,7 +101,6 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy) policy->cur = at32_get_speed(0); policy->min = policy->cpuinfo.min_freq; policy->max = policy->cpuinfo.max_freq; - policy->governor = CPUFREQ_DEFAULT_GOVERNOR; printk("cpufreq: AT32AP CPU frequency driver\n"); diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index c36a6d5..310477b 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) struct eic *eic; struct resource *regs; unsigned int i; - unsigned int nr_irqs; + unsigned int nr_of_irqs; unsigned int int_irq; int ret; u32 pattern; @@ -224,7 +224,7 @@ static int __init eic_probe(struct platform_device *pdev) eic_writel(eic, IDR, ~0UL); eic_writel(eic, MODE, ~0UL); pattern = eic_readl(eic, MODE); - nr_irqs = fls(pattern); + nr_of_irqs = fls(pattern); /* Trigger on low level unless overridden by driver */ eic_writel(eic, EDGE, 0UL); @@ -232,7 +232,7 @@ static int __init eic_probe(struct platform_device *pdev) eic->chip = &eic_chip; - for (i = 0; i < nr_irqs; i++) { + for (i = 0; i < nr_of_irqs; i++) { set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, handle_level_irq); set_irq_chip_data(eic->first_irq + i, eic); @@ -256,7 +256,7 @@ static int __init eic_probe(struct platform_device *pdev) eic->regs, int_irq); dev_info(&pdev->dev, "Handling %u external IRQs, starting with IRQ %u\n", - nr_irqs, eic->first_irq); + nr_of_irqs, eic->first_irq); return 0; diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index c48386d..aafaf7a 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h @@ -14,8 +14,14 @@ */ extern unsigned long at32_board_osc_rates[]; -/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ -void at32_add_system_devices(void); +/* + * This used to add essential system devices, but this is now done + * automatically. Please don't use it in new board code. + */ +static inline void __deprecated at32_add_system_devices(void) +{ + +} #define ATMEL_MAX_UART 4 extern struct platform_device *atmel_default_console_device; |