Пример #1
0
extern int board_init(void)
{
	configPIO();

#ifdef CONFIG_DRIVER_NET_STM_GMAC
#if defined(CONFIG_STMAC_IP101A)
	/*
	 * This is a work around for the problem that on parts with an
	 * IC+ IP101A, the pin marked as TX_ER_FXSD (AA23) is actually
	 * ISOL, which appears to be driven high at boot time despite the
	 * internal pull down in the IC+ IP101A.
	 * In MII mode this doesn't appear to be a problem because the
	 * STxH207 is driving the pin, and so it remains low, however
	 * just in case the GMAC were to assert this signal for whatever
	 * reason, we still treat it as a gpio pin.
	 * This w/a is *not* required on parts that use a IC+ IP101G.
	 */
	SET_PIO_PIN2(TX_ER_FXSD, STPIO_OUT);
	STPIO_SET_PIN2(TX_ER_FXSD, 0);		/* deassert ISOL */
#endif /* CONFIG_STMAC_IP101A */
	/*
	 * Normally, we will use MII (or RMII) with an External Clock.
	 */
	stxh205_configure_ethernet(0, &(struct stxh205_ethernet_config) {
#if defined(CONFIG_STM_USE_RMII_MODE)
			.mode = stxh205_ethernet_mode_rmii,	/* RMII */
#else
			.mode = stxh205_ethernet_mode_mii,	/* MII */
#endif	/* CONFIG_STM_USE_RMII_MODE */
			.ext_clk = 1,				/* External Clock */
#if defined(CONFIG_STMAC_IP101A)
			.no_txer = 1,				/* NO TXER from MAC */
#endif /* CONFIG_STMAC_IP101A */
			.phy_bus = 0, });
int board_init(void)
{
	unsigned long sysconf;
	/* Route UART2 instead of SCI to PIO4 */
	/* Set ssc2_mux_sel = 0 */
	sysconf = *STB7100_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<3);
	*STB7100_SYSCONF_SYS_CFG07 = sysconf;

	configPIO();

#ifdef CONFIG_DRIVER_SMC91111
	/*  Reset ethernet chip */
	STPIO_SET_PIN(PIO_PORT(2), 6, 0);
	udelay(1000);
	STPIO_SET_PIN(PIO_PORT(2), 6, 1);
	udelay(1000);
	STPIO_SET_PIN(PIO_PORT(2), 6, 0);
#endif

#if defined(CONFIG_CMD_IDE)
#ifdef CONFIG_SH_STB7100_IDE
	stb7100ref_init_ide();
#endif
#ifdef CONFIG_SH_STB7100_SATA
	stb7100_sata_init();
#endif
#endif

	return 0;
}
Пример #3
0
extern int board_init(void)
{
	configPIO();

		/*
		 * Note each EMI bank can only be a maximum of 64MiB.
		 * set CSA (Bank #0) to be 64MiB (0x00000000 to 0x03ffffff)
		 * set CSB (Bank #1) to be 64MiB (0x04000000 to 0x07ffffff)
		 */
	*ST40_EMI_BASEADDRESS(0) =       (0) >> 22;	/* start of EMI Bank #0 */
	*ST40_EMI_BASEADDRESS(1) = ( 64<<20) >> 22;	/* start of EMI Bank #1 */
	*ST40_EMI_BASEADDRESS(2) = (128<<20) >> 22;	/* start of EMI Bank #2 */

#ifdef QQQ	/* QQQ - DELETE */
#if defined(CONFIG_SH_STM_SATA)
	stx7105_configure_sata ();
#endif	/* CONFIG_SH_STM_SATA */
#endif		/* QQQ - DELETE */

#ifdef CONFIG_DRIVER_NET_STM_GMAC
	/* Reset the PHY */
	stmac_phy_reset();
#if CFG_STM_STMAC_BASE == CFG_STM_STMAC0_BASE		/* MII0, via MoCA Module */
#error U-Boot does not support MoCA!
	stx7108_configure_ethernet(0, &(struct stx7108_ethernet_config) {
			.mode = stx7108_ethernet_mode_mii,
			.ext_clk = 1,
			.phy_bus = 0, });
Пример #4
0
extern int board_init(void)
{
	unsigned long sysconf;

	/* Serial port set up */
	/* Route UART2&3 or SCI inputs instead of DVP to pins: conf_pad_dvp = 0 */
	sysconf = *STX7200_SYSCONF_SYS_CFG40;
	sysconf &= ~(1<<16);
	*STX7200_SYSCONF_SYS_CFG40 = sysconf;

	/* Route UART2&3/SCI outputs instead of DVP to pins: conf_pad_pio[1]=0 */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<25);
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* No idea, more routing: conf_pad_pio[0] = 0 */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<24);
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* Route UART2 (inputs and outputs) instead of SCI to pins: ssc2_mux_sel = 0 */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<2);
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* conf_pad_pio[4] = 0 */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<28);
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* Route UART3 (inputs and outputs) instead of SCI to pins: ssc3_mux_sel = 0 */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<3);
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* conf_pad_clkobs = 1 */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf |= (1<<14);
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* I2C and USB related routing */
	/* bit4: ssc4_mux_sel = 0 (treat SSC4 as I2C) */
	/* bit26: conf_pad_pio[2] = 0 route USB etc instead of DVO */
	/* bit27: conf_pad_pio[3] = 0 DVO output selection (probably ignored) */
	sysconf = *STX7200_SYSCONF_SYS_CFG07;
	sysconf &= ~((1<<27)|(1<<26)|(1<<4));
	*STX7200_SYSCONF_SYS_CFG07 = sysconf;

	/* Enable SOFT_JTAG mode.
	 * Taken from OS21, but is this correct?
	 */
	sysconf = *STX7200_SYSCONF_SYS_CFG33;
	sysconf |= (1<<6);
	sysconf &= ~((1<<0)|(1<<1)|(1<<2)|(1<<3));
	*STX7200_SYSCONF_SYS_CFG33 = sysconf;

	configPIO();

	return 0;
}
extern int board_init(void)
{
	configPIO();

#if defined(CONFIG_SH_STM_SATA)
	stx7141_configure_sata ();
#endif	/* CONFIG_SH_STM_SATA */

	return 0;
}
Пример #6
0
extern int board_init(void)
{
	configPIO();

#ifdef QQQ	/* QQQ - DELETE */
#if defined(CONFIG_ST40_STM_SATA)
	stx7105_configure_sata ();
#endif	/* CONFIG_ST40_STM_SATA */
#endif		/* QQQ - DELETE */

#ifdef CONFIG_DRIVER_NET_STM_GMAC
#if CONFIG_SYS_STM_STMAC_BASE == CONFIG_SYS_STM_STMAC0_BASE	/* MII0, on CN18 */
	stx7108_configure_ethernet(0, &(struct stx7108_ethernet_config) {
			.mode = stx7108_ethernet_mode_mii,
			.ext_clk = 1,
			.phy_bus = 0, });
Пример #7
0
int board_init(void)
{
	unsigned long sysconf;
	/* Route UART2 instead of SCI to PIO4 */
	/* Set ssc2_mux_sel = 0 */
	sysconf = *STB7100_SYSCONF_SYS_CFG07;
	sysconf &= ~(1<<3);
	*STB7100_SYSCONF_SYS_CFG07 = sysconf;

	configPIO();

#if defined(CONFIG_CMD_IDE)
#ifdef CONFIG_SH_STB7100_IDE
	stb7100mboard_init_ide();
#endif
#ifdef CONFIG_SH_STB7100_SATA
	stb7100_sata_init();
#endif
#endif

	return 0;
}
extern int board_init(void)
{
	configPIO();

	return 0;
}