From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Thu, 3 Dec 2015 15:47:58 +0100 Subject: [U-Boot] [PATCH v3 10/14] net: gem: Remove zynq_gem_of_init() In-Reply-To: <3846048879467c3510abb54b930cdc05772d469e.1449154075.git.michal.simek@xilinx.com> References: <3846048879467c3510abb54b930cdc05772d469e.1449154075.git.michal.simek@xilinx.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This function was used for OF init before DM. Remove this function as the part of move to DM. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/net/zynq_gem.c | 42 ------------------------------------------ include/netdev.h | 1 - 2 files changed, 43 deletions(-) diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 9ce1221e8d0f..a569c77aeb60 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include @@ -656,43 +654,3 @@ int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr, return 1; } - -#if CONFIG_IS_ENABLED(OF_CONTROL) -int zynq_gem_of_init(const void *blob) -{ - int offset = 0; - u32 ret = 0; - u32 reg, phy_reg; - - debug("ZYNQ GEM: Initialization\n"); - - do { - offset = fdt_node_offset_by_compatible(blob, offset, - "xlnx,ps7-ethernet-1.00.a"); - if (offset != -1) { - reg = fdtdec_get_addr(blob, offset, "reg"); - if (reg != FDT_ADDR_T_NONE) { - offset = fdtdec_lookup_phandle(blob, offset, - "phy-handle"); - if (offset != -1) - phy_reg = fdtdec_get_addr(blob, offset, - "reg"); - else - phy_reg = 0; - - debug("ZYNQ GEM: addr %x, phyaddr %x\n", - reg, phy_reg); - - ret |= zynq_gem_initialize(NULL, reg, - phy_reg, 0); - - } else { - debug("ZYNQ GEM: Can't get base address\n"); - return -1; - } - } - } while (offset != -1); - - return ret; -} -#endif diff --git a/include/netdev.h b/include/netdev.h index 28eab4640760..5c6ae5b5624e 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -87,7 +87,6 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr, int txpp, int rxpp); int xilinx_ll_temac_eth_init(bd_t *bis, unsigned long base_addr, int flags, unsigned long ctrl_addr); -int zynq_gem_of_init(const void *blob); int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr, int phy_addr, u32 emio); /* -- 1.9.1