Skip to contentSkip to conversation

nios2: zap nios2-generic board dir

PATCH New Thomas Chou 2 participants 7 messages Oct 18, 2015 – Oct 23, 2015 NIOS2 architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nios2: zap nios2-generic board dir

As we use device tree to control u-boot now, the generic board can be removed.

---
 arch/nios2/Kconfig                         | 16 ++----
 arch/nios2/config.mk                       |  3 +-
 board/altera/common/cfide.c                | 33 -----------
 board/altera/nios2-generic/Kconfig         | 12 ----
 board/altera/nios2-generic/MAINTAINERS     |  6 --
 board/altera/nios2-generic/Makefile        | 10 ----
 board/altera/nios2-generic/config.mk       | 12 ----
 board/altera/nios2-generic/custom_fpga.h   | 89 ------------------------------
 board/altera/nios2-generic/nios2-generic.c | 76 -------------------------
 configs/nios2-generic_defconfig            |  2 +-
 include/configs/nios2-generic.h            | 23 +++++---
 11 files changed, 24 insertions(+), 258 deletions(-)
 delete mode 100644 board/altera/common/cfide.c
 delete mode 100644 board/altera/nios2-generic/Kconfig
 delete mode 100644 board/altera/nios2-generic/MAINTAINERS
 delete mode 100644 board/altera/nios2-generic/Makefile
 delete mode 100644 board/altera/nios2-generic/config.mk
 delete mode 100644 board/altera/nios2-generic/custom_fpga.h
 delete mode 100644 board/altera/nios2-generic/nios2-generic.c
arch/nios2/Kconfig +6 -10
index 8ae7f6e..bb4fb2a 100644
@@ -4,15 +4,11 @@ menu "Nios II architecture"
 config SYS_ARCH
 	default "nios2"
 
-choice
-	prompt "Target select"
-	optional
-
-config TARGET_NIOS2_GENERIC
-	bool "Support nios2-generic"
-
-endchoice
-
-source "board/altera/nios2-generic/Kconfig"
+config SYS_CONFIG_NAME
+	string "Board header file"
+	help
+	  This option should contain the base name of board header file.
+	  The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
+	  should be included from include/config.h.
 
 endmenu
arch/nios2/config.mk +2 -1
index 82bd887..2abad3f 100644
@@ -10,10 +10,11 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := nios2-elf-
 endif
 
-CONFIG_STANDALONE_LOAD_ADDR ?= 0x02000000
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xd2000000
 
 PLATFORM_CPPFLAGS += -D__NIOS2__
 PLATFORM_CPPFLAGS += -G0
+PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
 
 LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
board/altera/common/cfide.c deleted +0 -33
deleted file mode 100644
index 40d6a12..0000000
@@ -1,33 +0,0 @@
-/*
- * Altera CF drvier
- *
- * (C) Copyright 2010, Thomas Chou <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <common.h>
-#include <asm/io.h>
-
-#if defined(CONFIG_IDE_RESET) && defined(CONFIG_SYS_CF_CTL_BASE)
-/* ide_set_reset for Altera CF interface */
-#define ALTERA_CF_CTL_STATUS			0
-#define ALTERA_CF_IDE_CTL			4
-#define ALTERA_CF_CTL_STATUS_PRESENT_MSK	(0x1)
-#define ALTERA_CF_CTL_STATUS_POWER_MSK		(0x2)
-#define ALTERA_CF_CTL_STATUS_RESET_MSK		(0x4)
-#define ALTERA_CF_CTL_STATUS_IRQ_EN_MSK	(0x8)
-#define ALTERA_CF_IDE_CTL_IRQ_EN_MSK		(0x1)
-
-void ide_set_reset(int idereset)
-{
-	int i;
-	writel(idereset ? ALTERA_CF_CTL_STATUS_RESET_MSK :
-	       ALTERA_CF_CTL_STATUS_POWER_MSK,
-	       CONFIG_SYS_CF_CTL_BASE + ALTERA_CF_CTL_STATUS);
-	/* wait 500 ms for power to stabilize */
-	for (i = 0; i < 500; i++)
-		udelay(1000);
-}
-#endif
board/altera/nios2-generic/Kconfig deleted +0 -12
deleted file mode 100644
index cd3d098..0000000
@@ -1,12 +0,0 @@
-if TARGET_NIOS2_GENERIC
-
-config SYS_BOARD
-	default "nios2-generic"
-
-config SYS_VENDOR
-	default "altera"
-
-config SYS_CONFIG_NAME
-	default "nios2-generic"
-
-endif
board/altera/nios2-generic/MAINTAINERS deleted +0 -6
deleted file mode 100644
index 9cbcba9..0000000
@@ -1,6 +0,0 @@
-NIOS2-GENERIC BOARD
-M:	Scott McNutt <[email protected]>
-S:	Maintained
-F:	board/altera/nios2-generic/
-F:	include/configs/nios2-generic.h
-F:	configs/nios2-generic_defconfig
board/altera/nios2-generic/Makefile deleted +0 -10
deleted file mode 100644
index 5e4192c..0000000
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2001-2006
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-# (C) Copyright 2010, Thomas Chou <[email protected]>
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-obj-y	:= nios2-generic.o
-obj-$(CONFIG_CMD_IDE) += ../common/cfide.o
board/altera/nios2-generic/config.mk deleted +0 -12
deleted file mode 100644
index a673525..0000000
@@ -1,12 +0,0 @@
-#
-# (C) Copyright 2005, Psyent Corporation <www.psyent.com>
-# Scott McNutt <[email protected]>
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
-
-ifeq ($(debug),1)
-PLATFORM_CPPFLAGS += -DDEBUG
-endif
board/altera/nios2-generic/custom_fpga.h deleted +0 -89

