mpc8569e disable rapidio port at bootloader assembly stage

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

mpc8569e disable rapidio port at bootloader assembly stage

跳至解决方案
2,120 次查看
yunyuaner
Contributor I

Hi,

We got a rapidio host and several rapidio agents connected via back plane, the host has trouble in discovering agent, and it's figured out that the host has enumerated  the agent when the agent is in bootloader stage, and when the agent os is loaded, the host can no longer enumerate it again thus failed to send/recv messages to the agent. One solution we can image is to disable rapidio port when the agent is in bootloader assembly stage and re-enable it when os is up. Unfortunately, we never succeed. The assembly code in bootloader is as follows:

#define PmCCSR_0 (CCSRBAR + 0xC015C)

lis r8, HI(PmCCSR_0)

ori r8, r8, LO(PmCCSR_0)

lwz r7, 0(r8)

lis r9, HI(0x00800000)

ori r9, r9, LO(0x00800000)

ori r7, r7, r9

stw r7, 0(r8)

sync

The purpose is to set Port m Control Command and Status Register (PmCCSR) bit 8 to 1, but when we read this register in bootloader command line, the value never changed. we tried many place where to insert the assembly snippet in, both at the very beginning or when CCSR relocated and TLB set up.  Am I doing anything wrong? Please help and thanks in advance!

Regards

Jia

标记 (2)
0 项奖励
回复
1 解答
1,992 次查看
yipingwang
NXP TechSupport
NXP TechSupport

PORBMSR[HA]=001 AND PmCCSR[PD]=1 to disable port 1 to disable port1.

You also can disable the serdes lane using GUT_SRDSCR2 register.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,992 次查看
yunyuaner
Contributor I

Also, there's mistake in the assembly code that made it failed to set the corresponding register correctly.

#define PmCCSR_0 (CCSRBAR + 0xC015C)

lis r8, HI(PmCCSR_0)

ori r8, r8, LO(PmCCSR_0)

lwz r7, 0(r8)

#lis r9, HI(0x00800000)

#ori r9, r9, LO(0x00800000)

#ori r7, r7, r9   /* using ori here is wrong!! */

oris r7, r7, HI(0x00800000)   /* should be corrected like this */

stw r7, 0(r8)

sync

Thanks

Jia

0 项奖励
回复
1,992 次查看
yipingwang
NXP TechSupport
NXP TechSupport

So, at reset setting PmCCSR[OPE] = 0. By doing this they hit the errata SRIO-A004"1. MAINT packet gets queued, but not sent.""The impact section of the errata clearly states that"outbound maintenance request packets will not be transmitted"and inbound maintenance packets may not be responded to.
When PmCCSR[OPE]= 0
- Inbound non-maintenance request packets may be responded to.- If the device configuration allows outbound requests to be pending in the controller, inbound maintenance request packets may not be responded to.- Outbound maintenance request packets will not be transmitted.
My recommendation is to set PmCCSR[OPE]= 1. There are no plans to fix this issue.

0 项奖励
回复
1,992 次查看
yunyuaner
Contributor I

Hi Yiping,

Thanks for your quick reply! As I mentioned, we want to disable rapidio ports in bootloader stage and enable it when os is up, in order to make it not discovered by rio host when in bootloader stage, otherwise the rio host wouldn't re-discovered it again when the agent os is up. So I've tried to set PmCCSR[PD] (Port Disable) to 1, not PmCCSR[OPE]. Unfortunately, I never succeed in setting PmCCSR[PD] to 1 in bootloader assembly code. I've even tried altering it under bootloader command line, but still failed. So, I would like to ask whether or not does my approach work or do I miss something?

Thanks

Jia

0 项奖励
回复
1,993 次查看
yipingwang
NXP TechSupport
NXP TechSupport

PORBMSR[HA]=001 AND PmCCSR[PD]=1 to disable port 1 to disable port1.

You also can disable the serdes lane using GUT_SRDSCR2 register.

0 项奖励
回复