1. 06 Oct, 2016 13 commits
    • Paul Burton's avatar
      of/platform: Probe "isa" busses by default · ecd76ede
      Paul Burton authored
      Since commit 44a7185c ("of/platform: Add common method to populate
      default bus") platforms calling of_platform_bus_probe from an initcall
      is either a rather unsafe race with of_platform_default_populate_init or
      a no-op. The MIPS Malta board needs to probe devices under an ISA bus,
      which we do support in the of_busses array but until now haven't
      included in of_default_bus_match_table.
      
      Add an "isa" entry to of_default_bus_match_table such that we can just
      accept use of of_platform_default_populate_init & remove the
      Malta-specific match table in a later patch.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14275/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      ecd76ede
    • Paul Burton's avatar
      MIPS: Malta: Probe interrupt controllers via DT · 38ec82fe
      Paul Burton authored
      Probe the CPU, GIC & i8259 interrupt controllers present in the Malta
      system using device tree. This enables interrupts to be provided to
      devices using device tree as they are moved over to being probed using
      it.
      
      Since Malta is very configurable it's unknown whether a GIC will be
      present at compile time. In order to support both cases the
      malta_dt_shim code is added in order to detect whether a GIC is present,
      adjusting the DT to route interrupts correctly and nop out the GIC node
      if no GIC is found.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14274/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      38ec82fe
    • Paul Burton's avatar
      MIPS: Malta: Use all available DDR by default · 0051fc2e
      Paul Burton authored
      Malta boards can have more than 256MB DDR available, but we have
      previously only made use of up to 256MB (ie. the DDR accessible via
      kseg0) by default, without the user manually specifying mem= kernel
      parameters. This patch causes all available DDR, as reported by the
      bootloader via the ememsize or memsize environment variables or
      optionally on the command line, to be used when possible without the
      user needing to manually provide the memory ranges.
      
      Malta now has 2 subtly different memory maps which have to be taken into
      account when setting this up. The original memory map (referred to by
      the code as v1) has up to 2GB of DDR aliased in both the upper & lower
      halves of the 32 bit physical address space, with a 256MB I/O region
      obscuring 0x10000000-0x1fffffff only in the lower alias. The revised v2
      memory map is flat with up to 4GB DDR starting from 0x0, and the I/O
      region obscures 256MB of DDR which becomes inacessible. The memory map
      in use is indicated by a register provided by the rocit2 system
      controller, which is checked in order to set up the kernels memory
      ranges accordingly.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14273/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      0051fc2e
    • Paul Burton's avatar
      MIPS: Malta: Allow PCI devices DMA to lower 2GB physical · 422dd256
      Paul Burton authored
      Set the PCI_BAR0 register in all configurations such that PCI devices
      can perform DMA to all of the bottom 2GB of the physical address space.
      This is imperfect if we make use of the legacy Malta memory map, but it
      is an improvement on the inconsistent values setup before.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14272/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      422dd256
    • Paul Burton's avatar
      irqchip: i8259: Remove unused i8259A_irq_pending · 5d2949ec
      Paul Burton authored
      The i8259A_irq_pending function is unused. Remove the dead code.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14271/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      5d2949ec
    • Paul Burton's avatar
      irqchip: i8259: Allow platforms to override poll function · 19afc3d2
      Paul Burton authored
      The default i8259 polling function (i8259_irq) is nicely generic but is
      fairly costly. Platforms often provide an alternative means of polling
      for an i8259 interrupt, and when using the i8259 without device tree
      have typically just chained its parent interrupt to their own handler
      function. In order to allow for platform-specific polling functions to
      be used in cases where the driver is probed via device tree, provide an
      i8259_set_poll function that accepts a pointer to an alternative poll
      function that will override the default.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14270/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      19afc3d2
    • Paul Burton's avatar
      irqchip: i8259: Add domain before mapping parent irq · 690803ac
      Paul Burton authored
      Mapping the parent IRQ will use a virq number which may conflict with
      the hardcoded I8259A_IRQ_BASE..I8259A_IRQ_BASE+15 range that the i8259
      driver expects to be free. If this occurs then we'll hit errors when
      adding the i8259 IRQ domain, since one of its virq numbers will already
      be in use.
      
      Avoid this by adding the i8259 domain before mapping the parent IRQ,
      such that the i8259 virq numbers become used before the parent interrupt
      controller gets a chance to use any of them.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14269/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      690803ac
    • Paul Burton's avatar
      MIPS: SEAD3: Remove custom read_persistent_clock · e6a54ba3
      Paul Burton authored
      The SEAD3 board defines a custom implementation of read_persistent_clock
      which does exactly the same dummy operation as the generic weak version.
      Remove the not really implemented custom version.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14064/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e6a54ba3
    • Paul Burton's avatar
      MIPS: SEAD3: Use img-ascii-lcd driver · 5e189564
      Paul Burton authored
      Probe the img-ascii-lcd driver using device tree in order to display a
      message on the SEAD3 board's LCD display, and remove the platform code
      that was formerly performing this function. This removes more platform
      code and moves SEAD3 further towards being entirely DT-based.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14063/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      5e189564
    • Paul Burton's avatar
      auxdisplay: img-ascii-lcd: driver for simple ASCII LCD displays · 0cad855f
      Paul Burton authored
      Add a driver for simple ASCII LCD displays found on the MIPS Boston,
      Malta & SEAD3 development boards. The Boston display is an independent
      memory mapped device with a simple memory mapped 8 byte register space
      containing the 8 ASCII characters to display. The Malta display is
      exposed as part of the Malta board registers, and provides 8 registers
      each of which corresponds to one of the ASCII characters to display. The
      SEAD3 display is slightly more complex, exposing an interface to an
      S6A0069 LCD controller via registers provided by the boards CPLD.
      However although the displays differ in their register interface, we
      require similar functionality on each board so abstracting away the
      differences within a single driver allows us to share a significant
      amount of code & ensure consistent behaviour.
      
      The driver displays the Linux kernel version as the default message, but
      allows the message to be changed via a character device. Messages longer
      then the number of characters that the display can show will scroll.
      
      This provides different behaviour to the existing LCD display code for
      the MIPS Malta or MIPS SEAD3 platforms in the following ways:
      
        - The default string to display is not "LINUX ON MALTA" or "LINUX ON
          SEAD3" but "Linux" followed by the version number of the kernel
          (UTS_RELEASE).
      
        - Since that string tends to be significantly longer it scrolls twice
          as fast, moving every 500ms rather than every 1s.
      
        - The LCD won't be updated until the driver is probed, so it doesn't
          provide the early "LINUX" string.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14062/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      0cad855f
    • Paul Burton's avatar
      dt-bindings: img-ascii-lcd: Document a binding for simple ASCII LCDs · 8ef3ff27
      Paul Burton authored
      Add documentation for a devicetree binding for the simple ASCII LCD
      displays found on development boards such as the MIPS Boston, MIPS Malta
      & MIPS SEAD3 from Imagination Technologies.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14061/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      8ef3ff27
    • Paul Burton's avatar
      FBDEV: cobalt_lcdfb: Drop SEAD3 support · eb42d760
      Paul Burton authored
      The SEAD3 board no longer uses the cobalt_lcdfb driver, so remove the
      SEAD3-specific code from it.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Ondrej Zary <linux@rainbow-software.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Simon Horman <horms+renesas@verge.net.au>
      Cc: linux-mips@linux-mips.org
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14060/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      eb42d760
    • Paul Burton's avatar
      MIPS: SEAD3: Drop use of cobalt fbdev driver · ec5218a2
      Paul Burton authored
      The 2 line * 16 character LCD display on the SEAD3 board has no real use
      as a framebuffer device. It's far too small to produce any meaningful
      output if used as the kernel console, SEAD3 is a development board that
      will essentially always have a far more useful UART connection & the
      code in sead3-display.c will overwrite whatever's on the display every
      second anyway. Remove this unused code.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14059/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      ec5218a2
  2. 04 Oct, 2016 27 commits