diff mbox series

pci: Align PCI node names with QEMU

Message ID 20191021070212.7097-1-aik@ozlabs.ru
State Accepted
Headers show
Series pci: Align PCI node names with QEMU | expand

Commit Message

Alexey Kardashevskiy Oct. 21, 2019, 7:02 a.m. UTC
During the ibm,client-arhitecture-support client call, we rely on QEMU
providing a full device tree which SLOF then merged into its internal
tree so we rely on both SLOF and QEMU using the same node names for
devices of the same type.

This changes device tree node names to what QEMU uses.

The change was triggered by "(unknown-)legacy-device" which is used by
virtio-balloon; other changes either fix typos or remove devices which
are very unlikely to be implemented by QEMU for pseries, or even if they
are, we are ok with using generic class names anyway.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

This is to fix https://bugs.launchpad.net/qemu/+bug/1847440?comments=all


---
 slof/fs/pci-class-code-names.fs | 41 +++++----------------------------
 1 file changed, 6 insertions(+), 35 deletions(-)

Comments

David Gibson Oct. 21, 2019, 7:25 a.m. UTC | #1
On Mon, Oct 21, 2019 at 06:02:12PM +1100, Alexey Kardashevskiy wrote:
> During the ibm,client-arhitecture-support client call, we rely on QEMU
> providing a full device tree which SLOF then merged into its internal
> tree so we rely on both SLOF and QEMU using the same node names for
> devices of the same type.
> 
> This changes device tree node names to what QEMU uses.
> 
> The change was triggered by "(unknown-)legacy-device" which is used by
> virtio-balloon; other changes either fix typos or remove devices which
> are very unlikely to be implemented by QEMU for pseries, or even if they
> are, we are ok with using generic class names anyway.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> 
> This is to fix
> https://bugs.launchpad.net/qemu/+bug/1847440?comments=all

LGTM, a qemu patch as soon as you can wrap it up would be great.

