Skip to content

Commit c00d415

Browse files
committed
Fixed SPI0 initialization to allow kernel loading
1 parent 0f6eb2d commit c00d415

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/mtd/spi/spi_flash.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Licensed under the GPL-2 or later.
66
*/
77

8+
#define DEBUG
89
#include <common.h>
910
#include <malloc.h>
1011
#include <spi.h>

drivers/spi/atmel_spi.c

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
9595
| ATMEL_SPI_MR_PCS(~(1 << cs) & 0xf);
9696
spi_writel(as, CSR(cs), csrx);
9797

98+
/* Override hardware CS control */
99+
printf("Initializing SPI0 CS line for software control\n");
100+
at91_spi0_hw_init(1 << 4);
101+
98102
return &as->slave;
99103
}
100104

0 commit comments

Comments
 (0)