From patchwork Tue Dec 4 20:12:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10712579 X-Patchwork-Delegate: paulburton@kernel.org 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 398DE13AF for ; Tue, 4 Dec 2018 20:20:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D4312C6C1 for ; Tue, 4 Dec 2018 20:20:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 218512C6C7; Tue, 4 Dec 2018 20:20:35 +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 44E082C69A for ; Tue, 4 Dec 2018 20:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726031AbeLDUUY (ORCPT ); Tue, 4 Dec 2018 15:20:24 -0500 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]:41646 "EHLO emh07.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbeLDUUY (ORCPT ); Tue, 4 Dec 2018 15:20:24 -0500 X-Greylist: delayed 454 seconds by postgrey-1.27 at vger.kernel.org; Tue, 04 Dec 2018 15:20:23 EST Received: from localhost.localdomain (85-76-96-200-nat.elisa-mobile.fi [85.76.96.200]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id 6438BB0028; Tue, 4 Dec 2018 22:12:48 +0200 (EET) From: Aaro Koskinen To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH 1/6] MIPS: OCTEON: enable all OCTEON drivers in defconfig Date: Tue, 4 Dec 2018 22:12:15 +0200 Message-Id: <20181204201220.12667-2-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20181204201220.12667-1-aaro.koskinen@iki.fi> References: <20181204201220.12667-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 Enable all OCTEON drivers in defconfig. Currently oct_ilm and octeon-rng are still missing; enable those to get them included in kernel builds. Signed-off-by: Aaro Koskinen --- arch/mips/configs/cavium_octeon_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/configs/cavium_octeon_defconfig b/arch/mips/configs/cavium_octeon_defconfig index c3f6c3488559..b0e8e8f6284b 100644 --- a/arch/mips/configs/cavium_octeon_defconfig +++ b/arch/mips/configs/cavium_octeon_defconfig @@ -13,6 +13,7 @@ CONFIG_SLAB=y CONFIG_CAVIUM_OCTEON_SOC=y CONFIG_CAVIUM_CN63XXP1=y CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2 +CONFIG_OCTEON_ILM=m CONFIG_SMP=y CONFIG_NR_CPUS=32 CONFIG_HZ_100=y @@ -106,7 +107,6 @@ CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 CONFIG_SERIAL_8250_DW=y -# CONFIG_HW_RANDOM is not set CONFIG_I2C=y CONFIG_I2C_OCTEON=y CONFIG_SPI=y From patchwork Tue Dec 4 20:12:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10712583 X-Patchwork-Delegate: paulburton@kernel.org 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 C60F11923 for ; Tue, 4 Dec 2018 20:20:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA4102C679 for ; Tue, 4 Dec 2018 20:20:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADBE62C506; Tue, 4 Dec 2018 20:20:35 +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 D9A862C6BE for ; Tue, 4 Dec 2018 20:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbeLDUU0 (ORCPT ); Tue, 4 Dec 2018 15:20:26 -0500 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]:41670 "EHLO emh07.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726273AbeLDUU0 (ORCPT ); Tue, 4 Dec 2018 15:20:26 -0500 Received: from localhost.localdomain (85-76-96-200-nat.elisa-mobile.fi [85.76.96.200]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id B747FB0038; Tue, 4 Dec 2018 22:12:48 +0200 (EET) From: Aaro Koskinen To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH 2/6] MIPS: OCTEON: octeon-usb: use common gpio_bit definition Date: Tue, 4 Dec 2018 22:12:16 +0200 Message-Id: <20181204201220.12667-3-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20181204201220.12667-1-aaro.koskinen@iki.fi> References: <20181204201220.12667-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 cvmx_gpio_bit_cfgx bitfields are indentical on cn70xx and cn73xx, and also match the default definition. So use that instead. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/octeon-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c index bfdfaf32d2c4..1f730ded5224 100644 --- a/arch/mips/cavium-octeon/octeon-usb.c +++ b/arch/mips/cavium-octeon/octeon-usb.c @@ -253,17 +253,17 @@ static int dwc3_octeon_config_power(struct device *dev, u64 base) && gpio <= 31) { gpio_bit.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(gpio)); gpio_bit.s.tx_oe = 1; - gpio_bit.cn73xx.output_sel = (index == 0 ? 0x14 : 0x15); + gpio_bit.s.output_sel = (index == 0 ? 0x14 : 0x15); cvmx_write_csr(CVMX_GPIO_BIT_CFGX(gpio), gpio_bit.u64); } else if (gpio <= 15) { gpio_bit.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(gpio)); gpio_bit.s.tx_oe = 1; - gpio_bit.cn70xx.output_sel = (index == 0 ? 0x14 : 0x19); + gpio_bit.s.output_sel = (index == 0 ? 0x14 : 0x19); cvmx_write_csr(CVMX_GPIO_BIT_CFGX(gpio), gpio_bit.u64); } else { gpio_bit.u64 = cvmx_read_csr(CVMX_GPIO_XBIT_CFGX(gpio)); gpio_bit.s.tx_oe = 1; - gpio_bit.cn70xx.output_sel = (index == 0 ? 0x14 : 0x19); + gpio_bit.s.output_sel = (index == 0 ? 0x14 : 0x19); cvmx_write_csr(CVMX_GPIO_XBIT_CFGX(gpio), gpio_bit.u64); } From patchwork Tue Dec 4 20:12:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10712589 X-Patchwork-Delegate: paulburton@kernel.org 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 65C4D13AF for ; Tue, 4 Dec 2018 20:20:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58A672C049 for ; Tue, 4 Dec 2018 20:20:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D3D92C0BC; Tue, 4 Dec 2018 20:20:37 +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 066412C6C0 for ; Tue, 4 Dec 2018 20:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726273AbeLDUU0 (ORCPT ); Tue, 4 Dec 2018 15:20:26 -0500 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]:41672 "EHLO emh07.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbeLDUU0 (ORCPT ); Tue, 4 Dec 2018 15:20:26 -0500 Received: from localhost.localdomain (85-76-96-200-nat.elisa-mobile.fi [85.76.96.200]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id 313F6B001C; Tue, 4 Dec 2018 22:12:49 +0200 (EET) From: Aaro Koskinen To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH 3/6] MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition Date: Tue, 4 Dec 2018 22:12:17 +0200 Message-Id: <20181204201220.12667-4-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20181204201220.12667-1-aaro.koskinen@iki.fi> References: <20181204201220.12667-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 cn58xx is compatible with cn52xx, so use the latter. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c | 2 +- arch/mips/include/asm/octeon/cvmx-pko.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c index 8241fc6aa17d..3839feba68f2 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c +++ b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c @@ -266,7 +266,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id) } else { union cvmx_pko_mem_debug8 debug8; debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8); - return debug8.cn58xx.doorbell; + return debug8.cn50xx.doorbell; } case CVMX_CMD_QUEUE_ZIP: case CVMX_CMD_QUEUE_DFA: diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h index 5f47f76ed510..20eb9c46a75a 100644 --- a/arch/mips/include/asm/octeon/cvmx-pko.h +++ b/arch/mips/include/asm/octeon/cvmx-pko.h @@ -611,7 +611,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear, pko_reg_read_idx.s.index = cvmx_pko_get_base_queue(port_num); cvmx_write_csr(CVMX_PKO_REG_READ_IDX, pko_reg_read_idx.u64); debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8); - status->doorbell = debug8.cn58xx.doorbell; + status->doorbell = debug8.cn50xx.doorbell; } } From patchwork Tue Dec 4 20:12:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10712587 X-Patchwork-Delegate: paulburton@kernel.org 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 89FC713AF for ; Tue, 4 Dec 2018 20:20:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D7F32C0BC for ; Tue, 4 Dec 2018 20:20:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71EFF2C48D; Tue, 4 Dec 2018 20:20:36 +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 651752C69E for ; Tue, 4 Dec 2018 20:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725797AbeLDUUZ (ORCPT ); Tue, 4 Dec 2018 15:20:25 -0500 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]:41648 "EHLO emh07.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbeLDUUY (ORCPT ); Tue, 4 Dec 2018 15:20:24 -0500 Received: from localhost.localdomain (85-76-96-200-nat.elisa-mobile.fi [85.76.96.200]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id 92B0CB0045; Tue, 4 Dec 2018 22:12:49 +0200 (EET) From: Aaro Koskinen To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH 4/6] MIPS: OCTEON: cvmx_mio_fus_dat3: use oldest forward compatible definition Date: Tue, 4 Dec 2018 22:12:18 +0200 Message-Id: <20181204201220.12667-5-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20181204201220.12667-1-aaro.koskinen@iki.fi> References: <20181204201220.12667-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 Chips up to cn5xxx are compatible with cn38xx. All cn6xxx chips, and also cnf71xx, are compatible with cn61xx. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/octeon-model.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/octeon-model.c b/arch/mips/cavium-octeon/executive/octeon-model.c index 341052387b49..657dbad9644e 100644 --- a/arch/mips/cavium-octeon/executive/octeon-model.c +++ b/arch/mips/cavium-octeon/executive/octeon-model.c @@ -305,7 +305,7 @@ static const char *__init octeon_model_get_string_buffer(uint32_t chip_id, if (fus_dat3.s.nozip) suffix = "SCP"; - if (fus_dat3.cn56xx.bar2_en) + if (fus_dat3.cn38xx.bar2_en) suffix = "NSPB2"; } if (l2d_fus3) @@ -344,7 +344,7 @@ static const char *__init octeon_model_get_string_buffer(uint32_t chip_id, suffix = "CP"; else if (fus_dat2.cn63xx.dorm_crypto) suffix = "DAP"; - else if (fus_dat3.cn63xx.nozip) + else if (fus_dat3.cn61xx.nozip) suffix = "SCP"; else suffix = "AAP"; @@ -359,18 +359,18 @@ static const char *__init octeon_model_get_string_buffer(uint32_t chip_id, suffix = "CP"; else if (fus_dat2.cn66xx.dorm_crypto) suffix = "DAP"; - else if (fus_dat3.cn66xx.nozip) + else if (fus_dat3.cn61xx.nozip) suffix = "SCP"; else suffix = "AAP"; break; case 0x91: /* CN68XX */ family = "68"; - if (fus_dat2.cn68xx.nocrypto && fus_dat3.cn68xx.nozip) + if (fus_dat2.cn68xx.nocrypto && fus_dat3.cn61xx.nozip) suffix = "CP"; else if (fus_dat2.cn68xx.dorm_crypto) suffix = "DAP"; - else if (fus_dat3.cn68xx.nozip) + else if (fus_dat3.cn61xx.nozip) suffix = "SCP"; else if (fus_dat2.cn68xx.nocrypto) suffix = "SP"; @@ -379,7 +379,7 @@ static const char *__init octeon_model_get_string_buffer(uint32_t chip_id, break; case 0x94: /* CNF71XX */ family = "F71"; - if (fus_dat3.cnf71xx.nozip) + if (fus_dat3.cn61xx.nozip) suffix = "SCP"; else suffix = "AAP";