> 
> 
> ---
>  slof/fs/pci-class-code-names.fs | 41 +++++----------------------------
>  1 file changed, 6 insertions(+), 35 deletions(-)
> 
> diff --git a/slof/fs/pci-class-code-names.fs b/slof/fs/pci-class-code-names.fs
> index 6cf3b8fd083c..cd9395fb47ba 100644
> --- a/slof/fs/pci-class-code-names.fs
> +++ b/slof/fs/pci-class-code-names.fs
> @@ -13,7 +13,7 @@
>  : pci-class-name-00 ( addr -- str len )
>          pci-class@ 8 rshift FF and CASE
>          01  OF s" display"               ENDOF
> -        dup OF s" unknown-legacy-device" ENDOF
> +        dup OF s" legacy-device"         ENDOF
>          ENDCASE
>  ;
>  
> @@ -47,7 +47,6 @@
>  : pci-class-name-03 ( addr -- str len )
>          pci-class@ FFFF and CASE
>          0000  OF s" vga"             ENDOF
> -        0001  OF s" 8514-compatible" ENDOF
>          0100  OF s" xga"             ENDOF
>          0200  OF s" 3d-controller"   ENDOF
>          dup OF s" display"           ENDOF
> @@ -91,23 +90,9 @@
>  : pci-class-name-07 ( addr -- str len )
>          pci-class@ FFFF and CASE
>          0000  OF s" serial"                   ENDOF
> -        0001  OF s" 16450-serial"             ENDOF
> -        0002  OF s" 16550-serial"             ENDOF
> -        0003  OF s" 16650-serial"             ENDOF
> -        0004  OF s" 16750-serial"             ENDOF
> -        0005  OF s" 16850-serial"             ENDOF
> -        0006  OF s" 16950-serial"             ENDOF
>          0100  OF s" parallel"                 ENDOF
> -        0101  OF s" bi-directional-parallel"  ENDOF
> -        0102  OF s" ecp-1.x-parallel"         ENDOF
> -        0103  OF s" ieee1284-controller"      ENDOF
> -        01FE  OF s" ieee1284-device"          ENDOF
>          0200  OF s" multiport-serial"         ENDOF
>          0300  OF s" modem"                    ENDOF
> -        0301  OF s" 16450-modem"              ENDOF
> -        0302  OF s" 16550-modem"              ENDOF
> -        0303  OF s" 16650-modem"              ENDOF
> -        0304  OF s" 16750-modem"              ENDOF
>          0400  OF s" gpib"                     ENDOF
>          0500  OF s" smart-card"               ENDOF
>          dup   OF s" communication-controller" ENDOF
> @@ -118,18 +103,9 @@
>  : pci-class-name-08 ( addr -- str len )
>          pci-class@ FFFF and CASE
>          0000  OF s" interrupt-controller" ENDOF
> -        0001  OF s" isa-pic"              ENDOF
> -        0002  OF s" eisa-pic"             ENDOF
> -        0010  OF s" io-apic"              ENDOF
> -        0020  OF s" iox-apic"             ENDOF
>          0100  OF s" dma-controller"       ENDOF
> -        0101  OF s" isa-dma"              ENDOF
> -        0102  OF s" eisa-dma"             ENDOF
>          0200  OF s" timer"                ENDOF
> -        0201  OF s" isa-system-timer"     ENDOF
> -        0202  OF s" eisa-system-timer"    ENDOF
>          0300  OF s" rtc"                  ENDOF
> -        0301  OF s" isa-rtc"              ENDOF
>          0400  OF s" hot-plug-controller"  ENDOF
>          0500  OF s" sd-host-conrtoller"   ENDOF
>          dup   OF s" system-periphal"      ENDOF
> @@ -156,10 +132,7 @@
>  
>  : pci-class-name-0B ( addr -- str len )
>          pci-class@ 8 rshift FF and CASE
> -        00  OF s" 386"           ENDOF
> -        01  OF s" 486"           ENDOF
>          02  OF s" pentium"       ENDOF
> -        10  OF s" alpha"         ENDOF
>          20  OF s" powerpc"       ENDOF
>          30  OF s" mips"          ENDOF
>          40  OF s" co-processor"  ENDOF
> @@ -176,14 +149,14 @@
>          0310  OF s" usb-ohci"      ENDOF
>  	0320  OF s" usb-ehci"      ENDOF
>          0330  OF s" usb-xhci"      ENDOF
> -        0380  OF s" usb"           ENDOF
> +        0380  OF s" usb-unknown"   ENDOF
>          03FE  OF s" usb-device"    ENDOF
>          0400  OF s" fibre-channel" ENDOF
>          0500  OF s" smb"           ENDOF
>          0600  OF s" infiniband"    ENDOF
> -        0700  OF s" ipmi-smic"     ENDOF
> -        0701  OF s" ipmi-kbrd"     ENDOF
> -        0702  OF s" ipmi-bltr"     ENDOF
> +        0700  OF s" ipmi"          ENDOF
> +        0701  OF s" ipmi"          ENDOF
> +        0702  OF s" ipmi"          ENDOF
>          0800  OF s" sercos"        ENDOF
>          0900  OF s" canbus"        ENDOF
>          dup OF s" serial-bus"      ENDOF
> @@ -197,8 +170,6 @@
>          10  OF s" rf-controller"       ENDOF
>          11  OF s" bluetooth"           ENDOF
>          12  OF s" broadband"           ENDOF
> -        20  OF s" enet-802.11a"        ENDOF
> -        21  OF s" enet-802.11b"        ENDOF
>          dup OF s" wireless-controller" ENDOF
>          ENDCASE
>  ;
> @@ -216,7 +187,7 @@
>          02  OF s" satelite-audio"  ENDOF
>          03  OF s" satelite-voice"  ENDOF
>          04  OF s" satelite-data"   ENDOF
> -        dup OF s" satelite-devoce" ENDOF
> +        dup OF s" satelite-device" ENDOF
>          ENDCASE
>  ;
>
Thomas Huth Oct. 21, 2019, 7:41 a.m. UTC | #2
On 21/10/2019 09.02, Alexey Kardashevskiy wrote:
> During the ibm,client-arhitecture-support client call, we rely on QEMU
> providing a full device tree which SLOF then merged into its internal
> tree so we rely on both SLOF and QEMU using the same node names for
> devices of the same type.
> 
> This changes device tree node names to what QEMU uses.
> 
> The change was triggered by "(unknown-)legacy-device" which is used by
> virtio-balloon; other changes either fix typos or remove devices which
> are very unlikely to be implemented by QEMU for pseries, or even if they
> are, we are ok with using generic class names anyway.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> 
> This is to fix https://bugs.launchpad.net/qemu/+bug/1847440?comments=all
> 
> 
> ---
>  slof/fs/pci-class-code-names.fs | 41 +++++----------------------------
>  1 file changed, 6 insertions(+), 35 deletions(-)
> 
> diff --git a/slof/fs/pci-class-code-names.fs b/slof/fs/pci-class-code-names.fs
> index 6cf3b8fd083c..cd9395fb47ba 100644
> --- a/slof/fs/pci-class-code-names.fs
> +++ b/slof/fs/pci-class-code-names.fs
> @@ -13,7 +13,7 @@
>  : pci-class-name-00 ( addr -- str len )
>          pci-class@ 8 rshift FF and CASE
>          01  OF s" display"               ENDOF
> -        dup OF s" unknown-legacy-device" ENDOF
> +        dup OF s" legacy-device"         ENDOF
>          ENDCASE
>  ;
>  
> @@ -47,7 +47,6 @@
>  : pci-class-name-03 ( addr -- str len )
>          pci-class@ FFFF and CASE
>          0000  OF s" vga"             ENDOF
> -        0001  OF s" 8514-compatible" ENDOF
>          0100  OF s" xga"             ENDOF
>          0200  OF s" 3d-controller"   ENDOF
>          dup OF s" display"           ENDOF
> @@ -91,23 +90,9 @@
>  : pci-class-name-07 ( addr -- str len )
>          pci-class@ FFFF and CASE
>          0000  OF s" serial"                   ENDOF
> -        0001  OF s" 16450-serial"             ENDOF
> -        0002  OF s" 16550-serial"             ENDOF
> -        0003  OF s" 16650-serial"             ENDOF
> -        0004  OF s" 16750-serial"             ENDOF
> -        0005  OF s" 16850-serial"             ENDOF
> -        0006  OF s" 16950-serial"             ENDOF
>          0100  OF s" parallel"                 ENDOF
> -        0101  OF s" bi-directional-parallel"  ENDOF
> -        0102  OF s" ecp-1.x-parallel"         ENDOF
> -        0103  OF s" ieee1284-controller"      ENDOF
> -        01FE  OF s" ieee1284-device"          ENDOF
>          0200  OF s" multiport-serial"         ENDOF
>          0300  OF s" modem"                    ENDOF
> -        0301  OF s" 16450-modem"              ENDOF
> -        0302  OF s" 16550-modem"              ENDOF
> -        0303  OF s" 16650-modem"              ENDOF
> -        0304  OF s" 16750-modem"              ENDOF
>          0400  OF s" gpib"                     ENDOF
>          0500  OF s" smart-card"               ENDOF
>          dup   OF s" communication-controller" ENDOF
> @@ -118,18 +103,9 @@
>  : pci-class-name-08 ( addr -- str len )
>          pci-class@ FFFF and CASE
>          0000  OF s" interrupt-controller" ENDOF
> -        0001  OF s" isa-pic"              ENDOF
> -        0002  OF s" eisa-pic"             ENDOF
> -        0010  OF s" io-apic"              ENDOF
> -        0020  OF s" iox-apic"             ENDOF
>          0100  OF s" dma-controller"       ENDOF
> -        0101  OF s" isa-dma"              ENDOF
> -        0102  OF s" eisa-dma"             ENDOF
>          0200  OF s" timer"                ENDOF
> -        0201  OF s" isa-system-timer"     ENDOF
> -        0202  OF s" eisa-system-timer"    ENDOF
>          0300  OF s" rtc"                  ENDOF
> -        0301  OF s" isa-rtc"              ENDOF
>          0400  OF s" hot-plug-controller"  ENDOF
>          0500  OF s" sd-host-conrtoller"   ENDOF
>          dup   OF s" system-periphal"      ENDOF
> @@ -156,10 +132,7 @@

