[PATCH] cpm_uart: Allocate DPRAM memory for SMC ports on CPM2-based platforms.

Laurent Pinchart laurentp at cse-semaphore.com
Wed Mar 26 03:20:21 EST 2008


On Tuesday 25 March 2008 17:03, Scott Wood wrote:
> On Tue, Mar 25, 2008 at 04:34:46PM +0100, Laurent Pinchart wrote:
> > On Tuesday 25 March 2008 15:58, Scott Wood wrote:
> > > Please maintain backward compatibility with older device trees (by
> > > checking the length of the second reg resource).  At the very least,
> > > update the device trees that are affected.
> > 
> > I haven't seen any CPM2-based board using SMC ports in the device trees 
> > available in arch/powerpc/boot/dts.
> 
> ep8248e

I should have checked git head. My bad. I'll include the ep8248e device tree 
in the next patch.

> > Should I still maintain compatibility with older device trees ? Is there 
any 
> > out-of-tree PQ2 boards using udbg and SMC ?
> 
> Yes, I've answered questions on the lists from at least one person using
> a custom board with cpm2 smc.

Are you sure it wasn't me ? ;-)

> > What about printing a warning if the second reg resource has the wrong
> > size ?
> 
> The only way you'll see the warning is if udbg is enabled. :-P
> 
> Will a CPM reset blow away the portion of muram that holds the SMC pram
> pointer?  If not (and I don't think it will), just return the device tree
> reg resource as is currently done if the resource is the wrong size.

Ok I'll do that. Should I add a warning message to tell people to update the 
device tree ?

> > > After this point, even if you don't reset the CPM, udbg printk is broken
> > > because you moved pram.  The udbg disabling will have to be moved before
> > > this.
> > 
> > Moving the SMC pram doesn't break udbg printk in itself. What will break 
it is 
> > moving the TX BDs, but the end result is the same, moving pram will result 
in 
> > udbg being broken.
> > 
> > The cpm_uart driver disable udbg before allocating the new BDs. What about 
> > moving that right before moving the parameter RAM ? 
cpm_uart_request_port(), 
> > which is called in between, already disables RX and TX on the port, so we 
> > won't loose any debug message.
> 
> cpm_uart_request_port() returns without doing that if it's a console
> port.  I think the current placement of the udbg disable will be fine.

Ok. I'll prepare a new patch that maintains compatibility with old device 
trees.

Best regards,

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080325/58d18185/attachment.pgp>


More information about the Linuxppc-dev mailing list