Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology
0004  * Author: Fuxin Zhang, zhangfx@lemote.com
0005  */
0006 #include <linux/export.h>
0007 #include <linux/init.h>
0008 
0009 #include <asm/wbflush.h>
0010 #include <asm/bootinfo.h>
0011 #include <linux/libfdt.h>
0012 #include <linux/of_fdt.h>
0013 
0014 #include <asm/prom.h>
0015 
0016 #include <loongson.h>
0017 
0018 void *loongson_fdt_blob;
0019 
0020 static void wbflush_loongson(void)
0021 {
0022     asm(".set\tpush\n\t"
0023         ".set\tnoreorder\n\t"
0024         ".set mips3\n\t"
0025         "sync\n\t"
0026         "nop\n\t"
0027         ".set\tpop\n\t"
0028         ".set mips0\n\t");
0029 }
0030 
0031 void (*__wbflush)(void) = wbflush_loongson;
0032 EXPORT_SYMBOL(__wbflush);
0033 
0034 void __init plat_mem_setup(void)
0035 {
0036     if (loongson_fdt_blob)
0037         __dt_setup_arch(loongson_fdt_blob);
0038 }