I think I'd rather not remove the entries from class 7 and 8 ... for
example, board-js2x uses a 16550 UART IIRC ... yeah, js2x is broken
anyway, but in case somebody ever restores this board, we might need
this again.

 Thomas
Segher Boessenkool Oct. 21, 2019, 9:41 a.m. UTC | #3
On Mon, Oct 21, 2019 at 06:02:12PM +1100, Alexey Kardashevskiy wrote:
>          0500  OF s" sd-host-conrtoller"   ENDOF
>          dup   OF s" system-periphal"      ENDOF

Both these names have typos.

> @@ -176,14 +149,14 @@
>          0310  OF s" usb-ohci"      ENDOF
>  	0320  OF s" usb-ehci"      ENDOF
>          0330  OF s" usb-xhci"      ENDOF
> -        0380  OF s" usb"           ENDOF
> +        0380  OF s" usb-unknown"   ENDOF

"usb-unknown" is a much worse name.

> @@ -216,7 +187,7 @@
>          02  OF s" satelite-audio"  ENDOF
>          03  OF s" satelite-voice"  ENDOF
>          04  OF s" satelite-data"   ENDOF
> -        dup OF s" satelite-devoce" ENDOF
> +        dup OF s" satelite-device" ENDOF

These all still have typos.


Segher
Thomas Huth Oct. 21, 2019, 10 a.m. UTC | #4
On 21/10/2019 11.41, Segher Boessenkool wrote:
> On Mon, Oct 21, 2019 at 06:02:12PM +1100, Alexey Kardashevskiy wrote:
[...]
>> @@ -176,14 +149,14 @@
>>          0310  OF s" usb-ohci"      ENDOF
>>  	0320  OF s" usb-ehci"      ENDOF
>>          0330  OF s" usb-xhci"      ENDOF
>> -        0380  OF s" usb"           ENDOF
>> +        0380  OF s" usb-unknown"   ENDOF
> 
> "usb-unknown" is a much worse name.

