From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753420AbaK0C1K (ORCPT ); Wed, 26 Nov 2014 21:27:10 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:46248 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751882AbaK0C1I (ORCPT ); Wed, 26 Nov 2014 21:27:08 -0500 X-Listener-Flag: 11101 Subject: Re: [PATCH v4] clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers From: Yingjoe Chen To: Doug Anderson CC: Sonny Rao , "linux-arm-kernel@lists.infradead.org" , Mark Rutland , "devicetree@vger.kernel.org" , Lorenzo Pieralisi , "pawel.moll@arm.com" , "ijc+devicetree@hellion.org.uk" , Marc Zyngier , Catalin Marinas , Daniel Lezcano , Will Deacon , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "galak@codeaurora.org" , Sudeep Holla , Olof Johansson , Nathan Lynch , Thomas Gleixner , Stephen Boyd In-Reply-To: References: <1412753627-28287-1-git-send-email-sonnyrao@chromium.org> <1417012893.12707.12.camel@mtksdaap41> Content-Type: text/plain; charset="UTF-8" Date: Thu, 27 Nov 2014 10:27:04 +0800 Message-ID: <1417055224.12707.24.camel@mtksdaap41> MIME-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, 2014-11-26 at 08:14 -0800, Doug Anderson wrote: > Yingjoe, > > On Wed, Nov 26, 2014 at 6:41 AM, Yingjoe Chen wrote: > > Sorry for the (very) late reply. > > I just realize today MT8135 need this and the other patch [1] to boot > > SMP correctly. I've applied both patches and they works fine. Thanks :) > > Excellent. It's helpful to include a Tested-by: tag in your email. > You'd have a line with just "Tested-by: Yingjoe Chen > " sure, here's my tested-by for the 2 patches Tested-by: Yingjoe Chen I'll remember to add it next time :) > > However, I'm not sure if we really need to add new property. > > arm_arch_timer driver will only use virtual timer when virtual PPI > > interrupt is provided, so the following patch to timer dtsi will also > > works. I think if the firmware doesn't support virtual timer, it make > > sense to not supply virtual interrupt. > > > > timer { > > compatible = "arm,armv7-timer"; > > interrupts = , > > - , > > - , > > - ; > > + ; > > clock-frequency = <13000000>; > > }; > > Once you have Sonny's patch then I believe that the above would work. > However we rejected something like this because device tree is > supposed to describe the hardware. The hardware really does provide > the virtual timer interrupts and they really are at PPI 11 and PPI 10. > It's just that firmware doesn't handle things properly so they can't > be used. > > NOTE: If we add the "arm,cpu-registers-not-fw-configured" to the > device tree and firmware actually works out how to configure things > (like if somehow has firmware that has a hypervisor) then it can > easily remove this device tree property before calling through to the > kernel. It would be much harder for the firmware to add back in the > "PPI 11" and "PPI 10" entries to the timer. > > -Doug I see your point, that's good for me then. Thanks. Joe.C From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yingjoe Chen Subject: Re: [PATCH v4] clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers Date: Thu, 27 Nov 2014 10:27:04 +0800 Message-ID: <1417055224.12707.24.camel@mtksdaap41> References: <1412753627-28287-1-git-send-email-sonnyrao@chromium.org> <1417012893.12707.12.camel@mtksdaap41> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Doug Anderson Cc: Sonny Rao , "linux-arm-kernel@lists.infradead.org" , Mark Rutland , "devicetree@vger.kernel.org" , Lorenzo Pieralisi , "pawel.moll@arm.com" , "ijc+devicetree@hellion.org.uk" , Marc Zyngier , Catalin Marinas , Daniel Lezcano , Will Deacon , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "galak@codeaurora.org" , Sudeep Holla , Olof Johansson , Nathan Lynch , Thomas Gleixner , Stephen Boyd List-Id: devicetree@vger.kernel.org Hi, On Wed, 2014-11-26 at 08:14 -0800, Doug Anderson wrote: > Yingjoe, > > On Wed, Nov 26, 2014 at 6:41 AM, Yingjoe Chen wrote: > > Sorry for the (very) late reply. > > I just realize today MT8135 need this and the other patch [1] to boot > > SMP correctly. I've applied both patches and they works fine. Thanks :) > > Excellent. It's helpful to include a Tested-by: tag in your email. > You'd have a line with just "Tested-by: Yingjoe Chen > " sure, here's my tested-by for the 2 patches Tested-by: Yingjoe Chen I'll remember to add it next time :) > > However, I'm not sure if we really need to add new property. > > arm_arch_timer driver will only use virtual timer when virtual PPI > > interrupt is provided, so the following patch to timer dtsi will also > > works. I think if the firmware doesn't support virtual timer, it make > > sense to not supply virtual interrupt. > > > > timer { > > compatible = "arm,armv7-timer"; > > interrupts = , > > - , > > - , > > - ; > > + ; > > clock-frequency = <13000000>; > > }; > > Once you have Sonny's patch then I believe that the above would work. > However we rejected something like this because device tree is > supposed to describe the hardware. The hardware really does provide > the virtual timer interrupts and they really are at PPI 11 and PPI 10. > It's just that firmware doesn't handle things properly so they can't > be used. > > NOTE: If we add the "arm,cpu-registers-not-fw-configured" to the > device tree and firmware actually works out how to configure things > (like if somehow has firmware that has a hypervisor) then it can > easily remove this device tree property before calling through to the > kernel. It would be much harder for the firmware to add back in the > "PPI 11" and "PPI 10" entries to the timer. > > -Doug I see your point, that's good for me then. Thanks. Joe.C From mboxrd@z Thu Jan 1 00:00:00 1970 From: yingjoe.chen@mediatek.com (Yingjoe Chen) Date: Thu, 27 Nov 2014 10:27:04 +0800 Subject: [PATCH v4] clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers In-Reply-To: References: <1412753627-28287-1-git-send-email-sonnyrao@chromium.org> <1417012893.12707.12.camel@mtksdaap41> Message-ID: <1417055224.12707.24.camel@mtksdaap41> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Wed, 2014-11-26 at 08:14 -0800, Doug Anderson wrote: > Yingjoe, > > On Wed, Nov 26, 2014 at 6:41 AM, Yingjoe Chen wrote: > > Sorry for the (very) late reply. > > I just realize today MT8135 need this and the other patch [1] to boot > > SMP correctly. I've applied both patches and they works fine. Thanks :) > > Excellent. It's helpful to include a Tested-by: tag in your email. > You'd have a line with just "Tested-by: Yingjoe Chen > " sure, here's my tested-by for the 2 patches Tested-by: Yingjoe Chen I'll remember to add it next time :) > > However, I'm not sure if we really need to add new property. > > arm_arch_timer driver will only use virtual timer when virtual PPI > > interrupt is provided, so the following patch to timer dtsi will also > > works. I think if the firmware doesn't support virtual timer, it make > > sense to not supply virtual interrupt. > > > > timer { > > compatible = "arm,armv7-timer"; > > interrupts = , > > - , > > - , > > - ; > > + ; > > clock-frequency = <13000000>; > > }; > > Once you have Sonny's patch then I believe that the above would work. > However we rejected something like this because device tree is > supposed to describe the hardware. The hardware really does provide > the virtual timer interrupts and they really are at PPI 11 and PPI 10. > It's just that firmware doesn't handle things properly so they can't > be used. > > NOTE: If we add the "arm,cpu-registers-not-fw-configured" to the > device tree and firmware actually works out how to configure things > (like if somehow has firmware that has a hypervisor) then it can > easily remove this device tree property before calling through to the > kernel. It would be much harder for the firmware to add back in the > "PPI 11" and "PPI 10" entries to the timer. > > -Doug I see your point, that's good for me then. Thanks. Joe.C