Commit graph

58 commits

Author SHA1 Message Date
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
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
Vladimir 'phcoder' Serbinenko
f7fcb23c76 merge mainline into pciclean 2010-01-20 20:40:30 +01:00
carles
7fd0baee0f 2009-12-24 Carles Pina i Estany <carles@pina.cat>
* bus/usb/usbhub.c: Fix capitalization, fullstop and newlines in
	grub_errno calls.
	* commands/acpi.c: Likewise.
	* commands/blocklist.c: Likewise.
	* commands/efi/loadbios.c: Likewise.
	* commands/i386/pc/drivemap.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/memrw.c: Likewise.
	* commands/password.c: Likewise.
	* commands/videotest.c: Likewise.
	* disk/ata.c: Likewise.
	* disk/ata_pthru.c: Likewise.
	* disk/dmraid_nvidia.c: Likewise.
	* disk/ieee1275/nand.c: Likewise.
	* disk/ieee1275/ofdisk.c: Likewise.
	* disk/loopback.c: Likewise.
	* disk/lvm.c: Likewise.
	* disk/mdraid_linux.c: Likewise.
	* disk/raid.c: Likewise.
	* disk/raid6_recover.c: Likewise.
	* disk/scsi.c: Likewise.
	* efiemu/main.c: Likewise.
	* efiemu/mm.c: Likewise.
	* efiemu/pnvram.c: Likewise.
	* efiemu/symbols.c: Likewise.
	* font/font.c: Likewise.
	* fs/cpio.c: Likewise.
	* fs/hfsplus.c: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/jfs.c: Likewise.
	* fs/minix.c: Likewise.
	* fs/ntfs.c: Likewise.
	* fs/ntfscomp.c: Likewise.
	* fs/reiserfs.c: Likewise.
	* fs/ufs.c: Likewise.
	* fs/xfs.c: Likewise.
	* gettext/gettext.c: Likewise.
	* include/grub/auth.h: Likewise.
	* kern/elf.c: Likewise.
	* kern/file.c: Likewise.
	* kern/ieee1275/init.c: Likewise.
	* kern/ieee1275/mmap.c: Likewise.
	* kern/ieee1275/openfw.c: Likewise.
	* kern/powerpc/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* lib/arg.c: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/bsdXX.c: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/efi/xnu.c: Likewise.
	* loader/i386/ieee1275/linux.c: Likewise.
	* loader/i386/linux.c: Likewise.
	* loader/i386/multiboot.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/multiboot2.c: Likewise.
	* loader/i386/xnu.c: Likewise.
	* loader/ieee1275/multiboot2.c: Likewise.
	* loader/macho.c: Likewise.
	* loader/machoXX.c: Likewise.
	* loader/multiboot2.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.
	* loader/xnu.c: Likewise.
	* loader/xnu_resume.c: Likewise.
	* mmap/i386/pc/mmap.c: Likewise.
	* normal/menu_viewer.c: Likewise.
	* partmap/acorn.c: Likewise.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* script/lexer.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/terminfo.c: Likewise.
	* video/bitmap.c: Likewise.
	* video/efi_gop.c: Likewise.
	* video/efi_uga.c: Likewise.
	* video/fb/video_fb.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.
	* video/readers/tga.c: Likewise.
	* video/video.c: Likewise.
2009-12-24 23:53:05 +01:00
Vladimir 'phcoder' Serbinenko
fbb8a88714 Byte-addressable PCI config space 2009-12-22 15:09:25 +01:00
Vladimir 'phcoder' Serbinenko
11d1828177 2009-12-22 Vladimir Serbinenko <phcoder@gmail.com>
* bus/usb/usbhub.c (grub_usb_hub_add_dev): Fix loop-break condition.
2009-12-22 10:18:18 +01:00
Vladimir 'phcoder' Serbinenko
b5d5993b6d 2009-12-22 Vladimir Serbinenko <phcoder@gmail.com>
* bus/usb/uhci.c (grub_uhci_transfer): Set a limit transaction time.
	(grub_uhci_portstatus): Likewise.
	(grub_uhci_portstatus): Add necessary delay.
2009-12-22 10:15:59 +01:00
Vladimir 'phcoder' Serbinenko
7ea73643f5 merge mtrunk into xnu 2009-12-18 03:57:32 +01:00
Vladimir 'phcoder' Serbinenko
1d3c6f1de7 Manually reimported XNU branch 2009-11-09 18:43:53 +01:00
phcoder
3affd0ece8 libpci initial stuff 2009-10-14 10:11:59 +02:00
proski
ad8ea1f4c2 Typo fixes 2009-09-09 21:40:17 +00:00
proski
eab58da22c 2009-07-16 Pavel Roskin <proski@gnu.org>
* kern/mm.c (grub_zalloc): New function.
	(grub_debug_zalloc): Likewise.
	* include/grub/mm.h: Declare grub_zalloc() and
	grub_debug_zalloc().
	* util/misc.c (grub_zalloc): New function.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
	instead of grub_malloc(), remove unneeded initializations.
	* bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
	* commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
	* commands/parttool.c (grub_cmd_parttool): Likewise.
	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
	* disk/raid5_recover.c (grub_raid5_recover): Likewise.
	* disk/raid6_recover.c (grub_raid6_recover): Likewise.
	* disk/usbms.c (grub_usbms_finddevs): Likewise.
	* efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
	* efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
	(grub_cmd_efiemu_pnvram): Likewise.
	* fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
	* fs/iso9660.c (grub_iso9660_mount): Likewise.
	(grub_iso9660_iterate_dir): Likewise.
	* fs/jfs.c (grub_jfs_opendir): Likewise.
	* fs/ntfs.c (list_file): Likewise.
	(grub_ntfs_mount): Likewise.
	* kern/disk.c (grub_disk_open): Likewise.
	* kern/dl.c (grub_dl_load_core): Likewise.
	* kern/elf.c (grub_elf_file): Likewise.
	* kern/env.c (grub_env_context_open): Likewise.
	(grub_env_set): Likewise.
	(grub_env_set_data_slot): Likewise.
	* kern/file.c (grub_file_open): Likewise.
	* kern/fs.c (grub_fs_blocklist_open): Likewise.
	* loader/i386/multiboot.c (grub_module): Likewise.
	* loader/xnu.c (grub_xnu_create_key): Likewise.
	(grub_xnu_create_value): Likewise.
	* normal/main.c (grub_normal_add_menu_entry): Likewise.
	(read_config_file): Likewise.
	* normal/menu_entry.c (make_screen): Likewise.
	* partmap/sun.c (sun_partition_map_iterate): Likewise.
	* script/sh/lexer.c (grub_script_lexer_init): Likewise.
	* script/sh/script.c (grub_script_parse): Likewise.
	* video/bitmap.c (grub_video_bitmap_create): Likewise.
	* video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
	* video/readers/png.c (grub_png_output_byte): Likewise.
	(grub_video_reader_png): Likewise.
2009-07-16 22:14:09 +00: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