This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM6548: Can't mount rootfs on usb storage

Part Number: AM6548

Tool/software: Linux

Hi TI,

SDK version: ti-processor-sdk-linux-am65xx-evm-05.02.00.10

Board: AM65xx EVM

Now I want to mount rootfs on usb storage, but I build the usb driver into kernel (default it is be built into kernel as module), I encounter below error:

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.79+ (gaonian@gaonian-SIMATIC-IPC3000-SMART) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 SMP PREEMPT Thu Jan 24 09:44:34 CST 2019
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Machine model: Texas Instruments AM654 Base Board
[ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002810000 (options '')
[ 0.000000] bootconsole [ns16550a0] enabled
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f1-dma-memory@9b000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009b100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node r5f1-memory@9b100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node r5f0-dma-memory@9c000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009c100000, size 7 MiB
[ 0.000000] OF: reserved mem: initialized node r5f0-memory@9c100000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 512 MiB at 0x00000000c0000000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 2 pages/cpu @ffff80007feb0000 s38936 r8192 d83944 u131072
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Speculative Store Bypass Disable mitigation not required
[ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 31968
[ 0.000000] Kernel command line: console=ttyS3,115200n8 earlycon=ns16550a,mmio32,0x02810000 mtdparts=47040000.ospi.0:512k(ospi.tiboot3),2m(ospi.tispl),5m(ospi.u-boot),128k(ospi.env),-@8m(ospi.rootfs) root=PARTUUID=a7777607-01 rw rootfstype=ext4 rootwait
[ 0.000000] PID hash table entries: 4096 (order: -1, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 262144 (order: 5, 2097152 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 4, 1048576 bytes)
[ 0.000000] Memory: 1493312K/2048000K available (7486K kernel code, 662K rwdata, 2752K rodata, 448K init, 652K bss, 30400K reserved, 524288K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffff000008000000 - 0xffff7bdfffff0000 (126847 GB)
[ 0.000000] .text : 0xffff000008080000 - 0xffff0000087d0000 ( 7488 KB)
[ 0.000000] .rodata : 0xffff0000087d0000 - 0xffff000008a90000 ( 2816 KB)
[ 0.000000] .init : 0xffff000008a90000 - 0xffff000008b00000 ( 448 KB)
[ 0.000000] .data : 0xffff000008b00000 - 0xffff000008ba5808 ( 663 KB)
[ 0.000000] .bss : 0xffff000008ba5808 - 0xffff000008c48b60 ( 653 KB)
[ 0.000000] fixed : 0xffff7fdffe7b0000 - 0xffff7fdffec00000 ( 4416 KB)
[ 0.000000] PCI I/O : 0xffff7fdffee00000 - 0xffff7fdfffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffff7fe000000000 - 0xffff800000000000 ( 128 GB maximum)
[ 0.000000] 0xffff7fe000000000 - 0xffff7fe000200000 ( 2 MB actual)
[ 0.000000] memory : 0xffff800000000000 - 0xffff800080000000 ( 2048 MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] ITS [mem 0x01820000-0x0182ffff]
[ 0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
[ 0.000000] ITS@0x0000000001820000: allocated 1048576 Devices @a0800000 (flat, esz 8, psz 64K, shr 0)
[ 0.000000] ITS: using cache flushing for cmd queue
[ 0.000000] GIC: using LPI property table @0x00000000a00c0000
[ 0.000000] ITS: Allocated 1792 chunks for LPIs
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000
[ 0.000000] CPU0: using LPI pending table @0x00000000a00d0000
[ 0.000000] GIC: using cache flushing for LPI property table
[ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[ 0.000005] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[ 0.008627] Console: colour dummy device 80x25
[ 0.013202] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[ 0.023891] pid_max: default: 32768 minimum: 301
[ 0.028740] Security Framework initialized
[ 0.032994] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes)
[ 0.039876] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes)
[ 0.063293] ASID allocator initialised with 32768 entries
[ 0.068934] Hierarchical SRCU implementation.
[ 0.081497] PCI/MSI: /soc0/interrupt-controller@1800000/gic-its@1000000 domain created
[ 0.089897] Platform MSI: /soc0/interrupt-controller@1800000/gic-its@1000000 domain created
[ 0.106480] smp: Bringing up secondary CPUs ...
[ 0.139613] Detected VIPT I-cache on CPU1
[ 0.139649] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
[ 0.139697] CPU1: using LPI pending table @0x00000000a03b0000
[ 0.139741] CPU1: Booted secondary processor [410fd034]
[ 0.196630] Detected VIPT I-cache on CPU2
[ 0.196670] GICv3: CPU2: found redistributor 100 region 0:0x00000000018c0000
[ 0.196721] CPU2: using LPI pending table @0x00000000a0420000
[ 0.196768] CPU2: Booted secondary processor [410fd034]
[ 0.225041] Detected VIPT I-cache on CPU3
[ 0.225067] GICv3: CPU3: found redistributor 101 region 0:0x00000000018e0000
[ 0.225114] CPU3: using LPI pending table @0x00000000a0480000
[ 0.225146] CPU3: Booted secondary processor [410fd034]
[ 0.225279] smp: Brought up 1 node, 4 CPUs
[ 0.296936] SMP: Total of 4 processors activated.
[ 0.301753] CPU features: detected feature: GIC system register CPU interface
[ 0.309057] CPU features: detected feature: 32-bit EL0 Support
[ 0.315028] CPU features: detected feature: Kernel page table isolation (KPTI)
[ 0.345835] CPU: All CPU(s) started at EL2
[ 0.350054] alternatives: patching kernel code
[ 0.355999] devtmpfs: initialized
[ 0.368705] random: get_random_u32 called from bucket_table_alloc+0x108/0x258 with crng_init=0
[ 0.378319] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.388314] futex hash table entries: 1024 (order: 1, 131072 bytes)
[ 0.396287] pinctrl core: initialized pinctrl subsystem
[ 0.402548] NET: Registered protocol family 16
[ 0.409070] vdso: 2 pages (1 code @ ffff0000087e0000, 1 data @ ffff000008b20000)
[ 0.423324] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.433984] davinci_gpio 600000.main_gpio0: could not find pctldev for node /soc0/pinmux@11c000/arduino_io_d4_to_d9_pins_default, deferring probe
[ 0.447549] davinci_gpio 601000.main_gpio1: IRQ not populated, err = -517
[ 0.454667] davinci_gpio 42110000.wkup_gpio0: could not find pctldev for node /soc0/pinmux@4301c000/arduino_io_d2_to_d3_pins_default, deferring probe
[ 0.479723] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.486605] HugeTLB registered 512 MiB page size, pre-allocated 0 pages
[ 0.495066] omap_i2c 42120000.i2c: could not find pctldev for node /soc0/pinmux@4301c000/wkup_i2c0_pins_default, deferring probe
[ 0.506980] omap_i2c 40b00000.i2c: could not find pctldev for node /soc0/pinmux@4301c000/mcu_i2c0_pins_default, deferring probe
[ 0.518770] omap_i2c 2000000.i2c: could not find pctldev for node /soc0/pinmux@11c2e8/main_i2c0_pins_default, deferring probe
[ 0.530377] omap_i2c 2010000.i2c: could not find pctldev for node /soc0/pinmux@11c2e8/main_i2c1_pins_default, deferring probe
[ 0.541979] omap_i2c 2030000.i2c: could not find pctldev for node /soc0/pinmux@11c000/main_i2c3_pins_default, deferring probe
[ 0.553686] media: Linux media interface: v0.10
[ 0.558351] Linux video capture interface: v2.00
[ 0.563114] pps_core: LinuxPPS API ver. 1 registered
[ 0.568198] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.577558] PTP clock support registered
[ 0.581595] EDAC MC: Ver: 3.0.0
[ 0.585684] Advanced Linux Sound Architecture Driver Initialized.
[ 0.592573] clocksource: Switched to clocksource arch_sys_counter
[ 0.598989] VFS: Disk quotas dquot_6.6.0
[ 0.603114] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[ 0.616936] NET: Registered protocol family 2
[ 0.621914] TCP established hash table entries: 16384 (order: 1, 131072 bytes)
[ 0.629475] TCP bind hash table entries: 16384 (order: 2, 262144 bytes)
[ 0.636537] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.643339] UDP hash table entries: 2048 (order: 0, 65536 bytes)
[ 0.649603] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes)
[ 0.656452] NET: Registered protocol family 1
[ 0.661370] RPC: Registered named UNIX socket transport module.
[ 0.667447] RPC: Registered udp transport module.
[ 0.672264] RPC: Registered tcp transport module.
[ 0.677080] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.683875] Unpacking initramfs...
[ 0.687380] Initramfs unpacking failed: junk in compressed archive
[ 0.697000] Freeing initrd memory: 11328K
[ 0.706189] workingset: timestamp_bits=46 max_order=15 bucket_order=0
[ 0.718044] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.724631] NFS: Registering the id_resolver key type
[ 0.729833] Key type id_resolver registered
[ 0.734119] Key type id_legacy registered
[ 0.738244] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.745284] 9p: Installing v9fs 9p2000 file system support
[ 0.755375] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.762979] io scheduler noop registered
[ 0.767104] io scheduler cfq registered (default)
[ 0.771926] io scheduler mq-deadline registered
[ 0.776564] io scheduler kyber registered
[ 0.782039] [4294966779] evm_clk_get(wkupclk); ................................
[ 0.789539] omap-usb2 4100000.phy: unable to get wkupclk, trying old name
[ 0.796506] omap-usb2 4100000.phy: unable to get usb_phy_cm_clk32k
[ 0.802911] omap-usb2: probe of 4100000.phy failed with error -2
[ 0.809198] [4294966779] evm_clk_get(wkupclk); ................................
[ 0.816685] omap-usb2 4110000.phy: unable to get wkupclk, trying old name
[ 0.823645] omap-usb2 4110000.phy: unable to get usb_phy_cm_clk32k
[ 0.830031] omap-usb2: probe of 4110000.phy failed with error -2
[ 0.837365] pinctrl-single 11c000.pinmux: 185 pins at pa ffff000009c7c000 size 740
[ 0.845258] pinctrl-single 11c2e8.pinmux: 9 pins at pa ffff000009c9c2e8 size 36
[ 0.852962] pinctrl-single 4301c000.pinmux: 70 pins at pa ffff000009cbc000 size 280
[ 0.868013] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[ 0.877360] 40a00000.serial: ttyS1 at MMIO 0x40a00000 (irq = 10, base_baud = 6000000) is a 8250
[ 0.886869] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 11, base_baud = 3000000) is a 8250
[ 0.896129] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 12, base_baud = 3000000) is a 8250
[ 0.904942] console [ttyS3] enabled
[ 0.904942] console [ttyS3] enabled
[ 0.912053] bootconsole [ns16550a0] disabled
[ 0.912053] bootconsole [ns16550a0] disabled
[ 0.932318] loop: module loaded
[ 0.937437] libphy: Fixed MDIO Bus: probed
[ 0.942059] tun: Universal TUN/TAP device driver, 1.6
[ 0.947312] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 0.955140] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.961106] sky2: driver version 1.30
[ 0.965934] VFIO - User Level meta-driver version: 0.3
[ 0.971826] i2c /dev entries driver
[ 0.976290] sdhci: Secure Digital Host Controller Interface driver
[ 0.982476] sdhci: Copyright(c) Pierre Ossman
[ 0.986852] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.993873] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.999965] ti-sci soc0:dmsc: invalid resource
[ 1.005158] optee: probing for conduit method from DT.
[ 1.013186] optee: initialized driver
[ 1.018087] NET: Registered protocol family 17
[ 1.022623] 9pnet: Installing 9P2000 support
[ 1.026988] Key type dns_resolver registered
[ 1.031884] registered taskstats version 1
[ 1.036679] davinci_gpio 600000.main_gpio0: IRQ not populated, err = -517
[ 1.043886] davinci_gpio 601000.main_gpio1: IRQ not populated, err = -517
[ 1.050940] davinci_gpio 42110000.wkup_gpio0: IRQ not populated, err = -517
[ 1.063385] ti-sci soc0:dmsc: invalid resource
[ 1.068018] ti-sci soc0:dmsc: ABI: 2.5 (firmware rev 0x0012 '18.10.0-v2018.10 (Curious Crow)')
[ 1.093751] random: fast init done
[ 1.410936] davinci_gpio 600000.main_gpio0: IRQ not populated, err = -517
[ 1.418132] davinci_gpio 601000.main_gpio1: IRQ not populated, err = -517
[ 1.425186] davinci_gpio 42110000.wkup_gpio0: IRQ not populated, err = -517
[ 1.457152] omap_i2c 42120000.i2c: bus 0 rev0.12 at 400 kHz
[ 1.463516] omap_i2c 40b00000.i2c: bus 1 rev0.12 at 400 kHz
[ 1.493148] rtc-pcf8563 2-0051: low voltage detected, date/time is not reliable.
[ 1.500676] rtc-pcf8563 2-0051: rtc core: registered rtc-pcf8563 as rtc0
[ 1.508222] omap_i2c 2000000.i2c: bus 2 rev0.12 at 400 kHz
[ 1.514558] omap_i2c 2010000.i2c: bus 3 rev0.12 at 400 kHz
[ 1.520765] omap_i2c 2030000.i2c: bus 5 rev0.12 at 400 kHz
[ 1.527780] ti-sci-inta 33d00000.interrupt-controller: ti,sci-dst-irq-type resource type ids not available
[ 1.540109] keystone-pcie 5600000.pcie-rc: Linked as a consumer to phy-910000.serdes.2
[ 1.550564] OF: PCI: host bridge /soc0/pcie-rc@5600000 ranges:
[ 1.556415] OF: PCI: IO 0x18020000..0x1802ffff -> 0x00000000
[ 1.562343] OF: PCI: MEM 0x18030000..0x1fffffff -> 0x18030000
[ 2.568532] keystone-pcie 5600000.pcie-rc: phy link never came up
[ 2.574745] keystone-pcie 5600000.pcie-rc: PCI host bridge to bus 0000:00
[ 2.581539] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.587026] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 2.593205] pci_bus 0000:00: root bus resource [mem 0x18030000-0x1fffffff]
[ 2.600529] pci 0000:00:00.0: BAR 6: assigned [mem 0x18030000-0x1803ffff pref]
[ 2.607763] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 2.613160] pcieport 0000:00:00.0: limiting MRRS to 256
[ 2.618605] pcieport 0000:00:00.0: Signaling PME with IRQ 29
[ 2.624366] pcieport 0000:00:00.0: AER enabled with IRQ 29
[ 2.630860] k3-navss-ringacc 3c000000.ringacc: Ring Accelerator probed rings:818, gp-rings[304,464] sci-dev-id:187
[ 2.641232] k3-navss-ringacc 3c000000.ringacc: dma-ring-reset-quirk: enabled
[ 2.648282] k3-navss-ringacc 3c000000.ringacc: RA Proxy rev. 66344100, num_proxies:64
[ 2.656318] k3-navss-ringacc 2b800000.ringacc: Ring Accelerator probed rings:286, gp-rings[96,255] sci-dev-id:195
[ 2.666580] k3-navss-ringacc 2b800000.ringacc: dma-ring-reset-quirk: enabled
[ 2.673632] k3-navss-ringacc 2b800000.ringacc: RA Proxy rev. 66344100, num_proxies:64
[ 2.682554] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.689182] [drm] No driver support for vblank timestamp query.
[ 2.696367] [drm] Initialized tidss 1.0.0 20180215 for 4a00000.dss on minor 0
[ 3.208567] cadence-qspi 47040000.ospi: Indirect read completion error (-110)
[ 3.215712] cadence-qspi 47040000.ospi: n25q064 (8192 Kbytes)
[ 3.221473] mtd: 47040000.ospi.0: skipping zero sized partition
[ 3.227391] 4 cmdlinepart partitions found on MTD device 47040000.ospi.0
[ 3.234086] Creating 4 MTD partitions on "47040000.ospi.0":
[ 3.239662] 0x000000000000-0x000000080000 : "ospi.tiboot3"
[ 3.246134] 0x000000080000-0x000000280000 : "ospi.tispl"
[ 3.252162] 0x000000280000-0x000000780000 : "ospi.u-boot"
[ 3.258182] 0x000000780000-0x0000007a0000 : "ospi.env"
[ 3.328796] cadence-qspi 47040000.ospi: Cadence QSPI NOR probe failed -517
[ 3.337328] spi spi3.0: not using DMA for McSPI (-19)
[ 3.344528] am65-cpts 310d0000.cpts: CPTS ver 0x4e8a2109, freq:200000000, add_val:4
[ 3.354407] mmc0: Unknown controller version (4). You may experience problems.
[ 3.404583] mmc0: SDHCI controller on 4f80000.sdhci [4f80000.sdhci] using ADMA 64-bit
[ 3.417038] mmc1: Unknown controller version (4). You may experience problems.
[ 3.468582] mmc1: SDHCI controller on 4fa0000.sdhci [4fa0000.sdhci] using ADMA 64-bit
[ 3.492427] omap-mailbox 31f80000.mailbox: omap mailbox rev 0x66fc5900
[ 3.499395] omap-mailbox 31f81000.mailbox: omap mailbox rev 0x66fc5900
[ 3.506790] ti-udma 31150000.udmap: Channels: 267 (tchan: 120, echan: 32, rchan: 150, rflow: 300)
[ 3.530791] ti-udma 285c0000.udmap: Channels: 96 (tchan: 48, echan: 0, rchan: 48, rflow: 96)
[ 4.052571] cadence-qspi 47040000.ospi: Indirect read completion error (-110)
[ 4.059719] cadence-qspi 47040000.ospi: n25q064 (8192 Kbytes)
[ 4.065468] 4 cmdlinepart partitions found on MTD device 47040000.ospi.0
[ 4.072164] Creating 4 MTD partitions on "47040000.ospi.0":
[ 4.077739] 0x000000000000-0x000000080000 : "ospi.tiboot3"
[ 4.084023] 0x000000080000-0x000000280000 : "ospi.tispl"
[ 4.089944] 0x000000280000-0x000000780000 : "ospi.u-boot"
[ 4.095959] 0x000000780000-0x0000007a0000 : "ospi.env"
[ 4.105405] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 4.112896] rtc-pcf8563 2-0051: low voltage detected, date/time is not reliable.
[ 4.120296] rtc-pcf8563 2-0051: hctosys: unable to read the hardware clock
[ 4.224599] tps62363-vout: disabling
[ 4.228172] ALSA device list:
[ 4.231148] No soundcards found.
[ 4.234998] Waiting for root device PARTUUID=a7777607-01...

 

