Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nubus: Set default dma mask for nubus_board devices

A 32-bit mask is used by default because a NuBus slot has 32
address/data lines and a NuBus board is free to use all of them.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

authored by

Finn Thain and committed by
Geert Uytterhoeven
a8c5cb99 cf85d895

+3
+3
drivers/nubus/bus.c
··· 5 5 // Copyright (C) 2017 Finn Thain 6 6 7 7 #include <linux/device.h> 8 + #include <linux/dma-mapping.h> 8 9 #include <linux/list.h> 9 10 #include <linux/nubus.h> 10 11 #include <linux/seq_file.h> ··· 94 93 board->dev.release = nubus_device_release; 95 94 board->dev.bus = &nubus_bus_type; 96 95 dev_set_name(&board->dev, "slot.%X", board->slot); 96 + board->dev.dma_mask = &board->dev.coherent_dma_mask; 97 + dma_set_mask(&board->dev, DMA_BIT_MASK(32)); 97 98 return device_register(&board->dev); 98 99 } 99 100