/* Configure the command through generic packet header register.  */
static void gen_write_cmd(unsigned long gen_hdr)
/* Configure the command through generic packet header register.  */
static void gen_write_cmd(unsigned long gen_hdr)
{
    while (HW_MIPI_DSI_CMD_PKT_STATUS.B.GEN_CMD_FULL) ;
    HW_MIPI_DSI_GEN_HDR_WR(gen_hdr);
    while ((!HW_MIPI_DSI_CMD_PKT_STATUS.B.GEN_CMD_EMPTY) &&
           (!HW_MIPI_DSI_CMD_PKT_STATUS.B.GEN_PLD_W_EMPTY)) ;
}