mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
swim: Refactor SWIM setup
The write to the setup register is really chip initialization, so do it in swim_floppy_init() rather than floppy_open(). Drop the udelay(), which was apparently copied and pasted from swim3.c where it presumably relates to interrupts, of which this chip has none. (See also mkLinux SWIM 3 driver.) Cc: Joshua Thompson <funaho@jurai.org> Signed-off-by: Finn Thain <fthain@linux-m68k.org> Tested-by: Stan Johnson <userm57@yahoo.com> Link: https://patch.msgid.link/e9facb07b20436a6941ec067288e84d8dd9311c0.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
994a778d96
commit
62977e8ea9
|
|
@ -628,8 +628,7 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
|
|||
fs->ref_count = -1;
|
||||
else
|
||||
fs->ref_count++;
|
||||
swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2);
|
||||
udelay(10);
|
||||
|
||||
swim_drive(base, fs->location);
|
||||
swim_motor(base, ON);
|
||||
swim_action(base, SETMFM);
|
||||
|
|
@ -816,6 +815,8 @@ static int swim_floppy_init(struct swim_priv *swd)
|
|||
int drive;
|
||||
struct swim __iomem *base = swd->base;
|
||||
|
||||
swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2);
|
||||
|
||||
swim_set_parameters(base);
|
||||
|
||||
/* scan floppy drives */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user