From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B44971EB5CE for ; Tue, 5 May 2026 02:12:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.234.252.31 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777947170; cv=none; b=i+O16F6OQglu6cvPGb3Hrarew6JiHvsuYJPX5Ly6TzskqB11X8HMMZEEJucAX+LF+x1MsZddNsy31QQTfYdWocZz6gu1vn9O/UsAdQ8to+Sx+Ef8x82Da02UWtZyAuWYy8040+KNxnzG7MCHMpGQe3x6VATB7QNpuIBHzhWlsNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777947170; c=relaxed/simple; bh=oTEdrN/7wEq/G4o6w7TEl9WN9NPam86xKGBZiOofGdI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pBAf9ZqLLM6FdVBrDa/glfXlan7vCKiOUjK9w0KqM4iZXgPNLFR6xMqGvp0EbVDONWrmAjsQhLzkYs/EaHvuHzGIyc6+GvHeygFaWYtIPWVyjd5cDOXvtsipHQ9wH+x4xzUvcf1ESYrWVFqaJSt/uV0cQxtTWElqfA+jfGNisiM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass smtp.mailfrom=kernel.org; arc=none smtp.client-ip=172.234.252.31 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 715D143EB8; Tue, 5 May 2026 02:12:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A883C2BCC4; Tue, 5 May 2026 02:12:45 +0000 (UTC) Message-ID: <5cd0103e-50f0-4942-b0a5-2d9a9a722ec2@linux-m68k.org> Date: Tue, 5 May 2026 12:12:43 +1000 Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 09/10] m68k: stmark2: enable DACs outputs To: Angelo Dureghello , Geert Uytterhoeven , Steven King , Arnd Bergmann , Maxime Coquelin , Alexandre Torgue , Jonathan Cameron , David Lechner , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko Cc: Greg Ungerer , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org, Angelo Dureghello References: <20260504-wip-stmark2-dac-v1-0-874c36a4910d@baylibre.com> <20260504-wip-stmark2-dac-v1-9-874c36a4910d@baylibre.com> Content-Language: en-US From: Greg Ungerer In-Reply-To: <20260504-wip-stmark2-dac-v1-9-874c36a4910d@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Angelo, On 5/5/26 03:16, Angelo Dureghello wrote: > From: Angelo Dureghello > > Enabled DAC0 and DAC1 outpus disabling shared ADC inputs on ADC3 and ADC7. > > Signed-off-by: Angelo Dureghello > --- > 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