Re: [U-Boot] [PATCH] nios2: zap nios2-generic board dir

2015-10-18 Thread Marek Vasut
On Monday, October 19, 2015 at 01:41:48 AM, Thomas Chou wrote:
> Hi Marek,

Hi,

> On 10/18/2015 11:35 PM, Marek Vasut wrote:
> >> +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/.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.

Don't we support just nios2-generic board ?

> 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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] nios2: zap nios2-generic board dir

2015-10-18 Thread Thomas Chou

Hi Marek,

On 10/18/2015 11:35 PM, Marek Vasut wrote:

+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/.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.





  endmenu
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 82bd887..2abad3f 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -10,10 +10,11 @@ ifeq ($(CROSS_COMPILE),)
  CROSS_COMPILE := nios2-elf-
  endif

-CONFIG_STANDALONE_LOAD_ADDR ?= 0x0200
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xd200


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


  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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] nios2: zap nios2-generic board dir

2015-10-18 Thread Thomas Chou
As we use device tree to control u-boot now, the generic
board can be removed.

Signed-off-by: Thomas Chou 
---
 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

diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 8ae7f6e..bb4fb2a 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -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/.h
+ should be included from include/config.h.
 
 endmenu
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 82bd887..2abad3f 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -10,10 +10,11 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := nios2-elf-
 endif
 
-CONFIG_STANDALONE_LOAD_ADDR ?= 0x0200
+CONFIG_STANDALONE_LOAD_ADDR ?= 0xd200
 
 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
diff --git a/board/altera/common/cfide.c b/board/altera/common/cfide.c
deleted file mode 100644
index 40d6a12..000
--- a/board/altera/common/cfide.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Altera CF drvier
- *
- * (C) Copyright 2010, Thomas Chou 
- *
- * 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 
-#include 
-
-#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
diff --git a/board/altera/nios2-generic/Kconfig 
b/board/altera/nios2-generic/Kconfig
deleted file mode 100644
index cd3d098..000
--- a/board/altera/nios2-generic/Kconfig
+++ /dev/null
@@ -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
diff --git a/board/altera/nios2-generic/MAINTAINERS 
b/board/altera/nios2-generic/MAINTAINERS
deleted file mode 100644
index 9cbcba9..000
--- a/board/altera/nios2-generic/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-NIOS2-GENERIC BOARD
-M: Scott McNutt 
-S: Maintained
-F: board/altera/nios2-generic/
-F: include/configs/nios2-generic.h
-F: configs/nios2-generic_defconfig
diff --git a/board/altera/nios2-generic/Makefile 
b/board/altera/nios2-generic/Makefile
deleted file mode 100644
index 5e4192c..000
--- a/board/altera/nios2-generic/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2001-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-# (C) Copyright 2010, Thomas Chou 
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  := nios2-generic.o
-obj-$(CONFIG_CMD_IDE) += 

Re: [U-Boot] [PATCH] nios2: zap nios2-generic board dir

2015-10-18 Thread Marek Vasut
On Sunday, October 18, 2015 at 10:36:32 AM, Thomas Chou wrote:
> As we use device tree to control u-boot now, the generic
> board can be removed.
> 
> Signed-off-by: Thomas Chou 

Hi!

> ---
>  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
> 
> diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
> index 8ae7f6e..bb4fb2a 100644
> --- a/arch/nios2/Kconfig
> +++ b/arch/nios2/Kconfig
> @@ -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/.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 ?

>  endmenu
> diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
> index 82bd887..2abad3f 100644
> --- a/arch/nios2/config.mk
> +++ b/arch/nios2/config.mk
> @@ -10,10 +10,11 @@ ifeq ($(CROSS_COMPILE),)
>  CROSS_COMPILE := nios2-elf-
>  endif
> 
> -CONFIG_STANDALONE_LOAD_ADDR ?= 0x0200
> +CONFIG_STANDALONE_LOAD_ADDR ?= 0xd200

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

>  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.

>  LDFLAGS_FINAL += --gc-sections
>  PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections

[...]

I'm really happy to see the generic board go, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot