[PATCH v4] Terasic DE0-Nano-SoC: add support
Sascha Hauer
s.hauer at pengutronix.de
Tue Feb 2 00:03:58 PST 2016
On Mon, Feb 01, 2016 at 11:08:10AM -0800, Andrey Smirnov wrote:
> On Mon, Feb 1, 2016 at 8:09 AM, Tim Sander <tim at krieglstein.org> 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 |
More information about the barebox
mailing list