src/occ_gpe1/gpe_centaur.c
///////////////////////////////////////////////////////////////
// These are PPE specific PBA routines.
//////////////////////////////////////////////////////////////
These are PPE specific PBA routines.
These are PPE specific PBA routines .
int
gpe_pba_parms_create(GpePbaParms* parms,
                     int slave,
                     int write_ttype,
                     int write_tsize,
                     int read_ttype)
{
    pba_slvctln_t* slvctl, *mask;
    pba_slvrst_t* slvrst;
    pba_slvrst_t* slvrst_in_progress;
    uint64_t all1 = 0xffffffffffffffffull;
    parms->slave_id = slave;
    slvctl = &(parms->slvctl);
    mask = &(parms->mask);
    slvrst = &(parms->slvrst);
    slvrst_in_progress = &(parms->slvrst_in_progress);
    parms->slvctl_address = PBA_SLVCTLN(slave);
    slvrst->value = 0;
    slvrst->fields.set = PBA_SLVRST_SET(slave);
    slvrst_in_progress->value = 0;
    slvrst_in_progress->fields.in_prog = PBA_SLVRST_IN_PROG(slave);
    slvctl->value = 0;
    mask->value = 0;
    slvctl->fields.enable = 1;
    mask->fields.enable = all1;
    slvctl->fields.mid_match_value = OCI_MASTER_ID_GPE1;
    mask->fields.mid_match_value = all1;
    slvctl->fields.mid_care_mask = all1;
    mask->fields.mid_care_mask = all1;
    slvctl->fields.write_ttype = write_ttype;
    mask->fields.write_ttype = all1;
    slvctl->fields.write_tsize = write_tsize;
    mask->fields.write_tsize = all1;
    slvctl->fields.read_ttype = read_ttype;
    mask->fields.read_ttype = all1;
    slvctl->fields.buf_alloc_a = 1;
    slvctl->fields.buf_alloc_b = 1;
    slvctl->fields.buf_alloc_c = 1;
    slvctl->fields.buf_alloc_w = 1;
    mask->fields.buf_alloc_a = 1;
    mask->fields.buf_alloc_b = 1;
    mask->fields.buf_alloc_c = 1;
    mask->fields.buf_alloc_w = 1;
    if (read_ttype == PBA_READ_TTYPE_CI_PR_RD)
    {
        slvctl->fields.buf_invalidate_ctl = 1;
        mask->fields.buf_invalidate_ctl = all1;
        slvctl->fields.read_prefetch_ctl = PBA_READ_PREFETCH_NONE;
        mask->fields.read_prefetch_ctl = all1;
    }
    else
    {
        slvctl->fields.buf_invalidate_ctl = 0;
        mask->fields.buf_invalidate_ctl = all1;
    }
    mask->value = ~(mask->value);
    return 0;
}
int gpe_pba_parms_create ( GpePbaParms * parms , int slave , int write_ttype , int write_tsize , int read_ttype ) { pba_slvctln_t * slvctl , * mask ; pba_slvrst_t * slvrst ; pba_slvrst_t * slvrst_in_progress ; uint64_t all1 = 0xffffffffffffffffull ; parms -> slave_id = slave ; slvctl = & ( parms -> slvctl ) ; mask = & ( parms -> mask ) ; slvrst = & ( parms -> slvrst ) ; slvrst_in_progress = & ( parms -> slvrst_in_progress ) ; parms -> slvctl_address = PBA_SLVCTLN ( slave ) ; slvrst -> value = 0 ; slvrst -> fields . set = PBA_SLVRST_SET ( slave ) ; slvrst_in_progress -> value = 0 ; slvrst_in_progress -> fields . in_prog = PBA_SLVRST_IN_PROG ( slave ) ; slvctl -> value = 0 ; mask -> value = 0 ; slvctl -> fields . enable = 1 ; mask -> fields . enable = all1 ; slvctl -> fields . mid_match_value = OCI_MASTER_ID_GPE1 ; mask -> fields . mid_match_value = all1 ; slvctl -> fields . mid_care_mask = all1 ; mask -> fields . mid_care_mask = all1 ; slvctl -> fields . write_ttype = write_ttype ; mask -> fields . write_ttype = all1 ; slvctl -> fields . write_tsize = write_tsize ; mask -> fields . write_tsize = all1 ; slvctl -> fields . read_ttype = read_ttype ; mask -> fields . read_ttype = all1 ; slvctl -> fields . buf_alloc_a = 1 ; slvctl -> fields . buf_alloc_b = 1 ; slvctl -> fields . buf_alloc_c = 1 ; slvctl -> fields . buf_alloc_w = 1 ; mask -> fields . buf_alloc_a = 1 ; mask -> fields . buf_alloc_b = 1 ; mask -> fields . buf_alloc_c = 1 ; mask -> fields . buf_alloc_w = 1 ; if ( read_ttype == PBA_READ_TTYPE_CI_PR_RD ) { slvctl -> fields . buf_invalidate_ctl = 1 ; mask -> fields . buf_invalidate_ctl = all1 ; slvctl -> fields . read_prefetch_ctl = PBA_READ_PREFETCH_NONE ; mask -> fields . read_prefetch_ctl = all1 ; } else { slvctl -> fields . buf_invalidate_ctl = 0 ; mask -> fields . buf_invalidate_ctl = all1 ; } mask -> value = ~ ( mask -> value ) ; return 0 ; }
These are PPE specific PBA routines.
These are PPE specific PBA routines .