如何自定义fsl_fman_ucode_t2080文件

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

如何自定义fsl_fman_ucode_t2080文件

3,264 Views
any815346095
Contributor I

   我的英文水平不是太好,请见谅我用中文描述我的问题吧,抱歉!

应用背景是这样的:

   我们公司参考T2080RDB自己做的板卡,同时把fm1-mac1定义成了SGMII类型的接口(T2080RDB板卡中fm1-mac1默认为xgmii,其他设计和T2080RDB官方板卡一致),该接口接到了一个交换机上。然后我修改了RCW和U-BOOT中SGMII相关的一些配置,保证能与交换机之间建立正常的链路连接。起初,我把nor flash整个片子进行了擦除,然后部署了RCW和uboot文件,待uboot启动完成后通过读寄存器的方式可以看到SGMII链路是正常的;接着又烧写了fsl_fman_ucode_t2080xx.bin文件(此时nor flash中只有rcw、uboot.bin和fsl_fman_ucode_t2080xx.bin文件),烧写完重启板卡,再次读取SGMII链路状态就发现链路无法正常连接了;如果单独擦除fsl_fman_ucode_t2080xx.bin文件,连接又正常了;我不清楚fsl_fman_ucode_t2080xx.bin文件为什么会造成这样的影响,如果不烧写fman文件网络又不能正常收发数据。

   所以,在修改完fm1-mac1的接口类型后,是不是就不能使用t2080rdb工程自带的fman文件了?我该怎么自定义fman文件来匹配我们自己的板子?

Labels (1)
Tags (1)
0 Kudos
5 Replies

3,192 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello leon liu,

在修改完fm1-mac1的接口类型后可以使用SDK 里面带的T2080 fman ucode 文件, 

不需要修改fman ucode 文件来匹配自己的板子。

Thanks

Yiping

0 Kudos

3,192 Views
any815346095
Contributor I

感谢您的回复,之后我会通过添加打印的方式进一步查看该问题。

另外我们公司还有一个自定义的p2020的板卡,该板卡留出了一个srio1端口,同样另一端也是接到了一个交换芯片上。我有几个问题想向您请教下:

1、p2020 srio驱动是不是没有类似usdpaa这样的应用程序来进行测试?因为p2020没有dpaa结构。

2、根据<QorIQ-SDK-1.9-IC-RevA>中第7章16节对Serial Rapid I/0 interface menuconfig进行了相应的设置;但是在配置设备树dts的时候我有几个疑问:

1)该手册中的示例板卡是p4080ds,但是为什么中断号和《P4080RM》上的对不上?

<QorIQ-SDK-1.9-IC-RevA>中的配置:

cc.png

<P4080RM>内部中断一节:

0 Kudos

3,192 Views
any815346095
Contributor I

cc.png

2)下面是我配置的dts:

 rapidio@ffec0000 {
   compatible = "fsl,srio";
     #address-cells = <2>;
    #size-cells = <2>;
   fsl,srio-rmu-handle = <&rmu>;
   /*sleep = <&pmc 0x00080000>;*/
   reg = <0 0xffec0000 0 0x11000>;
   ranges;
 
   port1 {
      #address-cells = <2>;
      #size-cells = <2>;
    cell-index = <1>;
    //ranges = <0 0 0 0xa0000000 0 0x10000000>;
    ranges = <0 0 0 0xa0000000 0 0x10000000>;
   };
 };

