can the 8xx patch configuration be made more comprehensible?

2004-07-21 Thread Robert P. J. Day

   i imagine it's just me, but i find the configuration process of
selecting possible patches for 8xx a bit confusing under the 2.6
kernel.

   under MPC8xx CPM Options, there's a single option for patches:

[ ] I2C/SPI Microcode Patch

seems simple enough, although the help screen muddies the waters
somewhat:

CONFIG_UCODE_PATCH:

Motorola releases microcode updates for their 8xx CPM modules.  The
microcode update file has updates for IIC, SMC and USB.  Currently
only the USB update is available by default, if the MPC8xx USB option
is enabled.  If in doubt, say 'N' here.

   so, suddenly, a patch labelled as for I2C and SPI is described as
also affecting SMC and USB (but only if you selected USB in the first
place.  and where went SPI?)

   and if you look inside micropatch.c, you notice that the only way to
get the SMC patch (whatever that does) is not to have selected it at
config time, but to manually edit this file and define USE_SMC_PATCH
(which requires you to apparently edit the uart driver as well).

   does it really have to be this painful?  a number of simple
questions:

* how many patches are there?
* which ones can be selected independently from the others?  and can
   they be made separate selections in the config menu?  (does it even
   make sense to select only some of the possible patches?)
* and can they be documented so the builder knows what the purpose of
   the patch is?
* and can the SMC patch be moved out of the source file and made a
   config-time selection along with the others (might be difficult
   given the necessity of editing the uart driver file).

anyway, you get the idea.

rday

p.s.  i notice in micropatch.c the preprocessor test:

#ifdef USE_IIC_PATCH
#define PATCH_DEFINED
 /* IIC/SPI */
uint patch_2000[] = {
 0x7FFFEFD9,
...

i have no idea where the macro USE_IIC_PATCH is defined, if anywhere.
and, trust me, i've looked.  is this dead code?

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





can the 8xx patch configuration be made more comprehensible?

2004-07-21 Thread Wolfgang Denk

In message Pine.LNX.4.60.0407210807460.4518 at dell.enoriver.com you wrote:

does it really have to be this painful?  a number of simple
 questions:

 * how many patches are there?

There are least 3 that are relevant here:

- MPC850 microcode patch for relocating I2C/SPI parameters.
- MPC860 microcode patch for relocating I2C/SPI parameters
  (to be used with MPC823, MPC855, ... as well; yes, here the
  823 is NOT in the same group as the 850)
- MPC823 (and 850?) patch for automatic USB start-of-frame (SOF)
  token generation

 * which ones can be selected independently from the others?  and can
they be made separate selections in the config menu?  (does it even
make sense to select only some of the possible patches?)

Depending on the  processor  model  and  requirements  you  may  need
patches 1, 1+3, 2, 2+3, or 3.

 * and can they be documented so the builder knows what the purpose of
the patch is?

They can (like in our CVS tree :-)

 * and can the SMC patch be moved out of the source file and made a
config-time selection along with the others (might be difficult
given the necessity of editing the uart driver file).

Of course this can be done.

 anyway, you get the idea.

How about submitting a patch?

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
No one wants war.
-- Kirk, Errand of Mercy, stardate 3201.7

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





can the 8xx patch configuration be made more comprehensible?

2004-07-21 Thread Robert P. J. Day

On Wed, 21 Jul 2004, Wolfgang Denk wrote:

 There are least 3 that are relevant here:

 - MPC850 microcode patch for relocating I2C/SPI parameters.
 - MPC860 microcode patch for relocating I2C/SPI parameters

   i can see that, in the 2.6 arch/ppc/8xx_io/micropatch.c file, there
is a test for the macro USE_IIC_PATCH.  now, back in wolfgang's 2.4.25
source tree, that macro is defined in include/asm-ppc/commproc.h
thusly:

#ifdef CONFIG_UCODE_PATCH
# define USE_IIC_PATCH
#else
# undef  USE_IIC_PATCH
#endif

   however, in the 2.6 tree, i see nowhere that that macro could
possibly be set, so it seems that any tests for USE_IIC_PATCH in the
2.6 tree are irrelevant, no?

rday

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