Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5902998imm; Tue, 12 Jun 2018 15:40:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLghgQ24n0P0xKp0/jE4xffoi2hyY/ZynIYq7jZriigIukVyHpnLGblgqzXCiqpJ1z2fiBn X-Received: by 2002:a63:6a89:: with SMTP id f131-v6mr1879754pgc.311.1528843237160; Tue, 12 Jun 2018 15:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528843237; cv=none; d=google.com; s=arc-20160816; b=Q917wm49Cy2+WfvfsqhIrfefH/LvwYamtmYzb6qpiFDnApumszniLVGz1FEwytikFZ 1k2rtKaLNUbaDgbmPytenZlD+ddIBr6Daa/w9zKweoC8ZcIGJSYG1VWiSEt0TFzzGqCv zsGik+m3519O6ymW0R7Qy56cMN/4d+Zs3iA/8gxdAjzumjoyfmYZh/v1yV9XAmzNF5bT 00M47ZliNyr2CE9m2N24fXziKXwA1fYKUmlHz63wW2O8lKnm7G1fqp93cufsOwCn06Fp zb2ouiTNhYkHwuvuc0BtYZfPZex6G+A2vHvdJkemWXtv1qZNEvoF1aE1yCpc8Etffgz6 Mp6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=9VxIY8A1QgTl9wG8rWxmmjfVioRKwSc3V0fBAbeN1L4=; b=JyYTi3xGINYTWNQmGu9X2POw7XmJQbLSIjL3CZHH6O994saxU6gm9NYek2AdC5rqgJ FzFbHXz29d5dfC0729O6eGG2YH5aIxzy+AZr0+OZLdY1zZYrMgxaO/1WQtFwv3VR6Zhd XnIhZK9Ea5B8CvfBQgSM4o4m/Ahu60Six5KZuUKr481ibEQ+tIgZU1DwEOHe8bJBYkpE 07Gkg9IgpUMFFlhHCmG2bHudYxl4iWPw9IKFuulxOc9eqoFI3lbCbvnKrlcenT8Uqzf5 31bf6ShxqopmhaGVWxpYboQlNdyjRW5pYDhdbbXnNv+t9B2Gm0oc8l+PIWBOQp5tUpFI 8gOA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6-v6si978668pgs.216.2018.06.12.15.40.22; Tue, 12 Jun 2018 15:40:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934895AbeFLWj6 (ORCPT + 99 others); Tue, 12 Jun 2018 18:39:58 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:40621 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934418AbeFLWjz (ORCPT ); Tue, 12 Jun 2018 18:39:55 -0400 Received: by mail-yb0-f196.google.com with SMTP id v17-v6so219528ybe.7; Tue, 12 Jun 2018 15:39:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9VxIY8A1QgTl9wG8rWxmmjfVioRKwSc3V0fBAbeN1L4=; b=TK4QSK5SKicWT1ElrG8xyLBfgmz1BcYcWQGDkB+LH1TkrxC1pRbVK+1EsoaRkcmYbd QZS2MtNQojmBqijOsabvaV6oRqVxxzLe6JFFVx8iWoUqhd6SZhzNPoySOXFG4qQN9ahm ZyxZjYnp4xAInTfoLtgpl4zT2jahp+7kjfNOhRcYjxaYBSjTKV1pGgZolPvfSi0Y3Ad9 ghPzBlGitSx38L3OG4Nj17NzxSu9+pc4DodR/ufXBa/swYjfG72D/Pkjt+KTHi+ilRII ZHZ78qYdp4Zh6v880uikr9CS+zipRoF6zeK23t/DuEh08f44Lklc4kwyiqlJDRXtEPTs EgRg== X-Gm-Message-State: APt69E13t/7T9RVa3KRzOOuTRQXKRLC27zF8n+ntM/KZO/lyry/QdEFo qioquXyuVqCZcy8IjUt2qB+k+NRvUw== X-Received: by 2002:a25:7910:: with SMTP id u16-v6mr1138500ybc.209.1528843194920; Tue, 12 Jun 2018 15:39:54 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id u17-v6sm542970ywu.16.2018.06.12.15.39.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 15:39:54 -0700 (PDT) Date: Tue, 12 Jun 2018 16:39:53 -0600 From: Rob Herring To: Songjun Wu Cc: hua.ma@linux.intel.com, yixin.zhu@linux.intel.com, chuanhua.lei@intel.com, linux-mips@linux-mips.org, qi-ming.wu@intel.com, linux-clk@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Jiri Slaby , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mark Rutland Subject: Re: [PATCH 7/7] tty: serial: lantiq: Add CCF support Message-ID: <20180612223953.GA21621@rob-hp-laptop> References: <20180612054034.4969-1-songjun.wu@linux.intel.com> <20180612054034.4969-8-songjun.wu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180612054034.4969-8-songjun.wu@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 12, 2018 at 01:40:34PM +0800, Songjun Wu wrote: > Previous implementation uses platform-dependent API to get the clock. > Those functions are not available for other SoC which uses the same IP. > The CCF (Common Clock Framework) have an abstraction based APIs > for clock. > Change to use CCF APIs to get clock and rate. > So that different SoCs can use the same driver. > Clocks and clock-names are updated in device tree binding. > > Signed-off-by: Songjun Wu > > --- > > .../devicetree/bindings/serial/lantiq_asc.txt | 15 +++ Please split bindings to separate patch. > drivers/tty/serial/Kconfig | 2 +- > drivers/tty/serial/lantiq.c | 101 +++++++++++++++++---- > 3 files changed, 98 insertions(+), 20 deletions(-) > > diff --git a/Documentation/devicetree/bindings/serial/lantiq_asc.txt b/Documentation/devicetree/bindings/serial/lantiq_asc.txt > index 3acbd309ab9d..608f0c87a4af 100644 > --- a/Documentation/devicetree/bindings/serial/lantiq_asc.txt > +++ b/Documentation/devicetree/bindings/serial/lantiq_asc.txt > @@ -6,6 +6,10 @@ Required properties: > - interrupts: the 3 (tx rx err) interrupt numbers. The interrupt specifier > depends on the interrupt-parent interrupt controller. > > +Optional properties: > +- clocks: Should contain frequency clock and gate clock > +- clock-names: Should be "freq" and "asc" > + > Example: > > asc1: serial@e100c00 { > @@ -14,3 +18,14 @@ asc1: serial@e100c00 { > interrupt-parent = <&icu0>; > interrupts = <112 113 114>; > }; > + > +asc0: serial@600000 { > + compatible = "lantiq,asc"; > + reg = <0x600000 0x100000>; 1MB of address space? That wastes a lot of virtual space on 32-bit systems. Just make the size the actual used range. > + interrupt-parent = <&gic>; > + interrupts = , > + , > + ; > + clocks = <&pll0aclk SSX4_CLK>, <&clkgate1 GATE_URT_CLK>; > + clock-names = "freq", "asc"; > +};