mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
usb: kernel-specific USB IRQ number on Raspberry Pi
The USB interrupt number on Raspberry Pi differs betwenn Fiasco.OC and base-hw, the former uses 9 while the latter uses 17.
This commit is contained in:
parent
c60d65150e
commit
b13b0113c8
14
repos/dde_linux/include/usb/foc_rpi/usb_irq.h
Normal file
14
repos/dde_linux/include/usb/foc_rpi/usb_irq.h
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* \brief USB: DWC-OTG RaspberryPI Interrupt (base-foc)
|
||||
* \author Reinier Millo Sánchez <rmillo@uclv.cu>
|
||||
* \date 2015-06-21
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_USB_IRQ_H_
|
||||
#define _INCLUDE_USB_IRQ_H_
|
||||
|
||||
enum{
|
||||
DWC_IRQ = 9,
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE_USB_IRQ_H_ */
|
14
repos/dde_linux/include/usb/hw_rpi/usb_irq.h
Normal file
14
repos/dde_linux/include/usb/hw_rpi/usb_irq.h
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* \brief USB: DWC-OTG RaspberryPI Interrupt (base-hw)
|
||||
* \author Reinier Millo Sánchez <rmillo@uclv.cu>
|
||||
* \date 2015-06-21
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_USB_IRQ_H_
|
||||
#define _INCLUDE_USB_IRQ_H_
|
||||
|
||||
enum{
|
||||
DWC_IRQ = 17,
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE_USB_IRQ_H_ */
|
3
repos/dde_linux/lib/mk/foc_rpi/usb.mk
Normal file
3
repos/dde_linux/lib/mk/foc_rpi/usb.mk
Normal file
@ -0,0 +1,3 @@
|
||||
include $(REP_DIR)/lib/mk/usb_rpi.inc
|
||||
|
||||
INC_DIR += $(REP_DIR)/include/usb/foc_rpi
|
@ -1,48 +1,3 @@
|
||||
SRC_C += \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_adp.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_attr.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_cfi.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_cil.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_cil_intr.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_driver.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_ddma.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_intr.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_linux.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_queue.c
|
||||
include $(REP_DIR)/lib/mk/usb_rpi.inc
|
||||
|
||||
SRC_C += \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_cc.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_common_linux.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_crypto.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_dh.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_mem.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_modpow.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_notifier.c
|
||||
|
||||
SRC_C += net/usb/usbnet.c net/usb/smsc95xx.c
|
||||
|
||||
include $(REP_DIR)/lib/mk/usb.inc
|
||||
include $(REP_DIR)/lib/mk/armv6/usb.inc
|
||||
|
||||
CC_OPT += -DDWC_LINUX -DPLATFORM_INTERFACE
|
||||
|
||||
# needed for 'ehci-hcd.c', which we don't use on the rpi, but it is still
|
||||
# part of the generic usb USB driver
|
||||
CC_OPT += -DCONFIG_USB_EHCI_PCI=1
|
||||
|
||||
# for 'dwc_otg_hcd_linux.c' for enabling the FIQ, which we don't use anyway
|
||||
CC_OPT += -DINTERRUPT_VC_USB=9
|
||||
|
||||
# for 'dwc_otg_driver.c' for preventing calls to set_irq_type
|
||||
CC_OPT += -DIRQF_TRIGGER_LOW=1
|
||||
|
||||
INC_DIR += $(LX_CONTRIB_DIR)/drivers/usb/host/dwc_otg/dwc_common_port \
|
||||
$(LX_CONTRIB_DIR)/drivers/usb/host/dwc_otg/dwc_otg
|
||||
SRC_CC += platform.cc
|
||||
|
||||
vpath platform.cc $(LIB_DIR)/arm/platform_rpi
|
||||
vpath %.c $(LX_CONTRIB_DIR)/drivers/net/usb
|
||||
|
||||
# enable C++11 support
|
||||
CC_CXX_OPT += -std=gnu++11
|
||||
INC_DIR += $(REP_DIR)/include/usb/hw_rpi
|
||||
|
48
repos/dde_linux/lib/mk/usb_rpi.inc
Normal file
48
repos/dde_linux/lib/mk/usb_rpi.inc
Normal file
@ -0,0 +1,48 @@
|
||||
SRC_C += \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_adp.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_attr.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_cfi.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_cil.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_cil_intr.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_driver.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_ddma.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_intr.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_linux.c \
|
||||
usb/host/dwc_otg/dwc_otg/dwc_otg_hcd_queue.c
|
||||
|
||||
SRC_C += \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_cc.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_common_linux.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_crypto.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_dh.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_mem.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_modpow.c \
|
||||
usb/host/dwc_otg/dwc_common_port/dwc_notifier.c
|
||||
|
||||
SRC_C += net/usb/usbnet.c net/usb/smsc95xx.c
|
||||
|
||||
include $(REP_DIR)/lib/mk/usb.inc
|
||||
include $(REP_DIR)/lib/mk/armv6/usb.inc
|
||||
|
||||
CC_OPT += -DDWC_LINUX -DPLATFORM_INTERFACE
|
||||
|
||||
# needed for 'ehci-hcd.c', which we don't use on the rpi, but it is still
|
||||
# part of the generic usb USB driver
|
||||
CC_OPT += -DCONFIG_USB_EHCI_PCI=1
|
||||
|
||||
# for 'dwc_otg_hcd_linux.c' for enabling the FIQ, which we don't use anyway
|
||||
CC_OPT += -DINTERRUPT_VC_USB=9
|
||||
|
||||
# for 'dwc_otg_driver.c' for preventing calls to set_irq_type
|
||||
CC_OPT += -DIRQF_TRIGGER_LOW=1
|
||||
|
||||
INC_DIR += $(LX_CONTRIB_DIR)/drivers/usb/host/dwc_otg/dwc_common_port \
|
||||
$(LX_CONTRIB_DIR)/drivers/usb/host/dwc_otg/dwc_otg
|
||||
SRC_CC += platform.cc
|
||||
|
||||
vpath platform.cc $(LIB_DIR)/arm/platform_rpi
|
||||
vpath %.c $(LX_CONTRIB_DIR)/drivers/net/usb
|
||||
|
||||
# enable C++11 support
|
||||
CC_CXX_OPT += -std=gnu++11
|
@ -30,6 +30,9 @@
|
||||
#include <dwc_otg_dbg.h>
|
||||
#undef new
|
||||
|
||||
#include <usb_irq.h>
|
||||
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
@ -40,8 +43,6 @@ using namespace Genode;
|
||||
enum {
|
||||
DWC_BASE = 0x20980000,
|
||||
DWC_SIZE = 0x20000,
|
||||
|
||||
DWC_IRQ = 17,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user