diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-18 05:52:32 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-18 05:52:32 +0200 |
commit | 3dc95666df0e1ae5b7381a8ec97a583bb3ce4306 (patch) | |
tree | fc1b277f507c48b8c29536947e1de5c2eeda9325 /arch/mips/loongson/common/setup.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiw... (diff) | |
parent | MIPS: BCM63xx: Add integrated ethernet mac support. (diff) | |
download | linux-3dc95666df0e1ae5b7381a8ec97a583bb3ce4306.tar.xz linux-3dc95666df0e1ae5b7381a8ec97a583bb3ce4306.zip |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (51 commits)
MIPS: BCM63xx: Add integrated ethernet mac support.
MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.
MIPS: BCM63xx: Add Broadcom 63xx CPU definitions.
MIPS: Octeon: Move some platform device registration to its own file.
MIPS: Don't corrupt page tables on vmalloc fault.
MIPS: Shrink the size of tlb handler
MIPS: Alchemy: override loops_per_jiffy detection
MIPS: hw_random: Add hardware RNG for Octeon SOCs.
MIPS: Octeon: Add hardware RNG platform device.
MIPS: Remove useless zero initializations.
MIPS: Alchemy: get rid of allow_au1k_wait
MIPS: Octeon: Set kernel_uses_llsc to false on non-SMP builds.
MIPS: Allow kernel use of LL/SC to be separate from the presence of LL/SC.
MIPS: Get rid of CONFIG_CPU_HAS_LLSC
MIPS: Malta: Remove pointless use use of CONFIG_CPU_HAS_LLSC
MIPS: Rewrite clearing of ll_bit on context switch in C
MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler
MIPS: Consolidate all CONFIG_CPU_HAS_LLSC use in a single C file.
MIPS: Clean up linker script using new linker script macros.
MIPS: Use PAGE_SIZE in assembly instead of _PAGE_SIZE.
...
Diffstat (limited to 'arch/mips/loongson/common/setup.c')
-rw-r--r-- | arch/mips/loongson/common/setup.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/mips/loongson/common/setup.c b/arch/mips/loongson/common/setup.c new file mode 100644 index 000000000000..4cd2aa9a342c --- /dev/null +++ b/arch/mips/loongson/common/setup.c @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology + * Author: Fuxin Zhang, zhangfx@lemote.com + * + * 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 + * option) any later version. + */ +#include <linux/module.h> + +#include <asm/wbflush.h> + +#include <loongson.h> + +#ifdef CONFIG_VT +#include <linux/console.h> +#include <linux/screen_info.h> +#endif + +void (*__wbflush)(void); +EXPORT_SYMBOL(__wbflush); + +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"); +} + +void __init plat_mem_setup(void) +{ + __wbflush = wbflush_loongson; + +#ifdef CONFIG_VT +#if defined(CONFIG_VGA_CONSOLE) + conswitchp = &vga_con; + + screen_info = (struct screen_info) { + 0, 25, /* orig-x, orig-y */ + 0, /* unused */ + 0, /* orig-video-page */ + 0, /* orig-video-mode */ + 80, /* orig-video-cols */ + 0, 0, 0, /* ega_ax, ega_bx, ega_cx */ + 25, /* orig-video-lines */ + VIDEO_TYPE_VGAC, /* orig-video-isVGA */ + 16 /* orig-video-points */ + }; +#elif defined(CONFIG_DUMMY_CONSOLE) + conswitchp = &dummy_con; +#endif +#endif +} |