remove separate debug printout macros
This commit is contained in:
@@ -732,3 +732,4 @@ tos/vmem_test/sources/fpga_test.c
|
|||||||
tos/vmem_test/Makefile
|
tos/vmem_test/Makefile
|
||||||
tos/Makefile
|
tos/Makefile
|
||||||
tos/fpga_test/sources/fpga_test.c
|
tos/fpga_test/sources/fpga_test.c
|
||||||
|
include/debug.h
|
||||||
|
|||||||
12
BaS_gcc/include/debug.h
Normal file
12
BaS_gcc/include/debug.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef DEBUG_H
|
||||||
|
#define DEBUG_H
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#define dbg(format, arg...) do { xprintf("DEBUG (%s()): " format, __FUNCTION__, ##arg);} while(0)
|
||||||
|
#else
|
||||||
|
#define dbg(format, arg...) do {;} while (0)
|
||||||
|
#endif /* DEBUG */
|
||||||
|
#define err(format, arg...) do { xprintf("ERROR (%s()): " format, __FUNCTION__, ##arg); } while(0)
|
||||||
|
|
||||||
|
#endif // DEBUG_H
|
||||||
|
|
||||||
@@ -26,6 +26,8 @@
|
|||||||
//#include "hardware.h"
|
//#include "hardware.h"
|
||||||
#include "ikbd.h"
|
#include "ikbd.h"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
// atari ikbd stuff
|
// atari ikbd stuff
|
||||||
#define IKBD_STATE_JOYSTICK_EVENT_REPORTING 0x01
|
#define IKBD_STATE_JOYSTICK_EVENT_REPORTING 0x01
|
||||||
#define IKBD_STATE_MOUSE_Y_BOTTOM 0x02
|
#define IKBD_STATE_MOUSE_Y_BOTTOM 0x02
|
||||||
|
|||||||
@@ -30,15 +30,7 @@
|
|||||||
#include "ehci.h"
|
#include "ehci.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
||||||
#define DBG_EHCI
|
#include "debug.h"
|
||||||
#ifdef DBG_EHCI
|
|
||||||
#define dbg(format, arg...) xprintf("DEBUG %s(): " format, __FUNCTION__, ## arg)
|
|
||||||
#else
|
|
||||||
#define dbg(format, arg...) do {} while (0)
|
|
||||||
#endif /* DBG_EHCI */
|
|
||||||
#define err(format, arg...) xprintf("ERROR %s(): " format, __FUNCTION__, ## arg)
|
|
||||||
#define info(format, arg...) xprintf("INFO %s(): " format, __FUNCTION__, ## arg)
|
|
||||||
|
|
||||||
|
|
||||||
static char ehci_inited;
|
static char ehci_inited;
|
||||||
static int rootdev;
|
static int rootdev;
|
||||||
@@ -1068,7 +1060,7 @@ int ehci_usb_lowlevel_init(long handle, const struct pci_device_id *ent, void **
|
|||||||
ehci_writel(&gehci.hcor->or_asynclistaddr, (uint32_t) gehci.qh_list - gehci.dma_offset);
|
ehci_writel(&gehci.hcor->or_asynclistaddr, (uint32_t) gehci.qh_list - gehci.dma_offset);
|
||||||
reg = ehci_readl(&gehci.hccr->cr_hcsparams);
|
reg = ehci_readl(&gehci.hccr->cr_hcsparams);
|
||||||
gehci.descriptor->hub.bNbrPorts = HCS_N_PORTS(reg);
|
gehci.descriptor->hub.bNbrPorts = HCS_N_PORTS(reg);
|
||||||
info("Register %x NbrPorts %d\r\n", reg, gehci.descriptor->hub.bNbrPorts);
|
xprintf("Register %x NbrPorts %d\r\n", reg, gehci.descriptor->hub.bNbrPorts);
|
||||||
|
|
||||||
/* Port Indicators */
|
/* Port Indicators */
|
||||||
if (HCS_INDICATOR(reg))
|
if (HCS_INDICATOR(reg))
|
||||||
@@ -1101,7 +1093,7 @@ int ehci_usb_lowlevel_init(long handle, const struct pci_device_id *ent, void **
|
|||||||
wait(5 * 1000);
|
wait(5 * 1000);
|
||||||
|
|
||||||
reg = HC_VERSION(ehci_readl(&gehci.hccr->cr_capbase));
|
reg = HC_VERSION(ehci_readl(&gehci.hccr->cr_capbase));
|
||||||
info("USB EHCI host controller version %x.%02x\r\n", reg >> 8, reg & 0xff);
|
xprintf("USB EHCI host controller version %x.%02x\r\n", reg >> 8, reg & 0xff);
|
||||||
|
|
||||||
/* turn on interrupts */
|
/* turn on interrupts */
|
||||||
pci_hook_interrupt(handle, handle_usb_interrupt, &gehci);
|
pci_hook_interrupt(handle, handle_usb_interrupt, &gehci);
|
||||||
|
|||||||
@@ -48,20 +48,13 @@
|
|||||||
#include "bas_string.h" /* for memset() */
|
#include "bas_string.h" /* for memset() */
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "interrupts.h"
|
#include "interrupts.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
#undef OHCI_USE_NPS /* force NoPowerSwitching mode */
|
#undef OHCI_USE_NPS /* force NoPowerSwitching mode */
|
||||||
|
|
||||||
#undef OHCI_VERBOSE_DEBUG /* not always helpful */
|
#undef OHCI_VERBOSE_DEBUG /* not always helpful */
|
||||||
#undef OHCI_FILL_TRACE
|
#undef OHCI_FILL_TRACE
|
||||||
|
|
||||||
#define DEBUG_OHCI
|
|
||||||
#ifdef DEBUG_OHCI
|
|
||||||
#define dbg(format, arg...) do { xprintf("DEBUG: %s(): " format, __FUNCTION__, ##arg); } while (0)
|
|
||||||
#else
|
|
||||||
#define dbg(format, arg...) do { ; } while (0)
|
|
||||||
#endif /* DEBUG_OHCI */
|
|
||||||
#define err(format, arg...) do { xprintf("DEBUG: %s(): " format, __FUNCTION__, ##arg); } while (0)
|
|
||||||
|
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "ohci.h"
|
#include "ohci.h"
|
||||||
#include "util.h" /* for endian conversions */
|
#include "util.h" /* for endian conversions */
|
||||||
|
|||||||
@@ -34,13 +34,7 @@
|
|||||||
#include "interrupts.h"
|
#include "interrupts.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
|
|
||||||
// #define DEBUG_PCI
|
#include "debug.h"
|
||||||
#ifdef DEBUG_PCI
|
|
||||||
#define dbg(format, arg...) do { xprintf("DEBUG: %s(): " format, __FUNCTION__, ##arg); } while (0)
|
|
||||||
#else
|
|
||||||
#define dbg(format, arg...) do { ; } while (0)
|
|
||||||
#endif /* DEBUG_PCI */
|
|
||||||
#define err(format, arg...) do { xprintf("ERROR: %s(): " format, __FUNCTION__, ##arg); } while (0)
|
|
||||||
|
|
||||||
#define pci_config_wait() do { __asm__ __volatile("tpf" ::: "memory"); } while (0)
|
#define pci_config_wait() do { __asm__ __volatile("tpf" ::: "memory"); } while (0)
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include <MCF5475.h>
|
#include <MCF5475.h>
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
__attribute__((aligned(16))) void chip_errata_135(void)
|
__attribute__((aligned(16))) void chip_errata_135(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#include "pci_ids.h"
|
#include "pci_ids.h"
|
||||||
#include "x86pcibios.h"
|
#include "x86pcibios.h"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
#define USE_SDRAM
|
#define USE_SDRAM
|
||||||
#define DIRECT_ACCESS
|
#define DIRECT_ACCESS
|
||||||
|
|
||||||
@@ -26,13 +28,6 @@
|
|||||||
#define SYS_BIOS 0xF0000
|
#define SYS_BIOS 0xF0000
|
||||||
#define SIZE_EMU 0x100000
|
#define SIZE_EMU 0x100000
|
||||||
|
|
||||||
#define DBG_BIOSEMU
|
|
||||||
#ifdef DBG_BIOSEMU
|
|
||||||
#define dbg(format, arg...) do { xprintf("DEBUG (%s()): " format, __FUNCTION__, ##arg);} while(0)
|
|
||||||
#else
|
|
||||||
#define dbg(format, arg...) do {;} while (0)
|
|
||||||
#endif /* DBG_BIOSEMU */
|
|
||||||
#define err(format, arg...) do { xprintf("ERROR (%s()): " format, __FUNCTION__, ##arg); } while(0)
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user