summaryrefslogtreecommitdiff
path: root/cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c')
-rw-r--r--cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c42
1 files changed, 10 insertions, 32 deletions
diff --git a/cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c b/cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c
index e94e58c3d9..4a66214a09 100644
--- a/cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c
+++ b/cesar/test_general/hard/bridgedma/src/bridgedma-tx-test.c
@@ -44,7 +44,7 @@ phy_bridgedma_job_t *job_current;
phy_bridgedma_job_t job1, job2, job3;
phy_bridgedma_t *bridgedma_ctx;
-u8 frame_buffer [2048] __attribute__((aligned(2048)));
+u8 frame_buffer [2048];
crc_t crc_ctx;
blk_t *pb_first, *pb_last, *pb_current;
u32 mf_header;
@@ -82,32 +82,6 @@ void _bridgedma_deffered_cb(void *data)
{
}
-void bridgedma_init_test_case(test_t t)
-{
- int user_data;
-
- test_case_begin(t, "init");
-
- test_begin(t, "init")
- {
- bridgedma_ctx = NULL;
- bridgedma_ctx = phy_bridgedma_init(&user_data, _bridgedma_segmentation_cb, _bridgedma_deffered_cb);
-
-
- test_fail_if (bridgedma_ctx == NULL);
- test_fail_if (bridgedma_ctx->job_first != NULL);
- test_fail_if (bridgedma_ctx->job_current != NULL);
- test_fail_if (bridgedma_ctx->job_last != NULL);
- test_fail_if (bridgedma_ctx->user_data != &user_data);
- test_fail_if (bridgedma_ctx->bridgedma_cb != _bridgedma_segmentation_cb);
- test_fail_if (bridgedma_ctx->deferred_cb != _bridgedma_deffered_cb);
- test_fail_if (bridgedma_ctx->status.running);
- test_fail_if (bridgedma_ctx->status.stop != false);
- }
- test_end;
- return;
-}
-
void bridgedma_segmentation_test_case(test_t t)
{
uint i;
@@ -206,6 +180,7 @@ void bridgedma_segmentation_test_case(test_t t)
void
bridgedma_verify_registers (void)
{
+#ifndef __sparc__
// Verify the register corresponding to the MF header1.
volatile uint *job_header_3210 = (uint *) PHY_BRIDGEDMA_JOB_HEADER_3210;
volatile uint *job_header_7654 = (uint *) PHY_BRIDGEDMA_JOB_HEADER_7654;
@@ -217,6 +192,7 @@ bridgedma_verify_registers (void)
diag_printf ("JOB HEADER BRIDGEDMA_7654 : %x\n", *job_header_7654);
diag_printf ("Control : %x\n", *control);
diag_printf ("Job length : %x\n", *job_len);
+#endif
}
void
@@ -350,19 +326,21 @@ test_thread_process (cyg_addrword_t data)
test = (test_t *) data;
- bridgedma_init_test_case (*test);
-
bridgedma_segmentation_test_case (*test);
/* Just to test. */
diag_printf ("Job 1 header : %x\n", job1.mf_header1);
- //diag_printf ("Job 2 header : %x\n", job2.mf_header1);
- //diag_printf ("Job 3 header : %x\n", job3.mf_header1);
+ diag_printf ("Job 2 header : %x\n", job2.mf_header1);
+ diag_printf ("Job 3 header : %x\n", job3.mf_header1);
diag_printf ("The test thread is now sleeping until the bridgedma ends");
- cyg_thread_suspend (my_test_thread_handle);
+ while (job_current != NULL)
+ {
+ cyg_thread_suspend (my_test_thread_handle);
+ }
+
/* */
bridgedma_verify_registers ();