Thread (10 messages) 10 messages, 3 authors, 2007-02-13

Re: [PATCH] CPM_UART: Fixed SMC handling for CPM2 processors

flat view

From: Vitaly Bordug <hidden>
Date: 2006-11-07 14:48:01

On Tue, 7 Nov 2006 15:21:00 +0200 (EET)
Kalle Pokki wrote:
On Tue, 7 Nov 2006, Vitaly Bordug wrote:
quoted
Well, yes, but are you _sure_ pram_base will be the same across all
the 82xx PQ2, that happen to have smc wired to Ethernet?

If not I am considering storing it in the platform_data is better
approach.
Yes, pram_base is always 0x87fc for SMC1 and 0x88fc for SMC2. This is
for all PowerQUICC II families (8260, 8272, and 8280). I'm not sure
how PQ2 Pro and PQ3 and handled, but I suspect they don't share these 
definitions.
ok
Anyway, I'm only extending the already existing conventions to the 
platform device approach. These same decisions have already been made
in the past and are used in the cpm_uart compat mode. It may be that 
Freescale someday releases a microcode patch that relocates the SMC 
parameter RAM, but even in this case it would be better to use the
same approach with compat mode and platform device mode to avoid
confusion.

I could have used the numerical address offsets in the resource 
definition, but I wanted to emphasize the fact that the offsets are 
already defined by the DPRAM memory allocator (this is a little
hackish, yes) instead of hardware directly requiring these exact
values.
Aha, I recall now. There was nearly exactly the same discussion in the past. 
The recap was since ppc_platform_devices[] approach is not flexible enough, revisit issue from the 
arch/powerpc POV. 
This snippet is from cpm2.h:

 	/* Dual Port RAM addresses.  The first 16K is available for
almost
 	 * any CPM use, so we put the BDs there.  The first 128
bytes are
 	 * used for SMC1 and SMC2 parameter RAM, so we start
allocating
 	 * BDs above that.  All of this must change when we start
 	 * downloading RAM microcode.
 	 */
 	#define CPM_DATAONLY_BASE       ((uint)128)

My patch puts pram_base exactly here.
I know, the questionable thing was if there is enough "value" to add yet another platform device for that.

Since it improves current ppc being and sort of puts a note for powerpc port, I'm inclined to ACK.

Thanks,

-Vitaly

Attachments

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