Skip to content

Commit

Permalink
Merge branch 'vexpress/fixes' of git://git.linaro.org/people/pawelmol…
Browse files Browse the repository at this point in the history
…l/linux into fixes

From Pawel Moll:
- makes the V2P-CA15_A7 (a.k.a. TC2) work with 3.8 kernels
- improves vexpress-sysreg.c behaviour on arm64 platforms

* 'vexpress/fixes' of git://git.linaro.org/people/pawelmoll/linux:
  mfd: vexpress-sysreg: Don't skip initialization on probe
  ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
  ARM: vexpress: extend the MPIDR range used for pen release check
  • Loading branch information
Olof Johansson committed Jan 24, 2013
2 parents 60fd8e3 + 5266629 commit 3836414
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
2 changes: 0 additions & 2 deletions arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
reg = <1>;
};

/* A7s disabled till big.LITTLE patches are available...
cpu2: cpu@2 {
device_type = "cpu";
compatible = "arm,cortex-a7";
Expand All @@ -63,7 +62,6 @@
compatible = "arm,cortex-a7";
reg = <0x102>;
};
*/
};

memory@80000000 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-versatile/headsmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
ENTRY(versatile_secondary_startup)
mrc p15, 0, r0, c0, c0, 5
and r0, r0, #15
bic r0, #0xff000000
adr r4, 1f
ldmia r4, {r5, r6}
sub r4, r4, r5
Expand Down
32 changes: 20 additions & 12 deletions drivers/mfd/vexpress-sysreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,19 +313,11 @@ static void vexpress_sysreg_config_complete(unsigned long data)
}


void __init vexpress_sysreg_early_init(void __iomem *base)
void __init vexpress_sysreg_setup(struct device_node *node)
{
struct device_node *node = of_find_compatible_node(NULL, NULL,
"arm,vexpress-sysreg");

if (node)
base = of_iomap(node, 0);

if (WARN_ON(!base))
if (WARN_ON(!vexpress_sysreg_base))
return;

vexpress_sysreg_base = base;

if (readl(vexpress_sysreg_base + SYS_MISC) & SYS_MISC_MASTERSITE)
vexpress_master_site = VEXPRESS_SITE_DB2;
else
Expand All @@ -336,9 +328,23 @@ void __init vexpress_sysreg_early_init(void __iomem *base)
WARN_ON(!vexpress_sysreg_config_bridge);
}

void __init vexpress_sysreg_early_init(void __iomem *base)
{
vexpress_sysreg_base = base;
vexpress_sysreg_setup(NULL);
}

void __init vexpress_sysreg_of_early_init(void)
{
vexpress_sysreg_early_init(NULL);
struct device_node *node = of_find_compatible_node(NULL, NULL,
"arm,vexpress-sysreg");

if (node) {
vexpress_sysreg_base = of_iomap(node, 0);
vexpress_sysreg_setup(node);
} else {
pr_info("vexpress-sysreg: No Device Tree node found.");
}
}


Expand Down Expand Up @@ -426,9 +432,11 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
return -EBUSY;
}

if (!vexpress_sysreg_base)
if (!vexpress_sysreg_base) {
vexpress_sysreg_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
vexpress_sysreg_setup(pdev->dev.of_node);
}

if (!vexpress_sysreg_base) {
dev_err(&pdev->dev, "Failed to obtain base address!\n");
Expand Down

0 comments on commit 3836414

Please sign in to comment.