From 4153e477674a4089efaeb32624ebf9307a339762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 11 May 2017 11:01:26 +0200 Subject: mips: bmips: bcm6358: fix brcm, bcm6358-mc size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shrink brcm,bcm6358-mc size to avoid overlapping with other controllers Signed-off-by: Álvaro Fernández Rojas diff --git a/arch/mips/dts/brcm,bcm6358.dtsi b/arch/mips/dts/brcm,bcm6358.dtsi index df75988..0dad998 100644 --- a/arch/mips/dts/brcm,bcm6358.dtsi +++ b/arch/mips/dts/brcm,bcm6358.dtsi @@ -133,7 +133,7 @@ memory-controller@fffe1200 { compatible = "brcm,bcm6358-mc"; - reg = <0xfffe1200 0x1000>; + reg = <0xfffe1200 0x4c>; u-boot,dm-pre-reloc; }; }; -- cgit v0.10.2 From 44d8514f54a3ce2e533a66692a180547343dfc16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 11 May 2017 11:01:27 +0200 Subject: mips: bmips: bcm6328: fix brcm, bcm6328-mc size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shrink brcm,bcm6328-mc size to avoid overlapping with other controllers Signed-off-by: Álvaro Fernández Rojas diff --git a/arch/mips/dts/brcm,bcm6328.dtsi b/arch/mips/dts/brcm,bcm6328.dtsi index 4adc83f..3926885 100644 --- a/arch/mips/dts/brcm,bcm6328.dtsi +++ b/arch/mips/dts/brcm,bcm6328.dtsi @@ -120,7 +120,7 @@ memory-controller@10003000 { compatible = "brcm,bcm6328-mc"; - reg = <0x10003000 0x1000>; + reg = <0x10003000 0x864>; u-boot,dm-pre-reloc; }; }; -- cgit v0.10.2 From 0c9152d32003623ab3d0015d0a7b9e761cd89e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 11 May 2017 11:01:28 +0200 Subject: mips: bmips: bcm63268: fix brcm, bcm6328-mc size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shrink brcm,bcm6328-mc size to avoid overlapping with other controllers Signed-off-by: Álvaro Fernández Rojas diff --git a/arch/mips/dts/brcm,bcm63268.dtsi b/arch/mips/dts/brcm,bcm63268.dtsi index 3d0f8e0..b03763f 100644 --- a/arch/mips/dts/brcm,bcm63268.dtsi +++ b/arch/mips/dts/brcm,bcm63268.dtsi @@ -136,7 +136,7 @@ memory-controller@10003000 { compatible = "brcm,bcm6328-mc"; - reg = <0x10003000 0x1000>; + reg = <0x10003000 0x894>; u-boot,dm-pre-reloc; }; }; -- cgit v0.10.2 From b493a3564feab231d363e99712959cf106d11d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 11 May 2017 11:01:29 +0200 Subject: dm: ram: remove unneeded brcm,bcm63268-mc id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit brcm,bcm63268.dtsi uses brcm,bcm6328-mc instead of brcm,bcm63268-mc Signed-off-by: Álvaro Fernández Rojas diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c index 9c0b23b..d0f7cd7 100644 --- a/drivers/ram/bmips_ram.c +++ b/drivers/ram/bmips_ram.c @@ -90,11 +90,7 @@ static const struct udevice_id bmips_ram_ids[] = { }, { .compatible = "brcm,bcm6358-mc", .data = (ulong)&bmips_ram_bcm6358, - }, { - .compatible = "brcm,bcm63268-mc", - .data = (ulong)&bmips_ram_bcm6328, - }, - { /* sentinel */ } + }, { /* sentinel */ } }; static int bmips_ram_probe(struct udevice *dev) -- cgit v0.10.2 From 63c011f7b48ca5739fc0f06c0a07dc3c830df894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 11 May 2017 11:01:30 +0200 Subject: mips: bmips: add missing SFR NeufBox 4 config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes commit a186d26, which missed including SFR NeufBox config from bmips Signed-off-by: Álvaro Fernández Rojas diff --git a/arch/mips/mach-bmips/Kconfig b/arch/mips/mach-bmips/Kconfig index d168448..4a0c383 100644 --- a/arch/mips/mach-bmips/Kconfig +++ b/arch/mips/mach-bmips/Kconfig @@ -63,6 +63,11 @@ config BOARD_HUAWEI_HG556A depends on SOC_BMIPS_BCM6358 select BMIPS_SUPPORTS_BOOT_RAM +config BOARD_SFR_NB4_SER + bool "SFR NeufBox 4 (Sercomm)" + depends on SOC_BMIPS_BCM6358 + select BMIPS_SUPPORTS_BOOT_RAM + endchoice choice @@ -84,5 +89,6 @@ config BMIPS_SUPPORTS_BOOT_RAM source "board/comtrend/ar5387un/Kconfig" source "board/comtrend/vr3032u/Kconfig" source "board/huawei/hg556a/Kconfig" +source "board/sfr/nb4_ser/Kconfig" endmenu -- cgit v0.10.2 From 939a255a671fb50549848505a4b44369cbe08efd Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Fri, 12 May 2017 13:26:11 +0200 Subject: MIPS: Make CM GCR base configurable Without adding a prompt for CONFIG_MIPS_CM_BASE, Kconfig doesn't allow defconfigs to set it. Provide the prompt in order to allow for that. Signed-off-by: Paul Burton Signed-off-by: Daniel Schwierzeck Reviewed-by: Simon Glass diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c97ea41..77d1ac6 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -221,6 +221,16 @@ config ROM_EXCEPTION_VECTORS Disable this, if the U-Boot image is booted from DRAM (e.g. by SPL). In that case the image size will be reduced by 0x500 bytes. +config MIPS_CM_BASE + hex "MIPS CM GCR Base Address" + depends on MIPS_CM + default 0x1fbf8000 + help + The physical base address at which to map the MIPS Coherence Manager + Global Configuration Registers (GCRs). This should be set such that + the GCRs occupy a region of the physical address space which is + otherwise unused, or at minimum that software doesn't need to access. + endmenu menu "OS boot interface" @@ -393,15 +403,6 @@ config MIPS_CM wish U-Boot to configure it or make use of it to retrieve system information such as cache configuration. -config MIPS_CM_BASE - hex - default 0x1fbf8000 - help - The physical base address at which to map the MIPS Coherence Manager - Global Configuration Registers (GCRs). This should be set such that - the GCRs occupy a region of the physical address space which is - otherwise unused, or at minimum that software doesn't need to access. - endif endmenu diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c index bd14ba6..91b037f 100644 --- a/arch/mips/lib/cache.c +++ b/arch/mips/lib/cache.c @@ -7,7 +7,9 @@ #include #include +#ifdef CONFIG_MIPS_L2_CACHE #include +#endif #include DECLARE_GLOBAL_DATA_PTR; -- cgit v0.10.2 From ed048e7c763ac9b7043c989ba3081d7a52e4f68e Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Sun, 30 Apr 2017 21:22:41 +0200 Subject: boston: Move CM GCRs away from flash Move the MIPS Coherence Manager (CM) Global Configuration Registers (GCRs) away from the region of the physical address space which the Boston board's parallel flash is found in, such that we can access all of flash without clobbering GCRs. Signed-off-by: Paul Burton Signed-off-by: Daniel Schwierzeck Reviewed-by: Simon Glass diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 77d1ac6..07488fe 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -224,6 +224,7 @@ config ROM_EXCEPTION_VECTORS config MIPS_CM_BASE hex "MIPS CM GCR Base Address" depends on MIPS_CM + default 0x16100000 if TARGET_BOSTON default 0x1fbf8000 help The physical base address at which to map the MIPS Coherence Manager -- cgit v0.10.2 From d2b12a5767ec762f92a7c308a562472e23b5347e Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Sun, 30 Apr 2017 21:22:42 +0200 Subject: boston: Setup memory ranges in FDT provided to Linux The boston memory map isn't suited to the simple "all memory starting from 0" approach that the MIPS arch_fixup_fdt() implementation takes. Instead we need to indicate the first 256MiB of DDR from 0 and the rest from 0x90000000. Implement ft_board_setup to do that. Signed-off-by: Paul Burton Signed-off-by: Daniel Schwierzeck Reviewed-by: Simon Glass diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 07488fe..d07b92d 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -97,6 +97,7 @@ config TARGET_BOSTON select MIPS_CM select MIPS_L1_CACHE_SHIFT_6 select MIPS_L2_CACHE + select OF_BOARD_SETUP select SUPPORTS_BIG_ENDIAN select SUPPORTS_LITTLE_ENDIAN select SUPPORTS_CPU_MIPS32_R1 diff --git a/board/imgtec/boston/Makefile b/board/imgtec/boston/Makefile index deda457..d3fd49d 100644 --- a/board/imgtec/boston/Makefile +++ b/board/imgtec/boston/Makefile @@ -6,4 +6,5 @@ obj-y += checkboard.o obj-y += ddr.o +obj-y += dt.o obj-y += lowlevel_init.o diff --git a/board/imgtec/boston/dt.c b/board/imgtec/boston/dt.c new file mode 100644 index 0000000..b34f9bc --- /dev/null +++ b/board/imgtec/boston/dt.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2016 Imagination Technologies + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#include +#include + +int ft_board_setup(void *blob, bd_t *bd) +{ + DECLARE_GLOBAL_DATA_PTR; + u64 mem_start[2], mem_size[2]; + int mem_regions; + + mem_start[0] = 0; + mem_size[0] = min_t(u64, 256llu << 20, gd->ram_size); + mem_regions = 1; + + if (gd->ram_size > mem_size[0]) { + mem_start[1] = 0x80000000 + mem_size[0]; + mem_size[1] = gd->ram_size - mem_size[0]; + mem_regions++; + } + + return fdt_fixup_memory_banks(blob, mem_start, mem_size, mem_regions); +} -- cgit v0.10.2 From dc55db496597539cef9c45776d1d8d45f9b5932c Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Sun, 30 Apr 2017 21:22:43 +0200 Subject: boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB The default value of CONFIG_SYS_BOOTM_LEN is too small for typical boston Linux kernels. Increase the limit to 64MB, which covers current kernels with plenty of breathing room. Signed-off-by: Paul Burton Signed-off-by: Daniel Schwierzeck Reviewed-by: Simon Glass diff --git a/include/configs/boston.h b/include/configs/boston.h index 1915ad5..50aaa7b 100644 --- a/include/configs/boston.h +++ b/include/configs/boston.h @@ -8,6 +8,11 @@ #define __CONFIGS_BOSTON_H__ /* + * General board configuration + */ +#define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024) + +/* * CPU */ #define CONFIG_SYS_MIPS_TIMER_FREQ 30000000 -- cgit v0.10.2 From bc34986c86fc119813f406d95bb43e75e09b0df9 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Sun, 30 Apr 2017 21:22:44 +0200 Subject: boston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs CONFIG_DISTRO_DEFAULTS selects a number of things we want for Boston defconfigs & generally describes what we want - to be able to boot an arbitrary Linux distribution. Enable it in order to shorten the defconfigs & to automatically keep up with any changes in the choice of Kconfig symbols selected. Signed-off-by: Paul Burton Signed-off-by: Daniel Schwierzeck Reviewed-by: Simon Glass diff --git a/configs/boston32r2_defconfig b/configs/boston32r2_defconfig index 05095bf..6d93edc 100644 --- a/configs/boston32r2_defconfig +++ b/configs/boston32r2_defconfig @@ -4,11 +4,11 @@ CONFIG_TARGET_BOSTON=y # CONFIG_MIPS_BOOT_ENV_LEGACY is not set CONFIG_MIPS_BOOT_FDT=y CONFIG_DEFAULT_DEVICE_TREE="img,boston" +CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_BEST_MATCH=y CONFIG_OF_STDOUT_VIA_ALIAS=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="boston # " # CONFIG_CMD_ELF is not set # CONFIG_CMD_IMLS is not set @@ -17,16 +17,11 @@ CONFIG_CMD_MEMTEST=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FPGA is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y CONFIG_CMD_DNS=y CONFIG_CMD_LINK_LOCAL=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set # CONFIG_ISO_PARTITION is not set CONFIG_OF_EMBED=y diff --git a/configs/boston32r2el_defconfig b/configs/boston32r2el_defconfig index 244c688..9e494ee 100644 --- a/configs/boston32r2el_defconfig +++ b/configs/boston32r2el_defconfig @@ -5,11 +5,11 @@ CONFIG_SYS_LITTLE_ENDIAN=y # CONFIG_MIPS_BOOT_ENV_LEGACY is not set CONFIG_MIPS_BOOT_FDT=y CONFIG_DEFAULT_DEVICE_TREE="img,boston" +CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_BEST_MATCH=y CONFIG_OF_STDOUT_VIA_ALIAS=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="boston # " # CONFIG_CMD_ELF is not set # CONFIG_CMD_IMLS is not set @@ -18,16 +18,11 @@ CONFIG_CMD_MEMTEST=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FPGA is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y CONFIG_CMD_DNS=y CONFIG_CMD_LINK_LOCAL=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set # CONFIG_ISO_PARTITION is not set CONFIG_OF_EMBED=y diff --git a/configs/boston64r2_defconfig b/configs/boston64r2_defconfig index 8cc0bee..6913d2b 100644 --- a/configs/boston64r2_defconfig +++ b/configs/boston64r2_defconfig @@ -5,11 +5,11 @@ CONFIG_CPU_MIPS64_R2=y # CONFIG_MIPS_BOOT_ENV_LEGACY is not set CONFIG_MIPS_BOOT_FDT=y CONFIG_DEFAULT_DEVICE_TREE="img,boston" +CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_BEST_MATCH=y CONFIG_OF_STDOUT_VIA_ALIAS=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="boston # " # CONFIG_CMD_ELF is not set # CONFIG_CMD_IMLS is not set @@ -18,16 +18,11 @@ CONFIG_CMD_MEMTEST=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FPGA is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y CONFIG_CMD_DNS=y CONFIG_CMD_LINK_LOCAL=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set # CONFIG_ISO_PARTITION is not set CONFIG_OF_EMBED=y diff --git a/configs/boston64r2el_defconfig b/configs/boston64r2el_defconfig index c427d43..10ccc54 100644 --- a/configs/boston64r2el_defconfig +++ b/configs/boston64r2el_defconfig @@ -6,11 +6,11 @@ CONFIG_CPU_MIPS64_R2=y # CONFIG_MIPS_BOOT_ENV_LEGACY is not set CONFIG_MIPS_BOOT_FDT=y CONFIG_DEFAULT_DEVICE_TREE="img,boston" +CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_BEST_MATCH=y CONFIG_OF_STDOUT_VIA_ALIAS=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="boston # " # CONFIG_CMD_ELF is not set # CONFIG_CMD_IMLS is not set @@ -19,16 +19,11 @@ CONFIG_CMD_MEMTEST=y # CONFIG_CMD_LOADB is not set # CONFIG_CMD_LOADS is not set # CONFIG_CMD_FPGA is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y CONFIG_CMD_DNS=y CONFIG_CMD_LINK_LOCAL=y CONFIG_CMD_TIME=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set # CONFIG_ISO_PARTITION is not set CONFIG_OF_EMBED=y -- cgit v0.10.2