how to set RIO_DEVICE_ID and RIO_SYS_SIZE in Uboot/linux for P2040???

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to set RIO_DEVICE_ID and RIO_SYS_SIZE in Uboot/linux for P2040???

3,603件の閲覧回数
gouravjain
Contributor IV

Hi All,

I am working on P2040 processor and found difficulty to set "RIO_DEVICE_ID and RIO_SYS_SIZE" values. If any body has any lead over here so pls help me. suggestions would be highly appreciated.

rgds,

Gouarv

ラベル(1)
21 返答(返信)

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please configure "RIO_DEVICE_ID" and "RIO_SYS_SIZE" in RCW, please refer P2041 RCW Field Descriptions.

pastedImage_0.png

pastedImage_1.png

You could download and install QCS tool from PE_QORIQ_SUITE: Processor Expert Software: QorIQ Configuration Suite, then use it to import and modify the RCW file.


Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

Hi Yiping,

Thanks for your response....

Actually, i have gone through that page but my doubt is,

RIO_DEVICE_ID: If RapidIO is configured as a host, BDID = {0b0000_0, RCW[RIO_DEVICE_ID](260-262)}. so how can we set three bits(260-262)??? Because here they have "0b0000_0".

RIO_SYS_SIZE: how can we determine system is small or large??

rgds,

Gouarv

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

As usual bits(260-262) are assigned to 0(as default), because discovery and enumeration way is performed by software, for example, on the host board you need to specify the bootargs as "riohdid=0".

All the agents have an initial device ID of 0xFF. After the host discovers them, the host must allocate a permanent device ID by writing into the base device ID command and status register (BDIDCSR). In the example, the host device, connected to Port 0, has a device ID of 0x00. The host allocates device IDs in ascending order to the agents it discovered.

Additionally, Boot code device IDs are set to 0xFE

Non-boot-code and non-host device IDs are set to 0xFF.

Only in some special system, it is needed to assigned the device ID statically. he system becomes ready to operate immediately after powerup without need of discovery and enumeration.


The RapidIO specification defines two transport modes: large and small. In a small transport systems, source and destination IDs are 8 bits, and therefore a system can consist of up to 256 devices. In a large transport system, with 16-bit source and destination IDs, up to 65,536 devices can be supported.


Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

Hi,

that was really nice explanation. Could you please suggest me any application note or doc to perform  SRIO testing of the processor...

rgds,

Gouarv

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

SDK 1.5 provides some application demos about RapidIO.

In Linux Kernel, RapidIO driver is provided, and the user could use RIONET ethernet over RapidIO to do verification, please refer to "RapidIO2 User Manual" in SDK documents, I attached it for you.

The SDK also provides SRIO Linux user space driver, about how to use SRIO, please refer to "9.2.15 Freescale USDPAA SRA User Manual" in SDK document sdk_documentation\pdf\QorIQ_SDK_Infocenter.pdf.

There is an application note "Serial RapidIO Bring-Up Procedure on PowerQUICC", probably it is helpful for you for some basic conceptions, please refer to http://cache.freescale.com/files/32bit/doc/app_note/AN2932.pdf?&Parent_nodeId=&Parent_pageType=.


Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,264件の閲覧回数
gouravjain
Contributor IV

Hi Yiping,

Do u have any idea about Master port private data(rio.h)????

rgds,

Gourav

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gourav,

About this topic, I need to add more explanation.

Unlike P4080 using RMU in SRIO controller, P2041/P3041/P5020 has the next generation RapidIO Message Unit with different interrupt structure(RMAN), RMAN data is put to or get from QMAN Work Queue, QMAN Software Portal could be configured to interrupt request to the MPIC.

In the current SDK, RIONET driver provided in Linux Kernel is only for RMU.

So please refer to USDPAA FRA driver(user space) supporting RMAN, please refer to the section "Freescale P5020/P3041 USDPAA FRA User Manual" and " Freescale P3041/P4080/P5020 USDPAA SRA User Manual" in Linux SDK documents QorIQ_SDK_Infocenter.pdf .



Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,264件の閲覧回数
gouravjain
Contributor IV

hi,

You suggested "The SDK also provides SRIO Linux user space driver, about how to use SRIO, please refer to "9.2.15 Freescale USDPAA SRA User Manual" in SDK document sdk_documentation\pdf\QorIQ_SDK_Infocenter.pdf." for the SRA. BUt im not getting clear idea where i need to do register settings and all. There they have mentioned " SRA commnd description and SRA command usage". Pls check the link

http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2046585.html

http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2046584.html

it can be done through codewarrior or something else is required??? If any relevant doc is there so pls share with me.

rgds,

Gourav

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to SRIO user space driver srio_driver.c provided in USDPAA.

If you develop non OS project with CodeWarrior, I suggest you download NetComm Software from NetComm_Software: NetComm Software Resources, I attached SRIO and RMAN drivers from NetComm for you.

Thanks,

Yiping

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

I didnt get what exactly you want to say by "non os project"..... and can you post the exact path where srio_driver.c file is recommended....

rgds,

gourav

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Because you mentioned CodeWarrior, which is often used to develop bare board project without OS.

If you are using Linux, please refer to drivers provided in USDPAA(Linux user space drivers).

For anything unclear, please feel free to let me know.

Thanks,

Yiping

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

still not able to see srio_driver.c path...pls share the link

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

HI,

waiting for your quick reply am unable to track path of srio_driver.c. And how this file is different from fsl_rio.c??

rgds,

Gourav

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gourav,

srio_driver.c is the user space SRIO driver provided in drivers/srio/ of usdpaa source.

If you installed Yocto SDK, you could get usdpaa source as the following.

$ bitbake usdpaa -c patch -f

