diff mbox

[U-Boot,1/2] pci/layerscape: move pcie_layerscape.h out of arm include

Message ID 1426072174-6337-1-git-send-email-Minghuan.Lian@freescale.com
State Superseded
Delegated to: York Sun
Headers show

Commit Message

Minghuan Lian March 11, 2015, 11:09 a.m. UTC
The patch moves pcie_layerscape.h out of arm include to top
level include folder so that it can be shared on other Socs.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
---
 arch/arm/include/asm/pcie_layerscape.h  | 13 -------------
 board/freescale/ls1021atwr/ls1021atwr.c |  3 ++-
 drivers/pci/pcie_layerscape.c           |  2 +-
 include/pcie_layerscape.h               | 13 +++++++++++++
 4 files changed, 16 insertions(+), 15 deletions(-)
 delete mode 100644 arch/arm/include/asm/pcie_layerscape.h
 create mode 100644 include/pcie_layerscape.h

Comments

Tom Rini March 11, 2015, 2:22 p.m. UTC | #1
On Wed, Mar 11, 2015 at 07:09:33PM +0800, Minghuan Lian wrote:

> The patch moves pcie_layerscape.h out of arm include to top
> level include folder so that it can be shared on other Socs.
> 
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>

OK, I see a problem:

> diff --git a/arch/arm/include/asm/pcie_layerscape.h b/arch/arm/include/asm/pcie_layerscape.h
> deleted file mode 100644
> index fb08578..0000000
> --- a/arch/arm/include/asm/pcie_layerscape.h
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -/*
> - * Copyright 2014 Freescale Semiconductor, Inc.
> - *
> - * SPDX-License-Identifier:	GPL-2.0+
> - */
> -
> -#ifndef __PCIE_LAYERSCAPE_H_
> -#define __PCIE_LAYERSCAPE_H_
> -
> -void pci_init_board(void);

This is already in <common.h>

> -void ft_pcie_setup(void *blob, bd_t *bd);

This belongs in <fdt_support.h> near other similar functions and frankly
might be better done as ft_pci_setup(blob, bd) which already exists.  Or
do we have both ft_pci_setup and ft_pcie_setup existing at the same
time?
Lian Minghaun-b31939 March 12, 2015, 2:21 a.m. UTC | #2
Hi Tom,

Thanks for your comments.
I will use the common name and remove unnecessary file pcie_layerscape.h

Thanks,
Minghuan


On 2015年03月11日 22:22, Tom Rini wrote:
> On Wed, Mar 11, 2015 at 07:09:33PM +0800, Minghuan Lian wrote:
>
>> The patch moves pcie_layerscape.h out of arm include to top
>> level include folder so that it can be shared on other Socs.
>>
>> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
> OK, I see a problem:
>
>> diff --git a/arch/arm/include/asm/pcie_layerscape.h b/arch/arm/include/asm/pcie_layerscape.h
>> deleted file mode 100644
>> index fb08578..0000000
>> --- a/arch/arm/include/asm/pcie_layerscape.h
>> +++ /dev/null
>> @@ -1,13 +0,0 @@
>> -/*
>> - * Copyright 2014 Freescale Semiconductor, Inc.
>> - *
>> - * SPDX-License-Identifier:	GPL-2.0+
>> - */
>> -
>> -#ifndef __PCIE_LAYERSCAPE_H_
>> -#define __PCIE_LAYERSCAPE_H_
>> -
>> -void pci_init_board(void);
> This is already in <common.h>
>
>> -void ft_pcie_setup(void *blob, bd_t *bd);
> This belongs in <fdt_support.h> near other similar functions and frankly
> might be better done as ft_pci_setup(blob, bd) which already exists.  Or
> do we have both ft_pci_setup and ft_pcie_setup existing at the same
> time?
>
diff mbox

Patch

diff --git a/arch/arm/include/asm/pcie_layerscape.h b/arch/arm/include/asm/pcie_layerscape.h
deleted file mode 100644
index fb08578..0000000
--- a/arch/arm/include/asm/pcie_layerscape.h
+++ /dev/null
@@ -1,13 +0,0 @@ 
-/*
- * Copyright 2014 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#ifndef __PCIE_LAYERSCAPE_H_
-#define __PCIE_LAYERSCAPE_H_
-
-void pci_init_board(void);
-void ft_pcie_setup(void *blob, bd_t *bd);
-
-#endif
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index fb8525f..2d5c29c 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -12,7 +12,6 @@ 
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/ls102xa_stream_id.h>
-#include <asm/pcie_layerscape.h>
 #include <mmc.h>
 #include <fsl_esdhc.h>
 #include <fsl_ifc.h>
@@ -21,6 +20,8 @@ 
 #include <tsec.h>
 #include <fsl_sec.h>
 #include <spl.h>
+#include <pcie_layerscape.h>
+
 #ifdef CONFIG_U_QE
 #include "../../../drivers/qe/qe.h"
 #endif
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index bcad8f2..15e3546 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -11,7 +11,7 @@ 
 #include <asm/io.h>
 #include <errno.h>
 #include <malloc.h>
-#include <asm/pcie_layerscape.h>
+#include <pcie_layerscape.h>
 
 #ifndef CONFIG_SYS_PCI_MEMORY_BUS
 #define CONFIG_SYS_PCI_MEMORY_BUS CONFIG_SYS_SDRAM_BASE
diff --git a/include/pcie_layerscape.h b/include/pcie_layerscape.h
new file mode 100644
index 0000000..fb08578
--- /dev/null
+++ b/include/pcie_layerscape.h
@@ -0,0 +1,13 @@ 
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __PCIE_LAYERSCAPE_H_
+#define __PCIE_LAYERSCAPE_H_
+
+void pci_init_board(void);
+void ft_pcie_setup(void *blob, bd_t *bd);
+
+#endif