89 lines not on this page · raw message

board/altera/nios2-generic/nios2-generic.c deleted +0 -76

76 lines not on this page · raw message

configs/nios2-generic_defconfig +1 -1
index 7b504ba..a3e4b51 100644
@@ -1,7 +1,7 @@
 CONFIG_NIOS2=y
+CONFIG_SYS_CONFIG_NAME="nios2-generic"
 CONFIG_DM_SERIAL=y
 CONFIG_DM_GPIO=y
-CONFIG_TARGET_NIOS2_GENERIC=y
 CONFIG_DEFAULT_DEVICE_TREE="3c120_devboard"
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
include/configs/nios2-generic.h +15 -8
index e4b5abb..11be6e1 100644
@@ -12,12 +12,8 @@
 /*
  * BOARD/CPU
  */
-#include "../board/altera/nios2-generic/custom_fpga.h" /* fpga parameters */
-#define CONFIG_BOARD_NAME "nios2-generic" /* custom board name */
-#define CONFIG_BOARD_EARLY_INIT_F	/* enable early board-spec. init */
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE
-#define CONFIG_SYS_NIOS_SYSID_BASE	CONFIG_SYS_SYSID_BASE
 
 /*
  * SERIAL
@@ -26,6 +22,17 @@
 #define CONFIG_SYS_CONSOLE_INFO_QUIET	/* Suppress console info */
 
 /*
+ * CFI Flash
+ */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_CFI_FLASH_STATUS_POLL /* fix amd flash issue */
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_MAX_FLASH_BANKS	1
+#define CONFIG_SYS_MAX_FLASH_SECT	512
+
+/*
  * BOOTP options
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
@@ -49,11 +56,9 @@
  */
 #define CONFIG_ENV_IS_IN_FLASH
 
-#define CONFIG_ENV_SIZE		0x20000	/* 128k, 1 sector */
+#define CONFIG_ENV_SIZE			0x20000	/* 128k, 1 sector */
 #define CONFIG_ENV_OVERWRITE		/* Serial change Ok	*/
-#define CONFIG_ENV_ADDR		((CONFIG_SYS_RESET_ADDR + \
-					  CONFIG_SYS_MONITOR_LEN) | \
-					 CONFIG_SYS_FLASH_BASE)
+#define CONFIG_ENV_ADDR			0xe2840000
 
 /*
  * MEMORY ORGANIZATION
@@ -61,6 +66,8 @@
  * -The heap is placed below the monitor
  * -The stack is placed below the heap (&grows down).
  */
+#define CONFIG_SYS_SDRAM_BASE		0xD0000000
+#define CONFIG_SYS_SDRAM_SIZE		0x08000000
 #define CONFIG_MONITOR_IS_IN_RAM
 #define CONFIG_SYS_MONITOR_LEN		0x40000	/* Reserve 256k */
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_SDRAM_BASE + \
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 nios2: zap nios2-generic board dir

Quoted 4 lines · Thomas Chou

