Where is initial console initialized ?

Daniel Schnell daniel.schnell at marel.com
Thu May 31 23:42:11 EST 2007


Hi,
 
I am trying to bring up 2.6.20.3 on a MPC5200B based custom board. This
Kernel is based on the Phytec phyCore MPC5200B Mini BSP kernel and
adapted to my board.
So far I have troubles to get console output working when booting Linux.
Uboot console output is fine. Linux begins to run (I can set breakpoints
with the BDI2000 in the early initialization code) so I probably have a
misconfiguration of the console output inside the fdt.

The major difference between the Phytec phyCore 5200B mini fdt and mine
is that we use PSC1 instead of PSC3/6 for serial. Accordingly I changed
the fdt (or dts) values.

To get some more insights, I would like to know, in which Linux function
the console output is initialised ?


See the relevant outputs attached:


=========
## Booting image at 00500000 ...
   Image Name:   Linux-2.6.20-rt3-v38c
   Created:      2007-05-30  13:10:27 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    970278 Bytes = 947.5 kB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
(no further output)
=========



If I dump the flat device tree inside uboot, I get the following
entries: 

=========
   Booting using flat device tree at 0x400000
 {
    model = "v38c";
    compatible = [76 33 38 63 00 6d 70 63 35 32 30 30 62 00 6d 70 63 35
32 78 78 00];
    #address-cells = <1>;
    #size-cells = <1>;
    cpus {
        #cpus = <1>;
        #address-cells = <1>;
        #size-cells = <0>;
        PowerPC,5200 at 0 {
            device_type = "cpu";
            reg = <0>;
            d-cache-line-size = <20>;
            i-cache-line-size = <20>;
            d-cache-size = <4000>;
            i-cache-size = <4000>;
            timebase-frequency = <1f78a40>;
            bus-frequency = <7de2900>;
            clock-frequency = <179a7b00>;
            32-bit;
        };
    };
    memory {
        device_type = "memory";
        reg = <8>;
    };
    soc5200 at f0000000 {
        #interrupt-cells = <3>;
        device_type = "soc";
        ranges = [00 00 00 00 f0 00 00 00 f0 01 00 00];
        reg = <8>;
        bus-frequency = <3ef1480>;
        cdm at 200 {
            compatible = [6d 70 63 35 32 30 30 62 2d 63 64 6d 00 6d 70
63 35 32 78 78 2d 63 64 6d 00];
            reg = <8>;
        };
        pic at 500 {
            linux,phandle = <500>;
            interrupt-controller;
            #interrupt-cells = <3>;
            device_type = "interrupt-controller";
            compatible = [6d 70 63 35 32 30 30 62 2d 70 69 63 00 6d 70
63 35 32 78 78 2d 70 69 63 00];
            reg = <8>;
            built-in;
        };
        gpt at 600 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 09 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 610 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 0a 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 620 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 0b 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 630 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 0c 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 640 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 0d 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 650 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 0e 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 660 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 0f 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpt at 670 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 74 00 6d 70
63 35 32 78 78 2d 67 70 74 00];
            device_type = "gpt";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 10 00 00 00 00];
            interrupt-parent = <500>;
        };
        rtc at 800 {
            compatible = [6d 70 63 35 32 30 30 62 2d 72 74 63 00 6d 70
63 35 32 78 78 2d 72 74 63 00];
            device_type = "rtc";
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 05 00 00 00 00 00 00 00
01 00 00 00 06 00 00 00 00];
            interrupt-parent = <500>;
        };
        mscan at 900 {
            device_type = "mscan";
            compatible = [6d 70 63 35 32 30 30 62 2d 6d 73 63 61 6e 00
6d 70 63 35 32 78 78 2d 6d 73 63 61 6e 00];
            interrupts = [00 00 00 02 00 00 00 11 00 00 00 00];
            interrupt-parent = <500>;
            reg = <8>;
        };
        mscan at 980 {
            device_type = "mscan";
            compatible = [6d 70 63 35 32 30 30 62 2d 6d 73 63 61 6e 00
6d 70 63 35 32 78 78 2d 6d 73 63 61 6e 00];
            interrupts = [00 00 00 02 00 00 00 12 00 00 00 00];
            interrupt-parent = <500>;
            reg = <8>;
        };
        gpio at b00 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 69 6f 00 6d
