1. 12 May, 2020 3 commits
    • Willy Tarreau's avatar
      floppy: use symbolic register names in the m68k port · 76373fc6
      Willy Tarreau authored
      Now we can use FD_STATUS and FD_DATA instead of 4 or 5, let's do
      this, and also use STATUS_DMA and STATUS_READY for the status bits.
      
      Link: https://lore.kernel.org/r/20200331094054.24441-4-w@1wt.eu
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
      76373fc6
    • Willy Tarreau's avatar
      floppy: add references to 82077's extra registers · 7d33850a
      Willy Tarreau authored
      This controller provides extra status registers SRA and SRB as well
      as a tape drive register (TDR) and a data rate select register (DSR),
      which are referenced in the sparc port, so let's have their symbolic
      definitions centralized.
      
      Link: https://lore.kernel.org/r/20200331094054.24441-3-w@1wt.euSigned-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
      7d33850a
    • Willy Tarreau's avatar
      floppy: split the base port from the register in I/O accesses · e72e8bf1
      Willy Tarreau authored
      Currently we have architecture-specific fd_inb() and fd_outb() functions
      or macros, taking just a port which is in fact made of a base address and
      a register. The base address is FDC-specific and derived from the local or
      global "fdc" variable through the FD_IOPORT macro used in the base address
      calculation.
      
      This change splits this by explicitly passing the FDC's base address and
      the register separately to fd_outb() and fd_inb(). It affects the
      following archs:
        - x86, alpha, mips, powerpc, parisc, arm, m68k:
          simple remap of port -> base+reg
      
        - sparc32: use of reg only, since the base address was already masked
          out and the FDC controller is known from a static struct.
      
        - sparc64: like x86 for PCI, like sparc32 for 82077
      
      Some archs use inline functions and others macros. This was not
      unified in order to minimize the number of changes to review. For the
      same reason checkpatch still spews a few warnings about things that
      were already there before.
      
      The parisc still uses hard-coded register values and could be cleaned up
      by taking the register definitions.
      
      The sparc per-controller inb/outb functions could further be refined
      to explicitly take an FDC register instead of a port in argument but it
      was not needed yet and may be cleaned later.
      
      Link: https://lore.kernel.org/r/20200331094054.24441-2-w@1wt.eu
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: x86@kernel.org
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
      e72e8bf1
  2. 09 May, 2020 37 commits