ひでみのアイデア帳

くだらないことなんだけど、忘れないために・・・

Linux on the Zynq のエラーが一つ消えた

下記のLinux起動エラーだけど、Kernelソースを追いかけたら、どうもClockに名前がついていないのでエラーが出ていてここに引っかかっていたようだ。

----ここから----

ps7-slcr mapped to e0802000                                                     

smp_twd: clock not found -2                                                     

ERROR: timer input clock not found                                              

------------[ cut here ]------------                                            

Kernel BUG at c0563a8c [verbose debug info unavailable]                         

Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM                              

Modules linked in:                                                              

CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-xilinx #1                      

task: c0583408 ti: c0578000 task.ti: c0578000                                   

PC is at ttc_timer_init+0x54/0x384                                              

LR is at ttc_timer_init+0x54/0x384

----ここまで----

つまり、修正するのはDevice Treeであったことだ。

Device Treeを下記に修正するとこのエラーを突破できる。

----ここから----

/*

  • Device Tree Generator version: 1.1
  • (C) Copyright 2007-2013 Xilinx, Inc.
  • (C) Copyright 2007-2013 Michal Simek
  • (C) Copyright 2007-2012 PetaLogix Qld Pty Ltd
  • Michal SIMEK <monstr@monstr.eu>
  • CAUTION: This file is automatically generated by libgen.
  • Version: Xilinx EDK 14.5 EDK_P.58f
  • */

