]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - examples/standalone/timer.c
fw_env: calculate default number of env sectors
[karo-tx-uboot.git] / examples / standalone / timer.c
index 834cc9a49ef2690d82356c3f679b8df619ed1ec3..dbd5c16f97f8a16402bdfe050eebc331e5a326ca 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -113,7 +97,7 @@ typedef struct tid_8xx_cpmtimer_s {
 
 void setPeriod (tid_8xx_cpmtimer_t *hwp, ulong interval);
 
-static char *usage = "\n[q, b, e, ?] ";
+static const char usage[] = "\n[q, b, e, ?] ";
 
 int timer (int argc, char * const argv[])
 {
@@ -186,7 +170,7 @@ int timer (int argc, char * const argv[])
        /* clear all events */
        *hwp->terp = (CPMT_EVENT_CAP | CPMT_EVENT_REF);
 
-       printf (usage);
+       puts(usage);
        running = 0;
        while ((c = getc()) != 'q') {
            if (c == 'b') {
@@ -255,7 +239,7 @@ int timer (int argc, char * const argv[])
            } else {
                printf ("\nEnter: q - quit, b - start timer, e - stop timer, ? - get status\n");
            }
-           printf (usage);
+           puts(usage);
        }
        if (running) {
                printf ("Stopping timer\n");