From: Rob Herring <robh@kernel.org> To: Jiancheng Xue <xuejiancheng@huawei.com> Cc: mturquette@baylibre.com, sboyd@codeaurora.org, p.zabel@pengutronix.de, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux@arm.linux.org.uk, khilman@linaro.org, arnd@arndb.de, olof@lixom.net, xuwei5@hisilicon.com, haojian.zhuang@linaro.org, zhangfei.gao@linaro.org, bintian.wang@huawei.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, yanhaifeng@hisilicon.com, yanghongwei@hisilicon.com, suwenping@hisilicon.com, ml.yang@hisilicon.com, gaofei@hisilicon.com, zhangzhenxing@hisilicon.com, xuejiancheng@hisilicon.com Subject: Re: [PATCH v5 1/6] clk: hisilicon: add CRG driver for hi3519 soc Date: Sat, 9 Jan 2016 09:33:22 -0600 [thread overview] Message-ID: <20160109153322.GA19311@rob-hp-laptop> (raw) In-Reply-To: <1452219400-32478-2-git-send-email-xuejiancheng@huawei.com> On Fri, Jan 08, 2016 at 10:16:35AM +0800, Jiancheng Xue wrote: > The CRG(Clock and Reset Generator) block provides clock > and reset signals for other modules in hi3519 soc. > > Signed-off-by: Jiancheng Xue <xuejiancheng@huawei.com> [...] > diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c > new file mode 100644 > index 0000000..72d3a7b0 > --- /dev/null > +++ b/drivers/clk/hisilicon/clk-hi3519.c > @@ -0,0 +1,105 @@ > +/* > + * Hi3519 Clock Driver > + * > + * Copyright (c) 2015-2016 HiSilicon Technologies Co., Ltd. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program. If not, see <http://www.gnu.org/licenses/>. > + */ > + > +#include <dt-bindings/clock/hi3519-clock.h> > +#include <linux/delay.h> > +#include <linux/of_address.h> > +#include <linux/slab.h> > +#include "clk.h" > +#include "reset.h" > + > +#define HI3519_FIXED_24M (HI3519_EXT_CLKS + 1) This is fragile because HI3519_EXT_CLKS will change every time you add a clock to DT and means you have to keep the kernel and DT in sync. I'd be less worried if your clock definitions were more complete, but I'm guess the SOC has more than 19 clocks coming out of the clock controller. > +#define HI3519_FIXED_50M (HI3519_EXT_CLKS + 2) > +#define HI3519_FIXED_75M (HI3519_EXT_CLKS + 3) > +#define HI3519_FIXED_125M (HI3519_EXT_CLKS + 4) > +#define HI3519_FIXED_150M (HI3519_EXT_CLKS + 5) > +#define HI3519_FIXED_200M (HI3519_EXT_CLKS + 6) > +#define HI3519_FIXED_250M (HI3519_EXT_CLKS + 7) > +#define HI3519_FIXED_300M (HI3519_EXT_CLKS + 8) > +#define HI3519_FIXED_400M (HI3519_EXT_CLKS + 9) > +#define HI3519_FMC_MUX (HI3519_EXT_CLKS + 10) > + > +#define HI3519_NR_CLKS 128 You only have 29 clocks defined. > +#ifndef __DTS_HI3519_CLOCK_H > +#define __DTS_HI3519_CLOCK_H > + > +#define HI3519_FIXED_3M 1 > +#define HI3519_FMC_CLK 2 > +#define HI3519_USB2_BUS_CLK 3 > +#define HI3519_USB2_PORT_CLK 4 > +#define HI3519_USB3_CLK 5 > +#define HI3519_ETH_PHY_CLK 6 > +#define HI3519_ETH_MAC_CLK 7 > +#define HI3519_ETH_MACIF_CLK 8 > +#define HI3519_PWM_CLK 9 > +#define HI3519_DMA_CLK 10 > +#define HI3519_SPI0_CLK 11 > +#define HI3519_SPI1_CLK 12 > +#define HI3519_SPI2_CLK 13 > +#define HI3519_IR_CLK 14 > +#define HI3519_UART0_CLK 15 > +#define HI3519_UART1_CLK 16 > +#define HI3519_UART2_CLK 17 > +#define HI3519_UART3_CLK 18 > +#define HI3519_UART4_CLK 19 > + > +#define HI3519_EXT_CLKS 19 > + > +#endif /* __DTS_HI3519_CLOCK_H */
WARNING: multiple messages have this Message-ID (diff)
From: robh@kernel.org (Rob Herring) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 1/6] clk: hisilicon: add CRG driver for hi3519 soc Date: Sat, 9 Jan 2016 09:33:22 -0600 [thread overview] Message-ID: <20160109153322.GA19311@rob-hp-laptop> (raw) In-Reply-To: <1452219400-32478-2-git-send-email-xuejiancheng@huawei.com> On Fri, Jan 08, 2016 at 10:16:35AM +0800, Jiancheng Xue wrote: > The CRG(Clock and Reset Generator) block provides clock > and reset signals for other modules in hi3519 soc. > > Signed-off-by: Jiancheng Xue <xuejiancheng@huawei.com> [...] > diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c > new file mode 100644 > index 0000000..72d3a7b0 > --- /dev/null > +++ b/drivers/clk/hisilicon/clk-hi3519.c > @@ -0,0 +1,105 @@ > +/* > + * Hi3519 Clock Driver > + * > + * Copyright (c) 2015-2016 HiSilicon Technologies Co., Ltd. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program. If not, see <http://www.gnu.org/licenses/>. > + */ > + > +#include <dt-bindings/clock/hi3519-clock.h> > +#include <linux/delay.h> > +#include <linux/of_address.h> > +#include <linux/slab.h> > +#include "clk.h" > +#include "reset.h" > + > +#define HI3519_FIXED_24M (HI3519_EXT_CLKS + 1) This is fragile because HI3519_EXT_CLKS will change every time you add a clock to DT and means you have to keep the kernel and DT in sync. I'd be less worried if your clock definitions were more complete, but I'm guess the SOC has more than 19 clocks coming out of the clock controller. > +#define HI3519_FIXED_50M (HI3519_EXT_CLKS + 2) > +#define HI3519_FIXED_75M (HI3519_EXT_CLKS + 3) > +#define HI3519_FIXED_125M (HI3519_EXT_CLKS + 4) > +#define HI3519_FIXED_150M (HI3519_EXT_CLKS + 5) > +#define HI3519_FIXED_200M (HI3519_EXT_CLKS + 6) > +#define HI3519_FIXED_250M (HI3519_EXT_CLKS + 7) > +#define HI3519_FIXED_300M (HI3519_EXT_CLKS + 8) > +#define HI3519_FIXED_400M (HI3519_EXT_CLKS + 9) > +#define HI3519_FMC_MUX (HI3519_EXT_CLKS + 10) > + > +#define HI3519_NR_CLKS 128 You only have 29 clocks defined. > +#ifndef __DTS_HI3519_CLOCK_H > +#define __DTS_HI3519_CLOCK_H > + > +#define HI3519_FIXED_3M 1 > +#define HI3519_FMC_CLK 2 > +#define HI3519_USB2_BUS_CLK 3 > +#define HI3519_USB2_PORT_CLK 4 > +#define HI3519_USB3_CLK 5 > +#define HI3519_ETH_PHY_CLK 6 > +#define HI3519_ETH_MAC_CLK 7 > +#define HI3519_ETH_MACIF_CLK 8 > +#define HI3519_PWM_CLK 9 > +#define HI3519_DMA_CLK 10 > +#define HI3519_SPI0_CLK 11 > +#define HI3519_SPI1_CLK 12 > +#define HI3519_SPI2_CLK 13 > +#define HI3519_IR_CLK 14 > +#define HI3519_UART0_CLK 15 > +#define HI3519_UART1_CLK 16 > +#define HI3519_UART2_CLK 17 > +#define HI3519_UART3_CLK 18 > +#define HI3519_UART4_CLK 19 > + > +#define HI3519_EXT_CLKS 19 > + > +#endif /* __DTS_HI3519_CLOCK_H */
next prev parent reply other threads:[~2016-01-09 15:33 UTC|newest] Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-08 2:16 [PATCH v5 0/6] ARM: hisi: Add initial support including clock driver for Hi3519 soc Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` [PATCH v5 1/6] clk: hisilicon: add CRG driver for hi3519 soc Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-09 6:24 ` kbuild test robot 2016-01-09 6:24 ` kbuild test robot 2016-01-09 6:24 ` kbuild test robot 2016-01-09 15:33 ` Rob Herring [this message] 2016-01-09 15:33 ` Rob Herring 2016-01-11 3:47 ` xuejiancheng 2016-01-11 3:47 ` xuejiancheng 2016-01-11 3:47 ` xuejiancheng 2016-01-12 22:12 ` Stephen Boyd 2016-01-12 22:12 ` Stephen Boyd 2016-01-13 3:03 ` xuejiancheng 2016-01-13 3:03 ` xuejiancheng 2016-01-13 3:03 ` xuejiancheng 2016-01-13 18:57 ` Michael Turquette 2016-01-13 18:57 ` Michael Turquette 2016-01-13 18:57 ` Michael Turquette 2016-01-14 13:16 ` xuejiancheng 2016-01-14 13:16 ` xuejiancheng 2016-01-14 13:16 ` xuejiancheng 2016-01-15 7:57 ` xuejiancheng 2016-01-15 7:57 ` xuejiancheng 2016-01-15 7:57 ` xuejiancheng 2016-01-19 18:20 ` Rob Herring 2016-01-19 18:20 ` Rob Herring 2016-01-19 18:20 ` Rob Herring 2016-01-19 18:20 ` Rob Herring 2016-01-20 6:38 ` Tomeu Vizoso 2016-01-20 6:38 ` Tomeu Vizoso 2016-01-20 6:38 ` Tomeu Vizoso 2016-01-20 6:38 ` Tomeu Vizoso 2016-01-22 8:50 ` xuejiancheng 2016-01-22 8:50 ` xuejiancheng 2016-01-22 8:50 ` xuejiancheng 2016-01-22 8:50 ` xuejiancheng 2016-01-22 9:55 ` Tomeu Vizoso 2016-01-22 9:55 ` Tomeu Vizoso 2016-01-22 9:55 ` Tomeu Vizoso 2016-01-22 9:55 ` Tomeu Vizoso 2016-01-08 2:16 ` [PATCH v5 2/6] ARM: hisi: add compatible string for Hi3519 soc Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` [PATCH v5 3/6] ARM: config: hisi: enable CONFIG_RESET_CONTROLLER Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` [PATCH v5 4/6] ARM: debug: add hi3519 debug uart Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 15:08 ` Russell King - ARM Linux 2016-01-08 15:08 ` Russell King - ARM Linux 2016-01-11 2:32 ` xuejiancheng 2016-01-11 2:32 ` xuejiancheng 2016-01-11 2:32 ` xuejiancheng 2016-01-08 2:16 ` [PATCH v5 5/6] mfd: dt-bindings: add device tree bindings for Hi3519 sysctrl Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 21:04 ` Rob Herring 2016-01-08 21:04 ` Rob Herring 2016-01-11 5:48 ` Lee Jones 2016-01-11 5:48 ` Lee Jones 2016-01-11 7:50 ` xuejiancheng 2016-01-11 7:50 ` xuejiancheng 2016-01-11 7:50 ` xuejiancheng 2016-01-11 8:55 ` Lee Jones 2016-01-11 8:55 ` Lee Jones 2016-01-12 1:35 ` xuejiancheng 2016-01-12 1:35 ` xuejiancheng 2016-01-12 1:35 ` xuejiancheng 2016-01-12 7:41 ` Lee Jones 2016-01-12 7:41 ` Lee Jones 2016-01-12 8:17 ` xuejiancheng 2016-01-12 8:17 ` xuejiancheng 2016-01-12 8:17 ` xuejiancheng 2016-01-12 8:39 ` Lee Jones 2016-01-12 8:39 ` Lee Jones 2016-01-12 9:28 ` xuejiancheng 2016-01-12 9:28 ` xuejiancheng 2016-01-12 9:28 ` xuejiancheng 2016-01-12 22:51 ` Arnd Bergmann 2016-01-12 22:51 ` Arnd Bergmann 2016-01-13 9:08 ` xuejiancheng 2016-01-13 9:08 ` xuejiancheng 2016-01-13 9:08 ` xuejiancheng 2016-01-13 10:00 ` Arnd Bergmann 2016-01-13 10:00 ` Arnd Bergmann 2016-01-25 14:26 ` Lee Jones 2016-01-25 14:26 ` Lee Jones 2016-01-25 14:45 ` Arnd Bergmann 2016-01-25 14:45 ` Arnd Bergmann 2016-01-08 2:16 ` [PATCH v5 6/6] ARM: dts: add dts files for Hi3519 Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 2:16 ` Jiancheng Xue 2016-01-08 15:10 ` Russell King - ARM Linux 2016-01-08 15:10 ` Russell King - ARM Linux 2016-01-08 15:10 ` Russell King - ARM Linux 2016-01-11 2:05 ` xuejiancheng 2016-01-11 2:05 ` xuejiancheng 2016-01-11 2:05 ` xuejiancheng
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160109153322.GA19311@rob-hp-laptop \ --to=robh@kernel.org \ --cc=arnd@arndb.de \ --cc=bintian.wang@huawei.com \ --cc=devicetree@vger.kernel.org \ --cc=galak@codeaurora.org \ --cc=gaofei@hisilicon.com \ --cc=haojian.zhuang@linaro.org \ --cc=ijc+devicetree@hellion.org.uk \ --cc=khilman@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=mark.rutland@arm.com \ --cc=ml.yang@hisilicon.com \ --cc=mturquette@baylibre.com \ --cc=olof@lixom.net \ --cc=p.zabel@pengutronix.de \ --cc=pawel.moll@arm.com \ --cc=sboyd@codeaurora.org \ --cc=suwenping@hisilicon.com \ --cc=xuejiancheng@hisilicon.com \ --cc=xuejiancheng@huawei.com \ --cc=xuwei5@hisilicon.com \ --cc=yanghongwei@hisilicon.com \ --cc=yanhaifeng@hisilicon.com \ --cc=zhangfei.gao@linaro.org \ --cc=zhangzhenxing@hisilicon.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.