I think I concur here. This should maybe rather be fixed on the QEMU
side instead.

 Thomas
Alexey Kardashevskiy Oct. 21, 2019, 11:28 p.m. UTC | #5
On 21/10/2019 18:41, Thomas Huth wrote:
> On 21/10/2019 09.02, Alexey Kardashevskiy wrote:
>> During the ibm,client-arhitecture-support client call, we rely on QEMU
>> providing a full device tree which SLOF then merged into its internal
>> tree so we rely on both SLOF and QEMU using the same node names for
>> devices of the same type.
>>
>> This changes device tree node names to what QEMU uses.
>>
>> The change was triggered by "(unknown-)legacy-device" which is used by
>> virtio-balloon; other changes either fix typos or remove devices which
>> are very unlikely to be implemented by QEMU for pseries, or even if they
>> are, we are ok with using generic class names anyway.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
>>
>> This is to fix https://bugs.launchpad.net/qemu/+bug/1847440?comments=all
>>
>>
>> ---
>>  slof/fs/pci-class-code-names.fs | 41 +++++----------------------------
>>  1 file changed, 6 insertions(+), 35 deletions(-)
>>
>> diff --git a/slof/fs/pci-class-code-names.fs b/slof/fs/pci-class-code-names.fs
>> index 6cf3b8fd083c..cd9395fb47ba 100644
>> --- a/slof/fs/pci-class-code-names.fs
>> +++ b/slof/fs/pci-class-code-names.fs
>> @@ -13,7 +13,7 @@
>>  : pci-class-name-00 ( addr -- str len )
>>          pci-class@ 8 rshift FF and CASE
>>          01  OF s" display"               ENDOF
>> -        dup OF s" unknown-legacy-device" ENDOF
>> +        dup OF s" legacy-device"         ENDOF
>>          ENDCASE
>>  ;
>>  
>> @@ -47,7 +47,6 @@
>>  : pci-class-name-03 ( addr -- str len )
>>          pci-class@ FFFF and CASE
>>          0000  OF s" vga"             ENDOF
>> -        0001  OF s" 8514-compatible" ENDOF
>>          0100  OF s" xga"             ENDOF
>>          0200  OF s" 3d-controller"   ENDOF
>>          dup OF s" display"           ENDOF
>> @@ -91,23 +90,9 @@
>>  : pci-class-name-07 ( addr -- str len )
>>          pci-class@ FFFF and CASE
>>          0000  OF s" serial"                   ENDOF
>> -        0001  OF s" 16450-serial"             ENDOF
>> -        0002  OF s" 16550-serial"             ENDOF
>> -        0003  OF s" 16650-serial"             ENDOF
>> -        0004  OF s" 16750-serial"             ENDOF
>> -        0005  OF s" 16850-serial"             ENDOF
>> -        0006  OF s" 16950-serial"             ENDOF
>>          0100  OF s" parallel"                 ENDOF
>> -        0101  OF s" bi-directional-parallel"  ENDOF
>> -        0102  OF s" ecp-1.x-parallel"         ENDOF
>> -        0103  OF s" ieee1284-controller"      ENDOF
>> -        01FE  OF s" ieee1284-device"          ENDOF
>>          0200  OF s" multiport-serial"         ENDOF
>>          0300  OF s" modem"                    ENDOF
>> -        0301  OF s" 16450-modem"              ENDOF
>> -        0302  OF s" 16550-modem"              ENDOF
>> -        0303  OF s" 16650-modem"              ENDOF
>> -        0304  OF s" 16750-modem"              ENDOF
>>          0400  OF s" gpib"                     ENDOF
>>          0500  OF s" smart-card"               ENDOF
>>          dup   OF s" communication-controller" ENDOF
>> @@ -118,18 +103,9 @@
>>  : pci-class-name-08 ( addr -- str len )
>>          pci-class@ FFFF and CASE
>>          0000  OF s" interrupt-controller" ENDOF
>> -        0001  OF s" isa-pic"              ENDOF
>> -        0002  OF s" eisa-pic"             ENDOF
>> -        0010  OF s" io-apic"              ENDOF
>> -        0020  OF s" iox-apic"             ENDOF
>>          0100  OF s" dma-controller"       ENDOF
>> -        0101  OF s" isa-dma"              ENDOF
>> -        0102  OF s" eisa-dma"             ENDOF
>>          0200  OF s" timer"                ENDOF
>> -        0201  OF s" isa-system-timer"     ENDOF
>> -        0202  OF s" eisa-system-timer"    ENDOF
>>          0300  OF s" rtc"                  ENDOF
>> -        0301  OF s" isa-rtc"              ENDOF
>>          0400  OF s" hot-plug-controller"  ENDOF
>>          0500  OF s" sd-host-conrtoller"   ENDOF
>>          dup   OF s" system-periphal"      ENDOF
>> @@ -156,10 +132,7 @@
> 
> I think I'd rather not remove the entries from class 7 and 8 ... for
> example, board-js2x uses a 16550 UART IIRC ... yeah, js2x is broken
> anyway, but in case somebody ever restores this board, we might need
> this again.

