mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 02:01:38 +00:00
usb: fix support for HID keyboard
This fixes issues with several HID keyboards by implementing get_unaligned_le16(), which obviously may also fix other not-yet-known issues. Hint: I had to look out for suspicious lines like follows in the verbose log. [init -> usb_drv] get_unaligned_le16 called, not implemented Also, quirks for cherry keyboards are now applied.
This commit is contained in:
parent
9a1d13c32d
commit
da2076e52a
@ -50,7 +50,7 @@ CONTENT += $(addprefix include/scsi/,scsi.h scsi_host.h)
|
||||
|
||||
# USB hid driver
|
||||
CONTENT += drivers/hid/hid-input.c drivers/hid/hid-core.c drivers/hid/hid-ids.h
|
||||
CONTENT += drivers/hid/usbhid
|
||||
CONTENT += drivers/hid/hid-cherry.c drivers/hid/usbhid
|
||||
|
||||
# needed by USB hid
|
||||
CONTENT_INPUT := input.c evdev.c input-compat.h
|
||||
|
@ -40,8 +40,9 @@ SRC_C += usb/usb-common.c
|
||||
SRC_C += $(addprefix usb/host/, ehci-hcd.c)
|
||||
|
||||
# USB hid
|
||||
SRC_C += $(addprefix hid/usbhid/,hid-core.c hid-quirks.c)
|
||||
SRC_C += hid/hid-input.c hid/hid-core.c input/evdev.c input/input.c
|
||||
SRC_C += $(addprefix hid/usbhid/, hid-core.c hid-quirks.c)
|
||||
SRC_C += $(addprefix hid/, hid-core.c hid-input.c hid-cherry.c)
|
||||
SRC_C += $(addprefix input/, evdev.c input.c)
|
||||
|
||||
# USB storage
|
||||
SRC_C += $(addprefix usb/storage/,scsiglue.c protocol.c transport.c usb.c \
|
||||
@ -99,3 +100,5 @@ vpath %.cc $(LIB_DIR)/input
|
||||
vpath %.cc $(LIB_DIR)/storage
|
||||
vpath %.c $(LIB_DIR)/storage
|
||||
vpath %.cc $(LIB_DIR)/nic
|
||||
|
||||
# vi: set ft=make :
|
||||
|
@ -42,14 +42,6 @@
|
||||
int atomic_inc_return(atomic_t *v) { TRACE; return 0; }
|
||||
|
||||
|
||||
/*******************************
|
||||
** linux/byteorder/generic.h **
|
||||
*******************************/
|
||||
|
||||
u16 get_unaligned_le16(const void *p) { TRACE; return 0; }
|
||||
u32 get_unaligned_le32(const void *p) { TRACE; return 0; }
|
||||
|
||||
|
||||
/*******************************
|
||||
** linux/errno.h and friends **
|
||||
*******************************/
|
||||
|
@ -309,6 +309,7 @@ typedef enum irqreturn irqreturn_t;
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
|
||||
|
||||
struct __una_u16 { u16 x; } __attribute__((packed));
|
||||
struct __una_u32 { u32 x; } __attribute__((packed));
|
||||
struct __una_u64 { u64 x; } __attribute__((packed));
|
||||
|
||||
|
@ -801,6 +801,20 @@ long find_next_zero_bit_le(const void *addr,
|
||||
** linux/byteorder/generic.h **
|
||||
*******************************/
|
||||
|
||||
u16 get_unaligned_le16(const void *p)
|
||||
{
|
||||
const struct __una_u16 *ptr = (const struct __una_u16 *)p;
|
||||
return ptr->x;
|
||||
}
|
||||
|
||||
|
||||
u32 get_unaligned_le32(const void *p)
|
||||
{
|
||||
const struct __una_u32 *ptr = (const struct __una_u32 *)p;
|
||||
return ptr->x;
|
||||
}
|
||||
|
||||
|
||||
void put_unaligned_le32(u32 val, void *p)
|
||||
{
|
||||
struct __una_u32 *ptr = (struct __una_u32 *)p;
|
||||
@ -810,7 +824,7 @@ void put_unaligned_le32(u32 val, void *p)
|
||||
|
||||
u64 get_unaligned_le64(const void *p)
|
||||
{
|
||||
struct __una_u64 *ptr = (struct __una_u64 *)p;
|
||||
const struct __una_u64 *ptr = (const struct __una_u64 *)p;
|
||||
return ptr->x;
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ extern "C" void module_evdev_init();
|
||||
extern "C" void module_hid_init();
|
||||
extern "C" void module_hid_init_core();
|
||||
extern "C" void module_usb_stor_init();
|
||||
extern "C" void module_ch_init();
|
||||
|
||||
extern "C" void start_input_service(void *ep);
|
||||
|
||||
@ -63,7 +64,9 @@ static void init(Services *services)
|
||||
module_evdev_init();
|
||||
|
||||
/* HID */
|
||||
module_hid_init_core();
|
||||
module_hid_init();
|
||||
module_ch_init();
|
||||
}
|
||||
|
||||
/* host controller */
|
||||
|
Loading…
x
Reference in New Issue
Block a user