LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* RFC cpm2_devices DPRAM resource
@ 2005-06-16 17:45 Allen Curtis
  2005-06-16 17:58 ` Kumar Gala
  2005-06-16 19:41 ` Dan Malek
  0 siblings, 2 replies; 7+ messages in thread
From: Allen Curtis @ 2005-06-16 17:45 UTC (permalink / raw)
  To: Ppc Embedded

Slightly different question than the current thread:

Should the DPRAM appear as it's own platform_device?
Option 1) Specify the portion of the DPRAM used by each device with 
that platform_device definition. (current)

Option 2) Define the whole DPRAM region as its own platform_device 
entry. Move the device DPRAM information to the device specific 
platform structure.

Would this help with a general dpalloc() implementation? It would 
reduce the number of ioremap() regions.

Another thought.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFC cpm2_devices DPRAM resource
  2005-06-16 17:45 RFC cpm2_devices DPRAM resource Allen Curtis
@ 2005-06-16 17:58 ` Kumar Gala
  2005-06-16 18:08   ` Allen Curtis
  2005-06-16 19:36   ` Dan Malek
  2005-06-16 19:41 ` Dan Malek
  1 sibling, 2 replies; 7+ messages in thread
From: Kumar Gala @ 2005-06-16 17:58 UTC (permalink / raw)
  To: Allen Curtis; +Cc: Ppc Embedded


On Jun 16, 2005, at 12:45 PM, Allen Curtis wrote:

> Slightly different question than the current thread:
>
> Should the DPRAM appear as it's own platform_device?
> Option 1) Specify the portion of the DPRAM used by each device with
> that platform_device definition. (current)
>
> Option 2) Define the whole DPRAM region as its own platform_device
> entry. Move the device DPRAM information to the device specific
> platform structure.
>
> Would this help with a general dpalloc() implementation? It would
> reduce the number of ioremap() regions.

Well, we already have an allocator for general dpram memory.  I'm not 
really sure how this would help beyond reducing the fact that we may 
ioremap() regions more than once.  I think the better solution there is 
to look at the patches that have been made to ioremap() to return the 
same virtual addresses if you are remapping a region of physical memory 
that already has a mapping.

- kumar

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFC cpm2_devices DPRAM resource
  2005-06-16 17:58 ` Kumar Gala
@ 2005-06-16 18:08   ` Allen Curtis
  2005-06-16 19:36   ` Dan Malek
  1 sibling, 0 replies; 7+ messages in thread
From: Allen Curtis @ 2005-06-16 18:08 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Ppc Embedded

>> Slightly different question than the current thread:
>>
>> Should the DPRAM appear as it's own platform_device?
>> Option 1) Specify the portion of the DPRAM used by each device with
>> that platform_device definition. (current)
>>
>> Option 2) Define the whole DPRAM region as its own platform_device
>> entry. Move the device DPRAM information to the device specific
>> platform structure.
>>
>> Would this help with a general dpalloc() implementation? It would
>> reduce the number of ioremap() regions.
>
> Well, we already have an allocator for general dpram memory.  I'm not 
> really sure how this would help beyond reducing the fact that we may 
> ioremap() regions more than once.  I think the better solution there 
> is to look at the patches that have been made to ioremap() to return 
> the same virtual addresses if you are remapping a region of physical 
> memory that already has a mapping.
>
I guess my thought regarding the dpalloc() statement is that those 
functions could query the platform_device structure to find the region 
they are managing. Make them a little more general.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFC cpm2_devices DPRAM resource
  2005-06-16 17:58 ` Kumar Gala
  2005-06-16 18:08   ` Allen Curtis
@ 2005-06-16 19:36   ` Dan Malek
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Malek @ 2005-06-16 19:36 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Ppc Embedded


On Jun 16, 2005, at 1:58 PM, Kumar Gala wrote:

> Well, we already have an allocator for general dpram memory.  I'm not 
> really sure how this would help beyond reducing the fact that we may 
> ioremap() regions more than once.  I think the better solution there 
> is to look at the patches that have been made to ioremap() to return 
> the same virtual addresses if you are remapping a region of physical 
> memory that already has a mapping.

I agree.  Specifically for 85xx, we have to make sure we have CAMs 
mapping
these spaces and ioremap() will reuse them.


	-- Dan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFC cpm2_devices DPRAM resource
  2005-06-16 17:45 RFC cpm2_devices DPRAM resource Allen Curtis
  2005-06-16 17:58 ` Kumar Gala
@ 2005-06-16 19:41 ` Dan Malek
  2005-06-16 20:07   ` Allen Curtis
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Malek @ 2005-06-16 19:41 UTC (permalink / raw)
  To: Allen Curtis; +Cc: Ppc Embedded


On Jun 16, 2005, at 1:45 PM, Allen Curtis wrote:

> Should the DPRAM appear as it's own platform_device?

No.

> Option 1) Specify the portion of the DPRAM used by each device with 
> that platform_device definition. (current)

You mean the parameter space?  That's different from DPRAM.

> Option 2) Define the whole DPRAM region as its own platform_device 
> entry. Move the device DPRAM information to the device specific 
> platform structure.

How is this any different from using the dpalloc() as it is today?

The problem is that for the few standard devices we publicly support in
Linux it is easy to think of DPRAM as a "general" resource.  However, 
for
more challenging devices and implementation, there are sometimes 
specific
regions of DPRAM that must be used with various additional restrictions.
For many of the "real world" devices I have done, drivers would manage
their own, well known, DPRAM areas.  It isn't something that is easy
to generalize or configure in advance.

Thanks.


	-- Dan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFC cpm2_devices DPRAM resource
  2005-06-16 19:41 ` Dan Malek
@ 2005-06-16 20:07   ` Allen Curtis
  2005-06-17  6:48     ` Pantelis Antoniou
  0 siblings, 1 reply; 7+ messages in thread
From: Allen Curtis @ 2005-06-16 20:07 UTC (permalink / raw)
  To: Dan Malek; +Cc: Ppc Embedded

>> Should the DPRAM appear as it's own platform_device?
>
> No.
>
>> Option 1) Specify the portion of the DPRAM used by each device with 
>> that platform_device definition. (current)
>
> You mean the parameter space?  That's different from DPRAM.
>
>> Option 2) Define the whole DPRAM region as its own platform_device 
>> entry. Move the device DPRAM information to the device specific 
>> platform structure.
>
> How is this any different from using the dpalloc() as it is today?
>
> The problem is that for the few standard devices we publicly support in
> Linux it is easy to think of DPRAM as a "general" resource.  However, 
> for
> more challenging devices and implementation, there are sometimes 
> specific
> regions of DPRAM that must be used with various additional 
> restrictions.
> For many of the "real world" devices I have done, drivers would manage
> their own, well known, DPRAM areas.  It isn't something that is easy
> to generalize or configure in advance.
>
Time for code.

- Allen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RFC cpm2_devices DPRAM resource
  2005-06-16 20:07   ` Allen Curtis
@ 2005-06-17  6:48     ` Pantelis Antoniou
  0 siblings, 0 replies; 7+ messages in thread
From: Pantelis Antoniou @ 2005-06-17  6:48 UTC (permalink / raw)
  To: Allen Curtis; +Cc: Ppc Embedded

Allen Curtis wrote:
>>> Should the DPRAM appear as it's own platform_device?
>>
>>
>> No.
>>
>>> Option 1) Specify the portion of the DPRAM used by each device with 
>>> that platform_device definition. (current)
>>
>>
>> You mean the parameter space?  That's different from DPRAM.
>>
>>> Option 2) Define the whole DPRAM region as its own platform_device 
>>> entry. Move the device DPRAM information to the device specific 
>>> platform structure.
>>
>>
>> How is this any different from using the dpalloc() as it is today?
>>
>> The problem is that for the few standard devices we publicly support in
>> Linux it is easy to think of DPRAM as a "general" resource.  However, for
>> more challenging devices and implementation, there are sometimes specific
>> regions of DPRAM that must be used with various additional restrictions.
>> For many of the "real world" devices I have done, drivers would manage
>> their own, well known, DPRAM areas.  It isn't something that is easy
>> to generalize or configure in advance.
>>
> Time for code.
> 
> - Allen
> 

FWIW the current dpalloc implementation supports "carving out" the usable
dpram out of the whole. I mean you could conceivably not "give" the driver
specific dpram areas to the generic allocator. This should be a per platform
configuration item.

The current code just doesn't bother...

Regards

Pantelis

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-06-17  6:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-16 17:45 RFC cpm2_devices DPRAM resource Allen Curtis
2005-06-16 17:58 ` Kumar Gala
2005-06-16 18:08   ` Allen Curtis
2005-06-16 19:36   ` Dan Malek
2005-06-16 19:41 ` Dan Malek
2005-06-16 20:07   ` Allen Curtis
2005-06-17  6:48     ` Pantelis Antoniou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox