X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Famcc%2Fmakalu%2Fcmd_pll.c;h=f12655bea2f1af5a89ae8046296a1cd631b80f3e;hb=d4db3b86a5e090e21db710bedbbe3e50d4c56428;hp=0f571fefed748d34b914d8fde38d22833426e18d;hpb=50bd0057ba8fceeb48533f8b1a652ccd0e170838;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/amcc/makalu/cmd_pll.c b/board/amcc/makalu/cmd_pll.c index 0f571fe..f12655b 100644 --- a/board/amcc/makalu/cmd_pll.c +++ b/board/amcc/makalu/cmd_pll.c @@ -2,24 +2,7 @@ * (C) Copyright 2000, 2001 * 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+ */ /* @@ -178,18 +161,18 @@ test_write(void) } int -do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char c = '\0'; pll_freq_t pll_freq; - if (argc < 2) { - printf("Usage: \n%s\n", cmdtp->usage); - goto ret; - } - for (pll_freq = PLL_ebc20; pll_freq < PLL_TOTAL; pll_freq++) + if (argc < 2) + return cmd_usage(cmdtp); + + for (pll_freq = PLL_ebc20; pll_freq < PLL_TOTAL; pll_freq++) { if (!strcmp(pll_name[pll_freq], argv[1])) break; + } switch (pll_freq) { case PLL_ebc20: @@ -222,9 +205,8 @@ do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) goto ret; default: - printf("Invalid options" - "\n\nUsage: \n%s\n", cmdtp->usage); - goto ret; + printf("Invalid options\n\n"); + return cmd_usage(cmdtp); } printf("PLL set to %s, " @@ -237,7 +219,7 @@ ret: U_BOOT_CMD( pllalter, CONFIG_SYS_MAXARGS, 1, do_pll_alter, - "pllalter- change pll frequence \n", + "change pll frequence", "pllalter - change pll frequence \n\n\ ** New freq take effect after reset. ** \n\ ----------------------------------------------\n\ @@ -291,7 +273,7 @@ U_BOOT_CMD( RCONF: Read current eeprom configuration. \n\ -----------------------------------------------\n\ WTEST: Test EEPROM write with predefined values\n\ - -----------------------------------------------\n" - ); + -----------------------------------------------" +); #endif /* CONFIG_CMD_EEPROM */