Messages in this thread Patch in this message |  | | From | Angelo Dureghello <> | | Date | Mon, 04 May 2026 19:16:46 +0200 | | Subject | [PATCH 08/10] m68k: stmark2: add mcf5441x DAC platform devices |
| |
From: Angelo Dureghello <adureghello@baylibre.com>
Add mcf5441x DAC platform devices.
Signed-off-by: Angelo Dureghello <adureghello@baylibre.com> --- arch/m68k/coldfire/stmark2.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/arch/m68k/coldfire/stmark2.c b/arch/m68k/coldfire/stmark2.c index 85502b81175e..30da9bcbfd63 100644 --- a/arch/m68k/coldfire/stmark2.c +++ b/arch/m68k/coldfire/stmark2.c @@ -94,8 +94,42 @@ static struct platform_device dspi_spi0_device = { }, }; +static struct resource dspi_dac0_resource[] = { + [0] = { + .start = MCFDAC_BASE0, + .end = MCFDAC_BASE0 + 0xFF, + .flags = IORESOURCE_MEM, + }, +}; + +/* DAC controller, id = bus number */ +static struct platform_device dac0_device = { + .name = "mcf54415_dac", + .id = 0, + .num_resources = ARRAY_SIZE(dspi_dac0_resource), + .resource = dspi_dac0_resource, +}; + +static struct resource dspi_dac1_resource[] = { + [0] = { + .start = MCFDAC_BASE1, + .end = MCFDAC_BASE1 + 0xFF, + .flags = IORESOURCE_MEM, + }, +}; + +/* DAC controller, id = bus number */ +static struct platform_device dac1_device = { + .name = "mcf54415_dac", + .id = 1, + .num_resources = ARRAY_SIZE(dspi_dac1_resource), + .resource = dspi_dac1_resource, +}; + static struct platform_device *stmark2_devices[] __initdata = { &dspi_spi0_device, + &dac0_device, + &dac1_device, }; /* -- 2.54.0
|  |