/* Timedia/SUNIX uses a mixture of BARs and offsets Ugh, this is ugly as all hell  */
static int pci_timedia_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_port *port, int idx)
/* Timedia/SUNIX uses a mixture of BARs and offsets Ugh, this is ugly as all hell  */
static int pci_timedia_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_port *port, int idx)
{
	unsigned int bar = 0, offset = board->first_offset;
	switch (idx) {
	case 0:
		bar = 0;
		break;
	case 1:
		offset = board->uart_offset;
		bar = 0;
		break;
	case 2:
		bar = 1;
		break;
	case 3:
		offset = board->uart_offset;
	case 4:
	case 5:
	case 6:
	case 7:
		bar = idx - 2;
	}
	return setup_port(priv, port, bar, offset, board->reg_shift);
}