Why might we _need_ this? Does anything rely on the exact node name for these devices? I am not removing them, I am just
changing names, "compatible" should still be used to match the driver. What do I miss?
Alexey Kardashevskiy Oct. 21, 2019, 11:31 p.m. UTC | #6
On 21/10/2019 20:41, Segher Boessenkool wrote:
> On Mon, Oct 21, 2019 at 06:02:12PM +1100, Alexey Kardashevskiy wrote:
>>          0500  OF s" sd-host-conrtoller"   ENDOF
>>          dup   OF s" system-periphal"      ENDOF
> 
> Both these names have typos.

ouch.

> 
>> @@ -176,14 +149,14 @@
>>          0310  OF s" usb-ohci"      ENDOF
>>  	0320  OF s" usb-ehci"      ENDOF
>>          0330  OF s" usb-xhci"      ENDOF
>> -        0380  OF s" usb"           ENDOF
>> +        0380  OF s" usb-unknown"   ENDOF
> 
> "usb-unknown" is a much worse name.


Disagree, for something we do not really expect to see (what is this 380 device anyway?), it is an alarming enough name.


> 
>> @@ -216,7 +187,7 @@
>>          02  OF s" satelite-audio"  ENDOF
>>          03  OF s" satelite-voice"  ENDOF
>>          04  OF s" satelite-data"   ENDOF
>> -        dup OF s" satelite-devoce" ENDOF
>> +        dup OF s" satelite-device" ENDOF
> 
> These all still have typos.

ah right. Thanks,
Segher Boessenkool Oct. 22, 2019, 12:03 a.m. UTC | #7
On Tue, Oct 22, 2019 at 10:31:12AM +1100, Alexey Kardashevskiy wrote:
> On 21/10/2019 20:41, Segher Boessenkool wrote:
> > On Mon, Oct 21, 2019 at 06:02:12PM +1100, Alexey Kardashevskiy wrote:
> >> @@ -176,14 +149,14 @@
> >>          0310  OF s" usb-ohci"      ENDOF
> >>  	0320  OF s" usb-ehci"      ENDOF
> >>          0330  OF s" usb-xhci"      ENDOF
> >> -        0380  OF s" usb"           ENDOF
> >> +        0380  OF s" usb-unknown"   ENDOF
> > 
> > "usb-unknown" is a much worse name.
> 
> Disagree, for something we do not really expect to see (what is this 380 device anyway?), it is an alarming enough name.

