Toybrick

想在Linux上支持PCIE NVMe 固态硬盘,应该怎么修改内核?

cjlongfei

金牌会员

积分
1051
楼主
发表于 2020-3-25 13:59:09    查看: 8211|回复: 4 | [复制链接]    打印 | 只看该作者
想要支持PCIE NVMe 固态硬盘,应该怎么修改内核?设备树需要改吗
回复

使用道具 举报

addy

超级版主

积分
609
沙发
发表于 2020-3-25 14:26:18 | 只看该作者
正常不需要,主要是兼容性问题。
需要看下是否正确识别PCIE设备。
如果你有PCIE Nvme硬盘,把启动LOG信息发给我确认(dmesg命令查看)
回复

使用道具 举报

cjlongfei

金牌会员

积分
1051
板凳
 楼主| 发表于 2020-3-25 15:56:35 | 只看该作者
硬盘插上去没有反应,设备枚举不出来、lspci看不到设备,dmesg | grep pci的信息如下:
[    0.698433] phy phy-pcie-phy.9: Looking up phy-supply from device tree
[    0.698445] phy phy-pcie-phy.9: Looking up phy-supply property in node /pcie-phy failed
[    0.700578] rockchip-pcie f8000000.pcie: GPIO lookup for consumer ep
[    0.700590] rockchip-pcie f8000000.pcie: using device tree for GPIO lookup
[    0.700620] of_get_named_gpiod_flags: parsed 'ep-gpios' property of node '/pcie@f8000000[0]' - status (0)
[    0.700871] rockchip-pcie f8000000.pcie: Looking up vpcie3v3-supply from device tree
[    0.700885] rockchip-pcie f8000000.pcie: Looking up vpcie3v3-supply property in node /pcie@f8000000 failed
[    0.700901] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[    0.701479] rockchip-pcie f8000000.pcie: Looking up vpcie1v8-supply from device tree
[    0.701492] rockchip-pcie f8000000.pcie: Looking up vpcie1v8-supply property in node /pcie@f8000000 failed
[    0.701506] rockchip-pcie f8000000.pcie: no vpcie1v8 regulator found
[    0.702077] rockchip-pcie f8000000.pcie: Looking up vpcie0v9-supply from device tree
[    0.702089] rockchip-pcie f8000000.pcie: Looking up vpcie0v9-supply property in node /pcie@f8000000 failed
[    0.702102] rockchip-pcie f8000000.pcie: no vpcie0v9 regulator found
[    0.702665] rockchip-pcie f8000000.pcie: missing "memory-region" property
[    0.703279] PCI host bridge /pcie@f8000000 ranges:
[    0.746442] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00
[    0.747033] pci_bus 0000:00: root bus resource [bus 00-1f]
[    0.747542] pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff]
[    0.748162] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfbe00000-0xfbefffff])
[    0.749030] pci 0000:00:00.0: [1d87:0100] type 01 class 0x060400
[    0.749144] pci 0000:00:00.0: supports D1
[    0.749155] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.749409] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.750244] pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-1f] (conflicts with (null) [bus 00-1f])
[    0.750258] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.750287] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.750999] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
[    0.751638] pcie_pme 0000:00:00.0:pcie01: service driver pcie_pme loaded
[    0.751752] aer 0000:00:00.0:pcie02: service driver aer loaded
[    1.525382] ehci-pci: EHCI PCI platform driver
回复

使用道具 举报

addy

超级版主

积分
609
地板
发表于 2020-3-25 18:06:06 | 只看该作者
这个LOG是正常的,没报错。
我们发布的内核已经支持PCIE NVME。
如果你自己修改内核,请把如下内核配置打开:
CONFIG_BLK_DEV_NVME=y
CONFIG_NVMEM=y
回复

使用道具 举报

addy

超级版主

积分
609
5#
发表于 2020-3-25 18:08:58 | 只看该作者
如果枚举成功,会在/dev/目录下增加一个块设备:nvme0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表