bit checks to wait for FPGA ready were the wrong way round.
Allowed the compiler to use m68k bitfield instructions (-mbitfield). Now produces nearly the same code than Fredi's assembler sources.
This commit is contained in:
2
Makefile
2
Makefile
@@ -18,7 +18,7 @@ CC=$(TCPREFIX)gcc
|
||||
LD=$(TCPREFIX)ld
|
||||
|
||||
INCLUDE=-Iinclude
|
||||
CFLAGS=-mcpu=5474 -Wall -Wno-multichar -Os -fomit-frame-pointer
|
||||
CFLAGS=-mcpu=5474 -mbitfield -Wall -Wno-multichar -Os -fomit-frame-pointer
|
||||
|
||||
SRCDIR=sources
|
||||
OBJDIR=objs
|
||||
|
||||
@@ -219,7 +219,7 @@ void init_fpga(void)
|
||||
MCF_GPIO_PODR_FEC1L &= ~(1 << 1); /* FPGA clock => low */
|
||||
MCF_GPIO_PODR_FEC1L &= ~(1 << 2); /* FPGA config => low */
|
||||
|
||||
while ((! (MCF_GPIO_PPDSDR_FEC1L & (1 << 0))) && (! (MCF_GPIO_PPDSDR_FEC1L & (1 << 5))));
|
||||
while (((MCF_GPIO_PPDSDR_FEC1L & (1 << 0))) || ((MCF_GPIO_PPDSDR_FEC1L & (1 << 5))));
|
||||
|
||||
wait_10us();
|
||||
MCF_GPIO_PODR_FEC1L |= (1 << 2);
|
||||
|
||||
Reference in New Issue
Block a user