예제 #1
0
void config_BSP(void)
{
#if defined(CONFIG_UCBOOTSTRAP)
	unsigned char *p;

	printk("Arcturus Networks Inc. uC5471DSP uCbootstrap system calls\n");
	printk("   Serial number: [%s]\n", getserialnum());

	p = gethwaddr(0);
	if (p == NULL) {
		memcpy (fec_hwaddr, "\0x00\0xde\0xad\0xbe\0xef\0x27", 6);
		p = fec_hwaddr;
		printk ("Warning: HWADDR0 not set in uCbootloader. Using default.\n");
	} else {
		memcpy (fec_hwaddr, p, 6);
	}
	printk("uCbootstrap eth addr 0 %02x:%02x:%02x:%02x:%02x:%02x\n",
		p[0], p[1], p[2], p[3], p[4], p[5]);

#endif
}
예제 #2
0
void config_BSP(char *commandp, int size)
{
	unsigned char *p;

#if 0
	volatile unsigned long	*pivrp;

	/* Set base of device vectors to be 64 */
	pivrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_PIVR);
	*pivrp = 0x40;
#endif

#ifdef CONFIG_BOOTPARAM
	strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
	commandp[size-1] = 0;
#elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
    defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
    defined(CONFIG_GILBARCONAP) || defined(CONFIG_SE1100) || \
	 defined(CONFIG_SCALES)
	/* Copy command line from FLASH to local buffer... */
	memcpy(commandp, (char *) 0xf0004000, size);
	commandp[size-1] = 0;
#elif defined(CONFIG_MTD_KeyTechnology)
	/* Copy command line from FLASH to local buffer... */
	memcpy(commandp, (char *) 0xffe06000, size);
	commandp[size-1] = 0;
#elif defined(CONFIG_CANCam)
	/* Copy command line from FLASH to local buffer... */
	memcpy(commandp, (char *) 0xf0010000, size);
	commandp[size-1] = 0;
#elif defined(CONFIG_PPCBOOT)
	do {
		char *bootargs = ppcboot_getenv("bootargs");
		if (bootargs)
			strncpy(commandp, bootargs, size);
	} while(0);
#elif defined (CONFIG_BOARD_UC5272)
	/* printk("\nColdfire uC5272 uCdimm support (c) 2002 Arcturus Networks Inc.\n"); */
#if defined(CONFIG_UC5272_PHY_INT)
	{
		/** ver 1.3 uCdimm and above have PHY interrupt on INT6 **/
		/* set GPIO to be INT6 instead - b30-31 => 01 */
		volatile unsigned int	*temp_ptr;

		/* Reset the ColdFire timer */
		temp_ptr = (volatile unsigned int *) (MCF_MBAR + MCFSIM_PACNT);
		*temp_ptr &= 0x3fffffff;
		*temp_ptr |= 0x40000000;
	}
#endif /* CONFIG_UC5272_PHY_INT */
 
#if defined(CONFIG_UCBOOTSTRAP)
	printk("uC5272 serial string [%s]\n", getserialnum());

	p = gethwaddr(0);
	memcpy (fec_hwaddr, p, 6);
	if (p == NULL) {
		memcpy (fec_hwaddr, "\0x00\0xde\0xad\0xbe\0xef\0x27", 6);
		p = fec_hwaddr;
		printk ("Warning: HWADDR0 not set in uCbootloader. Using default.\n");
	}
	printk("uCbootstrap eth addr 0 %02x:%02x:%02x:%02x:%02x:%02x\n",
		p[0], p[1], p[2], p[3], p[4], p[5]);

	p = gethwaddr(1);
	memcpy (cs8900a_hwaddr, p, 6);
	if (p == NULL) {
		memcpy (cs8900a_hwaddr, "\0x00\0xde\0xad\0xbe\0xef\0x28", 6);
		p = cs8900a_hwaddr;
		printk ("Warning: HWADDR1 not set in uCbootloader. Using default.\n");
	}
	printk("uCbootstrap eth addr 1 %02x:%02x:%02x:%02x:%02x:%02x\n",
		p[0], p[1], p[2], p[3], p[4], p[5]);

	p = getbenv("CONSOLE");
	if (p != NULL)
		sprintf(commandp, " console=%s", p);

	p = getbenv("APPEND");
	if (p != NULL)
		strcat(commandp, p);
#else
	memset(commandp, 0, size);
	sprintf (commandp, "ip=dhcp console=ttyS0");
#endif
#else
	memset(commandp, 0, size);
#endif

	mach_sched_init = coldfire_timer_init;
	mach_tick = coldfire_tick;
	mach_trap_init = coldfire_trap_init;
	mach_reset = coldfire_reset;
	mach_gettimeoffset = coldfire_timer_offset;

#ifdef CONFIG_DS1302
{
	extern int ds1302_set_clock_mmss(unsigned long);
	extern void ds1302_gettod(int *, int *, int *, int *, int *, int *);
	mach_set_clock_mmss = ds1302_set_clock_mmss;
	mach_gettod = ds1302_gettod;
}
#endif
}