Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 869DDEB64D7 for ; Wed, 21 Jun 2023 12:35:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBx2z-0003i6-IC; Wed, 21 Jun 2023 08:34:53 -0400 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 1qBx2x-0003hm-9d; Wed, 21 Jun 2023 08:34:51 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBx2v-0000ti-BH; Wed, 21 Jun 2023 08:34:50 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 0236A746377; Wed, 21 Jun 2023 14:34:38 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id C2D5074632B; Wed, 21 Jun 2023 14:34:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id C183E745720; Wed, 21 Jun 2023 14:34:37 +0200 (CEST) Date: Wed, 21 Jun 2023 14:34:37 +0200 (CEST) From: BALATON Zoltan To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org cc: Daniel Henrique Barboza Subject: Re: [PATCH] mv64361: Add dummy gigabit ethernet PHY access registers In-Reply-To: Message-ID: References: <20230605215145.29458746335@zero.eik.bme.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Wed, 14 Jun 2023, BALATON Zoltan wrote: > On Mon, 5 Jun 2023, BALATON Zoltan wrote: >> We don't emulate the gigabit ethernet part of the chip but the MorphOS >> driver accesses these and expects to get some valid looking result >> otherwise it hangs. Add some minimal dummy implementation to avoid rhis. >> >> Signed-off-by: BALATON Zoltan >> --- >> This is only used by MorphOS on pegasos2 so most likely could go via >> the ppc queue. > > Ping? Ping? > Regards, > BALATON Zoltan > >> hw/pci-host/mv64361.c | 6 ++++++ >> hw/pci-host/mv643xx.h | 3 +++ >> 2 files changed, 9 insertions(+) >> >> diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c >> index 19e8031a3f..01bd8c887f 100644 >> --- a/hw/pci-host/mv64361.c >> +++ b/hw/pci-host/mv64361.c >> @@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr >> addr, unsigned int size) >> } >> } >> break; >> + case MV64340_ETH_PHY_ADDR: >> + ret = 0x98; >> + break; >> + case MV64340_ETH_SMI: >> + ret = BIT(27); >> + break; >> case MV64340_CUNIT_ARBITER_CONTROL_REG: >> ret = 0x11ff0000 | (s->gpp_int_level << 10); >> break; >> diff --git a/hw/pci-host/mv643xx.h b/hw/pci-host/mv643xx.h >> index cd26a43f18..f2e1baea88 100644 >> --- a/hw/pci-host/mv643xx.h >> +++ b/hw/pci-host/mv643xx.h >> @@ -656,6 +656,9 @@ >> /* Ethernet Unit Registers */ >> /****************************************/ >> >> +#define MV64340_ETH_PHY_ADDR 0x2000 >> +#define MV64340_ETH_SMI 0x2004 >> + >> /*******************************************/ >> /* CUNIT Registers */ >> /*******************************************/ >> > >