From patchwork Tue Apr 17 14:13:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10345197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4BC3A60216 for ; Tue, 17 Apr 2018 14:13:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4557A283CB for ; Tue, 17 Apr 2018 14:13:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3962E28417; Tue, 17 Apr 2018 14:13:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A813E283CB for ; Tue, 17 Apr 2018 14:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649AbeDQONb (ORCPT ); Tue, 17 Apr 2018 10:13:31 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:57159 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbeDQON3 (ORCPT ); Tue, 17 Apr 2018 10:13:29 -0400 Received: from w540.sssup.it (nat-wifi.sssup.it [193.205.81.22]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 1075B20000E; Tue, 17 Apr 2018 16:13:25 +0200 (CEST) From: Jacopo Mondi To: ysato@users.sourceforge.jp, dalias@libc.org Cc: Jacopo Mondi , geert@linux-m68k.org, linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sh: migor: Set DMA and DMA coherent mask Date: Tue, 17 Apr 2018 16:13:13 +0200 Message-Id: <1523974393-10870-1-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no coherent_dma_mask") the Migo-R platform devices registered without a DMA mask and coherent DMA mask issue the following warning WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 0x40159e20 Set dma mask and coherent DMA mask for Migo-R platforms devices to 32 bits as all other SH4a platforms do. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven --- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 6b3a26e..3fe1ea7 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -7,6 +7,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ +#include #include #include #include @@ -347,6 +348,8 @@ static struct platform_device vpu_device = { .name = "uio_pdrv_genirq", .id = 0, .dev = { + .dma_mask = &vpu_device.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &vpu_platform_data, }, .resource = vpu_resources, @@ -375,6 +378,8 @@ static struct platform_device veu_device = { .name = "uio_pdrv_genirq", .id = 1, .dev = { + .dma_mask = &veu_device.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &veu_platform_data, }, .resource = veu_resources, @@ -403,6 +408,8 @@ static struct platform_device jpu_device = { .name = "uio_pdrv_genirq", .id = 2, .dev = { + .dma_mask = &jpu_device.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &jpu_platform_data, }, .resource = jpu_resources,