Skip to contentSkip to conversation

MIPS Boston updates and fixes

PATCH RESEND New Daniel Schwierzeck 2 participants 20 messages Apr 30, 2017 – May 12, 2017 MIPS

lore
Share & tools
lore
#0 lore raw

v2 cover MIPS Boston updates and fixes

This series is a resend of selected MIPS Boston updates/fixes from the original patch series [1] which was blocked by rejected PCI core changes and the series for converting CONFIG_SYS_SDRAM_BASE on MIPS from a virtual address to a physical one. At least the patches not affected by the blocking patch series should be finally applied.

[1] https://lists.denx.de/pipermail/u-boot/2016-September/268137.html

Changes in v2:
- also patch ARM specific code to get a consistent behaviour
- move to menu "General setup"
- set default value for Boston in arch/mips/Kconfig
- rebased to current mainline
- rebased to current mainline

Paul Burton (6):
image: Use ram_top, not bi_memsize, in getenv_bootm_size
MIPS: Make CM GCR base configurable
boston: Move CM GCRs away from flash
boston: Setup memory ranges in FDT provided to Linux
boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB
boston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs

 arch/mips/Kconfig              | 21 ++++++++++++---------
 board/imgtec/boston/Makefile   |  1 +
 board/imgtec/boston/dt.c       | 27 +++++++++++++++++++++++++++
 common/image.c                 |  3 +--
 configs/boston32r2_defconfig   |  7 +------
 configs/boston32r2el_defconfig |  7 +------
 configs/boston64r2_defconfig   |  7 +------
 configs/boston64r2el_defconfig |  7 +------
 include/configs/boston.h       |  5 +++++
 9 files changed, 50 insertions(+), 35 deletions(-)
 create mode 100644 board/imgtec/boston/dt.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH RESEND v2 1/6 image: Use ram_top, not bi_memsize, in getenv_bootm_size

From: Paul Burton <[email protected]>

When determining the region of memory to allow for use by bootm, using bi_memstart & adding bi_memsize can cause problems if that leads to an integer overflow. For example on some MIPS systems bi_memstart would be 0xffffffff80000000 (ie. the start of the MIPS ckseg0 region) and if the system has 2GB of memory then the addition would wrap around to 0.

The maximum amount of memory to be used by U-Boot is already accounted for by the ram_top field of struct global_data, so make use of that for the calculation instead.

---

Changes in v2:
- also patch ARM specific code to get a consistent behaviour

 common/image.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
common/image.c +1 -2
index 0f88984f2d..160c4c6fbc 100644
@@ -494,11 +494,10 @@ phys_size_t getenv_bootm_size(void)
 
 #if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
 	start = gd->bd->bi_dram[0].start;
-	size = gd->bd->bi_dram[0].size;
 #else
 	start = gd->bd->bi_memstart;
-	size = gd->bd->bi_memsize;
 #endif
+	size = gd->ram_top - start;
 
 	s = getenv("bootm_low");
 	if (s)
Signature · 1 line
2.11.0
#4 lore raw

PATCH RESEND v2 2/6 MIPS: Make CM GCR base configurable

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Changes in v2:
- move to menu "General setup"

 arch/mips/Kconfig | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
arch/mips/Kconfig +10 -9
index c97ea4156b..77d1ac65d2 100644
@@ -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
Signature · 1 line
2.11.0
#8 lore raw

PATCH RESEND v2 3/6 boston: Move CM GCRs away from flash

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Changes in v2:
- set default value for Boston in arch/mips/Kconfig

 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/mips/Kconfig +1 -0
index 77d1ac65d2..07488fe651 100644
@@ -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
Signature · 1 line
2.11.0
#11 lore raw

PATCH RESEND v2 4/6 boston: Setup memory ranges in FDT provided to Linux

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Changes in v2: None

 arch/mips/Kconfig            |  1 +
 board/imgtec/boston/Makefile |  1 +
 board/imgtec/boston/dt.c     | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 board/imgtec/boston/dt.c
arch/mips/Kconfig +1 -0
index 07488fe651..d07b92d1b4 100644
@@ -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
board/imgtec/boston/Makefile +1 -0
index deda457f3c..d3fd49d285 100644
@@ -6,4 +6,5 @@
 
 obj-y += checkboard.o
 obj-y += ddr.o
+obj-y += dt.o
 obj-y += lowlevel_init.o
board/imgtec/boston/dt.c new file +27 -0
new file mode 100644
index 0000000000..b34f9bc205
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2016 Imagination Technologies
+ *
+ * SPDX-License-Identifier:	GPL-2.0
+ */
+
+#include <common.h>
+#include <fdt_support.h>
+
+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);
+}
Signature · 1 line
2.11.0
#14 lore raw

PATCH RESEND v2 5/6 boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Changes in v2:
- rebased to current mainline

 include/configs/boston.h | 5 +++++
 1 file changed, 5 insertions(+)
include/configs/boston.h +5 -0
index 1915ad5249..50aaa7be8c 100644
@@ -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
Signature · 1 line
2.11.0
#17 lore raw

