summaryrefslogtreecommitdiffstats
path: root/ape
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2019-06-05 21:44:59 -0600
committerEvan Lojewski <github@meklort.com>2019-06-05 21:44:59 -0600
commit4ebc9cccac2fd557c5261be7adc2d4de22488029 (patch)
tree549cd77c6ea60d90ffdc18b2819f859fd862ec8e /ape
parentc75332ef9fdd8de33c860f6efe409433e553b7c7 (diff)
downloadbcm5719-ortega-4ebc9cccac2fd557c5261be7adc2d4de22488029.tar.gz
bcm5719-ortega-4ebc9cccac2fd557c5261be7adc2d4de22488029.zip
Begin adding support for clang-format
Diffstat (limited to 'ape')
-rw-r--r--ape/CMakeLists.txt2
-rw-r--r--ape/main.c4
-rw-r--r--ape/rmu.c3
-rw-r--r--ape/vectors.c9
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
diff --git a/ape/main.c b/ape/main.c
index 4dfd897..34bdd81 100644
--- a/ape/main.c
+++ b/ape/main.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;
diff --git a/ape/rmu.c b/ape/rmu.c
index 9407b73..4284b8c 100644
--- a/ape/rmu.c
+++ b/ape/rmu.c
@@ -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;
OpenPOWER on IntegriCloud