This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:mcapi:control_sharc_cores [24 Jul 2020 11:12] Sunny Feng created |
resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:mcapi:control_sharc_cores [10 Dec 2020 10:46] Sunny Feng [Example - Use corectrl device from source code] |
||
---|---|---|---|
Line 40: | Line 40: | ||
=== The corectrl Device === | === The corectrl Device === | ||
- | + | Enable the core control driver by using the below command: | |
- | A new corectrl device has been created to allow Linux user to enable and disable the SHARC cores. See icc.h for macro values. | + | <code> |
+ | $ bitbake linux-adi -c menuconfig | ||
+ | CONFIG_CORE_CONTROL: | ||
+ | ICC core control, control the DSP devices at the side of ARM Core, which | ||
+ | provides some commands e.g. Start, Stop, and Set the vector value | ||
+ | Symbol: CORE_CONTROL [=y] | ||
+ | Type : bool | ||
+ | Prompt: icc core control | ||
+ | Location: | ||
+ | -> Device Drivers | ||
+ | -> Staging drivers (STAGING [=y]) | ||
+ | -> icc driver (ICC [=y]) | ||
+ | </code> | ||
+ | A new corectrl device would be created to allow Linux user to enable and disable the SHARC cores. See icc.h for macro values. | ||
The device, /dev/corectrl, supports the following ioctl requests: | The device, /dev/corectrl, supports the following ioctl requests: | ||
Line 54: | Line 67: | ||
:The number of the core to start or stop. Values accepted are CCTRL_CORE1 and CCTRL_CORE2. | :The number of the core to start or stop. Values accepted are CCTRL_CORE1 and CCTRL_CORE2. | ||
- | === Usage Example === | + | ==== Example: Use corectrl device from source code ==== |
An example to enable both cores is as follows: | An example to enable both cores is as follows: | ||
Line 86: | Line 99: | ||
\\ | \\ | ||
- | ==== Usage Example ==== | + | ==== Example: Use corecontrol from user space ==== |
<code> | <code> |