diff options
author | Evan Lojewski <github@meklort.com> | 2019-06-05 21:44:59 -0600 |
---|---|---|
committer | Evan Lojewski <github@meklort.com> | 2019-06-05 21:44:59 -0600 |
commit | 4ebc9cccac2fd557c5261be7adc2d4de22488029 (patch) | |
tree | 549cd77c6ea60d90ffdc18b2819f859fd862ec8e /ape | |
parent | c75332ef9fdd8de33c860f6efe409433e553b7c7 (diff) | |
download | bcm5719-ortega-4ebc9cccac2fd557c5261be7adc2d4de22488029.tar.gz bcm5719-ortega-4ebc9cccac2fd557c5261be7adc2d4de22488029.zip |
Begin adding support for clang-format
Diffstat (limited to 'ape')
-rw-r--r-- | ape/CMakeLists.txt | 2 | ||||
-rw-r--r-- | ape/main.c | 4 | ||||
-rw-r--r-- | ape/rmu.c | 3 | ||||
-rw-r--r-- | ape/vectors.c | 9 |
4 files changed, 10 insertions, 8 deletions
diff --git a/ape/CMakeLists.txt b/ape/CMakeLists.txt index 0159e1d..732a8d1 100644 --- a/ape/CMakeLists.txt +++ b/ape/CMakeLists.txt @@ -58,6 +58,8 @@ target_link_libraries(${PROJECT_NAME} NVRam-arm MII-arm APE-arm Network-arm NCSI target_link_libraries(${PROJECT_NAME} bcm5719-arm) target_compile_options(${PROJECT_NAME} PRIVATE -nodefaultlibs) +format_target_sources(${PROJECT_NAME}) + # Simulator add_executable # simulator_add_executable(sim-${PROJECT_NAME} # init_hw.c @@ -120,10 +120,10 @@ void handleBMCPacket(void) { // stat.print(); int32_t words = DIVIDE_RND_UP(bytes, sizeof(uint32_t)); - if(words > ARRAY_ELEMENTS(buffer)) + if (words > ARRAY_ELEMENTS(buffer)) { // This should never happen... - while(words--) + while (words--) { // Read out the packet, but drop it. uint32_t word = APE_PERI.BmcToNcReadBuffer.r32; @@ -101,8 +101,7 @@ void initRMU(void) // START, and setting unknown bit 26 to 1. RegAPE_PERIArbControl_t arbControl; arbControl.r32 = (1 << 26); - arbControl.bits.PackageID = - 0; /* TODO: allow to be configured as per NC-SI spec. */ + arbControl.bits.PackageID = 0; /* TODO: allow to be configured as per NC-SI spec. */ arbControl.bits.Start = 1; arbControl.bits.TKNREL = 0x14; APE_PERI.ArbControl = arbControl; diff --git a/ape/vectors.c b/ape/vectors.c index ff296ab..2eabe34 100644 --- a/ape/vectors.c +++ b/ape/vectors.c @@ -48,10 +48,11 @@ typedef void (*vector_t)(void) __attribute__((interrupt)); // Vector table -typedef struct { - uint32_t* sp; - vector_t* __start; - vector_t* vectors[46]; +typedef struct +{ + uint32_t *sp; + vector_t *__start; + vector_t *vectors[46]; } vector_table_t; extern uint32_t _estack; |