Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp596584pxk; Wed, 9 Sep 2020 13:32:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWMD02MnZac+2UdDhOi60r3Ui1YB5gc1RyM5HJCcYAGnmSO24qKjGpNH1KP/qI78ArZl2h X-Received: by 2002:a17:906:a1c2:: with SMTP id bx2mr5679780ejb.426.1599683550610; Wed, 09 Sep 2020 13:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599683550; cv=none; d=google.com; s=arc-20160816; b=DLg9QkobDjJoEHK1RBDQyGxPsEgVWBWlQEF+dUTsbo9m29/E9rUnzjIxeueyJLgvKM LyOnPXwPQcu5fzVMZfvqRYzLlOqwrrLPYdKALpjBHA76JwEnq43HaIdG1RuVG/ip3PRW oa0hGGMIXEZsv99Z6RCjAcPzSVtHH+fMNjb1QUu+/iQkq8gefMfWLaKm9P8mJWCx7Coi yEqwRKiaaLMPCcvi3+CGqaDzkdyx51jHLS42OKEbwg+SxRHwZi02eJwGK0hbYNZLzeG9 UYamMsdKL9IZTQi0bdhQsJvzur2eUTS5TV++bT6jyH5VfZYi3Oc5mccMP80lc9OKXhqm ZHEw== 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 :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=8+h8nOrddZ60rlqGY9p7zSWVef5h+u0J2bJfQopxnyQ=; b=HmEk7695nmSK4hmV6HE5+RVWNfmQuC2kUgARQX/8pNsPbRTZNsWCKdF0cUODy6x9Zn nsONsi3us03Wty47G2qXKJNp4vkqQezmJ09pmmjsVYFjHVICycGi0Nlm4Ak6odVVpx3P 1vW22O0rM7GFqV6GW4fFpU+bQkaWgyVPn6gdQGrBNW77o4k2k65iAQEqSa8Ptlq7x+MV PByWBygQXOe9fn8iRiOlPO+I3Hi8fGsjL8K4diEjDxGRk79qTCH5gE+rDqJqMRWK7RCB hcyvvQptMtFPgHdR9BmN/0KHPZw3/e5tt2kxg0EfHA7nckETb9XcDvIxFFq2Szf2VggT VU+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=MiqgAN2O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si2300021edb.493.2020.09.09.13.32.07; Wed, 09 Sep 2020 13:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=MiqgAN2O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbgIIUbJ (ORCPT + 99 others); Wed, 9 Sep 2020 16:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728954AbgIIUbF (ORCPT ); Wed, 9 Sep 2020 16:31:05 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB02C061756 for ; Wed, 9 Sep 2020 13:31:02 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id t7so1906993pjd.3 for ; Wed, 09 Sep 2020 13:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=8+h8nOrddZ60rlqGY9p7zSWVef5h+u0J2bJfQopxnyQ=; b=MiqgAN2OnenhsyDpyowqhXqf6C6CRJ6jVfkqQesa+MBeanQoilnFquVDff+DJUzapj km6Fowe25oRZ+qYHDZ/VAt5qim0j3EzThGbAvQLyq1faD5fUYevP5KAv+B92wZwakyHy Zmx9m+FV4gP+7WUYXWgW/vj+TXgnADnqytLUWTVwZDzpeQ56e5VOKivWCizhVSxJatFE QvFmSFuSVVV1Z5wkPBoljWJHLfw1eAy2OH3dsz4qGlgnF1QCCuH9nWMWpMHNQs1Zq9OD N9TuKc5tCYspc2dDK//nNIWJ8mfrH+k4RDSeYINS2IBNOO3QMf0rqUj7mBDbZygGWI30 FwmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=8+h8nOrddZ60rlqGY9p7zSWVef5h+u0J2bJfQopxnyQ=; b=RP0x0ucidTXkuN4rdx+TPnXyZgX4J2SQGADx1DUcCej37EMJWj3Kk7K3ixtgkvK6c2 UPIQvoh7gErwpASmSOnlWrV7XGV4b7bUSj6iEOo5f5BxZdWMpI3NFgu3h/uJnxhSs5kd jKf4u4Sa4NJ2hafe18uTOZjmYu/Y8xmzNw/LTtZa2w/PEhrvmk+HHuU4B0Rmty7VxXAj P+M1SFC5uDyCaBXbyGW5ajhmLOgoHd+0LJbUXUzCbkXj06lvSV7PGdikXzNcJ6kkCaZN 0Lq6l2t6OLhvTpLptI//JiVi/O16woxchAU9ojbzk3s+vYhaEl4eDdjTYDAhtQlhyXlT 4gNQ== X-Gm-Message-State: AOAM530Fzl/v9VAoUid45zyXpUCKzexrsHN+y8xHoI0W243ghb6HrnK2 au8QGoca4OiQS0e0o1hbqxUABw== X-Received: by 2002:a17:90a:3e4f:: with SMTP id t15mr2308869pjm.19.1599683462094; Wed, 09 Sep 2020 13:31:02 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id 31sm2962434pgs.59.2020.09.09.13.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 13:31:01 -0700 (PDT) Date: Wed, 09 Sep 2020 13:31:01 -0700 (PDT) X-Google-Original-Date: Wed, 09 Sep 2020 13:30:24 PDT (-0700) Subject: Re: [PATCH v2 2/3] soc: sifive: Add SiFive specific Cadence DDR controller driver In-Reply-To: <20200909060045.GA13647@infradead.org> CC: Christoph Hellwig , dkangude@cadence.com, yash.shah@sifive.com, robh+dt@kernel.org, Paul Walmsley , bp@alien8.de, mchehab@kernel.org, tony.luck@intel.com, devicetree@vger.kernel.org, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, sachin.ghadi@sifive.com, rrichter@marvell.com, james.morse@arm.com, linux-riscv@lists.infradead.org, linux-edac@vger.kernel.org From: Palmer Dabbelt To: Christoph Hellwig Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 08 Sep 2020 23:00:45 PDT (-0700), Christoph Hellwig wrote: > On Tue, Sep 08, 2020 at 08:12:16PM -0700, Palmer Dabbelt wrote: >> I don't know enough about the block to know if the subtle difference in >> register names/offsets means. They look properly jumbled up (ie, not just an >> offset), so maybe there's just different versions or that's the SiFive-specific >> part I had bouncing around my head? Either way, it seems like one driver with >> some simple configuration could handle both of these -- either sticking the >> offsets in the DT (if they're going to be different everywhere) or by coming up >> with some version sort of thing (if there's a handful of these). > > regmap can be used to handle non-uniform register layouts for the same > functionality. Ah, cool, I hadn't seen that before. That seems like the way to go if this is truly an implementatic-specific register mapping. As I was falling asleep last night I remembered that we did end up with implementation-specific register maps for some of the IP we integrated. That was usually the case for IP where we had some signals that we just didn't know what to do with, and while I know the DDR integration was a real trip I'm not sure if that's where these registers came from. Hopefully someone who has better access to these hardware implementations can comment.