From patchwork Tue Jun 15 22:40:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 55826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C3B5FB7D9E for ; Wed, 16 Jun 2010 09:24:25 +1000 (EST) Received: from localhost ([127.0.0.1]:51311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOfTr-0006sj-8H for incoming@patchwork.ozlabs.org; Tue, 15 Jun 2010 19:23:43 -0400 Received: from [140.186.70.92] (port=33786 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOeo3-0000fQ-05 for qemu-devel@nongnu.org; Tue, 15 Jun 2010 18:40:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOeo1-0005xR-Q5 for qemu-devel@nongnu.org; Tue, 15 Jun 2010 18:40:30 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:52070) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOeo1-0005xI-FL for qemu-devel@nongnu.org; Tue, 15 Jun 2010 18:40:29 -0400 Received: from smtp01.web.de ( [172.20.0.243]) by fmmailgate03.web.de (Postfix) with ESMTP id D69031569378B; Wed, 16 Jun 2010 00:40:28 +0200 (CEST) Received: from [92.74.52.35] (helo=[192.168.1.10]) by smtp01.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OOeo0-0000qe-00; Wed, 16 Jun 2010 00:40:28 +0200 Message-ID: <4C18015C.1070306@web.de> Date: Wed, 16 Jun 2010 00:40:28 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: qemu-devel X-Enigmail-Version: 0.95.7 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX19Y1zsc6BPDBB7YVr3ZYXtDmZisfWNWn7W1YGOd AbJquRk5pkLHg1aNVTrBmrJfbZ3tcEkLgNwcKfwLuw8Kaxt0Ob FTSZFb9aI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Gleb Natapov Subject: [Qemu-devel] [PATCH] hpet: Clean up initial hpet counter X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka There is no need starting with the special value for hpet_cfg.count. Either Seabios is aware of the new firmware interface and properly interprets the counter or it simply ignores it anyway. Signed-off-by: Jan Kiszka --- hw/hpet.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index d5c406c..ed4e995 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -74,7 +74,7 @@ typedef struct HPETState { uint8_t hpet_id; /* instance id */ } HPETState; -struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX}; +struct hpet_fw_config hpet_cfg; static uint32_t hpet_in_legacy_mode(HPETState *s) { @@ -682,11 +682,6 @@ static int hpet_init(SysBusDevice *dev) int i, iomemtype; HPETTimer *timer; - if (hpet_cfg.count == UINT8_MAX) { - /* first instance */ - hpet_cfg.count = 0; - } - if (hpet_cfg.count == 8) { fprintf(stderr, "Only 8 instances of HPET is allowed\n"); return -1;