From a8035217324d52a316c4dd109736f9ebd5124951 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 9 Aug 2012 16:26:27 +0200 Subject: ARM: ux500: delete remnant U5500 macros The code using these ASIC detection functions is now gone so we remove it. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/include/mach/id.h | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index c6e2db9e9e51..87aa921f3d17 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h @@ -51,35 +51,6 @@ static inline bool cpu_is_u8500_family(void) return cpu_is_u8500() || cpu_is_u9540(); } -static inline bool __attribute_const__ cpu_is_u5500(void) -{ - return dbx500_partnumber() == 0x5500; -} - -/* - * 5500 revisions - */ - -static inline bool __attribute_const__ cpu_is_u5500v1(void) -{ - return cpu_is_u5500() && (dbx500_revision() & 0xf0) == 0xA0; -} - -static inline bool __attribute_const__ cpu_is_u5500v2(void) -{ - return (dbx500_id.revision & 0xf0) == 0xB0; -} - -static inline bool __attribute_const__ cpu_is_u5500v20(void) -{ - return cpu_is_u5500() && ((dbx500_revision() & 0xf0) == 0xB0); -} - -static inline bool __attribute_const__ cpu_is_u5500v21(void) -{ - return cpu_is_u5500() && (dbx500_revision() == 0xB1); -} - /* * 8500 revisions */ -- cgit v1.2.3 From a4d9b33be02bd826e09ddfebdd8ac4ccdf1aeee3 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 9 Aug 2012 16:34:41 +0200 Subject: ARM: ux500: add a U8520 detection macro In line with the other macros this detects the DB8520 ASIC variant. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/include/mach/id.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index 87aa921f3d17..d1240e458a60 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h @@ -41,6 +41,11 @@ static inline bool __attribute_const__ cpu_is_u8500(void) return dbx500_partnumber() == 0x8500; } +static inline bool __attribute_const__ cpu_is_u8520(void) +{ + return dbx500_partnumber() == 0x8520; +} + static inline bool __attribute_const__ cpu_is_u9540(void) { return dbx500_partnumber() == 0x9540; -- cgit v1.2.3 From e1bbb55d11622012197a654af874f9f485ddbc47 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 9 Aug 2012 17:10:36 +0200 Subject: 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 --- arch/arm/mach-ux500/cache-l2x0.c | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 2 +- arch/arm/mach-ux500/cpu.c | 2 +- arch/arm/mach-ux500/include/mach/id.h | 21 +++++++++++++-------- arch/arm/mach-ux500/platsmp.c | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) (limited to 'arch/arm/mach-ux500') 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) { u32 aux_val = 0x3e000000; - if (cpu_is_u8500_family()) + if (cpu_is_u8500_family() || cpu_is_ux540_family()) l2x0_base = __io_address(U8500_L2CC_BASE); else 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) iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc)); - if (cpu_is_u9540()) + if (cpu_is_ux540_family()) iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc)); else 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) void __iomem *dist_base; void __iomem *cpu_base; - if (cpu_is_u8500_family()) { + if (cpu_is_u8500_family() || cpu_is_ux540_family()) { dist_base = __io_address(U8500_GIC_DIST_BASE); cpu_base = __io_address(U8500_GIC_CPU_BASE); } 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) return dbx500_partnumber() == 0x8520; } +static inline bool cpu_is_u8500_family(void) +{ + return cpu_is_u8500() || cpu_is_u8520(); +} + static inline bool __attribute_const__ cpu_is_u9540(void) { return dbx500_partnumber() == 0x9540; } -static inline bool cpu_is_u8500_family(void) +static inline bool __attribute_const__ cpu_is_u8540(void) +{ + return dbx500_partnumber() == 0x8540; +} + +static inline bool cpu_is_ux540_family(void) { - return cpu_is_u8500() || cpu_is_u9540(); + return cpu_is_u9540() || cpu_is_u8540(); } /* @@ -97,12 +107,7 @@ static inline bool cpu_is_u8500v21(void) static inline bool cpu_is_u8500v20_or_later(void) { - /* - * U9540 has so much in common with U8500 that is is considered a - * U8500 variant. - */ - return cpu_is_u9540() || - (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); + return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); } 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) static void __iomem *scu_base_addr(void) { - if (cpu_is_u8500_family()) + if (cpu_is_u8500_family() || cpu_is_ux540_family()) return __io_address(U8500_SCU_BASE); else ux500_unknown_soc(); -- cgit v1.2.3 From 1d3266ecca67066e537fe0e0669bed77d355f886 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 9 Aug 2012 17:46:27 +0200 Subject: ARM: ux500: add detection for DB8500 ASIC v2.2 Add a macro to properly detect the v2.2 version of the DB8500 ASIC. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/include/mach/id.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/include/mach/id.h index c7fcf694a32c..9c42642ab168 100644 --- a/arch/arm/mach-ux500/include/mach/id.h +++ b/arch/arm/mach-ux500/include/mach/id.h @@ -105,6 +105,11 @@ static inline bool cpu_is_u8500v21(void) return cpu_is_u8500() && (dbx500_revision() == 0xB1); } +static inline bool cpu_is_u8500v22(void) +{ + return cpu_is_u8500() && (dbx500_revision() == 0xB2); +} + static inline bool cpu_is_u8500v20_or_later(void) { return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); -- cgit v1.2.3 From 79964bcd792fd9625affb4d7092ee09697f0409a Mon Sep 17 00:00:00 2001 From: Loic PALLARDY Date: Mon, 3 Sep 2012 15:10:23 +0200 Subject: ARM: ux500: Correct Ux500 family names usage Update users with cpu_is_ux540_family() to keep x540 family functional. Signed-off-by: Loic Pallardy Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson --- arch/arm/mach-ux500/clock.c | 2 +- arch/arm/mach-ux500/platsmp.c | 2 +- arch/arm/mach-ux500/timer.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-ux500') diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 8d73b066a18d..bc5a516a5865 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c @@ -149,7 +149,7 @@ static unsigned long clk_mtu_get_rate(struct clk *clk) unsigned long mturate; unsigned long retclk; - if (cpu_is_u8500_family()) + if (cpu_is_u8500_family() || cpu_is_ux540_family()) addr = __io_address(U8500_PRCMU_BASE); else ux500_unknown_soc(); diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index cb35897c1ea3..a5dda68444db 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c @@ -118,7 +118,7 @@ static void __init wakeup_secondary(void) { void __iomem *backupram; - if (cpu_is_u8500_family()) + if (cpu_is_u8500_family() || cpu_is_ux540_family()) backupram = __io_address(U8500_BACKUPRAM0_BASE); else ux500_unknown_soc(); diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index 66e7f00884ab..6f39731951b0 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c @@ -54,7 +54,7 @@ static void __init ux500_timer_init(void) void __iomem *tmp_base; struct device_node *np; - if (cpu_is_u8500_family()) { + if (cpu_is_u8500_family() || cpu_is_ux540_family()) { mtu_timer_base = __io_address(U8500_MTU0_BASE); prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); } else { -- cgit v1.2.3