From nobody Sun Oct 5 08:12:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1592421543; cv=none; d=zohomail.com; s=zohoarc; b=MyJfeFmRo9He/7U4hOAlxNgwXQExb45LXuGQh5gy9ZpJUbVSR2JqzEta4ujtClXo3qz9/3lzTL2Nyr90/smgphLEYBEYBe7+K6V7FfGXOOIQHJknUDwVXLynk6RghayvXyIYonO9kx+cHHFa3oEAVCnJcNd1uTvrALi87pdSpjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592421543; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8b3HXRDRgYc7wWaPey7dft5cQmLY7o7QcJ77viT780g=; b=jcELGACnglgW1+o59x15rkmntSw//jzpnXfsFeyBDP8HM4HQSJpdIle/E+PqU8zPLwVObeQv1zWcA8hksYx5384TpX2WAjfUE3ndiSswjCuNwSzzfdQO5UkuGMlT+xVgt0Lv6GmOGlkAEFfzzWBUAHw36Tq60zbfO0R8Oda8ke0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1592421543941496.73073162275193; Wed, 17 Jun 2020 12:19:03 -0700 (PDT) Received: from localhost ([::1]:44564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jldaQ-0001dP-Vv for importer@patchew.org; Wed, 17 Jun 2020 15:19:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jldWz-0004B5-51 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 15:15:29 -0400 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:42286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jldWx-0006TT-N2 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 15:15:28 -0400 Received: by mail-ej1-x644.google.com with SMTP id k11so3719437ejr.9 for ; Wed, 17 Jun 2020 12:15:27 -0700 (PDT) Received: from x1w.redhat.com (93.red-83-59-160.dynamicip.rima-tde.net. [83.59.160.93]) by smtp.gmail.com with ESMTPSA id y21sm324308edl.72.2020.06.17.12.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 12:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8b3HXRDRgYc7wWaPey7dft5cQmLY7o7QcJ77viT780g=; b=vfUBKkK4b827oAf5p5fBgCkTpAcAzpMIGdpHTMsuiHQCwJ8KcLOCSfQh7COjkunxOZ y1aQSqGJM9Hy4zdseg7T1M6amtSTWNsmQaXXmrRdFnR8KjbgkB20ggByA+SddzsWKTEv XxSV1f0h7RUHS6MMZMOaD+FOApg9Q0yBFXU8yeWCScroR3ksmEj4w9o6s1pYd3fOGxDK 7bpJczYoyC9JRjmzEDQI2VvSaJx83CKewqcU/rVLBFQ+gVBdh8CIsvt/xXX/pOdogXgQ KFt/FHdL282CPb1pdzpq93D9dz/D+FKzdLNNXU0wa5JDdAmnOCjMe+pFZz5yBPVZuKIp oznQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8b3HXRDRgYc7wWaPey7dft5cQmLY7o7QcJ77viT780g=; b=if67aHgrXHlZimVRwfOekVRkWTpKBoSbdijdIMkAq+dbZ/eHZO1gBIc2WybD4TkK5P wYIulZr+6F6YBfg5e7Qf6Y4PH1Om/1wRIG6P2T/R19xtOc4x+biwRuFd4HLBkgpoR9j+ z1dmRJ6tXiLUXpLSaimt6E39y4u8RqElulwuIrgCWgD9MoqxZIWGgG/TGZjL/SI0P6L6 lPku0A1HDgon9p/4eoH63xpVXxJbkm0p92J05A6cUqWaLPp1sI/t30itKCKphuI0JWha QeAssWE0ZRUZ1AfV0vPNj9Izz3yG1l+2IwM8jD3DXoZFyJosdGQDbyF114qX/fX0epy4 ac1A== X-Gm-Message-State: AOAM530IIAHVfk6bpwYRK2I3aa4O2ZGo0fNGm920UVEUcrWPlS98ziu6 5NjlBJMoYS0Um/U/iaPmMjM66UXm X-Google-Smtp-Source: ABdhPJyWu/ShVoFxEyBXZufWccRLw0FN6MNK6AJDfBzYAwTUBTRAQbGsilIVwygT44cIWpIZL95mcw== X-Received: by 2002:a17:906:8614:: with SMTP id o20mr652619ejx.444.1592421326418; Wed, 17 Jun 2020 12:15:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Richard Henderson , Yoshinori Sato , qemu-devel@nongnu.org Subject: [PATCH rc1 04/15] hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' Date: Wed, 17 Jun 2020 21:15:08 +0200 Message-Id: <20200617191519.14842-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200617191519.14842-1-f4bug@amsat.org> References: <20200617191519.14842-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::644; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Magnus Damm , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Extract timer definitions to 'hw/timer/tmu012.h'. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/sh4/sh.h | 9 --------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 2 ++ 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 include/hw/timer/tmu012.h diff --git a/include/hw/sh4/sh.h b/include/hw/sh4/sh.h index fe773cb01d..93f464bf4c 100644 --- a/include/hw/sh4/sh.h +++ b/include/hw/sh4/sh.h @@ -27,15 +27,6 @@ typedef struct { =20 int sh7750_register_io_device(struct SH7750State *s, sh7750_io_device * device); -/* sh_timer.c */ -#define TMU012_FEAT_TOCR (1 << 0) -#define TMU012_FEAT_3CHAN (1 << 1) -#define TMU012_FEAT_EXTCLK (1 << 2) -void tmu012_init(MemoryRegion *sysmem, hwaddr base, - int feat, uint32_t freq, - qemu_irq ch0_irq, qemu_irq ch1_irq, - qemu_irq ch2_irq0, qemu_irq ch2_irq1); - =20 /* sh_serial.c */ #define SH_SERIAL_FEAT_SCIF (1 << 0) diff --git a/include/hw/timer/tmu012.h b/include/hw/timer/tmu012.h new file mode 100644 index 0000000000..808ed8de1d --- /dev/null +++ b/include/hw/timer/tmu012.h @@ -0,0 +1,23 @@ +/* + * SuperH Timer + * + * Copyright (c) 2007 Magnus Damm + * + * This code is licensed under the GPL. + */ + +#ifndef HW_TIMER_TMU012_H +#define HW_TIMER_TMU012_H + +#include "exec/hwaddr.h" + +#define TMU012_FEAT_TOCR (1 << 0) +#define TMU012_FEAT_3CHAN (1 << 1) +#define TMU012_FEAT_EXTCLK (1 << 2) + +void tmu012_init(MemoryRegion *sysmem, hwaddr base, + int feat, uint32_t freq, + qemu_irq ch0_irq, qemu_irq ch1_irq, + qemu_irq ch2_irq0, qemu_irq ch2_irq1); + +#endif diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c index d660714443..f8ac3ec6e3 100644 --- a/hw/sh4/sh7750.c +++ b/hw/sh4/sh7750.c @@ -30,6 +30,7 @@ #include "sh7750_regs.h" #include "sh7750_regnames.h" #include "hw/sh4/sh_intc.h" +#include "hw/timer/tmu012.h" #include "cpu.h" #include "exec/exec-all.h" =20 diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 13c4051808..b9cbacf5d0 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -9,10 +9,12 @@ */ =20 #include "qemu/osdep.h" +#include "exec/memory.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" #include "qemu/timer.h" +#include "hw/timer/tmu012.h" #include "hw/ptimer.h" =20 //#define DEBUG_TIMER --=20 2.21.3