From patchwork Thu Jan 12 07:15:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mubin Sayyed X-Patchwork-Id: 13097548 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DD27C54EBD for ; Thu, 12 Jan 2023 07:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VPDFYHKAjafSWwH/EXl2P5h+wXUjS+2h1746EBhI38o=; b=Zk8KFJPqZ6HSHa uCVerbyrAFWJJXGabfm6iIMe1SQm0eRAm+6UdUpOs/X9dnWV4SZs3kyQnxPosXeGhB/gBDhmPRJ/s bGpyDORohGw/vJ0DmVamjPkJ/tC3vP1kANOKmbsIZmlcbj38A6c5NESZo2pMTM9nighMqg31BbcZ1 wXnznNb+1/lYU25azfdkBVe9mYtl4FMetS2tQP0AR/Oj17pNA8oandn0giUY5OvUaZX+pwLl10VK+ v4GZbLUn+IgdPbVFY2mluXC8kpra9acEli6su4IQOgac4rE3ZrIyChyrfo8QWpX2NaTKQ0/dErrdQ bwJTG5BSKW/rFd4E2Cdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFrok-00DyjU-IB; Thu, 12 Jan 2023 07:16:06 +0000 Received: from mail-dm6nam10on2074.outbound.protection.outlook.com ([40.107.93.74] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFroY-00DyhI-3t for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 07:15:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EEV2RbdHidELsDmp9mEEeZAB+4id2Ch/kZNSYz1SgdDMgFg0icGEloRQUODYahFsMc7j5jRWF9hvNfA5Wy7IQqU2QGhPosjvCFlNihYEAcl6S9zHBlTkD4vTUSOvwqXACA9M3BkcOjskmLs8Bxx7ekiPH+F9Hd9Q91B7Oj1/sXw+jyZbZBhd8+IC9rcj8XofNpK11bb701dZPhxLc1kUl7l/XvofBxwBDJlnYGwlDlQX9XzO5yHe+Hv89NFSKh7GC0GFxyigsQ41uzdk3rPbXcx3S0s+1rLXcV4hDgJhuygPu6Dc7SD/xDjSZvkxn16bWvZxFxNbOnpGANoeS/qfwg== 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=0qXGrWfgIUpSg+rp2AMYXEFb2uGOOImgPieQPBLjMio=; b=HR0L1lU5NI9jiXP1v/3TAc2P//Yajcz/jBUp7GqFkM2C1O859Oqr/CQmBqFlNVnuG5x9o/0tCpMVndgV/5lNHhXBDJZQUknQhA5Td0et61vWXDCI6lTytkWULIz/zd++RaN3WIkoqav8vA0D4SqgxBFPIda3UKJ0U3HtY6OMNHIQnbBr+deVM72AkPHK7sKD4+gteJemzSja+k/kdoOolCo1nLJBviuaEPw4PZW80o1q99vTCChHOh6XbBeH37YgavKw5/G1W0iG2uFmNmuBSA8qipJEuNnAebtnGcYr1IOgi7Q6ypNPGp6U0vaIO380l7Sr01uwH0k4BvVmbXaviA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0qXGrWfgIUpSg+rp2AMYXEFb2uGOOImgPieQPBLjMio=; b=BBrE9MGpGxNFXdq+EGkRRpHvCYYo2u9PyVUcTF/EMBF8S7jkFi+Hqg4U370gXQ0rDCUogEE1FSV7xwXGNJPBagsUSH5ckvgq9GXuwTqyO1Emr1Qxv2Xdcs5dGhg5qTFqYi9xt2mz/8Zq88TVU7g6Duzl13KmBgnJ81A4biJPz9U= Received: from MW4PR04CA0312.namprd04.prod.outlook.com (2603:10b6:303:82::17) by CY8PR12MB7586.namprd12.prod.outlook.com (2603:10b6:930:99::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Thu, 12 Jan 2023 07:15:49 +0000 Received: from CO1NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:303:82:cafe::e3) by MW4PR04CA0312.outlook.office365.com (2603:10b6:303:82::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Thu, 12 Jan 2023 07:15:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT034.mail.protection.outlook.com (10.13.174.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.13 via Frontend Transport; Thu, 12 Jan 2023 07:15:48 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 12 Jan 2023 01:15:47 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 12 Jan 2023 01:15:47 -0600 Received: from xhdmubinusm40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 12 Jan 2023 01:15:43 -0600 From: Mubin Sayyed To: , , , , , CC: , , , , , Mubin Sayyed Subject: [LINUX PATCH 1/3] clocksource: timer-cadence-ttc: Do not probe TTC device configured as PWM Date: Thu, 12 Jan 2023 12:45:24 +0530 Message-ID: <20230112071526.3035949-2-mubin.sayyed@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230112071526.3035949-1-mubin.sayyed@amd.com> References: <20230112071526.3035949-1-mubin.sayyed@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT034:EE_|CY8PR12MB7586:EE_ X-MS-Office365-Filtering-Correlation-Id: e6d88814-02ec-4da6-dbbc-08daf46cd4e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tJXdz3OMk3SiI1AHcNUX83RQwaWlm/6kDLvIjhShbKmUKOEfE2/OV/oiFl9cp+YQBNKgOmcbXWGcY8qtVqtw6Tfc/HY2At7UoKNGQbJzBICowz045GEwdzx8jgkrKg9Alm+D68lzmOtO/Bw/srx42izGeDUUf9OKdg417Mhre74qwRI5u/4GT8JXIzZup1d1ysde4USkNmtfY9tvAdh7X70PmPMwFxqiThbWs+9QoMYm4D3d8EsaEBJliot57umGMYR+dOSxNPCtpE1S5NUnVC+BXNA4VZ8X8rP9FdGGT8ZP1AUcqTrRM2x1jHnCP0QenJgOw5F09QONZoBCsHewmIGmoGncStwI+jC1IgGzOoFCC/v8LVb14NuWArgXMUh8rHKNiNRY5cA3+fLrekkCMhTrJrb21O9NekFbEMZ2sVF4YaAjT+NdTiQumJ6gY6J720S/m1YGD9bIOSdcXi5RfdF8/ZJz6gkXir3exwHM3IP57zEE/9dW/wF6k8VzlPOz0anR/cNBaB8h6A5aiBD2+e/36a02E05mSCOBwG1h0Dc42UitTh07nsWYtStCT1HxnOQ9NAuD3yQo+LZbWU+Hmaz+GpxBg38RUpm1GB6ODTbmezEsvTBgVF5WNswUeYtaFctqcai0nkmW/a8FAKwAAvx6uJxCHRU59lriqGsfnmlAKI3HB4D0c1j7GEScZsuIPbQv3nxm6CwNEUWGH6g2+FJ/pZGLmKwZA127vXuflQg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(136003)(396003)(39860400002)(376002)(346002)(451199015)(46966006)(40470700004)(36840700001)(356005)(82740400003)(81166007)(8676002)(54906003)(36860700001)(86362001)(40460700003)(83380400001)(4326008)(110136005)(41300700001)(70206006)(70586007)(5660300002)(426003)(44832011)(316002)(8936002)(4744005)(2906002)(82310400005)(2616005)(40480700001)(336012)(1076003)(26005)(478600001)(186003)(6666004)(47076005)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 07:15:48.9910 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6d88814-02ec-4da6-dbbc-08daf46cd4e2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7586 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230111_231554_179773_1AB44819 X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org TTC device can act either as clocksource/clockevent or PWM generator, it would be decided by pwm-cells property. TTC PWM feature would be supported through separate driver based on PWM framework. If pwm-cells property is present in TTC node, it would be treated as PWM device, and clocksource driver should just skip it. Signed-off-by: Mubin Sayyed --- drivers/clocksource/timer-cadence-ttc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/timer-cadence-ttc.c index 4efd0cf3b602..ba46649148b1 100644 --- a/drivers/clocksource/timer-cadence-ttc.c +++ b/drivers/clocksource/timer-cadence-ttc.c @@ -476,6 +476,9 @@ static int __init ttc_timer_probe(struct platform_device *pdev) u32 timer_width = 16; struct device_node *timer = pdev->dev.of_node; + if (of_property_read_bool(timer, "#pwm-cells")) + return -ENODEV; + if (initialized) return 0;