From patchwork Tue Nov 5 22:47:13 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: 840833 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp240555wru; Tue, 5 Nov 2024 14:52:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVqNTgTQecPy0a4LiI0YcO+PVgAfE6SPVQ91X9JPlFWIHFgRd2Yw5O0B2Bv0xQK0vxzrwmcsw==@linaro.org X-Google-Smtp-Source: AGHT+IE5N3byTS/kq+mS+PD4u28hHJ6m0YSypBPaoF5PaVMK9zAPCQlpF4K1XzKUhg+us/ADg2uL X-Received: by 2002:a05:620a:2406:b0:7af:ce6e:1666 with SMTP id af79cd13be357-7b2fb97a6cemr2752175485a.19.1730847120352; Tue, 05 Nov 2024 14:52:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730847120; cv=none; d=google.com; s=arc-20240605; b=RkQiHptB2GJ0I9ROb+C83p71RZEW+t0iVfFvYKAKi9UZtwydZs34z5c7r58DQ1OTZg BkEmii7rHjzTEUbxpMFgH3V4RE1QoQVlmwCRisXMYyUoVhZdy/LNthO72pxOKGwoWDT6 Wyiw4Q0UnvibAow/rkZnd77XO0MrrMGNUH++tc8Vmex/tgCuRUs7RSllFZ6razLZvQMx g422bxITc+qAf/H+tcf3hWOuACFmY3Z8PxW3Q6krBFXzmZbwlbLuLzw1U3Ajrxb/0S14 PLR7Z/7a/IPrq5YJR73mEYLaydVePyU79dH3btFmrDOxK8jnYhb+XL1EEOZmk4B0+Npq wgmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=91J1Pmqo5K4jBxzGOzPgUYEJwXRFG7jqGcshP1OZFFs=; fh=Tr7NIUtXAhmtWFkJJjP6G2+mN+Bis7DT7Z3/vsFybJ4=; b=Npi5zyUSErGlGZhk/bRP3nPzhAkrRPoSJvHsqXJHpwvrCAp1sSGF2fIzI6fVgXHqPE c+Nb+3MWETQZnetvEpxczoY/b9ur/sA805/rQN4veUjaI0oLeCHoqGcQjUESfYQHdC39 rxGCB8VzD+SGF6sUgarO2jcY+yV8bSCu8btLRDn4OSO6mxmCHV74kDRWLFN4heOHdao1 oHL3TlFIeybQ/FHEOtg/5uvUh+6QpP6WxRl+vlYedIxVk2gWXEufmcBuPuWcrmI5bOYi JiMWMw25Uehr0Od1Eb8BZ+2eLSSIVeHBBPGgtUzFP0Bgz9o4OiyEV8XwH+uQTj6oYVjN ZAkQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GmHZ3gN2; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f3ab2140si1423308085a.620.2024.11.05.14.52.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Nov 2024 14:52:00 -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=GmHZ3gN2; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8SMT-00073U-0k; Tue, 05 Nov 2024 17:49:22 -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 1t8SM1-0006SG-PN for qemu-devel@nongnu.org; Tue, 05 Nov 2024 17:48:53 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8SM0-0004IY-6t for qemu-devel@nongnu.org; Tue, 05 Nov 2024 17:48:53 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-37d462c91a9so3532446f8f.2 for ; Tue, 05 Nov 2024 14:48:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730846930; x=1731451730; 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=91J1Pmqo5K4jBxzGOzPgUYEJwXRFG7jqGcshP1OZFFs=; b=GmHZ3gN2plB58Y59W26nKsE5LnzvE6AsLtRpn5t2H+0iPnY2FMxzZ6aTUP9PZwivnq obuMDDTNyTgN7YaiZGCCGSoC+3c2q45U7KsIWVOmXZiYqp1yswpMa3mxpEJshsRRr4EY jEmKSypHeNsM2TAclAYoVqeafdQd409zdsS2x8x3dtZ3kVwjoSogpDqKX8f58ZJQs0Ey cTpa0WVh2ItagUbCEa2f2RcuRvq9CkAP3np6anYTpR/SuU6cab/6TFfqx5/4+mcrG64c LgWC7UGD3Yy79FrSa+7JWb/tjlCKnvH+eoJKnfbP6FGUUvIOB8MVItLmbHo/Jw6GcbHP KUwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730846930; x=1731451730; 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=91J1Pmqo5K4jBxzGOzPgUYEJwXRFG7jqGcshP1OZFFs=; b=Ep+u7dTkYRUuyOQZLZTAFHUYWGUZiPRgXOLZSmfrQikfoCJlfLFDNECVajjNUExTK4 zJ5KuECFwGA/1RYzkpCKhL9aECcWuqjsnO2Y7I1w9RNYHmmZ1I/z5RIiMa44GU1MBOVi of2ARNI8IfORNbrb1ntmMT09EvmKvQJ5Mrp0NW8DqIbYcUXlOVvrJFlTDY6xELdYhtQa F8zdysC1oDx+qvNJA8pJC6O92aHHvQIwHkvOLE0xNmgIqPv981+qyymjxEyOtTkw/AgC UzigKddMo06MO+07uBG4ZLsaPGeYwqFUvQ+SQevce0YTAnc3+F2XLQcTBvP4/GY1jUBw QYTA== X-Gm-Message-State: AOJu0YzhN8WcbKBRy35WywSpQeR6uQrG5s4zSncoCBExs6fhDT5n2DDJ onQGhFzaYzEjvTJK/JpaYgJXNAeqaoS8QHozfV0CKwgtnAz8sWBRBZVtHze8WVqDkvaXV+9rCcc 2VlqJoA== X-Received: by 2002:a5d:4d82:0:b0:371:8319:4dcc with SMTP id ffacd0b85a97d-381b705764fmr19431851f8f.2.1730846930202; Tue, 05 Nov 2024 14:48:50 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c10b7b97sm17588206f8f.2.2024.11.05.14.48.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 14:48:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bernhard Beschow , BALATON Zoltan , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/29] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register Date: Tue, 5 Nov 2024 22:47:13 +0000 Message-ID: <20241105224727.53059-16-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241105224727.53059-1-philmd@linaro.org> References: <20241105224727.53059-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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 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: Bernhard Beschow Populate this read-only register with some arbitrary values which avoids U-Boot's get_clocks() to hang(). Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow Message-ID: <20241103133412.73536-11-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/mpc8544_guts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c index e3540b02816..c02b34ccded 100644 --- a/hw/ppc/mpc8544_guts.c +++ b/hw/ppc/mpc8544_guts.c @@ -29,6 +29,12 @@ #define MPC8544_GUTS_RSTCR_RESET 0x02 #define MPC8544_GUTS_ADDR_PORPLLSR 0x00 +REG32(GUTS_PORPLLSR, 0x00) + FIELD(GUTS_PORPLLSR, E500_1_RATIO, 24, 6) + FIELD(GUTS_PORPLLSR, E500_0_RATIO, 16, 6) + FIELD(GUTS_PORPLLSR, DDR_RATIO, 9, 5) + FIELD(GUTS_PORPLLSR, PLAT_RATIO, 1, 5) + #define MPC8544_GUTS_ADDR_PORBMSR 0x04 #define MPC8544_GUTS_ADDR_PORIMPSCR 0x08 #define MPC8544_GUTS_ADDR_PORDEVSR 0x0C @@ -75,6 +81,12 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr addr, addr &= MPC8544_GUTS_MMIO_SIZE - 1; switch (addr) { + case MPC8544_GUTS_ADDR_PORPLLSR: + value = FIELD_DP32(value, GUTS_PORPLLSR, E500_1_RATIO, 6); /* 3:1 */ + value = FIELD_DP32(value, GUTS_PORPLLSR, E500_0_RATIO, 6); /* 3:1 */ + value = FIELD_DP32(value, GUTS_PORPLLSR, DDR_RATIO, 12); /* 12:1 */ + value = FIELD_DP32(value, GUTS_PORPLLSR, PLAT_RATIO, 6); /* 6:1 */ + break; case MPC8544_GUTS_ADDR_PVR: value = env->spr[SPR_PVR]; break;