diff mbox

[arm-midr,v3,1/2] ARM: Convert MIDR to a property

Message ID 878613f2f12d4162f12629522fd99de8df904856.1390176489.git.alistair.francis@xilinx.com
State New
Headers show

Commit Message

Alistair Francis Jan. 20, 2014, 12:09 a.m. UTC
Convert the MIDR register to a property. This allows boards to later set
a custom MIDR value. This has been done in such a way to maintain
compatibility with all existing CPUs and boards

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---
I originally added the properties to the cpu->midr variable in a similar
method to how Peter Crosthwaite did in his 'Fix Support for ARM CBAR and
reset-hivecs' series.
V3: Removed the initialisation of the MIDR property from arm_cpu_post_init
as it is no longer needed
V2: Use dc->props to avoid using qdev_*

 target-arm/cpu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Peter Crosthwaite Jan. 23, 2014, 1:08 p.m. UTC | #1
On Mon, Jan 20, 2014 at 10:09 AM, Alistair Francis
<alistair.francis@xilinx.com> wrote:
> Convert the MIDR register to a property. This allows boards to later set
> a custom MIDR value. This has been done in such a way to maintain
> compatibility with all existing CPUs and boards
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

> ---
> I originally added the properties to the cpu->midr variable in a similar
> method to how Peter Crosthwaite did in his 'Fix Support for ARM CBAR and
> reset-hivecs' series.
> V3: Removed the initialisation of the MIDR property from arm_cpu_post_init
> as it is no longer needed
> V2: Use dc->props to avoid using qdev_*
>
>  target-arm/cpu.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 52efd5d..45ad7f0 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -982,6 +982,7 @@ static const ARMCPUInfo arm_cpus[] = {
>
>  static Property arm_cpu_properties[] = {
>      DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false),
> +    DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0),
>      DEFINE_PROP_END_OF_LIST()
>  };
>
> --
> 1.7.1
>
>
Andreas Färber Jan. 23, 2014, 1:11 p.m. UTC | #2
Am 23.01.2014 14:08, schrieb Peter Crosthwaite:
> On Mon, Jan 20, 2014 at 10:09 AM, Alistair Francis
> <alistair.francis@xilinx.com> wrote:
>> Convert the MIDR register to a property. This allows boards to later set
>> a custom MIDR value. This has been done in such a way to maintain
>> compatibility with all existing CPUs and boards
>>
>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>

Please use consistent subject prefixes as seen in Git history, in this
case "target-arm", not "ARM".

Andreas

> 
> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> 
>> ---
>> I originally added the properties to the cpu->midr variable in a similar
>> method to how Peter Crosthwaite did in his 'Fix Support for ARM CBAR and
>> reset-hivecs' series.
>> V3: Removed the initialisation of the MIDR property from arm_cpu_post_init
>> as it is no longer needed
>> V2: Use dc->props to avoid using qdev_*
>>
>>  target-arm/cpu.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
>> index 52efd5d..45ad7f0 100644
>> --- a/target-arm/cpu.c
>> +++ b/target-arm/cpu.c
>> @@ -982,6 +982,7 @@ static const ARMCPUInfo arm_cpus[] = {
>>
>>  static Property arm_cpu_properties[] = {
>>      DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false),
>> +    DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0),
>>      DEFINE_PROP_END_OF_LIST()
>>  };
>>
>> --
>> 1.7.1
>>
>>
diff mbox

Patch

diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 52efd5d..45ad7f0 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -982,6 +982,7 @@  static const ARMCPUInfo arm_cpus[] = {
 
 static Property arm_cpu_properties[] = {
     DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false),
+    DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0),
     DEFINE_PROP_END_OF_LIST()
 };