[U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-03-16 Thread Masahiro Yamada
All the M68000 boards have switched to Generic Board.
This file is no longer necessary.

Signed-off-by: Masahiro Yamada 
Cc: Huan Wang 
Cc: Angelo Dureghello 
---

Changes in v2: None

 arch/m68k/lib/Makefile |   3 -
 arch/m68k/lib/board.c  | 642 -
 2 files changed, 645 deletions(-)
 delete mode 100644 arch/m68k/lib/board.c

diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
index d0e1a84..73d40bd 100644
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -5,9 +5,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-ifndef CONFIG_SYS_GENERIC_BOARD
-obj-y   += board.o
-endif
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-y  += cache.o
 obj-y  += interrupts.o
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
deleted file mode 100644
index 9caff73..000
--- a/arch/m68k/lib/board.c
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
- * (C) Copyright 2003
- * Josef Baumgartner 
- *
- * (C) Copyright 2000-2002
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#if defined(CONFIG_CMD_IDE)
-#include 
-#endif
-#if defined(CONFIG_CMD_SCSI)
-#include 
-#endif
-#if defined(CONFIG_CMD_KGDB)
-#include 
-#endif
-#ifdef CONFIG_STATUS_LED
-#include 
-#endif
-#include 
-#include 
-#ifdef CONFIG_SYS_ALLOC_DPRAM
-#include 
-#endif
-#include 
-
-#if defined(CONFIG_HARD_I2C) || \
-   defined(CONFIG_SYS_I2C)
-#include 
-#endif
-
-#ifdef CONFIG_CMD_SPI
-#include 
-#endif
-
-#ifdef CONFIG_BITBANGMII
-#include 
-#endif
-
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static char *failed = "*** failed ***\n";
-
-#include 
-
-extern ulong __init_end;
-extern ulong __bss_end;
-
-#if defined(CONFIG_WATCHDOG)
-# undef INIT_FUNC_WATCHDOG_INIT
-# define INIT_FUNC_WATCHDOG_INIT   watchdog_init,
-# define WATCHDOG_DISABLE  watchdog_disable
-
-extern int watchdog_init(void);
-extern int watchdog_disable(void);
-#else
-# define INIT_FUNC_WATCHDOG_INIT   /* undef */
-# define WATCHDOG_DISABLE  /* undef */
-#endif /* CONFIG_WATCHDOG */
-
-ulong monitor_flash_len;
-
-/
- * Utilities   *
- 
- */
-
-/*
- * All attempts to come up with a "common" initialization sequence
- * that works for all boards and architectures failed: some of the
- * requirements are just _too_ different. To get rid of the resulting
- * mess of board dependend #ifdef'ed code we now make the whole
- * initialization sequence configurable to the user.
- *
- * The requirements for any new initalization function is simple: it
- * receives a pointer to the "global data" structure as it's only
- * argument, and returns an integer return code, where 0 means
- * "continue" and != 0 means "fatal error, hang the system".
- */
-typedef int (init_fnc_t) (void);
-
-/
- * Init Utilities
- 
- * Some of this code should be moved into the core functions,
- * but let's get it working (again) first...
- */
-
-static int init_baudrate (void)
-{
-   gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
-   return 0;
-}
-
-/***/
-
-static int init_func_ram (void)
-{
-   int board_type = 0; /* use dummy arg */
-   puts ("DRAM:  ");
-
-   if ((gd->ram_size = initdram (board_type)) > 0) {
-   print_size (gd->ram_size, "\n");
-   return (0);
-   }
-   puts (failed);
-   return (1);
-}
-
-/***/
-
-#if defined(CONFIG_HARD_I2C) ||defined(CONFIG_SYS_I2C)
-static int init_func_i2c (void)
-{
-   puts ("I2C:   ");
-#ifdef CONFIG_SYS_I2C
-   i2c_init_all();
-#else
-   i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
-   puts ("ready\n");
-   return (0);
-}
-#endif
-
-#if defined(CONFIG_HARD_SPI)
-static int init_func_spi (void)
-{
-   puts ("SPI:   ");
-   spi_init ();
-   puts ("ready\n");
-   return (0);
-}
-#endif
-
-/***/
-
-/
- * Initialization sequence *
- 
- */
-
-init_fnc_t *init_sequence[] = {
-   get_clocks,
-   env_init,
-   init_baudrate,
-   serial_init,
-   console_init_f,
-   display_options,
-   checkcpu,
-   checkboard,
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
-   init_

Re: [U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-03-16 Thread Angelo Dureghello

On 17/03/2015 04:35, Masahiro Yamada wrote:

All the M68000 boards have switched to Generic Board.
This file is no longer necessary.



Hi Masahiro,

thanks.

Afaik, me and Alison converted and tested actually only 2 boards
(adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)

Is this a problem ?  Afaik, the user going to build the board
will get a warning that he needs to switch to generic board.
So the same user will be the tester that all works. Correct ?

Best regards,
Angelo
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-03-24 Thread Masahiro Yamada
Hi Angelo,


2015-03-17 15:55 GMT+09:00 Angelo Dureghello :
> On 17/03/2015 04:35, Masahiro Yamada wrote:
>>
>> All the M68000 boards have switched to Generic Board.
>> This file is no longer necessary.
>>
>
> Hi Masahiro,
>
> thanks.
>
> Afaik, me and Alison converted and tested actually only 2 boards
> (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
>
> Is this a problem ?  Afaik, the user going to build the board
> will get a warning that he needs to switch to generic board.
> So the same user will be the tester that all works. Correct ?

As a rule of generic board, people are supposed to do run-test
and then send a patch.


BTW, M68K is the last architecture that adopts per-board linker script.

M68K should switch to per-soc linker scripts like the other architecures.
It means all the followings should be merged into the single linker script
arch/m68k/cpu/u-boot.lds.

board/freescale/m52277evb/u-boot.lds
board/freescale/m5235evb/u-boot.lds
board/cobra5272/u-boot.lds
board/BuS/eb_cpu5282/u-boot.lds
board/freescale/m5208evbe/u-boot.lds
board/freescale/m5249evb/u-boot.lds
board/freescale/m5253demo/u-boot.lds
board/freescale/m5272c3/u-boot.lds
board/freescale/m5275evb/u-boot.lds
board/freescale/m5282evb/u-boot.lds
board/sysam/amcore/u-boot.lds
board/astro/mcf5373l/u-boot.lds
board/freescale/m53017evb/u-boot.lds
board/freescale/m5329evb/u-boot.lds
board/freescale/m5373evb/u-boot.lds
board/freescale/m54418twr/u-boot.lds
board/freescale/m54451evb/u-boot.lds
board/freescale/m54455evb/u-boot.lds
board/freescale/m547xevb/u-boot.lds
board/freescale/m548xevb/u-boot.lds



Is this possible for you?  (or for someone else?)

If there is no volunteer, it would be much easier to remove all the M68K boards
except the two you and Alison can maintain.

Maintain or Remove!


-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-03-25 Thread Angelo Dureghello

Hi Masahiro,

On 25/03/2015 04:20, Masahiro Yamada wrote:

Hi Angelo,


2015-03-17 15:55 GMT+09:00 Angelo Dureghello :

On 17/03/2015 04:35, Masahiro Yamada wrote:


All the M68000 boards have switched to Generic Board.
This file is no longer necessary.



Hi Masahiro,

thanks.

Afaik, me and Alison converted and tested actually only 2 boards
(adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)

Is this a problem ?  Afaik, the user going to build the board
will get a warning that he needs to switch to generic board.
So the same user will be the tester that all works. Correct ?


As a rule of generic board, people are supposed to do run-test
and then send a patch.


BTW, M68K is the last architecture that adopts per-board linker script.

M68K should switch to per-soc linker scripts like the other architecures.
It means all the followings should be merged into the single linker script
arch/m68k/cpu/u-boot.lds.

board/freescale/m52277evb/u-boot.lds
board/freescale/m5235evb/u-boot.lds
board/cobra5272/u-boot.lds
board/BuS/eb_cpu5282/u-boot.lds
board/freescale/m5208evbe/u-boot.lds
board/freescale/m5249evb/u-boot.lds
board/freescale/m5253demo/u-boot.lds
board/freescale/m5272c3/u-boot.lds
board/freescale/m5275evb/u-boot.lds
board/freescale/m5282evb/u-boot.lds
board/sysam/amcore/u-boot.lds
board/astro/mcf5373l/u-boot.lds
board/freescale/m53017evb/u-boot.lds
board/freescale/m5329evb/u-boot.lds
board/freescale/m5373evb/u-boot.lds
board/freescale/m54418twr/u-boot.lds
board/freescale/m54451evb/u-boot.lds
board/freescale/m54455evb/u-boot.lds
board/freescale/m547xevb/u-boot.lds
board/freescale/m548xevb/u-boot.lds






Is this possible for you?  (or for someone else?)


Sure, i look into this.
I start from checking what are the differences.




If there is no volunteer, it would be much easier to remove all the M68K boards
except the two you and Alison can maintain.

Maintain or Remove!



Best regards
Angelo

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-04-08 Thread Angelo Dureghello

Hi Masahiro and all,


On 25/03/2015 04:20, Masahiro Yamada wrote:

Hi Angelo,


2015-03-17 15:55 GMT+09:00 Angelo Dureghello :

On 17/03/2015 04:35, Masahiro Yamada wrote:


All the M68000 boards have switched to Generic Board.
This file is no longer necessary.



Hi Masahiro,

thanks.

Afaik, me and Alison converted and tested actually only 2 boards
(adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)

Is this a problem ?  Afaik, the user going to build the board
will get a warning that he needs to switch to generic board.
So the same user will be the tester that all works. Correct ?


As a rule of generic board, people are supposed to do run-test
and then send a patch.


BTW, M68K is the last architecture that adopts per-board linker script.

M68K should switch to per-soc linker scripts like the other architecures.
It means all the followings should be merged into the single linker script
arch/m68k/cpu/u-boot.lds.

board/freescale/m52277evb/u-boot.lds
board/freescale/m5235evb/u-boot.lds
board/cobra5272/u-boot.lds
board/BuS/eb_cpu5282/u-boot.lds
board/freescale/m5208evbe/u-boot.lds
board/freescale/m5249evb/u-boot.lds
board/freescale/m5253demo/u-boot.lds
board/freescale/m5272c3/u-boot.lds
board/freescale/m5275evb/u-boot.lds
board/freescale/m5282evb/u-boot.lds
board/sysam/amcore/u-boot.lds
board/astro/mcf5373l/u-boot.lds
board/freescale/m53017evb/u-boot.lds
board/freescale/m5329evb/u-boot.lds
board/freescale/m5373evb/u-boot.lds
board/freescale/m54418twr/u-boot.lds
board/freescale/m54451evb/u-boot.lds
board/freescale/m54455evb/u-boot.lds
board/freescale/m547xevb/u-boot.lds
board/freescale/m548xevb/u-boot.lds



Is this possible for you?  (or for someone else?)

If there is no volunteer, it would be much easier to remove all the M68K boards
except the two you and Alison can maintain.

Maintain or Remove!



so i posted a patch for a unified m68k arch-wide linker script.
Could not be the best solution but it is a solution that works.

https://patchwork.ozlabs.org/patch/455952/

Let me know your comments.


Best regards,
Angelo Dureghello
--


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-04-09 Thread Masahiro Yamada
Hi Angelo,


2015-04-09 4:20 GMT+09:00 Angelo Dureghello :
> Hi Masahiro and all,
>
>
> On 25/03/2015 04:20, Masahiro Yamada wrote:
>>
>> Hi Angelo,
>>
>>
>> 2015-03-17 15:55 GMT+09:00 Angelo Dureghello :
>>>
>>> On 17/03/2015 04:35, Masahiro Yamada wrote:


 All the M68000 boards have switched to Generic Board.
 This file is no longer necessary.

>>>
>>> Hi Masahiro,
>>>
>>> thanks.
>>>
>>> Afaik, me and Alison converted and tested actually only 2 boards
>>> (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
>>>
>>> Is this a problem ?  Afaik, the user going to build the board
>>> will get a warning that he needs to switch to generic board.
>>> So the same user will be the tester that all works. Correct ?
>>
>>
>> As a rule of generic board, people are supposed to do run-test
>> and then send a patch.
>>
>>
>> BTW, M68K is the last architecture that adopts per-board linker script.
>>
>> M68K should switch to per-soc linker scripts like the other architecures.
>> It means all the followings should be merged into the single linker script
>> arch/m68k/cpu/u-boot.lds.
>>
>> board/freescale/m52277evb/u-boot.lds
>> board/freescale/m5235evb/u-boot.lds
>> board/cobra5272/u-boot.lds
>> board/BuS/eb_cpu5282/u-boot.lds
>> board/freescale/m5208evbe/u-boot.lds
>> board/freescale/m5249evb/u-boot.lds
>> board/freescale/m5253demo/u-boot.lds
>> board/freescale/m5272c3/u-boot.lds
>> board/freescale/m5275evb/u-boot.lds
>> board/freescale/m5282evb/u-boot.lds
>> board/sysam/amcore/u-boot.lds
>> board/astro/mcf5373l/u-boot.lds
>> board/freescale/m53017evb/u-boot.lds
>> board/freescale/m5329evb/u-boot.lds
>> board/freescale/m5373evb/u-boot.lds
>> board/freescale/m54418twr/u-boot.lds
>> board/freescale/m54451evb/u-boot.lds
>> board/freescale/m54455evb/u-boot.lds
>> board/freescale/m547xevb/u-boot.lds
>> board/freescale/m548xevb/u-boot.lds
>>
>>
>>
>> Is this possible for you?  (or for someone else?)
>>
>> If there is no volunteer, it would be much easier to remove all the M68K
>> boards
>> except the two you and Alison can maintain.
>>
>> Maintain or Remove!
>>
>
> so i posted a patch for a unified m68k arch-wide linker script.
> Could not be the best solution but it is a solution that works.
>
> https://patchwork.ozlabs.org/patch/455952/
>
> Let me know your comments.

Great cleanup!

Thank you!


-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot