From: Kim Phillips Date: Tue, 27 Oct 2009 15:54:27 -0500 Subject: [U-Boot] [PATCH] NET: Move MDIO regs out of TSEC Space In-Reply-To: <12564077762274-git-send-email-sandeep.kumar@freescale.com> References: <12564077762274-git-send-email-sandeep.kumar@freescale.com> Message-ID: <20091027155427.25d30326.kim.phillips@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 24 Oct 2009 23:39:36 +0530 Sandeep Gopalpet wrote: > @@ -306,12 +307,11 @@ static int init_phy(struct eth_device *dev) > { > struct tsec_private *priv = (struct tsec_private *)dev->priv; > struct phy_info *curphy; > - volatile tsec_t *phyregs = priv->phyregs; > + volatile tsec_mdio_t *phyregs = priv->phyregs; > volatile tsec_t *regs = priv->regs; > > /* Assign a Physical address to the TBI */ > regs->tbipa = CONFIG_SYS_TBIPA_VALUE; > - phyregs->tbipa = CONFIG_SYS_TBIPA_VALUE; > asm("sync"); this generates a new warning: tsec.c: In function 'init_phy': tsec.c:307: warning: unused variable 'phyregs' > .regs = (tsec_t *)(TSEC_BASE_ADDR + ((num - 1) * TSEC_SIZE)), \ > - .miiregs = (tsec_t *)TSEC_BASE_ADDR, \ > + .miiregs = (tsec_mdio_t *)(MDIO_BASE_ADDR), \ > + .miiregs_sgmii = (tsec_mdio_t *)(MDIO_BASE_ADDR + (num -1)*MDIO_OFFSET ), \ and please use consistent codingstyle; here and.. > .devname = CONFIG_TSEC##num##_NAME, \ > .phyaddr = TSEC##num##_PHY_ADDR, \ > .flags = TSEC##num##_FLAGS \ > @@ -44,7 +33,8 @@ > #define SET_STD_TSEC_INFO(x, num) \ > { \ > x.regs = (tsec_t *)(TSEC_BASE_ADDR + ((num - 1) * TSEC_SIZE)); \ > - x.miiregs = (tsec_t *)TSEC_BASE_ADDR; \ > + x.miiregs = (tsec_mdio_t *)(MDIO_BASE_ADDR); \ > + x.miiregs_sgmii = (tsec_mdio_t *)(MDIO_BASE_ADDR + (num -1)*MDIO_OFFSET); \ ..here. Thanks, Kim