From patchwork Thu Feb 15 17:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 772970 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp966811wre; Thu, 15 Feb 2024 10:04:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWqtg/y11nVZT8A5NBXYJ4U3ZzYUapzgUdIGJvqh4Pwft0+mUFfJFy1hApOeglnCh8Bk600qwfCjYsc6PnZ9/iJ X-Google-Smtp-Source: AGHT+IEZ0jQXJhnIlbA+6MI0VACS0otxRrCY2RoEhhOYvsVRANi4m3zcAqNjYcKR8ToTnnqKfrRD X-Received: by 2002:a05:6102:508c:b0:46d:2e28:366a with SMTP id bl12-20020a056102508c00b0046d2e28366amr3282182vsb.18.1708020296244; Thu, 15 Feb 2024 10:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020296; cv=none; d=google.com; s=arc-20160816; b=CtGKE/1AA2DrJCUepeK+5CohFXzOf3btT7KRa85LvIY8WgSdpquOWzf5J1gt6eW84t 15MMPJhlkfsme50m6AhUI3K34lirPDIhG1MnOgwV3iW71dY+5/wxgD82rVhp9j6vuGf3 SSSiMU17PQMlKrRP/KWd94DQb42CpT9oXAqkCmj05YtUNBs5v1H/93aLvdLs2leehUUT TIA/JeS7QP3SpOUb3L1IfIRY0IqrL7UJnnDJehq45zQNl7ssFcK3crJasySTIQPjLNAD KmmNGV4/PcsWqWWLu89GVwawj5g4b1aFAKveaBtGYcRVszNOASw+ywVX4+ZLUpmZRKBV 4CvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qOBFGHotMZNhpz8RBtUCz5soAiP+H2PcJ6i2ywIfEBI=; fh=1+wSm+VIM/N/g7cyslg7h6D2EEkejJhOVJYA2v0agHk=; b=pC5aWqNAvpCtPmRiCBxAMAH2W0LJAi+NU1V2bFmlNs8xyQFriyP7M+0Ujkkd2j27Z6 TLR9dIaDGPEVb2VSAdjEVaqX0qvJq1JV0gRDg297ptzofCsE69P+ALVs5yvpskFusCok n51O4F+J6Z7EKHrN1jP6+ethtczTwgM1nBuwzQIooY2ga+xy1jVddWZmvYa8ghjLqPDz KdtiZVjBqVROC1SI+rNJ141Y/PWu9UhNBg23FXgXWw1V5jwFjdsciJKLdn/gmKs1stkO laDopK15msYwzT31DId8lZibjI68fXTBhExVwKEusr2LExLRuatAiNmfskzz8vLvB30K FeLw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vSVy1YA5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i17-20020a05610220d100b0046b689067fdsi351288vsr.52.2024.02.15.10.04.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:04:55 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vSVy1YA5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rag3y-00048V-Fo; Thu, 15 Feb 2024 13:02:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rag3J-00032w-J6 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:45 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag3F-0002Z0-Gs for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:01:41 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4121aa78aa2so6120985e9.0 for ; Thu, 15 Feb 2024 10:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020096; x=1708624896; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qOBFGHotMZNhpz8RBtUCz5soAiP+H2PcJ6i2ywIfEBI=; b=vSVy1YA5FttZ2OLuHH3kNoZAoH8H9anDU+amRUzZhfeS87/wYkNTd3EO/CjZjX6Prs ANG6JprVzeaMAdGhpO72xCMf370ZyNRbRLH+XMfLyoqJNFIHmL7DbpnS4qzDVE80MRI8 wjyAAXna7MzKt8ukj9dcma6KIAhwmQPCU8q70fpYaFmw9YdhfVkXxjzJSwUVVYJUGiH9 GhD69BuWdRoBHuQYZlzCyOpxnZpV8TMsPZolKDA1jf64EEEAeXAoIEu6AT0LNzSAyYdi npwyAlV+mH+R7D2QvtHYJY9ly96OvXLsLn3VNbsiblL1yWRn8rrynwnHxloM7W5+J+nk gI5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020096; x=1708624896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qOBFGHotMZNhpz8RBtUCz5soAiP+H2PcJ6i2ywIfEBI=; b=IcE4reNWTt65uRsK8FnigjrozGgJ2haOa7TnNyBPmJ0hDRLZlJ0g0Fc/ZuX4+4QXiU TFL5l0lQVKhAXPl7r1MCFyGAGOMBF4j6OFdrHuP4G7hqVsWezaAvyND+pokKqBY4L2OQ 3H2dGGIy5I6GG02RosGqjk2lIGWecDYzlxYyBhrn3b2hZsxFxl5JZQFVFA7sTSHSE/BV sOi6SzJderwu57S5JmFlD0gfsOhpx8jhwzc+PfniPivS+yT8jMjDFsvl4vxHqSJPD9jm eOB+4h3ikXyO6GuG6PvU0G09k9zgG/RRAGf6fVpGnFFC8i1A7cn8YVLPp0kJ0CJJ8MYt AZcw== X-Gm-Message-State: AOJu0YyJWkWZxnZjN5ZOBfjAxMU2lOxHlZUbHWtVPFwvi+QOHOwuAFnL ZWFBmjfKiBo7HdzGEJ+HHte/9EeuRPlsrG9qOer8UfE5wHmVuoG2jh1JWUJE0vbdRBwE2/oxfS/ lVdU= X-Received: by 2002:a05:600c:198f:b0:411:f8f8:a0b1 with SMTP id t15-20020a05600c198f00b00411f8f8a0b1mr2001688wmq.2.1708020095497; Thu, 15 Feb 2024 10:01:35 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id b11-20020a05600003cb00b0033d07edbaa6sm2087249wrg.110.2024.02.15.10.01.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:01:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Cl=C3=A9ment_Chigot?= , Frederic Konrad , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Mark Cave-Ayland , Artyom Tarasenko Subject: [PULL 33/56] hw/sparc/grlib: split out the headers for each peripherals Date: Thu, 15 Feb 2024 18:57:27 +0100 Message-ID: <20240215175752.82828-34-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Clément Chigot Split out the headers for each peripherals and move them in their right hardware directory. Update Copyright and add SPDX-License-Identifier at the same time. Co-developed-by: Frederic Konrad Signed-off-by: Clément Chigot Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240131085047.18458-2-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/char/grlib_uart.h | 32 +++++++++++++++++++ .../hw/{sparc/grlib.h => intc/grlib_irqmp.h} | 16 ++++------ include/hw/timer/grlib_gptimer.h | 32 +++++++++++++++++++ hw/char/grlib_apbuart.c | 6 ++-- hw/intc/grlib_irqmp.c | 6 ++-- hw/sparc/leon3.c | 8 +++-- hw/timer/grlib_gptimer.c | 6 ++-- 7 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 include/hw/char/grlib_uart.h rename include/hw/{sparc/grlib.h => intc/grlib_irqmp.h} (86%) create mode 100644 include/hw/timer/grlib_gptimer.h diff --git a/include/hw/char/grlib_uart.h b/include/hw/char/grlib_uart.h new file mode 100644 index 0000000000..7496f8fd5e --- /dev/null +++ b/include/hw/char/grlib_uart.h @@ -0,0 +1,32 @@ +/* + * QEMU GRLIB UART + * + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2024 AdaCore + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef GRLIB_UART_H +#define GRLIB_UART_H + +#define TYPE_GRLIB_APB_UART "grlib-apbuart" + +#endif diff --git a/include/hw/sparc/grlib.h b/include/hw/intc/grlib_irqmp.h similarity index 86% rename from include/hw/sparc/grlib.h rename to include/hw/intc/grlib_irqmp.h index ef1946c7f8..c5a90cbb3e 100644 --- a/include/hw/sparc/grlib.h +++ b/include/hw/intc/grlib_irqmp.h @@ -1,7 +1,9 @@ /* * QEMU GRLIB Components * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -22,8 +24,8 @@ * THE SOFTWARE. */ -#ifndef GRLIB_H -#define GRLIB_H +#ifndef GRLIB_IRQMP_H +#define GRLIB_IRQMP_H #include "hw/sysbus.h" @@ -36,10 +38,4 @@ void grlib_irqmp_ack(DeviceState *dev, int intno); -/* GPTimer */ -#define TYPE_GRLIB_GPTIMER "grlib-gptimer" - -/* APB UART */ -#define TYPE_GRLIB_APB_UART "grlib-apbuart" - -#endif /* GRLIB_H */ +#endif /* GRLIB_IRQMP_H */ diff --git a/include/hw/timer/grlib_gptimer.h b/include/hw/timer/grlib_gptimer.h new file mode 100644 index 0000000000..e56f1b8bf3 --- /dev/null +++ b/include/hw/timer/grlib_gptimer.h @@ -0,0 +1,32 @@ +/* + * QEMU GRLIB GPTimer + * + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2024 AdaCore + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef GRLIB_GPTIMER_H +#define GRLIB_GPTIMER_H + +#define TYPE_GRLIB_GPTIMER "grlib-gptimer" + +#endif diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index 82ff40a530..515b65bc07 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -1,7 +1,9 @@ /* * QEMU GRLIB APB UART Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,7 +28,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" -#include "hw/sparc/grlib.h" +#include "hw/char/grlib_uart.h" #include "hw/sysbus.h" #include "qemu/module.h" #include "chardev/char-fe.h" diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 3bfe2544b7..11eef62457 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -3,7 +3,9 @@ * * (Multiprocessor and extended interrupt not supported) * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +31,7 @@ #include "hw/sysbus.h" #include "hw/qdev-properties.h" -#include "hw/sparc/grlib.h" +#include "hw/intc/grlib_irqmp.h" #include "trace.h" #include "qapi/error.h" diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index fa4fbe4b30..e80b9410d4 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -1,7 +1,9 @@ /* * QEMU Leon3 System Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,7 +42,9 @@ #include "elf.h" #include "trace.h" -#include "hw/sparc/grlib.h" +#include "hw/timer/grlib_gptimer.h" +#include "hw/char/grlib_uart.h" +#include "hw/intc/grlib_irqmp.h" #include "hw/misc/grlib_ahb_apb_pnp.h" /* Default system clock. */ diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c index 5c4923c1e0..4990885451 100644 --- a/hw/timer/grlib_gptimer.c +++ b/hw/timer/grlib_gptimer.c @@ -1,7 +1,9 @@ /* * QEMU GRLIB GPTimer Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,7 +25,7 @@ */ #include "qemu/osdep.h" -#include "hw/sparc/grlib.h" +#include "hw/timer/grlib_gptimer.h" #include "hw/sysbus.h" #include "qemu/timer.h" #include "hw/irq.h"