mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
usb: adapt to lx_kit/lx_emul update
This commit is contained in:
parent
05179409be
commit
80104f5192
13
repos/dde_linux/patches/usb_tv64.patch
Normal file
13
repos/dde_linux/patches/usb_tv64.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/usb/host/ehci-timer.c b/drivers/usb/host/ehci-timer.c
|
||||
index 424ac5d..a2afc34 100644
|
||||
--- a/drivers/usb/host/ehci-timer.c
|
||||
+++ b/drivers/usb/host/ehci-timer.c
|
||||
@@ -422,7 +422,7 @@ static enum hrtimer_restart ehci_hrtimer_func(struct hrtimer *t)
|
||||
*/
|
||||
now = ktime_get();
|
||||
for_each_set_bit(e, &events, EHCI_HRTIMER_NUM_EVENTS) {
|
||||
- if (now.tv64 >= ehci->hr_timeouts[e].tv64)
|
||||
+ if (now >= ehci->hr_timeouts[e])
|
||||
event_handlers[e](ehci);
|
||||
else
|
||||
ehci_enable_event(ehci, e, false);
|
@ -1 +1 @@
|
||||
55b39b5a0abadfe7027a5128d9d439d586d7a830
|
||||
dbe07ce4380f2028e3b9d5fccaedff6b831b9a0e
|
||||
|
@ -194,6 +194,7 @@ PATCH_OPT(patches/usb_evdev.patch) := $(USB_OPT)
|
||||
PATCH_OPT(patches/usb_mem.patch) := $(USB_OPT)
|
||||
PATCH_OPT(patches/usb_usbnet.patch) := $(USB_OPT)
|
||||
PATCH_OPT(patches/usb_rndis.patch) := $(USB_OPT)
|
||||
PATCH_OPT(patches/usb_tv64.patch) := $(USB_OPT)
|
||||
|
||||
# INTEL FB
|
||||
PATCH_OPT(patches/intel_fb_export_api.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
|
||||
|
@ -232,13 +232,6 @@ void cpu_relax(void) { SKIP; }
|
||||
struct task_struct *current;
|
||||
|
||||
|
||||
/******************
|
||||
** linux/wait.h **
|
||||
******************/
|
||||
|
||||
void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) { TRACE; }
|
||||
|
||||
|
||||
/*********************
|
||||
** linux/kthread.h **
|
||||
*********************/
|
||||
|
@ -69,13 +69,6 @@ static inline void bt()
|
||||
|
||||
#include <lx_emul/bug.h>
|
||||
|
||||
|
||||
/*********************
|
||||
** linux/kconfig.h **
|
||||
*********************/
|
||||
|
||||
#define IS_ENABLED(x) x
|
||||
|
||||
/*****************
|
||||
** asm/param.h **
|
||||
*****************/
|
||||
@ -181,8 +174,6 @@ typedef struct { __u8 b[16]; } uuid_le;
|
||||
|
||||
#include <lx_emul/byteorder.h>
|
||||
|
||||
#define __aligned(N) __attribute__((aligned(N)))
|
||||
|
||||
struct __una_u16 { u16 x; } __attribute__((packed));
|
||||
struct __una_u32 { u32 x; } __attribute__((packed));
|
||||
struct __una_u64 { u64 x; } __attribute__((packed));
|
||||
@ -241,7 +232,6 @@ struct page
|
||||
#include <lx_emul/errno.h>
|
||||
|
||||
enum {
|
||||
ENOEXEC = 8,
|
||||
EISDIR = 21,
|
||||
EXFULL = 52,
|
||||
ERESTART = 53,
|
||||
@ -629,6 +619,9 @@ ktime_t ktime_mono_to_real(ktime_t mono);
|
||||
|
||||
#include <lx_emul/timer.h>
|
||||
|
||||
#define from_timer(var, callback_timer, timer_fieldname) \
|
||||
container_of(callback_timer, typeof(*var), timer_fieldname)
|
||||
|
||||
|
||||
/*******************
|
||||
** linux/delay.h **
|
||||
@ -649,9 +642,10 @@ extern unsigned long loops_per_jiffy; /* needed by 'dwc_otg_attr.c' */
|
||||
|
||||
#include <lx_emul/work.h>
|
||||
|
||||
#define wait_queue_t wait_queue_entry_t
|
||||
|
||||
enum {
|
||||
WORK_STRUCT_PENDING_BIT = 0,
|
||||
WQ_FREEZABLE = (1 << 2),
|
||||
};
|
||||
|
||||
|
||||
@ -1516,7 +1510,6 @@ int seq_putc(struct seq_file *, char);
|
||||
|
||||
enum {
|
||||
GFP_NOIO = GFP_LX_DMA,
|
||||
GFP_NOWAIT = 0x2000000u,
|
||||
};
|
||||
|
||||
unsigned long get_zeroed_page(gfp_t gfp_mask);
|
||||
|
@ -741,11 +741,6 @@ void *sg_virt(struct scatterlist *sg)
|
||||
** linux/ioport.h **
|
||||
********************/
|
||||
|
||||
resource_size_t resource_size(const struct resource *res)
|
||||
{
|
||||
return res->end - res->start + 1;
|
||||
}
|
||||
|
||||
struct resource * devm_request_mem_region(struct device *dev, resource_size_t start,
|
||||
resource_size_t n, const char *name)
|
||||
{
|
||||
@ -989,9 +984,9 @@ signed long schedule_timeout_uninterruptible(signed long timeout)
|
||||
#include <lx_emul/impl/completion.h>
|
||||
|
||||
|
||||
static void _completion_timeout(unsigned long t)
|
||||
static void _completion_timeout(struct timer_list *t)
|
||||
{
|
||||
Lx::Task *task = (Lx::Task *)t;
|
||||
Lx::Task *task = (Lx::Task *)t->data;
|
||||
task->unblock();
|
||||
}
|
||||
|
||||
@ -1002,7 +997,8 @@ long __wait_completion(struct completion *work, unsigned long timeout)
|
||||
unsigned long j = timeout ? jiffies + timeout : 0;
|
||||
|
||||
if (timeout) {
|
||||
setup_timer(&t, _completion_timeout, (unsigned long)Lx::scheduler().current());
|
||||
timer_setup(&t, _completion_timeout, 0u);
|
||||
t.data = (unsigned long)Lx::scheduler().current();
|
||||
mod_timer(&t, timeout);
|
||||
}
|
||||
|
||||
@ -1120,3 +1116,18 @@ int hex2bin(u8 *dst, const char *src, size_t count)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*******************
|
||||
** linux/timer.h **
|
||||
*******************/
|
||||
|
||||
extern "C" void init_timer(struct timer_list *) { }
|
||||
|
||||
|
||||
extern "C" void setup_timer(struct timer_list *timer, void (*function)(unsigned long),
|
||||
unsigned long data)
|
||||
{
|
||||
timer_setup(timer, function, 0u);
|
||||
timer->data = data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user