/* Converts a parity enum value to a Mode Register bit mask. 
It is assumed that the Mode Register contents that are being modified within this function come with the bits modified by this function already masked out by the caller. */
static bool uart_xlnx_ps_cfg2ll_parity(uint32_t *mode_reg, enum uart_config_parity parity)
/* Converts a parity enum value to a Mode Register bit mask. 
It is assumed that the Mode Register contents that are being modified within this function come with the bits modified by this function already masked out by the caller. */
static bool uart_xlnx_ps_cfg2ll_parity(uint32_t *mode_reg, enum uart_config_parity parity)
{
	switch (parity) {
	default:
	case UART_CFG_PARITY_EVEN:
		*mode_reg |= XUARTPS_MR_PARITY_EVEN;
		break;
	case UART_CFG_PARITY_ODD:
		*mode_reg |= XUARTPS_MR_PARITY_ODD;
		break;
	case UART_CFG_PARITY_SPACE:
		*mode_reg |= XUARTPS_MR_PARITY_SPACE;
		break;
	case UART_CFG_PARITY_MARK:
		*mode_reg |= XUARTPS_MR_PARITY_MARK;
		break;
	case UART_CFG_PARITY_NONE:
		*mode_reg |= XUARTPS_MR_PARITY_NONE;
		break;
	}
	return true;
}