From nobody Thu May 2 18:31:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593807462; cv=none; d=zohomail.com; s=zohoarc; b=cPfGlYI59ala13UmQMtY9bPL4DeyE5BzJNNLUlmNahucNC0iYCL1CptzbMNqAhAQ9pxxEqttV1A90LrnhGLJO9UOZBVLL3nqrbBd9FBdV3bR7TVx1QxyV+0txuqfzdy3azYfxyYBT4qMlTV+JmaJtzw8a9vo9kz04O91EtKf1sA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593807462; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1Z+P31w8yhsucZfBc9bk6kW8BTgn9oiPXGwk5jdblkk=; b=NJRxRg3QzQwqc+6wtI8SKSz0zrN0z9S+KNcvJ7OBNFuMcHwpZXZxG3nPXSw/ws0Xx8l1Nk1j8s8/xJ/hTla2h6u0pRlqPUaH6Ema9okqBCkpV8tdSv8V71Nj40+hBAOlbMabS/dvCuAZt35QcCPS6RxfswC7TM/Dgc2hVLzPsQs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159380746291444.90699961387338; Fri, 3 Jul 2020 13:17:42 -0700 (PDT) Received: from localhost ([::1]:37784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrS7x-00072B-I2 for importer@patchew.org; Fri, 03 Jul 2020 16:17:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrS5y-0003lU-QF for qemu-devel@nongnu.org; Fri, 03 Jul 2020 16:15:38 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:37591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrS5v-00010O-DT for qemu-devel@nongnu.org; Fri, 03 Jul 2020 16:15:38 -0400 Received: from localhost.localdomain (lns-bzn-59-82-252-130-88.adsl.proxad.net [82.252.130.88]) (Authenticated sender: jcd@tribudubois.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 4FE791BF207; Fri, 3 Jul 2020 20:15:31 +0000 (UTC) X-Originating-IP: 82.252.130.88 From: Jean-Christophe Dubois To: qemu-devel@nongnu.org, peter.maydell@linaro.org, peter.chubb@nicta.com.au, f4bug@amsat.org Subject: [PATCH 1/3] Add the ability to change the FEC PHY MDIO device number on i.MX25 processor Date: Fri, 3 Jul 2020 22:15:15 +0200 Message-Id: <9f8923ecd974160ae8f634c275b1100c2cbe66d7.1593806826.git.jcd@tribudubois.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=217.70.183.201; envelope-from=jcd@tribudubois.net; helo=relay8-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/03 16:15:30 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jean-Christophe Dubois Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Jean-Christophe Dubois --- hw/arm/fsl-imx25.c | 7 +++++++ include/hw/arm/fsl-imx25.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 7ab5c98fbe1..35874aac00b 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -183,6 +183,7 @@ static void fsl_imx25_realize(DeviceState *dev, Error *= *errp) epit_table[i].irq)); } =20 + object_property_set_uint(OBJECT(&s->fec), s->phy_num, "phy-num", &err); qdev_set_nic_properties(DEVICE(&s->fec), &nd_table[0]); =20 sysbus_realize(SYS_BUS_DEVICE(&s->fec), &err); @@ -339,10 +340,16 @@ static void fsl_imx25_realize(DeviceState *dev, Error= **errp) &s->iram_alias); } =20 +static Property fsl_imx25_properties[] =3D { + DEFINE_PROP_UINT32("fec-phy-num", FslIMX25State, phy_num, 0), + DEFINE_PROP_END_OF_LIST(), +}; + static void fsl_imx25_class_init(ObjectClass *oc, void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); =20 + device_class_set_props(dc, fsl_imx25_properties); dc->realize =3D fsl_imx25_realize; dc->desc =3D "i.MX25 SOC"; /* diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h index 9e228daceae..54ee1bfd780 100644 --- a/include/hw/arm/fsl-imx25.h +++ b/include/hw/arm/fsl-imx25.h @@ -65,6 +65,7 @@ typedef struct FslIMX25State { MemoryRegion rom[2]; MemoryRegion iram; MemoryRegion iram_alias; + uint32_t phy_num; } FslIMX25State; =20 /** --=20 2.25.1 From nobody Thu May 2 18:31:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593807400; cv=none; d=zohomail.com; s=zohoarc; b=E5NnyMKaboAkz5RrsP0Pc/Ibk6ytRFGBSomP/bC5jtJI2yaDONRaeDJ5a0Ppfz3p+i3Qab5Y4rgD/WB7fZ5EY23d7OQeXUPJBUAQJ4SWx2lcOsGCVYf4Bq2V3E8EOA5EC0Q39NbtSoIQMKWSlE+gxUmJ+1vfsiFJ7jRN6CawS/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593807400; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ajN2vwZbPxstXhO0IcZtvjR5WLymLME25TY/VxVOdZY=; b=YlVAItTv1JiVWlkrGiglUxw+YxTmlp9kq8uza0zm7ZfY5qtw0dF7tesbb6k/7a9OdkmkG7DD/LijUsjpoXIYMt55sY+NlOwkA+autmcwn+WWnyZd5Mg+1p/2LUTYW2ibZi1jd7hbvzC8e4VYpO0+7oFS2zs8CV43Y4nEBWVUOQY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593807400623448.5094304977383; Fri, 3 Jul 2020 13:16:40 -0700 (PDT) Received: from localhost ([::1]:33524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrS6x-000541-50 for importer@patchew.org; Fri, 03 Jul 2020 16:16:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrS5z-0003lv-Vq for qemu-devel@nongnu.org; Fri, 03 Jul 2020 16:15:39 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrS5v-00010X-N9 for qemu-devel@nongnu.org; Fri, 03 Jul 2020 16:15:39 -0400 Received: from localhost.localdomain (lns-bzn-59-82-252-130-88.adsl.proxad.net [82.252.130.88]) (Authenticated sender: jcd@tribudubois.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D0A6A1BF206; Fri, 3 Jul 2020 20:15:32 +0000 (UTC) X-Originating-IP: 82.252.130.88 From: Jean-Christophe Dubois To: qemu-devel@nongnu.org, peter.maydell@linaro.org, peter.chubb@nicta.com.au, f4bug@amsat.org Subject: [PATCH 2/3] Add the ability to change the FEC PHY MDIO device number on i.MX6 processor Date: Fri, 3 Jul 2020 22:15:16 +0200 Message-Id: <05a64e83eb1c0c865ac077b22c599425c024c02c.1593806826.git.jcd@tribudubois.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=217.70.183.201; envelope-from=jcd@tribudubois.net; helo=relay8-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/03 16:15:30 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jean-Christophe Dubois Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Jean-Christophe Dubois --- hw/arm/fsl-imx6.c | 7 +++++++ include/hw/arm/fsl-imx6.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 4ae3c3efc28..0721f333497 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -402,6 +402,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **= errp) spi_table[i].irq)); } =20 + object_property_set_uint(OBJECT(&s->eth), s->phy_num, "phy-num", &err); qdev_set_nic_properties(DEVICE(&s->eth), &nd_table[0]); sysbus_realize(SYS_BUS_DEVICE(&s->eth), &err); if (err) { @@ -476,10 +477,16 @@ static void fsl_imx6_realize(DeviceState *dev, Error = **errp) &s->ocram_alias); } =20 +static Property fsl_imx6_properties[] =3D { + DEFINE_PROP_UINT32("fec-phy-num", FslIMX6State, phy_num, 0), + DEFINE_PROP_END_OF_LIST(), +}; + static void fsl_imx6_class_init(ObjectClass *oc, void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); =20 + device_class_set_props(dc, fsl_imx6_properties); dc->realize =3D fsl_imx6_realize; dc->desc =3D "i.MX6 SOC"; /* Reason: Uses serial_hd() in the realize() function */ diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h index 1ebd7513246..162fe99375d 100644 --- a/include/hw/arm/fsl-imx6.h +++ b/include/hw/arm/fsl-imx6.h @@ -73,6 +73,7 @@ typedef struct FslIMX6State { MemoryRegion caam; MemoryRegion ocram; MemoryRegion ocram_alias; + uint32_t phy_num; } FslIMX6State; =20 =20 --=20 2.25.1 From nobody Thu May 2 18:31:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593807400; cv=none; d=zohomail.com; s=zohoarc; b=bn/msRvXwnW1IF/F+gpf47/SYSQn7v5Lr05q31/NPoDdMfFnxq+B+58wjv+kMVtbKOoOIZ0DUqg67SJxTJeh9pIO8dFR4pKt+cKbIU8po98y4RD6rjQRY6rvlww6so2zClix8/PZTExBgiSO2PWSQL87jGfyXgq4FJH6tDbAz4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593807400; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yN/7m9SFwYYfWaa++2QyCt4nyiy+TCI701/RhAMA18w=; b=WxMz6RZL18eFJ1PLVVM3qh3Ww8+6j19jKwjvB77WbKY/fMkQyFqn6a0wtGrokP/adMfrZBUUhHBfZhm9gpTwDaO2Rwtu/TGH4OVnpED+IXJ78VGe3JPLb7l+OTs/XBX+Kl1NtMyY0WsC/cIY5LDAtHBvI9uKt4ANYMmQDW2dHnM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593807400378537.8741256619694; Fri, 3 Jul 2020 13:16:40 -0700 (PDT) Received: from localhost ([::1]:33476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrS6x-00052g-05 for importer@patchew.org; Fri, 03 Jul 2020 16:16:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrS5z-0003lX-0L for qemu-devel@nongnu.org; Fri, 03 Jul 2020 16:15:39 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:34415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrS5x-00010e-9O for qemu-devel@nongnu.org; Fri, 03 Jul 2020 16:15:38 -0400 Received: from localhost.localdomain (lns-bzn-59-82-252-130-88.adsl.proxad.net [82.252.130.88]) (Authenticated sender: jcd@tribudubois.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id C3B901BF20B; Fri, 3 Jul 2020 20:15:34 +0000 (UTC) X-Originating-IP: 82.252.130.88 From: Jean-Christophe Dubois To: qemu-devel@nongnu.org, peter.maydell@linaro.org, peter.chubb@nicta.com.au, f4bug@amsat.org Subject: [PATCH 3/3] Add the ability to change the FEC PHY MDIO devices numbers on i.MX7 processor Date: Fri, 3 Jul 2020 22:15:17 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=217.70.183.201; envelope-from=jcd@tribudubois.net; helo=relay8-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/03 16:15:30 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jean-Christophe Dubois Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Jean-Christophe Dubois --- hw/arm/fsl-imx7.c | 9 +++++++++ include/hw/arm/fsl-imx7.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index b49d895a412..5dbf0e500aa 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -364,6 +364,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **= errp) FSL_IMX7_ENET2_ADDR, }; =20 + object_property_set_uint(OBJECT(&s->eth[i]), s->phy_num[i], + "phy-num", &error_abort); object_property_set_uint(OBJECT(&s->eth[i]), FSL_IMX7_ETH_NUM_TX_R= INGS, "tx-ring-num", &error_abort); qdev_set_nic_properties(DEVICE(&s->eth[i]), &nd_table[i]); @@ -551,10 +553,17 @@ static void fsl_imx7_realize(DeviceState *dev, Error = **errp) FSL_IMX7_PCIE_PHY_SIZE); } =20 +static Property fsl_imx7_properties[] =3D { + DEFINE_PROP_UINT32("fec1-phy-num", FslIMX7State, phy_num[0], 0), + DEFINE_PROP_UINT32("fec2-phy-num", FslIMX7State, phy_num[1], 1), + DEFINE_PROP_END_OF_LIST(), +}; + static void fsl_imx7_class_init(ObjectClass *oc, void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); =20 + device_class_set_props(dc, fsl_imx7_properties); dc->realize =3D fsl_imx7_realize; =20 /* Reason: Uses serial_hds and nd_table in realize() directly */ diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h index da977f9ffb4..ad889237077 100644 --- a/include/hw/arm/fsl-imx7.h +++ b/include/hw/arm/fsl-imx7.h @@ -81,6 +81,7 @@ typedef struct FslIMX7State { IMX7GPRState gpr; ChipideaState usb[FSL_IMX7_NUM_USBS]; DesignwarePCIEHost pcie; + uint32_t phy_num[FSL_IMX7_NUM_ETHS]; } FslIMX7State; =20 enum FslIMX7MemoryMap { --=20 2.25.1