Thread (45 messages) 45 messages, 4 authors, 2020-03-01

Re: [PATCH 15/16] floppy: separate the FDC's base address from its registers

From: Willy Tarreau <w@1wt.eu>
Date: 2020-02-26 15:46:50
Also in: lkml

On Wed, Feb 26, 2020 at 06:36:52PM +0300, Denis Efremov wrote:
quoted
One place in the ARM code used to check if the port was equal to FD_DOR,
this was changed to testing the register by applying a mask to the port,
as was already done in the sparc code.

The sparc, m68k and parisc code could now be slightly cleaned up to
benefit from the macro definitions above instead of the equivalent
hard-coded values.
Just to note for future ref: the mask (7) can be introduced as define
during future clean up of these magic constants.
I'd rather not add it because if we finish to clean up the internal API,
then we can have fd_outb(value, base, reg) and fd_inb(base, reg) where
reg is one of FD_* and base the base address. In this context we don't
need the mask anymore since the register is placed there verbatim.

I do have another earlier patch which did just that, its just that I
attacked the problem from the wrong side, resulting in too many changes
at once for my taste. But I definitely see how we can finish that job
and make everything almost elegant.

Willy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help