Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030517AbXBTWgT (ORCPT ); Tue, 20 Feb 2007 17:36:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030519AbXBTWgT (ORCPT ); Tue, 20 Feb 2007 17:36:19 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:43332 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030517AbXBTWgR (ORCPT ); Tue, 20 Feb 2007 17:36:17 -0500 Date: Tue, 20 Feb 2007 16:36:14 -0600 To: Jeff Garzik Cc: Benjamin Herrenschmidt , kou.ishizaki@toshiba.co.jp, arnd@arndb.de, Jens Osterkamp , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/12] spidernet: spidernet: add support for Celleb Message-ID: <20070220223614.GE28895@austin.ibm.com> References: <20070220221314.GU923@austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070220221314.GU923@austin.ibm.com> User-Agent: Mutt/1.5.11 From: linas@austin.ibm.com (Linas Vepstas) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3254 Lines: 83 From: Kou Ishizaki This patch adds or changes some HW specific settings for spider_net on Celleb. Signed-off-by: Kou Ishizaki Signed-off-by: Linas Vepstas ---- drivers/net/Kconfig | 2 +- drivers/net/spider_net.c | 8 +++++++- drivers/net/spider_net.h | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) Index: linux-2.6.20-git16/drivers/net/Kconfig =================================================================== --- linux-2.6.20-git16.orig/drivers/net/Kconfig 2007-02-20 14:23:59.000000000 -0600 +++ linux-2.6.20-git16/drivers/net/Kconfig 2007-02-20 15:02:38.000000000 -0600 @@ -2245,7 +2245,7 @@ config BNX2 config SPIDER_NET tristate "Spider Gigabit Ethernet driver" - depends on PCI && PPC_IBM_CELL_BLADE + depends on PCI && (PPC_IBM_CELL_BLADE || PPC_CELLEB) select FW_LOADER help This driver supports the Gigabit Ethernet chips present on the Index: linux-2.6.20-git16/drivers/net/spider_net.h =================================================================== --- linux-2.6.20-git16.orig/drivers/net/spider_net.h 2007-02-20 15:02:32.000000000 -0600 +++ linux-2.6.20-git16/drivers/net/spider_net.h 2007-02-20 15:02:38.000000000 -0600 @@ -1,7 +1,8 @@ /* - * Network device driver for Cell Processor-Based Blade + * Network device driver for Cell Processor-Based Blade and Celleb platform * * (C) Copyright IBM Corp. 2005 + * (C) Copyright 2006 TOSHIBA CORPORATION * * Authors : Utz Bacher * Jens Osterkamp @@ -184,7 +185,8 @@ extern char spider_net_driver_name[]; /* pause frames: automatic, no upper retransmission count */ /* outside loopback mode: ETOMOD signal dont matter, not connected */ -#define SPIDER_NET_OPMODE_VALUE 0x00000063 +/* ETOMOD signal is brought to PHY reset. bit 2 must be 1 in Celleb */ +#define SPIDER_NET_OPMODE_VALUE 0x00000067 /*#define SPIDER_NET_OPMODE_VALUE 0x001b0062*/ #define SPIDER_NET_LENLMT_VALUE 0x00000908 Index: linux-2.6.20-git16/drivers/net/spider_net.c =================================================================== --- linux-2.6.20-git16.orig/drivers/net/spider_net.c 2007-02-20 15:02:36.000000000 -0600 +++ linux-2.6.20-git16/drivers/net/spider_net.c 2007-02-20 15:02:38.000000000 -0600 @@ -1,7 +1,8 @@ /* - * Network device driver for Cell Processor-Based Blade + * Network device driver for Cell Processor-Based Blade and Celleb platform * * (C) Copyright IBM Corp. 2005 + * (C) Copyright 2006 TOSHIBA CORPORATION * * Authors : Utz Bacher * Jens Osterkamp @@ -1605,6 +1606,11 @@ spider_net_init_card(struct spider_net_c spider_net_write_reg(card, SPIDER_NET_CKRCTRL, SPIDER_NET_CKRCTRL_RUN_VALUE); + + /* trigger ETOMOD signal */ + spider_net_write_reg(card, SPIDER_NET_GMACOPEMD, + spider_net_read_reg(card, SPIDER_NET_GMACOPEMD) | 0x4); + } /** - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/