aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2008-03-04 09:15:00 -0500
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-06-28 09:08:39 -0400
commit65033ed740ef06eddf9fde7a992eab336cbddd56 (patch)
tree2aef7138d44a09528ad7e24bbd8762de7578f0ec
parentd704fb0cc0cce474ac959adca6c3d1f606fcfa2a (diff)
avr32: Move setup_platform() into chip-specific file
Combine at32_clock_init() and at32_portmux_init() into setup_platform() and remove setup_platform() from at32ap.c. No functional change since all setup_platform() ever did was call those two functions. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
-rw-r--r--arch/avr32/mach-at32ap/at32ap.c8
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c18
-rw-r--r--include/asm-avr32/arch-at32ap/init.h4
3 files changed, 8 insertions, 22 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap.c b/arch/avr32/mach-at32ap/at32ap.c
index 7c4987f3287a..1040bda4fda7 100644
--- a/arch/avr32/mach-at32ap/at32ap.c
+++ b/arch/avr32/mach-at32ap/at32ap.c
@@ -11,14 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13 13
14#include <asm/arch/init.h>
15
16void __init setup_platform(void)
17{
18 at32_clock_init();
19 at32_portmux_init();
20}
21
22static int __init pdc_probe(struct platform_device *pdev) 14static int __init pdc_probe(struct platform_device *pdev)
23{ 15{
24 struct clk *pclk, *hclk; 16 struct clk *pclk, *hclk;
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 2f208eb4d3c9..baf4680b4988 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -2048,16 +2048,7 @@ struct clk *at32_clock_list[] = {
2048}; 2048};
2049unsigned int at32_nr_clocks = ARRAY_SIZE(at32_clock_list); 2049unsigned int at32_nr_clocks = ARRAY_SIZE(at32_clock_list);
2050 2050
2051void __init at32_portmux_init(void) 2051void __init setup_platform(void)
2052{
2053 at32_init_pio(&pio0_device);
2054 at32_init_pio(&pio1_device);
2055 at32_init_pio(&pio2_device);
2056 at32_init_pio(&pio3_device);
2057 at32_init_pio(&pio4_device);
2058}
2059
2060void __init at32_clock_init(void)
2061{ 2052{
2062 u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0; 2053 u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0;
2063 int i; 2054 int i;
@@ -2112,4 +2103,11 @@ void __init at32_clock_init(void)
2112 pm_writel(HSB_MASK, hsb_mask); 2103 pm_writel(HSB_MASK, hsb_mask);
2113 pm_writel(PBA_MASK, pba_mask); 2104 pm_writel(PBA_MASK, pba_mask);
2114 pm_writel(PBB_MASK, pbb_mask); 2105 pm_writel(PBB_MASK, pbb_mask);
2106
2107 /* Initialize the port muxes */
2108 at32_init_pio(&pio0_device);
2109 at32_init_pio(&pio1_device);
2110 at32_init_pio(&pio2_device);
2111 at32_init_pio(&pio3_device);
2112 at32_init_pio(&pio4_device);
2115} 2113}
diff --git a/include/asm-avr32/arch-at32ap/init.h b/include/asm-avr32/arch-at32ap/init.h
index 5e75d850d707..bc40e3d46150 100644
--- a/include/asm-avr32/arch-at32ap/init.h
+++ b/include/asm-avr32/arch-at32ap/init.h
@@ -13,10 +13,6 @@
13void setup_platform(void); 13void setup_platform(void);
14void setup_board(void); 14void setup_board(void);
15 15
16/* Called by setup_platform */
17void at32_clock_init(void);
18void at32_portmux_init(void);
19
20void at32_setup_serial_console(unsigned int usart_id); 16void at32_setup_serial_console(unsigned int usart_id);
21 17
22#endif /* __ASM_AVR32_AT32AP_INIT_H__ */ 18#endif /* __ASM_AVR32_AT32AP_INIT_H__ */