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
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
5434f8bf3a
Remove extra empty line
2010-06-02 21:54:25 +02:00
Vladimir 'phcoder' Serbinenko
7db51e329b
Remove double defines and use dma_free
2010-06-02 16:51:54 +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
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
839ced08f5
separate function to allocate DMA memory
2010-05-05 10:40:48 +02:00
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
Vladimir 'phcoder' Serbinenko
fbb8a88714
Byte-addressable PCI config space
2009-12-22 15:09:25 +01:00
phcoder
3affd0ece8
libpci initial stuff
2009-10-14 10:11:59 +02:00
fzielcke
b39f9d20a9
remove all trailing whitespace
2009-06-10 21:04:23 +00:00
phcoder
e23721e8af
2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
...
* bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
initialising controller.
* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2009-06-08 23:56:06 +00:00
proski
d55842d81e
2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
...
* bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
Subclass and Programming Interface fields in terms of the 3 byte
Class Code register.
* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2009-06-08 20:23:09 +00:00
proski
fa5db0b120
2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
...
* bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
interface is OHCI. Add grub_dprintf for symmetry with
bus/usb/uhci.c.
* bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
interface is UHCI. Add interf variable for programming
interface. Print interface with class/subclass.
2009-06-08 20:20:13 +00:00
proski
c0947beba6
2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
...
* bus/usb/ohci.c: Set interf with correct field.
2009-06-08 20:10:27 +00:00
proski
69da887788
2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
...
* bus/usb/uhci.c: Remove unneeded doubled lines.
* bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
Remove whitespace inside comment.
2009-06-08 20:08:59 +00:00
proski
07c5039fda
2009-04-17 Pavel Roskin <proski@gnu.org>
...
* bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
format.
(grub_ohci_transfer): Likewise.
2009-04-17 17:23:34 +00:00
proski
d1a282fc83
2009-04-17 Pavel Roskin <proski@gnu.org>
...
* disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
* bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
* commands/lspci.c (grub_lspci_iter): Likewise.
2009-04-17 15:36:41 +00:00
robertmh
d64399b562
2009-02-08 Marco Gerards <marco@gnu.org>
...
* Makefile.in (enable_grub_emu_usb): New variable.
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
(grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
`util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
(grub_emu_LDFLAGS): Add `$(LIBUSB)'.
(pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
`usbtest.mod' and `usbms.mod'.
(usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
(usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
(uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
(ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
(usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
variables.
* disk/usbms.c: New file.
* include/grub/usb.h: Likewise.
* include/grub/usbtrans.h: Likewise.
* include/grub/usbdesc.h: Likewise.
* bus/usb/usbtrans.c: Likewise.
* bus/usb/ohci.c: Likewise.
* bus/usb/uhci.c: Likewise.
* bus/usb/usbhub.c: Likewise.
* bus/usb/usb.c: Likewise.
* commands/usbtest.c: Likewise.
* util/usb.c: Likewise.
* include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
* configure.ac: Test for libusb presence.
* util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2009-02-08 17:58:32 +00:00