diff options
author | Tony Lindgren <tony@atomide.com> | 2010-02-12 15:26:46 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-15 12:26:55 -0500 |
commit | 56213ca4e440c0b6e56a48f5901c55c4ce3cf1ba (patch) | |
tree | 7047bf0972fc65e7f32b873a9919398660ef12c3 | |
parent | 9556175183ddf19e9a7afa449c259a0a5081fa29 (diff) |
omap2/3: Multiboot compile fixes to compile in omap2 and omap3
Allows compiling in omap2 and omap3.
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-omap2/opp2xxx.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 16 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 2 |
5 files changed, 52 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 34c2867e0f63..f6f151c4f089 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -34,6 +34,10 @@ obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o | |||
34 | obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o | 34 | obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o |
35 | obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o | 35 | obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o |
36 | 36 | ||
37 | AFLAGS_sram242x.o :=-Wa,-march=armv6 | ||
38 | AFLAGS_sram243x.o :=-Wa,-march=armv6 | ||
39 | AFLAGS_sram34xx.o :=-Wa,-march=armv7-a | ||
40 | |||
37 | # Pin multiplexing | 41 | # Pin multiplexing |
38 | obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o | 42 | obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o |
39 | 43 | ||
@@ -47,6 +51,10 @@ obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o | |||
47 | obj-$(CONFIG_ARCH_OMAP24XX) += sleep24xx.o | 51 | obj-$(CONFIG_ARCH_OMAP24XX) += sleep24xx.o |
48 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o | 52 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o |
49 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 53 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
54 | |||
55 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 | ||
56 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a | ||
57 | |||
50 | endif | 58 | endif |
51 | 59 | ||
52 | # PRCM | 60 | # PRCM |
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 7bc344bcbb47..a6e85f46a65c 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
@@ -83,6 +83,32 @@ int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent); | |||
83 | u32 omap2_get_dpll_rate(struct clk *clk); | 83 | u32 omap2_get_dpll_rate(struct clk *clk); |
84 | void omap2_init_dpll_parent(struct clk *clk); | 84 | void omap2_init_dpll_parent(struct clk *clk); |
85 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); | 85 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); |
86 | |||
87 | |||
88 | #ifdef CONFIG_ARCH_OMAP2 | ||
89 | void omap2xxx_clk_prepare_for_reboot(void); | ||
90 | #else | ||
91 | static inline void omap2xxx_clk_prepare_for_reboot(void) | ||
92 | { | ||
93 | } | ||
94 | #endif | ||
95 | |||
96 | #ifdef CONFIG_ARCH_OMAP3 | ||
97 | void omap3_clk_prepare_for_reboot(void); | ||
98 | #else | ||
99 | static inline void omap3_clk_prepare_for_reboot(void) | ||
100 | { | ||
101 | } | ||
102 | #endif | ||
103 | |||
104 | #ifdef CONFIG_ARCH_OMAP4 | ||
105 | void omap4_clk_prepare_for_reboot(void); | ||
106 | #else | ||
107 | static inline void omap4_clk_prepare_for_reboot(void) | ||
108 | { | ||
109 | } | ||
110 | #endif | ||
111 | |||
86 | int omap2_dflt_clk_enable(struct clk *clk); | 112 | int omap2_dflt_clk_enable(struct clk *clk); |
87 | void omap2_dflt_clk_disable(struct clk *clk); | 113 | void omap2_dflt_clk_disable(struct clk *clk); |
88 | void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, | 114 | void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, |
diff --git a/arch/arm/mach-omap2/opp2xxx.h b/arch/arm/mach-omap2/opp2xxx.h index ed6df04e2f29..38b730550506 100644 --- a/arch/arm/mach-omap2/opp2xxx.h +++ b/arch/arm/mach-omap2/opp2xxx.h | |||
@@ -417,7 +417,12 @@ struct prcm_config { | |||
417 | 417 | ||
418 | 418 | ||
419 | extern const struct prcm_config omap2420_rate_table[]; | 419 | extern const struct prcm_config omap2420_rate_table[]; |
420 | |||
421 | #ifdef CONFIG_ARCH_OMAP2430 | ||
420 | extern const struct prcm_config omap2430_rate_table[]; | 422 | extern const struct prcm_config omap2430_rate_table[]; |
423 | #else | ||
424 | #define omap2430_rate_table NULL | ||
425 | #endif | ||
421 | extern const struct prcm_config *rate_table; | 426 | extern const struct prcm_config *rate_table; |
422 | extern const struct prcm_config *curr_prcm_set; | 427 | extern const struct prcm_config *curr_prcm_set; |
423 | 428 | ||
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 484d6a91524f..f195457d1b03 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -7,27 +7,35 @@ config ARCH_OMAP_OTG | |||
7 | 7 | ||
8 | choice | 8 | choice |
9 | prompt "OMAP System Type" | 9 | prompt "OMAP System Type" |
10 | default ARCH_OMAP1 | 10 | default ARCH_OMAP2PLUS |
11 | 11 | ||
12 | config ARCH_OMAP1 | 12 | config ARCH_OMAP1 |
13 | bool "TI OMAP1" | 13 | bool "TI OMAP1" |
14 | select COMMON_CLKDEV | 14 | select COMMON_CLKDEV |
15 | help | ||
16 | "Systems based on omap7xx, omap15xx or omap16xx" | ||
17 | |||
18 | config ARCH_OMAP2PLUS | ||
19 | bool "TI OMAP2/3/4" | ||
20 | select COMMON_CLKDEV | ||
21 | help | ||
22 | "Systems based on omap24xx, omap34xx or omap44xx" | ||
15 | 23 | ||
16 | config ARCH_OMAP2 | 24 | config ARCH_OMAP2 |
17 | bool "TI OMAP2" | 25 | bool "TI OMAP2" |
26 | depends on ARCH_OMAP2PLUS | ||
18 | select CPU_V6 | 27 | select CPU_V6 |
19 | select COMMON_CLKDEV | ||
20 | 28 | ||
21 | config ARCH_OMAP3 | 29 | config ARCH_OMAP3 |
22 | bool "TI OMAP3" | 30 | bool "TI OMAP3" |
31 | depends on ARCH_OMAP2PLUS | ||
23 | select CPU_V7 | 32 | select CPU_V7 |
24 | select COMMON_CLKDEV | ||
25 | 33 | ||
26 | config ARCH_OMAP4 | 34 | config ARCH_OMAP4 |
27 | bool "TI OMAP4" | 35 | bool "TI OMAP4" |
36 | depends on ARCH_OMAP2PLUS | ||
28 | select CPU_V7 | 37 | select CPU_V7 |
29 | select ARM_GIC | 38 | select ARM_GIC |
30 | select COMMON_CLKDEV | ||
31 | 39 | ||
32 | endchoice | 40 | endchoice |
33 | 41 | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d2422c766cca..c09b3d9bcd3b 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -1630,7 +1630,7 @@ static int gpio_2irq(struct gpio_chip *chip, unsigned offset) | |||
1630 | /*---------------------------------------------------------------------*/ | 1630 | /*---------------------------------------------------------------------*/ |
1631 | 1631 | ||
1632 | static int initialized; | 1632 | static int initialized; |
1633 | #if !(defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)) | 1633 | #if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2) |
1634 | static struct clk * gpio_ick; | 1634 | static struct clk * gpio_ick; |
1635 | #endif | 1635 | #endif |
1636 | 1636 | ||