Skip to content
Snippets Groups Projects
Select Git revision
  • 52a7c98a1772859131ca2018d0ab591a1e0e95c9
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
8 results

psci.h

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    cmd_mem.c 28.47 KiB
    /*
     * (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
     */
    
    /*
     * Memory Functions
     *
     * Copied from FADS ROM, Dan Malek (dmalek@jlc.net)
     */
    
    #include <common.h>
    #include <command.h>
    #if defined(CONFIG_CMD_MMC)
    #include <mmc.h>
    #endif
    #ifdef CONFIG_HAS_DATAFLASH
    #include <dataflash.h>
    #endif
    #include <watchdog.h>
    
    #if defined(CONFIG_CMD_MEMORY)		\
        || defined(CONFIG_CMD_I2C)		\
        || defined(CONFIG_CMD_ITEST)	\
        || defined(CONFIG_CMD_PCI)		\
        || defined(CONFIG_CMD_PORTIO)
    
    int cmd_get_data_size(char* arg, int default_size)
    {
    	/* Check for a size specification .b, .w or .l.
    	 */
    	int len = strlen(arg);
    	if (len > 2 && arg[len-2] == '.') {
    		switch(arg[len-1]) {
    		case 'b':
    			return 1;
    		case 'w':
    			return 2;
    		case 'l':
    			return 4;
    		case 's':
    			return -2;
    		default:
    			return -1;
    		}
    	}
    	return default_size;
    }
    #endif
    
    #if defined(CONFIG_CMD_MEMORY)