2009-07-02 23:26:45 +08:00
|
|
|
/*
|
2015-07-08 02:56:04 +08:00
|
|
|
* Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology
|
2009-07-02 23:26:45 +08:00
|
|
|
* Author: Fuxin Zhang, zhangfx@lemote.com
|
|
|
|
*
|
2013-01-22 19:59:30 +08:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
2009-07-02 23:26:45 +08:00
|
|
|
* option) any later version.
|
|
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
|
|
|
|
|
|
#include <asm/wbflush.h>
|
2014-11-20 05:52:47 +08:00
|
|
|
#include <asm/bootinfo.h>
|
2009-07-02 23:26:45 +08:00
|
|
|
|
|
|
|
#include <loongson.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_VT
|
|
|
|
#include <linux/console.h>
|
|
|
|
#include <linux/screen_info.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static void wbflush_loongson(void)
|
|
|
|
{
|
|
|
|
asm(".set\tpush\n\t"
|
|
|
|
".set\tnoreorder\n\t"
|
|
|
|
".set mips3\n\t"
|
|
|
|
"sync\n\t"
|
|
|
|
"nop\n\t"
|
|
|
|
".set\tpop\n\t"
|
|
|
|
".set mips0\n\t");
|
|
|
|
}
|
|
|
|
|
2014-03-21 18:44:08 +08:00
|
|
|
void (*__wbflush)(void) = wbflush_loongson;
|
|
|
|
EXPORT_SYMBOL(__wbflush);
|
|
|
|
|
2009-07-02 23:26:45 +08:00
|
|
|
void __init plat_mem_setup(void)
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_VT
|
|
|
|
#if defined(CONFIG_VGA_CONSOLE)
|
|
|
|
conswitchp = &vga_con;
|
|
|
|
|
|
|
|
screen_info = (struct screen_info) {
|
2010-04-22 04:36:47 +08:00
|
|
|
.orig_x = 0,
|
|
|
|
.orig_y = 25,
|
|
|
|
.orig_video_cols = 80,
|
|
|
|
.orig_video_lines = 25,
|
|
|
|
.orig_video_isVGA = VIDEO_TYPE_VGAC,
|
|
|
|
.orig_video_points = 16,
|
2009-07-02 23:26:45 +08:00
|
|
|
};
|
|
|
|
#elif defined(CONFIG_DUMMY_CONSOLE)
|
|
|
|
conswitchp = &dummy_con;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|