From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQVwk-0002HZ-Nz for barebox@lists.infradead.org; Tue, 02 Feb 2016 08:04:23 +0000 Date: Tue, 2 Feb 2016 09:03:58 +0100 From: Sascha Hauer Message-ID: <20160202080358.GE4118@pengutronix.de> References: <2936535.PfmXjTYsqy@dabox> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v4] Terasic DE0-Nano-SoC: add support To: Andrey Smirnov Cc: "barebox@lists.infradead.org" , Steffen Trumtrar , Tim Sander On Mon, Feb 01, 2016 at 11:08:10AM -0800, Andrey Smirnov wrote: > On Mon, Feb 1, 2016 at 8:09 AM, Tim Sander wrote: > > v4: use the amended patch not the old one, doh. Sorry for the noise. > > > > +static inline void ledon(int led) > > +{ > > + u32 val; > > + > > + val = readl(0xFF709000); > > + val |= 1 << (led + 24); > > + writel(val, 0xFF709000); > > + > > + val = readl(0xFF709004); > > + val |= 1 << (led + 24); > > + writel(val, 0xFF709004); > > +} > > + > > +static inline void ledoff(int led) > > +{ > > + u32 val; > > + > > + val = readl(0xFF709000); > > + val &= ~(1 << (led + 24)); > > + writel(val, 0xFF709000); > > + > > + val = readl(0xFF709004); > > + val &= ~(1 << (led + 24)); > > + writel(val, 0xFF709004); > > +} > > Where are those "ledoff" and "ledon" functions used? I assume they are for early debugging and otherwise unused. It's ok to leave them here. Maybe add a comment why they are here, also some indication for valid led values would be nice. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox