From patchwork Wed Jun 14 16:35:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 108047 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp81223vqr; Wed, 14 Jun 2023 09:39:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4q3TR4/THLQ+5G9DRrzDvsnEylo1SAHV1nA89x9YhohUd9tHE8F9Wq2fbfdx6Mt9NPsurO X-Received: by 2002:a50:ed91:0:b0:514:9cb5:ee1e with SMTP id h17-20020a50ed91000000b005149cb5ee1emr8697882edr.6.1686760779000; Wed, 14 Jun 2023 09:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686760778; cv=none; d=google.com; s=arc-20160816; b=cm6TJ630vbrfxYm1K90dt0oSDAUIFEkwBqBX9SQuGcLXIOUp6vFnHAMqglIEp7Ni/0 xAAatJIjtTOfRySJ9z3meT70ZoBX4EIHyxvtIVvf4K4HkdY387aPVWqJ1v+zSlEGFblH +pnp3FxkSBrm+8nSIlkNPzwX0b1eE+lKqslm8aaD1DMQDWlBI3Kdt5fg4hgLi1G1gibn wDPGuQ5GGHd4NMZRBtrxl3pSUD8BZiaAUatdiASLjXnhQDT4zbtwSzQ3M/LL2a2w38lM IlfL4A80pO9Aj8/3y9YjrPGdWrlBP6OS0Qs6IzzeoEHqcaJ4kbgpxOUSFzj1T2JaqMqv iGvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=dw1k07J6NwME+MGjyWIu3VYlH6qLo7dzckcD6/ZsENI=; b=nbJoicMx0uOhCwxi2V3Y0JJM119J/nxvE830UnlgtCiQcd9ur1T/K60CokK723GQZV S9Oxh3VL1SmwRuJJ6Lw572SNfbpP9xef2BI3ReDKqnW+AhNhfXdtdCJIrrSv/egoPwyr iYazochQ+4OmyJ3IQrUtGkCRsYS/aoGMUpy4zNGvOYAb+ts6CNMw11575lj38HZCM7m6 pmnBl/FGEmYTx6ioqW/1LE9u/PW4Fi1cfRIIiyjrriWsTdWh6+iLZTWt1TjDd4pTL6h0 b22oUiws0szx9x6CM/viTCRepkPKayxstFCN789ZAo6RPsYViQnYNstCOU4471l+xIYi DPkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=Cl3fWUm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020aa7c654000000b00516a16730f6si2965660edr.418.2023.06.14.09.39.06; Wed, 14 Jun 2023 09:39:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=Cl3fWUm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235912AbjFNQhX (ORCPT + 99 others); Wed, 14 Jun 2023 12:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235552AbjFNQgu (ORCPT ); Wed, 14 Jun 2023 12:36:50 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C005212B; Wed, 14 Jun 2023 09:36:45 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 6E255CFDC4; Wed, 14 Jun 2023 16:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1686760571; bh=ZcQi4gcQ9xL6CFZvOAjPus5Or0PLbs0aejkO5TB4+r4=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=Cl3fWUm+cOdVqgXdDsCVWYcI7VRIy1kFDqZczlOVRUvL9oMkxFJCykiJ9jlE5RtV9 W1PKp9GOd4b8NHjvbD5jRPmbEnlM+DYYHvB/jFDS59cSjaSEKEJ+6vQNjuolm1j/58 9ZGl4Hi4Vvy2Y47RTm7ZZRCntL0AuvYobY5EYd10= From: Luca Weiss Date: Wed, 14 Jun 2023 18:35:51 +0200 Subject: [PATCH v3 5/6] soc: qcom: ocmem: Add support for msm8226 MIME-Version: 1.0 Message-Id: <20230506-msm8226-ocmem-v3-5-79da95a2581f@z3ntu.xyz> References: <20230506-msm8226-ocmem-v3-0-79da95a2581f@z3ntu.xyz> In-Reply-To: <20230506-msm8226-ocmem-v3-0-79da95a2581f@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Clark , Brian Masney , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=964; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=ZcQi4gcQ9xL6CFZvOAjPus5Or0PLbs0aejkO5TB4+r4=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkiex4a3dI1fG3YDwRky/rM6jnxOsN0G59nQMCj /YNxZXC0SaJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZInseAAKCRBy2EO4nU3X VkqMEAChw6VBJFtVhya2Ckv5YroFpmaQnmjcnIhuSVjZ/Vp+/MptkCNRsRSS5CpP3m2ZWMutALP vbaadfdKLiofuvBs9jdfVIaOnbmYs/fVOLmalRBT2w1eZzQeam2hIbdgxhCws7SMxjqGcPE9Mcc jliWT0o2FFgQiAxGcXqVgztJZctfntAiuOtzT4uc7GutZ1UUzZevhrpnKfPfDFGXzRoxi/VQf+o 9zpcD+NAeOkIdjTtJ/VLkSmveeKZ3Y3KLOSZ2jrND2slkpbvVs6pYlN5uADEg5wuW6TU8M5Ek8I kqPfqDnvANinsI0CDHaiMfGMBnbZNv0ZTX/0RQV3ibZxPPymFw/EAHpgrHG2OTZeMNUnyukwAcZ r/5DfoQoYYc8jgTSHmqDFp23oSGcIsz9I2fj19P7sIGpdGo3w+CG8TTdAYNqPTdxNpuzSLSBHgk hRtE5Uh3J0F990srqzMJU0JuEfAzXgZzgWlahc4CDNRK9YpA0QfMfqNT6H78SynjmWT395QK7IB X+dV/bceHanOMfVaceokwjq3vv6GSgg7IB9AFQdzo6cntaS0LZlh+SYTIxaSEWI3yglSAn6Deex 9gA1RaoK8M+tugkF2I360Yb9LU40tZwppu5GcLhuGY9FzQ+xnOVWVTKqHNVx4cPwTnQySKcNmcL Zk0bqSB8DGEQD1g== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768696870652340439?= X-GMAIL-MSGID: =?utf-8?q?1768696870652340439?= The msm8226 SoC also contains OCMEM but with one region only. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss --- drivers/soc/qcom/ocmem.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c index ff8d01b0ac68..2064e9512301 100644 --- a/drivers/soc/qcom/ocmem.c +++ b/drivers/soc/qcom/ocmem.c @@ -423,12 +423,18 @@ static int ocmem_dev_remove(struct platform_device *pdev) return 0; } +static const struct ocmem_config ocmem_8226_config = { + .num_regions = 1, + .macro_size = SZ_128K, +}; + static const struct ocmem_config ocmem_8974_config = { .num_regions = 3, .macro_size = SZ_128K, }; static const struct of_device_id ocmem_of_match[] = { + { .compatible = "qcom,msm8226-ocmem", .data = &ocmem_8226_config }, { .compatible = "qcom,msm8974-ocmem", .data = &ocmem_8974_config }, { } };