diff options
author | Evan Lojewski <github@meklort.com> | 2019-02-26 23:14:00 -0700 |
---|---|---|
committer | Evan Lojewski <github@meklort.com> | 2019-02-26 23:14:00 -0700 |
commit | 75f57bdd1b949967624930461f7c861688b9431c (patch) | |
tree | 52b93a7be3bb61e075e923996049c7528cdbd27e /stage1 | |
parent | f66d61be75890ff3912af341ecf21e2660768a01 (diff) | |
download | bcm5719-ortega-75f57bdd1b949967624930461f7c861688b9431c.tar.gz bcm5719-ortega-75f57bdd1b949967624930461f7c861688b9431c.zip |
Aquire the APE lock before configuring the MII ports.
Diffstat (limited to 'stage1')
-rw-r--r-- | stage1/CMakeLists.txt | 4 | ||||
-rw-r--r-- | stage1/init_hw.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/stage1/CMakeLists.txt b/stage1/CMakeLists.txt index 1a6bd9e..4c58c9d 100644 --- a/stage1/CMakeLists.txt +++ b/stage1/CMakeLists.txt @@ -52,7 +52,7 @@ mips_add_executable(${PROJECT_NAME} main.c crt.s) -target_link_libraries(${PROJECT_NAME} NVRam-mips MII-mips VPD-mips) +target_link_libraries(${PROJECT_NAME} NVRam-mips MII-mips VPD-mips APE-mips) target_link_libraries(${PROJECT_NAME} bcm5719) target_compile_options(${PROJECT_NAME} PRIVATE -nodefaultlibs) target_link_libraries(${PROJECT_NAME} "--script=${LINKER_SCRIPT}") @@ -65,4 +65,4 @@ simulator_add_executable(sim-${PROJECT_NAME} main.c) target_link_libraries(sim-${PROJECT_NAME} simulator) -target_link_libraries(sim-${PROJECT_NAME} NVRam MII VPD) +target_link_libraries(sim-${PROJECT_NAME} NVRam MII VPD APE) diff --git a/stage1/init_hw.c b/stage1/init_hw.c index 1f087f1..9bf5fc2 100644 --- a/stage1/init_hw.c +++ b/stage1/init_hw.c @@ -45,6 +45,7 @@ #include "stage1.h" #include <MII.h> +#include <APE.h> #include <bcm5719_DEVICE.h> #include <bcm5719_GEN.h> #include <bcm5719_RXMBUF.h> @@ -464,11 +465,13 @@ void init_hw(NVRAMContents_t *nvram) reportStatus(STATUS_INIT_HW, 0xf0); // Perform MII init. + APE_aquireLock(); init_mii_function0(); reportStatus(STATUS_INIT_HW, 0xfe); init_mii(); + APE_releaseLock(); reportStatus(STATUS_INIT_HW, 0xff); } |