But kernel startup hang in this line:  "[ 4.234998] Waiting for root device PARTUUID=a7777607-01..."

After I debug this issue, I found this reason is  can't get the clock named "wkupclk" when the driver phy-omap-usb2.c be probe

 

  • Hi,

    Thanks for reporting the issue. It appears the usb phy init is called before the clock is ready. The following kernel change will make it work. I have reported the problem to the development team. I will keep you updated.

    diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c
    index 53386a463a18..8dd13c6de413 100644
    --- a/drivers/phy/ti/phy-omap-usb2.c
    +++ b/drivers/phy/ti/phy-omap-usb2.c
    @@ -397,7 +397,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
                    if (IS_ERR(phy->wkupclk)) {
                            dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
                            pm_runtime_disable(phy->dev);
    -                       return PTR_ERR(phy->wkupclk);
    +                       return -EPROBE_DEFER;
                    } else {
                            dev_warn(&pdev->dev,
                                     "found usb_phy_cm_clk32k, please fix DTS\n");
    
  • Hi,

    The dev team has solved the issue with the patch attached below. It will be available in the next Processor SDK release. Please test the patch and let me know if you run into any issue.

    From 273d0919f464300f14e416d2a636cfb2f34d5385 Mon Sep 17 00:00:00 2001
    From: Roger Quadros <rogerq@ti.com>
    Date: Wed, 5 Dec 2018 13:40:34 +0200
    Subject: [PATCH] phy: ti: usb2: Fix logic on -EPROBE_DEFER
    
    If clk_get() returns -EPROBE_DEFER then we should just
    return instead of falling back to old clock name.
    
    Use clk_prepare_enable() and clk_disable_unprepare() instead
    of splitting up prepare/unprepare from enable/disable.
    
    Signed-off-by: Roger Quadros <rogerq@ti.com>
    ---
     drivers/phy/ti/phy-omap-usb2.c | 88 ++++++++++++++++++----------------
     1 file changed, 47 insertions(+), 41 deletions(-)
    
    diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c
    index 53386a463a18..f6470a1b7d5e 100644
    --- a/drivers/phy/ti/phy-omap-usb2.c
    +++ b/drivers/phy/ti/phy-omap-usb2.c
    @@ -139,9 +139,9 @@ static int omap_usb_power_on(struct phy *x)
     
     static int omap_usb2_disable_clocks(struct omap_usb *phy)
     {
    -	clk_disable(phy->wkupclk);
    +	clk_disable_unprepare(phy->wkupclk);
     	if (!IS_ERR(phy->optclk))
    -		clk_disable(phy->optclk);
    +		clk_disable_unprepare(phy->optclk);
     
     	return 0;
     }
    @@ -150,14 +150,14 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
     {
     	int ret;
     
    -	ret = clk_enable(phy->wkupclk);
    +	ret = clk_prepare_enable(phy->wkupclk);
     	if (ret < 0) {
     		dev_err(phy->dev, "Failed to enable wkupclk %d\n", ret);
     		goto err0;
     	}
     
     	if (!IS_ERR(phy->optclk)) {
    -		ret = clk_enable(phy->optclk);
    +		ret = clk_prepare_enable(phy->optclk);
     		if (ret < 0) {
     			dev_err(phy->dev, "Failed to enable optclk %d\n", ret);
     			goto err1;
    @@ -363,63 +363,72 @@ static int omap_usb2_probe(struct platform_device *pdev)
     		}
     	}
     
    -	otg->set_host		= omap_usb_set_host;
    -	otg->set_peripheral	= omap_usb_set_peripheral;
    -	if (phy_data->flags & OMAP_USB2_HAS_SET_VBUS)
    -		otg->set_vbus		= omap_usb_set_vbus;
    -	if (phy_data->flags & OMAP_USB2_HAS_START_SRP)
    -		otg->start_srp		= omap_usb_start_srp;
    -	otg->usb_phy		= &phy->phy;
    -
    -	platform_set_drvdata(pdev, phy);
    -	pm_runtime_enable(phy->dev);
    -
    -	generic_phy = devm_phy_create(phy->dev, NULL, &ops);
    -	if (IS_ERR(generic_phy)) {
    -		pm_runtime_disable(phy->dev);
    -		return PTR_ERR(generic_phy);
    -	}
    -
    -	phy_set_drvdata(generic_phy, phy);
    -	omap_usb_power_off(generic_phy);
    -
    -	phy_provider = devm_of_phy_provider_register(phy->dev,
    -			of_phy_simple_xlate);
    -	if (IS_ERR(phy_provider)) {
    -		pm_runtime_disable(phy->dev);
    -		return PTR_ERR(phy_provider);
    -	}
     
     	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
     	if (IS_ERR(phy->wkupclk)) {
    -		dev_warn(&pdev->dev, "unable to get wkupclk, trying old name\n");
    +		if (PTR_ERR(phy->wkupclk) == -EPROBE_DEFER)
    +			return -EPROBE_DEFER;
    +
    +		dev_warn(&pdev->dev, "unable to get wkupclk %ld, trying old name\n",
    +			 PTR_ERR(phy->wkupclk));
     		phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
    +
     		if (IS_ERR(phy->wkupclk)) {
    -			dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
    -			pm_runtime_disable(phy->dev);
    +			if (PTR_ERR(phy->wkupclk) != -EPROBE_DEFER)
    +				dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
     			return PTR_ERR(phy->wkupclk);
     		} else {
     			dev_warn(&pdev->dev,
     				 "found usb_phy_cm_clk32k, please fix DTS\n");
     		}
     	}
    -	clk_prepare(phy->wkupclk);
     
     	phy->optclk = devm_clk_get(phy->dev, "refclk");
     	if (IS_ERR(phy->optclk)) {
    +		if (PTR_ERR(phy->optclk) == -EPROBE_DEFER)
    +			return -EPROBE_DEFER;
    +
     		dev_dbg(&pdev->dev, "unable to get refclk, trying old name\n");
     		phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m");
    +
     		if (IS_ERR(phy->optclk)) {
    -			dev_dbg(&pdev->dev,
    -				"unable to get usb_otg_ss_refclk960m\n");
    +			if (PTR_ERR(phy->optclk) != -EPROBE_DEFER) {
    +				dev_dbg(&pdev->dev,
    +					"unable to get usb_otg_ss_refclk960m\n");
    +			}
     		} else {
     			dev_warn(&pdev->dev,
     				 "found usb_otg_ss_refclk960m, please fix DTS\n");
     		}
     	}
     
    -	if (!IS_ERR(phy->optclk))
    -		clk_prepare(phy->optclk);
    +	otg->set_host = omap_usb_set_host;
    +	otg->set_peripheral = omap_usb_set_peripheral;
    +	if (phy_data->flags & OMAP_USB2_HAS_SET_VBUS)
    +		otg->set_vbus = omap_usb_set_vbus;
    +	if (phy_data->flags & OMAP_USB2_HAS_START_SRP)
    +		otg->start_srp = omap_usb_start_srp;
    +	otg->usb_phy = &phy->phy;
    +
    +	platform_set_drvdata(pdev, phy);
    +	pm_runtime_enable(phy->dev);
    +
    +	generic_phy = devm_phy_create(phy->dev, NULL, &ops);
    +	if (IS_ERR(generic_phy)) {
    +		pm_runtime_disable(phy->dev);
    +		return PTR_ERR(generic_phy);
    +	}
    +
    +	phy_set_drvdata(generic_phy, phy);
    +	omap_usb_power_off(generic_phy);
    +
    +	phy_provider = devm_of_phy_provider_register(phy->dev,
    +			of_phy_simple_xlate);
    +	if (IS_ERR(phy_provider)) {
    +		pm_runtime_disable(phy->dev);
    +		return PTR_ERR(phy_provider);
    +	}
    +
     
     	usb_add_phy_dev(&phy->phy);
     
    @@ -430,9 +439,6 @@ static int omap_usb2_remove(struct platform_device *pdev)
     {
     	struct omap_usb	*phy = platform_get_drvdata(pdev);
     
    -	clk_unprepare(phy->wkupclk);
    -	if (!IS_ERR(phy->optclk))
    -		clk_unprepare(phy->optclk);
     	usb_remove_phy(&phy->phy);
     	pm_runtime_disable(phy->dev);
     
    -- 
    2.17.1