From patchwork Sun Nov 3 01:36:42 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: 178370 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2570160ill; Sat, 2 Nov 2019 18:37:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxegg7jPBsm7wppwwTbgX5x0xDluQv7AwEM0484tb+NSztE2gNia8HIDNdfodSq/VZRPrJG X-Received: by 2002:a17:906:a388:: with SMTP id k8mr14969620ejz.223.1572745038978; Sat, 02 Nov 2019 18:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572745038; cv=none; d=google.com; s=arc-20160816; b=MHcGME1LVB9+nw/Oq81w2I41jiK9xE1Vj4eyds3y4mJ96Xn6UCMsZplnK9bj2GdASQ 3YeFXfFqO0fxKPJjAUdFdVJEITsvmpemh24+f3bZUatf/56//dqEbARBqVizZ3fC9c1s 7QJezbxM+lgyt8OdtI/wZkleHfOxC4CxNZezOcAiSJyXUUIvZBSTMgr4HnB3jlWYh5d/ J2A+yxHSkUBXthezCtk85evfG9NVr+6iTs3EtwJ2cG1k+DcL8RCu6ikZfGLHJ4PJNz9a ZpyacnwoMilQ+BhSePbRfdmFI/2xYDNVJRyZZ32HqXJw/xH5yzvIc5qclafrqmXyy0dy FCwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hebEcbLdVmWtmpFjnwsonjwqNBHHlQ+uyd8BnGrSd98=; b=K2TlNFUfUIZQTqWETuCEMpYee6hk+qqaFhHKk9DU2ngJARAFxPjAdH4ghDmbOjkvie YpuYXz1ZozCyII+uDRnuG6T2dSJhdKzq4QEKtfBSPKJhezPgclzN5K9mh61BTzmjrPE6 GiYV9zkYoD5j75qsexIfPY9k+QqH5XqFIhtn5/Bv7HdVEEfcsXK990SqaaYj9bPAb1VI SHIo1iBBW7kq8T5vCYQsB8KW7ssvDulzihyhqlUnuA83LDMzHyRvByXL5osi0G+cA+Y4 MuqwHEJr8WHpZQEmlhXEx1MM/nszM5C1xWUqmXawATukACRtozSImI4rA9M0G2yJHXIV J1vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g40si4077120edb.369.2019.11.02.18.37.18; Sat, 02 Nov 2019 18:37:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727644AbfKCBhR (ORCPT + 26 others); Sat, 2 Nov 2019 21:37:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:59478 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727476AbfKCBg5 (ORCPT ); Sat, 2 Nov 2019 21:36:57 -0400 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 ED297B248; Sun, 3 Nov 2019 01:36:55 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= Subject: [RFC 08/11] soc: realtek: chip: Detect RTD1293 Date: Sun, 3 Nov 2019 02:36:42 +0100 Message-Id: <20191103013645.9856-9-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Logic self-determined by comparing DS418j and DS418 registers. Signed-off-by: Andreas Färber --- drivers/soc/realtek/chip.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.16.4 diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index ba653c097644..f4b26fb048c7 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -59,6 +59,8 @@ static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s) u32 chipinfo1 = readl_relaxed(base); iounmap(base); if (chipinfo1 & BIT(11)) { + if (chipinfo1 & BIT(4)) + return "RTD1293"; return "RTD1296"; } }