As we use device tree to control u-boot now, the generic board can be removed.

Hi!

Quoted 36 lines
---
 arch/nios2/Kconfig                         | 16 ++----
 arch/nios2/config.mk                       |  3 +-
 board/altera/common/cfide.c                | 33 -----------
 board/altera/nios2-generic/Kconfig         | 12 ----
 board/altera/nios2-generic/MAINTAINERS     |  6 --
 board/altera/nios2-generic/Makefile        | 10 ----
 board/altera/nios2-generic/config.mk       | 12 ----
 board/altera/nios2-generic/custom_fpga.h   | 89
------------------------------ board/altera/nios2-generic/nios2-generic.c
| 76 ------------------------- configs/nios2-generic_defconfig           
|  2 +-
 include/configs/nios2-generic.h            | 23 +++++---
 11 files changed, 24 insertions(+), 258 deletions(-)
 delete mode 100644 board/altera/common/cfide.c
 delete mode 100644 board/altera/nios2-generic/Kconfig
 delete mode 100644 board/altera/nios2-generic/MAINTAINERS
 delete mode 100644 board/altera/nios2-generic/Makefile
 delete mode 100644 board/altera/nios2-generic/config.mk
 delete mode 100644 board/altera/nios2-generic/custom_fpga.h
 delete mode 100644 board/altera/nios2-generic/nios2-generic.c
arch/nios2/Kconfig +0 -6
index 8ae7f6e..bb4fb2a 100644
@@ -4,15 +4,11 @@ menu "Nios II architecture"
 config SYS_ARCH
 	default "nios2"
 
-choice
-	prompt "Target select"
-	optional
-
-config TARGET_NIOS2_GENERIC
-	bool "Support nios2-generic"

arch/nios2/Kconfig menu "Nios II architecture" · line 12

Quoted 10 lines
arch/nios2/Kconfig +6 -4
-
-endchoice
-
-source "board/altera/nios2-generic/Kconfig"
+config SYS_CONFIG_NAME
+	string "Board header file"
+	help
+	  This option should contain the base name of board header file.
+	  The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
+	  should be included from include/config.h.

I suspect we don't want this, since we're probing from DT. This option should default to something like include/configs/nios2.h , no ?

arch/nios2/config.mk ifeq ($(CROSS_COMPILE),) · line 13

Quoted 11 lines
arch/nios2/Kconfig +0 -0
 endmenu
arch/nios2/config.mk +1 -1
index 82bd887..2abad3f 100644
@@ -10,10 +10,11 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := nios2-elf-
 endif
 
-CONFIG_STANDALONE_LOAD_ADDR ?= 0x02000000
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xd2000000

This doesn't look like a removal of generic board ;-)

arch/nios2/config.mk ifeq ($(CROSS_COMPILE),) · line 17

Quoted 3 lines
arch/nios2/config.mk +1 -0
 PLATFORM_CPPFLAGS += -D__NIOS2__
 PLATFORM_CPPFLAGS += -G0
+PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul

This doesn't look that way either, you might want to split this patch into a series.

arch/nios2/config.mk ifeq ($(CROSS_COMPILE),) · line 20

Quoted 2 lines
arch/nios2/config.mk +0 -0
 LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections

[...]

I'm really happy to see the generic board go, thanks!

#2 lore raw

PATCH 1/1 nios2: zap nios2-generic board dir

Hi Marek,

Quoted 9 lines · Marek Vasut

arch/nios2/Kconfig menu "Nios II architecture" · line 12

Quoted 6 lines
arch/nios2/Kconfig +6 -0
+config SYS_CONFIG_NAME
+	string "Board header file"
+	help
+	  This option should contain the base name of board header file.
+	  The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
+	  should be included from include/config.h.

I suspect we don't want this, since we're probing from DT. This option should default to something like include/configs/nios2.h , no ?

This is needed as the Kconfig doesn't cover every config option yet. We still need a per board file. But this is supposed to be removed when Kconfig is done for every option.

Now, the legacy board header, defconfig and dts are all that we need to add a new board to nios2. I should add a README.nios2 after I finished the conversion of altera_tse to driver model.

Quoted 15 lines

arch/nios2/config.mk ifeq ($(CROSS_COMPILE),) · line 13

Quoted 12 lines

endmenu

