Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d0727bd52 |
3
Makefile
3
Makefile
@@ -41,8 +41,7 @@ CFLAGS= -Wall \
|
||||
-fomit-frame-pointer \
|
||||
-ffreestanding \
|
||||
-fleading-underscore \
|
||||
-Wa,--register-prefix-optional \
|
||||
-g
|
||||
-Wa,--register-prefix-optional
|
||||
CFLAGS_OPTIMIZED = -mcpu=5474 \
|
||||
-Wall \
|
||||
-O2 \
|
||||
|
||||
@@ -26,7 +26,4 @@
|
||||
#define CLEAR_BIT(p,bit) p &= ~(bit)
|
||||
#define CLEAR_BIT_NO(p,nr) CLEAR_BIT(p, (1 << (nr)))
|
||||
|
||||
extern void write_pic_byte(uint8_t value);
|
||||
extern uint8_t read_pic_byte(void);
|
||||
|
||||
#endif /* _BAS_UTILS_H_ */
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "bas_printf.h"
|
||||
#include "bas_string.h"
|
||||
#include "bas_types.h"
|
||||
#include "bas_utils.h"
|
||||
#include "sd_card.h"
|
||||
#include "wait.h"
|
||||
|
||||
@@ -367,7 +366,7 @@ void init_isr(void)
|
||||
MCF_XLB_XARB_IMR_TTME | /* TBST/TSIZ mismatch interrupt */
|
||||
MCF_XLB_XARB_IMR_BAE; /* bus activity tenure timeout interrupt */
|
||||
|
||||
if (!isr_register_handler(64 + INT_SOURCE_PCIARB, 5, 0, pciarb_interrupt_handler, NULL, NULL))
|
||||
if (!isr_register_handler(64 + INT_SOURCE_PCIARB, 5, 1, pciarb_interrupt_handler, NULL, NULL))
|
||||
{
|
||||
dbg("Error: unable to register isr for PCIARB interrupts\r\n");
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "dma.h"
|
||||
#include "pci.h"
|
||||
|
||||
// #define IRQ_DEBUG
|
||||
//#define IRQ_DEBUG
|
||||
#if defined(IRQ_DEBUG)
|
||||
#define dbg(format, arg...) do { xprintf("DEBUG %s(): " format, __FUNCTION__, ##arg); } while (0)
|
||||
#else
|
||||
@@ -61,7 +61,6 @@ struct isrentry
|
||||
|
||||
static struct isrentry isrtab[MAX_ISR_ENTRY]; /* list of interrupt service routines */
|
||||
|
||||
|
||||
/*
|
||||
* clear the table of interrupt service handlers
|
||||
*/
|
||||
@@ -248,20 +247,20 @@ bool pic_interrupt_handler(void *arg1, void *arg2)
|
||||
|
||||
dbg("PIC interrupt\r\n");
|
||||
|
||||
rcv_byte = read_pic_byte();
|
||||
rcv_byte = MCF_PSC3_PSCRB_8BIT;
|
||||
if (rcv_byte == 2) /* PIC requests RTC data */
|
||||
{
|
||||
volatile uint8_t *rtc_reg = (uint8_t *) 0xffff8961;
|
||||
volatile uint8_t *rtc_data = (uint8_t *) 0xffff8963;
|
||||
uint8_t *rtc_reg = (uint8_t *) 0xffff8961;
|
||||
uint8_t *rtc_data = (uint8_t *) 0xffff8963;
|
||||
int index = 0;
|
||||
|
||||
err("PIC interrupt: requesting RTC data\r\n");
|
||||
|
||||
write_pic_byte(0x82); // header byte to PIC
|
||||
MCF_PSC3_PSCTB_8BIT = 0x82; // header byte to PIC
|
||||
do
|
||||
{
|
||||
*rtc_reg = index;
|
||||
write_pic_byte(*rtc_data);
|
||||
*rtc_reg = 0;
|
||||
MCF_PSC3_PSCTB_8BIT = *rtc_data;
|
||||
} while (index++ < 64);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -265,6 +265,9 @@ static void init_serial(void)
|
||||
MCF_PSC3_PSCCR = 0x05;
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
MCF_INTC_ICR32 = MCF_INTC_ICR_IL(7) |
|
||||
MCF_INTC_ICR_IL(4); /* PSC3 interrupt vector. Do we need it? */
|
||||
|
||||
xprintf("\r\nserial interfaces initialization: finished\r\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user