From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751380AbdJBVkC (ORCPT ); Mon, 2 Oct 2017 17:40:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34478 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbdJBVkA (ORCPT ); Mon, 2 Oct 2017 17:40:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3092360227 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Mon, 2 Oct 2017 14:39:58 -0700 From: Stephen Boyd To: Joel Stanley Cc: Lee Jones , Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Jeffery , Benjamin Herrenschmidt , Jeremy Kerr , Rick Altherr , Ryan Chen , Arnd Bergmann Subject: Re: [PATCH v2 2/5] clk: aspeed: Register core clocks Message-ID: <20171002213958.GR457@codeaurora.org> References: <20170921042641.7326-1-joel@jms.id.au> <20170921042641.7326-3-joel@jms.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170921042641.7326-3-joel@jms.id.au> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/21, Joel Stanley wrote: > @@ -112,9 +115,137 @@ static const struct aspeed_gate_data aspeed_gates[] __initconst = { > /* 31: reserved */ > }; > > +static const struct clk_div_table ast2400_div_table[] = { > + { 0x0, 2 }, > + { 0x1, 4 }, > + { 0x2, 6 }, > + { 0x3, 8 }, > + { 0x4, 10 }, > + { 0x5, 12 }, > + { 0x6, 14 }, > + { 0x7, 16 }, > + { 0 } > +}; > + > +static const struct clk_div_table ast2500_div_table[] = { > + { 0x0, 4 }, > + { 0x1, 8 }, > + { 0x2, 12 }, > + { 0x3, 16 }, > + { 0x4, 20 }, > + { 0x5, 24 }, > + { 0x6, 28 }, > + { 0x7, 32 }, > + { 0 } > +}; > + > +static struct clk_hw *aspeed_calc_pll(const char *name, u32 val) > +{ > + unsigned int mult, div; > + > + if (val & BIT(20)) { #define for these BIT() things please. Or a comment, but #define is probably better. Just improves readability. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project