linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MPC82xx ADS SCC ports initialisation
@ 2007-07-10 14:19 Laurent Pinchart
  2007-07-10 18:11 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2007-07-10 14:19 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: vbordug

Hi everybody,

while checking the availability of MPC8260 support in ARCH=powerpc, I ran 
across a possible issue in SCC ports initialisation for the MPC82xx ADS 
boards.

init_scc1_uart_ioports and init_scc4_uart_ioports in 
arch/powerpc/platforms/mpc82xx/mpx82xx_ads.c use the following code to 
configure the SCC clocks:

clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 - data->clk_tx)));
clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038 << (4 - data->clk_rx)));
setbits32(&immap->im_cpmux.cmx_scr, 
          ((data->clk_tx - 1) << (4 - data->clk_tx)));
setbits32(&immap->im_cpmux.cmx_scr,
          ((data->clk_rx - 1) << (4 - data->clk_rx)));

The shift right-hand operand doesn't seem to be correct. Could anyone confirm 
this ? If my assumption is right, could anyone tell me if the MPC82xx 
processors are actually supported by the powerpc architecture, or if the 
MPC82xx ADS code is just a non-functional work in progress.

I also noticed that U-Boot doesn't have flatten device tree support for the 
MPC82xx family. There seem to be still a lot of work to do to support the 
MPC82xx in the powerpc tree, and the effort is much bigger than just porting 
a board from ppc to powerpc.

Laurent Pinchart

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

* Re: MPC82xx ADS SCC ports initialisation
  2007-07-10 14:19 MPC82xx ADS SCC ports initialisation Laurent Pinchart
@ 2007-07-10 18:11 ` Scott Wood
  2007-07-11  7:11   ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2007-07-10 18:11 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: vbordug, linuxppc-embedded

On Tue, Jul 10, 2007 at 04:19:51PM +0200, Laurent Pinchart wrote:
> clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 - data->clk_tx)));
> clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038 << (4 - data->clk_rx)));
> setbits32(&immap->im_cpmux.cmx_scr, 
>           ((data->clk_tx - 1) << (4 - data->clk_tx)));
> setbits32(&immap->im_cpmux.cmx_scr,
>           ((data->clk_rx - 1) << (4 - data->clk_rx)));
> 
> The shift right-hand operand doesn't seem to be correct. Could anyone confirm 
> this ?

You are correct; it's broken.

> If my assumption is right, could anyone tell me if the MPC82xx 
> processors are actually supported by the powerpc architecture, or if the 
> MPC82xx ADS code is just a non-functional work in progress.

I have a bunch of 8xx/82xx changes pending; I hope to get them cleaned up
before the merge window ends.

> I also noticed that U-Boot doesn't have flatten device tree support for the 
> MPC82xx family.

No, but cuImage for 82xx is on its way.

-Scott

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

* Re: MPC82xx ADS SCC ports initialisation
  2007-07-10 18:11 ` Scott Wood