PATCH RESEND v2 6/6 boston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Changes in v2:
- rebased to current mainline

 configs/boston32r2_defconfig   | 7 +------
 configs/boston32r2el_defconfig | 7 +------
 configs/boston64r2_defconfig   | 7 +------
 configs/boston64r2el_defconfig | 7 +------
 4 files changed, 4 insertions(+), 24 deletions(-)
configs/boston32r2_defconfig +1 -6
index 05095bf160..6d93edc358 100644
@@ -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
configs/boston32r2el_defconfig +1 -6
index 244c688c5f..9e494eee10 100644
@@ -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
configs/boston64r2_defconfig +1 -6
index 8cc0bee44c..6913d2ba62 100644
@@ -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
configs/boston64r2el_defconfig +1 -6
index c427d43091..10ccc5427c 100644
@@ -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
Signature · 1 line
2.11.0
#2 lore raw

PATCH RESEND v2 1/6 image: Use ram_top, not bi_memsize, in getenv_bootm_size

In reply to Daniel Schwierzeck

Hi Daniel,

Quoted 28 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

When determining the region of memory to allow for use by bootm, using bi_memstart & adding bi_memsize can cause problems if that leads to an integer overflow. For example on some MIPS systems bi_memstart would be 0xffffffff80000000 (ie. the start of the MIPS ckseg0 region) and if the system has 2GB of memory then the addition would wrap around to 0.

The maximum amount of memory to be used by U-Boot is already accounted for by the ram_top field of struct global_data, so make use of that for the calculation instead.

---

Changes in v2:
- also patch ARM specific code to get a consistent behaviour

 common/image.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
common/image.c +0 -0
index 0f88984f2d..160c4c6fbc 100644

common/image.c phys_size_t getenv_bootm_size(void) · line 501

Quoted 10 lines
common/image.c +1 -2
@@ -494,11 +494,10 @@ phys_size_t getenv_bootm_size(void)
 
 #if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
        start = gd->bd->bi_dram[0].start;
-       size = gd->bd->bi_dram[0].size;
 #else
        start = gd->bd->bi_memstart;
-       size = gd->bd->bi_memsize;
 #endif
+       size = gd->ram_top - start;
 

I'm a little nervous about this change. For ARM we might have discontinuous DRAM segments. Can you not set bd->bi_memsize insead?

Quoted 5 lines
common/image.c +0 -1
        s = getenv("bootm_low");
        if (s)
--

2.11.0

Regards,
Simon

#5 lore raw

PATCH RESEND v2 2/6 MIPS: Make CM GCR base configurable

In reply to Daniel Schwierzeck
Quoted 8 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

Quoted 7 lines

---

Changes in v2:
- move to menu "General setup"

 arch/mips/Kconfig | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
#9 lore raw

PATCH RESEND v2 3/6 boston: Move CM GCRs away from flash

In reply to Daniel Schwierzeck
Quoted 10 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

Quoted 7 lines

---

Changes in v2:
- set default value for Boston in arch/mips/Kconfig

 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)
#12 lore raw

PATCH RESEND v2 4/6 boston: Setup memory ranges in FDT provided to Linux

In reply to Daniel Schwierzeck
Quoted 11 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Quoted 7 lines

Changes in v2: None

 arch/mips/Kconfig            |  1 +
 board/imgtec/boston/Makefile |  1 +
 board/imgtec/boston/dt.c     | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 board/imgtec/boston/dt.c
#15 lore raw

PATCH RESEND v2 5/6 boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB

In reply to Daniel Schwierzeck
Quoted 9 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

Quoted 7 lines

---

Changes in v2:
- rebased to current mainline

 include/configs/boston.h | 5 +++++
 1 file changed, 5 insertions(+)
#18 lore raw

PATCH RESEND v2 6/6 boston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs

In reply to Daniel Schwierzeck
Quoted 13 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Quoted 8 lines

Changes in v2:
- rebased to current mainline

 configs/boston32r2_defconfig   | 7 +------
 configs/boston32r2el_defconfig | 7 +------
 configs/boston64r2_defconfig   | 7 +------
 configs/boston64r2el_defconfig | 7 +------
 4 files changed, 4 insertions(+), 24 deletions(-)
#3 lore raw

PATCH RESEND v2 1/6 image: Use ram_top, not bi_memsize, in getenv_bootm_size

In reply to Simon Glass

Am 04.05.2017 um 18:49 schrieb Simon Glass:

Quoted 33 lines

Hi Daniel,

Quoted 29 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

When determining the region of memory to allow for use by bootm, using bi_memstart & adding bi_memsize can cause problems if that leads to an integer overflow. For example on some MIPS systems bi_memstart would be 0xffffffff80000000 (ie. the start of the MIPS ckseg0 region) and if the system has 2GB of memory then the addition would wrap around to 0.

The maximum amount of memory to be used by U-Boot is already accounted for by the ram_top field of struct global_data, so make use of that for the calculation instead.

---

Changes in v2:
- also patch ARM specific code to get a consistent behaviour

 common/image.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
