diff options
Diffstat (limited to 'test-app.c')
-rw-r--r-- | test-app.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -26,10 +26,11 @@ enum test_apps { INVALID, - ES_RESET, + ES_RELEASE_CPU_WAIT, ES_MHU, SE_MHU, SE_TIMER, + ES_RESET_TEST, NUM_TEST_APPS }; @@ -98,6 +99,7 @@ struct rpmsg_endpoint_info { #define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2) #define EXTSYS_CPU_WAIT_DISABLE 0x0 +#define EXTSYS_RESET_REQ 0x1 /* MHU test command encoding */ #define BITMASK(x) ((unsigned int)-1 >> ((sizeof(int) * CHAR_BIT) - x)) @@ -119,8 +121,8 @@ enum se_command { SE_NUM_COMMANDS }; -/* Desassert the reset signal of the external system#0 harness */ -static int es_reset_test(void) +/* Desassert the cpuwait signal of the external system#0 harness */ +static int es_release_cpuwait_test(void) { int status; /* Bring external system out of reset */ @@ -160,7 +162,7 @@ static int es_mhu_test(void) epts[1] = fd_es0mhu1_ept; /* Bring external system out of reset */ - es_reset_test(); + es_release_cpuwait_test(); /* * Await ES system boot. Currently there is no signalling mechanism for @@ -263,6 +265,18 @@ static int se_timer_test(void) return 0; } +/* Desassert the reset signal of the external system#0 harness */ +static int es_reset_test(void) +{ + int status; + + /* Bring external system out of reset */ + TRY_OPEN(fd_sdk, "/dev/extsys_ctrl", O_RDWR); + TRY_IOCTL(status, fd_sdk, EXTSYS_RESET_REQ, 0); + TRY_CLOSE(fd_sdk); + return 0; +} + int main(int argc, char *argv[]) { if (argc != 2) { @@ -287,14 +301,16 @@ int main(int argc, char *argv[]) printf("Invalid test app specified\n"); printf("%d test apps are available\n", NUM_TEST_APPS - 1); break; - case ES_RESET: - return es_reset_test(); + case ES_RELEASE_CPU_WAIT: + return es_release_cpuwait_test(); case ES_MHU: return es_mhu_test(); case SE_MHU: return se_mhu_test(); case SE_TIMER: return se_timer_test(); + case ES_RESET_TEST: + return es_reset_test(); } return 0; |