diff mbox

[v2,8/9] s3adsp1800: Remove the hardcoded values from the reset

Message ID bf7a27b23c002a0be7dc76138322b7335a0c00f5.1433481032.git.alistair.francis@xilinx.com
State New
Headers show

Commit Message

Alistair Francis June 5, 2015, 6:43 a.m. UTC
Remove the hardcoded values from the machine specific reset
function, as the same values are already set in the standard
MicroBlaze reset.

This also allows the entire reset function to be deleted, as
PVR registers are now preserved on reset.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/microblaze/petalogix_s3adsp1800_mmu.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

Comments

Peter Crosthwaite June 15, 2015, 2:44 a.m. UTC | #1
On Thu, Jun 4, 2015 at 11:43 PM, Alistair Francis
<alistair.francis@xilinx.com> wrote:
> Remove the hardcoded values from the machine specific reset
> function, as the same values are already set in the standard
> MicroBlaze reset.
>
> This also allows the entire reset function to be deleted, as
> PVR registers are now preserved on reset.
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

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

> ---
>  hw/microblaze/petalogix_s3adsp1800_mmu.c |    9 +--------
>  1 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
> index 84f6e74..7109e63 100644
> --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
> +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
> @@ -51,13 +51,6 @@
>  #define ETHLITE_IRQ         1
>  #define UARTLITE_IRQ        3
>
> -static void machine_cpu_reset(MicroBlazeCPU *cpu)
> -{
> -    CPUMBState *env = &cpu->env;
> -
> -    env->pvr.regs[10] = 0x0c000000; /* spartan 3a dsp family.  */
> -}
> -
>  static void
>  petalogix_s3adsp1800_init(MachineState *machine)
>  {
> @@ -132,7 +125,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
>      microblaze_load_kernel(cpu, ddr_base, ram_size,
>                             machine->initrd_filename,
>                             BINARY_DEVICE_TREE_FILE,
> -                           machine_cpu_reset);
> +                           NULL);
>  }
>
>  static QEMUMachine petalogix_s3adsp1800_machine = {
> --
> 1.7.1
>
>
diff mbox

Patch

diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 84f6e74..7109e63 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -51,13 +51,6 @@ 
 #define ETHLITE_IRQ         1
 #define UARTLITE_IRQ        3
 
-static void machine_cpu_reset(MicroBlazeCPU *cpu)
-{
-    CPUMBState *env = &cpu->env;
-
-    env->pvr.regs[10] = 0x0c000000; /* spartan 3a dsp family.  */
-}
-
 static void
 petalogix_s3adsp1800_init(MachineState *machine)
 {
@@ -132,7 +125,7 @@  petalogix_s3adsp1800_init(MachineState *machine)
     microblaze_load_kernel(cpu, ddr_base, ram_size,
                            machine->initrd_filename,
                            BINARY_DEVICE_TREE_FILE,
-                           machine_cpu_reset);
+                           NULL);
 }
 
 static QEMUMachine petalogix_s3adsp1800_machine = {