85xx: add board support for the TQM8548 modules
Subsystems (3)
PATCH v2 1/4 85xx: add board support for the TQM8548 modules
[POWERPC] 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 | 368 +++++++++ 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, 1485 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
@@ -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 +368 -0
368 lines not on this page · raw message
arch/powerpc/boot/wrapper +1 -1
@@ -177,7 +177,7 @@ cuboot*) *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) platformo=$object/cuboot-85xx-cpm2.o ;; - *-mpc85*|*-tqm8540|*-sbc85*) + *-mpc85*|*-tqm8540|*-tqm8548|*-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
@@ -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
@@ -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,"tqm,8540" )) || (of_flat_dt_is_compatible (root,"tqm,8541" )) || + (of_flat_dt_is_compatible (root,"tqm,8548" )) || (of_flat_dt_is_compatible (root,"tqm,8555" )) || (of_flat_dt_is_compatible (root,"tqm,8560" )))return 1 ;
Quoted 76 lines · Wolfgang Grandegger
[POWERPC] 85xx: add board support for the TQM8548 modules
This patch adds support for the TQM8548 modules from TQ-Components GmbH (http://www.tqc.de).
Signed-off-by Wolfgang Grandegger <[email protected]>---
arch/powerpc/boot/Makefile | 1 arch/powerpc/boot/dts/tqm8548.dts | 368 +++++++++ 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, 1485 insertions(+), 3 deletions(-)create mode 100644
arch/powerpc/boot/dts/tqm8548.dtscreate mode 100644arch/powerpc/configs/85xx/tqm8548_defconfigIndex: linux-2.6-galak/arch/powerpc/boot/Makefile
===================================================================arch/powerpc/boot/Makefile +0
-0@@ -255,6 +255,7 @@ image-$(CONFIG_MPC85xx_DS) += cuImage.m cuImage.mpc8572dsimage-$(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
Index:linux-2.6-galak/arch/powerpc/boot/dts/tqm8548.dts
===================================================================arch/powerpc/boot/dts/tqm8548.dts new file +7
-0@@ -0,0 +1,368 @@ +/* + * TQM8548 Device Tree Source + * + * Copyright 2006 Freescale Semiconductor Inc. + * Copyright 2008 Wolfgang Grandegger <[email protected]> + * + * This program is free software; you can redistribute it and/ormodify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */arch/powerpc/boot/dts/tqm8548.dts new file +27
-0+ +/dts-v1/; + +/ { + model = "tqm,8548"; + compatible = "tqm,8548", "tqm,85xx"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + ethernet2 = &enet2; + ethernet3 = &enet3; + + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + pci1 = &pci1; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,8548@0 { + device_type = "cpu";
arch/powerpc/boot/dts/tqm8548.dts line 46
Quoted 10 lines
arch/powerpc/boot/dts/tqm8548.dts new file +8
-0+ reg = <0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x8000>; // L1, 32K + i-cache-size = <0x8000>; // L1, 32K + timebase-frequency = <0>; // from U-Boot + bus-frequency = <0>; // from U-Boot + clock-frequency = <0>; // from U-Boot
u-boot will add this for us so no need for them.
Quoted 10 lines
arch/powerpc/boot/dts/tqm8548.dts new file +9
-0+ next-level-cache = <&L2>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; +
arch/powerpc/boot/dts/tqm8548.dts line 65
Quoted 10 lines
arch/powerpc/boot/dts/tqm8548.dts new file +10
-0+ soc8548@e0000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + ranges = <0x0 0xe0000000 0x100000>; + reg = <0xe0000000 0x1000>; // CCSRBAR + bus-frequency = <0>; + + memory-controller@2000 { + compatible = "fsl,8548-memory-controller";
Can you make this fsl,mpc8548...
I need to fix all the other device trees
arch/powerpc/boot/dts/tqm8548.dts line 72
Quoted 8 lines
arch/powerpc/boot/dts/tqm8548.dts new file +7
-0+ reg = <0x2000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <18 2>; + }; + + L2: l2-cache-controller@20000 { + compatible = "fsl,8548-l2-cache-controller";
Can you make this fsl,mpc8548
Quoted 302 lines
arch/powerpc/boot/dts/tqm8548.dts new file +296
-0+ reg = <0x20000 0x1000>; + cache-line-size = <32>; // 32 bytes + cache-size = <0x80000>; // L2, 512K + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + + i2c@3000 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl-i2c"; + reg = <0x3000 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + i2c@3100 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <1>; + compatible = "fsl-i2c"; + reg = <0x3100 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + mdio@24520 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,gianfar-mdio"; + reg = <0x24520 0x20>; + + phy1: ethernet-phy@0 { + interrupt-parent = <&mpic>; + interrupts = <8 1>; + reg = <1>; + device_type = "ethernet-phy"; + }; + phy2: ethernet-phy@1 { + interrupt-parent = <&mpic>; + interrupts = <8 1>; + reg = <2>; + device_type = "ethernet-phy"; + }; + phy3: ethernet-phy@3 { + interrupt-parent = <&mpic>; + interrupts = <8 1>; + reg = <3>; + device_type = "ethernet-phy"; + }; + phy4: ethernet-phy@4 { + interrupt-parent = <&mpic>; + interrupts = <8 1>; + reg = <4>; + device_type = "ethernet-phy"; + }; + phy5: ethernet-phy@5 { + interrupt-parent = <&mpic>; + interrupts = <8 1>; + reg = <5>; + device_type = "ethernet-phy"; + }; + }; + + enet0: ethernet@24000 { + cell-index = <0>; + device_type = "network"; + model = "eTSEC"; + compatible = "gianfar"; + reg = <0x24000 0x1000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <29 2 30 2 34 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy2>; + }; + + enet1: ethernet@25000 { + cell-index = <1>; + device_type = "network"; + model = "eTSEC"; + compatible = "gianfar"; + reg = <0x25000 0x1000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <35 2 36 2 40 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy1>; + }; + + enet2: ethernet@26000 { + cell-index = <2>; + device_type = "network"; + model = "eTSEC"; + compatible = "gianfar"; + reg = <0x26000 0x1000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <31 2 32 2 33 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy3>; + }; + + enet3: ethernet@27000 { + cell-index = <3>; + device_type = "network"; + model = "eTSEC"; + compatible = "gianfar"; + reg = <0x27000 0x1000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <37 2 38 2 39 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy4>; + }; + + serial0: serial@4500 { + cell-index = <0>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x4500 0x100>; // reg base, size + clock-frequency = <0>; // should we fill in in uboot? + current-speed = <115200>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + serial1: serial@4600 { + cell-index = <1>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x4600 0x100>; // reg base, size + clock-frequency = <0>; // should we fill in in uboot? + current-speed = <115200>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + global-utilities@e0000 { // global utilities reg + compatible = "fsl,mpc8548-guts"; + reg = <0xe0000 0x1000>; + fsl,has-rstcr; + }; + + mpic: pic@40000 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + reg = <0x40000 0x40000>; + compatible = "chrp,open-pic"; + device_type = "open-pic"; + }; + }; + + localbus@e0005000 { + compatible = "fsl,mpc8548-localbus", "fsl,pq3-localbus", + "simple-bus"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0xe0005000 0x100>; // BRx, ORx, etc. + + ranges = < + 0 0x0 0xfc000000 0x04000000 // NOR FLASH bank 1 + 1 0x0 0xf8000000 0x08000000 // NOR FLASH bank 0 + 2 0x0 0xe3000000 0x00008000 // CAN (2 x i82527) + 3 0x0 0xe3010000 0x00008000 // NAND FLASH + + >; + + flash@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <1 0x0 0x8000000>; + bank-width = <4>; + device-width = <1>; + + partition@0 { + label = "kernel"; + reg = <0x00000000 0x00200000>; + }; + partition@200000 { + label = "root"; + reg = <0x00200000 0x00300000>; + }; + partition@500000 { + label = "user"; + reg = <0x00500000 0x07a00000>; + }; + partition@7f00000 { + label = "env1"; + reg = <0x07f00000 0x00040000>; + }; + partition@7f40000 { + label = "env2"; + reg = <0x07f40000 0x00040000>; + }; + partition@7f80000 { + label = "u-boot"; + reg = <0x07f80000 0x00080000>; + read-only; + }; + }; + + /* Note: CAN support needs be enabled in U-Boot */ + can0@2,0 { + compatible = "intel,82527"; // Bosch CC770 + reg = <2 0x0 0x100>; + interrupts = <4 0>; + interrupt-parent = <&mpic>; + }; + + can1@2,100 { + compatible = "intel,82527"; // Bosch CC770 + reg = <2 0x100 0x100>; + interrupts = <4 0>; + interrupt-parent = <&mpic>; + }; + + /* Note: NAND support needs to be enabled in U-Boot */ + upm@3,0 { + #address-cells = <0>; + #size-cells = <0>; + compatible = "fsl,upm-nand"; + reg = <3 0x0 0x800>; + fsl,upm-addr-offset = <0x10>; + fsl,upm-cmd-offset = <0x08>; + chip-delay = <30>; // in micro-seconds + + nand@0 { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "fs"; + reg = <0x00000000 0x01000000>; + }; + }; + }; + }; + + pci0: pci@e0008000 { + cell-index = <0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; + device_type = "pci"; + reg = <0xe0008000 0x1000>; + clock-frequency = <33333333>; + interrupt-map-mask = <0xf800 0x0 0x0 0x7>; + interrupt-map = < + /* IDSEL 28 */ + 0xe000 0 0 1 &mpic 2 1 + 0xe000 0 0 2 &mpic 3 1>; + + interrupt-parent = <&mpic>; + interrupts = <24 2>; + bus-range = <0 0>; + ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000 + 0x01000000 0 0x00000000 0xe2000000 0 0x01000000>; + }; + + pci1: pcie@e000a000 { + cell-index = <2>; + interrupt-map-mask = <0xf800 0x0 0x0 0x7>; + interrupt-map = < + /* IDSEL 0x0 (PEX) */ + 0x00000 0 0 1 &mpic 0 1 + 0x00000 0 0 2 &mpic 1 1 + 0x00000 0 0 3 &mpic 2 1 + 0x00000 0 0 4 &mpic 3 1>; + + interrupt-parent = <&mpic>; + interrupts = <26 2>; + bus-range = <0 0xff>; + ranges = <0x02000000 0 0xc0000000 0xc0000000 0 0x20000000 + 0x01000000 0 0x00000000 0xef000000 0 0x08000000>; + clock-frequency = <33333333>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + reg = <0xe000a000 0x1000>; + compatible = "fsl,mpc8548-pcie"; + device_type = "pci"; + pcie@0 { + reg = <0 0 0 0 0>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + ranges = <0x02000000 0 0xc0000000 0x02000000 0 + 0xc0000000 0 0x20000000 + 0x01000000 0 0x00000000 0x01000000 0 + 0x00000000 0 0x08000000>; + }; + }; +};Index: linux-2.6-galak/arch/powerpc/boot/wrapper
===================================================================
arch/powerpc/boot/wrapper cuboot*) · line 180
Quoted 5 lines
arch/powerpc/boot/wrapper +1
-1@@ -177,7 +177,7 @@ cuboot*) *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) platformo=$object/cuboot-85xx-cpm2.o ;; - *-mpc85*|*-tqm8540|*-sbc85*) + *-mpc85*|*-tqm8540|*-tqm8548|*-sbc85*)
why not just *-tqm85*
arch/powerpc/boot/wrapper cuboot*) · line 183
Quoted 4 lines
arch/powerpc/boot/wrapper +0
-0platformo=$object/cuboot-85xx.o ;; esac
- k
Quoted 9 lines · Kumar Gala
Quoted 6 lines · Wolfgang Grandegger
[POWERPC] 85xx: add board support for the TQM8548 modules
This patch adds support for the TQM8548 modules from TQ-Components GmbH (http://www.tqc.de).
Signed-off-by Wolfgang Grandegger <[email protected]>
[...deletions...]
Quoted 11 lines
arch/powerpc/boot/wrapper cuboot*) · line 180
Quoted 9 lines
===================================================================
arch/powerpc/boot/wrapper +1
-1@@ -177,7 +177,7 @@ cuboot*) *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) platformo=$object/cuboot-85xx-cpm2.o ;; - *-mpc85*|*-tqm8540|*-sbc85*) + *-mpc85*|*-tqm8540|*-tqm8548|*-sbc85*)why not just *-tqm85*
Hm, yes, *-tqm85* should cover all TQM85xx without CPM.
I just sent out v3 patches addressing this and all other issues. Hope they are OK now.
Wolfgang.
Quoted 2 lines · Kumar Gala
On Jun 5, 2008, at 4:05 AM, Wolfgang Grandegger wrote:
[snip]
Quoted 5 lines
arch/powerpc/boot/dts/tqm8548.dts line 46
Quoted 3 lines
arch/powerpc/boot/dts/tqm8548.dts new file +3
-0+ timebase-frequency = <0>; // from U-Boot + bus-frequency = <0>; // from U-Boot + clock-frequency = <0>; // from U-Bootu-boot will add this for us so no need for them.
I think it's worth including them (with the comments) for documentation purposes though. Plus allowing the bootloader and bootwrapper to just replace property values without resizing or inserting is somewhat worthwhile of itself.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 8 lines · David Gibson
Quoted 1 line · Kumar Gala
On Jun 5, 2008, at 4:05 AM, Wolfgang Grandegger wrote:
[snip]
Quoted 4 lines
arch/powerpc/boot/dts/tqm8548.dts line 46
Quoted 3 lines
arch/powerpc/boot/dts/tqm8548.dts new file +3
-0+ timebase-frequency = <0>; // from U-Boot + bus-frequency = <0>; // from U-Boot + clock-frequency = <0>; // from U-Bootu-boot will add this for us so no need for them.
Quoted 4 lines
I think it's worth including them (with the comments) for documentation purposes though. Plus allowing the bootloader and bootwrapper to just replace property values without resizing or inserting is somewhat worthwhile of itself.
I understand your point and while testing the new blob, I realized that
the DTB image created with
$ make ARCH=powerpc tqm8548.dtb
does not work because work space is missing:
## Flattened Device Tree blob at 00900000
Booting using the fdt blob at 0x900000
Loading Device Tree to 007fe000, end 007ff8e0 ... OK WARNING: could not create /chosen FDT_ERR_NOSPACE.
ERROR: /chosen node create failed - must RESET the board to recover.
As I see it, I have to define DTS_FLAGS manually
$ export DTS_FLAGS="-R4 -S0x3000" $ make ARCH=powerpc tqm8548.dtb
to get a working blob. Is that the intended behavior?
Wolfgang.
Quoted 27 lines · Wolfgang Grandegger
Quoted 8 lines · David Gibson
Quoted 1 line · Kumar Gala
On Jun 5, 2008, at 4:05 AM, Wolfgang Grandegger wrote:
[snip]
Quoted 4 lines
arch/powerpc/boot/dts/tqm8548.dts line 46
Quoted 3 lines
arch/powerpc/boot/dts/tqm8548.dts new file +3
-0+ timebase-frequency = <0>; // from U-Boot + bus-frequency = <0>; // from U-Boot + clock-frequency = <0>; // from U-Bootu-boot will add this for us so no need for them.
Quoted 4 lines
I think it's worth including them (with the comments) for documentation purposes though. Plus allowing the bootloader and bootwrapper to just replace property values without resizing or inserting is somewhat worthwhile of itself.
I understand your point and while testing the new blob, I realized that the DTB image created with
$ make ARCH=powerpc tqm8548.dtbdoes not work because work space is missing:
## Flattened Device Tree blob at 00900000
Booting using the fdt blob at 0x900000 Loading Device Tree to 007fe000, end 007ff8e0 ... OKWARNING: could not create /chosen
FDT_ERR_NOSPACE.
ERROR: /chosen node create failed - must RESET the board to recover.
Quoted 6 lines
As I see it, I have to define
DTS_FLAGSmanually$ export DTS_FLAGS="-R4 -S0x3000" $ make ARCH=powerpc tqm8548.dtbto get a working blob. Is that the intended behavior?
this is normal. Andy Fleming has posted a patch to u-boot to help improve the situation. I'm not sure if WD has picked it up for 1.3.4 yet.
- k
Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 7 lines
As I see it, I have to define
DTS_FLAGSmanually$ export DTS_FLAGS="-R4 -S0x3000" $ make ARCH=powerpc tqm8548.dtbto get a working blob. Is that the intended behavior?
this is normal. Andy Fleming has posted a patch to u-boot to help improve the situation. I'm not sure if WD has picked it up for 1.3.4 yet.
I will. But wouldn't it make sense to allow at least for some level of compatibility with older versions of U-Boot? Adding these options as default would probably not hurt?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Anarchy may not be the best form of government, but it's better than no government at all.
Default flats for running dtc from kernel build
Quoted 9 lines · Wolfgang Denk
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines
As I see it, I have to define
DTS_FLAGSmanually$ export DTS_FLAGS="-R4 -S0x3000" $ make ARCH=powerpc tqm8548.dtbto get a working blob. Is that the intended behavior?
Quoted 7 lines
Quoted 3 lines
this is normal. Andy Fleming has posted a patch to u-boot to help improve the situation. I'm not sure if WD has picked it up for 1.3.4 yet.
I will. But wouldn't it make sense to allow at least for some level of compatibility with older versions of U-Boot? Adding these options as default would probably not hurt?
Agreed. I didn't realize we could actually do this from the kernel build system.
I'm sure others will have their two cents to add.
But something like:
arch/powerpc/boot/Makefile +2 -0
@@ -29,6 +29,8 @@ ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif +DTS_FLAGS ?= -R4 -S 0x3000 + ifeq ($(call cc-option-yn, -fstack-protector),y) BOOTCFLAGS += -fno-stack-protector endif
- k
Re: Default flats for running dtc from kernel build
Quoted 17 lines · Kumar Gala
Quoted 4 lines
I will. But wouldn't it make sense to allow at least for some level of compatibility with older versions of U-Boot? Adding these options as default would probably not hurt?
Agreed. I didn't realize we could actually do this from the kernel build system.
I'm sure others will have their two cents to add.
But something like:
arch/powerpc/boot/Makefile +0
-0
arch/powerpc/boot/Makefile ifdef CONFIG_DEBUG_INFO · line 36
Quoted 8 lines
arch/powerpc/boot/Makefile +2
-0@@ -29,6 +29,8 @@ ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif +DTS_FLAGS ?= -R4 -S 0x3000 + ifeq ($(call cc-option-yn, -fstack-protector),y) BOOTCFLAGS += -fno-stack-protector endif
Hrm. Should we use -p <extra_space> instead of -S <total_space>? Seems someone added this DTC commit last November:
commit 2b7dc8dce549ad72ad437b254bf756d7ba4c2a5a
Author: Kumar Gala <[email protected]>
Date: Wed Nov 28 10:21:12 2007 -0600
Add an option to pad the blob that is generated
There are times when we need extra space in the blob and just want to have it added on w/o know the exact size to make it.
The padding and min size options are mutually exclusive.
A thought,
jdl
Re: Default flats for running dtc from kernel build
Quoted 41 lines · Jon Loeliger
Quoted 17 lines · Kumar Gala
Quoted 4 lines
I will. But wouldn't it make sense to allow at least for some level of compatibility with older versions of U-Boot? Adding these options as default would probably not hurt?
Agreed. I didn't realize we could actually do this from the kernel build system.
I'm sure others will have their two cents to add.
But something like:
arch/powerpc/boot/Makefile +0
-0arch/powerpc/boot/Makefile ifdef CONFIG_DEBUG_INFO · line 36
Quoted 8 lines
arch/powerpc/boot/Makefile +2
-0@@ -29,6 +29,8 @@ ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif +DTS_FLAGS ?= -R4 -S 0x3000 + ifeq ($(call cc-option-yn, -fstack-protector),y) BOOTCFLAGS += -fno-stack-protector endifHrm. Should we use -p <
extra_space> instead of -S <total_space>? Seems someone added this DTC commit last November:commit
2b7dc8dce549ad72ad437b254bf756d7ba4c2a5a
Author: Kumar Gala <[email protected]>
Date: Wed Nov 28 10:21:12 2007 -0600Add an option to pad the blob that is generated
There are times when we need extra space in the blob and
just want
to have it added on w/o know the exact size to make it.
Quoted 7 lines
The padding and min size options are mutually exclusive.
Signed-off-by Kumar Gala <[email protected]>A thought,
jdl
Yeah, I think the -R isn't need either.
So maybe:
DTS_FLAGS ?= -P 0x1000
1k seems like more than enough default padding.
- k
Re: Default flats for running dtc from kernel build
Quoted 8 lines · Kumar Gala
Yeah, I think the -R isn't need either.
So maybe:
DTS_FLAGS?= -P0x10001k seems like more than enough default padding.
Good by me.
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Re: Default flats for running dtc from kernel build
In reply to Kumar GalaQuoted 3 lines · Kumar Gala
So maybe:
DTS_FLAGS?= -P0x1000
Lowercase "p".
Quoted 1 line
1k seems like more than enough default padding.
I would think so.
Quoted 1 line
- k
jdl
Re: Default flats for running dtc from kernel build
In reply to Kumar GalaQuoted 3 lines
DTS_FLAGS?= -P0x10001k seems like more than enough default padding.
Yes. So why specify 4kB?
/me hides
Segher
Re: Default flats for running dtc from kernel build
In reply to Kumar GalaHello,
Kumar Gala írta:
arch/powerpc/boot/Makefile ifdef CONFIG_DEBUG_INFO · line 36
Quoted 13 lines
arch/powerpc/boot/Makefile +2
-0@@ -29,6 +29,8 @@ ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif +DTS_FLAGS ?= -R4 -S 0x3000 + ifeq ($(call cc-option-yn, -fstack-protector),y) BOOTCFLAGS += -fno-stack-protector endif
I have a 8610 standing next to my desk with U-Boot 1.3.0 (Mar 13 2008 - 10:14:26). It came with 2.6.23. I wanted to compile a kernel from the latest available kernel sources ( 2.6.26-RC5-git2 ). I compiled it using mpc8610_hpcd_defconfig. I also did a make mpc8610_hpcd.dtb to have a matching dtb file for the kernel. This is how far it gets:
=> boot
11032 bytes read
1708346 bytes read
## Booting image at 01000000 ...
Image Name: Linux-2.6.26-rc5-git2-czp7 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1708282 Bytes = 1.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0xc00000
Loading Device Tree to 007fb000, end 007fdb17 ... OK
When I use the 2.6.26 kernel, but the original dtb file from the BSP, then I get two more lines on the serial console:
pci@8000 first_busno=0 last_busno=0
pcie@9000 first_busno=0 last_busno=0
So I suspected, that this might be something with the dtb file. This is when I ran into this thread. I tried all the different options for DTS_FLAGS to generate a working dtb file, but I got the same result, "Loading Device Tree to 007fb000, end 007fdb17 ... OK" was the last line on screen. Any additional ideas, how to create a working dtb file for the 8610 board for later kernels?
Bye,
CzP
Re: Default flats for running dtc from kernel build
Quoted 36 lines · Peter Czanik
Hello,
Kumar Gala írta:
arch/powerpc/boot/Makefile ifdef CONFIG_DEBUG_INFO · line 36
Quoted 13 lines
arch/powerpc/boot/Makefile +2
-0@@ -29,6 +29,8 @@ ifdef CONFIG_DEBUG_INFO BOOTCFLAGS += -g endif +DTS_FLAGS ?= -R4 -S 0x3000 + ifeq ($(call cc-option-yn, -fstack-protector),y) BOOTCFLAGS += -fno-stack-protector endifI have a 8610 standing next to my desk with U-Boot 1.3.0 (Mar 13 2008 - 10:14:26). It came with 2.6.23. I wanted to compile a kernel from the latest available kernel sources ( 2.6.26-RC5-git2 ). I compiled it using
mpc8610_hpcd_defconfig. I also did a make mpc8610_hpcd.dtb to have a matching dtb file for the kernel. This is how far it gets:=> boot
11032 bytes read
1708346 bytes read
## Booting image at 01000000 ...Image Name: Linux-2.6.26-rc5-git2-czp7 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1708282 Bytes = 1.6 MBLoad Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at0xc00000
Loading Device Tree to007fb000, end007fdb17... OKWhen I use the 2.6.26 kernel, but the original dtb file from the BSP, then I get two more lines on the serial console:
Quoted 7 lines
pci@8000 first_busno=0 last_busno=0
pcie@9000 first_busno=0 last_busno=0So I suspected, that this might be something with the dtb file. This is when I ran into this thread. I tried all the different options for
DTS_FLAGSto generate a working dtb file, but I got the same result, "Loading Device Tree to007fb000, end007fdb17... OK" was the last line on screen. Any additional ideas, how to create a working dtb file for the 8610 board for later kernels?Bye,
CzP
Hi Peter,
Does your .dts (dtb source) have an /aliases node with properties pointing to the proper serial port(s) (and enthernet port(s))? Somewhere around the timeframe of your current u-boot/linux versions, the /aliases node was added to tell the kernel which serial was ttyS0, ttyS1, etc. in an independent way.
I would strongly recommend a new u-boot too. The merge window for 1.3.4 just closed, it should work well for you. If not, fix patches are welcome on the u-boot list. ;-)
HTH,
gvb