Commit 706c27d2 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k parport local_irq*() updates

Convert m68k parport drivers to new local_irq*() framework:
  - Atari parport
parent 7f0eb5bd
......@@ -25,11 +25,10 @@ parport_atari_read_data(struct parport *p)
unsigned long flags;
unsigned char data;
save_flags(flags);
cli();
local_irq_save(flags);
sound_ym.rd_data_reg_sel = 15;
data = sound_ym.rd_data_reg_sel;
restore_flags(flags);
local_irq_restore(flags);
return data;
}
......@@ -38,11 +37,10 @@ parport_atari_write_data(struct parport *p, unsigned char data)
{
unsigned long flags;
save_flags(flags);
cli();
local_irq_save(flags);
sound_ym.rd_data_reg_sel = 15;
sound_ym.wd_data = data;
restore_flags(flags);
local_irq_restore(flags);
}
static unsigned char
......@@ -51,12 +49,11 @@ parport_atari_read_control(struct parport *p)
unsigned long flags;
unsigned char control = 0;
save_flags(flags);
cli();
local_irq_save(flags);
sound_ym.rd_data_reg_sel = 14;
if (!(sound_ym.rd_data_reg_sel & (1 << 5)))
control = PARPORT_CONTROL_STROBE;
restore_flags(flags);
local_irq_restore(flags);
return control;
}
......@@ -65,14 +62,13 @@ parport_atari_write_control(struct parport *p, unsigned char control)
{
unsigned long flags;
save_flags(flags);
cli();
local_irq_save(flags);
sound_ym.rd_data_reg_sel = 14;
if (control & PARPORT_CONTROL_STROBE)
sound_ym.wd_data = sound_ym.rd_data_reg_sel & ~(1 << 5);
else
sound_ym.wd_data = sound_ym.rd_data_reg_sel | (1 << 5);
restore_flags(flags);
local_irq_restore(flags);
}
static unsigned char
......@@ -129,12 +125,11 @@ parport_atari_data_forward(struct parport *p)
{
unsigned long flags;
save_flags(flags);
cli();
local_irq_save(flags);
/* Soundchip port B as output. */
sound_ym.rd_data_reg_sel = 7;
sound_ym.wd_data = sound_ym.rd_data_reg_sel | 0x40;
restore_flags(flags);
local_irq_restore(flags);
}
static void
......@@ -143,12 +138,11 @@ parport_atari_data_reverse(struct parport *p)
#if 0 /* too dangerous, can kill sound chip */
unsigned long flags;
save_flags(flags);
cli();
local_irq_save(flags);
/* Soundchip port B as input. */
sound_ym.rd_data_reg_sel = 7;
sound_ym.wd_data = sound_ym.rd_data_reg_sel & ~0x40;
restore_flags(flags);
local_irq_restore(flags);
#endif
}
......@@ -209,15 +203,14 @@ parport_atari_init(void)
unsigned long flags;
if (MACH_IS_ATARI) {
save_flags(flags);
cli();
local_irq_save(flags);
/* Soundchip port A/B as output. */
sound_ym.rd_data_reg_sel = 7;
sound_ym.wd_data = (sound_ym.rd_data_reg_sel & 0x3f) | 0xc0;
/* STROBE high. */
sound_ym.rd_data_reg_sel = 14;
sound_ym.wd_data = sound_ym.rd_data_reg_sel | (1 << 5);
restore_flags(flags);
local_irq_restore(flags);
/* MFP port I0 as input. */
mfp.data_dir &= ~1;
/* MFP port I0 interrupt on high->low edge. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment