Thread (2 messages) flat view 2 messages, 2 authors, 2016-11-22

[PATCH 5/6] reset: hisilicon: Use new driver reset-hi6222

From: zhangfei.gao@linaro.org (zhangfei)
Date: 2016-11-22 09:46:22
Also in: linux-devicetree


On 2016?11?22? 16:49, Arnd Bergmann wrote:
On Tuesday, November 22, 2016 3:49:20 PM CET Zhangfei Gao wrote:
quoted
-#define PERIPH_RSTDIS0_MMC0             0x000
-#define PERIPH_RSTDIS0_MMC1             0x001
-#define PERIPH_RSTDIS0_MMC2             0x002
-#define PERIPH_RSTDIS0_NANDC            0x003
-#define PERIPH_RSTDIS0_USBOTG_BUS       0x004
-#define PERIPH_RSTDIS0_POR_PICOPHY      0x005
-#define PERIPH_RSTDIS0_USBOTG           0x006
-#define PERIPH_RSTDIS0_USBOTG_32K       0x007
-#define PERIPH_RSTDIS1_HIFI             0x100
-#define PERIPH_RSTDIS1_DIGACODEC        0x105
+/* reset in sysctrl */
+#define PERIPH_RSTDIS0_MMC0             0
+#define PERIPH_RSTDIS0_MMC1             1
+#define PERIPH_RSTDIS0_MMC2             2
+#define PERIPH_RSTDIS0_NANDC            3
+#define PERIPH_RSTDIS0_USBOTG_BUS       4
+#define PERIPH_RSTDIS0_POR_PICOPHY      5
+#define PERIPH_RSTDIS0_USBOTG           6
+#define PERIPH_RSTDIS0_USBOTG_32K       7
+#define PERIPH_RSTDIS1_HIFI             8
You can't redefined the binding here, this is part of the ABI.
You can however add new numbers as long as the old ones keep
working.
The methods are different.
The original define is offset | bit_shift, and driver has to parse 
offset and bit shift.
The new define is just index of array, which is defined in the reset-xxx.c

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help