mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ARM: integrator: core module registers from compatible strings
This augments the core machine code for the Integrator platforms to get their references to the core module device nodes by using compatible strings instead of predefined node names and rename the CP syscon node to be simply "syscon". Reported-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
99d14a1d9b
commit
df36680f1a
5 changed files with 33 additions and 17 deletions
|
@ -19,18 +19,22 @@ Required nodes:
|
||||||
- regs: the location and size of the core module registers, one
|
- regs: the location and size of the core module registers, one
|
||||||
range of 0x200 bytes.
|
range of 0x200 bytes.
|
||||||
|
|
||||||
- cpcon/syscon: the root node the Integrator/CP must have a /cpcon
|
- syscon: the root node of the Integrator platforms must have a
|
||||||
node pointing to the CP control registers, and the Integrator/AP
|
system controller node pointong to the control registers,
|
||||||
must have a /syscon node pointing to the Integrator/AP system
|
with the compatible string
|
||||||
controller. The AP syscon node must include the logical module
|
"arm,integrator-ap-syscon"
|
||||||
interrupts.
|
"arm,integrator-cp-syscon"
|
||||||
|
respectively.
|
||||||
|
|
||||||
In the root node the Integrator/CP must have a /cpcon node pointing
|
Required properties for the system controller:
|
||||||
to the CP control registers, and the Integrator/AP must have a
|
- regs: the location and size of the system controller registers,
|
||||||
/syscon node pointing to the Integrator/AP system controller.
|
one range of 0x100 bytes.
|
||||||
The AP syscon node must include the logic module interrupts, stated
|
|
||||||
in order of module instance <module 0, module 1, module 2 ...>
|
Required properties for the AP system controller:
|
||||||
example:
|
- interrupts: the AP syscon node must include the logical module
|
||||||
|
interrupts, stated in order of module instance <module 0>,
|
||||||
|
<module 1>, <module 2> ... for the CP system controller this
|
||||||
|
is not required not of any use.
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/include/ "integrator.dtsi"
|
/include/ "integrator.dtsi"
|
||||||
|
@ -45,7 +49,7 @@ example:
|
||||||
};
|
};
|
||||||
|
|
||||||
syscon {
|
syscon {
|
||||||
/* AP system controller registers */
|
compatible = "arm,integrator-ap-syscon";
|
||||||
reg = <0x11000000 0x100>;
|
reg = <0x11000000 0x100>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
/* These are the logic module IRQs */
|
/* These are the logic module IRQs */
|
||||||
|
|
|
@ -19,7 +19,7 @@ chosen {
|
||||||
};
|
};
|
||||||
|
|
||||||
syscon {
|
syscon {
|
||||||
/* AP system controller registers */
|
compatible = "arm,integrator-ap-syscon";
|
||||||
reg = <0x11000000 0x100>;
|
reg = <0x11000000 0x100>;
|
||||||
interrupt-parent = <&pic>;
|
interrupt-parent = <&pic>;
|
||||||
/* These are the logical module IRQs */
|
/* These are the logical module IRQs */
|
||||||
|
|
|
@ -18,8 +18,8 @@ chosen {
|
||||||
bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
|
bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
|
||||||
};
|
};
|
||||||
|
|
||||||
cpcon {
|
syscon {
|
||||||
/* CP controller registers */
|
compatible = "arm,integrator-cp-syscon";
|
||||||
reg = <0xcb000000 0x100>;
|
reg = <0xcb000000 0x100>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -470,6 +470,11 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = {
|
||||||
{ /* sentinel */ },
|
{ /* sentinel */ },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct of_device_id ap_syscon_match[] = {
|
||||||
|
{ .compatible = "arm,integrator-ap-syscon"},
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
|
||||||
static void __init ap_init_of(void)
|
static void __init ap_init_of(void)
|
||||||
{
|
{
|
||||||
unsigned long sc_dec;
|
unsigned long sc_dec;
|
||||||
|
@ -486,7 +491,8 @@ static void __init ap_init_of(void)
|
||||||
root = of_find_node_by_path("/");
|
root = of_find_node_by_path("/");
|
||||||
if (!root)
|
if (!root)
|
||||||
return;
|
return;
|
||||||
syscon = of_find_node_by_path("/syscon");
|
|
||||||
|
syscon = of_find_matching_node(root, ap_syscon_match);
|
||||||
if (!syscon)
|
if (!syscon)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -286,6 +286,11 @@ static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = {
|
||||||
{ /* sentinel */ },
|
{ /* sentinel */ },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct of_device_id intcp_syscon_match[] = {
|
||||||
|
{ .compatible = "arm,integrator-cp-syscon"},
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
|
||||||
static void __init intcp_init_of(void)
|
static void __init intcp_init_of(void)
|
||||||
{
|
{
|
||||||
struct device_node *root;
|
struct device_node *root;
|
||||||
|
@ -300,7 +305,8 @@ static void __init intcp_init_of(void)
|
||||||
root = of_find_node_by_path("/");
|
root = of_find_node_by_path("/");
|
||||||
if (!root)
|
if (!root)
|
||||||
return;
|
return;
|
||||||
cpcon = of_find_node_by_path("/cpcon");
|
|
||||||
|
cpcon = of_find_matching_node(root, intcp_syscon_match);
|
||||||
if (!cpcon)
|
if (!cpcon)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue