Example #1
0
void vinco_mci0_hw_init(void)
{
	at91_set_b_periph(AT91_PIO_PORTC, 5, 1);	/* MCI0 CDA */
	at91_set_b_periph(AT91_PIO_PORTC, 6, 1);	/* MCI0 DA0 */
	at91_set_b_periph(AT91_PIO_PORTC, 7, 1);	/* MCI0 DA1 */
	at91_set_b_periph(AT91_PIO_PORTC, 8, 1);	/* MCI0 DA2 */
	at91_set_b_periph(AT91_PIO_PORTC, 9, 1);	/* MCI0 DA3 */
	at91_set_b_periph(AT91_PIO_PORTC, 10, 1);	/* MCI0 DA4 */
	at91_set_b_periph(AT91_PIO_PORTC, 11, 1);	/* MCI0 DA5 */
	at91_set_b_periph(AT91_PIO_PORTC, 12, 1);	/* MCI0 DA6 */
	at91_set_b_periph(AT91_PIO_PORTC, 13, 1);	/* MCI0 DA7 */
	at91_set_b_periph(AT91_PIO_PORTC, 4, 0);	/* MCI0 CLK */

	/*
	 * As the mci io internal pull down is too strong, so if the io needs
	 * external pull up, the pull up resistor will be very small, if so
	 * the power consumption will increase, so disable the interanl pull
	 * down to save the power.
	 */
	at91_set_pio_pulldown(AT91_PIO_PORTC, 4, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 5, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 6, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 7, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 8, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 9, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 10, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 11, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 12, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTC, 13, 0);

	/* Enable clock */
	at91_periph_clk_enable(ATMEL_ID_MCI0);
}
Example #2
0
void sama5d4_xplained_mci1_hw_init(void)
{
	at91_set_c_periph(AT91_PIO_PORTE, 19, 1);	/* MCI1 CDA */
	at91_set_c_periph(AT91_PIO_PORTE, 20, 1);	/* MCI1 DA0 */
	at91_set_c_periph(AT91_PIO_PORTE, 21, 1);	/* MCI1 DA1 */
	at91_set_c_periph(AT91_PIO_PORTE, 22, 1);	/* MCI1 DA2 */
	at91_set_c_periph(AT91_PIO_PORTE, 23, 1);	/* MCI1 DA3 */
	at91_set_c_periph(AT91_PIO_PORTE, 18, 0);	/* MCI1 CLK */

	/*
	 * As the mci io internal pull down is too strong, so if the io needs
	 * external pull up, the pull up resistor will be very small, if so
	 * the power consumption will increase, so disable the interanl pull
	 * down to save the power.
	 */
	at91_set_pio_pulldown(AT91_PIO_PORTE, 18, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTE, 19, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTE, 20, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTE, 21, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTE, 22, 0);
	at91_set_pio_pulldown(AT91_PIO_PORTE, 23, 0);

	/* Enable clock */
	at91_periph_clk_enable(ATMEL_ID_MCI1);
}