So why have a name for all those you do not expect to see at all, by that
same argument?  You could easily display "pci-class-0c0380" or similar for
the 98% of codes you do not expect to ever see.


Segher
Alexey Kardashevskiy Oct. 22, 2019, 1:13 a.m. UTC | #8
On 22/10/2019 11:03, Segher Boessenkool wrote:
> On Tue, Oct 22, 2019 at 10:31:12AM +1100, Alexey Kardashevskiy wrote:
>> On 21/10/2019 20:41, Segher Boessenkool wrote:
>>> On Mon, Oct 21, 2019 at 06:02:12PM +1100, Alexey Kardashevskiy wrote:
>>>> @@ -176,14 +149,14 @@
>>>>          0310  OF s" usb-ohci"      ENDOF
>>>>  	0320  OF s" usb-ehci"      ENDOF
>>>>          0330  OF s" usb-xhci"      ENDOF
>>>> -        0380  OF s" usb"           ENDOF
>>>> +        0380  OF s" usb-unknown"   ENDOF
>>>
>>> "usb-unknown" is a much worse name.
>>
>> Disagree, for something we do not really expect to see (what is this 380 device anyway?), it is an alarming enough name.
> 
> So why have a name for all those you do not expect to see at all,

Well, this is to avoid changing QEMU :)

> by that
> same argument?  You could easily display "pci-class-0c0380" or similar for
> the 98% of codes you do not expect to ever see.
The scope of the patch is to make SLOF names match QEMU names. Fixing names themselves is another topic which this patch
is not addressing.
Thomas Huth Oct. 22, 2019, 6:47 a.m. UTC | #9
On 22/10/2019 01.28, Alexey Kardashevskiy wrote:
> 
> 
> On 21/10/2019 18:41, Thomas Huth wrote:
>> On 21/10/2019 09.02, Alexey Kardashevskiy wrote:
>>> During the ibm,client-arhitecture-support client call, we rely on QEMU
>>> providing a full device tree which SLOF then merged into its internal
>>> tree so we rely on both SLOF and QEMU using the same node names for
>>> devices of the same type.
>>>
>>> This changes device tree node names to what QEMU uses.
>>>
>>> The change was triggered by "(unknown-)legacy-device" which is used by
>>> virtio-balloon; other changes either fix typos or remove devices which
>>> are very unlikely to be implemented by QEMU for pseries, or even if they
>>> are, we are ok with using generic class names anyway.
>>>
>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>> ---
>>>
>>> This is to fix https://bugs.launchpad.net/qemu/+bug/1847440?comments=all
>>>
>>>
>>> ---
>>>  slof/fs/pci-class-code-names.fs | 41 +++++----------------------------
>>>  1 file changed, 6 insertions(+), 35 deletions(-)
>>>
>>> diff --git a/slof/fs/pci-class-code-names.fs b/slof/fs/pci-class-code-names.fs
>>> index 6cf3b8fd083c..cd9395fb47ba 100644
>>> --- a/slof/fs/pci-class-code-names.fs
>>> +++ b/slof/fs/pci-class-code-names.fs
>>> @@ -13,7 +13,7 @@
>>>  : pci-class-name-00 ( addr -- str len )
>>>          pci-class@ 8 rshift FF and CASE
>>>          01  OF s" display"               ENDOF
>>> -        dup OF s" unknown-legacy-device" ENDOF
>>> +        dup OF s" legacy-device"         ENDOF
>>>          ENDCASE
>>>  ;
>>>  
>>> @@ -47,7 +47,6 @@
>>>  : pci-class-name-03 ( addr -- str len )
>>>          pci-class@ FFFF and CASE
>>>          0000  OF s" vga"             ENDOF
>>> -        0001  OF s" 8514-compatible" ENDOF
>>>          0100  OF s" xga"             ENDOF
>>>          0200  OF s" 3d-controller"   ENDOF
>>>          dup OF s" display"           ENDOF
>>> @@ -91,23 +90,9 @@
>>>  : pci-class-name-07 ( addr -- str len )
>>>          pci-class@ FFFF and CASE
>>>          0000  OF s" serial"                   ENDOF
>>> -        0001  OF s" 16450-serial"             ENDOF
>>> -        0002  OF s" 16550-serial"             ENDOF
>>> -        0003  OF s" 16650-serial"             ENDOF
>>> -        0004  OF s" 16750-serial"             ENDOF
>>> -        0005  OF s" 16850-serial"             ENDOF
>>> -        0006  OF s" 16950-serial"             ENDOF
>>>          0100  OF s" parallel"                 ENDOF
>>> -        0101  OF s" bi-directional-parallel"  ENDOF
>>> -        0102  OF s" ecp-1.x-parallel"         ENDOF
>>> -        0103  OF s" ieee1284-controller"      ENDOF
>>> -        01FE  OF s" ieee1284-device"          ENDOF
>>>          0200  OF s" multiport-serial"         ENDOF
>>>          0300  OF s" modem"                    ENDOF
>>> -        0301  OF s" 16450-modem"              ENDOF
>>> -        0302  OF s" 16550-modem"              ENDOF
>>> -        0303  OF s" 16650-modem"              ENDOF
>>> -        0304  OF s" 16750-modem"              ENDOF
>>>          0400  OF s" gpib"                     ENDOF
>>>          0500  OF s" smart-card"               ENDOF
>>>          dup   OF s" communication-controller" ENDOF
>>> @@ -118,18 +103,9 @@
>>>  : pci-class-name-08 ( addr -- str len )
>>>          pci-class@ FFFF and CASE
>>>          0000  OF s" interrupt-controller" ENDOF
>>> -        0001  OF s" isa-pic"              ENDOF
>>> -        0002  OF s" eisa-pic"             ENDOF
>>> -        0010  OF s" io-apic"              ENDOF
>>> -        0020  OF s" iox-apic"             ENDOF
>>>          0100  OF s" dma-controller"       ENDOF
>>> -        0101  OF s" isa-dma"              ENDOF
>>> -        0102  OF s" eisa-dma"             ENDOF
>>>          0200  OF s" timer"                ENDOF
>>> -        0201  OF s" isa-system-timer"     ENDOF
>>> -        0202  OF s" eisa-system-timer"    ENDOF
>>>          0300  OF s" rtc"                  ENDOF
>>> -        0301  OF s" isa-rtc"              ENDOF
>>>          0400  OF s" hot-plug-controller"  ENDOF
>>>          0500  OF s" sd-host-conrtoller"   ENDOF
>>>          dup   OF s" system-periphal"      ENDOF
>>> @@ -156,10 +132,7 @@
>>
>> I think I'd rather not remove the entries from class 7 and 8 ... for
>> example, board-js2x uses a 16550 UART IIRC ... yeah, js2x is broken
>> anyway, but in case somebody ever restores this board, we might need
>> this again.
> 
> Why might we _need_ this? Does anything rely on the exact node name for these devices? I am not removing them, I am just
> changing names, "compatible" should still be used to match the driver. What do I miss?

