Where is initial console initialized ?

Daniel Schnell daniel.schnell at marel.com
Fri Jun 1 22:14:57 EST 2007


Hmm, this is a bug in the U-Boot print-data() function. Normally you should see a 8 bytes field for "reg =  ", so I changed that function to dump the hexadecimal contents when data length is == 8 and these reg = values look much better now:


Still no go to boot Linux.


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 = [00 00 00 00 08 00 00 00];
    };
    soc5200 at f0000000 {
        #interrupt-cells = <3>;
        device_type = "soc";
        ranges = [00 00 00 00 f0 00 00 00 f0 01 00 00];
        reg = [f0 00 00 00 00 01 00 00];
        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 = [00 00 02 00 00 00 00 38];
        };
        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 = [00 00 05 00 00 00 00 80];
            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 = [00 00 06 00 00 00 00 10];
            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 = [00 00 06 10 00 00 00 10];
            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 = [00 00 06 20 00 00 00 10];
            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 = [00 00 06 30 00 00 00 10];
            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 = [00 00 06 40 00 00 00 10];
            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 = [00 00 06 50 00 00 00 10];
            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 = [00 00 06 60 00 00 00 10];
            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 = [00 00 06 70 00 00 00 10];
            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 = [00 00 08 00 00 00 01 00];
            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 = [00 00 09 00 00 00 00 80];
        };
        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 = [00 00 09 80 00 00 00 80];
        };
        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 = [00 00 0b 00 00 00 00 40];
            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 = [00 00 0c 00 00 00 00 40];
            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 = [00 00 0d 00 00 00 01 00];
            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 = [00 00 00 00 00 00 00 00];
            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 = [00 00 0f 00 00 00 00 20];
            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 = [00 00 10 00 00 00 00 ff];
            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 = [00 00 12 00 00 00 00 80];
            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 = [00 00 1f 00 00 00 01 00];
        };
        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 = [00 00 20 00 00 00 01 00];
            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 = [00 00 30 00 00 00 08 00];
            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 = [00 00 3d 00 00 00 00 40];
            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 = [00 00 3d 40 00 00 00 40];
            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 = [00 00 80 00 00 00 40 00];
        };
    };
    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";
    };
};



-----Original Message-----
From: Domen Puncer [mailto:domen.puncer at telargo.com] 
Sent: 1. júní 2007 06:35
To: Daniel Schnell
Cc: linuxppc-embedded at ozlabs.org
Subject: Re: Where is initial console initialized ?

On 31/05/07 13:42 -0000, Daniel Schnell wrote:
> 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 ?
> 
> 
...
> If I dump the flat device tree inside uboot, I get the following
> entries: 
...
the dump with:

         reg = <8>;

in most of nodes, which looks just wrong.


	Domen



More information about the Linuxppc-embedded mailing list