m68k: stmark2: use ioport.h macros for resources

Change resource declaration using DEFINE_RES_*() macros.
DEFINE_DMA_RES() is for a single dma channel, not a range, so used twice.

Also, some drivers assume IRQ resources are from index 1, so just to stay
uniform, moved IRQ resource at index 1.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
Angelo Dureghello 2026-06-10 22:35:11 +02:00 committed by Greg Ungerer
parent 9cacf00c83
commit fed0dbb659

View File

@ -8,6 +8,7 @@
* for more details.
*/
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
@ -62,21 +63,10 @@ static struct fsl_dspi_platform_data dspi_spi0_info = {
};
static struct resource dspi_spi0_resource[] = {
[0] = {
.start = MCFDSPI_BASE0,
.end = MCFDSPI_BASE0 + 0xFF,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 12,
.end = 13,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = MCF_IRQ_DSPI0,
.end = MCF_IRQ_DSPI0,
.flags = IORESOURCE_IRQ,
},
DEFINE_RES_MEM(MCFDSPI_BASE0, 0x100),
DEFINE_RES_IRQ(MCF_IRQ_DSPI0),
DEFINE_RES_DMA(12),
DEFINE_RES_DMA(13),
};
static u64 stmark2_dspi_mask = DMA_BIT_MASK(32);