X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Famcc%2Ftaishan%2Flcd.c;h=124b81ee0bca73e9ca72e6a65a9b6502eea22eef;hb=1655f9f6c73c2b4b5d3f3b3c8aab999c194d8486;hp=6a049dfbadcd44b1bb239f2f87151b98dc77effc;hpb=54841ab50c20d6fa6c9cc3eb826989da3a22d934;p=u-boot diff --git a/board/amcc/taishan/lcd.c b/board/amcc/taishan/lcd.c index 6a049dfbad..124b81ee0b 100644 --- a/board/amcc/taishan/lcd.c +++ b/board/amcc/taishan/lcd.c @@ -2,23 +2,7 @@ * (C) Copyright 2007 * Stefan Roese, DENX Software Engineering, sr@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 @@ -35,8 +19,6 @@ #define LCD_DATA_ADDR ((volatile char *)(CONFIG_SYS_EBC2_LCM_BASE+1)) #define LCD_BLK_CTRL ((volatile char *)(CONFIG_SYS_EBC1_FPGA_BASE+0x2)) -#define mdelay(t) ({unsigned long msec=(t); while (msec--) { udelay(1000);}}) - static int g_lcd_init_b = 0; static char *amcc_logo = " AMCC TAISHAN 440GX EvalBoard"; static char addr_flag = 0x80; @@ -166,19 +148,17 @@ static int do_lcd_clear(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv } static int do_lcd_puts(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { - if (argc < 2) { - cmd_usage(cmdtp); - return 1; - } + if (argc < 2) + return cmd_usage(cmdtp); + lcd_puts(argv[1]); return 0; } static int do_lcd_putc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { - if (argc < 2) { - cmd_usage(cmdtp); - return 1; - } + if (argc < 2) + return cmd_usage(cmdtp); + lcd_putc((char)argv[1][0]); return 0; } @@ -188,10 +168,8 @@ static int do_lcd_cur(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[] ulong dir; char cur_addr; - if (argc < 3) { - cmd_usage(cmdtp); - return 1; - } + if (argc < 3) + return cmd_usage(cmdtp); count = simple_strtoul(argv[1], NULL, 16); if (count > 31) {