Skip to content
Snippets Groups Projects
Commit b38d634b authored by Reinhard Meyer's avatar Reinhard Meyer Committed by U-Boot
Browse files

AT91: fix mistake in at91sam9260_devices.c(spi1_hw_init)


Bits 0..3 in cs_mask = CS0..CS3 in SPI mode require it to be peripheral
Bits 4..7 in cs_mask = CS0..CS3 in GPIO mode require it to be output

Signed-off-by: default avatarReinhard Meyer <u-boot@emk-elektronik.de>
parent c23e5e7e
No related branches found
No related tags found
No related merge requests found
...@@ -138,7 +138,7 @@ void at91_spi1_hw_init(unsigned long cs_mask) ...@@ -138,7 +138,7 @@ void at91_spi1_hw_init(unsigned long cs_mask)
at91_set_b_periph(AT91_PIO_PORTC, 4, 1); at91_set_b_periph(AT91_PIO_PORTC, 4, 1);
} }
if (cs_mask & (1 << 3)) { if (cs_mask & (1 << 3)) {
at91_set_pio_output(AT91_PIO_PORTC, 3, 1); at91_set_b_periph(AT91_PIO_PORTC, 3, 1);
} }
if (cs_mask & (1 << 4)) { if (cs_mask & (1 << 4)) {
at91_set_pio_output(AT91_PIO_PORTB, 3, 1); at91_set_pio_output(AT91_PIO_PORTB, 3, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment