linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* microcodepatch
@ 2001-10-24 18:50 Kári Davíðsson
  2001-10-24 19:02 ` microcodepatch Der Herr Hofrat
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kári Davíðsson @ 2001-10-24 18:50 UTC (permalink / raw)
  To: Linux Embedded ppc (E-mail)


Hi,

Are there any known issues regarding the I2C patch and the ethernet
driver?

If I disable the microcode patch everything works fine, except the I2C
stuff.

I am using the linuxppc_2_4_devel tree ported to our custom board with
ehternet on SCC2.

Regards,

K.D.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: microcodepatch
  2001-10-24 18:50 microcodepatch Kári Davíðsson
@ 2001-10-24 19:02 ` Der Herr Hofrat
  2001-10-24 19:06 ` microcodepatch Peter Desnoyers
  2001-10-24 19:38 ` microcodepatch Dan Malek
  2 siblings, 0 replies; 7+ messages in thread
From: Der Herr Hofrat @ 2001-10-24 19:02 UTC (permalink / raw)
  To: Kári Davíðsson; +Cc: Linux Embedded ppc (E-mail)


>
> Hi,
>
> Are there any known issues regarding the I2C patch and the ethernet
> driver?
>
> If I disable the microcode patch everything works fine, except the I2C
> stuff.
>
> I am using the linuxppc_2_4_devel tree ported to our custom board with
> ehternet on SCC2.
>
> Regards,
>
there might be - the dual-ported RAM of the CPM is quite limited and the micro-code goes in there - might be that the BD's for the SCC/ethernet are overlapping ??

hofrat

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: microcodepatch
  2001-10-24 18:50 microcodepatch Kári Davíðsson
  2001-10-24 19:02 ` microcodepatch Der Herr Hofrat
@ 2001-10-24 19:06 ` Peter Desnoyers
  2001-10-24 19:38 ` microcodepatch Dan Malek
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Desnoyers @ 2001-10-24 19:06 UTC (permalink / raw)
  To: Kári Davíðsson; +Cc: Linux Embedded ppc (E-mail)

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

The I2C driver doesn't work properly with the microcode patch - it
initializes tbptr and rbptr to 0, not r_tbase and r_rbase, and it uses
the INIT_TRX command (which the patched code doesn't support) instead of
separate INIT_RX and INIT_TX.

You might want to try the attached minor patch, which works for us.

--
.....................................................................
 Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
 Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
 100 Hayden Ave, Lexington MA 02421

[-- Attachment #2: i2c-ucode.diff --]
[-- Type: text/plain, Size: 1071 bytes --]

Index: i2c-algo-8xx.c
===================================================================
RCS file: /src/cvs/hardhat/devkit/lsp/motorola-mbx860/linux-2.4.2_hhl20/drivers/i2c/i2c-algo-8xx.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- i2c-algo-8xx.c	2001/07/24 17:23:38	1.1.1.1
+++ i2c-algo-8xx.c	2001/10/01 19:08:20	1.2
@@ -99,8 +99,12 @@
 		volatile cpm8xx_t *cp = cpm_adap->cp;

 		cp->cp_cpcr =
-			mk_cr_cmd(CPM_CR_CH_I2C, CPM_CR_INIT_TRX) | CPM_CR_FLG;
+			mk_cr_cmd(CPM_CR_CH_I2C, CPM_CR_INIT_RX) | CPM_CR_FLG;
 		while (cp->cp_cpcr & CPM_CR_FLG);
+
+		cp->cp_cpcr =
+			mk_cr_cmd(CPM_CR_CH_I2C, CPM_CR_INIT_TX) | CPM_CR_FLG;
+		while (cp->cp_cpcr & CPM_CR_FLG);
 	}

 	/* Select an arbitrary address.  Just make sure it is unique.
@@ -151,12 +155,12 @@

 	iip->iic_rstate = 0;
 	iip->iic_rdp = 0;
-	iip->iic_rbptr = 0;
+	iip->iic_rbptr = r_rbase;
 	iip->iic_rbc = 0;
 	iip->iic_rxtmp = 0;
 	iip->iic_tstate = 0;
 	iip->iic_tdp = 0;
-	iip->iic_tbptr = 0;
+	iip->iic_tbptr = r_tbase;
 	iip->iic_tbc = 0;
 	iip->iic_txtmp = 0;
 }

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

* Re: microcodepatch
  2001-10-24 18:50 microcodepatch Kári Davíðsson
  2001-10-24 19:02 ` microcodepatch Der Herr Hofrat
  2001-10-24 19:06 ` microcodepatch Peter Desnoyers
@ 2001-10-24 19:38 ` Dan Malek
  2 siblings, 0 replies; 7+ messages in thread
From: Dan Malek @ 2001-10-24 19:38 UTC (permalink / raw)
  To: Kári Davíðsson; +Cc: Linux Embedded ppc (E-mail)


Kári Davíðsson wrote:

> Are there any known issues regarding the I2C patch and the ethernet
> driver?

You need to ensure the patch is suitable for the CPM on the processor
you have.  I know the USB SOF patch works on the 823/850 Rev. B processors,
but I don't remember where the others came from.  You should probably
visit Motorola's web site and get the patch specific to your processor
and update the microcode patch file.

> If I disable the microcode patch everything works fine, except the I2C
> stuff.

Depending upon the application, sometimes it is easier and faster to
simply use the software toggle agorithm on the pins rather than the
CPM controller.


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: microcodepatch
@ 2001-10-25  8:45 Kári Davíðsson
  0 siblings, 0 replies; 7+ messages in thread
From: Kári Davíðsson @ 2001-10-25  8:45 UTC (permalink / raw)
  To: Der Herr Hofrat; +Cc: Linux Embedded ppc (E-mail)


> -----Original Message-----
> From: Der Herr Hofrat [mailto:der.herr@hofr.at]
> Sent: 24. október 2001 19:02
> To: Kári Davíðsson
> Cc: Linux Embedded ppc (E-mail)
> Subject: Re: microcodepatch
>
>
>
> >
> > Hi,
> >
> > Are there any known issues regarding the I2C patch and the ethernet
> > driver?
> >
> > If I disable the microcode patch everything works fine,
> except the I2C
> > stuff.
> >
> > I am using the linuxppc_2_4_devel tree ported to our custom
> board with
> > ehternet on SCC2.
> >
> > Regards,
> >
> there might be - the dual-ported RAM of the CPM is quite
> limited and the micro-code goes in there - might be that the
> BD's for the SCC/ethernet are overlapping ??

The code seem to take care of that, i.e. using only the part of
dual-ported ram for BD's that is "never" overlapped.

K.D.
>
> hofrat
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: microcodepatch
@ 2001-10-25  8:47 Kári Davíðsson
  0 siblings, 0 replies; 7+ messages in thread
From: Kári Davíðsson @ 2001-10-25  8:47 UTC (permalink / raw)
  To: Peter Desnoyers; +Cc: Linux Embedded ppc (E-mail)


I will apply this patch.
But the ethernet is crashing before I install the I2C driver.
(The I2C driver is compiled as a module).

K.D.

> -----Original Message-----
> From: Peter Desnoyers [mailto:pdesnoyers@chinook.com]
> Sent: 24. október 2001 19:07
> To: Kári Davíðsson
> Cc: Linux Embedded ppc (E-mail)
> Subject: Re: microcodepatch
>
>
> The I2C driver doesn't work properly with the microcode patch - it
> initializes tbptr and rbptr to 0, not r_tbase and r_rbase, and it uses
> the INIT_TRX command (which the patched code doesn't support)
> instead of
> separate INIT_RX and INIT_TX.
>
> You might want to try the attached minor patch, which works for us.
>
> --
> .....................................................................
>  Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
>  Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
>  100 Hayden Ave, Lexington MA 02421
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: microcodepatch
@ 2001-10-25  9:27 Kári Davíðsson
  0 siblings, 0 replies; 7+ messages in thread
From: Kári Davíðsson @ 2001-10-25  9:27 UTC (permalink / raw)
  To: Dan Malek; +Cc: Linux Embedded ppc (E-mail)


Hi,

Indeed the microcode patch seemd to be different, but even though I use
the
I2C 823 patch downloaded from the mot.com site. Everything behaves the
same
untill I compile the I2C support code into the kernel then the network
does
not crash the kernel.

K.D.

> -----Original Message-----
> From: Dan Malek [mailto:dan@mvista.com]
> Sent: 24. október 2001 19:38
> To: Kári Davíðsson
> Cc: Linux Embedded ppc (E-mail)
> Subject: Re: microcodepatch
>
>
> Kári Davíðsson wrote:
>
> > Are there any known issues regarding the I2C patch and the ethernet
> > driver?
>
> You need to ensure the patch is suitable for the CPM on the processor
> you have.  I know the USB SOF patch works on the 823/850 Rev.
> B processors,
> but I don't remember where the others came from.  You should probably
> visit Motorola's web site and get the patch specific to your processor
> and update the microcode patch file.
>
> > If I disable the microcode patch everything works fine,
> except the I2C
> > stuff.
>
> Depending upon the application, sometimes it is easier and faster to
> simply use the software toggle agorithm on the pins rather than the
> CPM controller.
>
>
> 	-- Dan
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2001-10-25  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-24 18:50 microcodepatch Kári Davíðsson
2001-10-24 19:02 ` microcodepatch Der Herr Hofrat
2001-10-24 19:06 ` microcodepatch Peter Desnoyers
2001-10-24 19:38 ` microcodepatch Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2001-10-25  8:45 microcodepatch Kári Davíðsson
2001-10-25  8:47 microcodepatch Kári Davíðsson
2001-10-25  9:27 microcodepatch Kári Davíðsson

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).