70 63 35 32 78 78 2d 67 70 69 6f 00];
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 07 00 00 00 00];
            interrupt-parent = <500>;
        };
        gpio-wkup at b00 {
            compatible = [6d 70 63 35 32 30 30 62 2d 67 70 69 6f 2d 77
6b 75 70 00 6d 70 63 35 32 78 78 2d 67 70 69 6f 2d 77 6b 75 70 00];
            reg = <8>;
            interrupts = [00 00 00 01 00 00 00 08 00 00 00 00 00 00 00
00 00 00 00 03 00 00 00 00];
            interrupt-parent = <500>;
        };
        pci at 0d00 {
            #interrupt-cells = <1>;
            #size-cells = <2>;
            #address-cells = <3>;
            device_type = "pci";
            compatible = [6d 70 63 35 32 30 30 62 2d 70 63 69 00 6d 70
63 35 32 78 78 2d 70 63 69 00];
            reg = <8>;
            interrupt-map-mask = [00 00 f8 00 00 00 00 00 00 00 00 00 00
00 00 07];
            interrupt-map = [00 00 c0 00 00 00 00 00 00 00 00 00 00 00
00 01 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 c0 00 00 00
00 00 00 00 00 00 00 00 00 02 00 00 05 00 00 00 00 01 00 00 00 01 00 00
00 03 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 05 00 00 00
00 01 00 00 00 02 00 00 00 03 00 00 c0 00 00 00 00 00 00 00 00 00 00 00
00 04 00 00 05 00 00 00 00 01 00 00 00 03 00 00 00 03 00 00 c8 00 00 00
00 00 00 00 00 00 00 00 00 01 00 00 05 00 00 00 00 01 00 00 00 01 00 00
00 03 00 00 c8 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 05 00 00 00
00 01 00 00 00 02 00 00 00 03 00 00 c8 00 00 00 00 00 00 00 00 00 00 00
00 03 00 00 05 00 00 00 00 01 00 00 00 03 00 00 00 03 00 00 c8 00 00 00
00 00 00 00 00 00 00 00 00 04 00 00 05 00 00 00 00 00 00 00 00 00 00 00
00 03];
            clock-frequency = <0>;
            interrupts = [00 00 00 02 00 00 00 08 00 00 00 00 00 00 00
02 00 00 00 09 00 00 00 00 00 00 00 02 00 00 00 0a 00 00 00 00];
            interrupt-parent = <500>;
            bus-range = <8>;
            ranges = [42 00 00 00 00 00 00 00 80 00 00 00 80 00 00 00 00
00 00 00 20 00 00 00 02 00 00 00 00 00 00 00 a0 00 00 00 a0 00 00 00 00
00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 b0 00 00 00 00
00 00 00 01 00 00 00];
        };
        spi at f00 {
            device_type = "spi";
            compatible = [6d 70 63 35 32 30 30 62 2d 73 70 69 00 6d 70
63 35 32 78 78 2d 73 70 69 00];
            reg = <8>;
            interrupts = [00 00 00 02 00 00 00 0d 00 00 00 00 00 00 00
02 00 00 00 0e 00 00 00 00];
            interrupt-parent = <500>;
        };
        usb at 1000 {
            device_type = "usb-ohci-be";
            compatible = [6d 70 63 35 32 30 30 62 2d 6f 68 63 69 00 6d
70 63 35 32 78 78 2d 6f 68 63 69 00 6f 68 63 69 2d 62 65 00];
            reg = <8>;
            interrupts = [00 00 00 02 00 00 00 06 00 00 00 00];
            interrupt-parent = <500>;
        };
        bestcomm at 1200 {
            device_type = "dma-controller";
            compatible = [6d 70 63 35 32 30 30 62 2d 62 65 73 74 63 6f
6d 6d 00 6d 70 63 35 32 78 78 2d 62 65 73 74 63 6f 6d 6d 00];
            reg = <8>;
            interrupts = [00 00 00 03 00 00 00 00 00 00 00 00 00 00 00
03 00 00 00 01 00 00 00 00 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00
03 00 00 00 03 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00
03 00 00 00 05 00 00 00 00 00 00 00 03 00 00 00 06 00 00 00 00 00 00 00
03 00 00 00 07 00 00 00 00 00 00 00 03 00 00 00 08 00 00 00 00 00 00 00
03 00 00 00 09 00 00 00 00 00 00 00 03 00 00 00 0a 00 00 00 00 00 00 00
03 00 00 00 0b 00 00 00 00 00 00 00 03 00 00 00 0c 00 00 00 00 00 00 00
03 00 00 00 0d 00 00 00 00 00 00 00 03 00 00 00 0e 00 00 00 00 00 00 00
03 00 00 00 0f 00 00 00 00];
            interrupt-parent = <500>;
        };
        xlb at 1f00 {
            compatible = [6d 70 63 35 32 30 30 62 2d 78 6c 62 00 6d 70
63 35 32 78 78 2d 78 6c 62 00];
            reg = <8>;
        };
        serial at 2000 {
            device_type = "serial";
            compatible = [6d 70 63 35 32 30 30 62 2d 70 73 63 2d 75 61
72 74 00 6d 70 63 35 32 78 78 2d 70 73 63 2d 75 61 72 74 00];
            port-number = <0>;
            reg = <8>;
            interrupts = [00 00 00 02 00 00 00 01 00 00 00 00];
            interrupt-parent = <500>;
        };
        ethernet at 3000 {
            device_type = "network";
            compatible = [6d 70 63 35 32 30 30 62 2d 66 65 63 00 6d 70
63 35 32 78 78 2d 66 65 63 00];
            reg = <8>;
            mac-address = [00 e0 ee 00 28 0d];
            interrupts = [00 00 00 02 00 00 00 05 00 00 00 00];
            interrupt-parent = <500>;
        };
        i2c at 3d00 {
            device_type = "i2c";
            compatible = [6d 70 63 35 32 30 30 62 2d 69 32 63 00 6d 70
63 35 32 78 78 2d 69 32 63 00];
            reg = <8>;
            interrupts = [00 00 00 02 00 00 00 0f 00 00 00 00];
            interrupt-parent = <500>;
        };
        i2c at 3d40 {
            device_type = "i2c";
            compatible = [6d 70 63 35 32 30 30 62 2d 69 32 63 00 6d 70
63 35 32 78 78 2d 69 32 63 00];
            reg = <8>;
            interrupts = [00 00 00 02 00 00 00 10 00 00 00 00];
            interrupt-parent = <500>;
        };
        sram at 8000 {
            device_type = "sram";
            compatible = [6d 70 63 35 32 30 30 62 2d 73 72 61 6d 00 6d
70 63 35 32 78 78 2d 73 72 61 6d 00 73 72 61 6d 00];
            reg = <8>;
        };
    };
    chosen {
        name = "chosen";
        bootargs = "console=ttyPSC0,115200 root=/dev/nfs ip=dhcp
nfsroot=10.100.11.96:/home/danielsch/downloads/OSELAS.BSP-Phytec-phyCORE
-MPC5200B-tiny-5/root,v3,tcp";
        linux,platform = <600>;
        linux,stdout-path = "/soc5200 at f0000000/serial at 2000";
    };
};
=========



More information about the Linuxppc-embedded mailing list