Theoretically, people could use the device tree paths (including these
names) in their NVRAM variables. Whether the NVRAM batteries of the YDL
Powerstations or JS20/JS21 boards are still working is another question,
of course ;-)

Well, I saw that you already committed the patch, so never mind. I guess
we can deal with that later in case we ever re-activate board-js2x
(which is very unlikely anyway).

 Thomas
diff mbox series

Patch

diff --git a/slof/fs/pci-class-code-names.fs b/slof/fs/pci-class-code-names.fs
index 6cf3b8fd083c..cd9395fb47ba 100644
--- a/slof/fs/pci-class-code-names.fs
+++ b/slof/fs/pci-class-code-names.fs
@@ -13,7 +13,7 @@ 
 : pci-class-name-00 ( addr -- str len )
         pci-class@ 8 rshift FF and CASE
         01  OF s" display"               ENDOF
-        dup OF s" unknown-legacy-device" ENDOF
+        dup OF s" legacy-device"         ENDOF
         ENDCASE
 ;
 
@@ -47,7 +47,6 @@ 
 : pci-class-name-03 ( addr -- str len )
         pci-class@ FFFF and CASE
         0000  OF s" vga"             ENDOF
-        0001  OF s" 8514-compatible" ENDOF
         0100  OF s" xga"             ENDOF
         0200  OF s" 3d-controller"   ENDOF
         dup OF s" display"           ENDOF
@@ -91,23 +90,9 @@ 
 : pci-class-name-07 ( addr -- str len )
         pci-class@ FFFF and CASE
         0000  OF s" serial"                   ENDOF
