From a1b538130834d7bce99ef6c5c71a728013e58ec5 Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Fri, 13 Jul 2012 21:53:22 +0530 Subject: [PATCH] --- yaml --- r: 332274 b: refs/heads/master c: 2f6528e15a4592c762a690c1320518368593ae75 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/Kconfig | 1 + trunk/arch/mips/netlogic/Kconfig | 15 +++++++++++++++ trunk/arch/mips/netlogic/Makefile | 1 + trunk/arch/mips/netlogic/dts/Makefile | 4 ++++ trunk/arch/mips/netlogic/xlp/setup.c | 12 +++++++++++- 6 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 trunk/arch/mips/netlogic/dts/Makefile diff --git a/[refs] b/[refs] index 11ff989aac23..8af3f442dd2b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9f16821205d7561bf9d622855e1aa95e5c77f0c +refs/heads/master: 2f6528e15a4592c762a690c1320518368593ae75 diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index 331d574df99c..8190bdcd5a6a 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -830,6 +830,7 @@ config NLM_XLP_BOARD select ZONE_DMA if 64BIT select SYNC_R4K select SYS_HAS_EARLY_PRINTK + select USE_OF help This board is based on Netlogic XLP Processor. Say Y here if you have a XLP based board. diff --git a/trunk/arch/mips/netlogic/Kconfig b/trunk/arch/mips/netlogic/Kconfig index 75bec44b5856..8059eb76f8eb 100644 --- a/trunk/arch/mips/netlogic/Kconfig +++ b/trunk/arch/mips/netlogic/Kconfig @@ -1,2 +1,17 @@ +if NLM_XLP_BOARD || NLM_XLR_BOARD + +if NLM_XLP_BOARD +config DT_XLP_EVP + bool "Built-in device tree for XLP EVP/SVP boards" + default y + help + Add an FDT blob for XLP EVP and SVP boards into the kernel. + This DTB will be used if the firmware does not pass in a DTB + pointer to the kernel. The corresponding DTS file is at + arch/mips/netlogic/dts/xlp_evp.dts +endif + config NLM_COMMON bool + +endif diff --git a/trunk/arch/mips/netlogic/Makefile b/trunk/arch/mips/netlogic/Makefile index 36d169b2ca6d..7602d1386614 100644 --- a/trunk/arch/mips/netlogic/Makefile +++ b/trunk/arch/mips/netlogic/Makefile @@ -1,3 +1,4 @@ obj-$(CONFIG_NLM_COMMON) += common/ obj-$(CONFIG_CPU_XLR) += xlr/ obj-$(CONFIG_CPU_XLP) += xlp/ +obj-$(CONFIG_CPU_XLP) += dts/ diff --git a/trunk/arch/mips/netlogic/dts/Makefile b/trunk/arch/mips/netlogic/dts/Makefile new file mode 100644 index 000000000000..67ae3fe296f0 --- /dev/null +++ b/trunk/arch/mips/netlogic/dts/Makefile @@ -0,0 +1,4 @@ +obj-$(CONFIG_DT_XLP_EVP) := xlp_evp.dtb.o + +$(obj)/%.dtb: $(obj)/%.dts + $(call if_changed,dtc) diff --git a/trunk/arch/mips/netlogic/xlp/setup.c b/trunk/arch/mips/netlogic/xlp/setup.c index 0d2d679c6c56..d8997098defd 100644 --- a/trunk/arch/mips/netlogic/xlp/setup.c +++ b/trunk/arch/mips/netlogic/xlp/setup.c @@ -57,6 +57,7 @@ unsigned long nlm_common_ebase = 0x0; /* default to uniprocessor */ uint32_t nlm_coremask = 1, nlm_cpumask = 1; int nlm_threads_per_core = 1; +extern u32 __dtb_start[]; static void nlm_linux_exit(void) { @@ -97,9 +98,18 @@ void __init prom_init(void) { void *fdtp; - fdtp = (void *)(long)fw_arg0; xlp_mmu_init(); nlm_hal_init(); + + /* + * If no FDT pointer is passed in, use the built-in FDT. + * device_tree_init() does not handle CKSEG0 pointers in + * 64-bit, so convert pointer. + */ + fdtp = (void *)(long)fw_arg0; + if (!fdtp) + fdtp = __dtb_start; + fdtp = phys_to_virt(__pa(fdtp)); early_init_devtree(fdtp); nlm_common_ebase = read_c0_ebase() & (~((1 << 12) - 1));