rmu: rmu@d3000 {
   #address-cells = <1>;
   #size-cells = <1>;
   compatible = "fsl,srio-rmu";
   reg = <0xd3000 0x500>;
   ranges = <0x0 0xd3000 0x500>;
  
   message-unit@0 {
    compatible = "fsl,srio-msg-unit";
    reg = <0x0 0x100>;
    interrupts = <
     37 2 0 0  /* msg1_tx_irq */
     38 2 0 0>;/* msg1_rx_irq */
   };
   message-unit@100 {
    compatible = "fsl,srio-msg-unit";
    reg = <0x100 0x100>;
    interrupts = <
     39 2 0 0  /* msg2_tx_irq */
     40 2 0 0>;/* msg2_rx_irq */
   };
   doorbell-unit@400 {
    compatible = "fsl,srio-dbell-unit";
    reg = <0x400 0x80>;
    interrupts = <
     33 2 0 0  /* bell_outb_irq */
     34 2 0 0>;/* bell_inb_irq */
   };
   port-write-unit@4e0 {
    compatible = "fsl,srio-port-write-unit";
    reg = <0x4e0 0x20>;
    interrupts = <32 2 1 11>;
   };

0 Kudos

3,192 Views
any815346095
Contributor I

   其中port1 节点中的ranges = <0 0 0 0xa0000000 0 0x10000000>;根据我目前掌握的知识它的起始地址和大小没有一个指定的值,于是我就这样设置的。如果设置成其它值,在fsl_rio.c中request_resource(&iomem_resource, &port->iores)会检测出错误。

   然后中断号我是根据<P2020RM>来设置的。

现在的情况是我想通过该p2020板卡像交换芯片发送维护包,但是在交换机那端没有收到任何数据包,而且在调用fsl_rio_config_read()函数时会出现总线错误。

下面是启动打印:

Setting up RapidIO peer-to-peer network /rapidio@ffec0000                      
fsl-of-rio ffec0000.rapidio: Of-device full name /rapidio@ffec0000             
fsl-of-rio ffec0000.rapidio: Regs: [mem 0xffec0000-0xffed0fff]                                                                         fsl-of-rio ffec0000.rapidio: rmu Regs: [mem 0xffed3000-0xffed34ff]                                                                 fsl-of-rio ffec0000.rapidio: bellirq: 34                                       
 fsl-of-rio ffec0000.rapidio: pwirq: 32                                         
fsl-of-rio ffec0000.rapidio: /rapidio@ffec0000/port1: LAW start 0x00000000a00000
00, size 0x0000000010000000.                                                   
fsl-of-rio ffec0000.rapidio: RapidIO PHY type: Serial                          
fsl-of-rio ffec0000.rapidio: Hardware port width: 4                            
fsl-of-rio ffec0000.rapidio: Training connection status: Single-lane 0         
fsl-of-rio ffec0000.rapidio: RapidIO Common Transport System size: 256         
msg_start = 0                                                                  
/soc@ffe00000/rmu@d3000/message-unit@0: txirq: 37, rxirq 38

 

。。。。。。。。。。。。。。。。

下面是srio初始化完成后,调用

fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid,
   u8 hopcount, u32 offset, int len, u32 *val)函数的打印:

对应参数:fsl_rio_config_read(mport,0, 0,1,0,4,*val)

Machine check in kernel mode.                                                  
Caused by (from MCSR=10008): Bus - Read Data Bus Error                         
Oops: Machine check, sig: 7 [#1]                                               
SMP NR_CPUS=2 P2020 RDB                                                        
Modules linked in:                                                             
NIP: c001be80 LR: c001be1c CTR: c031159c                                       
REGS: effeff10 TRAP: 0204   Not tainted  (3.8.13-rt9)                          
MSR: 00029000 <CE,EE,ME>  CR: 24000422  XER: 20000000                          
TASK = ef9e6be0[1287] 'srio' THREAD: c78aa000 CPU: 1                           
GPR00: c001be1c c78abeb0 ef9e6be0 00000008 00021000 00000005 c0311d58 00000471 
GPR08: 00000004 c06c1174 c06c117c 0000051f 0000051f 10018b54 00000000 00000000 
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 100942ac 100942bc 
GPR24: 1009425c 00000000 1008cf3c 4802dd2c bf888174 c05f75f4 f1080000 ffffffea 
NIP [c001be80] fsl_rio_config_read+0x180/0x190                                 
LR [c001be1c] fsl_rio_config_read+0x11c/0x190                                  
Call Trace:                                                                    
[c78abeb0] [c001be1c] fsl_rio_config_read+0x11c/0x190 (unreliable)             
[c78abed0] [c001bf8c] srio_3210_read+0xfc/0x140                                
[c78abef0] [c00db368] vfs_read+0xb0/0x170                                      
[c78abf10] [c00db474] sys_read+0x4c/0xa8                                       
[c78abf40] [c000e044] ret_from_syscall+0x0/0x3c                                
--- Exception: c01 at 0xff5bf10                                                
    LR = 0x100007bc                                                            
Instruction dump:                                                              
3be00000 386375e4 4cc63182 4853612d 4bfffed4 7c0004ac a09e0000 0c040000        
4c00012c 5484043e 4bffffd4 7c0004ac <809e0000> 0c040000 4c00012c 4bffffc0      
---[ end trace b0977f143707ce9c ]---                                           

                                                         

0 Kudos

3,192 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello leon liu,

请建一个新题来记录你的新的问题, 根据我们系统里面的规则, 一个问题使用一个case 来跟踪。

Thanks,

Yiping

0 Kudos