diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-08-09 11:10:36 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-08-09 11:48:45 -0400 |
commit | e1bbb55d11622012197a654af874f9f485ddbc47 (patch) | |
tree | 6373609d38101366bcca4601854df310d6d08156 /arch/arm/mach-ux500 | |
parent | a4d9b33be02bd826e09ddfebdd8ac4ccdf1aeee3 (diff) |
ARM: ux500: reform Ux500 family names
Counting the U9540 and the new U8540 as a U8500 family member
does not work. Instead, split the function in two:
cpu_is_u8500_family() covering U8500 and U8520
cpu_is_ux540_family() covering U9540 and U8540
This works much better in practice. Update users to keep the
same behaviour.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/cache-l2x0.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/id.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/platsmp.c | 2 |
5 files changed, 17 insertions, 12 deletions
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index dc12394295d5..75d5b512a3d5 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
@@ -38,7 +38,7 @@ static int __init ux500_l2x0_init(void) | |||
38 | { | 38 | { |
39 | u32 aux_val = 0x3e000000; | 39 | u32 aux_val = 0x3e000000; |
40 | 40 | ||
41 | if (cpu_is_u8500_family()) | 41 | if (cpu_is_u8500_family() || cpu_is_ux540_family()) |
42 | l2x0_base = __io_address(U8500_L2CC_BASE); | 42 | l2x0_base = __io_address(U8500_L2CC_BASE); |
43 | else | 43 | else |
44 | ux500_unknown_soc(); | 44 | ux500_unknown_soc(); |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index db3c52d56ca4..2dd8593e72d0 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -80,7 +80,7 @@ void __init u8500_map_io(void) | |||
80 | 80 | ||
81 | iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc)); | 81 | iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc)); |
82 | 82 | ||
83 | if (cpu_is_u9540()) | 83 | if (cpu_is_ux540_family()) |
84 | iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); | 84 | iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); |
85 | else | 85 | else |
86 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); | 86 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index e2360e7c770d..4b0a9b300312 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -51,7 +51,7 @@ void __init ux500_init_irq(void) | |||
51 | void __iomem *dist_base; | 51 | void __iomem *dist_base; |
52 | void __iomem *cpu_base; | 52 | void __iomem *cpu_base; |
53 | 53 | ||
54 | if (cpu_is_u8500_family()) { | 54 | if (cpu_is_u8500_family() || cpu_is_ux540_family()) { |
55 | dist_base = __io_address(U8500_GIC_DIST_BASE); | 55 | dist_base = __io_address(U8500_GIC_DIST_BASE); |
56 | cpu_base = __io_address(U8500_GIC_CPU_BASE); | 56 | cpu_base = __io_address(U8500_GIC_CPU_BASE); |
57 | } else | 57 | } else |
diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index d1240e458a60..c7fcf694a32c 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h | |||
@@ -46,14 +46,24 @@ static inline bool __attribute_const__ cpu_is_u8520(void) | |||
46 | return dbx500_partnumber() == 0x8520; | 46 | return dbx500_partnumber() == 0x8520; |
47 | } | 47 | } |
48 | 48 | ||
49 | static inline bool cpu_is_u8500_family(void) | ||
50 | { | ||
51 | return cpu_is_u8500() || cpu_is_u8520(); | ||
52 | } | ||
53 | |||
49 | static inline bool __attribute_const__ cpu_is_u9540(void) | 54 | static inline bool __attribute_const__ cpu_is_u9540(void) |
50 | { | 55 | { |
51 | return dbx500_partnumber() == 0x9540; | 56 | return dbx500_partnumber() == 0x9540; |
52 | } | 57 | } |
53 | 58 | ||
54 | static inline bool cpu_is_u8500_family(void) | 59 | static inline bool __attribute_const__ cpu_is_u8540(void) |
60 | { | ||
61 | return dbx500_partnumber() == 0x8540; | ||
62 | } | ||
63 | |||
64 | static inline bool cpu_is_ux540_family(void) | ||
55 | { | 65 | { |
56 | return cpu_is_u8500() || cpu_is_u9540(); | 66 | return cpu_is_u9540() || cpu_is_u8540(); |
57 | } | 67 | } |
58 | 68 | ||
59 | /* | 69 | /* |
@@ -97,12 +107,7 @@ static inline bool cpu_is_u8500v21(void) | |||
97 | 107 | ||
98 | static inline bool cpu_is_u8500v20_or_later(void) | 108 | static inline bool cpu_is_u8500v20_or_later(void) |
99 | { | 109 | { |
100 | /* | 110 | return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); |
101 | * U9540 has so much in common with U8500 that is is considered a | ||
102 | * U8500 variant. | ||
103 | */ | ||
104 | return cpu_is_u9540() || | ||
105 | (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); | ||
106 | } | 111 | } |
107 | 112 | ||
108 | static inline bool ux500_is_svp(void) | 113 | static inline bool ux500_is_svp(void) |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index da1d5ad5bd45..cb35897c1ea3 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -48,7 +48,7 @@ static void write_pen_release(int val) | |||
48 | 48 | ||
49 | static void __iomem *scu_base_addr(void) | 49 | static void __iomem *scu_base_addr(void) |
50 | { | 50 | { |
51 | if (cpu_is_u8500_family()) | 51 | if (cpu_is_u8500_family() || cpu_is_ux540_family()) |
52 | return __io_address(U8500_SCU_BASE); | 52 | return __io_address(U8500_SCU_BASE); |
53 | else | 53 | else |
54 | ux500_unknown_soc(); | 54 | ux500_unknown_soc(); |