[PATCH] CPM_UART: Fixed SMC handling for CPM2 processors

Heiko Schocher hs at denx.de
Tue Feb 13 19:09:47 EST 2007


Hello Vitaly,

Vitaly Bordug wrote:
> > I tried the Patch from Kalle Pokki
> > http://ozlabs.org/pipermail/linuxppc-embedded/2006-November/025108.html
> > 
> > but my SMC didnt work, without this patch, it works fine. I think that
> > the pram_base must be set the follwing way:
> > 
> Thanks for the patch, but I guess it requires a bit of investigation first since 
> we cannot just drop ioremapped offset and get back to raw one that has been returned by 
> platform_get_....

Ok, "Linux" writes/reads with the ioremapped Address in the Dualported
RAM we get with platform_get_...("pram"), thats Okay, but the CPM needs
the "real" Dualported RAM Address from this Area at offset SMCx_BASE,
which we get with platform_get_...("pram_base"), so it can find the SMC
Parameter RAM, he(CPM) didnt know anything about ioremapped addresses.

> We require ioremap stuff for powerpc approach, and I think we'd have to figure out why 
> ioremapped address did not satisfy smc (and I'll try on my 8xx).

Hmm... you mean the following?:

  r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram_base");
  if (r) {
+           pram_base = (u32)ioremap(r->start, r->end - r->start + 1);
            out_be16((u16 *)pram_base, base & 0xffff);
+           iounmap(pram_base);
         }

But thats not, what I correct with my patch, the error was, that
we wrote the ioremapped address pram in pram_base and not the real
address ... and with this ioremapped address, the CPM cannot do anything
(I think).

> Guessing we are speaking about arch/ppc/ domain upper...

Yes.

thanks
Heiko

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany




More information about the Linuxppc-embedded mailing list