From patchwork Mon Feb 4 22:41:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10796709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43FDC1805 for ; Mon, 4 Feb 2019 22:42:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3484D2C058 for ; Mon, 4 Feb 2019 22:42:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26F9A2C079; Mon, 4 Feb 2019 22:42:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F2722C0C3 for ; Mon, 4 Feb 2019 22:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727238AbfBDWl6 (ORCPT ); Mon, 4 Feb 2019 17:41:58 -0500 Received: from emh06.mail.saunalahti.fi ([62.142.5.116]:60586 "EHLO emh06.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727078AbfBDWl5 (ORCPT ); Mon, 4 Feb 2019 17:41:57 -0500 Received: from localhost.localdomain (85-76-69-76-nat.elisa-mobile.fi [85.76.69.76]) by emh06.mail.saunalahti.fi (Postfix) with ESMTP id 8517D300B7; Tue, 5 Feb 2019 00:41:55 +0200 (EET) From: Aaro Koskinen To: linux-mips@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH 4/5] MIPS: OCTEON: delete board-specific link status Date: Tue, 5 Feb 2019 00:41:48 +0200 Message-Id: <20190204224149.8139-5-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190204224149.8139-1-aaro.koskinen@iki.fi> References: <20190204224149.8139-1-aaro.koskinen@iki.fi> Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Delete board-specific link status. This info should now come from the DT only. Signed-off-by: Aaro Koskinen --- .../executive/cvmx-helper-board.c | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c index 46ea54ea73ea..634eae578ffe 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c @@ -217,53 +217,12 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) /* Unless we fix it later, all links are defaulted to down */ result.u64 = 0; - /* - * This switch statement should handle all ports that either don't use - * Marvell PHYS, or don't support in-band status. - */ - switch (cvmx_sysinfo_get()->board_type) { - case CVMX_BOARD_TYPE_SIM: + if (octeon_is_simulation()) { /* The simulator gives you a simulated 1Gbps full duplex link */ result.s.link_up = 1; result.s.full_duplex = 1; result.s.speed = 1000; return result; - case CVMX_BOARD_TYPE_EBH3100: - case CVMX_BOARD_TYPE_CN3010_EVB_HS5: - case CVMX_BOARD_TYPE_CN3005_EVB_HS5: - case CVMX_BOARD_TYPE_CN3020_EVB_HS5: - /* Port 1 on these boards is always Gigabit */ - if (ipd_port == 1) { - result.s.link_up = 1; - result.s.full_duplex = 1; - result.s.speed = 1000; - return result; - } - /* Fall through to the generic code below */ - break; - case CVMX_BOARD_TYPE_CUST_NB5: - /* Port 1 on these boards is always Gigabit */ - if (ipd_port == 1) { - result.s.link_up = 1; - result.s.full_duplex = 1; - result.s.speed = 1000; - return result; - } - break; - case CVMX_BOARD_TYPE_BBGW_REF: - /* Port 1 on these boards is always Gigabit */ - if (ipd_port == 2) { - /* Port 2 is not hooked up */ - result.u64 = 0; - return result; - } else { - /* Ports 0 and 1 connect to the switch */ - result.s.link_up = 1; - result.s.full_duplex = 1; - result.s.speed = 1000; - return result; - } - break; } if (OCTEON_IS_MODEL(OCTEON_CN3XXX)