Thread (5 messages) 5 messages, 4 authors, 2011-10-26

[PATCH] of: Add a reg-names property to name reg entries

From: tony@atomide.com (Tony Lindgren)
Date: 2011-10-26 12:23:32
Also in: linux-devicetree, linux-omap

Possibly related (same subject, not in this thread)

* Segher Boessenkool [off-list ref] [111026 05:22]:
quoted
quoted
quoted
quoted
What problem does any of this solve?  The device binding for the
"mcasp" device will have to describe the possible "reg-names", and
what those mean; but the binding already has to describe its "reg"
property anyway.
What this solve is the ability to use the
platform_get_resource_byname directly to retrieve the proper
register base address.
You do not have to put it in the device tree for that, the device
driver can implement this itself if it cares.
???

The driver is the user of that name, so it has to be populated
before into the resource during device creation.
It can be as simple as

#define FOO_REG_INDEX 0
#define BAR_REG_INDEX 1

but you can use C strings if you want to.
Fox pin muxing, we really want to use the actual signal names in
the drivers. The define example above would means mapping the defines
multiple times depending which packaging you're using.

There can be several packages for each SoC, where the pins wired up
whichever way. For example, for a serial driver to use UART RX pin,
the driver can just request a signal called "uart_tx", which is the
actual hardware name for the signal inside the SoC.

Using the signal names also makes it easier to make drivers to support
the same device IP blocks across multiple SoC as the signal name most
likely is the same as what the device IP block is using.

Regards,

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