All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 06/12] board: keymile: Move common headers to board-common directory
Date: Wed, 18 Nov 2015 14:58:15 +0100	[thread overview]
Message-ID: <564C83F7.9090502@keymile.com> (raw)
In-Reply-To: <1447393422-4169-7-git-send-email-nm@ti.com>

On 13/11/2015 06:43, Nishanth Menon wrote:
> Header files can be located in a generic location without
> needing to reference them with ../common/
> 
> Generated with the following script
> 
>  #!/bin/bash
> vendor=board/keymile
> common=$vendor/common
> 
> cfiles=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep c$`
> headers=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep h$`
> 
> mkdir -p $common/include/board-common
> set -x
> for header in $headers
> do
> 	echo "processing $header in $common"
> 	hbase=`basename $header`
> 	git mv $common/$hbase $common/include/board-common
> 	sed -i -e "s/\"..\/common\/$hbase\"/<board-common\/$hbase>/g" $vendor/*/*.[chS]
> 	sed -i -e "s/\"$hbase\"/<board-common\/$hbase>/g" $vendor/common/*.[chS]
> done
> 
> Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>

This was successfully tested on several Keymile boards and it is good that the
Keymile boards also follow this new board/common include scheme.

Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>

> ---
>  board/keymile/common/common.c                            | 2 +-
>  board/keymile/common/{ => include/board-common}/common.h | 0
>  board/keymile/common/ivm.c                               | 2 +-
>  board/keymile/km82xx/km82xx.c                            | 2 +-
>  board/keymile/km83xx/km83xx.c                            | 2 +-
>  board/keymile/km83xx/km83xx_i2c.c                        | 2 +-
>  board/keymile/km_arm/km_arm.c                            | 2 +-
>  board/keymile/kmp204x/kmp204x.c                          | 2 +-
>  board/keymile/kmp204x/qrio.c                             | 2 +-
>  9 files changed, 8 insertions(+), 8 deletions(-)
>  rename board/keymile/common/{ => include/board-common}/common.h (100%)
> 
> diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
> index b9aff1a84dcb..4f8b68ee5ccd 100644
> --- a/board/keymile/common/common.c
> +++ b/board/keymile/common/common.c
> @@ -21,7 +21,7 @@
>  #if defined(CONFIG_POST)
>  #include "post.h"
>  #endif
> -#include "common.h"
> +#include <board-common/common.h>
>  #include <i2c.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/board/keymile/common/common.h b/board/keymile/common/include/board-common/common.h
> similarity index 100%
> rename from board/keymile/common/common.h
> rename to board/keymile/common/include/board-common/common.h
> diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
> index 42db54221bb3..4d2963ad5f84 100644
> --- a/board/keymile/common/ivm.c
> +++ b/board/keymile/common/ivm.c
> @@ -8,7 +8,7 @@
>  #include <common.h>
>  #include <cli_hush.h>
>  #include <i2c.h>
> -#include "common.h"
> +#include <board-common/common.h>
>  
>  #define MAC_STR_SZ	20
>  
> diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
> index c599b4093626..73d22dc6ac19 100644
> --- a/board/keymile/km82xx/km82xx.c
> +++ b/board/keymile/km82xx/km82xx.c
> @@ -16,7 +16,7 @@
>  #endif
>  
>  #include <i2c.h>
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  
>  static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
>  
> diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
> index 89e9e1e57c38..83deca56aebc 100644
> --- a/board/keymile/km83xx/km83xx.c
> +++ b/board/keymile/km83xx/km83xx.c
> @@ -26,7 +26,7 @@
>  #include <libfdt.h>
>  #include <post.h>
>  
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  
>  static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
>  
> diff --git a/board/keymile/km83xx/km83xx_i2c.c b/board/keymile/km83xx/km83xx_i2c.c
> index c961937530ac..e702a5cf86e2 100644
> --- a/board/keymile/km83xx/km83xx_i2c.c
> +++ b/board/keymile/km83xx/km83xx_i2c.c
> @@ -9,7 +9,7 @@
>  #include <i2c.h>
>  #include <asm/io.h>
>  #include <linux/ctype.h>
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  
>  static void i2c_write_start_seq(void)
>  {
> diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
> index 2938861f368f..82fa31c2208d 100644
> --- a/board/keymile/km_arm/km_arm.c
> +++ b/board/keymile/km_arm/km_arm.c
> @@ -23,7 +23,7 @@
>  #include <asm/arch/soc.h>
>  #include <asm/arch/mpp.h>
>  
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
> index eebb47fc21f1..fbe6d98af6ce 100644
> --- a/board/keymile/kmp204x/kmp204x.c
> +++ b/board/keymile/kmp204x/kmp204x.c
> @@ -21,7 +21,7 @@
>  #include <asm/fsl_liodn.h>
>  #include <fm_eth.h>
>  
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  #include "kmp204x.h"
>  
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/board/keymile/kmp204x/qrio.c b/board/keymile/kmp204x/qrio.c
> index edf3bf11a894..a4c25e084846 100644
> --- a/board/keymile/kmp204x/qrio.c
> +++ b/board/keymile/kmp204x/qrio.c
> @@ -7,7 +7,7 @@
>  
>  #include <common.h>
>  
> -#include "../common/common.h"
> +#include <board-common/common.h>
>  #include "kmp204x.h"
>  
>  /* QRIO GPIO register offsets */
> 

  reply	other threads:[~2015-11-18 13:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  5:43 [U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 01/12] Makefile: Include vendor common library in include search path Nishanth Menon
2015-11-15 14:45   ` Igor Grinberg
2015-11-13  5:43 ` [U-Boot] [PATCH V2 02/12] board: BuR: Move common headers to board-common directory Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 03/12] board: compulab: " Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 05/12] board: gdsys: " Nishanth Menon
2015-11-16  8:01   ` Dirk Eibach
2015-11-16  8:04     ` Dirk Eibach
2015-11-13  5:43 ` [U-Boot] [PATCH V2 06/12] board: keymile: " Nishanth Menon
2015-11-18 13:58   ` Valentin Longchamp [this message]
2015-11-13  5:43 ` [U-Boot] [PATCH V2 07/12] board: LaCie: " Nishanth Menon
2015-11-13 10:30   ` Simon Guinot
2015-11-13 14:06     ` Tom Rini
2015-11-13 15:32       ` Simon Guinot
2015-11-13 23:57         ` Nishanth Menon
2015-11-14  2:05           ` Simon Glass
2015-11-16  1:53             ` Tom Rini
2015-11-14 23:56   ` Masahiro Yamada
2015-11-15  5:38     ` Nishanth Menon
2015-11-16  3:32       ` Masahiro Yamada
2015-11-16 15:34         ` Nishanth Menon
2015-11-17  0:45           ` Tom Rini
2015-11-13  5:43 ` [U-Boot] [PATCH V2 08/12] board: mpl: " Nishanth Menon
2015-11-13  8:19   ` David Müller (ELSOFT AG)
2015-11-13 14:02     ` Tom Rini
2015-11-13  5:43 ` [U-Boot] [PATCH V2 09/12] board: seco: " Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 10/12] board: siemens: " Nishanth Menon
2015-11-16  9:17   ` Egli, Samuel
2015-11-13  5:43 ` [U-Boot] [PATCH V2 11/12] board: varisys: " Nishanth Menon
2015-11-16  7:42   ` Andy Fleming
2015-11-13  5:43 ` [U-Boot] [PATCH V2 12/12] board: xes: " Nishanth Menon
2015-11-13  5:51 ` [U-Boot] [PATCH RESEND V2 04/12] board: freescale: " Nishanth Menon
2015-12-19 23:07 ` [U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location Simon Glass
2015-12-20  0:25   ` Nishanth Menon
2015-12-28  4:22     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564C83F7.9090502@keymile.com \
    --to=valentin.longchamp@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.