From 358d5889ddd4999e488c57eac49e1616889b386d Mon Sep 17 00:00:00 2001 From: Igor Bagnucki Date: Thu, 26 Aug 2021 14:20:23 +0200 Subject: [PATCH] Fix compilation errors part 3 Signed-off-by: Igor Bagnucki --- src/include/cpu/power/istep_6.h | 2 ++ src/soc/ibm/power9/istep_6_11.c | 61 --------------------------------- 2 files changed, 2 insertions(+), 61 deletions(-) diff --git a/src/include/cpu/power/istep_6.h b/src/include/cpu/power/istep_6.h index 716cf8ce37d..7447dc99e47 100644 --- a/src/include/cpu/power/istep_6.h +++ b/src/include/cpu/power/istep_6.h @@ -81,6 +81,8 @@ void istep_6_11(void); #define OCB_PIB_OCBCSR0_OCB_STREAM_MODE (4) #define OCB_PIB_OCBCSR0_OCB_STREAM_TYPE (5) +#define MASK_WOR_INCR (5) + #define PU_PBABAR0 (0x05012B00) #define PU_PBABAR1 (0x05012B01) #define PU_PBABAR2 (0x05012B02) diff --git a/src/soc/ibm/power9/istep_6_11.c b/src/soc/ibm/power9/istep_6_11.c index 2391cac6037..de1b6678085 100644 --- a/src/soc/ibm/power9/istep_6_11.c +++ b/src/soc/ibm/power9/istep_6_11.c @@ -358,64 +358,3 @@ static void put_ocb_indirect( write_scom(PU_OCB_PIB_OCBDR0, io_ocb_buffer[l_index]); } } - -static void get_ocb_indirect( - const uint32_t i_ocb_req_length, - const uint32_t i_oci_address, - uint64_t* io_ocb_buffer) -{ - write_scom(PU_OCB_PIB_OCBAR0, i_oci_address << 32); - for(uint32_t l_loopCount = 0; l_loopCount < i_ocb_req_length; l_loopCount++) - { - io_ocb_buffer[l_loopCount] = read_scom(PU_OCB_PIB_OCBDR0); - } -} - -static void p9_pm_ocb_indir_access( - const p9ocb::PM_OCB_ACCESS_OP i_ocb_op, - const uint32_t i_ocb_req_length, - const uint32_t i_oci_address, - uint64_t* io_ocb_buffer) -{ - write_scom(PU_OCB_PIB_OCBAR0, i_oci_address << 32); - if(i_ocb_op == p9ocb::OCB_PUT) - { - uint64_t ocb_pib = read_scom(PU_OCB_PIB_OCBCSR0_RO); - if((ocb_pib & OCB_PIB_OCBCSR0_OCB_STREAM_MODE) - && (ocb_pib & OCB_PIB_OCBCSR0_OCB_STREAM_TYPE)) - { - uint64_t stream_push_control = read_scom(PU_OCB_OCI_OCBSHCS0_SCOM); - if (stream_push_control & OCB_OCI_OCBSHCS0_PUSH_ENABLE) - for(uint8_t l_counter = 0; l_counter < 4; l_counter++;) - { - if (!(stream_push_control & OCB_OCI_OCBSHCS0_PUSH_FULL)) - { - break; - } - // Hostboot has delay of 0 here - wait_us(1, false); - stream_push_control = read_scom(PU_OCB_OCI_OCBSHCS0_SCOM); - } - } - for(uint32_t l_index = 0; l_index < i_ocb_req_length; l_index++) - { - l_data64.insertFromRight(io_ocb_buffer[l_index], 0, 64); - write_scom(PU_OCB_PIB_OCBDR0, l_data64); - } - } - else if(i_ocb_op == p9ocb::OCB_GET) - { - for(uint32_t l_loopCount = 0; l_loopCount < i_ocb_req_length; l_loopCount++) - { - io_ocb_buffer[l_loopCount] = read_scom(PU_OCB_PIB_OCBDR0); - } - } -} - -static void p9_pm_pba_bar_config( - int bar_index, - int bar_address) -{ - write_scom(PBA_BARs[bar_index], i_pba_bar_addr & 0x1FFFFFFFFFFFFFFF); - write_scom(PBA_BARMSKs[bar_index], 0x300000); -}