arch/nios2/config.mk +1 -1
index 82bd887..2abad3f 100644
@@ -10,10 +10,11 @@ ifeq ($(CROSS_COMPILE),)
  CROSS_COMPILE := nios2-elf-
  endif
 
-CONFIG_STANDALONE_LOAD_ADDR ?= 0x02000000
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xd2000000

This doesn't look like a removal of generic board ;-)

Quoted 6 lines

arch/nios2/config.mk ifeq ($(CROSS_COMPILE),) · line 17

Quoted 3 lines
arch/nios2/config.mk +1 -0
  PLATFORM_CPPFLAGS += -D__NIOS2__
  PLATFORM_CPPFLAGS += -G0
+PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul

This doesn't look that way either, you might want to split this patch into a series.

Yes. I will split them. Thanks a lot for your review.

Best regards,
Thomas

#3 lore raw

PATCH 1/1 nios2: zap nios2-generic board dir

Quoted 1 line · Thomas Chou

Hi Marek,

Hi,

Quoted 11 lines · Marek Vasut
Quoted 9 lines

arch/nios2/Kconfig menu "Nios II architecture" · line 12

Quoted 6 lines
arch/nios2/Kconfig +6 -0
+config SYS_CONFIG_NAME
+	string "Board header file"
+	help
+	  This option should contain the base name of board header file.
+	  The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
+	  should be included from include/config.h.

I suspect we don't want this, since we're probing from DT. This option should default to something like include/configs/nios2.h , no ?

Quoted 3 lines

This is needed as the Kconfig doesn't cover every config option yet. We still need a per board file. But this is supposed to be removed when Kconfig is done for every option.

Don't we support just nios2-generic board ?

Quoted 3 lines

Now, the legacy board header, defconfig and dts are all that we need to add a new board to nios2. I should add a README.nios2 after I finished the conversion of altera_tse to driver model.

Yeah :) Thanks!

[...]

Best regards,
Marek Vasut

#4 lore raw

PATCH v2 1/1 nios2: zap nios2-generic board dir

In reply to Thomas Chou

As we use device tree to control u-boot now, the generic board can be removed.

---
v2
split change to nios2/config.mk as suggested by Marek.

 arch/nios2/Kconfig                         | 16 ++----
 board/altera/common/cfide.c                | 33 -----------
 board/altera/nios2-generic/Kconfig         | 12 ----
 board/altera/nios2-generic/MAINTAINERS     |  6 --
 board/altera/nios2-generic/Makefile        | 10 ----
 board/altera/nios2-generic/config.mk       | 12 ----
 board/altera/nios2-generic/custom_fpga.h   | 89 ------------------------------
 board/altera/nios2-generic/nios2-generic.c | 76 -------------------------
 configs/nios2-generic_defconfig            |  2 +-
 include/configs/nios2-generic.h            | 23 +++++---
 10 files changed, 22 insertions(+), 257 deletions(-)
 delete mode 100644 board/altera/common/cfide.c
 delete mode 100644 board/altera/nios2-generic/Kconfig
 delete mode 100644 board/altera/nios2-generic/MAINTAINERS
 delete mode 100644 board/altera/nios2-generic/Makefile
 delete mode 100644 board/altera/nios2-generic/config.mk
 delete mode 100644 board/altera/nios2-generic/custom_fpga.h
 delete mode 100644 board/altera/nios2-generic/nios2-generic.c
arch/nios2/Kconfig +6 -10
index 8ae7f6e..bb4fb2a 100644
@@ -4,15 +4,11 @@ menu "Nios II architecture"
 config SYS_ARCH
 	default "nios2"
 
-choice
-	prompt "Target select"
-	optional
-
-config TARGET_NIOS2_GENERIC
-	bool "Support nios2-generic"
-
-endchoice
-
-source "board/altera/nios2-generic/Kconfig"
+config SYS_CONFIG_NAME
+	string "Board header file"
+	help
+	  This option should contain the base name of board header file.
+	  The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
+	  should be included from include/config.h.
 
 endmenu
