From patchwork Tue Jan 27 10:24:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: y@pengutronix.de X-Patchwork-Id: 20431 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 81540DE0D4 for ; Tue, 27 Jan 2009 21:28:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754529AbZA0K1m (ORCPT ); Tue, 27 Jan 2009 05:27:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754516AbZA0K1m (ORCPT ); Tue, 27 Jan 2009 05:27:42 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:57258 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754473AbZA0K1k (ORCPT ); Tue, 27 Jan 2009 05:27:40 -0500 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.63) (envelope-from ) id 1LRl72-0007Wy-J9; Tue, 27 Jan 2009 11:24:08 +0100 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1LRl72-0006yn-4P; Tue, 27 Jan 2009 11:24:08 +0100 From: y@pengutronix.de To: netdev@vger.kernel.org Cc: Greg Ungerer , Sascha Hauer Subject: [PATCH] fec: remove unused #else branches Date: Tue, 27 Jan 2009 11:24:00 +0100 Message-Id: <1233051848-5994-2-git-send-email-y> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1233051848-5994-1-git-send-email-y> References: <1233051848-5994-1-git-send-email-y> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sascha Hauer The #else branches throughout this driver belong to a PowerPC 8xx for which this driver is not used. Signed-off-by: Sascha Hauer --- drivers/net/fec.c | 92 ----------------------------------------------------- 1 files changed, 0 insertions(+), 92 deletions(-) diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 7e33c12..b754f60 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -72,8 +72,6 @@ static unsigned int fec_hw[] = { (MCF_MBAR+0x30000), #elif defined(CONFIG_M532x) (MCF_MBAR+0xfc030000), -#else - &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec), #endif }; @@ -1760,96 +1758,6 @@ static void __inline__ fec_uncache(unsigned long addr) { } -/* ------------------------------------------------------------------------- */ - - -#else - -/* - * Code specific to the MPC860T setup. - */ -static void __inline__ fec_request_intrs(struct net_device *dev) -{ - volatile immap_t *immap; - - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ - - if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0) - panic("Could not allocate FEC IRQ!"); -} - -static void __inline__ fec_get_mac(struct net_device *dev) -{ - bd_t *bd; - - bd = (bd_t *)__res; - memcpy(dev->dev_addr, bd->bi_enetaddr, ETH_ALEN); -} - -static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) -{ - extern uint _get_IMMR(void); - volatile immap_t *immap; - volatile fec_t *fecp; - - fecp = fep->hwp; - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ - - /* Configure all of port D for MII. - */ - immap->im_ioport.iop_pdpar = 0x1fff; - - /* Bits moved from Rev. D onward. - */ - if ((_get_IMMR() & 0xffff) < 0x0501) - immap->im_ioport.iop_pddir = 0x1c58; /* Pre rev. D */ - else - immap->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */ - - /* Set MII speed to 2.5 MHz - */ - fecp->fec_mii_speed = fep->phy_speed = - ((bd->bi_busfreq * 1000000) / 2500000) & 0x7e; -} - -static void __inline__ fec_enable_phy_intr(void) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - - /* Enable MII command finished interrupt - */ - fecp->fec_ivec = (FEC_INTERRUPT/2) << 29; -} - -static void __inline__ fec_disable_phy_intr(void) -{ -} - -static void __inline__ fec_phy_ack_intr(void) -{ -} - -static void __inline__ fec_localhw_setup(void) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - fecp->fec_r_hash = PKT_MAXBUF_SIZE; - /* Enable big endian and don't care about SDMA FC. - */ - fecp->fec_fun_code = 0x78000000; -} - -static void __inline__ fec_uncache(unsigned long addr) -{ - pte_t *pte; - pte = va_to_pte(mem_addr); - pte_val(*pte) |= _PAGE_NO_CACHE; - flush_tlb_page(init_mm.mmap, mem_addr); -} - #endif /* ------------------------------------------------------------------------- */