在线时间6 小时
UID3162584
注册时间2015-9-1
NXP金币0
该用户从未签到
新手上路

- 积分
- 41
- 最后登录
- 2017-4-15
|
本帖最后由 lstyle 于 2016-4-18 17:11 编辑
使用的板子是i.MX6 Dual6Quad,sabre-sd,上位机是一个i7的处理器模块,arm这边设置为一个pcie endpoint 设备,但是arm启动之后,显示已经link up,但是不能数据传输,上位机在dos下也没有看到arm这个pci设备。
我在pcie.c里面打开调试宏,然后添加了一些输出,超级终端输出如下:
iMX6 PCIe PCIe EP mode imx_pcie_pltfm_probe entering.
dbi_base maped addr is 1ffc000
PCIe EP: GPR8 0xfffd4000
PCIe EP: GPR12 0xf000090
PCIe EP: GPR8 0xfffd4000
PCIe EP: GPR12 0xf000090
PCIE: imx_pcie_pltfm_probe start link up.
PCIe EP: PLC_REG 0x10120
PCIe EP: GPR1 0x48610005
PCIe EP: GPR4 0xf00000cf
PCIe EP: GPR8 0xfffd4000
PCIe EP: GPR12 0x0f000490
PCIe EP: waiting for link up...
PCIe EP: link up.
PCIe EP: GPR12 0xf000490
PCIe EP: DB_R0 0xbd5c00
PCIe EP: DB_R1 0x8200000
PCIe EP: PCIE_PHY_DEBUG 0xa
PCIe EP: PCIE_PHY_RTUNE_DEBUG 0x0
PCIe EP: PCIE_PHY_RTUNE_STAT 0x1b
PCIe EP: vendor id and device id is 0xdeadbeef
PCIe EP: interrupt pin and line is 0x1ff
rc_ddr_test_reg1 kzalloc
rc_ddr_test_reg2 kzalloc
ioremap_cached
PCIe EP: Starting data transfer...
memcpy 1 eb000000 e4000000
通过这个输出结果发现几个问题:
1.pcie_arb_base_addr = ioremap_cached(PCIE_ARB_BASE_ADDR,rc_ddr_test_region_size);映射空间0x01000000~0x01ffbfff,并且
pcie_arb_base_addr取得返回地址0xeb000000,但是一旦向这段空间进行读写操作,arm就死机。
2.pcie的vendor id 和 device id居然可以读写,手册里面不是写着这个寄存器是只读么。。。
3.目前pcie的link up状态有点奇怪。每次启动之后,arm会卡在PCIe EP: waiting for link up...,然后将上位机单独复位之后,才会link up上。
各位大侠,这个pcie endpoint 的设置是哪里不对么?
|
-
-
pcie.rar
8.56 KB, 下载次数: 1, 下载积分: 威望 1
pcie.c源码
|