board/altera/common/cfide.c deleted +0 -33
deleted file mode 100644
index 40d6a12..0000000
@@ -1,33 +0,0 @@
-/*
- * Altera CF drvier
- *
- * (C) Copyright 2010, Thomas Chou <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <common.h>
-#include <asm/io.h>
-
-#if defined(CONFIG_IDE_RESET) && defined(CONFIG_SYS_CF_CTL_BASE)
-/* ide_set_reset for Altera CF interface */
-#define ALTERA_CF_CTL_STATUS			0
-#define ALTERA_CF_IDE_CTL			4
-#define ALTERA_CF_CTL_STATUS_PRESENT_MSK	(0x1)
-#define ALTERA_CF_CTL_STATUS_POWER_MSK		(0x2)
-#define ALTERA_CF_CTL_STATUS_RESET_MSK		(0x4)
-#define ALTERA_CF_CTL_STATUS_IRQ_EN_MSK	(0x8)
-#define ALTERA_CF_IDE_CTL_IRQ_EN_MSK		(0x1)
-
-void ide_set_reset(int idereset)
-{
-	int i;
-	writel(idereset ? ALTERA_CF_CTL_STATUS_RESET_MSK :
-	       ALTERA_CF_CTL_STATUS_POWER_MSK,
-	       CONFIG_SYS_CF_CTL_BASE + ALTERA_CF_CTL_STATUS);
-	/* wait 500 ms for power to stabilize */
-	for (i = 0; i < 500; i++)
-		udelay(1000);
-}
-#endif
board/altera/nios2-generic/Kconfig deleted +0 -12
deleted file mode 100644
index cd3d098..0000000
@@ -1,12 +0,0 @@
-if TARGET_NIOS2_GENERIC
-
-config SYS_BOARD
-	default "nios2-generic"
-
-config SYS_VENDOR
-	default "altera"
-
-config SYS_CONFIG_NAME
-	default "nios2-generic"
-
-endif
board/altera/nios2-generic/MAINTAINERS deleted +0 -6
deleted file mode 100644
index 9cbcba9..0000000
@@ -1,6 +0,0 @@
-NIOS2-GENERIC BOARD
-M:	Scott McNutt <[email protected]>
-S:	Maintained
-F:	board/altera/nios2-generic/
-F:	include/configs/nios2-generic.h
-F:	configs/nios2-generic_defconfig
board/altera/nios2-generic/Makefile deleted +0 -10
deleted file mode 100644
index 5e4192c..0000000
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2001-2006
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-# (C) Copyright 2010, Thomas Chou <[email protected]>
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-obj-y	:= nios2-generic.o
-obj-$(CONFIG_CMD_IDE) += ../common/cfide.o
board/altera/nios2-generic/config.mk deleted +0 -12
deleted file mode 100644
index a673525..0000000
@@ -1,12 +0,0 @@
-#
-# (C) Copyright 2005, Psyent Corporation <www.psyent.com>
-# Scott McNutt <[email protected]>
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
-
-ifeq ($(debug),1)
-PLATFORM_CPPFLAGS += -DDEBUG
-endif
board/altera/nios2-generic/custom_fpga.h deleted +0 -89

89 lines not on this page · raw message

board/altera/nios2-generic/nios2-generic.c deleted +0 -76

76 lines not on this page · raw message

configs/nios2-generic_defconfig +1 -1
index 3d404b2..ea07b56 100644
@@ -1,7 +1,7 @@
 CONFIG_NIOS2=y
+CONFIG_SYS_CONFIG_NAME="nios2-generic"
 CONFIG_DM_SERIAL=y
 CONFIG_DM_GPIO=y
-CONFIG_TARGET_NIOS2_GENERIC=y
 CONFIG_DEFAULT_DEVICE_TREE="3c120_devboard"
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
include/configs/nios2-generic.h +15 -8
index e4b5abb..11be6e1 100644
@@ -12,12 +12,8 @@
 /*
  * BOARD/CPU
  */
-#include "../board/altera/nios2-generic/custom_fpga.h" /* fpga parameters */
-#define CONFIG_BOARD_NAME "nios2-generic" /* custom board name */
-#define CONFIG_BOARD_EARLY_INIT_F	/* enable early board-spec. init */
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE
-#define CONFIG_SYS_NIOS_SYSID_BASE	CONFIG_SYS_SYSID_BASE
 
 /*
  * SERIAL
@@ -26,6 +22,17 @@
 #define CONFIG_SYS_CONSOLE_INFO_QUIET	/* Suppress console info */
 
 /*
+ * CFI Flash
+ */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_CFI_FLASH_STATUS_POLL /* fix amd flash issue */
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_MAX_FLASH_BANKS	1
+#define CONFIG_SYS_MAX_FLASH_SECT	512
+
+/*
  * BOOTP options
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
@@ -49,11 +56,9 @@
  */
 #define CONFIG_ENV_IS_IN_FLASH
 
