Commit c1270363 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge branch 'ux500-core' of...

Merge branch 'ux500-core' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/soc

Linus Walleij <linus.walleij@linaro.org>:

This cleans up, updates and structure the use of some ASIC ID
detection macros so they are understandable and consistent.

* 'ux500-core' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: add detection for DB8500 ASIC v2.2
  ARM: ux500: reform Ux500 family names
  ARM: ux500: add a U8520 detection macro
  ARM: ux500: delete remnant U5500 macros
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 0d7614f0 1d3266ec
......@@ -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();
......
......@@ -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));
......
......@@ -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
......
......@@ -41,43 +41,29 @@ static inline bool __attribute_const__ cpu_is_u8500(void)
return dbx500_partnumber() == 0x8500;
}
static inline bool __attribute_const__ cpu_is_u9540(void)
static inline bool __attribute_const__ cpu_is_u8520(void)
{
return dbx500_partnumber() == 0x9540;
return dbx500_partnumber() == 0x8520;
}
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;
return cpu_is_u8500() || cpu_is_u8520();
}
static inline bool __attribute_const__ cpu_is_u5500v2(void)
static inline bool __attribute_const__ cpu_is_u9540(void)
{
return (dbx500_id.revision & 0xf0) == 0xB0;
return dbx500_partnumber() == 0x9540;
}
static inline bool __attribute_const__ cpu_is_u5500v20(void)
static inline bool __attribute_const__ cpu_is_u8540(void)
{
return cpu_is_u5500() && ((dbx500_revision() & 0xf0) == 0xB0);
return dbx500_partnumber() == 0x8540;
}
static inline bool __attribute_const__ cpu_is_u5500v21(void)
static inline bool cpu_is_ux540_family(void)
{
return cpu_is_u5500() && (dbx500_revision() == 0xB1);
return cpu_is_u9540() || cpu_is_u8540();
}
/*
......@@ -119,14 +105,14 @@ 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)
{
/*
* 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)
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment