Re: [RFC/POWERPC] mpc5200: remove mpc5200b-* from compatible lists in dts files

2008-04-19 Thread Segher Boessenkool
The mpc5200b is a bug fix of the mpc5200 with a few incompatible 
changes.
By rights, the current dts trees are the most correct, but in 
practical

purposes there is no value in the 5200b devices having 2 compatible
entries for each internal peripheral node.  Freescale has done a good 
job

of documenting exactly where the incompatibilities lie, so it restrict
the extra compatible properties to devices with *documented* changes.


And what happens when later an undocumented change is found?  The
device tree should always list the exact version of device used, even
if all clients (i.e., the Linux kernel) only use the less-specific
compatible value; that way, if a need to distinguish arises later
(e.g., a model-specific bug workaround), a client can detect the exact
model of device without needing a new device tree (that the client in
general has no control over).


Removing the extra 'b' fields makes the device trees smaller


That's nice in general, but it hardly overrides more serious concerns.


Segher

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [RFC/POWERPC] mpc5200: remove mpc5200b-* from compatible lists in dts files

2008-04-19 Thread Grant Likely
On Sat, Apr 19, 2008 at 3:23 AM, Segher Boessenkool
[EMAIL PROTECTED] wrote:

  The mpc5200b is a bug fix of the mpc5200 with a few incompatible changes.
  By rights, the current dts trees are the most correct, but in practical
  purposes there is no value in the 5200b devices having 2 compatible
  entries for each internal peripheral node.  Freescale has done a good job
  of documenting exactly where the incompatibilities lie, so it restrict
  the extra compatible properties to devices with *documented* changes.
 

  And what happens when later an undocumented change is found?  The
  device tree should always list the exact version of device used, even
  if all clients (i.e., the Linux kernel) only use the less-specific
  compatible value; that way, if a need to distinguish arises later
  (e.g., a model-specific bug workaround), a client can detect the exact
  model of device without needing a new device tree (that the client in
  general has no control over).

Yes, I fully agree and understand that.  However, even that doesn't
fully solve the problem.  At what level do you stop trying to describe
the device versions in the device tree?  What about the case where an
earlier silicon version has an undocumented errata?  At some point,
compatible doesn't help us and we need to resort to looking at other
factors (like PVR/SVR) to determine what the device really is.

Early on I decided to differentiate between the 5200 and the 5200b;
however, from a practical sense they really are the same part and
there is no practical advantage to differentiating between them.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[RFC/POWERPC] mpc5200: remove mpc5200b-* from compatible lists in dts files

2008-04-18 Thread Grant Likely
From: Grant Likely [EMAIL PROTECTED]

The mpc5200b is a bug fix of the mpc5200 with a few incompatible changes.
By rights, the current dts trees are the most correct, but in practical
purposes there is no value in the 5200b devices having 2 compatible
entries for each internal peripheral node.  Freescale has done a good job
of documenting exactly where the incompatibilities lie, so it restrict
the extra compatible properties to devices with *documented* changes.

Removing the extra 'b' fields makes the device trees smaller
---

 arch/powerpc/boot/dts/cm5200.dts|   48 +
 arch/powerpc/boot/dts/lite5200b.dts |   66 ++-
 arch/powerpc/boot/dts/motionpro.dts |   50 +--
 arch/powerpc/kernel/prom_init.c |2 +
 drivers/net/fec_mpc52xx_phy.c   |2 +
 5 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 2f74cc4..5f929c3 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -43,14 +43,14 @@
[EMAIL PROTECTED] {
#address-cells = 1;
#size-cells = 1;
-   compatible = fsl,mpc5200b-immr;
+   compatible = fsl,mpc5200-immr;
ranges = 0 0xf000 0xc000;
reg = 0xf000 0x0100;
bus-frequency = 0;// from bootloader
system-frequency = 0; // from bootloader
 
[EMAIL PROTECTED] {
-   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   compatible = fsl,mpc5200-cdm;
reg = 0x200 0x38;
};
 
@@ -58,12 +58,12 @@
// 5200 interrupts are encoded into two levels;
interrupt-controller;
#interrupt-cells = 3;
-   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   compatible = fsl,mpc5200-pic;
reg = 0x500 0x80;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x600 0x10;
interrupts = 1 9 0;
interrupt-parent = mpc5200_pic;
@@ -71,91 +71,91 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x610 0x10;
interrupts = 1 10 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x620 0x10;
interrupts = 1 11 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x630 0x10;
interrupts = 1 12 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x640 0x10;
interrupts = 1 13 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x650 0x10;
interrupts = 1 14 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x660 0x10;
interrupts = 1 15 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   compatible = fsl,mpc5200-gpt;
reg = 0x670 0x10;
interrupts = 1 16 0;
interrupt-parent = mpc5200_pic;
};
 
[EMAIL