Message ID | 20200430030544.234289-7-amitay@ozlabs.org |
---|---|
State | Accepted |
Headers | show |
Series | Reorganization of device trees | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch master (6c10b68bf774a9fe21affd5ef0b40084cd49800d) |
snowpatch_ozlabs/apply_patch | fail | Failed to apply to any branch |
Reviewed-by: Alistair Popple <alistair@popple.id.au> On Thursday, 30 April 2020 1:05:39 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> > --- > bmc-sbefifo.dts.m4 | 152 +++++++++++++++++++++++++-------------------- > 1 file changed, 83 insertions(+), 69 deletions(-) > > diff --git a/bmc-sbefifo.dts.m4 b/bmc-sbefifo.dts.m4 > index 48b3051..f4ec4ab 100644 > --- a/bmc-sbefifo.dts.m4 > +++ b/bmc-sbefifo.dts.m4 > @@ -1,86 +1,100 @@ > -/dts-v1/; > +dnl > +dnl SBEFIFO([index], [path-index]) > +dnl > +define(`SBEFIFO', > +` > + sbefifo@2400 { /* Bogus address */ > + reg = <0x0 0x2400 0x7>; > + compatible = "ibm,kernel-sbefifo"; > + index = <0x$1>; > + device-path = "/dev/sbefifo$2"; > > -/ { > - #address-cells = <0x1>; > - #size-cells = <0x0>; > + sbefifo-pib { > + #address-cells = <0x2>; > + #size-cells = <0x1>; > + compatible = "ibm,sbefifo-pib"; > + index = <0x$1>; > + system-path = "/proc$1/pib"; > + }; > + > + sbefifo-mem { > + compatible = "ibm,sbefifo-mem"; > + index = <0x$1>; > + system-path = "/mem$1"; > + }; > + > + sbefifo-pba { > + compatible = "ibm,sbefifo-mem-pba"; > + index = <0x$1>; > + system-path = "/mempba$1"; > + }; > + > + sbefifo-chipop { > + compatible = "ibm,sbefifo-chipop"; > + index = <0x$1>; > + }; > + }; > +')dnl > > - fsi0: kernelfsi@0 { > +dnl > +dnl FSI_PRE([addr], [index], [path-index]) > +dnl > +define(`FSI_PRE', > +` > + fsi@$1 { > #address-cells = <0x2>; > #size-cells = <0x1>; > compatible = "ibm,kernel-fsi"; > - reg = <0x0 0x0 0x0>; > - index = <0x0>; > + reg = <0x0 0x$1 0x8000>; > + index = <0x$2>; > status = "mustexist"; > - system-path = "/proc0/fsi"; > + system-path = "/proc$2/fsi"; > > - sbefifo@2400 { /* Bogus address */ > - reg = <0x0 0x2400 0x7>; > - index = <0x0>; > - compatible = "ibm,kernel-sbefifo"; > - device-path = "/dev/sbefifo1"; > + SBEFIFO($2, $3) > +')dnl > > - sbefifo-pib { > - #address-cells = <0x2>; > - #size-cells = <0x1>; > - index = <0x0>; > - compatible = "ibm,sbefifo-pib"; > - system-path = "/proc0/pib"; > - }; > - > - sbefifo-mem { > - compatible = "ibm,sbefifo-mem"; > - system-path = "/mem0"; > - }; > +dnl > +dnl FSI_POST() > +dnl > +define(`FSI_POST', > +` > + }; > +')dnl > > - sbefifo-pba { > - compatible = "ibm,sbefifo-mem-pba"; > - system-path = "/mempba0"; > - }; > +dnl > +dnl HMFSI([addr], [port], [index], [path-index]) > +dnl > +define(`HMFSI', > +` > + hmfsi@$1 { > + #address-cells = <0x2>; > + #size-cells = <0x1>; > + compatible = "ibm,fsi-hmfsi"; > + reg = <0x0 0x$1 0x8000>; > + port = <0x$2>; > + index = <0x$3>; > + system-path = "/proc$3/fsi"; > > - sbefifo-chipop { > - compatible = "ibm,sbefifo-chipop"; > - index = <0x0>; > - }; > - }; > + SBEFIFO($3, $4) > + }; > +')dnl > > - hmfsi@100000 { > - #address-cells = <0x2>; > - #size-cells = <0x1>; > - compatible = "ibm,fsi-hmfsi"; > - reg = <0x0 0x100000 0x8000>; > - port = <0x1>; > - index = <0x1>; > - system-path = "/proc1/fsi"; > > - sbefifo@2400 { /* Bogus address */ > - reg = <0x0 0x2400 0x7>; > - index = <0x1>; > - compatible = "ibm,kernel-sbefifo"; > - device-path = "/dev/sbefifo2"; > +/dts-v1/; > > - sbefifo-pib { > - #address-cells = <0x2>; > - #size-cells = <0x1>; > - index = <0x1>; > - compatible = "ibm,sbefifo-pib"; > - system-path = "/proc1/pib"; > - }; > +/ { > + #address-cells = <0x1>; > + #size-cells = <0x0>; > > - sbefifo-mem { > - compatible = "ibm,sbefifo-mem"; > - system-path = "/mem1"; > - }; > + FSI_PRE(0, 0, 1) > > - sbefifo-pba { > - compatible = "ibm,sbefifo-mem-pba"; > - system-path = "/mempba1"; > - }; > + HMFSI(100000, 1, 1, 2) > + HMFSI(180000, 2, 2, 3) > + HMFSI(200000, 3, 3, 4) > + HMFSI(280000, 4, 4, 5) > + HMFSI(300000, 5, 5, 6) > + HMFSI(380000, 6, 6, 7) > + HMFSI(400000, 7, 7, 8) > > - sbefifo-chipop { > - compatible = "ibm,sbefifo-chipop"; > - index = <0x1>; > - }; > - }; > - }; > - }; > + FSI_POST() > };
diff --git a/bmc-sbefifo.dts.m4 b/bmc-sbefifo.dts.m4 index 48b3051..f4ec4ab 100644 --- a/bmc-sbefifo.dts.m4 +++ b/bmc-sbefifo.dts.m4 @@ -1,86 +1,100 @@ -/dts-v1/; +dnl +dnl SBEFIFO([index], [path-index]) +dnl +define(`SBEFIFO', +` + sbefifo@2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + compatible = "ibm,kernel-sbefifo"; + index = <0x$1>; + device-path = "/dev/sbefifo$2"; -/ { - #address-cells = <0x1>; - #size-cells = <0x0>; + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,sbefifo-pib"; + index = <0x$1>; + system-path = "/proc$1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + index = <0x$1>; + system-path = "/mem$1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + index = <0x$1>; + system-path = "/mempba$1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x$1>; + }; + }; +')dnl - fsi0: kernelfsi@0 { +dnl +dnl FSI_PRE([addr], [index], [path-index]) +dnl +define(`FSI_PRE', +` + fsi@$1 { #address-cells = <0x2>; #size-cells = <0x1>; compatible = "ibm,kernel-fsi"; - reg = <0x0 0x0 0x0>; - index = <0x0>; + reg = <0x0 0x$1 0x8000>; + index = <0x$2>; status = "mustexist"; - system-path = "/proc0/fsi"; + system-path = "/proc$2/fsi"; - sbefifo@2400 { /* Bogus address */ - reg = <0x0 0x2400 0x7>; - index = <0x0>; - compatible = "ibm,kernel-sbefifo"; - device-path = "/dev/sbefifo1"; + SBEFIFO($2, $3) +')dnl - sbefifo-pib { - #address-cells = <0x2>; - #size-cells = <0x1>; - index = <0x0>; - compatible = "ibm,sbefifo-pib"; - system-path = "/proc0/pib"; - }; - - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem0"; - }; +dnl +dnl FSI_POST() +dnl +define(`FSI_POST', +` + }; +')dnl - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba0"; - }; +dnl +dnl HMFSI([addr], [port], [index], [path-index]) +dnl +define(`HMFSI', +` + hmfsi@$1 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x$1 0x8000>; + port = <0x$2>; + index = <0x$3>; + system-path = "/proc$3/fsi"; - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x0>; - }; - }; + SBEFIFO($3, $4) + }; +')dnl - hmfsi@100000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - compatible = "ibm,fsi-hmfsi"; - reg = <0x0 0x100000 0x8000>; - port = <0x1>; - index = <0x1>; - system-path = "/proc1/fsi"; - sbefifo@2400 { /* Bogus address */ - reg = <0x0 0x2400 0x7>; - index = <0x1>; - compatible = "ibm,kernel-sbefifo"; - device-path = "/dev/sbefifo2"; +/dts-v1/; - sbefifo-pib { - #address-cells = <0x2>; - #size-cells = <0x1>; - index = <0x1>; - compatible = "ibm,sbefifo-pib"; - system-path = "/proc1/pib"; - }; +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; - sbefifo-mem { - compatible = "ibm,sbefifo-mem"; - system-path = "/mem1"; - }; + FSI_PRE(0, 0, 1) - sbefifo-pba { - compatible = "ibm,sbefifo-mem-pba"; - system-path = "/mempba1"; - }; + HMFSI(100000, 1, 1, 2) + HMFSI(180000, 2, 2, 3) + HMFSI(200000, 3, 3, 4) + HMFSI(280000, 4, 4, 5) + HMFSI(300000, 5, 5, 6) + HMFSI(380000, 6, 6, 7) + HMFSI(400000, 7, 7, 8) - sbefifo-chipop { - compatible = "ibm,sbefifo-chipop"; - index = <0x1>; - }; - }; - }; - }; + FSI_POST() };
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- bmc-sbefifo.dts.m4 | 152 +++++++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 69 deletions(-)