Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp992194lqp; Sun, 14 Apr 2024 08:56:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVR/dF4NhCxN2nUSTD3+y5zpuEbdNNJQgxEM9xRCSreClMD2fzX4+NoAlddAxX+EM932noSomdrpJa00WwM/KFPBy42d3o+lOUs+egDjw== X-Google-Smtp-Source: AGHT+IFUH03+BQafLHIMvqrAym7h+Wvw0zK48GAr1dad6iGtRTt0HZJ9eBdYRfN4NQ3lUn5SzNfP X-Received: by 2002:a05:620a:3728:b0:78d:69d9:1e0d with SMTP id de40-20020a05620a372800b0078d69d91e0dmr10120416qkb.62.1713110162120; Sun, 14 Apr 2024 08:56:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713110162; cv=pass; d=google.com; s=arc-20160816; b=Xg2Vy3OTfnsXhzNjYtPr/WoUfvT9azCr+Y2ceTdMd0H8XZIJWq8XQAwUjrqNxepbq4 C1Gw7gNc3EFEQekAtIbsdgq3UkTeF6LF/+0omRwXEiOcxB3QJb2M8XrdiXe8W9/ynsi+ G3MPgM44TsQGl/7L1vRC5PgMPFGhSnptupCAd57qMl2difv9Z++PsDgXeC3GcmPMuFM+ 6b0dQmi9DxwitqmRku4a0+OLhli8oWc7iveQT8/09AQqG+7BDWw9+rUzqamtzoWnh9zz tIa3ZAZPcs3kZgl4/CMfQgf30nIgCjHbRp6qwtOYKH1gY3GYuOKQKjf6m3t/janbP9Px l97w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:autocrypt:from:references:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=9S0AD7QoPt/H79DvSHbTXtCJJDEWPMSGicmuFa1sSw4=; fh=yL5CIYZtgXlkpjxCyhdG6UagaC0Txtpv2h4duFdEzCg=; b=LAUqJUqX839Yi3dNzcablCquei8mQQxHBmbb95lahLo0TtdwF0iMTQqXVZXhcKEmwA edgr7tUyoCX3E5qkAIkTbWR3aRGQeueyLNJ8TrIYMNB5DqvAQGX3tp2EC+Fcv5qg0tol 39lEFvOAMih3R3mVmUuwkKzzB7L03c0wEvkcinjjF+OIvUCbAuSApbkZ3FMRmXlZS+GV kzCsKWsIs4JpPptKrrK4EBpMsTrrdIyWsKgzq88njCWqmedp+CmAIQko5K6jynKzY0Bw vGf1kFF3Pu32W7Qv32UoM4AvB7/zhMT7OqPgUkvhcZPaUQiHrFuPh6mJdkIIQfOXX7/F W9tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="bSiErFj/"; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-144254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h3-20020a05620a13e300b0078d679e8e5asi8019733qkl.655.2024.04.14.08.56.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 08:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="bSiErFj/"; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-144254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BF43E1C20E30 for ; Sun, 14 Apr 2024 15:56:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D696D134CF8; Sun, 14 Apr 2024 15:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="bSiErFj/" Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC47F5CDE6 for ; Sun, 14 Apr 2024 15:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713110153; cv=none; b=QEyU6poHNTbJ0yAVFl/PVUDFGbgeRRob2DamkcUUQZk3fmq8ZmhvXgCoAdWh8bhWZMDka7IrU+Tk+ufcLm4B2mEetgJbjMV9/b76aUPEiVaDCmDif1AUaQOBmKu61ELhyvTbau6D5DYEKCTmoXkLAvs428pXBUosPxyZqnjsRak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713110153; c=relaxed/simple; bh=lde5S9zdgPPTXQLGD+00GU+P1D4npCqZ7JwuAG+0fT4=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=ayCjl5YfmIJEnxny2c0EPquWUpL1D+rcMs2inq8MV8uj6Y3h6RbTjlGi6mUqC8XynDXf5fR+7g9HPJjjTWI6xM60SrFg/MDjfPLZY3YpacPkLpD6x1/3v9eWI7DkQzS2hak2CwFJBtXI4cTWhbDKAmIfHOXVOLmVr7rE+J1iSM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=bSiErFj/; arc=none smtp.client-ip=209.85.215.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5e42b4bbfa4so1351823a12.1 for ; Sun, 14 Apr 2024 08:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1713110150; x=1713714950; darn=vger.kernel.org; h=in-reply-to:autocrypt:from:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=9S0AD7QoPt/H79DvSHbTXtCJJDEWPMSGicmuFa1sSw4=; b=bSiErFj/lbxbpT2Fv9zUh7AVIbKTQWo6UBoW2KCVEgLPqoPZjq67dm5aV7p1jR2Nyu MB4kQwAdBfIKVcxEHN7yIPhNSnDJQN0fATlvCFwp0p6uKD1jgm6zX8oXG/+39JByc/+Y eOypl6gia7cbxwmFbQjQePjKzWFfglQeLSHCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713110150; x=1713714950; h=in-reply-to:autocrypt:from:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=9S0AD7QoPt/H79DvSHbTXtCJJDEWPMSGicmuFa1sSw4=; b=MOx2TmFp23TXcOe3DkymFVamcbj8q2Uvcs52T4y2mZ1wJdbEYvaqfkcr17QvTpide5 jEM81/Wg6lyCk4zOSOXLrNqqk8M5Nu4hYh8kqUAXDL2093jiNG0+5zUOWy2b26Ahiu7Z FE9A08GaSgyYvwh/nHh+AenQpY8dN5J9EWa+bHKIe5qd6hPukXwgfYX6EgBPUDFqGnDr sLp9ynLTy9dW1AuIstzc9UZMy8YF8GbjwME/DoTx5UcnRo40L1kIXdvOEnEx6ebad03z OcbbM4QZVF8jyHe4jdfK1enXidg4/8z45+eyM9Bzuc744NEnj5/23pFjwiQF082H2yrH u1wQ== X-Forwarded-Encrypted: i=1; AJvYcCWCIYQSmYAmVPB1FYMKOUGjGaUc9NJ/t4j1KDM8NFWBdT4lwpHB23W1Vz9fhaFu4bG+GfkeioWyPIk67j71a4r+kldNx6CPOVkze1if X-Gm-Message-State: AOJu0Yxd+4Eknb2KrIhwIyvwhyUbY79TIAkfIOQ/zsQ+z6n9sBrvMsIT e2dlYTN/H8EkhMAnFtbenoYSXjscCJouYEpslhuhNdllbbF/3ngAUvXFwA26Xg== X-Received: by 2002:a17:902:cece:b0:1e4:2d13:cf68 with SMTP id d14-20020a170902cece00b001e42d13cf68mr9428877plg.17.1713110150126; Sun, 14 Apr 2024 08:55:50 -0700 (PDT) Received: from [10.230.29.214] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j5-20020a170903024500b001e120a9e964sm6133138plh.126.2024.04.14.08.55.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Apr 2024 08:55:49 -0700 (PDT) Message-ID: <6042c0c7-bb8a-4898-8bed-92155b8e9c4f@broadcom.com> Date: Sun, 14 Apr 2024 08:55:45 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/6] mmc: sdhci-brcmstb: Add BCM2712 SD Express support To: Andrea della Porta , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Broadcom internal kernel review list , Linus Walleij , Adrian Hunter , Kamal Dasu , Al Cooper , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Jonathan Bell , Phil Elwell References: From: Florian Fainelli Autocrypt: addr=florian.fainelli@broadcom.com; keydata= xsBNBFPAG8ABCAC3EO02urEwipgbUNJ1r6oI2Vr/+uE389lSEShN2PmL3MVnzhViSAtrYxeT M0Txqn1tOWoIc4QUl6Ggqf5KP6FoRkCrgMMTnUAINsINYXK+3OLe7HjP10h2jDRX4Ajs4Ghs JrZOBru6rH0YrgAhr6O5gG7NE1jhly+EsOa2MpwOiXO4DE/YKZGuVe6Bh87WqmILs9KvnNrQ PcycQnYKTVpqE95d4M824M5cuRB6D1GrYovCsjA9uxo22kPdOoQRAu5gBBn3AdtALFyQj9DQ KQuc39/i/Kt6XLZ/RsBc6qLs+p+JnEuPJngTSfWvzGjpx0nkwCMi4yBb+xk7Hki4kEslABEB AAHNMEZsb3JpYW4gRmFpbmVsbGkgPGZsb3JpYW4uZmFpbmVsbGlAYnJvYWRjb20uY29tPsLB IQQQAQgAywUCZWl41AUJI+Jo+hcKAAG/SMv+fS3xUQWa0NryPuoRGjsA3SAUAAAAAAAWAAFr ZXktdXNhZ2UtbWFza0BwZ3AuY29tjDAUgAAAAAAgAAdwcmVmZXJyZWQtZW1haWwtZW5jb2Rp bmdAcGdwLmNvbXBncG1pbWUICwkIBwMCAQoFF4AAAAAZGGxkYXA6Ly9rZXlzLmJyb2FkY29t Lm5ldAUbAwAAAAMWAgEFHgEAAAAEFQgJChYhBNXZKpfnkVze1+R8aIExtcQpvGagAAoJEIEx tcQpvGagWPEH/2l0DNr9QkTwJUxOoP9wgHfmVhqc0ZlDsBFv91I3BbhGKI5UATbipKNqG13Z TsBrJHcrnCqnTRS+8n9/myOF0ng2A4YT0EJnayzHugXm+hrkO5O9UEPJ8a+0553VqyoFh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idCtantcGT2Wz/2PlbZqkoJxMQc40rb fXa4xQSvJYj0GWpadrDJUvUu3LEsunDCxdWrmbmwGRKqZraV2oG7YEddmDqOe0Xm/NxeSobc MIlnaE6V0U8f5zNHB7Y46yJjjYT/Ds1TJo3pvwevDWPvv6rdBeV07D9s43frUS6xYd1uFxHC 7dZYWJjZmyUf5evr1W1gCgwLXG0PEi9n3qmz1lelQ8lSocmvxBKtMbX/OKhAfuP/iIwnTsww 95A2SaPiQZA51NywV8OFgsN0ITl2PlZ4Tp9hHERDe6nQCsNI/Us= In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000fc09b3061610890c" --000000000000fc09b3061610890c Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/13/2024 3:14 PM, Andrea della Porta wrote: > Broadcom BCM2712 SDHCI controller is SD Express capable. Add support > for sde capability where the implementation is based on downstream driver, > diverging from it in the way that init_sd_express callback is invoked: > in downstream the sdhci_ops structure has been augmented with a new > function ptr 'init_sd_express' that just propagate the call to the > driver specific callback so that the callstack from a structure > standpoint is mmc_host_ops -> sdhci_ops. The drawback here is in the > added level of indirection (the newly added init_sd_express is > redundant) and the sdhci_ops structure declaration has to be changed. > To overcome this the presented approach consist in patching the mmc_host_ops > init_sd_express callback to point directly to the custom function defined in > this driver (see struct brcmstb_match_priv). > > Signed-off-by: Andrea della Porta > --- > drivers/mmc/host/Kconfig | 1 + > drivers/mmc/host/sdhci-brcmstb.c | 147 ++++++++++++++++++++++++++++++- > 2 files changed, 147 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig > index aebc587f77a7..343ccac1a4e4 100644 > --- a/drivers/mmc/host/Kconfig > +++ b/drivers/mmc/host/Kconfig > @@ -1018,6 +1018,7 @@ config MMC_SDHCI_BRCMSTB > depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST > depends on MMC_SDHCI_PLTFM > select MMC_CQHCI > + select OF_DYNAMIC > default ARCH_BRCMSTB || BMIPS_GENERIC > help > This selects support for the SDIO/SD/MMC Host Controller on > diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c > index 907a4947abe5..56fb34a75ec2 100644 > --- a/drivers/mmc/host/sdhci-brcmstb.c > +++ b/drivers/mmc/host/sdhci-brcmstb.c > @@ -29,6 +29,7 @@ > > #define BRCMSTB_PRIV_FLAGS_HAS_CQE BIT(0) > #define BRCMSTB_PRIV_FLAGS_GATE_CLOCK BIT(1) > +#define BRCMSTB_PRIV_FLAGS_HAS_SD_EXPRESS BIT(2) > > #define SDHCI_ARASAN_CQE_BASE_ADDR 0x200 > > @@ -50,13 +51,19 @@ struct sdhci_brcmstb_priv { > unsigned int flags; > struct clk *base_clk; > u32 base_freq_hz; > + struct regulator *sde_1v8; > + struct device_node *sde_pcie; > + void *__iomem sde_ioaddr; > + void *__iomem sde_ioaddr2; > struct pinctrl *pinctrl; > struct pinctrl_state *pins_default; > + struct pinctrl_state *pins_sdex; > }; > > struct brcmstb_match_priv { > void (*hs400es)(struct mmc_host *mmc, struct mmc_ios *ios); > void (*cfginit)(struct sdhci_host *host); > + int (*init_sd_express)(struct mmc_host *mmc, struct mmc_ios *ios); > struct sdhci_ops *ops; > const unsigned int flags; > }; > @@ -263,6 +270,105 @@ static void sdhci_brcmstb_cfginit_2712(struct sdhci_host *host) > } > } > > +static int bcm2712_init_sd_express(struct mmc_host *mmc, struct mmc_ios *ios) > +{ > + struct sdhci_host *host = mmc_priv(mmc); > + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > + struct sdhci_brcmstb_priv *brcmstb_priv = sdhci_pltfm_priv(pltfm_host); > + struct device *dev = host->mmc->parent; > + u32 ctrl_val; > + u32 present_state; > + int ret; > + > + if (!brcmstb_priv->sde_ioaddr || !brcmstb_priv->sde_ioaddr2) > + return -EINVAL; > + > + if (!brcmstb_priv->pinctrl) > + return -EINVAL; > + > + /* Turn off the SD clock first */ > + sdhci_set_clock(host, 0); > + > + /* Disable SD DAT0-3 pulls */ > + pinctrl_select_state(brcmstb_priv->pinctrl, brcmstb_priv->pins_sdex); > + > + ctrl_val = readl(brcmstb_priv->sde_ioaddr); > + dev_dbg(dev, "ctrl_val 1 %08x\n", ctrl_val); > + > + /* Tri-state the SD pins */ > + ctrl_val |= 0x1ff8; No magic values please. > + writel(ctrl_val, brcmstb_priv->sde_ioaddr); > + dev_dbg(dev, "ctrl_val 1->%08x (%08x)\n", ctrl_val, readl(brcmstb_priv->sde_ioaddr)); > + /* Let voltages settle */ > + udelay(100); Why not usleep_range()? > + > + /* Enable the PCIe sideband pins */ > + ctrl_val &= ~0x6000; No magic values please. > + writel(ctrl_val, brcmstb_priv->sde_ioaddr); > + dev_dbg(dev, "ctrl_val 1->%08x (%08x)\n", ctrl_val, readl(brcmstb_priv->sde_ioaddr)); > + /* Let voltages settle */ > + udelay(100); Likewise. > + > + /* Turn on the 1v8 VDD2 regulator */ > + ret = regulator_enable(brcmstb_priv->sde_1v8); > + if (ret) > + return ret; > + > + /* Wait for Tpvcrl */ > + msleep(1); > + > + /* Sample DAT2 (CLKREQ#) - if low, card is in PCIe mode */ > + present_state = sdhci_readl(host, SDHCI_PRESENT_STATE); > + present_state = (present_state & SDHCI_DATA_LVL_MASK) >> SDHCI_DATA_LVL_SHIFT; > + dev_dbg(dev, "state = 0x%08x\n", present_state); > + > + if (present_state & BIT(2)) { Likewise, replace with constant. > + dev_err(dev, "DAT2 still high, abandoning SDex switch\n"); > + return -ENODEV; > + } > + > + /* Turn on the LCPLL PTEST mux */ > + ctrl_val = readl(brcmstb_priv->sde_ioaddr2 + 20); // misc5 > + ctrl_val &= ~(0x7 << 7); > + ctrl_val |= 3 << 7; > + writel(ctrl_val, brcmstb_priv->sde_ioaddr2 + 20); > + dev_dbg(dev, "misc 5->%08x (%08x)\n", ctrl_val, readl(brcmstb_priv->sde_ioaddr2 + 20)); > + > + /* PTEST diff driver enable */ > + ctrl_val = readl(brcmstb_priv->sde_ioaddr2); > + ctrl_val |= BIT(21); > + writel(ctrl_val, brcmstb_priv->sde_ioaddr2); > + > + dev_dbg(dev, "misc 0->%08x (%08x)\n", ctrl_val, readl(brcmstb_priv->sde_ioaddr2)); > + > + /* Wait for more than the minimum Tpvpgl time */ > + msleep(100); > + > + if (brcmstb_priv->sde_pcie) { > + struct of_changeset changeset; > + static struct property okay_property = { > + .name = "status", > + .value = "okay", > + .length = 5, > + }; > + > + /* Enable the pcie controller */ > + of_changeset_init(&changeset); > + ret = of_changeset_update_property(&changeset, > + brcmstb_priv->sde_pcie, > + &okay_property); > + if (ret) { > + dev_err(dev, "%s: failed to update property - %d\n", __func__, > + ret); > + return -ENODEV; > + } > + ret = of_changeset_apply(&changeset); > + } Why are you doing this? Cannot the firmware enable/disable the node according to the boot mode or something else? This is not going to fly for upstream, sorry. -- Florian --000000000000fc09b3061610890c Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQeQYJKoZIhvcNAQcCoIIQajCCEGYCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3QMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQM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