/dts-v1/; / {

address-cells = <1>;

#size-cells = &lt;1&gt;;
compatible = "xlnx,zynq-7000";
model = "Xilinx Zynq";
aliases {
    ethernet0 = &amp;ps7_ethernet_0;
    serial0 = &amp;ps7_uart_1;
    spi0 = &amp;ps7_qspi_0;
} ;
chosen {
    bootargs = "console=ttyPS0,115200 root=/dev/ram rw earlyprintk";
    linux,stdout-path = "/amba@0/serial@e0001000";
} ;
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    ps7_cortexa9_0: cpu@0 {
        bus-handle = &lt;&amp;ps7_axi_interconnect_0&gt;;
        compatible = "arm,cortex-a9";
        d-cache-line-size = &lt;0x20&gt;;
        d-cache-size = &lt;0x8000&gt;;
        device_type = "cpu";
        i-cache-line-size = &lt;0x20&gt;;
        i-cache-size = &lt;0x8000&gt;;
        interrupt-handle = &lt;&amp;ps7_scugic_0&gt;;
        reg = &lt;0x0&gt;;
    } ;
    ps7_cortexa9_1: cpu@1 {
        bus-handle = &lt;&amp;ps7_axi_interconnect_0&gt;;
        compatible = "arm,cortex-a9";
        d-cache-line-size = &lt;0x20&gt;;
        d-cache-size = &lt;0x8000&gt;;
        device_type = "cpu";
        i-cache-line-size = &lt;0x20&gt;;
        i-cache-size = &lt;0x8000&gt;;
        interrupt-handle = &lt;&amp;ps7_scugic_0&gt;;
        reg = &lt;0x1&gt;;
    } ;
} ;
pmu {
    compatible = "arm,cortex-a9-pmu";
    interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
    interrupts = &lt;0 5 4&gt;, &lt;0 6 4&gt;;
    reg = &lt;0xf8891000 0x1000&gt;, &lt;0xf8893000 0x1000&gt;;
    reg-names = "cpu0", "cpu1";
} ;
ps7_ddr_0: memory@0 {
    device_type = "memory";
    reg = &lt;0x0 0x20000000&gt;;
} ;
ps7_axi_interconnect_0: amba@0 {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;
    compatible = "xlnx,ps7-axi-interconnect-1.00.a", "simple-bus";
    ranges ;
    ps7_afi_0: ps7-afi@f8008000 {
        compatible = "xlnx,ps7-afi-1.00.a";
        reg = &lt;0xf8008000 0x1000&gt;;
    } ;
    ps7_afi_1: ps7-afi@f8009000 {
        compatible = "xlnx,ps7-afi-1.00.a";
        reg = &lt;0xf8009000 0x1000&gt;;
    } ;
    ps7_afi_2: ps7-afi@f800a000 {
        compatible = "xlnx,ps7-afi-1.00.a";
        reg = &lt;0xf800a000 0x1000&gt;;
    } ;
    ps7_afi_3: ps7-afi@f800b000 {
        compatible = "xlnx,ps7-afi-1.00.a";
        reg = &lt;0xf800b000 0x1000&gt;;
    } ;
    ps7_ddrc_0: ps7-ddrc@f8006000 {
        compatible = "xlnx,ps7-ddrc-1.00.a", "xlnx,ps7-ddrc";
        reg = &lt;0xf8006000 0x1000&gt;;
        xlnx,has-ecc = &lt;0x0&gt;;
    } ;
    ps7_dev_cfg_0: ps7-dev-cfg@f8007000 {
        clock-names = "ref_clk", "fclk0", "fclk1", "fclk2", "fclk3";
        clocks = &lt;&amp;clkc 12&gt;, &lt;&amp;clkc 15&gt;, &lt;&amp;clkc 16&gt;, &lt;&amp;clkc 17&gt;, &lt;&amp;clkc 18&gt;;
        compatible = "xlnx,ps7-dev-cfg-1.00.a";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 8 4&gt;;
        reg = &lt;0xf8007000 0x100&gt;;
    } ;
    ps7_dma_s: ps7-dma@f8003000 {
        #dma-cells = &lt;1&gt;;
        #dma-channels = &lt;8&gt;;
        #dma-requests = &lt;4&gt;;
        arm,primecell-periphid = &lt;0x41330&gt;;
        clock-names = "apb_pclk";
        clocks = &lt;&amp;clkc 27&gt;;
        compatible = "xlnx,ps7-dma-1.00.a", "arm,primecell", "arm,pl330";
        interrupt-names = "abort", "dma0", "dma1", "dma2", "dma3",
            "dma4", "dma5", "dma6", "dma7";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 13 4&gt;, &lt;0 14 4&gt;, &lt;0 15 4&gt;, &lt;0 16 4&gt;, &lt;0 17 4&gt;, &lt;0 40 4&gt;, &lt;0 41 4&gt;, &lt;0 42 4&gt;, &lt;0 43 4&gt;;
        reg = &lt;0xf8003000 0x1000&gt;;
    } ;
    ps7_ethernet_0: ps7-ethernet@e000b000 {
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;
        clock-names = "ref_clk", "aper_clk";
        clocks = &lt;&amp;clkc 13&gt;, &lt;&amp;clkc 30&gt;;
        compatible = "xlnx,ps7-ethernet-1.00.a";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 22 4&gt;;
        local-mac-address = [00 0a 35 00 00 00];
        phy-handle = &lt;&amp;phy0&gt;;
        phy-mode = "rgmii-id";
        reg = &lt;0xe000b000 0x1000&gt;;
        xlnx,enet-reset = &lt;0xffffffff&gt;;
        xlnx,eth-mode = &lt;0x1&gt;;
        xlnx,has-mdio = &lt;0x1&gt;;
        xlnx,ptp-enet-clock = &lt;111111115&gt;;
        mdio {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;
            phy0: phy@7 {
                compatible = "marvell,88e1510";
                device_type = "ethernet-phy";
                reg = &lt;7&gt;;
            } ;
        } ;
    } ;
    ps7_gpio_0: ps7-gpio@e000a000 {
        #gpio-cells = &lt;2&gt;;
        clocks = &lt;&amp;clkc 42&gt;;
        compatible = "xlnx,ps7-gpio-1.00.a";
        emio-gpio-width = &lt;64&gt;;
        gpio-controller ;
        gpio-mask-high = &lt;0xc0000&gt;;
        gpio-mask-low = &lt;0xfe81&gt;;
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 20 4&gt;;
        reg = &lt;0xe000a000 0x1000&gt;;
    } ;
    ps7_iop_bus_config_0: ps7-iop-bus-config@e0200000 {
        compatible = "xlnx,ps7-iop-bus-config-1.00.a";
        reg = &lt;0xe0200000 0x1000&gt;;
    } ;
    ps7_pl310_0: ps7-pl310@f8f02000 {
        arm,data-latency = &lt;3 2 2&gt;;
        arm,tag-latency = &lt;2 2 2&gt;;
        cache-level = &lt;2&gt;;
        cache-unified ;
        compatible = "xlnx,ps7-pl310-1.00.a", "arm,pl310-cache";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 2 4&gt;;
        reg = &lt;0xf8f02000 0x1000&gt;;
    } ;
    ps7_qspi_0: ps7-qspi@e000d000 {
        clock-names = "ref_clk", "aper_clk";
        clocks = &lt;&amp;clkc 10&gt;, &lt;&amp;clkc 43&gt;;
        compatible = "xlnx,ps7-qspi-1.00.a";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 19 4&gt;;
        is-dual = &lt;0&gt;;
        num-chip-select = &lt;1&gt;;
        reg = &lt;0xe000d000 0x1000&gt;;
        xlnx,fb-clk = &lt;0x1&gt;;
        xlnx,qspi-mode = &lt;0x0&gt;;
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;
        flash@0 {
            compatible = "n25q128";
            reg = &lt;0x0&gt;;
            spi-max-frequency = &lt;50000000&gt;;
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;1&gt;;
            partition@qspi-fsbl-uboot {
                label = "qspi-fsbl-uboot";
                reg = &lt;0x0 0x100000&gt;;
            };
            partition@qspi-linux {
                label = "qspi-linux";
                reg = &lt;0x100000 0x500000&gt;;
            };
            partition@qspi-device-tree {
                label = "qspi-device-tree";
                reg = &lt;0x600000 0x20000&gt;;
            };
            partition@qspi-rootfs {
                label = "qspi-rootfs";
                reg = &lt;0x620000 0x5E0000&gt;;
            };
            partition@qspi-bitstream {
                label = "qspi-bitstream";
                reg = &lt;0xC00000 0x400000&gt;;
            };
        };

    } ;
    ps7_qspi_linear_0: ps7-qspi-linear@fc000000 {
        clock-names = "ref_clk", "aper_clk";
        clocks = &lt;&amp;clkc 10&gt;, &lt;&amp;clkc 43&gt;;
        compatible = "xlnx,ps7-qspi-linear-1.00.a";
        reg = &lt;0xfc000000 0x1000000&gt;;
    } ;
    ps7_ram_0: ps7-ram@0 {
        compatible = "xlnx,ps7-ram-1.00.a", "xlnx,ps7-ocm";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 3 4&gt;;
        reg = &lt;0xfffc0000 0x40000&gt;;
    } ;
    ps7_scugic_0: ps7-scugic@f8f01000 {
        #address-cells = &lt;2&gt;;
        #interrupt-cells = &lt;3&gt;;
        #size-cells = &lt;1&gt;;
        compatible = "xlnx,ps7-scugic-1.00.a", "arm,cortex-a9-gic", "arm,gic";
        interrupt-controller ;
        num_cpus = &lt;2&gt;;
        num_interrupts = &lt;96&gt;;
        reg = &lt;0xf8f01000 0x1000&gt;, &lt;0xf8f00100 0x100&gt;;
    } ;
    ps7_scutimer_0: ps7-scutimer@f8f00600 {
        clocks = &lt;&amp;clkc 4&gt;;
        compatible = "xlnx,ps7-scutimer-1.00.a", "arm,cortex-a9-twd-timer";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;1 13 0x301&gt;;
        reg = &lt;0xf8f00600 0x20&gt;;
    } ;
    ps7_scuwdt_0: ps7-scuwdt@f8f00620 {
        clocks = &lt;&amp;clkc 4&gt;;
        compatible = "xlnx,ps7-scuwdt-1.00.a";
        device_type = "watchdog";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;1 14 0x301&gt;;
        reg = &lt;0xf8f00620 0xe0&gt;;
    } ;
    ps7_sd_0: ps7-sdio@e0100000 {
        clock-frequency = &lt;50000000&gt;;
        clock-names = "ref_clk", "aper_clk";
        clocks = &lt;&amp;clkc 21&gt;, &lt;&amp;clkc 32&gt;;
        compatible = "xlnx,ps7-sdio-1.00.a", "generic-sdhci", "arasan,sdhci";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 24 4&gt;;
        reg = &lt;0xe0100000 0x1000&gt;;
        xlnx,has-cd = &lt;0x1&gt;;
        xlnx,has-power = &lt;0x0&gt;;
        xlnx,has-wp = &lt;0x1&gt;;
    } ;
    ps7_slcr_0: ps7-slcr@f8000000 {
        compatible = "xlnx,ps7-slcr-1.00.a", "xlnx,zynq-slcr";
        reg = &lt;0xf8000000 0x1000&gt;;
        clocks {
            #address-cells = &lt;1&gt;;
            #size-cells = &lt;0&gt;;
            clkc: clkc {
                #clock-cells = &lt;1&gt;;
                clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", "cpu_3or2x",
                    "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", "dci",
                    "lqspi", "smc", "pcap", "gem0", "gem1",
                    "fclk0", "fclk1", "fclk2", "fclk3", "can0",
                    "can1", "sdio0", "sdio1", "uart0", "uart1",
                    "spi0", "spi1", "dma", "usb0_aper", "usb1_aper",
                    "gem0_aper", "gem1_aper", "sdio0_aper", "sdio1_aper", "spi0_aper",
                    "spi1_aper", "can0_aper", "can1_aper", "i2c0_aper", "i2c1_aper",
                    "uart0_aper", "uart1_aper", "gpio_aper", "lqspi_aper", "smc_aper",
                    "swdt", "dbg_trc", "dbg_apb";
                compatible = "xlnx,ps7-clkc";
                fclk-enable = &lt;0xf&gt;;
                ps-clk-frequency = &lt;33333333&gt;;
            } ;
        } ;
    } ;
    ps7_ttc_0: ps7-ttc@f8001000 {
        clocks = &lt;&amp;clkc 6&gt;;
        compatible = "xlnx,ps7-ttc-1.00.a", "cdns,ttc";
        interrupt-names = "ttc0", "ttc1", "ttc2";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 10 4&gt;, &lt;0 11 4&gt;, &lt;0 12 4&gt;;
        reg = &lt;0xf8001000 0x1000&gt;;
    } ;
    ps7_uart_1: serial@e0001000 {
        clock-names = "ref_clk", "aper_clk";
        clocks = &lt;&amp;clkc 24&gt;, &lt;&amp;clkc 41&gt;;
        compatible = "xlnx,ps7-uart-1.00.a", "xlnx,xuartps";
        current-speed = &lt;115200&gt;;
        device_type = "serial";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 50 4&gt;;
        port-number = &lt;0&gt;;
        reg = &lt;0xe0001000 0x1000&gt;;
        xlnx,has-modem = &lt;0x0&gt;;
    } ;
    ps7_usb_0: ps7-usb@e0002000 {
        clocks = &lt;&amp;clkc 28&gt;;
        compatible = "xlnx,ps7-usb-1.00.a";
        dr_mode = "host";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 21 4&gt;;
        phy_type = "ulpi";
        reg = &lt;0xe0002000 0x1000&gt;;
        xlnx,usb-reset = &lt;0xffffffff&gt;;
    } ;
    ps7_xadc: ps7-xadc@f8007100 {
        clocks = &lt;&amp;clkc 12&gt;;
        compatible = "xlnx,ps7-xadc-1.00.a";
        interrupt-parent = &lt;&amp;ps7_scugic_0&gt;;
        interrupts = &lt;0 7 4&gt;;
        reg = &lt;0xf8007100 0x20&gt;;
    } ;
} ;

} ;

----ここまで----

しかし、次に待ち構えているエラーがファイルマウントだったとは・・・