예제 #1
0
/* miscellaneous platform dependent initialisations */
int misc_init_r(void)
{
#if defined(CONFIG_CMD_NET)
	char nid[32];
	unsigned char *pMACaddr = (unsigned char *)0x203F0000;

	/* The 0xFF check here is to make sure we don't use the address
	 * in flash if it's simply been erased (aka all 0xFF values) */
	if (getenv("ethaddr") == NULL && is_valid_ether_addr(pMACaddr)) {
		sprintf(nid, "%02x:%02x:%02x:%02x:%02x:%02x",
			pMACaddr[0], pMACaddr[1],
			pMACaddr[2], pMACaddr[3], pMACaddr[4], pMACaddr[5]);
		setenv("ethaddr", nid);
	}
#endif

#if defined(CONFIG_BFIN_IDE)
#if defined(CONFIG_BFIN_TRUE_IDE)
	/* Enable ATASEL when in True IDE mode */
	printf("Using CF True IDE Mode\n");
	cf_outb(0, (unsigned char *)CONFIG_CF_ATASEL_ENA);
	udelay(1000);
#elif defined(CONFIG_BFIN_CF_IDE)
	/* Disable ATASEL when we're in Common Memory Mode */
	printf("Using CF Common Memory Mode\n");
	cf_outb(0, (unsigned char *)CONFIG_CF_ATASEL_DIS);
	udelay(1000);
#elif defined(CONFIG_BFIN_HDD_IDE)
	printf("Using HDD IDE Mode\n");
#endif
	ide_init();
#endif				/* CONFIG_BFIN_IDE */
	return 0;
}
예제 #2
0
파일: ide-cf.c 프로젝트: 01hyang/u-boot
void cf_ide_init(void)
{
#if defined(CONFIG_BFIN_TRUE_IDE)
	/* Enable ATASEL when in True IDE mode */
	printf("Using CF True IDE Mode\n");
	cf_outb(0, (unsigned char *)CONFIG_CF_ATASEL_ENA);
	udelay(1000);
#elif defined(CONFIG_BFIN_CF_IDE)
	/* Disable ATASEL when we're in Common Memory Mode */
	printf("Using CF Common Memory Mode\n");
	cf_outb(0, (unsigned char *)CONFIG_CF_ATASEL_DIS);
	udelay(1000);
#elif defined(CONFIG_BFIN_HDD_IDE)
	printf("Using HDD IDE Mode\n");
#endif
	ide_init();
}
예제 #3
0
int misc_init_r(void)
{
#if defined(CONFIG_BFIN_IDE)
#if defined(CONFIG_BFIN_CF_IDE)
 /*Disable ATASEL when we're in Common Memory Mode*/
	cf_outb(0, CONFIG_CF_ATASEL_DIS);
	udelay(1000);
#endif
	ide_init();
#endif
	return 0;
}