All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Wang <b18965@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 03/17] net: Merge asm/fsl_enet.h into fsl_mdio.h
Date: Fri, 5 Sep 2014 13:52:36 +0800	[thread overview]
Message-ID: <1409896370-22207-4-git-send-email-b18965@freescale.com> (raw)
In-Reply-To: <1409896370-22207-1-git-send-email-b18965@freescale.com>

From: Claudiu Manoil <claudiu.manoil@freescale.com>

fsl_enet.h defines the mapping of the usual MII management
registers, which are included in the MDIO register block
common to Freescale ethernet controllers. So it shouldn't
depend on the CPU architecture but it should be actually
part of the arch independent fsl_mdio.h.

To remove the arch dependency, merge the content of
asm/fsl_enet.h into fsl_mdio.h.
Some files (like fm_eth.h) were simply including fsl_enet.h
only for phy.h. These were updated to include phy.h instead.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
Change log:
 v6: Fix checkpatch error.
 v5: No change.
 v4: No change.
 v3: No change.
 v2: No change.

 arch/powerpc/include/asm/fsl_enet.h       | 24 ------------------------
 board/freescale/mpc8360emds/mpc8360emds.c |  2 +-
 board/freescale/mpc837xemds/mpc837xemds.c |  1 -
 drivers/net/fm/dtsec.c                    |  1 -
 drivers/net/fm/fm.h                       |  2 +-
 drivers/net/fm/init.c                     |  1 +
 drivers/net/fm/memac.c                    |  1 -
 drivers/net/fm/tgec.c                     |  1 -
 drivers/net/fsl_mdio.c                    |  1 -
 drivers/qe/uec.h                          |  1 -
 include/fm_eth.h                          |  2 +-
 include/fsl_mdio.h                        | 13 ++++++++++++-
 include/tsec.h                            |  2 +-
 13 files changed, 17 insertions(+), 35 deletions(-)
 delete mode 100644 arch/powerpc/include/asm/fsl_enet.h

diff --git a/arch/powerpc/include/asm/fsl_enet.h b/arch/powerpc/include/asm/fsl_enet.h
deleted file mode 100644
index 96146b6..0000000
--- a/arch/powerpc/include/asm/fsl_enet.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2010 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#ifndef __ASM_PPC_FSL_ENET_H
-#define __ASM_PPC_FSL_ENET_H
-
-#include <phy.h>
-
-struct tsec_mii_mng {
-	u32 miimcfg;		/* MII management configuration reg */
-	u32 miimcom;		/* MII management command reg */
-	u32 miimadd;		/* MII management address reg */
-	u32 miimcon;		/* MII management control reg */
-	u32 miimstat;		/* MII management status reg  */
-	u32 miimind;		/* MII management indication reg */
-	u32 ifstat;		/* Interface Status Register */
-} __attribute__ ((packed));
-
-int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc);
-
-#endif /* __ASM_PPC_FSL_ENET_H */
diff --git a/board/freescale/mpc8360emds/mpc8360emds.c b/board/freescale/mpc8360emds/mpc8360emds.c
index ac96163..5ff9dff 100644
--- a/board/freescale/mpc8360emds/mpc8360emds.c
+++ b/board/freescale/mpc8360emds/mpc8360emds.c
@@ -11,13 +11,13 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <phy.h>
+#include <fsl_mdio.h>
 #if defined(CONFIG_PCI)
 #include <pci.h>
 #endif
 #include <spd_sdram.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/mmu.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index 0a3c972..c749e55 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -10,7 +10,6 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
-#include <asm/fsl_enet.h>
 #include <spd_sdram.h>
 #include <tsec.h>
 #include <libfdt.h>
diff --git a/drivers/net/fm/dtsec.c b/drivers/net/fm/dtsec.c
index 78bbd43..8d3dc0e 100644
--- a/drivers/net/fm/dtsec.c
+++ b/drivers/net/fm/dtsec.c
@@ -7,7 +7,6 @@
 #include <common.h>
 #include <asm/types.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_dtsec.h>
 #include <fsl_mdio.h>
 #include <phy.h>
diff --git a/drivers/net/fm/fm.h b/drivers/net/fm/fm.h
index 316e06e..a9691c6 100644
--- a/drivers/net/fm/fm.h
+++ b/drivers/net/fm/fm.h
@@ -8,8 +8,8 @@
 #define __FM_H__
 
 #include <common.h>
+#include <phy.h>
 #include <fm_eth.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_fman.h>
 
 /* Port ID */
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index ff04695..6cf21c6 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
+#include <fsl_mdio.h>
 
 #include "fm.h"
 
diff --git a/drivers/net/fm/memac.c b/drivers/net/fm/memac.c
index 592a67f..9499290 100644
--- a/drivers/net/fm/memac.c
+++ b/drivers/net/fm/memac.c
@@ -12,7 +12,6 @@
 #include <phy.h>
 #include <asm/types.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_memac.h>
 
 #include "fm.h"
diff --git a/drivers/net/fm/tgec.c b/drivers/net/fm/tgec.c
index f450f80..5017123 100644
--- a/drivers/net/fm/tgec.c
+++ b/drivers/net/fm/tgec.c
@@ -12,7 +12,6 @@
 #include <phy.h>
 #include <asm/types.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_tgec.h>
 
 #include "fm.h"
diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c
index 1d88e65..8d09f5d 100644
--- a/drivers/net/fsl_mdio.c
+++ b/drivers/net/fsl_mdio.c
@@ -11,7 +11,6 @@
 #include <fsl_mdio.h>
 #include <asm/io.h>
 #include <asm/errno.h>
-#include <asm/fsl_enet.h>
 
 void tsec_local_mdio_write(struct tsec_mii_mng __iomem *phyregs, int port_addr,
 		int dev_addr, int regnum, int value)
diff --git a/drivers/qe/uec.h b/drivers/qe/uec.h
index 48a1634..6b559f7 100644
--- a/drivers/qe/uec.h
+++ b/drivers/qe/uec.h
@@ -13,7 +13,6 @@
 #include "qe.h"
 #include "uccf.h"
 #include <phy.h>
-#include <asm/fsl_enet.h>
 
 #define MAX_TX_THREADS				8
 #define MAX_RX_THREADS				8
diff --git a/include/fm_eth.h b/include/fm_eth.h
index 98edfcf..e46a684 100644
--- a/include/fm_eth.h
+++ b/include/fm_eth.h
@@ -8,8 +8,8 @@
 #define __FM_ETH_H__
 
 #include <common.h>
+#include <phy.h>
 #include <asm/types.h>
-#include <asm/fsl_enet.h>
 
 enum fm_port {
 	FM1_DTSEC1,
diff --git a/include/fsl_mdio.h b/include/fsl_mdio.h
index b58713d..2137282 100644
--- a/include/fsl_mdio.h
+++ b/include/fsl_mdio.h
@@ -10,7 +10,18 @@
 
 #include <net.h>
 #include <miiphy.h>
-#include <asm/fsl_enet.h>
+
+struct tsec_mii_mng {
+	u32 miimcfg;		/* MII management configuration reg */
+	u32 miimcom;		/* MII management command reg */
+	u32 miimadd;		/* MII management address reg */
+	u32 miimcon;		/* MII management control reg */
+	u32 miimstat;		/* MII management status reg  */
+	u32 miimind;		/* MII management indication reg */
+	u32 ifstat;		/* Interface Status Register */
+};
+
+int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc);
 
 /* PHY register offsets */
 #define PHY_EXT_PAGE_ACCESS	0x1f
diff --git a/include/tsec.h b/include/tsec.h
index 1046426..2054715 100644
--- a/include/tsec.h
+++ b/include/tsec.h
@@ -20,7 +20,7 @@
 #include <net.h>
 #include <config.h>
 #include <phy.h>
-#include <asm/fsl_enet.h>
+#include <fsl_mdio.h>
 
 #define TSEC_SIZE 		0x01000
 #define TSEC_MDIO_OFFSET	0x01000
-- 
2.1.0.27.g96db324

  parent reply	other threads:[~2014-09-05  5:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05  5:52 [U-Boot] [PATCH v6 0/17] arm: ls102xa: Add Freescale LS102xA SoC and LS1021AQDS/TWR board support Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 01/17] arm: ls102xa: Add Freescale LS102xA SoC support Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 02/17] ls102xa: i2c: Add i2c support for LS102xA Alison Wang
2014-09-05  5:52 ` Alison Wang [this message]
2014-09-05  5:52 ` [U-Boot] [PATCH v6 04/17] net: mdio: Use mb() to be compatible for both ARM and PowerPC Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 05/17] ls102xa: etsec: Add etsec support for LS102xA Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 06/17] esdhc: Add CONFIG_SYS_FSL_ESDHC_LE and CONFIG_SYS_FSL_ESDHC_BE macros Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 07/17] ls102xa: esdhc: Add esdhc support for LS102xA Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 08/17] driver/ddr/freescale: Add support of accumulate ECC Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 09/17] driver/ddr/freescale: Fix DDR3 driver for ARM Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 10/17] driver/ddr/fsl: Add support of overriding chip select write leveling Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 11/17] arm: ls102xa: Add basic support for LS1021AQDS board Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 12/17] arm: ls102xa: Add basic support for LS1021ATWR board Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 13/17] net: tsec: Remove tx snooping support from LS1 Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 14/17] serial: lpuart: add 32-bit registers lpuart support Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 15/17] video: dcu: Add DCU driver support Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 16/17] video: dcu: Add Sii9022A HDMI Transmitter support Alison Wang
2014-09-05  5:52 ` [U-Boot] [PATCH v6 17/17] ls102xa: dcu: Add platform support for DCU on LS1021ATWR board Alison Wang
  -- strict thread matches above, loose matches on Subject: below --
2014-09-05  5:43 [U-Boot] [PATCH v6 0/17] arm: ls102xa: Add Freescale LS102xA SoC and LS1021AQDS/TWR board support Alison Wang
2014-09-05  5:43 ` [U-Boot] [PATCH v6 03/17] net: Merge asm/fsl_enet.h into fsl_mdio.h Alison Wang

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=1409896370-22207-4-git-send-email-b18965@freescale.com \
    --to=b18965@freescale.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.