From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B67FBA00C3; Fri, 17 Jun 2022 19:05:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C96442B8B; Fri, 17 Jun 2022 19:05:09 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id BDF08427F3; Fri, 17 Jun 2022 19:05:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655485504; x=1687021504; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=F+orOjBx7UMkFOYPo3x9o7XBgiG8eI4NFLa7kxM/miw=; b=FzMK0VMIiA9UZUYd3D3BoCL3Yc88wT6AHwS6ZQBSriPjxFIjpYDlH19s fnEtFf2x+u2QINralXNXc/SEfknw1T5CeOM93DRgwP7kjHQwUEEngIz8v d1DhHJQpqFPlXKhUx6T8bTFlnJ7BlGCQY4f7MP4hq7bU8qKPSb0jyM6gw FTTSGNX+OiNDOFaSIXF4UPi8r7dHjU9JFwG+2eHlJ+DcfJ9awTS2kyxsm tdAoc3nAg97WnhbQzIXFGrNCwgfev2nMPSIcAZHNBUJMAZ9BTZw9ULEjh hXu8sHYJZ2ehB6yetPokTFcSA5Ymd17wWA5MaQ9gSnE8enh8p+VuzMQ++ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="259941491" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="259941491" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 07:42:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="642050319" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga008.fm.intel.com with ESMTP; 17 Jun 2022 07:42:19 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 17 Jun 2022 07:42:18 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 17 Jun 2022 07:42:18 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 17 Jun 2022 07:42:18 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 17 Jun 2022 07:42:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGnkD6bufkbO5o840C2++D21Nw8dxqPDWfxgf96M3uZdrF4RsV0rEFg+veykezQKLHDaoJ4DBmS1G5aDYJfAw8EuCRrfOQqkGF97df1sT3P6z6fB3E/B3R6gBz+9QDiPmZ/EO9HMxk550GCh113TKO+vq6muuNGPVxw+3Q04LLPoctdhvdg6y8ewhb4VRgmsuq3oHF6xvvjkAVYeo54un+lDJ9mJbeZuvz09wBlpAhaO2x5CRC0Gt8fuOpZ9FUqznNCipr0qY+PsjDajKKZcCLZwRO/QabsqQa+CygmK8sNj8duiJj/XcHjtc86TpzYapuf/TIIC0cSrIV3kChD5YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+x4GWMqBKPvrqjPUl6ZwArAe3e3CEv9CSwn35Pi5LiI=; b=YjNp1lLtpDgkEj+br25r7t3F+PDjZZ9TWRPdgVmFGYPhHIndZhUF9TPedVkf0l0oO/v7eIN5YowW823epQoIctFfpRad/pY1hr0SJxu/H0g+GnKipNcJkh8XbqADgM8fbdUMTVTCoMQQLnwZaRTJxMabPlAqFtwXXYODNPzfCiQ5lOni+JmKqHCOSEMsd8wbl1iR3alO9hC9Gcaz7fzqT2jc0wk3eyjoBqnFyx0Ct02Er1NOGMHQwiaZBZjq28ZBKKvq23uoG0Cw00aDUHVTQp9vhRQIJy+GuVDsnaa6p+lSknsRXRED11C4c6XRAVd5dw9DPqybAJyWlpGUoPAxoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4252.namprd11.prod.outlook.com (2603:10b6:5:201::26) by SN6PR11MB2703.namprd11.prod.outlook.com (2603:10b6:805:59::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Fri, 17 Jun 2022 14:42:15 +0000 Received: from DM6PR11MB4252.namprd11.prod.outlook.com ([fe80::b9d5:600c:9f13:bc96]) by DM6PR11MB4252.namprd11.prod.outlook.com ([fe80::b9d5:600c:9f13:bc96%7]) with mapi id 15.20.5332.023; Fri, 17 Jun 2022 14:42:15 +0000 From: "Xu, Rosen" To: "Huang, Wei" , "dev@dpdk.org" , "thomas@monjalon.net" , "nipun.gupta@nxp.com" , "hemant.agrawal@nxp.com" CC: "stable@dpdk.org" , "Zhang, Tianfei" , "Zhang, Qi Z" Subject: RE: [PATCH v3 2/4] raw/ifpga/base: update board information Thread-Topic: [PATCH v3 2/4] raw/ifpga/base: update board information Thread-Index: AQHYghmHE2kMHv5KYECud9HPETMmqa1TrJVw Date: Fri, 17 Jun 2022 14:42:15 +0000 Message-ID: References: <1654827900-10023-1-git-send-email-wei.huang@intel.com> <1655450375-10739-1-git-send-email-wei.huang@intel.com> <1655450375-10739-3-git-send-email-wei.huang@intel.com> In-Reply-To: <1655450375-10739-3-git-send-email-wei.huang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWY2MGNhYTktYzFkYS00YTQwLTliZDYtMzViM2Y0ZTVjZGQzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWUhKS25vTmI4ZFZlN0ozXC93RFFZSUdHbFFqUHM0R2g4Qm5Jd0FobXo5eUNsRlBZRGN1T3NuSTlZUEExdjVFNloifQ== x-ctpclassification: CTP_NT authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dc284742-d36f-4a11-41d8-08da506f926c x-ms-traffictypediagnostic: SN6PR11MB2703:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /TFy++hd+4u5TwuFHx9ZpUw3o3YxUTc4rk23thy6pCYJX5/oQJIGXPpg0TvK9nqd8nbt6O97BW7dXinNDFk5mjF8I0vS2onEFVRf2jc6uwOJNgy+SSdgKkyGYVZDE87jM+Y3YQGrVp8AhgUnG4F90Tz/KwCLHyRepQxlqX0VXZWC0Jln8q4IUeZ28GsqMTUGIaBO7UAJ+PUVgVYVRAZKzbuvHdzSnycq+OCvve7XfGvmV2TbyXuU0Sr34l/Upoe/tQlwBMPcHr6SkGanOgE1VEevQvyvWrScKq0GcT+GavC2qann+mSMK9Pdqydjb52D7V7oVRZ2en0l1n87AMa5lZzKU5+JBxti9JHrt/RdhXhuaWQhWWyLPnEtWzDMjLlp8TjwyJIyrNnmNpSdwETp84+Y8Vpl3oni8KdQAd7NSyKs3GNBEnbAspCghFLkmazYYy1oyRwSOJn/WCR7xBvvrv+UpVX98MxwPHt1C+xpAIBrGH0lqHKUqsmLbBIjNZruUNZ8IvTaPXNvVae9CUB7W4sUFfa9XPRj/HcsbYepFAuwkz8XQh3DmWR4zbbLCmFld5MATbrQ6xV/oo2RmRFvmDg9Ab8fyhvLio280wIZFk5i4cqHHYNgOoMYWq7PUkeqXWSDeEC1CSNx4OuiBKUP52cmK+/RxrLBCXfz9UA7qYI9sQGALTnxVa5Y2gUSvbkwZYpaRwUxdAJv2mmEebtlZQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4252.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(55016003)(7696005)(15650500001)(66946007)(2906002)(66556008)(498600001)(26005)(316002)(54906003)(53546011)(71200400001)(9686003)(38070700005)(76116006)(82960400001)(33656002)(110136005)(4326008)(186003)(122000001)(38100700002)(107886003)(83380400001)(8936002)(52536014)(8676002)(66446008)(6506007)(5660300002)(64756008)(30864003)(66476007)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sX0kdaBnaTASVZtaKsY2NgG+kf5gfobbt15qqyexpgMd7rnkoBec6kTypz1k?= =?us-ascii?Q?+TAz5apGEuap0gXwnvwkHymQB5H48do0kpPsrMf1gSS5j2mFK3mf/8awBjG3?= =?us-ascii?Q?FGr7mw4j7HMYhhP0ZLPcZyUICN/OJpSPvht99++vMaM5dIXo3llcyju6peIJ?= =?us-ascii?Q?8JLAiMqGnABodl0L8l7AWh/i5TkqE4dggIJPxvaz+Lonc4n44l2U09BWy/u3?= =?us-ascii?Q?q8AU5dIkdoXPMnxmdWjK5eXeq7PdD7zrf8cQeOPctdnF8GvXJBv/ueUpJlKF?= =?us-ascii?Q?k1nz0eJ+NleYWCnn0vjMwmetgT3S/CTWAB5W4I6DDRjmTR2Xuq0qnq65X4bu?= =?us-ascii?Q?0kqRQEZbLFStpqMxRVJZme4nUjELgqghK9itu4a5X9L7NxDzm2zgPEYHrQ3l?= =?us-ascii?Q?WhaH8QKBvlY39uKI3t/e9kJQe7FpNFzfzbfm6Bpp3xslxcOVjPep04iY8w+n?= =?us-ascii?Q?PDzDooYi+56EYT0qq5saHFt/NbO6NHi/sJzVjKWGgCaY3XU8nwwWSzkJ3qRG?= =?us-ascii?Q?UwAMJ/0UDZoybziHYm9R9w6ITiS2QXVu0lObvBP4UF/j9tUq7AjUDW0gu3du?= =?us-ascii?Q?7VFhVuUaDys88gfpLRtsE+vYouQT/g4w40ujBQxy/XZpayOcmFpmAAd7a6BD?= =?us-ascii?Q?Vbx9NiYPvNO0skO9H6UGrWmSN03etC74CBlzn2MsjewO8kwMFs0BgbquEOr2?= =?us-ascii?Q?pVVCBUEYtjOqDKyX5IqZ3IOs0fLsKJXocGr6yLdG7FC39cevQqeS/VmNCLyo?= =?us-ascii?Q?RmHbXwWdLAkJ9b6zfZPRRNPfSXISpQYmTJ+XD9SePtr5sKVWQh7BkP4W0zDL?= =?us-ascii?Q?LBd82JDgcw8oL+et0TAdq8xAb7FYfj+aS6DhoX3//LqdI1mBvD4yUjgaAMVT?= =?us-ascii?Q?A/fSGnwvw7a1lzfRpYR/BhOwiR4SeDNX6xbHoP4v9o6xok/cPIZy5OcnvY3L?= =?us-ascii?Q?dA9fVpKf1W1AN1ApY3WDcvED81d+xfXlGMf4gwjzJePqG6iBSu3WfX+uu17A?= =?us-ascii?Q?8qQGulFkPzg77iL+u6UxijEvbQ2TjDruvDdqpGXITcvqieHjIZYSAcnokcXL?= =?us-ascii?Q?Pbv396VANlKAileTdM5bOMbnZoX/c7bD/Zr6HZZR6eyAZX2LQsoqJAr/1vD7?= =?us-ascii?Q?fztG+OnnXZQHwwbBbOAUggVe7IjbBA7NrWD9mutKMTS7MeGlnVk6WlRUx5TI?= =?us-ascii?Q?dUXDEYjfs9cqmQzXBetgMTocSt/Mq2uQkCz6OXjvaXTEoF/+UjJgRbojQw1r?= =?us-ascii?Q?izGxceJNkJn6F/VV0ru5GnXPRoYFwTren/6aF7D61UiQ6Eg1tdss4ObRsNx4?= =?us-ascii?Q?45kt05jJ2uVnhEaqnoulfvY0J/gslFPHHudovRp1SARN5SPpGB+kD8Yih21E?= =?us-ascii?Q?TlfFbOEBZnd0vjRj/Kf8hTSISBHdiP4cneJeWzvImJBRWc6kK4QNSqdJubKy?= =?us-ascii?Q?F7/jwFSxxOYc85c730ZNL+Ce/3Ff3YWieh4PeekZHqgB9K3+hEVF6COf/ace?= =?us-ascii?Q?NysC9/NVotwacmNRkXg4ldZyPrzwlQSsBhi2bPCMLBhAP1peOLWv8kg7VIc8?= =?us-ascii?Q?CPt9y+8jPIuziIQ44u6C48DdpZHR9u8dC2bvXS060/0kXklrHHqljNvNj+Z4?= =?us-ascii?Q?w3ribtFVQLAVeW0o/C0zD7KpcqeYYAPcsqZ7YrhJI6oU5zaz4F4MDE+9rLuT?= =?us-ascii?Q?RNFO0g91mrtoVXv90leFtONk1F766IOnNLAWXJzC9B3vUanajv5V3u6ucxnv?= =?us-ascii?Q?/TNURfxoSA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4252.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc284742-d36f-4a11-41d8-08da506f926c X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2022 14:42:15.3881 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: sBfML0HsHwBpmzONyVkNQOSYrboJYUWGG7CCcYAydPW5zdl/s5vdpmzOEMmEebLp9/U/hPr4OMETnlIrl/y2aA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2703 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi, > -----Original Message----- > From: Huang, Wei > Sent: Friday, June 17, 2022 15:20 > To: dev@dpdk.org; thomas@monjalon.net; nipun.gupta@nxp.com; > hemant.agrawal@nxp.com > Cc: stable@dpdk.org; Xu, Rosen ; Zhang, Tianfei > ; Zhang, Qi Z ; Huang, Wei > > Subject: [PATCH v3 2/4] raw/ifpga/base: update board information >=20 > N6000 ADP platform has different definition of board information, they ca= n > be recognized after this patch. >=20 > Signed-off-by: Wei Huang > --- > drivers/raw/ifpga/base/ifpga_defines.h | 101 +++++++++++++++---------= - > drivers/raw/ifpga/base/ifpga_fme.c | 121 ++++++++++++++++++++----= - > ----- > drivers/raw/ifpga/base/ifpga_fme_error.c | 2 + > drivers/raw/ifpga/base/ifpga_port_error.c | 2 +- > drivers/raw/ifpga/base/opae_intel_max10.c | 45 +++++++++++ > drivers/raw/ifpga/base/opae_intel_max10.h | 3 + > 6 files changed, 194 insertions(+), 80 deletions(-) >=20 > diff --git a/drivers/raw/ifpga/base/ifpga_defines.h > b/drivers/raw/ifpga/base/ifpga_defines.h > index f84ed1d..7c8fa89 100644 > --- a/drivers/raw/ifpga/base/ifpga_defines.h > +++ b/drivers/raw/ifpga/base/ifpga_defines.h > @@ -268,6 +268,24 @@ struct feature_fme_bitstream_id { > union { > u64 csr; > struct { > + u8 build_patch:8; > + u8 build_minor:8; > + u8 build_major:8; > + u8 fvl_bypass:1; > + u8 mac_lightweight:1; > + u8 disagregate:1; > + u8 lightweiht:1; > + u8 seu:1; > + u8 ptp:1; > + u8 reserve:2; > + u8 interface:4; > + u32 afu_revision:12; > + u8 patch:4; > + u8 minor:4; > + u8 major:4; > + u8 reserved:4; > + } v1; > + struct { > u32 gitrepo_hash:32; /* GIT repository hash */ > /* > * HSSI configuration identifier: > @@ -276,7 +294,8 @@ struct feature_fme_bitstream_id { > * 2 - Ethernet > */ > u8 hssi_id:4; > - u16 rsvd1:12; /* Reserved */ > + u8 rsvd1:4; > + u8 fim_type:8; > /* Bitstream version patch number */ > u8 bs_verpatch:4; > /* Bitstream version minor number */ @@ -285,7 > +304,7 @@ struct feature_fme_bitstream_id { > u8 bs_vermajor:4; > /* Bitstream version debug number */ > u8 bs_verdebug:4; > - }; > + } v2; > }; > }; >=20 > @@ -1672,31 +1691,6 @@ struct bts_header { >=20 > #define check_support(n) (n =3D=3D 1 ? "support" : "no") >=20 > -/* bitstream id definition */ > -struct fme_bitstream_id { > - union { > - u64 id; > - struct { > - u8 build_patch:8; > - u8 build_minor:8; > - u8 build_major:8; > - u8 fvl_bypass:1; > - u8 mac_lightweight:1; > - u8 disagregate:1; > - u8 lightweiht:1; > - u8 seu:1; > - u8 ptp:1; > - u8 reserve:2; > - u8 interface:4; > - u32 afu_revision:12; > - u8 patch:4; > - u8 minor:4; > - u8 major:4; > - u8 reserved:4; > - }; > - }; > -}; > - > enum board_interface { > VC_8_10G =3D 0, > VC_4_25G =3D 1, > @@ -1705,10 +1699,30 @@ enum board_interface { > VC_2_2_25G =3D 4, > }; >=20 > +enum fim_type { > + BASE_ADP =3D 0, > + BASE_FDK, > + BASE_X16_ADP, > + BASE_X16_FDK, > + FIMA_10G_ADP, > + FIMA_25G_ADP, > + FIMA_100G_ADP, > + FIMB_ADP, > + FIMC_ADP > +}; > + > +enum hssi_id { > + NO_HSSI =3D 0, > + PCIE_RP, > + ETHER_NET > +}; > + > enum pac_major { > VISTA_CREEK =3D 0, > RUSH_CREEK =3D 1, > DARBY_CREEK =3D 2, > + LIGHTNING_CREEK =3D 3, > + ARROW_CREEK =3D 5, > }; >=20 > enum pac_minor { > @@ -1720,23 +1734,30 @@ enum pac_minor { struct opae_board_info { > enum pac_major major; > enum pac_minor minor; > - enum board_interface type; > - > - /* PAC features */ > - u8 fvl_bypass; > - u8 mac_lightweight; > - u8 disaggregate; > - u8 lightweight; > - u8 seu; > - u8 ptp; >=20 > u32 boot_page; > u32 max10_version; > u32 nios_fw_version; > - u32 nums_of_retimer; > - u32 ports_per_retimer; > - u32 nums_of_fvl; > - u32 ports_per_fvl; > + > + union { > + struct { /* N3000 specific */ > + enum board_interface type; > + u8 fvl_bypass; > + u8 mac_lightweight; > + u8 disaggregate; > + u8 lightweight; > + u8 seu; > + u8 ptp; > + u32 nums_of_retimer; > + u32 ports_per_retimer; > + u32 nums_of_fvl; > + u32 ports_per_fvl; > + }; > + struct { > + enum fim_type n6000_fim_type; > + enum hssi_id n6000_hssi_id; > + }; > + }; > }; >=20 > #pragma pack(pop) > diff --git a/drivers/raw/ifpga/base/ifpga_fme.c > b/drivers/raw/ifpga/base/ifpga_fme.c > index 4d089d2..608a352 100644 > --- a/drivers/raw/ifpga/base/ifpga_fme.c > +++ b/drivers/raw/ifpga/base/ifpga_fme.c > @@ -790,19 +790,32 @@ struct ifpga_feature_ops fme_emif_ops =3D { > .uinit =3D fme_emif_uinit, > }; >=20 > -static const char *board_type_to_string(u32 type) -{ > - switch (type) { > - case VC_8_10G: > - return "VC_8x10G"; > - case VC_4_25G: > - return "VC_4x25G"; > - case VC_2_1_25: > - return "VC_2x1x25G"; > - case VC_4_25G_2_25G: > - return "VC_4x25G+2x25G"; > - case VC_2_2_25G: > - return "VC_2x2x25G"; > +static const char *board_type_to_string(u32 board, u32 type) { > + if (board =3D=3D VISTA_CREEK) { > + switch (type) { > + case VC_8_10G: > + return "8x10G"; > + case VC_4_25G: > + return "4x25G"; > + case VC_2_1_25: > + return "2x1x25G"; > + case VC_4_25G_2_25G: > + return "4x25G+2x25G"; > + case VC_2_2_25G: > + return "2x2x25G"; > + break; > + } > + } else { > + switch (type) { > + case FIMA_10G_ADP: > + return "2x4x10G"; > + case FIMA_25G_ADP: > + return "2x2x25G"; > + case FIMA_100G_ADP: > + return "2x100G"; > + break; > + } > } >=20 > return "unknown"; > @@ -817,6 +830,12 @@ static const char *board_major_to_string(u32 major) > return "RUSH_CREEK"; > case DARBY_CREEK: > return "DARBY_CREEK"; > + case LIGHTNING_CREEK: > + return "LIGHTNING_CREEK"; > + case ARROW_CREEK: > + return "ARROW_CREEK"; > + default: > + break; > } >=20 > return "unknown"; > @@ -859,35 +878,56 @@ static int board_type_to_info(u32 type, >=20 > static int fme_get_board_interface(struct ifpga_fme_hw *fme) { > - struct fme_bitstream_id id; > + struct feature_fme_bitstream_id id; > struct ifpga_hw *hw; > u32 val; > + const char *type =3D NULL; > + int ret; >=20 > hw =3D fme->parent; > if (!hw) > return -ENODEV; >=20 > - if (fme_hdr_get_bitstream_id(fme, &id.id)) > + if (fme_hdr_get_bitstream_id(fme, &id.csr)) > return -EINVAL; >=20 > - fme->board_info.major =3D id.major; > - fme->board_info.minor =3D id.minor; > - fme->board_info.type =3D id.interface; > - fme->board_info.fvl_bypass =3D id.fvl_bypass; > - fme->board_info.mac_lightweight =3D id.mac_lightweight; > - fme->board_info.lightweight =3D id.lightweiht; > - fme->board_info.disaggregate =3D id.disagregate; > - fme->board_info.seu =3D id.seu; > - fme->board_info.ptp =3D id.ptp; > + if (id.v1.major =3D=3D ARROW_CREEK) { > + fme->board_info.major =3D id.v2.bs_vermajor; > + fme->board_info.minor =3D id.v2.bs_verminor; > + fme->board_info.n6000_fim_type =3D id.v2.fim_type; > + fme->board_info.n6000_hssi_id =3D id.v2.hssi_id; > + type =3D board_type_to_string(fme->board_info.major, > + fme->board_info.n6000_fim_type); > + } else { > + fme->board_info.major =3D id.v1.major; > + fme->board_info.minor =3D id.v1.minor; > + fme->board_info.type =3D id.v1.interface; > + fme->board_info.fvl_bypass =3D id.v1.fvl_bypass; > + fme->board_info.mac_lightweight =3D id.v1.mac_lightweight; > + fme->board_info.lightweight =3D id.v1.lightweiht; > + fme->board_info.disaggregate =3D id.v1.disagregate; > + fme->board_info.seu =3D id.v1.seu; > + fme->board_info.ptp =3D id.v1.ptp; > + type =3D board_type_to_string(fme->board_info.major, > + fme->board_info.type); > + } >=20 > dev_info(fme, "found: PCI dev: %02x:%02x:%x board: %s > type: %s\n", > hw->pci_data->bus, > hw->pci_data->devid, > hw->pci_data->function, > board_major_to_string(fme->board_info.major), > - board_type_to_string(fme->board_info.type)); > + type); >=20 > - dev_info(fme, "support feature:\n" > + ret =3D max10_get_fpga_load_info(fme->max10_dev, &val); > + if (ret) > + return ret; > + fme->board_info.boot_page =3D val; > + > + if (fme->board_info.major =3D=3D VISTA_CREEK) { > + dev_info(dev, "FPGA loaded from %s Image\n", > + val ? "User" : "Factory"); > + dev_info(fme, "support feature:\n" > "fvl_bypass:%s\n" > "mac_lightweight:%s\n" > "lightweight:%s\n" > @@ -901,26 +941,29 @@ static int fme_get_board_interface(struct > ifpga_fme_hw *fme) > check_support(fme->board_info.seu), > check_support(fme->board_info.ptp)); >=20 > + if (board_type_to_info(fme->board_info.type, &fme- > >board_info)) > + return -EINVAL; >=20 > - if (board_type_to_info(fme->board_info.type, &fme->board_info)) > - return -EINVAL; > - > - dev_info(fme, "get board info: nums_retimers %d > ports_per_retimer %d nums_fvl %d ports_per_fvl %d\n", > + dev_info(fme, "get board info: nums_retimers %d " > + "ports_per_retimer %d nums_fvl %d " > + "ports_per_fvl %d\n", > fme->board_info.nums_of_retimer, > fme->board_info.ports_per_retimer, > fme->board_info.nums_of_fvl, > fme->board_info.ports_per_fvl); > + } else { > + dev_info(dev, "FPGA loaded from %s Image\n", > + val ? (val =3D=3D 1 ? "User1" : "User2") : "Factory"); > + } >=20 > - if (max10_sys_read(fme->max10_dev, FPGA_PAGE_INFO, &val)) > - return -EINVAL; > - fme->board_info.boot_page =3D val & 0x7; > - > - if (max10_sys_read(fme->max10_dev, MAX10_BUILD_VER, &val)) > - return -EINVAL; > + ret =3D max10_get_bmc_version(fme->max10_dev, &val); > + if (ret) > + return ret; > fme->board_info.max10_version =3D val; >=20 > - if (max10_sys_read(fme->max10_dev, NIOS2_FW_VERSION, &val)) > - return -EINVAL; > + ret =3D max10_get_bmcfw_version(fme->max10_dev, &val); > + if (ret) > + return ret; > fme->board_info.nios_fw_version =3D val; >=20 > dev_info(fme, "max10 version 0x%x, nios fw version 0x%x\n", @@ - > 1023,7 +1066,7 @@ static int fme_spi_init(struct ifpga_feature *feature) > opae_free(max10); > release_dev: > altera_spi_release(spi_master); > - return ret; > + return -ENODEV; > } >=20 > static void fme_spi_uinit(struct ifpga_feature *feature) diff --git > a/drivers/raw/ifpga/base/ifpga_fme_error.c > b/drivers/raw/ifpga/base/ifpga_fme_error.c > index 5905eac..c5bed28 100644 > --- a/drivers/raw/ifpga/base/ifpga_fme_error.c > +++ b/drivers/raw/ifpga/base/ifpga_fme_error.c > @@ -224,6 +224,8 @@ static int fme_global_error_init(struct ifpga_feature > *feature) { > struct ifpga_fme_hw *fme =3D feature->parent; >=20 > + dev_info(NULL, "FME error_module Init.\n"); > + > fme_error_enable(fme); >=20 > if (feature->ctx_num) > diff --git a/drivers/raw/ifpga/base/ifpga_port_error.c > b/drivers/raw/ifpga/base/ifpga_port_error.c > index 189f762..6c8a7d7 100644 > --- a/drivers/raw/ifpga/base/ifpga_port_error.c > +++ b/drivers/raw/ifpga/base/ifpga_port_error.c > @@ -88,7 +88,7 @@ static int port_error_init(struct ifpga_feature *featur= e) > { > struct ifpga_port_hw *port =3D feature->parent; >=20 > - dev_info(NULL, "port error Init.\n"); > + dev_info(NULL, "port error_module Init.\n"); >=20 > spinlock_lock(&port->lock); > port_err_mask(port, false); > diff --git a/drivers/raw/ifpga/base/opae_intel_max10.c > b/drivers/raw/ifpga/base/opae_intel_max10.c > index 901a258..26f323c 100644 > --- a/drivers/raw/ifpga/base/opae_intel_max10.c > +++ b/drivers/raw/ifpga/base/opae_intel_max10.c > @@ -766,6 +766,51 @@ static int max10_staging_area_init(struct > intel_max10_device *dev) > return 0; > } >=20 > +int max10_get_fpga_load_info(struct intel_max10_device *dev, unsigned > +int *val) { > + int ret; > + unsigned int value; > + > + /* read FPGA loading information */ > + ret =3D max10_sys_read(dev, dev->csr->fpga_page_info, &value); > + if (ret) { > + dev_err(dev, "fail to get FPGA loading info\n"); > + return ret; > + } > + > + if (dev->type =3D=3D M10_N3000) > + *val =3D value & 0x7; > + else if (dev->type =3D=3D M10_N6000) { > + if (!GET_FIELD(PMCI_FPGA_CONFIGURED, value)) > + return -EINVAL; > + *val =3D GET_FIELD(PMCI_FPGA_BOOT_PAGE, value); > + } > + > + return 0; > +} > + > +int max10_get_bmc_version(struct intel_max10_device *dev, unsigned int > +*val) { > + int ret; > + > + ret =3D max10_sys_read(dev, dev->csr->build_version, val); > + if (ret) > + return ret; > + > + return 0; > +} > + > +int max10_get_bmcfw_version(struct intel_max10_device *dev, unsigned > +int *val) { > + int ret; > + > + ret =3D max10_sys_read(dev, dev->csr->fw_version, val); > + if (ret) > + return ret; > + > + return 0; > +} > + > static const struct m10bmc_csr m10bmc_spi_csr =3D { > .base =3D MAX10_SEC_BASE_ADDR, > .build_version =3D MAX10_BUILD_VER, > diff --git a/drivers/raw/ifpga/base/opae_intel_max10.h > b/drivers/raw/ifpga/base/opae_intel_max10.h > index 0d31196..6a1b122 100644 > --- a/drivers/raw/ifpga/base/opae_intel_max10.h > +++ b/drivers/raw/ifpga/base/opae_intel_max10.h > @@ -336,6 +336,9 @@ int max10_reg_write(struct intel_max10_device *dev, > unsigned int offset, unsigned int val); int > max10_sys_update_bits(struct intel_max10_device *dev, > unsigned int offset, unsigned int msk, unsigned int val); > +int max10_get_bmcfw_version(struct intel_max10_device *dev, unsigned > +int *val); int max10_get_bmc_version(struct intel_max10_device *dev, > +unsigned int *val); int max10_get_fpga_load_info(struct > +intel_max10_device *dev, unsigned int *val); > int intel_max10_device_init(struct intel_max10_device *dev); int > intel_max10_device_remove(struct intel_max10_device *dev); >=20 > -- > 1.8.3.1 Reviewed-by: Rosen Xu