Patchwork arm: prevent coprocessor IO reset

login
register
mail settings
Submitter Lars Munch
Date May 8, 2010, 8:42 p.m.
Message ID <1273351363-9864-1-git-send-email-lars@segv.dk>
Download mbox | patch
Permalink /patch/51968/
State New
Headers show

Comments

Lars Munch - May 8, 2010, 8:42 p.m.
This prevent coprocessor IO structure from being reset on cpu reset. This was
a problem for PXA which uses coprocessor 6 and 14.

Signed-off-by: Lars Munch <lars@segv.dk>
---
 target-arm/cpu.h |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
Aurelien Jarno - May 28, 2010, 7:25 p.m.
On Sat, May 08, 2010 at 10:42:43PM +0200, Lars Munch wrote:
> This prevent coprocessor IO structure from being reset on cpu reset. This was
> a problem for PXA which uses coprocessor 6 and 14.
> 
> Signed-off-by: Lars Munch <lars@segv.dk>

Thanks, applied.

> ---
>  target-arm/cpu.h |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/target-arm/cpu.h b/target-arm/cpu.h
> index 1e34541..f3d138d 100644
> --- a/target-arm/cpu.h
> +++ b/target-arm/cpu.h
> @@ -148,13 +148,6 @@ typedef struct CPUARMState {
>          int pending_exception;
>      } v7m;
>  
> -    /* Coprocessor IO used by peripherals */
> -    struct {
> -        ARMReadCPFunc *cp_read;
> -        ARMWriteCPFunc *cp_write;
> -        void *opaque;
> -    } cp[15];
> -
>      /* Thumb-2 EE state.  */
>      uint32_t teecr;
>      uint32_t teehbr;
> @@ -204,6 +197,13 @@ typedef struct CPUARMState {
>      CPU_COMMON
>  
>      /* These fields after the common ones so they are preserved on reset.  */
> +
> +    /* Coprocessor IO used by peripherals */
> +    struct {
> +        ARMReadCPFunc *cp_read;
> +        ARMWriteCPFunc *cp_write;
> +        void *opaque;
> +    } cp[15];
>      void *nvic;
>      struct arm_boot_info *boot_info;
>  } CPUARMState;
> -- 
> 1.7.1
> 
> 
> 
>

Patch

diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 1e34541..f3d138d 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -148,13 +148,6 @@  typedef struct CPUARMState {
         int pending_exception;
     } v7m;
 
-    /* Coprocessor IO used by peripherals */
-    struct {
-        ARMReadCPFunc *cp_read;
-        ARMWriteCPFunc *cp_write;
-        void *opaque;
-    } cp[15];
-
     /* Thumb-2 EE state.  */
     uint32_t teecr;
     uint32_t teehbr;
@@ -204,6 +197,13 @@  typedef struct CPUARMState {
     CPU_COMMON
 
     /* These fields after the common ones so they are preserved on reset.  */
+
+    /* Coprocessor IO used by peripherals */
+    struct {
+        ARMReadCPFunc *cp_read;
+        ARMWriteCPFunc *cp_write;
+        void *opaque;
+    } cp[15];
     void *nvic;
     struct arm_boot_info *boot_info;
 } CPUARMState;