Exemplo n.º 1
0
void attach_mad16_mpu(struct address_info *hw_config)
{
	if (board_type < C929)	/* Early chip. No MPU support. Just SB MIDI */
	{
#if defined(CONFIG_MIDI) && defined(CONFIG_MAD16_OLDCARD)

		if (mad_read(MC1_PORT) & 0x20)
			hw_config->io_base = 0x240;
		else
			hw_config->io_base = 0x220;

		hw_config->name = "Mad16/Mozart";
		sb_dsp_init(hw_config);
#endif

		return;
	}
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI)
	if (!already_initialized)
		return;

	hw_config->driver_use_1 = SB_MIDI_ONLY;
	hw_config->name = "Mad16/Mozart";
	attach_uart401(hw_config);
#endif
}
static void
attach_mpu (als300_devc * devc)
{
  struct address_info hw_config;

  hw_config.io_base = devc->mpu_base;
  hw_config.irq = -devc->irq;
  hw_config.dma = -1;
  hw_config.dma2 = -1;
  hw_config.always_detect = 0;
  hw_config.name = "ALS300 MPU";
  hw_config.driver_use_1 = 0;
  hw_config.driver_use_2 = 0;
  hw_config.osdev = devc->osdev;
#ifdef CREATE_OSP
  CREATE_OSP (hw_config.osdev);
#endif
  hw_config.card_subtype = 0;

  if (!probe_uart401 (&hw_config))
    {
      cmn_err (CE_WARN, "MPU-401 was not detected\n");
      return;
    }
  devc->mpu_attached = 1;
  attach_uart401 (&hw_config);
}