Commit graph

71 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
443a6c4b21 Skip unexpected descriptors 2010-08-01 23:08:03 +02:00
Vladimir 'phcoder' Serbinenko
fafc23e90a merge mainline into usb 2010-08-01 21:23:18 +02:00
Colin Watson
c03507dfb8 * bus/usb/emu/usb.c (grub_usb_poll_devices): Add a dummy
implementation of this so that grub-emu links again, with a note
that this should support hotplugging in the future.
2010-07-20 23:16:32 +01:00
Vladimir 'phcoder' Serbinenko
34787305df Allow psartial transfers and use them for usbserial 2010-07-19 08:43:01 +02:00
Vladimir 'phcoder' Serbinenko
ac2534273b fix losing pl2303 input at the price of losing some input bytes sometimes. 2010-07-19 00:12:59 +02:00
Vladimir 'phcoder' Serbinenko
9685412782 PL2303 works and is configurable. But sometime input is lost 2010-07-18 23:12:08 +02:00
Vladimir 'phcoder' Serbinenko
9edd681bbc Somewhat working although a lot of hardcoding pl2303 2010-07-18 21:36:00 +02:00
Vladimir 'phcoder' Serbinenko
d556277751 Add possibility of bulk reading with short timeout 2010-07-18 21:35:22 +02:00
Vladimir 'phcoder' Serbinenko
a531fd134d Split common usbserial function. PL2303 skeleton 2010-07-18 19:10:57 +02:00
Vladimir 'phcoder' Serbinenko
24494d478a Add fini routines for usbserial and rename grub_usbserial to grub_ftdi 2010-07-18 17:40:42 +02:00
Vladimir 'phcoder' Serbinenko
dd20a7868b Rename usbserial to usbserial_ftdi 2010-07-18 16:31:42 +02:00
Vladimir 'phcoder' Serbinenko
34364df689 usbserial basic support. Works in qemu 2010-07-18 12:53:35 +02:00
Vladimir 'phcoder' Serbinenko
cbf41813b3 Don't check transaction active flag as it's not updated and creates problems for usbserial 2010-07-18 12:53:08 +02:00
Vladimir 'phcoder' Serbinenko
a17b90f0ec Support USB device drivers autoloading 2010-07-17 03:58:23 +02:00
Aleš Nesrsta
5dab68dfa4 Hotplugging and USB hub support.
* bus/usb/ohci.c (grub_ohci_td): Add convenience fields.
	(grub_ohci): Likewise.
	(GRUB_OHCI_REG_CONTROL_BULK_ENABLE): New definition.
	(GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE): Likewise.
	(GRUB_OHCI_RESET_CONNECT_CHANGE): Likewise.
	(GRUB_OHCI_CTRL_EDS): Likewise.
	(GRUB_OHCI_BULK_EDS): Likewise.
	(GRUB_OHCI_TDS): Likewise.
	(GRUB_OHCI_ED_ADDR_MASK): Likewise.
	(grub_ohci_ed_phys2virt): New function.
	(grub_ohci_virt_to_phys): Likewise.
	(grub_ohci_td_phys2virt): Likewise.
	(grub_ohci_td_virt2phys): Likewise.
	(grub_ohci_pci_iter): Allocate memory and don't wait for stable
	attachment.
	(grub_ohci_find_ed): New function.
	(grub_ohci_alloc_td): Likewise.
	(grub_ohci_free_td): Likewise.
	(grub_ohci_free_tds): Likewise.
	(grub_ohci_transfer): Use previously allocated memory.
	(grub_ohci_portstatus): Reset status changed bit.
	(grub_ohci_detect_dev): Supply status changed.
	(grub_ohci_fini_hw): Free memory.
	(grub_ohci_restore_hw): Reallocate memory.
	* bus/usb/uhci.c (grub_uhci_portstatus): Don't reset on disable.
	Reset status change.
	(grub_uhci_detect_dev): Supply status_change.
	* bus/usb/usb.c (attach_hooks): New var.
	(grub_usb_device_attach): New function.
	(grub_usb_register_attach_hook_class): Likewise.
	(grub_usb_unregister_attach_hook_class): Likewise.
	* bus/usb/usbhub.c (grub_usb_hub_add_dev): Handle errors correctly.
	(grub_usb_add_hub): Reset connection changed bit.
	(attach_root_port): New function.
	(grub_usb_root_hub): Likewise.
	(poll_nonroot_hub): Likewise.
	(grub_usb_poll_devices): Likewise.
	* commands/usbtest.c (grub_cmd_usbtest): Poll devices before listing.
	* disk/usbms.c (grub_usbms_open): Use device hooks.
	(grub_usbms_iterate) :Poll devices.
	(grub_usbms_finddevs): Split into ...
	(grub_usbms_attach): ... this ...
	(grub_usbms_attach): ... and this.
	* include/grub/usb.h (grub_usb_controller_dev): Supply status_changed
	in detect_dev.
	(grub_usb_interface): New fields attached and detach_hook.
	(grub_usb_attach_hook_class): New type.
	(grub_usb_attach_desc): New struct.
	(grub_usb_register_attach_hook_class): New function.
	(grub_usb_unregister_attach_hook_class): Likewise.
	(grub_usb_poll_devices): Likewise.
	(grub_usb_device_attach): Likewise.
	* include/grub/usbtrans.h (GRUB_USB_HUB_FEATURE_C_CONNECTED): New const.
	(GRUB_USB_HUB_STATUS_C_CONNECTED): Likewise.
2010-07-17 03:06:34 +02:00
Vladimir 'phcoder' Serbinenko
36f84f1a7c Use inline functions instead of macros 2010-07-17 00:57:14 +02:00
starous
1b43dba911 USB hot-plugging 2010-07-08 22:54:35 +02:00
BVK Chaitanya
29d7e783d2 * bus/usb/usbhub.c: #include time.h header. 2010-07-06 14:53:55 +05:30
Vladimir 'phcoder' Serbinenko
75d959ea7c Revert latest two Aleš' commits 2010-07-06 01:55:26 +02:00
starous
f1f7d19ead ChangeLog & usbhub.c correction 2010-07-05 20:34:27 +02:00
starous
525ba5f9d0 UHCI portstatus correction 2010-07-05 19:06:47 +02:00
starous
1a0742d4e2 USB hub support 2010-07-05 19:02:05 +02:00
Vladimir 'phcoder' Serbinenko
b7e79e8a6a Merge mainline into yeeloongfw 2010-06-30 02:30:05 +02:00
starous
12cd7239d9 Faster OHCI, USB hub support, UHCI portstatus corr. 2010-06-21 21:12:20 +02:00
Vladimir 'phcoder' Serbinenko
f5db3949e7 Some hotplug support (buggy) 2010-06-02 21:54:51 +02:00
Vladimir 'phcoder' Serbinenko
5434f8bf3a Remove extra empty line 2010-06-02 21:54:25 +02:00
Vladimir 'phcoder' Serbinenko
440ab68551 Restructure usbms as a preparation for hotplug 2010-06-02 19:52:17 +02:00
Vladimir 'phcoder' Serbinenko
7db51e329b Remove double defines and use dma_free 2010-06-02 16:51:54 +02:00
Vladimir 'phcoder' Serbinenko
5d538b8b4a Use memset 2010-06-02 16:49:22 +02:00
Vladimir 'phcoder' Serbinenko
d495544497 Shut down PHCI controller harder 2010-06-02 05:00:54 +02:00
Vladimir 'phcoder' Serbinenko
f1cb760c99 Disable unused list 2010-06-02 04:52:52 +02:00
Vladimir 'phcoder' Serbinenko
2325800310 Fix last_trans determination 2010-06-02 04:52:35 +02:00
Vladimir 'phcoder' Serbinenko
a18c783473 Fewstylistic fixes 2010-06-02 04:51:35 +02:00
Aleš Nesrsta
390b0676c4 Use dev->descdev.maxsize0 even if dev->initialized isn't set 2010-06-02 02:04:45 +02:00
Aleš Nesrsta
7d4873c26a Merge Aleš' latest patch 2010-06-01 02:10:19 +02:00
Vladimir 'phcoder' Serbinenko
89d90892d0 Merge usb into yeeloongfw 2010-05-31 14:21:34 +02:00
Aleš Nesrsta
778ff32476 Fix a bunch of problems with USB. 2010-05-31 14:11:41 +02:00
Vladimir 'phcoder' Serbinenko
7fd08f56ae Shut down OHCI on booting 2010-05-31 14:01:38 +02:00
Vladimir 'phcoder' Serbinenko
8b1cf5e87f Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
Vladimir 'phcoder' Serbinenko
e51a665432 Add missing volatile attribute 2010-05-23 00:17:51 +02:00
Vladimir 'phcoder' Serbinenko
c710f8cc09 Always write the whole of frame interval register 2010-05-23 00:17:16 +02:00
Vladimir 'phcoder' Serbinenko
60c33f8c0f Use DMA memory in usbtrans.c 2010-05-23 00:13:37 +02:00
Vladimir 'phcoder' Serbinenko
e34b610d49 merge mainline into yeeloongfw 2010-05-22 16:58:45 +02:00
BVK Chaitanya
da6e6f17f3 cygwin emu build fixes 2010-05-06 08:45:39 +05:30
Vladimir 'phcoder' Serbinenko
839ced08f5 separate function to allocate DMA memory 2010-05-05 10:40:48 +02:00
BVK Chaitanya
840b61d8f0 reorganized grub-emu sources to suite upcoming automake build system 2010-04-27 10:50:28 +05:30
Vladimir 'phcoder' Serbinenko
fa2bef4816 Skip unfunctional controllers 2010-04-16 20:41:54 +02:00
Vladimir 'phcoder' Serbinenko
7e3a6f3b23 Move few defines to appropriate place 2010-04-16 20:05:35 +02:00
Vladimir 'phcoder' Serbinenko
481695bce0 Adjust OHCI init routines for MIPS and CS5535 2010-04-16 20:04:44 +02:00
Vladimir 'phcoder' Serbinenko
f78e34d87c Initialize power and timing of OHCI. 2010-04-16 19:59:51 +02:00