src/occ_gpe0/apss_init.c
/*
 * Function Specification
 *
 * Name: apss_start_spi_command
 *
 * Description: Writes the P2S_COMMAND register to trigger the execution
 *              of a command loaded into the P2S_WDATA_REG
 *
 * End Function Specification
 */
Function Specification
Name: apss_start_spi_command

Writes the P2S_COMMAND register to trigger the execution
of a command loaded into the P2S_WDATA_REG

End Function Specification
Function Specification Name : apss_start_spi_command Writes the P2S_COMMAND register to trigger the execution of a command loaded into the P2S_WDATA_REG End Function Specification
uint32_t apss_start_spi_command(initGpioArgs_t * args, uint8_t i_noWait)
{
    uint32_t rc = 0;
    uint64_t regValue = 0x8000000000000000;
    rc = putscom_abs(SPIPSS_P2S_COMMAND_REG, regValue);
    if (rc)
    {
        PK_TRACE("apss_start_spi_command: SPIPSS_P2S_COMMAND_REG putscom failed. rc = 0x%08x",
                 rc);
        gpe_set_ffdc(&(args->error), SPIPSS_P2S_COMMAND_REG, rc, 0x8000000000000000);
    }
    else
    {
        busy_wait(5);
        if (!i_noWait)
        {
            rc = wait_spi_completion(&(args->error), SPIPSS_P2S_STATUS_REG, 10);
            if (rc)
            {
                PK_TRACE("apss_start_spi_command: Timed out waiting for ops to complete. rc = 0x%08x",
                         rc);
            }
        }
    }
    return rc;
}
uint32_t apss_start_spi_command ( initGpioArgs_t * args , uint8_t i_noWait ) { uint32_t rc = 0 ; uint64_t regValue = 0x8000000000000000 ; rc = putscom_abs ( SPIPSS_P2S_COMMAND_REG , regValue ) ; if ( rc ) { PK_TRACE ( " " , rc ) ; gpe_set_ffdc ( & ( args -> error ) , SPIPSS_P2S_COMMAND_REG , rc , 0x8000000000000000 ) ; } else { busy_wait ( 5 ) ; if ( ! i_noWait ) { rc = wait_spi_completion ( & ( args -> error ) , SPIPSS_P2S_STATUS_REG , 10 ) ; if ( rc ) { PK_TRACE ( " " , rc ) ; } } } return rc ; }
Function Specification
 Name: apss_start_spi_command
Function Specification Name : apss_start_spi_command
// Start SPI transaction //FFDC set in wait_spi_completion