usdpaa source code will be got in

build_<platform>_release/tmp/work/<platform>-fsl_networking-linux-gnuspe/usdpaa/git-r4/git.

arch/powerpc/sysdev/fsl_rio.c is Linux Kernel driver.

I recommended you to use usdpaa, because Linux Kernel just provides RapidIO Message Unit(RMU) driver as arch/powerpc/sysdev/fsl_rmu.c, and RMAN (RapidIO message manager) driver is only provided in USDPAA.


Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

Hi Yiping,

Having so many confusion here,

Let me explain the scenario....

Actually, in our card we have total 2 number of P-2040 processor & i want to make sure that SRIO link is up in between these two.  you already have suggested two ways in your previous message,

Case 1: The SDK also provides SRIO Linux user space driver, about how to use SRIO, please refer to "9.2.15 Freescale USDPAA SRA User Manual" in SDK document sdk_documentation\pdf\QorIQ_SDK_Infocenter.pdf.

Problem : here concept is exactly matching with as i wanted. But i am not getting where these commands are  being given???

[http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2046585.html]

Case 2: There is an application note "Serial RapidIO Bring-Up Procedure on PowerQUICC", probably it is helpful for you for some basic conceptions, please refer to http://cache.freescale.com/files/32bit/doc/app_note/AN2932.pdf?&Parent_nodeId=&Parent_pageType=.

Problem :  it seems also good as far as we concern concept but which from where i can get user space driver code ???

Case 3: How srio_driver.c code is related with above two cases??

Thanks in advance!!

rgds,

Gourav

0 件の賞賛
返信

2,264件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gourav,

SRA is a simple demo to show customer how to use Rapid IO user space driver, it is enough for you to verify the basic SRIO link.

In order to use this demo, you need to build "usdpaa" into filesystem.

Please open the recipe meta-fsl-networking/images/fsl-image-core.bb, and add "usdpaa" in the variable IMAGE_INSTALL, and run "bitbake fsl-image-core" to rebuild rootfs filesystem.

In addtion, you also need to boot the system with usdpaa dtb like <platform_name>-usdpaa.dtb.

Please kindly let me know whether you can usdpaa source code as the following.

$ bitbake usdpaa -c patch -f

usdpaa source code will be got in

build_<platform>_release/tmp/work/<platform>-fsl_networking-linux-gnuspe/usdpaa/git-r4/git.

srio_driver.c is SRIO user space driver, and SRA is simple demo(sample application) to utilize SRIO user space driver.

USDPAA SRIO driver also needs Kernel support, please make sure the following is enabled

Device Drivers --->

            <*> Userspace I/O drivers --->

                            <*> Freescale Serial RapidIO support

                            <*> Freescale

.

Thanks,

Yiping

2,264件の閲覧回数
gouravjain
Contributor IV

Hello Yiping,

So far i didn't have SDK. So now, Trying to download SDK v1.6 then i will integrate it as u suggested. I'll update you as soon as i reach there.

Mean while, gone through SRA part where they have mentioned RCW files for P2041rdb. (http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2046583.html) Here, in RCW 640 bits are being used while as per the Reference manual RCW contains only 512 bits. Could you pls clear it ??

rgds,

Gourav

0 件の賞賛
返信

2,263件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gourav,

00000000: AA55 AA55 010E 0100 1260 0000 0000 0000

00000010: 241C 0000 0000 0000 0899 30C0 C7C0 2000

00000020: FE80 0000 4000 0000 0000 0000 0000 0000

00000030: 0000 0000 D003 0F07 0000 0000 0000 0000

00000040: 0000 0000 0000 0000 0813 8040 57B0 F7D9

This is PBL image code, please refer to the following data structure format.

1. Preamble : 0xAA55-AA55 (no need to change)

2.Command : Write RCW Status registers : 0x010E-0100 (no need to change)

3. RCW Data : 64 bytes

4. (Optional) PBI commands

5. Command : End 0x0813-8040 (no need to change)


6. CRC : 0xhhhh-hhhh ; CRC32-MPEG2 format



Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,263件の閲覧回数
gouravjain
Contributor IV

Hi,

Tried to install SDK-1.6 in my machine having Ubuntu 12.04. Poky installation ie being done properly after that when i run bitbake core-image-minimal

found these errors:

gouravjain@gouravjain-HP-Pro-3330-MT:~/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/build$ bitbake core-image-minimalERROR: Traceback (most recent call last):

  File "/home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/bitbake/lib/bb/cookerdata.py", line 163, in wrapped

    return func(fn, *args)

  File "/home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file

    return bb.parse.handle(fn, data, include)

  File "/home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/bitbake/lib/bb/parse/__init__.py", line 99, in handle

    return h['handle'](fn, data, include)

  File "/home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle

    abs_fn = resolve_file(fn, data)

  File "/home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/bitbake/lib/bb/parse/__init__.py", line 122, in resolve_file

    raise IOError("file %s not found" % fn)

IOError: file /home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/meta-lab1-qemux86/conf/layer.conf not found

ERROR: Unable to parse /home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/meta-lab1-qemux86/conf/layer.conf: file /home/gouravjain/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/meta-lab1-qemux86/conf/layer.conf not found

gouravjain@gouravjain-HP-Pro-3330-MT:~/QorIQ-SDK-V1.6-20140619-yocto/poky-daisy-11.0.0/build$

Have you ever come across this issues ??  once this issue will be resolved, i will integrate USDPAA with kernel as you suggested earlier.

rgds,

Gourav

0 件の賞賛
返信

2,264件の閲覧回数
gouravjain
Contributor IV

ohk...let me go through that...then again i will discuss with u ...

thanks !!

rgds,

Gourav

0 件の賞賛
返信