Skip to content

Commit

Permalink
Fix compilation errors part 3
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Bagnucki <[email protected]>
  • Loading branch information
Igor Bagnucki committed Aug 27, 2021
1 parent 0b0f708 commit 358d588
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 61 deletions.
2 changes: 2 additions & 0 deletions src/include/cpu/power/istep_6.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
61 changes: 0 additions & 61 deletions src/soc/ibm/power9/istep_6_11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 358d588

Please sign in to comment.