From patchwork Tue May 16 11:00:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niklas Schnelle X-Patchwork-Id: 94655 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp359280vqo; Tue, 16 May 2023 04:43:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yVl0JmlJi0V0N3i2CGi6HYJ6UUYQz4cHrbbpEbwF1xQc1RY3IwGGRjuNpjatWvjU0+eJs X-Received: by 2002:a05:6a00:1a09:b0:63b:7119:64a9 with SMTP id g9-20020a056a001a0900b0063b711964a9mr46520961pfv.16.1684237389400; Tue, 16 May 2023 04:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684237389; cv=none; d=google.com; s=arc-20160816; b=kWPIMNCGhhiURH+P0MiHg/+t0LyfKa2a9mDtyNcUPHFdP1yUPgXSQxePX1a8Mr3Fjp wYLGWPGUR1mYa2FhVx3nb6ZFEEDQuxFwrSmUpEk+xHChSNz6L21e0tDOweTlPruA/LbI qLAcMgnOcead1p0yTxVqkkOQZ/pxnSm0BHz5i3Qyj0kfjrxaKUF+5K4tBU7XPee0LHEd D+mWtep0UkdcUOVUg3fMKt2lIaV+izkHPsUWenuxPqgD8wvnS9PvcMPN+4IJMQBZjmMt bfLXOr4XDOCt06YILYqpS4ckf2+NcTfcgEmvMbkjN8mXem3LKARP9v4QTWWGtnks+097 qUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OHDQiiEJroO0i+y82hrgSvcy7FLDy/xxm28oD5scI9A=; b=OqwTixm0ljJncqaeWP1lU3Wsa2h4nuYNMLN4AAUb4pNmWR/27fhazYeYxW8SBopcRg J8yvBhMB7LCYo9sOoGPGSOuKACuQNpyBuqogSQL0xwKJCV9FwGPoHQ7bNf614CjHLC2e 3HAnwK+vrPVWDXHcDcgRDJwnRCpflzz0M8pZMmOb32IaaKET47JTFOW9DrF3Uw77rsDH Efkm3IBPIgFHBNdOTi+esOp0H2PcZg57e+JxVFZ9q6mtAw/sRMIatzWGy1KsO0SUo07h h9UPMTrF9wxTRxQ0FaNkybe5I33PDW/2FKWXXkTIPLI1vkid5ln5YHINDtKeSY3x3OZj ex1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=d4oOyb+u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f29-20020a63381d000000b0051f17a517adsi19645991pga.492.2023.05.16.04.42.56; Tue, 16 May 2023 04:43:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=d4oOyb+u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232756AbjEPLEf (ORCPT + 99 others); Tue, 16 May 2023 07:04:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232704AbjEPLEA (ORCPT ); Tue, 16 May 2023 07:04:00 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50AEB76B1; Tue, 16 May 2023 04:02:03 -0700 (PDT) Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34GAqubG008652; Tue, 16 May 2023 11:01:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=OHDQiiEJroO0i+y82hrgSvcy7FLDy/xxm28oD5scI9A=; b=d4oOyb+urNbv4NnIHFxSpFXGPAWlQUKoJZ5q6AUueUY22R8dAnOQs4o6cd+Eq1QqXrHN zVoEgukcuadeRETmubrUq7tkV5Ib8x+dpiPLNEO4xMChtmc8Mxco4KmQm3WcY8KEyJs0 r1bJcBOTyTjs/Bj1/pcjKYjotm/irIcNMWxuGrEF4Er6cMLpj+fAfgCZhgH4PJdL8vHz qgSwJya1XgYkGIbIf0agj2pjsqvTrz6tKmVj4GJ1Jd4gO1LaAUnYZhnLQAv8TH8tAfWd MaUbVI2PgfcSv0/NaEGkDhvudZloE0KQCmM3q2fx1OGtiJkVautgtjaP0j8onMskBanJ EQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qm8fbg73w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 11:01:20 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34GAwNMt029904; Tue, 16 May 2023 11:01:19 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qm8fbg72a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 11:01:19 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34G4ZOP8014025; Tue, 16 May 2023 11:01:16 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3qj264sjvp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 11:01:16 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34GB1D2l22413898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 May 2023 11:01:13 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1EF1A20063; Tue, 16 May 2023 11:01:13 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B8BF72004B; Tue, 16 May 2023 11:01:12 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 May 2023 11:01:12 +0000 (GMT) From: Niklas Schnelle To: Arnd Bergmann , Helge Deller Cc: Greg Kroah-Hartman , Bjorn Helgaas , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Mauro Carvalho Chehab , Alan Stern , "Rafael J. Wysocki" , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 37/41] fbdev: atyfb: Remove unused clock determination Date: Tue, 16 May 2023 13:00:33 +0200 Message-Id: <20230516110038.2413224-38-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516110038.2413224-1-schnelle@linux.ibm.com> References: <20230516110038.2413224-1-schnelle@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 1yaS_CGaroKGuNMhMhwrIJKLlrHZkWea X-Proofpoint-GUID: 3Sv0jLznQWCfM5wFfxteAoWtQqAbwtHk X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-16_04,2023-05-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxscore=0 clxscore=1015 adultscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305160089 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766050904841552067?= X-GMAIL-MSGID: =?utf-8?q?1766050904841552067?= Just below the removed lines par->clk_wr_offset is hard coded to 3 so there is no use in determining a different clock just to then ignore it anyway. This also removes the only I/O port use remaining in the driver allowing it to be built without CONFIG_HAS_IOPORT. Link: https://lore.kernel.org/all/ZBx5aLo5h546BzBt@intel.com/ Suggested-by: Ville Syrjälä Signed-off-by: Niklas Schnelle Reviewed-by: Ville Syrjälä --- Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so per-subsystem patches may be applied independently drivers/video/fbdev/aty/atyfb_base.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index b02e4e645035..cba2b113b28b 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -3498,11 +3498,6 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, if (ret) goto atyfb_setup_generic_fail; #endif - if (!(aty_ld_le32(CRTC_GEN_CNTL, par) & CRTC_EXT_DISP_EN)) - par->clk_wr_offset = (inb(R_GENMO) & 0x0CU) >> 2; - else - par->clk_wr_offset = aty_ld_8(CLOCK_CNTL, par) & 0x03U; - /* according to ATI, we should use clock 3 for acelerated mode */ par->clk_wr_offset = 3;