From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843AbdA0KOV (ORCPT ); Fri, 27 Jan 2017 05:14:21 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:19928 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754536AbdA0KOR (ORCPT ); Fri, 27 Jan 2017 05:14:17 -0500 Subject: Re: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM To: Harini Katakam , Rafal Ozieblo References: <1484841375-11420-1-git-send-email-andrei.pistirica@microchip.com> CC: Andrei Pistirica , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "davem@davemloft.net" , "harini.katakam@xilinx.com" , "punnaia@xilinx.com" , "michals@xilinx.com" , "anirudh@xilinx.com" , "boris.brezillon@free-electrons.com" , "alexandre.belloni@free-electrons.com" , "tbultel@pixelsurmer.com" , "richardcochran@gmail.com" From: Nicolas Ferre Organization: atmel Message-ID: <1bf44464-6f85-64a9-a660-8d2c44015eb9@atmel.com> Date: Fri, 27 Jan 2017 11:12:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.145.133.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 27/01/2017 à 06:42, Harini Katakam a écrit : > Hi Rafal, > > On Thu, Jan 26, 2017 at 8:45 PM, Rafal Ozieblo wrote: >>> -----Original Message----- >>> From: Andrei Pistirica [mailto:andrei.pistirica@microchip.com] >>> Sent: 19 stycznia 2017 16:56 >>> Subject: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM >>> >>> >>> +static inline bool gem_has_ptp(struct macb *bp) >>> +{ >>> + return !!(bp->caps & MACB_CAPS_GEM_HAS_PTP); >>> +} >> Why don't you use hardware capabilities here? Would it be better to read it from hardware instead adding it to many configuration? > > If you are referring to TSU bit in DCFG5, then we will be relying on > Cadence IP's information irrespective of the SoC capability > and whether the PTP support was adequate. > I think the capability approach gives better control and > it is not really much to add. Yes, absolutely. In fact we already had this discussion and decided that this capability scheme was giving much more control at low cost. Regards, -- Nicolas Ferre