Skip to contentSkip to conversation

85xx: add board support for the TQM8548 modules

PATCH Superseded Wolfgang Grandegger 2 participants 5 messages Jun 5, 2008 – Jun 6, 2008

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/4 85xx: add board support for the TQM8548 modules

This patch adds support for the TQM8548 modules from TQ-Components GmbH (http://www.tqc.de).

---
 arch/powerpc/boot/Makefile                  |    1 
 arch/powerpc/boot/dts/tqm8548.dts           |  365 +++++++++
 arch/powerpc/boot/wrapper                   |    2 
 arch/powerpc/configs/85xx/tqm8548_defconfig | 1094 ++++++++++++++++++++++++++++
 arch/powerpc/platforms/85xx/Kconfig         |    8 
 arch/powerpc/platforms/85xx/tqm85xx.c       |   15 
 6 files changed, 1482 insertions(+), 3 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/tqm8548.dts
 create mode 100644 arch/powerpc/configs/85xx/tqm8548_defconfig
arch/powerpc/boot/Makefile +1 -0
Index: linux-2.6-galak/arch/powerpc/boot/Makefile
===================================================================
@@ -255,6 +255,7 @@ image-$(CONFIG_MPC85xx_DS)		+= cuImage.m
 					   cuImage.mpc8572ds
 image-$(CONFIG_TQM8540)			+= cuImage.tqm8540
 image-$(CONFIG_TQM8541)			+= cuImage.tqm8541
+image-$(CONFIG_TQM8548)			+= cuImage.tqm8548
 image-$(CONFIG_TQM8555)			+= cuImage.tqm8555
 image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
 image-$(CONFIG_SBC8548)			+= cuImage.sbc8548
arch/powerpc/boot/dts/tqm8548.dts new file +365 -0

365 lines not on this page · raw message

arch/powerpc/boot/wrapper +1 -1
Index: linux-2.6-galak/arch/powerpc/boot/wrapper
===================================================================
@@ -177,7 +177,7 @@ cuboot*)
     *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*)
         platformo=$object/cuboot-85xx-cpm2.o
         ;;
-    *-mpc85*|*-tqm8540|*-sbc85*)
+    *-mpc85*|*-tqm85*|*-sbc85*)
         platformo=$object/cuboot-85xx.o
         ;;
     esac
arch/powerpc/configs/85xx/tqm8548_defconfig new file +1094 -0

1,094 lines not on this page · raw message

arch/powerpc/platforms/85xx/Kconfig +8 -0
Index: linux-2.6-galak/arch/powerpc/platforms/85xx/Kconfig
===================================================================
@@ -74,6 +74,14 @@ config TQM8541
 	select TQM85xx
 	select CPM2
 
+config TQM8548
+	bool "TQ Components TQM8548"
+	help
+	  This option enables support for the TQ Components TQM8548 board.
+	select DEFAULT_UIMAGE
+	select PPC_CPM_NEW_BINDING
+	select TQM85xx
+
 config TQM8555
 	bool "TQ Components TQM8555"
 	help
arch/powerpc/platforms/85xx/tqm85xx.c +13 -2
Index: linux-2.6-galak/arch/powerpc/platforms/85xx/tqm85xx.c
===================================================================
@@ -120,8 +120,18 @@ static void __init tqm85xx_setup_arch(vo
 #endif
 
 #ifdef CONFIG_PCI
-	for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
-		fsl_add_bridge(np, 1);
+	for_each_node_by_type(np, "pci") {
+		if (of_device_is_compatible(np, "fsl,mpc8540-pci") ||
+		    of_device_is_compatible(np, "fsl,mpc8548-pcie")) {
+			struct resource rsrc;
+			if (!of_address_to_resource(np, 0, &rsrc)) {
+				if ((rsrc.start & 0xfffff) == 0x8000)
+					fsl_add_bridge(np, 1);
+				else
+					fsl_add_bridge(np, 0);
+			}
+		}
+	}
 #endif
 }
 
@@ -167,6 +177,7 @@ static int __init tqm85xx_probe(void)
 
 	if ((of_flat_dt_is_compatible(root, "tqc,8540")) ||
 	    (of_flat_dt_is_compatible(root, "tqc,8541")) ||
+	    (of_flat_dt_is_compatible(root, "tqc,8548")) ||
 	    (of_flat_dt_is_compatible(root, "tqc,8555")) ||
 	    (of_flat_dt_is_compatible(root, "tqc,8560")))
 		return 1;
#1 lore raw

arch/powerpc/boot/dts/tqm8548.dts line 51

Quoted 10 lines

===================================================================

arch/powerpc/boot/dts/tqm8548.dts new file +4 -0
 
 
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x20000000>;
+	};

is memory fixed on this board to 256M?

just let me know and I can fix when I commit it.

- k

#2 lore raw
Quoted 6 lines · Kumar Gala
Quoted 5 lines

===================================================================

arch/powerpc/boot/dts/tqm8548.dts new file +0 -0
Quoted 6 lines

arch/powerpc/boot/dts/tqm8548.dts line 51

Quoted 4 lines
arch/powerpc/boot/dts/tqm8548.dts new file +4 -0
+    memory {
+        device_type = "memory";
+        reg = <0x00000000 0x20000000>;
+    };

is memory fixed on this board to 256M?

Ah, no, actually I have a module with 512 MB but it can be ordered with less or more memory like the other TQM85xx modules as well. Does U-Boot fixup this value? Is it used by Linux?

Quoted 1 line

just let me know and I can fix when I commit it.

That would be great... thanks.

Wolfgang.

#3 lore raw
Quoted 12 lines · Wolfgang Grandegger
Quoted 11 lines · Kumar Gala
Quoted 10 lines

===================================================================

arch/powerpc/boot/dts/tqm8548.dts new file +4 -0
 
 
+    memory {
+        device_type = "memory";
+        reg = <0x00000000 0x20000000>;
+    };
Quoted 5 lines
Quoted 1 line

is memory fixed on this board to 256M?

Ah, no, actually I have a module with 512 MB but it can be ordered with less or more memory like the other TQM85xx modules as well. Does U-Boot fixup this value? Is it used by Linux?

if u-boot determines the memory it will update this properly. Linux expects this to be set to know how much mem is in the system.

if you can try setting the 2nd value to 0x0 and see if it boots that will let me know if its safe for me to change.

- k

#4 lore raw
Quoted 21 lines · Kumar Gala
Quoted 12 lines · Wolfgang Grandegger
Quoted 11 lines · Kumar Gala
Quoted 10 lines

===================================================================

arch/powerpc/boot/dts/tqm8548.dts new file +4 -0
 
 
+    memory {
+        device_type = "memory";
+        reg = <0x00000000 0x20000000>;
+    };
Quoted 5 lines
Quoted 1 line

is memory fixed on this board to 256M?

Ah, no, actually I have a module with 512 MB but it can be ordered with less or more memory like the other TQM85xx modules as well. Does U-Boot fixup this value? Is it used by Linux?

Quoted 5 lines

if u-boot determines the memory it will update this properly. Linux expects this to be set to know how much mem is in the system.

if you can try setting the 2nd value to 0x0 and see if it boots that will let me know if its safe for me to change.

It works with

	memory {
		device_type = "memory";
		reg = <0x00000000 0x00000000>;	// size filled by U-Boot
	};

as well. With my previous definition Linux came up with 512 MB of memory as well and it was already obvious, that U-Boot fills in the right size value.

Wolfgang.