common/image.c +0 -0
index 0f88984f2d..160c4c6fbc 100644
@@ -494,11 +494,10 @@ phys_size_t getenv_bootm_size(void)
 
Quoted 15 lines

common/image.c phys_size_t getenv_bootm_size(void) · line 501

Quoted 9 lines
common/image.c +1 -2
 #if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
        start = gd->bd->bi_dram[0].start;
-       size = gd->bd->bi_dram[0].size;
 #else
        start = gd->bd->bi_memstart;
-       size = gd->bd->bi_memsize;
 #endif
+       size = gd->ram_top - start;
 

I'm a little nervous about this change. For ARM we might have discontinuous DRAM segments. Can you not set bd->bi_memsize insead?

Quoted 2 lines
common/image.c +0 -0
        s = getenv("bootm_low");
        if (s)

after reviewing again I think this patch is wrong. Maybe we have to fix the MIPS specific problem instead, where CONFIG_SYS_SDRAM_BASE is used as a virtual address instead of a physical one. Actually this causes the wrap around. Thus I withdraw this patch.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170505/8ab7ce55/attachment.sig>
#6 lore raw

PATCH RESEND v3 1/5 MIPS: Make CM GCR base configurable

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

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.

---

Changes in v3:
- fix build error if CONFIG_MIPS_CM is not selected

Changes in v2:
- move to menu "General setup"

 arch/mips/Kconfig     | 19 ++++++++++---------
 arch/mips/lib/cache.c |  2 ++
 2 files changed, 12 insertions(+), 9 deletions(-)
arch/mips/Kconfig +10 -9
index c97ea4156b..77d1ac65d2 100644
@@ -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
arch/mips/lib/cache.c +2 -0
index bd14ba6ea7..91b037f87d 100644
@@ -7,7 +7,9 @@
 
 #include <common.h>
 #include <asm/cacheops.h>
+#ifdef CONFIG_MIPS_L2_CACHE
 #include <asm/cm.h>
+#endif
 #include <asm/mipsregs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
Signature · 1 line
2.11.0
#7 lore raw

PATCH RESEND v3 1/5 MIPS: Make CM GCR base configurable

Am 12.05.2017 um 13:26 schrieb Daniel Schwierzeck:

Quoted 14 lines

From: Paul Burton <[email protected]>

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.

---

Changes in v3:
- fix build error if CONFIG_MIPS_CM is not selected

Quoted 7 lines

Changes in v2:
- move to menu "General setup"

 arch/mips/Kconfig     | 19 ++++++++++---------
 arch/mips/lib/cache.c |  2 ++
 2 files changed, 12 insertions(+), 9 deletions(-)

applied to u-boot-mips/master, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/64e33356/attachment.sig>

#10 lore raw

PATCH RESEND v2 3/6 boston: Move CM GCRs away from flash

In reply to Daniel Schwierzeck

Am 30.04.2017 um 21:22 schrieb Daniel Schwierzeck:

Quoted 10 lines

From: Paul Burton <[email protected]>

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.

Quoted 8 lines

---

Changes in v2:
- set default value for Boston in arch/mips/Kconfig

 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

applied to u-boot-mips/master, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/17b8f841/attachment.sig>

#13 lore raw

PATCH RESEND v2 4/6 boston: Setup memory ranges in FDT provided to Linux

In reply to Daniel Schwierzeck

Am 30.04.2017 um 21:22 schrieb Daniel Schwierzeck:

Quoted 11 lines

From: Paul Burton <[email protected]>

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.

---

Quoted 8 lines

Changes in v2: None

 arch/mips/Kconfig            |  1 +
 board/imgtec/boston/Makefile |  1 +
 board/imgtec/boston/dt.c     | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 board/imgtec/boston/dt.c

applied to u-boot-mips/master, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/ab0fb0cd/attachment.sig>

#16 lore raw

PATCH RESEND v2 5/6 boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB

In reply to Daniel Schwierzeck

Am 30.04.2017 um 21:22 schrieb Daniel Schwierzeck:

Quoted 9 lines

From: Paul Burton <[email protected]>

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.

Quoted 8 lines

---

Changes in v2:
- rebased to current mainline

 include/configs/boston.h | 5 +++++
 1 file changed, 5 insertions(+)

applied to u-boot-mips/master, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/9b268d0e/attachment.sig>

#19 lore raw

PATCH RESEND v2 6/6 boston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs

In reply to Daniel Schwierzeck

Am 30.04.2017 um 21:22 schrieb Daniel Schwierzeck:

Quoted 13 lines

From: Paul Burton <[email protected]>

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.

---

Quoted 9 lines

Changes in v2:
- rebased to current mainline

 configs/boston32r2_defconfig   | 7 +------
 configs/boston32r2el_defconfig | 7 +------
 configs/boston64r2_defconfig   | 7 +------
 configs/boston64r2el_defconfig | 7 +------
 4 files changed, 4 insertions(+), 24 deletions(-)

applied to u-boot-mips/master, thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170512/64b47cf2/attachment.sig>