From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kim Phillips Date: Thu, 29 Oct 2009 13:07:48 -0500 Subject: [U-Boot] [PATCH v3 1/2] NET: Move MDIO regs out of TSEC Space In-Reply-To: <12568248442132-git-send-email-sandeep.kumar@freescale.com> References: <12568248442132-git-send-email-sandeep.kumar@freescale.com> Message-ID: <20091029130748.b53eae74.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 Thu, 29 Oct 2009 19:30:44 +0530 Sandeep Gopalpet wrote: > Moved the mdio regs out of the tsec structure,and > provided different offsets for tsec base and mdio > base so that provision for etsec2.0 can be provided. > > This patch helps in providing the support for etsec2.0 > In etsec2.0, the MDIO register space and the etsec reg > space are different. > > Also, moved the TSEC_BASE_ADDR and MDIO_BASE_ADDR definitons into > platform specific files. > > Signed-off-by: Sandeep Gopalpet > --- subject should say v4, but anyway, with the following CodingStyle fixes: Acked-by: Kim Phillips diff --git a/include/tsec.h b/include/tsec.h index fc2f075..e33ef61 100644 --- a/include/tsec.h +++ b/include/tsec.h @@ -27,7 +27,7 @@ .regs = (tsec_t *)(TSEC_BASE_ADDR + ((num - 1) * TSEC_SIZE)), \ .miiregs = (tsec_mdio_t *)(MDIO_BASE_ADDR), \ .miiregs_sgmii = (tsec_mdio_t *)(MDIO_BASE_ADDR \ - + (num - 1) * TSEC_MDIO_OFFSET), \ + + (num - 1) * TSEC_MDIO_OFFSET), \ .devname = CONFIG_TSEC##num##_NAME, \ .phyaddr = TSEC##num##_PHY_ADDR, \ .flags = TSEC##num##_FLAGS \ @@ -38,7 +38,7 @@ x.regs = (tsec_t *)(TSEC_BASE_ADDR + ((num - 1) * TSEC_SIZE)); \ x.miiregs = (tsec_mdio_t *)(MDIO_BASE_ADDR); \ x.miiregs_sgmii = (tsec_mdio_t *)(MDIO_BASE_ADDR \ - + (num - 1) * TSEC_MDIO_OFFSET); \ + + (num - 1) * TSEC_MDIO_OFFSET); \ x.devname = CONFIG_TSEC##num##_NAME; \ x.phyaddr = TSEC##num##_PHY_ADDR; \ x.flags = TSEC##num##_FLAGS;\