summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-15 16:21:12 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2016-07-20 16:46:04 +0200
commita48c05226d8ca89ba11483e75dad74d373af27e8 (patch)
tree1d8a133b3af7196acbce304f388d611fc22fa4b7
parentbsps/powerpc: Fix shared console driver (diff)
downloadrtems-a48c05226d8ca89ba11483e75dad74d373af27e8.tar.bz2
arm/raspberrypi: cache manager can be used for mailbox synchronization now. Remove workarounds.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/misc/vc.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c b/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c
index 0bec0c2dab..a3753ccc0c 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c
@@ -56,39 +56,8 @@ static inline void bcm2835_mailbox_buffer_flush_and_invalidate(
size_t size
)
{
- uint32_t sctlr_val;
-
- sctlr_val = arm_cp15_get_control();
-
- RTEMS_COMPILER_MEMORY_BARRIER();
- arm_cp15_drain_write_buffer();
-
- if ( sctlr_val & ( ARM_CP15_CTRL_C | ARM_CP15_CTRL_M ) ) {
-#if 0
- /*
- These architecture independent RTEMS API functions should be
- used there but CPU_DATA_CACHE_ALIGNMENT is not defined
- for ARM architecture version used on RPi and functions
- are dummy for now and do not provide required synchronization
- */
- rtems_cache_flush_multiple_data_lines( buf, size );
- rtems_cache_invalidate_multiple_data_lines( buf, size );
-#elif 0
- /* Flush complete data cache, does not work on RPi2 for some reason */
- arm_cp15_data_cache_clean_and_invalidate();
-#else
- /*
- * This is temporal workaround for missing cache meanager
- * which works on RPi2
- */
- size += (uintptr_t)buf & ~63;
- size = (size + 63) & ~63;
- while ( size ) {
- size -= 32;
- arm_cp15_data_cache_clean_and_invalidate_line(buf);
- }
-#endif
- }
+ rtems_cache_flush_multiple_data_lines( buf, size );
+ rtems_cache_invalidate_multiple_data_lines( buf, size );
}
#define BCM2835_MBOX_VAL_LENGTH_MASK( _val_len ) \