@ 2007-07-11  7:11   ` Laurent Pinchart
  2007-07-11 10:34     ` Vitaly Bordug
  2007-07-11 15:21     ` Scott Wood
  0 siblings, 2 replies; 6+ messages in thread
From: Laurent Pinchart @ 2007-07-11  7:11 UTC (permalink / raw)
  To: Scott Wood; +Cc: vbordug, linuxppc-embedded

On Tuesday 10 July 2007 20:11, Scott Wood wrote:
> On Tue, Jul 10, 2007 at 04:19:51PM +0200, Laurent Pinchart wrote:
> > clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 - data->clk_tx)));
> > clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038 << (4 - data->clk_rx)));
> > setbits32(&immap->im_cpmux.cmx_scr,
> >           ((data->clk_tx - 1) << (4 - data->clk_tx)));
> > setbits32(&immap->im_cpmux.cmx_scr,
> >           ((data->clk_rx - 1) << (4 - data->clk_rx)));
> >
> > The shift right-hand operand doesn't seem to be correct. Could anyone
> > confirm this ?
>
> You are correct; it's broken.

That code should be replaced with calls to cpm2_clk_setup 
(arch/powerpc/sysdev/cpm2_common.c). cpm2_clk_setup currently supports FCC 
clock setup only, but I've got a patch to add SCC clock setup support. Should 
I send it ?

> > If my assumption is right, could anyone tell me if the MPC82xx
> > processors are actually supported by the powerpc architecture, or if the
> > MPC82xx ADS code is just a non-functional work in progress.
>
> I have a bunch of 8xx/82xx changes pending; I hope to get them cleaned up
> before the merge window ends.

That would be nice. I'll wait for your changes to continue my ppc -> powerpc 
port.

> > I also noticed that U-Boot doesn't have flatten device tree support for
> > the MPC82xx family.
>
> No, but cuImage for 82xx is on its way.

Ok, nice to know. Adding FDT support to U-Boot for the MPC82xx family will be 
on my todo-list once I get Linux working with cuImage.

Laurent Pinchart

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

* Re: MPC82xx ADS SCC ports initialisation
  2007-07-11  7:11   ` Laurent Pinchart
@ 2007-07-11 10:34     ` Vitaly Bordug
  2007-07-11 13:13       ` Laurent Pinchart
  2007-07-11 15:21     ` Scott Wood
  1 sibling, 1 reply; 6+ messages in thread
From: Vitaly Bordug @ 2007-07-11 10:34 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

On Wed, 11 Jul 2007 09:11:18 +0200
Laurent Pinchart wrote:

> On Tuesday 10 July 2007 20:11, Scott Wood wrote:
> > On Tue, Jul 10, 2007 at 04:19:51PM +0200, Laurent Pinchart wrote:
> > > clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 -
> > > data->clk_tx))); clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038
> > > << (4 - data->clk_rx))); setbits32(&immap->im_cpmux.cmx_scr,
> > >           ((data->clk_tx - 1) << (4 - data->clk_tx)));
> > > setbits32(&immap->im_cpmux.cmx_scr,
> > >           ((data->clk_rx - 1) << (4 - data->clk_rx)));
> > >
> > > The shift right-hand operand doesn't seem to be correct. Could
> > > anyone confirm this ?
> >
> > You are correct; it's broken.
> 
> That code should be replaced with calls to cpm2_clk_setup 
> (arch/powerpc/sysdev/cpm2_common.c). cpm2_clk_setup currently
> supports FCC clock setup only, but I've got a patch to add SCC clock
> setup support. Should I send it ?
> 
If you have functional approach, please feel free to send it...

> > > If my assumption is right, could anyone tell me if the MPC82xx
> > > processors are actually supported by the powerpc architecture, or
> > > if the MPC82xx ADS code is just a non-functional work in progress.
> >
once my last changes were committed, 82xx was supported and worked fine.
Pretty long time I had no access to the hardware, hence some minor things might require catch-up.



> > I have a bunch of 8xx/82xx changes pending; I hope to get them
> > cleaned up before the merge window ends.
> 
Since I'm the only person covering 8xx/82xx for a while, I definitely want to look at those changes...
> That would be nice. I'll wait for your changes to continue my ppc ->
> powerpc port.
> 
> > > I also noticed that U-Boot doesn't have flatten device tree
> > > support for the MPC82xx family.
> >

At the moment, I have a patch to add such a thing, but no ability to validate it still works. If you guys will assist a little,
I'll go ahead and submit it to the u-boot list.

> > No, but cuImage for 82xx is on its way.
> 
> Ok, nice to know. Adding FDT support to U-Boot for the MPC82xx family
> will be on my todo-list once I get Linux working with cuImage.
> 
> Laurent Pinchart

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: MPC82xx ADS SCC ports initialisation
  2007-07-11 10:34     ` Vitaly Bordug
