]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: malta: Use img-ascii-lcd driver for LCD display
authorPaul Burton <paul.burton@mips.com>
Tue, 20 Nov 2018 23:59:56 +0000 (23:59 +0000)
committerPaul Burton <paul.burton@mips.com>
Wed, 21 Nov 2018 05:05:39 +0000 (21:05 -0800)
Remove the Malta display platform code in favour of probing the
img-ascii-lcd driver via device tree. This reduces the amount of
platform code & the img-ascii-lcd driver offers us advantages in terms
of code sharing with other boards & functionality such as changing the
displayed message via sysfs. Defconfigs are untouched because the driver
already defaults y on when CONFIG_MIPS_MALTA=y.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21182/
Cc: linux-mips@linux-mips.org
arch/mips/boot/dts/mti/malta.dts
arch/mips/mti-malta/Makefile
arch/mips/mti-malta/malta-display.c [deleted file]
arch/mips/mti-malta/malta-init.c
arch/mips/mti-malta/malta-setup.c
arch/mips/mti-malta/malta-time.c

index 9944e716eac8fed8da7dc9fa921f7b69eec6a057..f03279b1cde7b49d404992969335a7f9defeb3b6 100644 (file)
@@ -87,6 +87,11 @@ fpga_regs: system-controller@1f000000 {
                reg = <0x1f000000 0x1000>;
                native-endian;
 
+               lcd@410 {
+                       compatible = "mti,malta-lcd";
+                       offset = <0x410>;
+               };
+
                reboot {
                        compatible = "syscon-reboot";
                        regmap = <&fpga_regs>;
index 17c7fd471a27f4049ef03dc49f0176f51a5ddde5..94c11f5eac7431cc5fafa7f8fcae3f2349c5dcf2 100644 (file)
@@ -6,7 +6,6 @@
 # Copyright (C) 2008 Wind River Systems, Inc.
 #   written by Ralf Baechle <ralf@linux-mips.org>
 #
-obj-y                          += malta-display.o
 obj-y                          += malta-dt.o
 obj-y                          += malta-dtshim.o
 obj-y                          += malta-init.o
diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c
deleted file mode 100644 (file)
index ee0bd50..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Display routines for display messages in MIPS boards ascii display.
- *
- * Copyright (C) 1999,2000,2012  MIPS Technologies, Inc.
- * All rights reserved.
- * Authors: Carsten Langgaard <carstenl@mips.com>
- *          Steven J. Hill <sjhill@mips.com>
- */
-#include <linux/compiler.h>
-#include <linux/timer.h>
-#include <linux/io.h>
-
-#include <asm/mips-boards/generic.h>
-
-extern const char display_string[];
-static unsigned int display_count;
-static unsigned int max_display_count;
-
-void mips_display_message(const char *str)
-{
-       static unsigned int __iomem *display = NULL;
-       int i;
-
-       if (unlikely(display == NULL))
-               display = ioremap(ASCII_DISPLAY_POS_BASE, 16*sizeof(int));
-
-       for (i = 0; i <= 14; i += 2) {
-               if (*str)
-                       __raw_writel(*str++, display + i);
-               else
-                       __raw_writel(' ', display + i);
-       }
-}
-
-static void scroll_display_message(struct timer_list *unused);
-static DEFINE_TIMER(mips_scroll_timer, scroll_display_message);
-
-static void scroll_display_message(struct timer_list *unused)
-{
-       mips_display_message(&display_string[display_count++]);
-       if (display_count == max_display_count)
-               display_count = 0;
-
-       mod_timer(&mips_scroll_timer, jiffies + HZ);
-}
-
-void mips_scroll_message(void)
-{
-       del_timer_sync(&mips_scroll_timer);
-       max_display_count = strlen(display_string) + 1 - 8;
-       mod_timer(&mips_scroll_timer, jiffies + 1);
-}
index 009f2918b3201f1390cc163f2d8b61b44d1160cb..ff2c1d809538f26031559f6cf225c78c13c107ce 100644 (file)
@@ -118,8 +118,6 @@ phys_addr_t mips_cpc_default_phys_base(void)
 
 void __init prom_init(void)
 {
-       mips_display_message("LINUX");
-
        /*
         * early setup of _pcictrl_bonito so that we can determine
         * the system controller on a CORE_EMUL board
@@ -277,7 +275,6 @@ void __init prom_init(void)
 
        default:
                /* Unknown system controller */
-               mips_display_message("SC Error");
                while (1);      /* We die here... */
        }
        board_nmi_handler_setup = mips_nmi_setup;
index 5d4c5e5fbd696ccccbb312f61b77c67a7fa0f328..85c6c11ebceab00e59e10d81a3a7a3e4c03c4dc9 100644 (file)
@@ -81,8 +81,6 @@ const char *get_system_type(void)
        return "MIPS Malta";
 }
 
-const char display_string[] = "               LINUX ON MALTA       ";
-
 #ifdef CONFIG_BLK_DEV_FD
 static void __init fd_activate(void)
 {
index d22b7edc3886ba276e0c87187ddb3e6255bd25da..f403574a1e6f57442f4c8067d9f9eb27d37c59e0 100644 (file)
@@ -251,8 +251,6 @@ void __init plat_time_init(void)
        printk("CPU frequency %d.%02d MHz\n", freq/1000000,
               (freq%1000000)*100/1000000);
 
-       mips_scroll_message();
-
 #ifdef CONFIG_I8253
        /* Only Malta has a PIT. */
        setup_pit_timer();