Пример #1
0
static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
    ulong addr;
    int x = 0, y = 0;

    switch (argc) {
    case 1:		/* use load_addr as default address */
        addr = load_addr;
        break;
    case 2:		/* use argument */
        addr = simple_strtoul(argv[1], NULL, 16);
        x = -1;
        y = -1;
        break;
    case 4:
        addr = simple_strtoul(argv[1], NULL, 16);
        x = simple_strtoul(argv[2], NULL, 10);
        y = simple_strtoul(argv[3], NULL, 10);
        break;
    default:
        cmd_usage(cmdtp);
        return 1;
    }

    return (bmp_display(addr, x, y));
}
Пример #2
0
static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
	ulong addr;
	int x = 0, y = 0;

	splash_get_pos(&x, &y);

	switch (argc) {
	case 1:		/* use load_addr as default address */
		addr = load_addr;
		break;
	case 2:		/* use argument */
		addr = simple_strtoul(argv[1], NULL, 16);
		break;
	case 4:
		addr = simple_strtoul(argv[1], NULL, 16);
		x = simple_strtoul(argv[2], NULL, 10);
		y = simple_strtoul(argv[3], NULL, 10);
		break;
	default:
		return CMD_RET_USAGE;
	}

	 return (bmp_display(addr, x, y));
}
Пример #3
0
/*
 * Subroutine:  do_bmp
 *
 * Description: Handler for 'bmp' command..
 *
 * Inputs:	argv[1] contains the subcommand
 *
 * Return:      None
 *
 */
int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	ulong addr;
	int x = 0, y = 0;

	switch (argc) {
	case 2:		/* use load_addr as default address */
		addr = load_addr;
		break;
	case 3:		/* use argument */
		addr = simple_strtoul(argv[2], NULL, 16);
		break;
	case 5:
		addr = simple_strtoul(argv[2], NULL, 16);
	        x = simple_strtoul(argv[3], NULL, 10);
	        y = simple_strtoul(argv[4], NULL, 10);
	        break;
	default:
		printf ("Usage:\n%s\n", cmdtp->usage);
		return 1;
	}

	/* Allow for short names
	 * Adjust length if more sub-commands get added
	 */
	if (strncmp(argv[1],"info",1) == 0) {
		return (bmp_info(addr));
	} else if (strncmp(argv[1],"display",1) == 0) {
	    return (bmp_display(addr, x, y));
	} else {
		printf ("Usage:\n%s\n", cmdtp->usage);
		return 1;
	}
}
Пример #4
0
int board_init(void)
{
	gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;

#ifdef CONFIG_ETH_DESIGNWARE
	const char *phy_mode;
	int node;

	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,stm32-dwmac");
	if (node < 0)
		return -1;

	phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);

	switch (phy_get_interface_by_name(phy_mode)) {
	case PHY_INTERFACE_MODE_RMII:
		STM32_SYSCFG->pmc |= SYSCFG_PMC_MII_RMII_SEL;
		break;
	case PHY_INTERFACE_MODE_MII:
		STM32_SYSCFG->pmc &= ~SYSCFG_PMC_MII_RMII_SEL;
		break;
	default:
		printf("PHY interface %s not supported !\n", phy_mode);
	}
#endif

#if defined(CONFIG_CMD_BMP)
	bmp_display((ulong)stmicroelectronics_uboot_logo_8bit_rle,
		    BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
#endif /* CONFIG_CMD_BMP */

	return 0;
}
Пример #5
0
int lcd_splash(ulong addr)
{
	int x = 0, y = 0, ret;

	ret = splash_screen_prepare();
	if (ret)
		return ret;

	splash_get_pos(&x, &y);

	return bmp_display(addr, x, y);
}
Пример #6
0
int board_init(void)
{
	gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;

#ifdef CONFIG_ETH_DESIGNWARE
	/* Set >RMII mode */
	STM32_SYSCFG->pmc |= SYSCFG_PMC_MII_RMII_SEL;
#endif

#if defined(CONFIG_CMD_BMP)
	bmp_display((ulong)stmicroelectronics_uboot_logo_8bit_rle,
		    BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
#endif /* CONFIG_CMD_BMP */

	return 0;
}