mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-17 07:54:54 +08:00
9b73100911
Activate USE_OF for SEAD-3 platform. Add basic DTS file and convert memory detection and reservations to use OF. [ralf@linux-mips.org: Remove unnecessary #ifdef wrapper in generic.h. Make <asm/mips-boards/generic.h> inclusion work even without prior <linux/of_fdt.h> inclusion.] Signed-off-by: Steven J. Hill <sjhill@mips.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/4809/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
/*
|
|
* 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.
|
|
*
|
|
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/of_platform.h>
|
|
#include <linux/of_fdt.h>
|
|
#include <linux/bootmem.h>
|
|
|
|
#include <asm/mips-boards/generic.h>
|
|
#include <asm/prom.h>
|
|
|
|
int coherentio; /* 0 => no DMA cache coherency (may be set by user) */
|
|
int hw_coherentio; /* 0 => no HW DMA cache coherency (reflects real HW) */
|
|
|
|
const char *get_system_type(void)
|
|
{
|
|
return "MIPS SEAD3";
|
|
}
|
|
|
|
void __init plat_mem_setup(void)
|
|
{
|
|
/*
|
|
* Load the builtin devicetree. This causes the chosen node to be
|
|
* parsed resulting in our memory appearing
|
|
*/
|
|
__dt_setup_arch(&__dtb_start);
|
|
}
|
|
|
|
void __init device_tree_init(void)
|
|
{
|
|
unsigned long base, size;
|
|
|
|
if (!initial_boot_params)
|
|
return;
|
|
|
|
base = virt_to_phys((void *)initial_boot_params);
|
|
size = be32_to_cpu(initial_boot_params->totalsize);
|
|
|
|
/* Before we do anything, lets reserve the dt blob */
|
|
reserve_bootmem(base, size, BOOTMEM_DEFAULT);
|
|
|
|
unflatten_device_tree();
|
|
}
|