* [PATCH] MIPS: malta: Use img-ascii-lcd driver for LCD display
@ 2018-11-20 23:59 Paul Burton
2018-11-21 18:21 ` Paul Burton
0 siblings, 1 reply; 3+ messages in thread
From: Paul Burton @ 2018-11-20 23:59 UTC (permalink / raw)
To: linux-mips; +Cc: Paul Burton
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>
---
arch/mips/boot/dts/mti/malta.dts | 5 +++
arch/mips/mti-malta/Makefile | 1 -
arch/mips/mti-malta/malta-display.c | 56 -----------------------------
arch/mips/mti-malta/malta-init.c | 3 --
arch/mips/mti-malta/malta-setup.c | 2 --
arch/mips/mti-malta/malta-time.c | 2 --
6 files changed, 5 insertions(+), 64 deletions(-)
delete mode 100644 arch/mips/mti-malta/malta-display.c
diff --git a/arch/mips/boot/dts/mti/malta.dts b/arch/mips/boot/dts/mti/malta.dts
index 9944e716eac8..f03279b1cde7 100644
--- a/arch/mips/boot/dts/mti/malta.dts
+++ b/arch/mips/boot/dts/mti/malta.dts
@@ -87,6 +87,11 @@
reg = <0x1f000000 0x1000>;
native-endian;
+ lcd@410 {
+ compatible = "mti,malta-lcd";
+ offset = <0x410>;
+ };
+
reboot {
compatible = "syscon-reboot";
regmap = <&fpga_regs>;
diff --git a/arch/mips/mti-malta/Makefile b/arch/mips/mti-malta/Makefile
index 17c7fd471a27..94c11f5eac74 100644
--- a/arch/mips/mti-malta/Makefile
+++ b/arch/mips/mti-malta/Makefile
@@ -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
index ee0bd50f754b..000000000000
--- a/arch/mips/mti-malta/malta-display.c
+++ /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);
-}
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 009f2918b320..ff2c1d809538 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -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;
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 5d4c5e5fbd69..85c6c11ebcea 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -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)
{
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index d22b7edc3886..f403574a1e6f 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -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();
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: malta: Use img-ascii-lcd driver for LCD display
2018-11-20 23:59 [PATCH] MIPS: malta: Use img-ascii-lcd driver for LCD display Paul Burton
@ 2018-11-21 18:21 ` Paul Burton
2018-11-21 18:21 ` Paul Burton
0 siblings, 1 reply; 3+ messages in thread
From: Paul Burton @ 2018-11-21 18:21 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips, Paul Burton, linux-mips
Hello,
Paul Burton wrote:
> 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>
Applied to mips-next.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@mips.com to report it. ]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: malta: Use img-ascii-lcd driver for LCD display
2018-11-21 18:21 ` Paul Burton
@ 2018-11-21 18:21 ` Paul Burton
0 siblings, 0 replies; 3+ messages in thread
From: Paul Burton @ 2018-11-21 18:21 UTC (permalink / raw)
To: Paul Burton; +Cc: linux-mips
Hello,
Paul Burton wrote:
> 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>
Applied to mips-next.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@mips.com to report it. ]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-21 18:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 23:59 [PATCH] MIPS: malta: Use img-ascii-lcd driver for LCD display Paul Burton
2018-11-21 18:21 ` Paul Burton
2018-11-21 18:21 ` Paul Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).