Esempio n. 1
0
static
int cpld_accesible(void)
{
	cpld_init();
	cpld_write(AVR_ADDR, 0x02);
	return cpld_read(AVR_ADDR) == 0x02;
}
Esempio n. 2
0
int board_init(void)
{
	/* adress of boot parameters */
	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;

	/* Init PFC controller */
	r8a7790_pinmux_init();

	cpld_init();

#ifdef CONFIG_SH_ETHER
	/* ETHER Enable */
	gpio_request(GPIO_FN_ETH_CRS_DV, NULL);
	gpio_request(GPIO_FN_ETH_RX_ER, NULL);
	gpio_request(GPIO_FN_ETH_RXD0, NULL);
	gpio_request(GPIO_FN_ETH_RXD1, NULL);
	gpio_request(GPIO_FN_ETH_LINK, NULL);
	gpio_request(GPIO_FN_ETH_REF_CLK, NULL);
	gpio_request(GPIO_FN_ETH_MDIO, NULL);
	gpio_request(GPIO_FN_ETH_TXD1, NULL);
	gpio_request(GPIO_FN_ETH_TX_EN, NULL);
	gpio_request(GPIO_FN_ETH_MAGIC, NULL);
	gpio_request(GPIO_FN_ETH_TXD0, NULL);
	gpio_request(GPIO_FN_ETH_MDC, NULL);
	gpio_request(GPIO_FN_IRQ1, NULL);

	gpio_request(GPIO_GP_3_31, NULL); /* PHY_RST */
	gpio_direction_output(GPIO_GP_3_31, 0);
	mdelay(20);
	gpio_set_value(GPIO_GP_3_31, 1);
	udelay(1);
#endif

	return 0;
}
Esempio n. 3
0
void t3e3_init(struct channel *sc)
{
	cpld_init(sc);
	dc_reset(sc);
	dc_init(sc);
	exar7250_init(sc);
	exar7300_init(sc);
}
Esempio n. 4
0
int board_init(void)
{
	/* adress of boot parameters */
	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;

	cpld_init();

	/* Force ethernet PHY out of reset */
	gpio_request(ETHERNET_PHY_RESET, "phy_reset");
	gpio_direction_output(ETHERNET_PHY_RESET, 0);
	mdelay(20);
	gpio_direction_output(ETHERNET_PHY_RESET, 1);

	return 0;
}
void rcar_cpld_reset_cpu(void)
{
	cpld_init();

	cpld_write(CPLD_ADDR_RESET, 1);
}