From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0054.outbound.protection.outlook.com [104.47.1.54]) by dpdk.org (Postfix) with ESMTP id 024A556A1 for ; Mon, 11 Dec 2017 08:21:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WFmio5e/I6N2aw7h2x75P27b87cg/mANUcOYO8S6+HY=; b=OxsbRqz5ugB33Tx0PXxbvGFxZqbWfHH9zMe9eLUtJQLFFq1iG78dTmox5oQE3xeBjjyBl+6DKDQD9rGVxw/kCYVeUO21o4Y3kgNnEKtkAR3cG68t1D2AqqyQc9qfS8GPi44+mg7vvSzNa4EYO8I1Y0MBAabSXOI5WumaaJfYZLU= Received: from arm.com (113.29.88.7) by AM5PR0801MB1345.eurprd08.prod.outlook.com (2603:10a6:203:1f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 11 Dec 2017 07:21:53 +0000 Date: Mon, 11 Dec 2017 15:20:33 +0800 From: Jianbo Liu To: Ravi Kumar Cc: dev@dpdk.org Message-ID: <20171211072032.GA16288@arm.com> References: <1512047472-118050-1-git-send-email-Ravi1.kumar@amd.com> <1512047472-118050-2-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1512047472-118050-2-git-send-email-Ravi1.kumar@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [113.29.88.7] X-ClientProxiedBy: PS1PR0601CA0092.apcprd06.prod.outlook.com (2603:1096:803:1::18) To AM5PR0801MB1345.eurprd08.prod.outlook.com (2603:10a6:203:1f::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0998bc16-f10f-457e-e976-08d54067db75 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:AM5PR0801MB1345; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1345; 3:cIsK9HBR0LINGDwnxUccct7U5qI4FvGWnSeAwxb/rTiWQfwHH9w4R84y70eYnALNP8su3XPuE/cgwlX8VllMPfx0UG8GIrgIPw2ufa0a4PU/3ndalJs4eH4colu53qlgSXSmjpHEQ3OYWsv7fA0ewCAUqiXekhE+fc0XhcEa46gWQFWgsUMs0lroHLVL2zw0lJR55OqnB6pS/8/F5rhBDbb5pVPyp2AagrwEtrIROgPlN7KMYpIfRsMyV+7+UWyW; 25:blgFy5nxgHYAT1ymrAg1ASM85y50vsdo/fibSgHCSBNKMgMhQ4W/1uFgxIZN1yQAHDionOU1UDivwi/6i+DxMcvlLL5LWOa9Bgze7/t/qOGvT27zJSEvUK/wL50TX33AICeFyvPHzhGHbgzBpvD0+X2ImH7DNxFPmB/KfiXE9xO+27OIu4tEBMZ/DSFSC+3j3D8ontpYOzB7Q5oh6DECBnLXfMc5YyI1rtJ2QN6oP9ZxcojK5C2MjB0zm+xQ3pe9D4aVfMwgVdQLXioNHI300mYCWLuSqlr1NX6ErzzlcmN8ENAiOlCMJyoUofXs3NXRJ1FMVZ7XDAXxiRvNwjgziA==; 31:8vX9BnUmcYzz1/sQIQREl9+AFzjappnN1sfYk19bczCtG11wnojfO4S7pJrrwqeugK4ArCz3QaR3H7ggDCnk3w9FjIiVs8xcXA/yMflRkFFHj6HA6eRhFhgoqifF/eANhC+2Mn3iwMXURDOS5tQtfnZTjn6ha7mm//tDY5l6656qtHhXcgODc4QKikgdDKSMceSGlom9BPVwujvhuLu4Tf3ACaL5IKAXLDD9qLr/HyU= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1345: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jianbo.Liu@arm.com; Content-Transfer-Encoding: quoted-printable X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1345; 20:rdjzkgqzjRF0r1lrYvnbvlNko4nVM5Z3M2vUVEaQVFnrInsF1VzYQ/EyWCbx2ziHLna1LsZNSsUXRwtLDN69e0l0UM1owoCboGqcbgPuKeIMDo6F4HUti2vMm1/7rONMPZwgY3h0rGUQCdpqLzDvF3SvCf8WVwjLBesA1Ulpcymdu6S7k45+AtsQUYznm9aLMx+lnhUM+NI5ckdDeWwAvbz2S1GCNFSnGCR8kWYv+yzZ+26lrCem8FjbNMzhsr+Wr3yWDGxZNMcsKfwXR36rb74CiKKFZaznsPo+WQ1YE3d2ONtpzpevpzJ4RWS2P+pFHzcLqaGJ1AHMj0mjvROduczk5xeKFDbvNGlx2zrIXW3YLE3cr1oo/BPMyMpU6qGEKeM3ZbflXFrM0rlwldzDoNcDIctcz7tgjuKoGOs4W2dEyqD4crTLESJMBd7srRUgzbwFtpqb1iBf8SmVNu3kjSvZ0K3qVzqaxeXDeVSse+e+Me9nRNaJoewZy95RFs5i; 4:A089nI2Wg/sdo5ey8iwa/jrhkkreOWblVRTGa2H2YUFxB7Wz1XzPrvyxDSTaH4DDGHSLApibAtaUDOlfh+DtZmmBR1YouhrQoXeACFw8B/Eqfj2/uSK7hvzuaheyNC5YVG6buQOXMQLwuz3yirDJPApmxDIEjQdMqa7gYy0qbWsbsRATYOMiYQCFyrOpHKKJ8lfVFqJ5qczkR89P5ha35pFB54PiigTHCi4aks3vgk4qXwuf44MvvUCVULOsREE8+5wHxl12DIjn2N3ZTXEFtustATaGr79K3OvcnAEvjs6oWlkXNsl69PxAjEMnvOc2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123558100)(6072148)(201708071742011); SRVR:AM5PR0801MB1345; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM5PR0801MB1345; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(189003)(199004)(40434004)(24454002)(47776003)(478600001)(5890100001)(68736007)(66066001)(53936002)(58126008)(4326008)(55016002)(6916009)(2950100002)(25786009)(59450400001)(316002)(36756003)(5660300001)(72206003)(81166006)(8746002)(8676002)(52116002)(3846002)(55236003)(7736002)(305945005)(6116002)(86362001)(2486003)(50466002)(6666003)(7696005)(81156014)(83506002)(8936002)(2906002)(21086003)(229853002)(52146003)(106356001)(23676004)(97736004)(105586002)(76176011)(33656002)(16526018)(1076002)(8666007)(6246003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1345; H:arm.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA4MDFNQjEzNDU7MjM6REEwRUdKcTAwVC9QdW9yZnZGL05yU08v?= =?utf-8?B?bTFvaHBlYmswU2tNdmp0bHBrZFJQTHJmUlpGTFZteUZtaWh1UFNpODFvYnFi?= =?utf-8?B?dlA1UHZ3c05XUFkxRFk0N3FGZDgyb2kwNC9LbVUyRE9rUzBTU291Wmg5ekI5?= =?utf-8?B?T2lOQmgzbitWK3dTVnNqSE5nSWtMMmdJeHdEU2RHS2lNTjFjSTgvK2gwR0Iw?= =?utf-8?B?eHZsNUlDYzJSRTQ3dFBxSXV0VXQraHZ6Nk9rbVNteDhCTmFyVW1JenRDZVZr?= =?utf-8?B?TUd4RzAwUjF2ZlR3Smcwamtkd0hFZkFOS1R1aWorNzBBMGF6SEFJdFg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7QsP8CWxhYEucHv0AB4S/UBGvcvx5hzng939V2SwCGvZh5RUt4tmwD5CkSJOU6kA0MkUk5kkbH93zXGtedtVm5qpphRZbqFaQ9JhkGB/2KNg6URZQhkmQdpN6GjMAdnbxfjhwoTmAsKEsiWnMkyS4=; 24:g7pWlwhN3eVSu6v43PIZt2dtrLzFl72i6oBOUJ26XJ/0EVgeCU7itCj/oCwIKmYzhm0alwfiAA9pCWnXkCzQyW/MLX1X+WI1rXuFa6dXUH0=; 7:OLSGSwJEcc2gN8gppzYB4tvwmEQrL/ZnIEcdixJeAFZl1kI4wRS2Ybp33tnBVbr7sjOj0r/zw0v4GL6UchLrCakT25mRXw7AUeHNQTcam+6FeTRGIPzdUzTI7X9QmxmJouxZHUVNyxOCPRVpKH4b60zeYkpcOArW6X6Xbd8g2/dvaz7XgeiC2ztDcuX7gJ/42pa3UkoZhwSc5HlrCl3OGBfNLQwbBNDaQt6A03S5J8wMHUdQRT6a2t9Wec6f9hIQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 07:21:53.4445 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0998bc16-f10f-457e-e976-08d54067db75 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1345 Subject: Re: [dpdk-dev] [PATCH 02/16] net/axgbe: add register map and related macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 07:21:56 -0000 The 11/30/2017 08:10, Ravi Kumar wrote: > Signed-off-by: Ravi Kumar > --- > drivers/net/axgbe/axgbe_common.h | 1645 ++++++++++++++++++++++++++++++++= +++++- > 1 file changed, 1644 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_c= ommon.h > index 4af811a..9a5808d 100644 > --- a/drivers/net/axgbe/axgbe_common.h > +++ b/drivers/net/axgbe/axgbe_common.h ... > +/* Macros for building, reading or writing register values or bits > + * within the register values of SerDes integration registers. > + */ > +#define XSIR_GET_BITS(_var, _prefix, _field) = \ > + GET_BITS((_var), \ > + _prefix##_##_field##_INDEX, \ > + _prefix##_##_field##_WIDTH) > + > +#define XSIR_SET_BITS(_var, _prefix, _field, _val) = \ > + SET_BITS((_var), \ > + _prefix##_##_field##_INDEX, \ > + _prefix##_##_field##_WIDTH, (_val)) > + > +#define XSIR0_IOREAD(_pdata, _reg) \ > + rte_read16((void *)((_pdata)->sir0_regs + (_reg))) > + > +#define XSIR0_IOREAD_BITS(_pdata, _reg, _field) = \ > + GET_BITS(XSIR0_IOREAD((_pdata), _reg), \ > + _reg##_##_field##_INDEX, \ > + _reg##_##_field##_WIDTH) > + > +#define XSIR0_IOWRITE(_pdata, _reg, _val) \ > + rte_read16((_val), (void *)((_pdata)->sir0_regs + (_reg))) rte_write16? > + > +#define XSIR0_IOWRITE_BITS(_pdata, _reg, _field, _val) = \ > +do { \ > + u16 reg_val =3D XSIR0_IOREAD((_pdata), _reg); \ > + SET_BITS(reg_val, \ > + _reg##_##_field##_INDEX, \ > + _reg##_##_field##_WIDTH, (_val)); \ > + XSIR0_IOWRITE((_pdata), _reg, reg_val); \ > +} while (0) > + > +#define XSIR1_IOREAD(_pdata, _reg) \ > + rte_read16((void *)((_pdata)->sir1_regs + _reg)) > + > +#define XSIR1_IOREAD_BITS(_pdata, _reg, _field) = \ > + GET_BITS(XSIR1_IOREAD((_pdata), _reg), \ > + _reg##_##_field##_INDEX, \ > + _reg##_##_field##_WIDTH) > + > +#define XSIR1_IOWRITE(_pdata, _reg, _val) \ > + rte_read16((_val), (void *)((_pdata)->sir1_regs + (_reg))) rte_write16? > + > +#define XSIR1_IOWRITE_BITS(_pdata, _reg, _field, _val) = \ > +do { \ > + u16 reg_val =3D XSIR1_IOREAD((_pdata), _reg); \ > + SET_BITS(reg_val, \ > + _reg##_##_field##_INDEX, \ > + _reg##_##_field##_WIDTH, (_val)); \ > + XSIR1_IOWRITE((_pdata), _reg, reg_val); \ > +} while (0) > + .... IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.