From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Zhangfei Gao <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
haojian.zhuang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
Chen Feng <puck.chen-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
Xinliang Liu
<xinliang.liu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Xia Qing <saberlily.xia-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
Jiancheng Xue
<xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/6] reset: hisilicon: add reset-hi3660
Date: Tue, 22 Nov 2016 09:50:51 +0100 [thread overview]
Message-ID: <2220300.Yj4lYzeH2z@wuerfel> (raw)
In-Reply-To: <1479800961-6249-4-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Tuesday, November 22, 2016 3:49:18 PM CET Zhangfei Gao wrote:
>
> +static const struct hisi_reset_channel_data hi3660_iomcu_rst[] = {
> + [HI3660_RST_I2C0] = HISI_RST_SEP(0x20, 3),
> + [HI3660_RST_I2C1] = HISI_RST_SEP(0x20, 4),
> + [HI3660_RST_I2C2] = HISI_RST_SEP(0x20, 5),
> + [HI3660_RST_I2C6] = HISI_RST_SEP(0x20, 27),
> +};
> +
> +static struct hisi_reset_controller_data hi3660_iomcu_controller = {
> + .nr_channels = ARRAY_SIZE(hi3660_iomcu_rst),
> + .channels = hi3660_iomcu_rst,
> +};
> +
> +static const struct hisi_reset_channel_data hi3660_crgctrl_rst[] = {
> + [HI3660_RST_I2C3] = HISI_RST_SEP(0x78, 7),
> + [HI3660_RST_I2C4] = HISI_RST_SEP(0x78, 27),
> + [HI3660_RST_I2C7] = HISI_RST_SEP(0x60, 14),
> + [HI3660_RST_SD] = HISI_RST_SEP(0x90, 18),
> + [HI3660_RST_SDIO] = HISI_RST_SEP(0x90, 20),
> + [HI3660_RST_UFS] = HISI_RST_SEP(0x84, 12),
> + [HI3660_RST_UFS_ASSERT] = HISI_RST_SEP(0x84, 7),
> + [HI3660_RST_PCIE_SYS] = HISI_RST_SEP(0x84, 26),
> + [HI3660_RST_PCIE_PHY] = HISI_RST_SEP(0x84, 27),
> + [HI3660_RST_PCIE_BUS] = HISI_RST_SEP(0x84, 31),
> + [HI3660_RST_USB3OTG_PHY] = HISI_RST_SEP(0x90, 3),
> + [HI3660_RST_USB3OTG] = HISI_RST_SEP(0x90, 5),
> + [HI3660_RST_USB3OTG_32K] = HISI_RST_SEP(0x90, 6),
> + [HI3660_RST_USB3OTG_AHB] = HISI_RST_SEP(0x90, 7),
> + [HI3660_RST_USB3OTG_MUX] = HISI_RST_SEP(0x90, 8),
> +};
I think you can avoid the trap of the ABI incompatibility if
you just define those as in the binding as tuples, using #reset-cells=2.
In particular for the first set, it seems really silly to redefine
the numbers when there is just a simple integer number.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-11-22 8:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 7:49 [PATCH 0/6] add hisilicon reset Zhangfei Gao
[not found] ` <1479800961-6249-1-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 7:49 ` [PATCH 1/6] reset: hisilicon: add reset core Zhangfei Gao
[not found] ` <1479800961-6249-2-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 8:45 ` Arnd Bergmann
2016-11-22 9:22 ` zhangfei
[not found] ` <0084ef53-c0e6-51e8-afa5-07264dfce529-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 9:41 ` Arnd Bergmann
2016-11-22 10:22 ` Philipp Zabel
2016-11-22 10:22 ` Philipp Zabel
2016-11-22 7:49 ` [PATCH 2/6] dt-bindings: Document the hi3660 reset bindings Zhangfei Gao
2016-11-22 7:49 ` [PATCH 3/6] reset: hisilicon: add reset-hi3660 Zhangfei Gao
[not found] ` <1479800961-6249-4-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 8:50 ` Arnd Bergmann [this message]
2016-11-22 9:34 ` zhangfei
[not found] ` <d6e602c0-70e9-0309-86b5-bfd006d86028-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 9:42 ` Arnd Bergmann
2016-11-22 10:02 ` zhangfei
2016-11-22 10:22 ` Philipp Zabel
[not found] ` <1479810156.13701.1.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-11-23 8:02 ` zhangfei
2016-11-22 7:49 ` [PATCH 4/6] dt-bindings: change hi6220-reset.txt according to reset-hi6220.c Zhangfei Gao
[not found] ` <1479800961-6249-5-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 8:48 ` Arnd Bergmann
2016-11-23 23:06 ` Rob Herring
2016-11-24 0:41 ` zhangfei
2016-11-22 7:49 ` [PATCH 5/6] reset: hisilicon: Use new driver reset-hi6222 Zhangfei Gao
[not found] ` <1479800961-6249-6-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 8:49 ` Arnd Bergmann
2016-11-22 9:46 ` zhangfei
[not found] ` <0dcef3c7-7406-0728-5a18-c277bb8915ad-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-22 9:55 ` Arnd Bergmann
2016-11-22 7:49 ` [PATCH 6/6] arm64: dts: hi6220: update reset node according to reset-hi6220.c Zhangfei Gao
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=2220300.Yj4lYzeH2z@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=haojian.zhuang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=puck.chen-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=saberlily.xia-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=xinliang.liu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox