* standard property to convey device dma address width?
@ 2010-08-16 16:01 Kumar Gala
[not found] ` <5A878376-AFCC-4CB0-A0E9-F2F497066FD5-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2010-08-16 16:01 UTC (permalink / raw)
To: devicetree-discuss; +Cc: Yoder Stuart-B08248
Do we or should we have a standard property to convey that address width a device is capable of?
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: standard property to convey device dma address width?
[not found] ` <5A878376-AFCC-4CB0-A0E9-F2F497066FD5-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
@ 2010-08-16 20:17 ` Mitch Bradley
[not found] ` <4C699CC6.1060507-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2010-08-17 20:50 ` Yoder Stuart-B08248
1 sibling, 1 reply; 8+ messages in thread
From: Mitch Bradley @ 2010-08-16 20:17 UTC (permalink / raw)
To: Kumar Gala; +Cc: Yoder Stuart-B08248, devicetree-discuss
Kumar Gala wrote:
> Do we or should we have a standard property to convey that address width a device is capable of?
>
What is the context? When Open Firmware was first developed, the only
bus with partial addresses was ISA. The ISA bus binding has a "dma"
property that describes some of the legacy DMA characteristics, but
address width isn't one of them, for reasons that I don't remember.
I thought at the time (perhaps wishfully) that partial addresses would
not be consideration for future buses, because
a) The transition to large-scale integration had already made logic
gates nearly "free", so there was no motivation to skimp on address
register bits.
b) Although packages were - and still are - pin-limited, partial address
bus connections were not feasible because of uneven bus loading problems.
c) Address and data buses were usually multiplexed onto the same pins,
further reducing the motivation for partial addresses.
Obviously, since you are asking the question, there is some case where
address width could be variable. I'd be interested to learn the details.
If I had to describe a partial address, I'd consider a property name
like "dma-address-mask", whose value is a bitmap of implemented bits,
corresponding to the bits in a unit address for the parent bus.
Low-order bits might be zero if the DMA addressing hardware had
alignment restrictions.
> - k
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: standard property to convey device dma address width?
[not found] ` <5A878376-AFCC-4CB0-A0E9-F2F497066FD5-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2010-08-16 20:17 ` Mitch Bradley
@ 2010-08-17 20:50 ` Yoder Stuart-B08248
[not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA3065BD776-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org>
1 sibling, 1 reply; 8+ messages in thread
From: Yoder Stuart-B08248 @ 2010-08-17 20:50 UTC (permalink / raw)
To: Kumar Gala, devicetree-discuss
> -----Original Message-----
> From: Kumar Gala [mailto:galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org]
> Sent: Monday, August 16, 2010 11:02 AM
> To: devicetree-discuss
> Cc: Yoder Stuart-B08248
> Subject: standard property to convey device dma address width?
>
> Do we or should we have a standard property to convey that address
> width a device is capable of?
Is this a case of where a device can only address something like
32-bits, and you want some kind of per-device property to
convey this?
Stuart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: standard property to convey device dma address width?
[not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA3065BD776-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org>
@ 2010-08-17 20:54 ` Kumar Gala
0 siblings, 0 replies; 8+ messages in thread
From: Kumar Gala @ 2010-08-17 20:54 UTC (permalink / raw)
To: Yoder Stuart-B08248; +Cc: devicetree-discuss
On Aug 17, 2010, at 3:50 PM, Yoder Stuart-B08248 wrote:
>
>
>> -----Original Message-----
>> From: Kumar Gala [mailto:galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org]
>> Sent: Monday, August 16, 2010 11:02 AM
>> To: devicetree-discuss
>> Cc: Yoder Stuart-B08248
>> Subject: standard property to convey device dma address width?
>>
>> Do we or should we have a standard property to convey that address
>> width a device is capable of?
>
> Is this a case of where a device can only address something like
> 32-bits, and you want some kind of per-device property to
> convey this?
>
> Stuart
Exactly. With SOC devices the address width different devices on the SOC can address may (and does) very.
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: standard property to convey device dma address width?
[not found] ` <4C699CC6.1060507-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
@ 2010-08-17 20:55 ` Kumar Gala
[not found] ` <366D8D84-D210-4BC1-8FC1-4E0A9E06C433-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2010-08-17 20:55 UTC (permalink / raw)
To: Mitch Bradley; +Cc: Yoder Stuart-B08248, devicetree-discuss
On Aug 16, 2010, at 3:17 PM, Mitch Bradley wrote:
> Kumar Gala wrote:
>> Do we or should we have a standard property to convey that address width a device is capable of?
>>
>
> What is the context? When Open Firmware was first developed, the only bus with partial addresses was ISA. The ISA bus binding has a "dma" property that describes some of the legacy DMA characteristics, but address width isn't one of them, for reasons that I don't remember.
>
> I thought at the time (perhaps wishfully) that partial addresses would not be consideration for future buses, because
>
> a) The transition to large-scale integration had already made logic gates nearly "free", so there was no motivation to skimp on address register bits.
>
> b) Although packages were - and still are - pin-limited, partial address bus connections were not feasible because of uneven bus loading problems.
>
> c) Address and data buses were usually multiplexed onto the same pins, further reducing the motivation for partial addresses.
>
> Obviously, since you are asking the question, there is some case where address width could be variable. I'd be interested to learn the details.
>
> If I had to describe a partial address, I'd consider a property name like "dma-address-mask", whose value is a bitmap of implemented bits, corresponding to the bits in a unit address for the parent bus. Low-order bits might be zero if the DMA addressing hardware had alignment restrictions.
As I said to Stuart. On the Freescale SOCs we have different device blocks w/varying dma address capabilities. Some are limited to 32-bits some are capable of 36-bits on the same SOC.
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: standard property to convey device dma address width?
[not found] ` <366D8D84-D210-4BC1-8FC1-4E0A9E06C433-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
@ 2010-08-17 21:03 ` Scott Wood
[not found] ` <20100817160317.458ea513-1MYqz8GpK7RekFaExTCHk1jVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-08-17 21:22 ` Mitch Bradley
1 sibling, 1 reply; 8+ messages in thread
From: Scott Wood @ 2010-08-17 21:03 UTC (permalink / raw)
To: Kumar Gala; +Cc: Yoder Stuart-B08248, devicetree-discuss
On Tue, 17 Aug 2010 15:55:04 -0500
Kumar Gala <galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org> wrote:
> As I said to Stuart. On the Freescale SOCs we have different device
> blocks w/varying dma address capabilities. Some are limited to 32-bits
> some are capable of 36-bits on the same SOC.
Is this something that the driver would not know about, just based on
the compatible that it is matching?
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: standard property to convey device dma address width?
[not found] ` <366D8D84-D210-4BC1-8FC1-4E0A9E06C433-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2010-08-17 21:03 ` Scott Wood
@ 2010-08-17 21:22 ` Mitch Bradley
1 sibling, 0 replies; 8+ messages in thread
From: Mitch Bradley @ 2010-08-17 21:22 UTC (permalink / raw)
To: Kumar Gala; +Cc: Yoder Stuart-B08248, devicetree-discuss
Kumar Gala wrote:
> On Aug 16, 2010, at 3:17 PM, Mitch Bradley wrote:
>
>
>> Kumar Gala wrote:
>>
>>> Do we or should we have a standard property to convey that address width a device is capable of?
>>>
>>>
>> ...
>> If I had to describe a partial address, I'd consider a property name like "dma-address-mask", whose value is a bitmap of implemented bits, corresponding to the bits in a unit address for the parent bus. Low-order bits might be zero if the DMA addressing hardware had alignment restrictions.
>>
>
> As I said to Stuart. On the Freescale SOCs we have different device blocks w/varying dma address capabilities. Some are limited to 32-bits some are capable of 36-bits on the same SOC.
>
> - k
>
>
The closest existing property that I know of is "dma-ranges" - see
http://playground.sun.com/1275/proposals/Closed/Accepted/410-it.txt
That's not directly applicable, as "dma-ranges" in its current form
applies to bus bridges, describing the translation between DMA addresses
on a child bus to DMA addresses on a parent bus.
The case in question has some general similarities, in that the limited
devices have an implicit 32-bit "child bus" that is translated to the
36-bit parent bus, presumably by concatenating zeros in bits 35:32. Is
that correct, i.e. are the high bits implicitly 0?
The dma-ranges representation doesn't assume the "zero-extend" property,
but rather explicitly lists child-base-address,parent-base-address,size
triples. I wonder if that generality is justifiable in this case?
I see several obvious representations with varying degrees of generality:
a) boolean property saying "this is one of those 32-bit only devices,
with all the implications"
b) width in bits - assumes an implicit translation rule (e.g. zero-extend)
c) bitmask - assumes implicit translation rule, capable of representing
alignment restrictions with low-order zeros
d) something like dma-ranges - explicitly represents translation rule,
no representation for alignment restriction
My 2 cents: Generality is often only justified when you have a good
collection of problem instances, so you can amortize the generality over
several specific known examples. Otherwise you often end up
implementing something elaborate that never gets used.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: standard property to convey device dma address width?
[not found] ` <20100817160317.458ea513-1MYqz8GpK7RekFaExTCHk1jVikpgYyvb5NbjCUgZEJk@public.gmane.org>
@ 2010-08-18 3:57 ` Kumar Gala
0 siblings, 0 replies; 8+ messages in thread
From: Kumar Gala @ 2010-08-18 3:57 UTC (permalink / raw)
To: Scott Wood; +Cc: Yoder Stuart-B08248, devicetree-discuss
On Aug 17, 2010, at 4:03 PM, Scott Wood wrote:
> On Tue, 17 Aug 2010 15:55:04 -0500
> Kumar Gala <galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org> wrote:
>
>> As I said to Stuart. On the Freescale SOCs we have different device
>> blocks w/varying dma address capabilities. Some are limited to 32-bits
>> some are capable of 36-bits on the same SOC.
>
> Is this something that the driver would not know about, just based on
> the compatible that it is matching?
>
> -Scott
There is some variation here that is reasonable that the same compatible could have a different width for different SOC integration.
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-08-18 3:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 16:01 standard property to convey device dma address width? Kumar Gala
[not found] ` <5A878376-AFCC-4CB0-A0E9-F2F497066FD5-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2010-08-16 20:17 ` Mitch Bradley
[not found] ` <4C699CC6.1060507-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2010-08-17 20:55 ` Kumar Gala
[not found] ` <366D8D84-D210-4BC1-8FC1-4E0A9E06C433-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2010-08-17 21:03 ` Scott Wood
[not found] ` <20100817160317.458ea513-1MYqz8GpK7RekFaExTCHk1jVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-08-18 3:57 ` Kumar Gala
2010-08-17 21:22 ` Mitch Bradley
2010-08-17 20:50 ` Yoder Stuart-B08248
[not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA3065BD776-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org>
2010-08-17 20:54 ` Kumar Gala
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.