[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH] Fix EHCI driver debug
NOTE: to be applied after
[PATCH] EHCI driver. Translate to bus addresses where needed.
Commit message:
Debug defines are already defined in the USB global.h file.
Place DEV_DEBUG define before global.h header file otherwise
it won't activate debug.
diff -r fe37610367c7 -r 60ec6134674b sys/usb/src.km/ucd/ehci/ehci-hcd.c
--- a/sys/usb/src.km/ucd/ehci/ehci-hcd.c Thu Oct 30 10:24:43 2014 +0100
+++ b/sys/usb/src.km/ucd/ehci/ehci-hcd.c Thu Oct 30 11:41:16 2014 +0100
@@ -24,6 +24,12 @@
* MA 02111-1307 USA
*/
+#ifndef TOSONLY
+#if 0
+# define DEV_DEBUG
+#endif
+#endif
+
#include <stddef.h>
#include "mint/mint.h"
@@ -65,34 +71,6 @@
"\7\r\nSorry, failed!\r\n\r\n"
/*
- * Debug section
- */
-
-#ifndef TOSONLY
-#if 0
-# define DEV_DEBUG
-#endif
-
-#ifdef DEV_DEBUG
-
-# define FORCE(x) KERNEL_FORCE x
-# define ALERT(x) KERNEL_ALERT x
-# define DEBUG(x) KERNEL_DEBUG x
-# define TRACE(x) KERNEL_TRACE x
-# define ASSERT(x) assert x
-
-#else
-
-# define FORCE(x) KERNEL_FORCE x
-# define ALERT(x) KERNEL_ALERT x
-# define DEBUG(x)
-# define TRACE(x)
-# define ASSERT(x) assert x
-
-#endif
-#endif
-
-/*
* kernel interface
*/
diff -r fe37610367c7 -r 60ec6134674b sys/usb/src.km/ucd/ehci/ehci-pci.c
--- a/sys/usb/src.km/ucd/ehci/ehci-pci.c Thu Oct 30 10:24:43 2014 +0100
+++ b/sys/usb/src.km/ucd/ehci/ehci-pci.c Thu Oct 30 11:41:16 2014 +0100
@@ -20,9 +20,16 @@
* MA 02111-1307 USA
*/
+#ifndef TOSONLY
+#if 0
+# define DEV_DEBUG
+#endif
+#endif
+
#include "mint/pcibios.h"
#include "mint/pci_ids.h"
#include "libkern/libkern.h"
+
#include "../../global.h"
#include "../../endian/io.h"
@@ -35,32 +42,6 @@
#include "ehci.h"
-/*
- * Debug section
- */
-
-#if 0
-# define DEV_DEBUG 1
-#endif
-
-#ifdef DEV_DEBUG
-
-# define FORCE(x) KERNEL_FORCE x
-# define ALERT(x) KERNEL_ALERT x
-# define DEBUG(x) KERNEL_DEBUG x
-# define TRACE(x) KERNEL_TRACE x
-# define ASSERT(x) assert x
-
-#else
-
-# define FORCE(x) KERNEL_FORCE x
-# define ALERT(x) KERNEL_ALERT x
-# define DEBUG(x)
-# define TRACE(x)
-# define ASSERT(x) assert x
-
-#endif
-
extern struct usb_module_api *api;
extern void ehci_int_handle_asm(void);