-#define CONFIG_ENV_SIZE		0x20000	/* 128k, 1 sector */
+#define CONFIG_ENV_SIZE			0x20000	/* 128k, 1 sector */
 #define CONFIG_ENV_OVERWRITE		/* Serial change Ok	*/
-#define CONFIG_ENV_ADDR		((CONFIG_SYS_RESET_ADDR + \
-					  CONFIG_SYS_MONITOR_LEN) | \
-					 CONFIG_SYS_FLASH_BASE)
+#define CONFIG_ENV_ADDR			0xe2840000
 
 /*
  * MEMORY ORGANIZATION
@@ -61,6 +66,8 @@
  * -The heap is placed below the monitor
  * -The stack is placed below the heap (&grows down).
  */
+#define CONFIG_SYS_SDRAM_BASE		0xD0000000
+#define CONFIG_SYS_SDRAM_SIZE		0x08000000
 #define CONFIG_MONITOR_IS_IN_RAM
 #define CONFIG_SYS_MONITOR_LEN		0x40000	/* Reserve 256k */
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_SDRAM_BASE + \
Signature · 1 line
2.1.4
#5 lore raw

PATCH v2 1/1 nios2: zap nios2-generic board dir

Quoted 19 lines · Thomas Chou

As we use device tree to control u-boot now, the generic board can be removed.

---
v2
split change to nios2/config.mk as suggested by Marek.

  arch/nios2/Kconfig                         | 16 ++----
  board/altera/common/cfide.c                | 33 -----------
  board/altera/nios2-generic/Kconfig         | 12 ----
  board/altera/nios2-generic/MAINTAINERS     |  6 --
  board/altera/nios2-generic/Makefile        | 10 ----
  board/altera/nios2-generic/config.mk       | 12 ----
  board/altera/nios2-generic/custom_fpga.h   | 89 ------------------------------
  board/altera/nios2-generic/nios2-generic.c | 76 -------------------------
  configs/nios2-generic_defconfig            |  2 +-
  include/configs/nios2-generic.h            | 23 +++++---
  10 files changed, 22 insertions(+), 257 deletions(-)
Quoted 8 lines

delete mode 100644 board/altera/common/cfide.c delete mode 100644 board/altera/nios2-generic/Kconfig delete mode 100644 board/altera/nios2-generic/MAINTAINERS delete mode 100644 board/altera/nios2-generic/Makefile delete mode 100644 board/altera/nios2-generic/config.mk delete mode 100644 board/altera/nios2-generic/custom_fpga.h delete mode 100644 board/altera/nios2-generic/nios2-generic.c

Applied to u-boot-nios.

#6 lore raw

PATCH v2 1/1 nios2: zap nios2-generic board dir

Quoted 31 lines · Thomas Chou
Quoted 22 lines · Thomas Chou

As we use device tree to control u-boot now, the generic board can be removed.

---
v2

split change to nios2/config.mk as suggested by Marek.

  arch/nios2/Kconfig                         | 16 ++----
  board/altera/common/cfide.c                | 33 -----------
  board/altera/nios2-generic/Kconfig         | 12 ----
  board/altera/nios2-generic/MAINTAINERS     |  6 --
  board/altera/nios2-generic/Makefile        | 10 ----
  board/altera/nios2-generic/config.mk       | 12 ----
  board/altera/nios2-generic/custom_fpga.h   | 89
  ------------------------------
  board/altera/nios2-generic/nios2-generic.c | 76
  ------------------------- configs/nios2-generic_defconfig            |
   2 +-
  include/configs/nios2-generic.h            | 23 +++++---
  10 files changed, 22 insertions(+), 257 deletions(-)
Quoted 7 lines

delete mode 100644 board/altera/common/cfide.c delete mode 100644 board/altera/nios2-generic/Kconfig delete mode 100644 board/altera/nios2-generic/MAINTAINERS delete mode 100644 board/altera/nios2-generic/Makefile delete mode 100644 board/altera/nios2-generic/config.mk delete mode 100644 board/altera/nios2-generic/custom_fpga.h delete mode 100644 board/altera/nios2-generic/nios2-generic.c

Quoted 1 line

Applied to u-boot-nios.

Best regards,
Marek Vasut