From patchwork Sun Nov 3 01:36:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11224271 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7D06112B for ; Sun, 3 Nov 2019 01:39:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8580220679 for ; Sun, 3 Nov 2019 01:39:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gK2j9Avu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8580220679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FezUxeE+aIP2Rgi9f/YGM5b//F0tdE5am+btJdHrTQk=; b=gK2j9AvuIz253q ZAagcNuk0RT3Wj3Z6ks2smZRvj+fpnUeHtr3GmqfLK1l4nPhmNHymzbA4yDSTBxv2oxFN1l5U+Liq DqYSd8CQE6ialIV+7739pDDOtf1AlRy5Bi7AltskQR+CxQF8MJ0fcLlh9/pVkr2syEyp7XkoHI6ol o5UzwA6SrWZpB6ilV5KJra17lXLHYrXQdhrInifpaYmKZORqw9HuDvSuyl5swQe+Y3ogqbKey0yCq Eb9Zml3etj1TOtF7m+hjw2UAh1+3ZPN809z6zrAp+F0FN9i/pT3zVxhCNb2g13itOHMrvfufCm+oe isyG0adCAgobLs4+Eesw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4rH-000761-1O; Sun, 03 Nov 2019 01:39:11 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pB-0004wc-VK; Sun, 03 Nov 2019 01:37:03 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B597CB30C; Sun, 3 Nov 2019 01:36:56 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 10/11] soc: realtek: chip: Detect RTD1294 Date: Sun, 3 Nov 2019 02:36:44 +0100 Message-Id: <20191103013645.9856-11-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183702_191107_94B8BCC2 X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andreas_F=C3=A4rber?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Detection logic from downstream include/soc/realtek/rtd129x_cpu.h. Signed-off-by: Andreas Färber --- drivers/soc/realtek/chip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index f4b26fb048c7..e13339a4ca2e 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -54,6 +54,14 @@ static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s) { void __iomem *base; + base = of_iomap(dev->of_node, 2); + if (base) { + u32 efuse = readl_relaxed(base); + iounmap(base); + if ((efuse & 0x3) == 0x1) + return "RTD1294"; + } + base = of_iomap(dev->of_node, 1); if (base) { u32 chipinfo1 = readl_relaxed(base);