From patchwork Sat Aug 20 12:56:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12949678 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 99AB8C32774 for ; Sat, 20 Aug 2022 13:00:47 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C1zjvPA7e7h+EOypwTrF7sFTnkbhZpRDXf774zT3GxE=; b=TQQzTLfc9PwoKT qwFQbo3gB7W2PJjaiKbDW/7PPXVZT6G8+KJvebueIJaTb1bNcYVjvrT1zQLIKwz6CGV8J1rcfsPfI lBN1yOYd1H+Dm62LeEP513zzrfKqfI8+z1Qliu+518hHCcFeckUyj0QZulRlZketlfrEdyGSS6JNq jKkJ+o3d0maCyakJfKzxs/AsVyrRjxblQ3YR0eEPF+uUnuEXOEZTOzpi21CQhjmFafbt/P1+PJXD7 olWYcl0Izj6RdeKvSmULOKq/Dg656A0jxJvhRqmY3vS363hd7gGqa2ahhlAfhOjcLEn6Uo4gtlFzG 6JqFU+PJdR89IemCxpJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPO4m-00ADKI-Ru; Sat, 20 Aug 2022 12:59:44 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPO2z-00ACVp-2R for linux-arm-kernel@lists.infradead.org; Sat, 20 Aug 2022 12:57:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661000272; x=1692536272; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DANL4aKJSy65svgCcuzEytfERDJ+TNEuh4HmxezDpJ8=; b=nWKPnQZdHdEW2QBTHpbq7bWz/YOSWJ4A8kLET5jvxnPTeQ5xFXqdPaRv e76WAH823sz5dFtyU18D40DK9UZWX0Cfl+ViZyvnsHDVbRPoKCPlw1TYZ r0EbRZy3btFYPhPt3L+8p7i70koHPd3pFgNrooXlonvIkUL979ZNzUcOv EZQo87RakDa6tKNYpbkwr0eYrQj/d6fntjw1SgmJHRiOax60Bb03jvypl vvQRwf6VoKwZa5FA4XBHWS6/EwUixHVmHFhlAnfDmTMp67CqtqDZLg+GT 6MCD2jcgYbRejSkt03bNvByjLFoBnPrI7O2ewSTmIccqndw/2xaPXIlyb Q==; X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="187325452" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Aug 2022 05:57:46 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sat, 20 Aug 2022 05:57:46 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Sat, 20 Aug 2022 05:57:43 -0700 From: Tudor Ambarus To: , , , Subject: [PATCH 07/33] dmaengine: at_hdmac: Fix at_lli struct definition Date: Sat, 20 Aug 2022 15:56:51 +0300 Message-ID: <20220820125717.588722-8-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220820125717.588722-1-tudor.ambarus@microchip.com> References: <20220820125717.588722-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220820_055753_194057_808E1DC7 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. 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: , Cc: Tudor Ambarus , tudor.ambarus@microchip.com, linux-kernel@vger.kernel.org, maciej.sosnowski@intel.com, mripard@kernel.org, torfl6749@gmail.com, ludovic.desroches@microchip.com, stable@vger.kernel.org, dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Tudor Ambarus Those hardware registers are all of 32 bits, while dma_addr_t ca be of type u64 or u32 depending on CONFIG_ARCH_DMA_ADDR_T_64BIT. Force u32 to comply with what the hardware expects. Fixes: dc78baa2b90b ("dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller") Signed-off-by: Tudor Ambarus Cc: stable@vger.kernel.org --- drivers/dma/at_hdmac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 91e53a590d5f..e89facf14fab 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -187,13 +187,13 @@ /* LLI == Linked List Item; aka DMA buffer descriptor */ struct at_lli { /* values that are not changed by hardware */ - dma_addr_t saddr; - dma_addr_t daddr; + u32 saddr; + u32 daddr; /* value that may get written back: */ - u32 ctrla; + u32 ctrla; /* more values that are not changed by hardware */ - u32 ctrlb; - dma_addr_t dscr; /* chain to next lli */ + u32 ctrlb; + u32 dscr; /* chain to next lli */ }; /**