lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 09/10] m68k: stmark2: enable DACs outputs
From
Hi Angelo,

On 5/5/26 03:16, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> Enabled DAC0 and DAC1 outpus disabling shared ADC inputs on ADC3 and ADC7.
>
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
> ---
> arch/m68k/coldfire/stmark2.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/m68k/coldfire/stmark2.c b/arch/m68k/coldfire/stmark2.c
> index 30da9bcbfd63..8fdfb9415cd7 100644
> --- a/arch/m68k/coldfire/stmark2.c
> +++ b/arch/m68k/coldfire/stmark2.c
> @@ -137,6 +137,8 @@ static struct platform_device *stmark2_devices[] __initdata = {
> */
> static int __init init_stmark2(void)
> {
> + uint16_t val;
> +
> /* DSPI0, all pins as DSPI, and using CS1 */
> __raw_writeb(0x80, MCFGPIO_PAR_DSPIOWL);
> __raw_writeb(0xfc, MCFGPIO_PAR_DSPIOWH);
> @@ -149,6 +151,12 @@ static int __init init_stmark2(void)
> /* CAN pads */
> __raw_writeb(0x50, MCFGPIO_PAR_CANI2C);
>
> + /* Enable DAC0 and 1 */
> + val = __raw_readw(MCF_CCM_MISCCR2);
> + val &= ~(MCF_CCM_MISCCR2_ADC3_EN | MCF_CCM_MISCCR2_ADC7_EN);
> + val |= MCF_CCM_MISCCR2_DAC0_SEL | MCF_CCM_MISCCR2_DAC1_SEL;
> + __raw_writew(val, MCF_CCM_MISCCR2);
> +
> platform_add_devices(stmark2_devices, ARRAY_SIZE(stmark2_devices));
>
> spi_register_board_info(stmark2_board_info,

Same comment applies here with regards using mcfreadX/mcf_writeX as to the
driver itself. Uses of __raw_readX and __raw_writeX will be changed in the
very near future to use mcf_readX/mcf_writeX.

See the those patches at:
https://lore.kernel.org/linux-m68k/209d0653-6386-4b64-9e15-e358f84453ab@app.fastmail.com/T/#t

Regards
Greg



\
 
 \ /
  Last update: 2026-05-05 04:13    [W:0.213 / U:16.037 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog