/* Helper routine, converts 'pmctwi_cmd' struct to register format  */
static u32 pmcmsptwi_cmd_to_reg(const struct pmcmsptwi_cmd *cmd)
/* Helper routine, converts 'pmctwi_cmd' struct to register format  */
static u32 pmcmsptwi_cmd_to_reg(const struct pmcmsptwi_cmd *cmd)
{
	return ((cmd->type & 0x3) << 8) |
		(((cmd->write_len - 1) & 0x7) << 4) |
		((cmd->read_len - 1) & 0x7);
}