Re: [PATCH anybus v4 6/7] dt-bindings: anybuss-host: document devicetree binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob, thank you so much for the review !

On Mon, Nov 26, 2018 at 5:08 PM Rob Herring <robh@xxxxxxxxxx> wrote:

> Unit-addresses are based on 'reg'. So this should either be '89' or
> based on a definition for the bus (e.g. PCI uses dev and func).
>
>> +                     reg = <0x0089>;
>
> Is fieldbus type how one addresses a device on the bus?

I'm afraid not. Anybus cards don't have an address, because only a single card
can be connected to an anybus at a time.

Fieldbus type defines the type/functionality of the connected card. Like pci
device ids.

The current patchset allows devicetree nodes to be provided depending on
the type of card connected to the bus. It identifies the card by type,
not location.

Is this not desired / allowed ?

> I'm still not clear what a bridge vs. host is. Both examples are on WEIM
> bus CS0?

I agree that the terminology is too confusing. I'm looking to change it.

Let's compare current anybus with a well-established bus architecture like pci:

                                pci                     anybus
--------------------------------------------------------------------------------
Common bus code (spec),         pci/pci_driver.c        fieldbus/anybuss-host.c
  calls bus_register()                                  must be parallel bus
                                                        subnode
                                no of compatible        has of compatible
--------------------------------------------------------------------------------
Device on bus, calls
  XXX_client_driver_register()  hwmon/k8temp.c          fieldbus/hms-profinet.c
--------------------------------------------------------------------------------
Controller, silicon driver      pci/pcie-tango.c        fieldbus/anybus-bridge.c
                                platform_driver calls   platform_driver does not
                                pci_host_probe()        register with anybus

I should probably rework this so it conforms more closely to the way it's done
on pci. Would the following look any better?

                                pci                     anybus
--------------------------------------------------------------------------------
Common bus code (spec),         pci/pci_driver.c        anybus/anybus_driver.c
  calls bus_register()          no of compatible        no of compatible
--------------------------------------------------------------------------------
Device on bus, calls
  XXX_client_driver_register()  hwmon/k8temp.c          fieldbus/hms-profinet.c
--------------------------------------------------------------------------------
Controller, silicon driver      pci/pcie-tango.c        anybus/arcx-controller.c
                                platform_driver calls   platform_driver calls
                                pci_host_probe()        anybus_host_probe()

Of course, the analogy is not perfect, as there can only be a single card
(device) connected to an anybus at a time.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux