From nobody Sun Feb 8 12:52:12 2026 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 465371B7FC for ; Tue, 6 Feb 2024 20:33:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707251609; cv=none; b=k5vuOseXovWqeth1LIqxRv/9r4hHYdXSZwxJwpNCSyXvo+lzkj4B/HSlt42neUwWoR7B67vobxNbLCItfzyP9R9/J78hg8G3cs3l+SfsERQw7YK01uBVLBrXqCbIdd9pg8K23yjVF7izGBaZOXkWbniaYfDIzhf1eJ3zupRh6ss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707251609; c=relaxed/simple; bh=ItgJhdHJeveOYLjbW9w4wvk7BQRF9mDexdoZH4wLRiw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PoOMNix3MA1W49CsEEwDK9M6WjqOU11FcmLt1ZTTaOUtyPBXSrDZBkigYU629Kk5TAAiLIG7m4QODVHtmVGPobSQ284YaZTEA+DUOi9swJNrWFXUW5VixCM4TnLuIYGzt2+vL34IL+qYRqc4Qu+odoA1T4J9Ivp8LwQkPS6W1PU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=EkY94yBQ; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="EkY94yBQ" Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6e1352dd653so3843362a34.2 for ; Tue, 06 Feb 2024 12:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1707251605; x=1707856405; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ToIrT2LNCFz2XCRg0eJnPnbG0vGfFWVjjayhGrOFDO8=; b=EkY94yBQ/17WV9SnAFRzkkvIpo8WHX1S5qZkzMnoMoU9lx4C10t5JVowDN+y7bHu8s y1WPYfbqZExXJTYae1zc+0inCLg1FC+FTlr5DhFTsL1BwbJIeEIUipWUuXJgoaC9Qnqm 4cB1iD/YwkCqE+PCNeRID8TOXvnO4RYs2WJwR07c54ATxbJE+WPv34erwtK8+PpwMQ4E vSacuhGir3GrRcSVaU0Ay6qjQiK52obiUF5IVUMKa3UA4cZfBAUuYwSazmMmUKfbC8VK ZV8FeHyLKEXsEo/Lzh2KWyPpeAQ/oOPyYzLFVBD/4EOPXbOCMvd7uy1d0JBRM9Q8Mxp9 U4Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707251605; x=1707856405; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ToIrT2LNCFz2XCRg0eJnPnbG0vGfFWVjjayhGrOFDO8=; b=m2LuVTaIQBXGclu3LMbGqfaqbd0Az/XwqVOGKs12A8ZuXuQ28SVASxk6sQ3drK2QkP FEGIAy0oU1eZFVqvFMW6+Bmh1OSavP358FRo5YDkbjo6hEicW/93g2L2vyBy7TriI0KB rNPeFa3AOvAeQZTAb7qi8NEw7KHrAOcWZaTNG/MJRDXle73xkaUNVqsMosZATuWA6EuI Zqnq+qa42tx/WDvwwIyPlU6xj8SW8UoTzYSrVBf9UfWRJwlGyKFfu8z2Qa1z417yFZCV zMGONRbC6PW0PhpXSgFj3OUEpgZsTwZnHbmG3mMLQC+RIjr1fY2r6SHKpkIyE3xnrT6M 8Ohg== X-Gm-Message-State: AOJu0YxlU4akos0uXTGZGH6pmrcCxjnVUzYgTxeEeNfIKNhAHqGHSlQR yJCp45k+UTM+UQyHl5BlvmL5omQRKHOPwQI4LIoye69J8gIRE4vbOyCh37gO7ns= X-Google-Smtp-Source: AGHT+IFli3eoQbHi8ljIWhZSIhdzq2pphZL0q4BfQax91TId9zYgDzcFdhIPC9yjPkCChc1bG+2VYQ== X-Received: by 2002:a9d:75d1:0:b0:6e1:79a:fc8f with SMTP id c17-20020a9d75d1000000b006e1079afc8fmr4035185otl.35.1707251605352; Tue, 06 Feb 2024 12:33:25 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXNlKm8D9l7Atw2xTjsWSlxzc4CW5q/sF3Sc0WcWd9MNNvdSayLRhUki4yL1j3jMhNYqsUErjPlP/RWPygkggOk03aoCptb8LSZT3aBgAkviZNgzaAGhcjj/3SAgT53BknQH1Lu5jNredg6lEp+zedcP7dctbrCR2loSthQAta/H3NAXn0lbBjwMQQYRYTpczKJOw== Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id l2-20020a05683016c200b006e11d93ff09sm429581otr.72.2024.02.06.12.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 12:33:25 -0800 (PST) From: David Lechner To: linux-spi@vger.kernel.org Cc: David Lechner , Mark Brown , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] spi: axi-spi-engine: remove use of ida for sync id Date: Tue, 6 Feb 2024 14:31:27 -0600 Message-ID: <20240206-axi-spi-engine-round-2-1-v1-1-ea6eeb60f4fb@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206-axi-spi-engine-round-2-1-v1-0-ea6eeb60f4fb@baylibre.com> References: <20240206-axi-spi-engine-round-2-1-v1-0-ea6eeb60f4fb@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.12.4 Content-Transfer-Encoding: quoted-printable Profiling has shown that ida_alloc_range() accounts for about 10% of the time spent in spi_sync() when using the AXI SPI Engine controller. This call is used to create a unique id for each SPI message to match to an IRQ when the message is complete. Since the core SPI code serializes messages in a message queue, we can only have one message in flight at a time, namely host->cur_msg. This means that we can use a fixed value instead of a unique id for each message since there can never be more than one message pending at a time. This patch removes the use of ida for the sync id and replaces it with a constant value. This simplifies the driver and improves performance. Signed-off-by: David Lechner Reviewed-by: Nuno Sa --- drivers/spi/spi-axi-spi-engine.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-eng= ine.c index 6b0c72bf3395..9cc602075c17 100644 --- a/drivers/spi/spi-axi-spi-engine.c +++ b/drivers/spi/spi-axi-spi-engine.c @@ -57,6 +57,9 @@ #define SPI_ENGINE_TRANSFER_WRITE 0x1 #define SPI_ENGINE_TRANSFER_READ 0x2 =20 +/* Arbitrary sync ID for use by host->cur_msg */ +#define AXI_SPI_ENGINE_CUR_MSG_SYNC_ID 0x1 + #define SPI_ENGINE_CMD(inst, arg1, arg2) \ (((inst) << 12) | ((arg1) << 8) | (arg2)) =20 @@ -98,8 +101,6 @@ struct spi_engine_message_state { unsigned int rx_length; /** @rx_buf: Bytes not yet written to the RX FIFO. */ uint8_t *rx_buf; - /** @sync_id: ID to correlate SYNC interrupts with this message. */ - u8 sync_id; }; =20 struct spi_engine { @@ -109,7 +110,6 @@ struct spi_engine { spinlock_t lock; =20 void __iomem *base; - struct ida sync_ida; struct timer_list watchdog_timer; struct spi_controller *controller; =20 @@ -483,9 +483,7 @@ static irqreturn_t spi_engine_irq(int irq, void *devid) } =20 if (pending & SPI_ENGINE_INT_SYNC && msg) { - struct spi_engine_message_state *st =3D msg->state; - - if (completed_id =3D=3D st->sync_id) { + if (completed_id =3D=3D AXI_SPI_ENGINE_CUR_MSG_SYNC_ID) { if (timer_delete_sync(&spi_engine->watchdog_timer)) { msg->status =3D 0; msg->actual_length =3D msg->frame_length; @@ -510,10 +508,8 @@ static int spi_engine_prepare_message(struct spi_contr= oller *host, struct spi_message *msg) { struct spi_engine_program p_dry, *p; - struct spi_engine *spi_engine =3D spi_controller_get_devdata(host); struct spi_engine_message_state *st; size_t size; - int ret; =20 st =3D kzalloc(sizeof(*st), GFP_KERNEL); if (!st) @@ -531,18 +527,10 @@ static int spi_engine_prepare_message(struct spi_cont= roller *host, return -ENOMEM; } =20 - ret =3D ida_alloc_range(&spi_engine->sync_ida, 0, U8_MAX, GFP_KERNEL); - if (ret < 0) { - kfree(p); - kfree(st); - return ret; - } - - st->sync_id =3D ret; - spi_engine_compile_message(msg, false, p); =20 - spi_engine_program_add_cmd(p, false, SPI_ENGINE_CMD_SYNC(st->sync_id)); + spi_engine_program_add_cmd(p, false, SPI_ENGINE_CMD_SYNC( + AXI_SPI_ENGINE_CUR_MSG_SYNC_ID)); =20 st->p =3D p; st->cmd_buf =3D p->instructions; @@ -555,10 +543,8 @@ static int spi_engine_prepare_message(struct spi_contr= oller *host, static int spi_engine_unprepare_message(struct spi_controller *host, struct spi_message *msg) { - struct spi_engine *spi_engine =3D spi_controller_get_devdata(host); struct spi_engine_message_state *st =3D msg->state; =20 - ida_free(&spi_engine->sync_ida, st->sync_id); kfree(st->p); kfree(st); =20 @@ -640,7 +626,6 @@ static int spi_engine_probe(struct platform_device *pde= v) spi_engine =3D spi_controller_get_devdata(host); =20 spin_lock_init(&spi_engine->lock); - ida_init(&spi_engine->sync_ida); timer_setup(&spi_engine->watchdog_timer, spi_engine_timeout, TIMER_IRQSAF= E); spi_engine->controller =3D host; =20 --=20 2.43.0 From nobody Sun Feb 8 12:52:12 2026 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01FFE1B807 for ; Tue, 6 Feb 2024 20:33:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707251609; cv=none; b=qyk5iqdZy9jSWjqYFAa4ySfc/6B1VrNMl/4sMzm+AJYLPOmMQakyfKZ5FeB4T+IpjyNB84V/CjRw01oN/wagbmVoXkrxXR+obHEgiyCy+iU3G4o8xyUfOFgrPWmwB3plZr5GJ6SEaNIi1ElgfIMN95q/SsO13mIa2pbkMd7neek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707251609; c=relaxed/simple; bh=zV6UMa6KGS3460hptBgo8h2zveZj4vaThxc5kbb1euc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=A8VOgSoW7JcnNlH4W/LJOGNHOt/EnmgQtYlogaBtHaHa+402805RRhx65d+VMyChlKzU5B1CP5wRO5pbzjzlT4pOy36+tBx0/quEWIBefn3mnqrULI0nIWCCEGA+i6TBM1PSXHrIhQCMzxVYl9owXGVYn0zHvDKCFo4fPcSyOM4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=uNXpjRXu; arc=none smtp.client-ip=209.85.210.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="uNXpjRXu" Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-6e1149c16d4so2164552a34.3 for ; Tue, 06 Feb 2024 12:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1707251606; x=1707856406; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YfTOMRIgy5yUmp1Zi1mrOXV6NTegVTcyJrqWrXnDXfo=; b=uNXpjRXuSdTOAMczG5ehg8nEJRUSsmBl2egbaAmgfkpCErvlAYEHr8b352FcupFRI/ UXhBA9Jw1SM+ofjnymnO95qugGdn/douklZiU/AcaOt7QvX1D4FxgzC8J9GxM3TKGPqd Iw7rHvETzE/pV1pb0F4PilII5vCVOeFJTjV71wdJFsIme6QI9m8QwskF/tTqaN17Snrf JXdfZd57ksGUUTL2GzeWjl02CBleHt/O2vhPfRb+q3nJN/EwMWAMJx72ji2bjgifdL5j cAOUHOvXBRzD59dZGGTIyw0nwJ8I04xSJt0menMljtiN/qUxrASKhVspGuA7HvNTSq3v JhwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707251606; x=1707856406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YfTOMRIgy5yUmp1Zi1mrOXV6NTegVTcyJrqWrXnDXfo=; b=vW/8a8/b5+C3P3t6EYoxPX8QNVscqhFI8ovT/VNxrX3nNkQ2xAXX1P0NKfpaVEqOch 1NazcziA4tidJolu2p/3wh+E/jQIt01/GReNmcyTUyEyCmqPS8uij3Ofxg65+IYIM88R YMoFkOF+MOXskNgwprczvqmwzADm1qNFnKpJmn20AWLRWaAD3lTpjiF146jbH0iDjy8B iGX4A7phcrzfQac9jEsN8MuipT3yRxfBUo8vQ1Zz2s8J1cvXRE6Y6uS/JpF+QiBNcdjL rsvXylmAhdUP4Y2uUGD0m/QyyrweL9tty8ErROqrr2Mw3RGCiAR80C1ukJxFmQqxBnqk tLxw== X-Gm-Message-State: AOJu0YxRWiTFVoaq8pd6DCc7AN7peFx0FzDh+L3AMHW3EvDvT/Ks6qDe H5NsA0xkQoGfS+jE3xmIM8s043dXrBjevZhbNzPA29isNlzE8oeL9ZL/3sVU6H4= X-Google-Smtp-Source: AGHT+IGJf9ep/lPbbuizFAQfco/oZLYeI9cVSfpniFdRh+hPnl269EOax256xe26Om84BuZyOssTWQ== X-Received: by 2002:a9d:77d2:0:b0:6e0:f903:f7a6 with SMTP id w18-20020a9d77d2000000b006e0f903f7a6mr4073222otl.36.1707251606042; Tue, 06 Feb 2024 12:33:26 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV+uanjprraKmO3BJdbA8N8V3mZg3/e56x/S+A6o4ojIU2WsGbOoQVl0I9ozFPnU5QepvkfdTSsww7u4InLod8SgXN3j2jrCTvp2CLa+HMZhFUdVj22pGJIxuMYMU+JUEki6KNLWwe01zeKUHEF+s99igBfSGrU4txJtszHp+ndQ3XwYO7lwQ1Tmh/CM7n3+tKIXQ== Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id l2-20020a05683016c200b006e11d93ff09sm429581otr.72.2024.02.06.12.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 12:33:25 -0800 (PST) From: David Lechner To: linux-spi@vger.kernel.org Cc: David Lechner , Mark Brown , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] spi: axi-spi-engine: move msg finalization out of irq handler Date: Tue, 6 Feb 2024 14:31:28 -0600 Message-ID: <20240206-axi-spi-engine-round-2-1-v1-2-ea6eeb60f4fb@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206-axi-spi-engine-round-2-1-v1-0-ea6eeb60f4fb@baylibre.com> References: <20240206-axi-spi-engine-round-2-1-v1-0-ea6eeb60f4fb@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.12.4 Content-Transfer-Encoding: quoted-printable As a general principal, it is best to do as little as possible in an interrupt handler. This patch reworks the AXI SPI Engine driver to move timer_delete_sync() and spi_finalize_current_message() out of the interrupt handler. Instead, spi_finalize_current_message() is moved to the transfer_one_message function (similar to nearly all other SPI controllers). A completion is now used to wait for the sync interrupt that indicates that the message is complete. The watchdog timer is no longer needed since we can use the wait_for_completion_timeout() function to wait for the message to complete with the same effect. As a bonus, these changes also improve throughput of the SPI controller. For example, this was tested on a ZynqMP with a 80MHz SCLK reading 4 byte samples from an ADC. The max measured throughput increased from 26k to 28k samples per second. Signed-off-by: David Lechner Reviewed-by: Nuno Sa --- drivers/spi/spi-axi-spi-engine.c | 40 +++++++++++++++---------------------= ---- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-eng= ine.c index 9cc602075c17..3c96aa9232b3 100644 --- a/drivers/spi/spi-axi-spi-engine.c +++ b/drivers/spi/spi-axi-spi-engine.c @@ -6,6 +6,7 @@ */ =20 #include +#include #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include =20 #define SPI_ENGINE_REG_RESET 0x40 =20 @@ -110,9 +110,7 @@ struct spi_engine { spinlock_t lock; =20 void __iomem *base; - struct timer_list watchdog_timer; - struct spi_controller *controller; - + struct completion msg_complete; unsigned int int_enable; }; =20 @@ -484,11 +482,9 @@ static irqreturn_t spi_engine_irq(int irq, void *devid) =20 if (pending & SPI_ENGINE_INT_SYNC && msg) { if (completed_id =3D=3D AXI_SPI_ENGINE_CUR_MSG_SYNC_ID) { - if (timer_delete_sync(&spi_engine->watchdog_timer)) { - msg->status =3D 0; - msg->actual_length =3D msg->frame_length; - spi_finalize_current_message(host); - } + msg->status =3D 0; + msg->actual_length =3D msg->frame_length; + complete(&spi_engine->msg_complete); disable_int |=3D SPI_ENGINE_INT_SYNC; } } @@ -559,7 +555,7 @@ static int spi_engine_transfer_one_message(struct spi_c= ontroller *host, unsigned int int_enable =3D 0; unsigned long flags; =20 - mod_timer(&spi_engine->watchdog_timer, jiffies + msecs_to_jiffies(5000)); + reinit_completion(&spi_engine->msg_complete); =20 spin_lock_irqsave(&spi_engine->lock, flags); =20 @@ -581,21 +577,16 @@ static int spi_engine_transfer_one_message(struct spi= _controller *host, spi_engine->int_enable =3D int_enable; spin_unlock_irqrestore(&spi_engine->lock, flags); =20 - return 0; -} - -static void spi_engine_timeout(struct timer_list *timer) -{ - struct spi_engine *spi_engine =3D from_timer(spi_engine, timer, watchdog_= timer); - struct spi_controller *host =3D spi_engine->controller; - - if (WARN_ON(!host->cur_msg)) - return; + if (!wait_for_completion_timeout(&spi_engine->msg_complete, + msecs_to_jiffies(5000))) { + dev_err(&host->dev, + "Timeout occurred while waiting for transfer to complete. Hardware is p= robably broken.\n"); + msg->status =3D -ETIMEDOUT; + } =20 - dev_err(&host->dev, - "Timeout occurred while waiting for transfer to complete. Hardware is pr= obably broken.\n"); - host->cur_msg->status =3D -ETIMEDOUT; spi_finalize_current_message(host); + + return msg->status; } =20 static void spi_engine_release_hw(void *p) @@ -626,8 +617,7 @@ static int spi_engine_probe(struct platform_device *pde= v) spi_engine =3D spi_controller_get_devdata(host); =20 spin_lock_init(&spi_engine->lock); - timer_setup(&spi_engine->watchdog_timer, spi_engine_timeout, TIMER_IRQSAF= E); - spi_engine->controller =3D host; + init_completion(&spi_engine->msg_complete); =20 spi_engine->clk =3D devm_clk_get_enabled(&pdev->dev, "s_axi_aclk"); if (IS_ERR(spi_engine->clk)) --=20 2.43.0