Commit 0b003749 authored by Paul Burton's avatar Paul Burton

MIPS: malta: Use img-ascii-lcd driver for LCD display

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: default avatarPaul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21182/
Cc: linux-mips@linux-mips.org
parent 3cd64083
......@@ -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>;
......
......@@ -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
......
/*
* 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);
}
......@@ -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;
......
......@@ -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)
{
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment