## Current stack ends at 0x4fcc8c00 * kernel: cmdline image address = 0x30000000
## Booting kernel from Legacy Image at 30000000 ...
Image Name: Linux-3.17.2
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1427952 Bytes = 1.4 MiB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
kernel data at 0x30000040, len = 0x0015c9f0 (1427952)
## Flattened Device Tree blob at 38000000
Booting using the fdt blob at 0x38000000
Loading Kernel Image ... OK
kernel loaded at 0x30008000, end = 0x301649f0
images.os.start = 0x30000000, images.os.end = 0x3015ca30
images.os.load = 0x30008000, load_end = 0x301649f0
using: FDT
Loading Device Tree to 4fcbe000, end 4fcc74f5 ... OK
## Transferring control to Linux (at address 30008000)...
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
__atags_pointer is 4FCBE000
Now setup_machine_fdt
phys_to_virt(dt_phys) is 9FCBE000
setup_machine_fdt stop! return NULL
no return
_machine_arch_type = Samsung S5PC110/S5PV210-based board
Booting Linux on physical CPU 0x0
Linux version 3.17.2 (tom@tom-virtual-machine) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #17 PREEMPT Thu Sep 24 00:08:00 CST 2015
CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
__atags_pointer is 4FCBE000
Now setup_machine_fdt
phys_to_virt(dt_phys) is 9FCBE000
setup_machine_fdt stop! return NULL
no return
Machine model: YIC System SMDKV210 based on S5PV210
_machine_arch_type = Samsung S5PC110/S5PV210-based board
debug: ignoring loglevel setting.
bootconsole [earlycon0] enabled
Memory policy: Data cache writeback
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat 802b3f84, node_mem_map 9f8be000
Normal zone: 1024 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 131072 pages, LIFO batch:31
CPU: All CPU(s) started in SVC mode.
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: noinitrd root=/dev/mtdblock5 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200n8 rw rootwait ignore_loglevel earlyprintk mem=512M
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 516652K/524288K available (1851K kernel code, 153K rwdata, 600K rodata, 127K init, 205K bss, 7636K reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
vmalloc : 0xa0800000 - 0xff000000 (1512 MB)
lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x80008000 - 0x8026cf64 (2452 kB)
.init : 0x8026d000 - 0x8028cfc4 ( 128 kB)
.data : 0x8028e000 - 0x802b46c0 ( 154 kB)
.bss : 0x802b46c0 - 0x802e7db4 ( 206 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:16 16
VIC @a0800000: id 0x00041192, vendor 0x41
VIC @a0802000: id 0x00041192, vendor 0x41
VIC @a0804000: id 0x00041192, vendor 0x41
VIC @a0806000: id 0x00041192, vendor 0x41
S5PV210 clocks: mout_apll = 0, mout_mpll = 0
mout_epll = 0, mout_vpll = 0
Kernel panic - not syncing: failed to get timers clock for timer
CPU: 0 PID: 0 Comm: swapper Not tainted 3.17.2 #17
[<800126c8>] (unwind_backtrace) from [<800108fc>] (show_stack+0x10/0x14)
[<800108fc>] (show_stack) from [<801bc53c>] (panic+0x8c/0x1ec)
[<801bc53c>] (panic) from [<80281e54>] (samsung_pwm_alloc+0x104/0x12c)
[<80281e54>] (samsung_pwm_alloc) from [<80281a8c>] (clocksource_of_init+0x48/0x8c)
[<80281a8c>] (clocksource_of_init) from [<8026da1c>] (start_kernel+0x214/0x37c)
[<8026da1c>] (start_kernel) from [<30008070>] (0x30008070)
---[ end Kernel panic - not syncing: failed to get timers clock for timer
删掉pwm的设备节点会提示clocksource_of_init: no matching clocksources found,参考文章
style="color:#000000;">
说明pwm不能删掉,timers一定要初始化,但是新内核中没有timers这个时钟名,只能分析添加了。三星是怎么活下来的?
clocksource_of_init在drivers/clocksource/clksrc-of.c中定义,drivers/clocksource/samsung_pwm_timer.c中进行pwm的of什么和初始化。
关键是pwm.timerclk = of_clk_get_by_name(np, "timers");这里要寻找timers,不能找得到的,drv/clk/samsung/clk-s5pv210.c并没有定义这个时钟。
旧内核中的定义mach-s5pv210/clock.c:
}, {
.name = "timers",
.parent = &clk_pclk_psys.clk,
.enable = s5pv210_clk_ip3_ctrl,
.ctrlbit = (1<<23),
对比systimer
}, {
.name = "systimer",
.parent = &clk_pclk_psys.clk,
.enable = s5pv210_clk_ip3_ctrl,
.ctrlbit = (1<<16),
再看新内核中有
GATE(CLK_PWM, "pwm", "dout_pclkp", CLK_GATE_IP3, 23, 0, 0),
应该就是这个了,在设备树中改名字试试,最后证明,改名没用。
最后卡在
-
pwm.timerclk = of_clk_get_by_name(np, "timers");// pwm.timerclk = of_clk_get_by_name(np, "timers"); modify by richard
-
if (IS_ERR(pwm.timerclk))
-
panic("failed to get timers clock for timer");
-
-
_samsung_pwm_clocksource_init();
继续跟踪发现它要获取pwm时钟,但是pwm的clocks = <&clocks CLK_PWM>;
这个啥意思还看不懂。
-
pwm: pwm@e2500000 {
-
compatible = "samsung,s5pc100-pwm";
-
reg = <0xe2500000 0x1000>;
-
interrupt-parent = <&vic0>;
-
interrupts = <21>, <22>, <23>, <24>, <25>;
-
clock-names = "timers";/*clock-names = "timers";*/
-
clocks = <&clocks CLK_PWM>;
-
#pwm-cells = <3>;
-
};
添加打印信息,结果显示:
-
Linux version 3.17.2 (tom@tom-virtual-machine) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #29 PREEMPT Thu Sep 24 04:17:31 CST 2015
-
CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c5387d
-
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
-
__atags_pointer is 4FCBE000
-
Now setup_machine_fdt
-
phys_to_virt(dt_phys) is 9FCBE000
-
setup_machine_fdt return NULL
-
no return
-
Machine model: YIC System SMDKV210 based on S5PV210
-
_machine_arch_type = Samsung S5PC110/S5PV210-based board
-
debug: ignoring loglevel setting.
-
bootconsole [earlycon0] enabled
-
Memory policy: Data cache writeback
-
On node 0 totalpages: 131072
-
free_area_init_node: node 0, pgdat 802b3f84, node_mem_map 9f8be000
-
Normal zone: 1024 pages used for memmap
-
Normal zone: 0 pages reserved
-
Normal zone: 131072 pages, LIFO batch:31
-
CPU: All CPU(s) started in SVC mode.
-
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
-
pcpu-alloc: [0] 0
-
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
-
Kernel command line: noinitrd root=/dev/mtdblock5 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200n8 rw rootwait ignore_loglevel earlyprintk mem=512M
-
PID hash table entries: 2048 (order: 1, 8192 bytes)
-
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
-
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
-
Memory: 516652K/524288K available (1851K kernel code, 153K rwdata, 600K rodata, 127K init, 205K bss, 7636K reserved)
-
Virtual kernel memory layout:
-
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
-
fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
-
vmalloc : 0xa0800000 - 0xff000000 (1512 MB)
-
lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
-
modules : 0x7f000000 - 0x80000000 ( 16 MB)
-
.text : 0x80008000 - 0x8026cf64 (2452 kB)
-
.init : 0x8026d000 - 0x8028cfe4 ( 128 kB)
-
.data : 0x8028e000 - 0x802b46c0 ( 154 kB)
-
.bss : 0x802b46c0 - 0x802e7db4 ( 206 kB)
-
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
-
Preemptible hierarchical RCU implementation.
-
NR_IRQS:16 nr_irqs:16 16
-
VIC @a0800000: id 0x00041192, vendor 0x41
-
VIC @a0802000: id 0x00041192, vendor 0x41
-
VIC @a0804000: id 0x00041192, vendor 0x41
-
VIC @a0806000: id 0x00041192, vendor 0x41
-
S5PV210 clocks: mout_apll = 1000000000, mout_mpll = 667000000
-
mout_epll = 96000000, mout_vpll = 54000000
-
of_clk_get_by_name timers
-
name && index >= 0, 0xfffffdfb
-
of_clk_get_by_name timers failed
-
Unable to handle kernel paging request at virtual address fffffe33
-
pgd = 80004000
-
[fffffe33] *pgd=4fffd821, *pte=00000000, *ppte=00000000
-
Internal error: Oops: 17 [#1] PREEMPT ARM
-
Modules linked in:
-
CPU: 0 PID: 0 Comm: swapper Not tainted 3.17.2 #29
-
task: 80296770 ti: 8028e000 task.ti: 8028e000
-
PC is at __clk_prepare+0x10/0x74
-
LR is at clk_prepare+0x14/0x24
-
pc : [<801b32d8>] lr : [<801b3870>] psr: a00001d3
-
sp : 8028ff60 ip : 00000000 fp : 00000000
-
r10: 00000000 r9 : 412fc082 r8 : 9fff1088
-
r7 : 00000001 r6 : 9fff1260 r5 : 8028ff8c r4 : fffffdfb
-
r3 : 80296770 r2 : 00000001 r1 : 00000017 r0 : fffffdfb
-
Flags: NzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
-
Control: 10c5387d Table: 30004019 DAC: 00000015
-
Process swapper (pid: 0, stack limit = 0x8028e238)
-
Stack: (0x8028ff60 to 0x80290000)
-
ff60: 80296770 fffffdfb 8028ff8c 801b3870 fffffdfb 80281b28 802e7b48 8028ff8c
-
ff80: 9fff1260 80281e60 9fff1088 00000003 a00001d3 8028ffb4 00000001 9fff1088
-
ffa0: 80286568 9fffcbc0 00000000 80281a8c 412fc082 8028c210 00000000 ffffffff
-
ffc0: 802b46c0 8026da1c ffffffff ffffffff 8026d5e4 00000000 00000000 80286568
-
ffe0: 802b4894 802960b0 80286564 802978a4 30004059 30008070 00000000 00000000
-
[<801b32d8>] (__clk_prepare) from [<801b3870>] (clk_prepare+0x14/0x24)
-
[<801b3870>] (clk_prepare) from [<80281b28>] (_samsung_pwm_clocksource_init+0x58/0x280)
-
[<80281b28>] (_samsung_pwm_clocksource_init) from [<80281e60>] (samsung_pwm_alloc+0x110/0x138)
-
[<80281e60>] (samsung_pwm_alloc) from [<80281a8c>] (clocksource_of_init+0x48/0x8c)
-
[<80281a8c>] (clocksource_of_init) from [<8026da1c>] (start_kernel+0x214/0x37c)
-
[<8026da1c>] (start_kernel) from [<30008070>] (0x30008070)
-
Code: e92d4038 e2504000 01a05004 0a000005 (e5943038)
-
---[ end trace cb88537fdc8fa200 ]---
-
Kernel panic - not syncing: Attempted to kill the idle
-
---[ end Kernel panic - not syncing: Attempted to kill the idle
明显是内存分配出错了,还要继续查。
2015.9.26 昨天下载了4.2.1内核居然可以跑了,肯定是以前的有内核有bug,去kernel.org查看4.2.1的changelog,搜索s5pv210,果然:
commit cd26539f1233da20113eaab88a1b18775ed6dd04
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date: Wed Aug 12 10:58:22 2015 +0200
commit cd26539f1233da20113eaab88a1b18775ed6dd04
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date: Wed Aug 12 10:58:22 2015 +0200
clk: s5pv210: add missing call to samsung_clk_of_add_provider()
commit ba30011577330b7e29ecb5916d89c6db9fbc5b3d upstream.
Commit d5e136a21b2028fb1f45143ea7112d5869bfc6c7 ("clk: samsung: Register
clk provider only after registering its all clocks", merged to v3.17-rc1)
modified a way that driver registers registers to core framework. This
change has not been applied to s5pv210 clocks driver, which has been
merged in parallel to that commit. This patch adds a missing call to
samsung_clk_of_add_provider(), so the driver is operational again.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
阅读(3508) | 评论(0) | 转发(0) |