From patchwork Tue Jun 16 06:31:51 2020 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: 1310018 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=MmNw4K8/; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJPM5MDqz9sR4 for ; Tue, 16 Jun 2020 16:36:07 +1000 (AEST) Received: from localhost ([::1]:52978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl5CX-0003P0-Ep for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:36:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58e-0007u7-2y; Tue, 16 Jun 2020 02:32:04 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:55597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58c-0003LG-N1; Tue, 16 Jun 2020 02:32:03 -0400 Received: by mail-wm1-x343.google.com with SMTP id c71so1700267wmd.5; Mon, 15 Jun 2020 23:32:01 -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=fwp2bV7YJjkiLZTrttPTVnsH6xKa3HonthSU7rRzJJA=; b=MmNw4K8/gon6mgxA9LK3rVLZq+tpX8RgeZx33g6F8PL2+ox2TeCYAIdN+aKQoxMEHA X4MYXVYC6qgJ41XhPfRzB+VVTksKfMtjpOLrhHcNYZ/zpjd7qW9rC10Nmh5HuwWL54Ou QnWdq6q776ucKZ2WGHFuiKAiURLEhoGejsj5N8BtD8Vzu5hRjT+/I2SVpdDbxB5DcF7j 8ZiHXRHJ4YI2W1AEAPlPzg5mpl1vj13rzEv0CofGxkbcWPnf1R38mY34BN0aYnfsqz3v eSJ2y1OnqTYGRyUOHc9fDzwD7lZm3WAN6+iOZ3ycwUnmSEnCySP+or7sq60Cfdly8vci 0vjg== 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=fwp2bV7YJjkiLZTrttPTVnsH6xKa3HonthSU7rRzJJA=; b=N5GK4OZrGloQHTZqdC/b1zi21eazo27bU+8IDfePCfljSR7N/bgU3rdJiolumlcuVv MAOlDsVGJrrXiCbIx0MGNFrUlY6pCGMakhBOLaso1J3ViAgH8nN6QKAZVA1lXH45sKth m3aRJ+vr/IV/G5W9Vd+184jcX0J+fJ16PP2VdqNFo7CbeqNG1RaoJ2zOwJWtoWInav6v Y8m9k7SUMry7zXjmnPOTD3pyf8EdVTOIcFoBVqP4K2JS/ryCdvcortXJZHwQ3ljnfx5n VVhHj7gFWhZ25+afCQjmxuI0PEEvEOLZG8EjLyAyUNVYmX2iIBTAkq0bgPwybAfQMT4w BfjQ== X-Gm-Message-State: AOAM531a0a1U3VsBLeP1u+PlcYViVoDqk0nKVftaoe6w60pZMPXR4PXr ojM2UbBlQCo7Ma5HDlrfKtPRNkan X-Google-Smtp-Source: ABdhPJx10W4CD/+D2U162LBnW0cMnx/cbfyPobFSBmDgmfSepliwqzYA30FyjDPW629GJTT6dr2lvw== X-Received: by 2002:a7b:cf31:: with SMTP id m17mr1446887wmg.47.1592289120628; Mon, 15 Jun 2020 23:32:00 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/7] hw/arm/mps2: Rename CMSDK AHB peripheral region Date: Tue, 16 Jun 2020 08:31:51 +0200 Message-Id: <20200616063157.16389-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" To differenciate with the CMSDK APB peripheral region, rename this region 'CMSDK AHB peripheral region'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/mps2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index f246213206..3cc02c9018 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -212,10 +212,11 @@ static void mps2_common_init(MachineState *machine) */ create_unimplemented_device("CMSDK APB peripheral region @0x40000000", 0x40000000, 0x00010000); - create_unimplemented_device("CMSDK peripheral region @0x40010000", + create_unimplemented_device("CMSDK AHB peripheral region @0x40010000", 0x40010000, 0x00010000); create_unimplemented_device("Extra peripheral region @0x40020000", 0x40020000, 0x00010000); + create_unimplemented_device("RESERVED 4", 0x40030000, 0x001D0000); create_unimplemented_device("VGA", 0x41000000, 0x0200000); From patchwork Tue Jun 16 06:31:52 2020 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: 1310012 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OYqjEsjI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJKp3ddXz9sR4 for ; Tue, 16 Jun 2020 16:33:02 +1000 (AEST) Received: from localhost ([::1]:43618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl59Y-0007x5-4d for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:33:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58f-0007uT-8j; Tue, 16 Jun 2020 02:32:05 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:50887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58d-0003LR-HS; Tue, 16 Jun 2020 02:32:04 -0400 Received: by mail-wm1-x341.google.com with SMTP id l17so1723880wmj.0; Mon, 15 Jun 2020 23:32:02 -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=zqA2FU9tJ7z1sN241pmUGO/apZ+JdoG+SHFS+QpWuEA=; b=OYqjEsjIf9mT85xUHLTdSJOVKFvKCGpcGerrL8lLXivaNhEXa5qarLa0CunVVUj7Ku EzsaVGpKrQCasNtZ2EUVHty794yeTatEgiPODQwLGf39DDxj+skOlqz/2+0fPjHqMAhF DpCIeQZAa/U0fDaszqyonqqRZnPoalmYNfTVasSEaNJTLqIXG+ZiOYmO7upojA4Ocgug ZQg74yFBHbgukaQh9b227/sijPh0q8RKUhu+lDLLQy9dRpRTP09q4L/iCpnPokwNz+Ii ZcLT+3w8Z29rvr07AVshDlcYRxvsMWF+s1BUD6l+sGmIHJ95lIBXM3xCJ7FgLFZ2Bccg VREw== 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=zqA2FU9tJ7z1sN241pmUGO/apZ+JdoG+SHFS+QpWuEA=; b=i7Ih2HeskeJgmKFEWMOZFrWyPMZpcRymB178EKmOURdLTNJCpm9gRqoAeinF7uGcB+ todagm3r0pnO5dsxJKtjlWtgiDFtI5J51fo+csRE/fBuYEImEazT8ywGuhmSQUO4x5AV k0A3KO90Vtv1l1WZPY2z4AvOdVIkKn5QnHetW/5yKSqg689zXpuvQFuuKSCbh1wfhnDh V9RV67/1D8FF394ZiKfVV+x/qwn0fTm8WihvYxlA/A0pbYOGY6JTydv0dJR8EwtxO3th q0h7n7GDS6g4A0DahDc7rWCsJUi/Q+Rh0/LA2u/hVsLn5gJFcd4dgPNxssY9Ia5CgNRY 62og== X-Gm-Message-State: AOAM530F6IlDW9YlOTdnpzQPpuxPpEqF6EMpwTGky4Nrc3QVD7H5yhLM zgM77xOaQ+1RF3E6XW/mgOuCPG4K X-Google-Smtp-Source: ABdhPJyq9Bc5RyVkOKPFUh1u5sg2eUWFaCIhaW1/M0z2NJk0Nt7KDb7SewsszkTaAxM7VqQjUH9hpw== X-Received: by 2002:a1c:b182:: with SMTP id a124mr1470329wmf.114.1592289121705; Mon, 15 Jun 2020 23:32:01 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/7] hw/arm/mps2: Rename dualtimer as apb-dualtimer Date: Tue, 16 Jun 2020 08:31:52 +0200 Message-Id: <20200616063157.16389-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x341.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The dualtimer is connected to AMBA APB. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 3cc02c9018..1e8d5f21f9 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -306,7 +306,7 @@ static void mps2_common_init(MachineState *machine) cmsdk_apb_timer_create(0x40000000, qdev_get_gpio_in(armv7m, 8), SYSCLK_FRQ); cmsdk_apb_timer_create(0x40001000, qdev_get_gpio_in(armv7m, 9), SYSCLK_FRQ); - sysbus_init_child_obj(OBJECT(mms), "dualtimer", &mms->dualtimer, + sysbus_init_child_obj(OBJECT(mms), "apb-dualtimer", &mms->dualtimer, sizeof(mms->dualtimer), TYPE_CMSDK_APB_DUALTIMER); qdev_prop_set_uint32(DEVICE(&mms->dualtimer), "pclk-frq", SYSCLK_FRQ); object_property_set_bool(OBJECT(&mms->dualtimer), true, "realized", From patchwork Tue Jun 16 06:31:53 2020 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: 1310014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sBV0tcVo; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJLG0DTRz9sR4 for ; Tue, 16 Jun 2020 16:33:26 +1000 (AEST) Received: from localhost ([::1]:44426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl59v-0008K5-Kt for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:33:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58g-0007wR-KV; Tue, 16 Jun 2020 02:32:06 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:37448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58e-0003Lk-Ta; Tue, 16 Jun 2020 02:32:06 -0400 Received: by mail-wr1-x444.google.com with SMTP id x13so19439573wrv.4; Mon, 15 Jun 2020 23:32:04 -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=MjgVP8rwX0nk7ybJEZVD26qOTyCHQ8rjBa6s5OZUNzs=; b=sBV0tcVoyjFqt1tVIHJE+6IUOMYpnGXt9S+RgQDfZjA9NOv5tjC1sg9ErQTj7r7USx IQRta6mwBfv7PmQZM8/NDJ3s4JS7VvEcznMWyiRRMgolaf0b9yQeYytC9MUtcf/2SqVI MPepvu8uqkipGJJPz/7H5+H6TOI0xsx+H6GfyYlscitRJs3S/nCDlhNxymHPAf4w4wb0 D33za4FDs4BxrJbsju3v+FgSHMY+lgsvVfrvdc0ULAehQSYRbgjgJYIRWMbeiOzciMte Ng2/l0P9rmV4a3nDB9AHZzFgh0avziaKClgHYv8jKFP8WxpXH5pmcE0D+vBezardStt2 kwiw== 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=MjgVP8rwX0nk7ybJEZVD26qOTyCHQ8rjBa6s5OZUNzs=; b=j+mpgQ8WbfnfIpIADZxgIF9TjlZJB77e3f+Vqyq5nyKSUVdLiyQQlh93u8hQAgfwZ0 DqWULdFmqq5tN71vwh9KE6sKa1fWXvMCFdQmW9XSqW7mqJa2sBcJk67TKWsllM3oH7fh h1wvZSI/ESjesbxucIucrDkwbTVP3gwErfLY94E4XU4qaCnkwLoVNHgCjuoP1tWOxetd dw/XlOSxRWOraRi8I6GdLJVokaqfzF/J95kQWVTcMlO9kadFRw4tbd77WcXBo66uCB7s AxzLVlpN5aI8LH/Uf9ZeMQo4nZPaTYZdKmLrcv+ktrEbzB1Lc6ubVTfJdCeYMxLbzmt+ IscA== X-Gm-Message-State: AOAM530LGAx93xNHsHqhqWhZl9Rj2+Hu0rw41ZLrB9Uh82joCjRXYgbY djTB+D/K31xDEQLYZNn390P7A26T X-Google-Smtp-Source: ABdhPJzrJxrt0nbB08y0ysvfGXIsFhjZG84V14gT6T/WIrBhemXlay9mir0pJFKTC5XfvIWsXhLesw== X-Received: by 2002:adf:a350:: with SMTP id d16mr1345314wrb.237.1592289122994; Mon, 15 Jun 2020 23:32:02 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/7] hw/arm/mps2: Add CMSDK APB watchdog as unimplemented device Date: Tue, 16 Jun 2020 08:31:53 +0200 Message-Id: <20200616063157.16389-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Register the watchdog peripheral as unimplemented to better follow its accesses, for example booting Zephyr: ---------------- IN: wdog_cmsdk_apb_init 0x00000900: b508 push {r3, lr} 0x00000902: 4b07 ldr r3, [pc, #0x1c] 0x00000904: 4a07 ldr r2, [pc, #0x1c] 0x00000906: 6018 str r0, [r3] 0x00000908: 4b07 ldr r3, [pc, #0x1c] 0x0000090a: 4808 ldr r0, [pc, #0x20] 0x0000090c: f8c3 2c00 str.w r2, [r3, #0xc00] 0x00000910: 4a07 ldr r2, [pc, #0x1c] 0x00000912: 6812 ldr r2, [r2] 0x00000914: 601a str r2, [r3] 0x00000916: f000 f9f9 bl #0xd0c cmsdk-apb-watchdog: unimplemented device write (size 4, value 0x1acce551, offset 0xc00) cmsdk-apb-watchdog: unimplemented device write (size 4, value 0xe4e1c00, offset 0x0) Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 1e8d5f21f9..570ec50aa8 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -314,6 +314,7 @@ static void mps2_common_init(MachineState *machine) sysbus_connect_irq(SYS_BUS_DEVICE(&mms->dualtimer), 0, qdev_get_gpio_in(armv7m, 10)); sysbus_mmio_map(SYS_BUS_DEVICE(&mms->dualtimer), 0, 0x40002000); + create_unimplemented_device("cmsdk-apb-watchdog", 0x40008000, 0x1000); sysbus_init_child_obj(OBJECT(mms), "scc", &mms->scc, sizeof(mms->scc), TYPE_MPS2_SCC); From patchwork Tue Jun 16 06:31:54 2020 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: 1310013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=FfM1zO0D; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJKr45PTz9sR4 for ; Tue, 16 Jun 2020 16:33:04 +1000 (AEST) Received: from localhost ([::1]:43762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl59a-00081P-5v for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:33:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58h-0007ye-LB; Tue, 16 Jun 2020 02:32:07 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58f-0003Lu-Tm; Tue, 16 Jun 2020 02:32:07 -0400 Received: by mail-wr1-x444.google.com with SMTP id x14so19470695wrp.2; Mon, 15 Jun 2020 23:32:05 -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=cOk8KAmRqbditcK3tUyn2RQFRwEFLc0t20rHeY/wkGk=; b=FfM1zO0D84sphPl8TX3M4U3jzZNT3EBhVaG810iD2iWv3LxtvkqKp9kB866cUqYucK ow7Bps+LGDYz6NCzbCVZBh7cRwAf2Pcn1FqU/tpg+Hoxr6YRCzu2xpSGozG8M49d3+GY RYEa8g59UHCUkih8KP47NfSMEpFwR4f5YQNgNDmgay20xqo2efZ59eTREGPGMZDJoiwh a7cT9u9jlgIc1NPixKmsJE0+wFqznKhJyNOFo33U9aG6UqbBQ3PzSydO9cEAteowPC0N u5ueFcqEUK91ofkGKCBO813BeMN4sZUhve26FO0ObIzd98TeuqQNJ+zn85sLIO+GMJ6h re8w== 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=cOk8KAmRqbditcK3tUyn2RQFRwEFLc0t20rHeY/wkGk=; b=nTLaIN+cgt8uQUizHZxzxf5NzVQ0q5yG9kvVOIdj9Zcro4IjBNm1ZYBW5BYET6LDyW 34u7803stVPLYIyczDgWzYcAmC9yRdyMS9bCFbPF2F9GPNrfQd6XkNopjXVNXlag6UIH ohCtIPySPVIwbkzc7Wc3HA1cO1NXDMhTz/V9fbRa+wnYBEyp/IYpxjnqaL/1kqlBNSFz AmGR23vBgzgLHVtviIWDzpu2J4CJvIlw0HxfREuG/a45UTvAkl0SU70TU4Ty1VAAzKqg j3Tw2mJwMSY2Ckt9ABLFPZiTsNDbEW3JFSuU1/eihfp+2IkrIANWl4Rd0wbAOY/tEAPI IYzw== X-Gm-Message-State: AOAM530BFPLHhcce4eE/ZizzR0hUVVY3UAXJ99eBTry7vJ8YlOX6QkFm jb1MzgTsD0nOTS8PMI3RN5znej7n X-Google-Smtp-Source: ABdhPJwg2B8YQ+0WR7EXbmnTpSl73e2pMw/Uiv2fkojq6WF5Qzgy8X7Y08Sj9ax5773/MTG8PR8C8g== X-Received: by 2002:adf:ecce:: with SMTP id s14mr1352042wro.154.1592289124048; Mon, 15 Jun 2020 23:32:04 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/7] hw/arm/mps2: Add CMSDK AHB GPIO peripherals as unimplemented devices Date: Tue, 16 Jun 2020 08:31:54 +0200 Message-Id: <20200616063157.16389-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Register the GPIO peripherals as unimplemented to better follow their accesses, for example booting Zephyr: ---------------- IN: arm_mps2_pinmux_init 0x00001160: f64f 0231 movw r2, #0xf831 0x00001164: 4b06 ldr r3, [pc, #0x18] 0x00001166: 2000 movs r0, #0 0x00001168: 619a str r2, [r3, #0x18] 0x0000116a: f24c 426f movw r2, #0xc46f 0x0000116e: f503 5380 add.w r3, r3, #0x1000 0x00001172: 619a str r2, [r3, #0x18] 0x00001174: f44f 529e mov.w r2, #0x13c0 0x00001178: f503 5380 add.w r3, r3, #0x1000 0x0000117c: 619a str r2, [r3, #0x18] 0x0000117e: 4770 bx lr cmsdk-ahb-gpio: unimplemented device write (size 4, value 0xf831, offset 0x18) cmsdk-ahb-gpio: unimplemented device write (size 4, value 0xc46f, offset 0x18) cmsdk-ahb-gpio: unimplemented device write (size 4, value 0x13c0, offset 0x18) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/mps2.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 570ec50aa8..4a49bfa9b9 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -111,6 +111,7 @@ static void mps2_common_init(MachineState *machine) MemoryRegion *system_memory = get_system_memory(); MachineClass *mc = MACHINE_GET_CLASS(machine); DeviceState *armv7m, *sccdev; + int i; if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) { error_report("This board can only be used with CPU %s", @@ -228,7 +229,6 @@ static void mps2_common_init(MachineState *machine) */ Object *orgate; DeviceState *orgate_dev; - int i; orgate = object_new(TYPE_OR_IRQ); object_property_set_int(orgate, 6, "num-lines", &error_fatal); @@ -265,7 +265,6 @@ static void mps2_common_init(MachineState *machine) */ Object *orgate; DeviceState *orgate_dev; - int i; orgate = object_new(TYPE_OR_IRQ); object_property_set_int(orgate, 10, "num-lines", &error_fatal); @@ -315,6 +314,12 @@ static void mps2_common_init(MachineState *machine) qdev_get_gpio_in(armv7m, 10)); sysbus_mmio_map(SYS_BUS_DEVICE(&mms->dualtimer), 0, 0x40002000); create_unimplemented_device("cmsdk-apb-watchdog", 0x40008000, 0x1000); + for (i = 0; i < 4; i++) { + static const hwaddr gpiobase[] = {0x40010000, 0x40011000, + 0x40012000, 0x40013000}; + + create_unimplemented_device("cmsdk-ahb-gpio", gpiobase[i], 0x1000); + } sysbus_init_child_obj(OBJECT(mms), "scc", &mms->scc, sizeof(mms->scc), TYPE_MPS2_SCC); From patchwork Tue Jun 16 06:31:55 2020 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: 1310019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mX7AeBCm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJPP6fTKz9sR4 for ; Tue, 16 Jun 2020 16:36:09 +1000 (AEST) Received: from localhost ([::1]:53188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl5CZ-0003U2-JK for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:36:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58i-00080U-Hn; Tue, 16 Jun 2020 02:32:08 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:33660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58h-0003MH-1t; Tue, 16 Jun 2020 02:32:08 -0400 Received: by mail-wm1-x341.google.com with SMTP id j198so1519972wmj.0; Mon, 15 Jun 2020 23:32:06 -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=0C754Z2styJVcWZeah0XfpUldg+E2WED/NhKiLJuUwM=; b=mX7AeBCmISmFvf1ccvUqkR0mMy1JR8NNO98AQPSOzV4WYlL6sf5STJzzK7oDXR+E03 R0CXPdpfts55K3YTMA2Acz9YHFrtm/JbUCXC+3GrbEQGIEV1Vv4dPshC4U5TpXB8oqPy oJpCC6kKvHaCiqyvgHuz5u3ollxjm8f/Jgk0ECRbo8FBjoZz62TatXlRU/fHuSbO2QI6 PipW+aLCNLmcKyW7o8XqXdjwn2Xyz6WmGPrqvR7fc8H3eSJAjOomBcqzj1S01mOSBEV9 /ssPOyLMADJqFH1u/eU5Ty0rFPtcFs6hJLaJAVXrVFUcFR9o85QUYv/vC+GiMRdCmwiy 9IHA== 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=0C754Z2styJVcWZeah0XfpUldg+E2WED/NhKiLJuUwM=; b=rrlve4pCZNqXzK7IBdoapoOHiEEzED0oVzapBEVBA891QmUMlQGJnC7f57+KXJZWEy md6j1u4qB6jemmXYFLWiE/8q8r/EVSjKSrO/OhEoI1kwi4aGahUQmodcE0gxOOg2wB50 gkHRcpPansWfSUPs0JAx12XVg563FFH2mB9bZtbzSg5fhV9TQBklMNeAyNvnvm68EDBj JkI0aStD3BnvJwg15k5yYShh3gCk+SQw2UbFvWhJuhbkptRKTTAUWBl1FSLXXsYUg3MP ybSqMheLcczXqcLhM4ToyndrPfLlZs3XLV+K9PK82e3/4MdT106/HJhqw8MQnT7SdqWS hBaA== X-Gm-Message-State: AOAM533npcPKP98VB5eNdL7Be2l9Uu8L525Mc7Iu81kOi19xU2cG3hAX sHiRmbR3CE7hRwCO/St/jCyUKBo2 X-Google-Smtp-Source: ABdhPJzlPadS5VEC26TKnCCdNA0iXGEZ7JZ2XekaKsP6DbW7l6mwdkDDgV5T99IwPunfRpmXd+Qt1Q== X-Received: by 2002:a1c:9613:: with SMTP id y19mr1475307wmd.135.1592289125102; Mon, 15 Jun 2020 23:32:05 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/7] hw/arm/mps2: Add I2C busses on FPGA APB Date: Tue, 16 Jun 2020 08:31:55 +0200 Message-Id: <20200616063157.16389-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x341.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" There are 4 different I2C peripherals on the FPGA APB. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 4a49bfa9b9..6224d7a63c 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -321,6 +321,7 @@ static void mps2_common_init(MachineState *machine) create_unimplemented_device("cmsdk-ahb-gpio", gpiobase[i], 0x1000); } + /* FPGA APB */ sysbus_init_child_obj(OBJECT(mms), "scc", &mms->scc, sizeof(mms->scc), TYPE_MPS2_SCC); sccdev = DEVICE(&mms->scc); @@ -330,6 +331,12 @@ static void mps2_common_init(MachineState *machine) object_property_set_bool(OBJECT(&mms->scc), true, "realized", &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(sccdev), 0, 0x4002f000); + for (i = 0; i < 4; i++) { + static const hwaddr i2cbase[] = {0x40022000, 0x40023000, + 0x40029000, 0x4002a000}; + + sysbus_create_simple("versatile_i2c", i2cbase[i], NULL); + } /* In hardware this is a LAN9220; the LAN9118 is software compatible * except that it doesn't support the checksum-offload feature. From patchwork Tue Jun 16 06:31:56 2020 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: 1310017 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=T5PsuaTM; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJPF2BHnz9sSd for ; Tue, 16 Jun 2020 16:36:01 +1000 (AEST) Received: from localhost ([::1]:52300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl5CP-00038A-Ta for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:35:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58j-00082C-QT; Tue, 16 Jun 2020 02:32:09 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58i-0003Mc-2W; Tue, 16 Jun 2020 02:32:09 -0400 Received: by mail-wr1-x442.google.com with SMTP id l11so19465026wru.0; Mon, 15 Jun 2020 23:32:07 -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=2FjgOSd/PcaKbg94PaHicHO0rGFHpV0TnPuxXVdcN10=; b=T5PsuaTM5zThSTjUXQD/0QYhszyEdhoZHQp8fhpUlPl7mAtK235dFj/CuvulyuNC45 D4WcjwAEZex9pSb326jKayEUew1vxgnA2ap1jDLxL7ISjeZhelQg+HIVkybgzswZmb3E /NyqDeijTjljMlgKldEwu3NuUnLnDIBgzDNBekopeNCh2qEvAW/N4p99rdvP3lXt/Fuv RTA9Rnm2AbHqk8J5Zm/itD9hAf0R/40XKYoyMEBStSqyxrlH6IzPlTODrB0dc+zcPwb8 y65VcVCr4wfvGB1KTo3vUlLKfaAy68bpGqjoYyGToXpV1tqQKFHQ7GPJAFYUY8Z164Bj L9RA== 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=2FjgOSd/PcaKbg94PaHicHO0rGFHpV0TnPuxXVdcN10=; b=jOLSWNHAdegBT3VPJDSjc+9jJC7nyQ9Djm7J6hK1GfDRt69eGNLKMGPSrme67nxfRY hcIu8LMaif8AndPq9J5YZemaOoxLtXrggYY761Nf/HckgYdZ1isWhYnKUJLH8Eq6V5U4 jrqOwtEPJta5BzTubM7AbS1DW7auYP8wNgn8UVXwgiy2fN30DLEzbsj3vEvS1d0CP+rX hTVKtuMVe0hmsAlaWmYGiAV0y8SqpkWYQoCyCHLS5KQmolFJ/Bz52xibTtdstU8feELI /cOdcYR1h3YhkDkBYra2Jm6KyfGqhi6DW1C1zqIs+VhVnljSOQmLGUqWKFw6GToHBeuE SP8A== X-Gm-Message-State: AOAM532sdqHXssNiIM0gcHC6Fiy4i2gnxV2P1n49QMQkp8ZmyVWM6CS/ DqeRlnlzXnE1ykKj3WEHXUBxykM5 X-Google-Smtp-Source: ABdhPJwtY74K9OAMAZYUnH7lhCuobvYIiZAvY7IcA6o2SgRxRE6nPWfsKMxIN/N4CnR/sG7C0Y0G1w== X-Received: by 2002:a5d:5744:: with SMTP id q4mr1264543wrw.137.1592289126139; Mon, 15 Jun 2020 23:32:06 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 6/7] hw/arm/mps2: Map the FPGA I/O block Date: Tue, 16 Jun 2020 08:31:56 +0200 Message-Id: <20200616063157.16389-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 6224d7a63c..345ba551ab 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -38,6 +38,7 @@ #include "hw/timer/cmsdk-apb-timer.h" #include "hw/timer/cmsdk-apb-dualtimer.h" #include "hw/misc/mps2-scc.h" +#include "hw/misc/mps2-fpgaio.h" #include "hw/net/lan9118.h" #include "net/net.h" @@ -66,6 +67,7 @@ typedef struct { MemoryRegion blockram_m3; MemoryRegion sram; MPS2SCC scc; + MPS2FPGAIO fpgaio; CMSDKAPBDualTimer dualtimer; } MPS2MachineState; @@ -337,6 +339,11 @@ static void mps2_common_init(MachineState *machine) sysbus_create_simple("versatile_i2c", i2cbase[i], NULL); } + sysbus_init_child_obj(OBJECT(mms), "fpgaio", &mms->fpgaio, + sizeof(mms->fpgaio), TYPE_MPS2_FPGAIO); + object_property_set_bool(OBJECT(&mms->fpgaio), true, "realized", + &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(&mms->fpgaio), 0, 0x40028000); /* In hardware this is a LAN9220; the LAN9118 is software compatible * except that it doesn't support the checksum-offload feature. From patchwork Tue Jun 16 06:31:57 2020 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: 1310020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rIDFg/il; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49mJRp1sB0z9sR4 for ; Tue, 16 Jun 2020 16:38:14 +1000 (AEST) Received: from localhost ([::1]:33080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl5Ea-0006ul-0n for incoming@patchwork.ozlabs.org; Tue, 16 Jun 2020 02:38:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl58k-00084a-ME; Tue, 16 Jun 2020 02:32:10 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:50889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jl58j-0003Mp-38; Tue, 16 Jun 2020 02:32:10 -0400 Received: by mail-wm1-x342.google.com with SMTP id l17so1724103wmj.0; Mon, 15 Jun 2020 23:32:08 -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=YSemiN4fbL6V0zVgew+3sXrasP2DCRMVckmXdCuQt0Q=; b=rIDFg/ilVdF18P/muCtqY2rGWKrLtSdARF1XIyJZhfyKw68ALtIaXRBbefq5eIS/pN KcMAyFKiME8ibiIV8rmURcD6ha5u3Y9PXL2bLuA/D82rY4fwExp2LJt49gPkKB1eDgcf hj8pKJ1e5Nn0YA88iS0kW5g3IXdTLq48fdUD0NA+effKSzyTG5byKKCTQXTbniL3JpS2 1TBsVf+KpP1RQhYnsO1TtzCkueO0Y1rnLhFYqr2FzmoF+4FPYwmzNk3pei+qhLxEC5gc NkbNVu1T8i4+Eqt/KaGkM6jUSBvF/db3YfqgfiU+VXpI8C9xrrwIcNhuRLhmyL3zmPlj bXaA== 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=YSemiN4fbL6V0zVgew+3sXrasP2DCRMVckmXdCuQt0Q=; b=riwRADmysHHvZlbdi+wtjrdEoqY2IcjnaDd7plL+cxigGMHb7lnGpGwFGlfO5LdfIb FDwepOUCJ6A7zY+xkxzDQPUxad6nPrxR1W814eJk9WZpZptNArD80DrlTsZ6EgTBNWsJ r4EozAo3r6I+UF4SLhTlOtxeGVYC5hDWKmSth6PVz9g0M4NHsGR1AyCTEnhmihqCtgjb TaGdCoGBFhyvjdJxLM88IL5mkM/GsBxZHE2UeLDjT0VgVoIuKiSHY54/eGGkBtqlkQlZ VMlhd4eT9q5jt0+e4PIyHeMyYsnU1UszroBcjun0pHzA591conXJPp9zjNSpENIwt+r2 wMAw== X-Gm-Message-State: AOAM5319pZ21+nRXWJ5NA7dW0L8yheAAz2RLygawVqgv0PmSXTBNe7+r CMFwnf/iyokJJdNOMyotKB2LfvTd X-Google-Smtp-Source: ABdhPJxxgHEQNQ2LBe0zTFb7hlj7T+WX7pCJkCYySyoCnuCUOAq/D0Zw3YqPydNNq8hScoShj9CDTg== X-Received: by 2002:a1c:59c7:: with SMTP id n190mr1453521wmb.61.1592289127191; Mon, 15 Jun 2020 23:32:07 -0700 (PDT) Received: from localhost.localdomain (181.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.181]) by smtp.gmail.com with ESMTPSA id t188sm2483250wmt.27.2020.06.15.23.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 23:32:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 7/7] hw/misc/mps2-fpgaio: Implement push-buttons Date: Tue, 16 Jun 2020 08:31:57 +0200 Message-Id: <20200616063157.16389-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200616063157.16389-1-f4bug@amsat.org> References: <20200616063157.16389-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.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: Peter Maydell , Joaquin de Andres , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Esteban Bosse Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The FPGA system control block has 2 push-buttons labelled PB0/PB1. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/mps2-fpgaio.h | 1 + hw/misc/mps2-fpgaio.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/hw/misc/mps2-fpgaio.h b/include/hw/misc/mps2-fpgaio.h index 69e265cd4b..521900ae81 100644 --- a/include/hw/misc/mps2-fpgaio.h +++ b/include/hw/misc/mps2-fpgaio.h @@ -34,6 +34,7 @@ typedef struct { MemoryRegion iomem; uint32_t led0; + uint32_t button; uint32_t prescale; uint32_t misc; diff --git a/hw/misc/mps2-fpgaio.c b/hw/misc/mps2-fpgaio.c index 2f3fbeef34..655e7a14fc 100644 --- a/hw/misc/mps2-fpgaio.c +++ b/hw/misc/mps2-fpgaio.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qemu/module.h" +#include "qemu/bitops.h" #include "qapi/error.h" #include "trace.h" #include "hw/sysbus.h" @@ -36,6 +37,13 @@ REG32(PRESCALE, 0x1c) REG32(PSCNTR, 0x20) REG32(MISC, 0x4c) +static void mps2_fpgaio_push_button(void *opaque, int irq, int level) +{ + MPS2FPGAIO *s = MPS2_FPGAIO(opaque); + + s->button = deposit32(s->button, irq, 1, level); +} + static uint32_t counter_from_tickoff(int64_t now, int64_t tick_offset, int frq) { return muldiv64(now - tick_offset, frq, NANOSECONDS_PER_SECOND); @@ -131,7 +139,7 @@ static uint64_t mps2_fpgaio_read(void *opaque, hwaddr offset, unsigned size) /* User-pressable board buttons. We don't model that, so just return * zeroes. */ - r = 0; + r = s->button; break; case A_PRESCALE: r = s->prescale; @@ -232,6 +240,7 @@ static void mps2_fpgaio_reset(DeviceState *dev) trace_mps2_fpgaio_reset(); s->led0 = 0; + s->button = 0; s->prescale = 0; s->misc = 0; s->clk1hz_tick_offset = tickoff_from_counter(now, 0, 1); @@ -249,6 +258,8 @@ static void mps2_fpgaio_init(Object *obj) memory_region_init_io(&s->iomem, obj, &mps2_fpgaio_ops, s, "mps2-fpgaio", 0x1000); sysbus_init_mmio(sbd, &s->iomem); + + qdev_init_gpio_in_named(DEVICE(s), mps2_fpgaio_push_button, "PB", 2); } static bool mps2_fpgaio_counters_needed(void *opaque)