@ 2007-07-11 13:13       ` Laurent Pinchart
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2007-07-11 13:13 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: linuxppc-embedded

Hi Vitaly,

On Wednesday 11 July 2007 12:34, Vitaly Bordug wrote:
> On Wed, 11 Jul 2007 09:11:18 +0200
>
> Laurent Pinchart wrote:
> > On Tuesday 10 July 2007 20:11, Scott Wood wrote:
> > > On Tue, Jul 10, 2007 at 04:19:51PM +0200, Laurent Pinchart wrote:
> > > > clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 -
> > > > data->clk_tx))); clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038
> > > > << (4 - data->clk_rx))); setbits32(&immap->im_cpmux.cmx_scr,
> > > >           ((data->clk_tx - 1) << (4 - data->clk_tx)));
> > > > setbits32(&immap->im_cpmux.cmx_scr,
> > > >           ((data->clk_rx - 1) << (4 - data->clk_rx)));
> > > >
> > > > The shift right-hand operand doesn't seem to be correct. Could
> > > > anyone confirm this ?
> > >
> > > You are correct; it's broken.
> >
> > That code should be replaced with calls to cpm2_clk_setup
> > (arch/powerpc/sysdev/cpm2_common.c). cpm2_clk_setup currently
> > supports FCC clock setup only, but I've got a patch to add SCC clock
> > setup support. Should I send it ?
>
> If you have functional approach, please feel free to send it...

I haven't been able to test the patch, as I have no ADS hardware to test it 
on. My MPC82xx board is far from being ported to the powerpc architecture. 
I'll send the patch anyway. Could you evaluate it ?

> > > > If my assumption is right, could anyone tell me if the MPC82xx
> > > > processors are actually supported by the powerpc architecture, or
> > > > if the MPC82xx ADS code is just a non-functional work in progress.
>
> once my last changes were committed, 82xx was supported and worked fine.
> Pretty long time I had no access to the hardware, hence some minor things
> might require catch-up.

The above code might have been worked by sheer luck though.

> > > I have a bunch of 8xx/82xx changes pending; I hope to get them
> > > cleaned up before the merge window ends.
>
> Since I'm the only person covering 8xx/82xx for a while, I definitely want
> to look at those changes...
>
> > That would be nice. I'll wait for your changes to continue my ppc ->
> > powerpc port.
> >
> > > > I also noticed that U-Boot doesn't have flatten device tree
> > > > support for the MPC82xx family.
>
> At the moment, I have a patch to add such a thing, but no ability to
> validate it still works. If you guys will assist a little, I'll go ahead
> and submit it to the u-boot list.

I'm ready to help, but I'd like to port my board to the powerpc architecture 
first. FDT support in U-Boot is pretty useless with the ppc architecture.

> > > No, but cuImage for 82xx is on its way.
> >
> > Ok, nice to know. Adding FDT support to U-Boot for the MPC82xx family
> > will be on my todo-list once I get Linux working with cuImage.

Laurent Pinchart

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

* Re: MPC82xx ADS SCC ports initialisation
  2007-07-11  7:11   ` Laurent Pinchart
  2007-07-11 10:34     ` Vitaly Bordug
@ 2007-07-11 15:21     ` Scott Wood
  1 sibling, 0 replies; 6+ messages in thread
From: Scott Wood @ 2007-07-11 15:21 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: vbordug, linuxppc-embedded

Laurent Pinchart wrote:
> That code should be replaced with calls to cpm2_clk_setup 
> (arch/powerpc/sysdev/cpm2_common.c). cpm2_clk_setup currently supports FCC 
> clock setup only, but I've got a patch to add SCC clock setup support. Should 
> I send it ?

It's already done in my working tree; I should have it picked apart into 
postable patches in the next few days.

-Scott

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

end of thread, other threads:[~2007-07-11 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10 14:19 MPC82xx ADS SCC ports initialisation Laurent Pinchart
2007-07-10 18:11 ` Scott Wood
2007-07-11  7:11   ` Laurent Pinchart
2007-07-11 10:34     ` Vitaly Bordug
2007-07-11 13:13       ` Laurent Pinchart
2007-07-11 15:21     ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).