-        0001  OF s" 16450-serial"             ENDOF
-        0002  OF s" 16550-serial"             ENDOF
-        0003  OF s" 16650-serial"             ENDOF
-        0004  OF s" 16750-serial"             ENDOF
-        0005  OF s" 16850-serial"             ENDOF
-        0006  OF s" 16950-serial"             ENDOF
         0100  OF s" parallel"                 ENDOF
-        0101  OF s" bi-directional-parallel"  ENDOF
-        0102  OF s" ecp-1.x-parallel"         ENDOF
-        0103  OF s" ieee1284-controller"      ENDOF
-        01FE  OF s" ieee1284-device"          ENDOF
         0200  OF s" multiport-serial"         ENDOF
         0300  OF s" modem"                    ENDOF
-        0301  OF s" 16450-modem"              ENDOF
-        0302  OF s" 16550-modem"              ENDOF
-        0303  OF s" 16650-modem"              ENDOF
-        0304  OF s" 16750-modem"              ENDOF
         0400  OF s" gpib"                     ENDOF
         0500  OF s" smart-card"               ENDOF
         dup   OF s" communication-controller" ENDOF
@@ -118,18 +103,9 @@ 
 : pci-class-name-08 ( addr -- str len )
         pci-class@ FFFF and CASE
         0000  OF s" interrupt-controller" ENDOF
-        0001  OF s" isa-pic"              ENDOF
-        0002  OF s" eisa-pic"             ENDOF
-        0010  OF s" io-apic"              ENDOF
-        0020  OF s" iox-apic"             ENDOF
         0100  OF s" dma-controller"       ENDOF
-        0101  OF s" isa-dma"              ENDOF
-        0102  OF s" eisa-dma"             ENDOF
         0200  OF s" timer"                ENDOF
-        0201  OF s" isa-system-timer"     ENDOF
-        0202  OF s" eisa-system-timer"    ENDOF
         0300  OF s" rtc"                  ENDOF
-        0301  OF s" isa-rtc"              ENDOF
         0400  OF s" hot-plug-controller"  ENDOF
         0500  OF s" sd-host-conrtoller"   ENDOF
         dup   OF s" system-periphal"      ENDOF
@@ -156,10 +132,7 @@ 
 
 : pci-class-name-0B ( addr -- str len )
         pci-class@ 8 rshift FF and CASE
-        00  OF s" 386"           ENDOF
-        01  OF s" 486"           ENDOF
         02  OF s" pentium"       ENDOF
-        10  OF s" alpha"         ENDOF
         20  OF s" powerpc"       ENDOF
         30  OF s" mips"          ENDOF
         40  OF s" co-processor"  ENDOF
@@ -176,14 +149,14 @@ 
         0310  OF s" usb-ohci"      ENDOF
 	0320  OF s" usb-ehci"      ENDOF
         0330  OF s" usb-xhci"      ENDOF
-        0380  OF s" usb"           ENDOF
+        0380  OF s" usb-unknown"   ENDOF
         03FE  OF s" usb-device"    ENDOF
         0400  OF s" fibre-channel" ENDOF
         0500  OF s" smb"           ENDOF
         0600  OF s" infiniband"    ENDOF
-        0700  OF s" ipmi-smic"     ENDOF
-        0701  OF s" ipmi-kbrd"     ENDOF
-        0702  OF s" ipmi-bltr"     ENDOF
+        0700  OF s" ipmi"          ENDOF
+        0701  OF s" ipmi"          ENDOF
+        0702  OF s" ipmi"          ENDOF
         0800  OF s" sercos"        ENDOF
         0900  OF s" canbus"        ENDOF
         dup OF s" serial-bus"      ENDOF
@@ -197,8 +170,6 @@ 
         10  OF s" rf-controller"       ENDOF
         11  OF s" bluetooth"           ENDOF
         12  OF s" broadband"           ENDOF
-        20  OF s" enet-802.11a"        ENDOF
-        21  OF s" enet-802.11b"        ENDOF
         dup OF s" wireless-controller" ENDOF
         ENDCASE
 ;
@@ -216,7 +187,7 @@ 
         02  OF s" satelite-audio"  ENDOF
         03  OF s" satelite-voice"  ENDOF
         04  OF s" satelite-data"   ENDOF
-        dup OF s" satelite-devoce" ENDOF
+        dup OF s" satelite-device" ENDOF
         ENDCASE
 ;