This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to modify the value of AWCACHE [3:0] and ARCACHE[3:0] in AXI?

hey,

How to modify the value of AWCACHE [3:0] and ARCACHE[3:0] in AXI?

in baremental driver ,the default value of AWCACHE [3:0] and ARCACHE[3:0] is 0x00,

but in linux driver ,the default value of AWCACHE [3:0] and ARCACHE[3:0] is 0x01,

can anybody tell me how to modify the value to 0x00 in linux driver?

thanks so much!

Parents
  • Hi zynq,

    The ARCACHE and AWCACHE signals are driven by the AXI master, so it will depend on that master design how these outputs are driven.

    If the AXI master contains an MMU or MPU where memory regions and their characteristics are defined, it will be down to how you configure that MPU/MMU that decides the appropriate AxCACHE values driven for each address range. So you should then refer to the AXI master's documentation to understand how to control these outputs.

    However more basic AXI masters might not care how AxCACHE is driven, and so they would be tied off to static values, with 0x0 or 0x1 indicating basic "Device" type accesses according to the AXI protocol, meaning the transfers should always reach the destination device (not held in a cache). So a safe default value.

    But as you are asking specifically about a "linux driver", what is the Linux driver driving ?

    Unless the driver is just driving a simple AXI master where you have defined ways of specifying all outputs (i.e. you would need to check the driver's documentation), one of the above scenarios will probably answer your question (you need to configure an MPU/MMU using the driver, or you cannot control AxCACHE using the driver because these outputs are tied off in the master implementation).

    Hope that maybe helps you find an answer.

    JD

Reply
  • Hi zynq,

    The ARCACHE and AWCACHE signals are driven by the AXI master, so it will depend on that master design how these outputs are driven.

    If the AXI master contains an MMU or MPU where memory regions and their characteristics are defined, it will be down to how you configure that MPU/MMU that decides the appropriate AxCACHE values driven for each address range. So you should then refer to the AXI master's documentation to understand how to control these outputs.

    However more basic AXI masters might not care how AxCACHE is driven, and so they would be tied off to static values, with 0x0 or 0x1 indicating basic "Device" type accesses according to the AXI protocol, meaning the transfers should always reach the destination device (not held in a cache). So a safe default value.

    But as you are asking specifically about a "linux driver", what is the Linux driver driving ?

    Unless the driver is just driving a simple AXI master where you have defined ways of specifying all outputs (i.e. you would need to check the driver's documentation), one of the above scenarios will probably answer your question (you need to configure an MPU/MMU using the driver, or you cannot control AxCACHE using the driver because these outputs are tied off in the master implementation).

    Hope that maybe helps you find an answer.

    JD

Children