v3s + SDNAND(MKDV4GCL)
内核Linux version 5.19.9
使用SD卡,系统是能够正常启动的。
把镜像烧录到SDNAND 后,
在内核运行到 Waiting for root device /dev/mmcblk0p2 出错。
相同的镜像烧录到SD卡上是能够正常运行的
U-Boot 2022.07 (Oct 24 2022 - 16:59:46 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
Core: 30 devices, 14 uclasses, devicetree: separate
WDT: Not starting watchdog@1c20ca0
MMC: mmc@1c0f000: 0
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@1c28000
Out: serial@1c28000
Err: serial@1c28000
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
517 bytes read in 2 ms (252 KiB/s)
## Executing script at 41900000
4540440 bytes read in 1475 ms (2.9 MiB/s)
12960 bytes read in 6 ms (2.1 MiB/s)
Kernel image @ 0x41000000 [ 0x000000 - 0x454818 ]
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42df9000, end 42dff29f ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.19.9-c3130 (yss@yw) (arm-linux-gnueabihf-gcc (Linaro GCC 7.5-2019.12) 7.5.0, GNU ld (Lin2
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000040000000-0x0000000043ffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x0000000043ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000043ffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] percpu: Embedded 11 pages/cpu s15444 r8192 d21420 u45056
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_0
[ 0.000000] Unknown kernel command line parameters "earlyprintk", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 53592K/65536K available (7168K kernel code, 690K rwdata, 1772K rodata, 1024K init, 293K bss, 119)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592s
[ 0.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000016] Switching to timer-based delay loop, resolution 41ns
[ 0.000227] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000617] Console: colour dummy device 80x30
[ 0.000689] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000711] pid_max: default: 32768 minimum: 301
[ 0.000946] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000967] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001764] CPU: Testing write buffer coherency: ok
[ 0.002337] /cpus/cpu@0 missing clock-frequency property
[ 0.002387] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.003745] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.004057] rcu: Hierarchical SRCU implementation.
[ 0.004071] rcu: Max phase no-delay instances is 1000.
[ 0.004880] smp: Bringing up secondary CPUs ...
[ 0.004902] smp: Brought up 1 node, 1 CPU
[ 0.004914] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.004926] CPU: All CPU(s) started in HYP mode.
[ 0.004929] CPU: Virtualization extensions available.
[ 0.005771] devtmpfs: initialized
[ 0.009656] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.010049] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.010088] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.010315] pinctrl core: initialized pinctrl subsystem
[ 0.012012] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.012545] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.013771] thermal_sys: Registered thermal governor 'step_wise'
[ 0.014125] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.014148] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.017840] platform 1c0c000.lcd-controller: Fixing up cyclic dependency with 1100000.mixer
[ 0.023402] platform panel: Fixing up cyclic dependency with 1c0c000.lcd-controller
[ 0.033684] SCSI subsystem initialized
[ 0.033890] usbcore: registered new interface driver usbfs
[ 0.033951] usbcore: registered new interface driver hub
[ 0.034015] usbcore: registered new device driver usb
[ 0.034289] mc: Linux media interface: v0.10
[ 0.034334] videodev: Linux video capture interface: v2.00
[ 0.036036] clocksource: Switched to clocksource arch_sys_counter
[ 0.049398] NET: Registered PF_INET protocol family
[ 0.049708] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.050728] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.050780] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.050799] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.050824] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.050849] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.050991] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.051048] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.051408] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.052733] Initialise system trusted keyrings
[ 0.053981] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.159458] Key type asymmetric registered
[ 0.159490] Asymmetric key parser 'x509' registered
[ 0.159743] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 0.159759] io scheduler mq-deadline registered
[ 0.159767] io scheduler kyber registered
[ 0.243660] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.249715] panel-simple panel: supply power not found, using dummy regulator
[ 0.250022] panel-simple panel: Specify missing connector_type
[ 0.252025] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.252050] ehci-platform: EHCI generic platform driver
[ 0.252185] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.252222] ohci-platform: OHCI generic platform driver
[ 0.252403] usbcore: registered new interface driver usb-storage
[ 0.254485] sun6i-rtc 1c20400.rtc: registered as rtc0
[ 0.254575] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:03:41 UTC (221)
[ 0.254767] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.254991] i2c_dev: i2c /dev entries driver
[ 0.256126] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.257159] sun4i-ss 1c15000.crypto: Die ID 7
[ 0.258064] usbcore: registered new interface driver usbhid
[ 0.258082] usbhid: USB HID core driver
[ 0.258686] Initializing XFRM netlink socket
[ 0.258731] NET: Registered PF_PACKET protocol family
[ 0.259381] Registering SWP/SWPB emulation handler
[ 0.259709] Loading compiled-in X.509 certificates
[ 0.275626] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.276237] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[ 0.277030] pwm-backlight backlight: supply power not found, using dummy regulator
[ 0.307601] printk: console [ttyS0] disabled
[ 0.327963] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 99, base_baud = 1500000) is a U6_16550A
[ 1.044325] printk: console [ttyS0] enabled
[ 1.049718] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[ 1.082485] sun4i-drm display-engine: bound 1100000.mixer (ops 0xc084b480)
[ 1.090291] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0847f84)
[ 1.099334] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.151472] Console: switching to colour frame buffer device 100x30
[ 1.176320] sun4i-drm display-engine: [drm] fb0: sun4i-drmdrmfb frame buffer device
[ 1.184902] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[ 1.200403] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[ 1.236075] sunxi-mmc 1c0f000.mmc: base:0x(ptrval) irq:104
[ 1.243464] usb_phy_generic usb_phy_generic.1.auto: supply vcc not found, using dummy regulator
[ 1.252535] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[ 1.262848] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[ 1.268752] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 1
[ 1.278147] hub 1-0:1.0: USB hub found
[ 1.282120] hub 1-0:1.0: 1 port detected
[ 1.288917] Waiting for root device /dev/mmcblk0p2...
[ 1.319303] mmc0: invalid bus width
[ 1.322837] mmc0: error -22 whilst initialising SD card
[ 2.462018] mmc0: invalid bus width
[ 2.465550] mmc0: error -22 whilst initialising SD card
[ 3.581942] mmc0: invalid bus width
[ 3.585461] mmc0: error -22 whilst initialising SD card
请问下,会是哪方面的问题呢?谢谢
离线
此SDNAND 使用linux-zero-4.13.y的内核是可以运行起来,
现在想用新的内核,前期使用SD调试都很顺利,
到最后要打包烧录到SDNAND后,却运行不过去
镜像的生成是没有问题的。以前有生成过可用的。
离线
查到,sd_ops.c 中读SD nand的SCR寄存器 的值为0,
把此值手动填充一个值,程序可以运行下去。
还没找到什么问题。
另外请问:如果要修改MMC对sd 卡的读写频率,要在那里设置
如25MHz改成50MHz 要怎么改?
驱动好像是会读取sd卡的参数,再自动修改,请问是在代码中的哪个位置?
最近编辑记录 yuess133 (2022-10-25 14:33:19)
离线