Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6873790ybc; Thu, 28 Nov 2019 06:59:25 -0800 (PST) X-Google-Smtp-Source: APXvYqwOLOh28bWxCuFQP+Je1yG7AFYPBVY5Im8xZmhRKpeXwDIDg20YAxNyfgKkGjF5u8IGpDsm X-Received: by 2002:a50:f382:: with SMTP id g2mr857952edm.260.1574953164932; Thu, 28 Nov 2019 06:59:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953164; cv=none; d=google.com; s=arc-20160816; b=Q7nGpROEzAUZR9z9hbH9WdkRTLLZ//YgoQE1464Y0cdASfEH6QvoZW+NoVwb4+pIt1 nE+pYvS+Q2JfwUDBwSvi0wPt3rWu3j4SFgfsF3J6b/V5B/+B9AZI0KD/Z0PIhI5NTSVk TFoho24NonDdQ9SzJbp+eKUY5kokop9c7Ikxi9AVsyKmmYKmPE9IfrNK3R90MtfdevOp ZvrO8dcGnjmnqTjQkz2exiDy0mj36WMVrsYVBNeOZkh5K8Ujh4Wz1ATLMEuc3XelYCIX lerfBwdj9EpGHF1akb9Cw+jEODs6k3BCx707XgXnu42oXm/IMkQKHR6psCRhNcynyPqn uzjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=USinHcmv+ksGlMbxnbmLxuy0P66Q7HhR0AFEthjqY1w=; b=O5GmRrLnJp0n8HqxzkZVlj8C6E8MUwZUFmY1x/+GSJXX5H72Zbc6bEovHcLPnTmDVI s0L5IjcqXoKtboftu0SeKoz7Qa93lZjv8O81+4NhKhMqr2zOkdtSsbQwWq8HreUj+8aM 4en12UgJD0/lM96tCRTkknLv/UXg9MatIFMr4SzWpHREhLIW5mjeYHj/IQpO43gQxfck 25iEcD/1KzY8vxUbtgI0lQ9HR1xtKo38cwu+oca9modalSLxg5pry95DIXZ3q5V6c7O8 JcKbsIsSvSWM+Q22kqRaV+mnVCRjwrHxbnQ/uupnZLKonoxDkwz6ForG9YbD2SGcM5KH 71ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=eSJlsgRo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si13718099edj.417.2019.11.28.06.59.00; Thu, 28 Nov 2019 06:59:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=eSJlsgRo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbfK1O5f (ORCPT + 99 others); Thu, 28 Nov 2019 09:57:35 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39256 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727354AbfK1O5d (ORCPT ); Thu, 28 Nov 2019 09:57:33 -0500 Received: by mail-lj1-f196.google.com with SMTP id e10so19657906ljj.6 for ; Thu, 28 Nov 2019 06:57:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=USinHcmv+ksGlMbxnbmLxuy0P66Q7HhR0AFEthjqY1w=; b=eSJlsgRoqTynoxnNeBVf+IkwM63Ac9ztMdfQvsjRq5txZGy2t6QSH9CnnZBD6OwU/1 lTHMy3iujv02EGiXw6caHkTIq1GPRdwgs/vakISvyvy3Qg3GSi0krDWObXmh6NsbadOB 8i55Z4UFd0jKdGfVl09SKBp5q/JKGOoPvK+tM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=USinHcmv+ksGlMbxnbmLxuy0P66Q7HhR0AFEthjqY1w=; b=GoSxLSHN7NdWbUW2Ci8QG8v508sVOfC6udgnkz+qE/smVSKb7e8TB+VHM2RFccYb9J p/7IFGLUMgn5RZ/txpk32xIrmnVwZD0Rgo9Ub5W7uWNCNnNUMHwYiZYKhd1irQez6v/T cn4kApZSk0kmhmq+eQVvrFGVGFl7kW7m3Gr7EMnvF+VzmR8q+fJC7yDjKjGmTQFqugI8 NRpRrjKcz6AmM48qpt5BmC3PLt23psiFbRsEHjiX8jwn1cdlSBgVlRfQYceMWjOUe0F4 tz4Ia1oAaGtmn4RT5wzU/c4WYl8Y4UX/b7Xi0wsd06wxsUXD1PR8y3wyZBBjy8BCzmHK qbkQ== X-Gm-Message-State: APjAAAXVJoAKWBp8yfNQ5V+E2Ws/LTeH2nOYnDhc8Sw6mAR9F+5Yq5uf EmuOKyLWBkGtypFCAmkMtJ90xg== X-Received: by 2002:a2e:2a43:: with SMTP id q64mr35565201ljq.242.1574953050912; Thu, 28 Nov 2019 06:57:30 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id u2sm2456803lfl.18.2019.11.28.06.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 06:57:30 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Timur Tabi , Rasmus Villemoes Subject: [PATCH v6 20/49] soc: fsl: qe: simplify qe_ic_init() Date: Thu, 28 Nov 2019 15:55:25 +0100 Message-Id: <20191128145554.1297-21-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128145554.1297-1-linux@rasmusvillemoes.dk> References: <20191128145554.1297-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org qe_ic_init() takes a flags parameter, but all callers (including the sole remaining one) have always passed 0. So remove that parameter and simplify the body accordingly. We still explicitly initialize the Interrupt Configuration Register (CICR) to its reset value of all-zeroes, just in case the bootloader has played funny games. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_ic.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index 23b457e884d8..4832884da5bb 100644 --- a/drivers/soc/fsl/qe/qe_ic.c +++ b/drivers/soc/fsl/qe/qe_ic.c @@ -356,13 +356,13 @@ static void qe_ic_cascade_muxed_mpic(struct irq_desc *desc) chip->irq_eoi(&desc->irq_data); } -static void __init qe_ic_init(struct device_node *node, unsigned int flags) +static void __init qe_ic_init(struct device_node *node) { void (*low_handler)(struct irq_desc *desc); void (*high_handler)(struct irq_desc *desc); struct qe_ic *qe_ic; struct resource res; - u32 temp = 0, ret; + u32 ret; ret = of_address_to_resource(node, 0, &res); if (ret) @@ -399,26 +399,7 @@ static void __init qe_ic_init(struct device_node *node, unsigned int flags) high_handler = NULL; } - /* default priority scheme is grouped. If spread mode is */ - /* required, configure cicr accordingly. */ - if (flags & QE_IC_SPREADMODE_GRP_W) - temp |= CICR_GWCC; - if (flags & QE_IC_SPREADMODE_GRP_X) - temp |= CICR_GXCC; - if (flags & QE_IC_SPREADMODE_GRP_Y) - temp |= CICR_GYCC; - if (flags & QE_IC_SPREADMODE_GRP_Z) - temp |= CICR_GZCC; - if (flags & QE_IC_SPREADMODE_GRP_RISCA) - temp |= CICR_GRTA; - if (flags & QE_IC_SPREADMODE_GRP_RISCB) - temp |= CICR_GRTB; - - /* choose destination signal for highest priority interrupt */ - if (flags & QE_IC_HIGH_SIGNAL) - temp |= (SIGNAL_HIGH << CICR_HPIT_SHIFT); - - qe_ic_write(qe_ic->regs, QEIC_CICR, temp); + qe_ic_write(qe_ic->regs, QEIC_CICR, 0); irq_set_handler_data(qe_ic->virq_low, qe_ic); irq_set_chained_handler(qe_ic->virq_low, low_handler); @@ -439,7 +420,7 @@ static int __init qe_ic_of_init(void) if (!np) return -ENODEV; } - qe_ic_init(np, 0); + qe_ic_init(np); of_node_put(np); return 0; } -- 2.23.0