Beispiel #1
0
static void SmiSetRegs (void)
{
	/*
	 * The content of the chipset register depends on the board (clocks,
	 * ...)
	 */
	SMI_REGS *preg;
	preg = board_get_regs();
	while (preg->Index) {
		write32 (preg->Index, preg->Value);
		/*
		 * Insert a delay between
		 */
		delay(5);
		preg ++;
	}		
#ifdef DEVBD2F_SM502
#ifdef USE_SM502_UART0
	{
		unsigned int a,b;
		a = *(unsigned int *)(0xb6000040);
		a = a|(0xc0);
		*(unsigned int *)(0xb6000040) = a;
		b = *(unsigned int *)(0xb600000c);
		b = b|(0x1e0);
		*(unsigned int *)(0xb600000c) = b;
		
	}
#endif
if(getenv("sm502_rgb12"))
write32(0x80000,0x0f413105); // bit22-21=10b: 12-bit RGB 4:4:4.
#endif
		
}
static void board_disp_init(void)
{
	GraphicDevice *pGD = (GraphicDevice *)&mb862xx;
	const gdc_regs *regs = board_get_regs ();

	while (regs->index) {
		DISP_WR_REG (regs->index, regs->value);
		regs++;
	}
}
Beispiel #3
0
/*-----------------------------------------------------------------------------
 * SmiSetRegs --
 *-----------------------------------------------------------------------------
 */
static void SmiSetRegs (void)
{
    /*
     * The content of the chipset register depends on the board (clocks,
     * ...)
     */
    const SMI_REGS *preg = board_get_regs ();
    while (preg->Index) {
        write32 (preg->Index, preg->Value);
        /*
         * Insert a delay between
         */
        udelay (1000);
        preg ++;
    }
}
Beispiel #4
0
/*
 * This function is called from the SPL U-Boot version for
 * early init stuff, that needs to be done for OS (e.g. Linux)
 * booting. Doing it later in the real U-Boot would not work
 * in case that the SPL U-Boot boots Linux directly.
 */
void spl_board_init(void)
{
	const gdc_regs *regs = board_get_regs();

	/*
	 * Setup PFC registers, mainly for ethernet support
	 * later on in Linux
	 */
	board_early_init_f();

	/* enable the LSB transmitter */
	gpio_write_bit(CONFIG_SYS_GPIO_LSB_ENABLE, 1);

	/*
	 * Clear resets
	 */
	mtsdr(SDR0_SRST1, 0x00000000);
	mtsdr(SDR0_SRST0, 0x00000000);

	/*
	 * Reset Lime controller
	 */
	gpio_write_bit(CONFIG_SYS_GPIO_LIME_S, 1);
	udelay(500);
	gpio_write_bit(CONFIG_SYS_GPIO_LIME_RST, 1);

	out_be32((void *)CONFIG_SYS_LIME_SDRAM_CLOCK, CONFIG_SYS_MB862xx_CCF);
	udelay(300);
	out_be32((void *)CONFIG_SYS_LIME_MMR, CONFIG_SYS_MB862xx_MMR);

	while (regs->index) {
		out_be32((void *)(CONFIG_SYS_LIME_BASE_0 + GC_DISP_BASE) +
			 regs->index, regs->value);
		regs++;
	}

	board_backlight_brightness(DEFAULT_BRIGHTNESS);
}