From patchwork Sun Mar 4 11:03:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peter A. G. Crosthwaite" X-Patchwork-Id: 144487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 76ED8B6FA1 for ; Sun, 4 Mar 2012 22:04:52 +1100 (EST) Received: from localhost ([::1]:43380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S49FA-0004uI-4D for incoming@patchwork.ozlabs.org; Sun, 04 Mar 2012 06:04:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S49F0-0004mM-Rh for qemu-devel@nongnu.org; Sun, 04 Mar 2012 06:04:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S49Eg-0007vo-OU for qemu-devel@nongnu.org; Sun, 04 Mar 2012 06:04:38 -0500 Received: from mail-pz0-f46.google.com ([209.85.210.46]:44843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S49Eg-0007tf-Hi for qemu-devel@nongnu.org; Sun, 04 Mar 2012 06:04:18 -0500 Received: by mail-pz0-f46.google.com with SMTP id r28so5035840daj.33 for ; Sun, 04 Mar 2012 03:04:17 -0800 (PST) Received-SPF: pass (google.com: domain of peter.crosthwaite@petalogix.com designates 10.68.208.196 as permitted sender) client-ip=10.68.208.196; Authentication-Results: mr.google.com; spf=pass (google.com: domain of peter.crosthwaite@petalogix.com designates 10.68.208.196 as permitted sender) smtp.mail=peter.crosthwaite@petalogix.com Received: from mr.google.com ([10.68.208.196]) by 10.68.208.196 with SMTP id mg4mr36617806pbc.108.1330859057589 (num_hops = 1); Sun, 04 Mar 2012 03:04:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.208.196 with SMTP id mg4mr31233763pbc.108.1330859057536; Sun, 04 Mar 2012 03:04:17 -0800 (PST) Received: from localhost (d58-106-136-119.rdl802.qld.optusnet.com.au. [58.106.136.119]) by mx.google.com with ESMTPS id l8sm10246022pbi.0.2012.03.04.03.04.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Mar 2012 03:04:16 -0800 (PST) From: "Peter A. G. Crosthwaite" To: qemu-devel@nongnu.org, edgar.iglesias@gmail.com, john.williams@petalogix.com Date: Sun, 4 Mar 2012 21:03:52 +1000 Message-Id: <43eef91e831b7bc85d2a891e5623082931e83f24.1330857887.git.peter.crosthwaite@petalogix.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQlYtc19HXd6UPVFqciYyanlDkj5mWU5dl0CYnF4FQxp61G9FZAVIU5iXR9AmEHfKN8JSY3k X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.46 Cc: "Peter A. G. Crosthwaite" , peter.maydell@linaro.org, paul@codesourcery.com Subject: [Qemu-devel] [PATCH v1 2/5] petalogix_s2adsp1800: moved rst logic to rst fn X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Peter A. G. Crosthwaite" This belongs in the machine specific reset function Signed-off-by: Peter A. G. Crosthwaite --- hw/petalogix_s3adsp1800_mmu.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c index 7c6e9b8..99c3590 100644 --- a/hw/petalogix_s3adsp1800_mmu.c +++ b/hw/petalogix_s3adsp1800_mmu.c @@ -42,6 +42,12 @@ #define BINARY_DEVICE_TREE_FILE "petalogix-s3adsp1800.dtb" +static void machine_cpu_reset(CPUState *env) +{ + /* FIXME: move to machine specfic cpu reset */ + env->pvr.regs[10] = 0x0c000000; /* spartan 3a dsp family. */ +} + static void petalogix_s3adsp1800_init(ram_addr_t ram_size, const char *boot_device, @@ -53,6 +59,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size, CPUState *env; DriveInfo *dinfo; int i; + /* FIXME: remove harcoded magic numbers */ target_phys_addr_t ddr_base = 0x90000000; MemoryRegion *phys_lmb_bram = g_new(MemoryRegion, 1); MemoryRegion *phys_ram = g_new(MemoryRegion, 1); @@ -65,9 +72,6 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size, } env = cpu_init(cpu_model); - /* FIXME: move to machine specfic cpu reset */ - env->pvr.regs[10] = 0x0c000000; /* spartan 3a dsp family. */ - /* Attach emulated BRAM through the LMB. */ memory_region_init_ram(phys_lmb_bram, "petalogix_s3adsp1800.lmb_bram", LMB_BRAM_SIZE); @@ -97,7 +101,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size, xilinx_ethlite_create(&nd_table[0], 0x81000000, irq[1], 0, 0); microblaze_load_kernel(env, ddr_base, ram_size, - BINARY_DEVICE_TREE_FILE, NULL); + BINARY_DEVICE_TREE_FILE, machine_cpu_reset); } static QEMUMachine petalogix_s3adsp1800_machine = {