grub2/include/grub
Aleš Nesrsta 1515ec8684 2010-06-02 Aleš Nesrsta <starous@volny.cz>
Finally make USB usable.

	* bus/usb/ohci.c (grub_ohci_reg_t): Add missing values.
	(GRUB_OHCI_RHUB_PORT_POWER_MASK): New macro.
	(GRUB_OHCI_RHUB_PORT_ALL_POWERED): Likewise.
	(GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_MASK): Likewise.
	(GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_SHIFT): Likewise.
	(GRUB_OHCI_REG_FRAME_INTERVAL_FI_SHIFT): Likewise.
	(GRUB_OHCI_FSMPS): Likewise.
	(GRUB_OHCI_PERIODIC_START): Likewise.
	(GRUB_OHCI_FRAME_INTERVAL): Likewise.
	(GRUB_OHCI_SET_PORT_ENABLE): Likewise.
	(GRUB_OHCI_CLEAR_PORT_ENABLE): Likewise.
	(GRUB_OHCI_SET_PORT_RESET): Likewise.
	(GRUB_OHCI_SET_PORT_RESET_STATUS_CHANGE): Likewise.
	* bus/usb/ohci.c (grub_ohci_pci_iter): Various important fixups.
	(grub_ohci_transaction): Likewise.
	(grub_ohci_transfer): Improve condition detection algorithms.
	Handle toggle property. Program the transactions correctly.
	Improve error handling. Various important fixups.
	(grub_ohci_portstatus): Put register writes in right order.
	* bus/usb/uhci.c (grub_free_queue): Compute last_trans.
	(grub_uhci_transfer): Don't show "failed" message on success.
	* bus/usb/usb.c (grub_usb_set_configuration): Zero-fill whole "toggle"
	array.
	(grub_usb_device_initialize): Read first 8 bytes of descriptor to
	determine its size.
	* bus/usb/usbtrans.c (grub_usb_control_msg): Use descdev.maxsize0 even
	before initialization is completed. Use IN direction for empty
	transfers. Use last_trans and compute toggle.
	* include/grub/usbtrans.h (grub_usb_transfer): New field last_trans.
	(GRUB_USB_FEATURE_ENDP_HALT): Correct the value.
	(GRUB_USB_FEATURE_DEV_REMOTE_WU): Likewise.
	(GRUB_USB_FEATURE_TEST_MODE): Likewise.
	* include/grub/usb.h (grub_usb_err_t): New value GRUB_USB_ERR_UNRECOVERABLE.
	(grub_usb_device): Increase toggle to 256.
	(grub_usbms_subclass_t): New values GRUB_USBMS_SUBCLASS_RBC,
	GRUB_USBMS_SUBCLASS_MMC2, GRUB_USBMS_SUBCLASS_UFI and
	GRUB_USBMS_SUBCLASS_SFF8070.
	* include/grub/scsicmd.h (grub_scsi_test_unit_ready): New structure.
	(grub_scsi_inquiry): New member page and alloc_length.
	(grub_scsi_request_sense): New structure.
	(grub_scsi_request_sense_data): Likewise.
	(grub_scsi_read_capacity): New fields logical_block_addr, PMI and
	control.
	* disk/scsi.c (grub_scsi_request_sense): New function.
	(grub_scsi_test_unit_ready): Likewise.
	(grub_scsi_inquiry): Fill new fields.
	(grub_scsi_read_capacity): Likewise.
	(grub_scsi_read10): Add request sense at the end.
	(grub_scsi_read12): Likewise.
	(grub_scsi_write10): Likewise.
	(grub_scsi_write12): Likewise.
	(grub_scsi_open): Add Test Unit Ready.
	* disk/usbms.c (grub_usbms_finddevs): Check configcnt.
	Support additional subclasses. Con't clear halt yet. Activate the
	proper config. Calculate LUNs correctly.
	(grub_usbms_transfer): Various important fixups.

2010-06-02  Vladimir Serbinenko  <phcoder@gmail.com>

	* bus/pci.c (grub_pci_iterate) [GRUB_MACHINE_MIPS_YEELOONG]: Skip ghosts.
	* bus/usb/ohci.c (grub_ohci_portstatus): Handle R/WC correctly.
	(grub_ohci_fini_hw): New function.
	(grub_ohci_restore_hw): Likewise.
	(GRUB_MOD_INIT(ohci)): Register preboot hook.
	(GRUB_MOD_FINI(ohci)): Shutdown OHCI.
	* term/usb_keyboard.c: Remove include of grub/machine/console.h.

2010-06-02  Vladimir Serbinenko  <phcoder@gmail.com>

	Dedicated DMA allocations.

	* bus/pci.c (grub_memalign_dma32): New function
	(grub_dma_free): Likewise.
	(grub_dma_get_virt): Likewise.
	(grub_dma_get_phys): Likewise.
	* bus/usb/ohci.c (grub_ohci): New members hcca_addr and hcca_chunk.
	(grub_ohci_pci_iter): Use dma32_alloc.
	(grub_ohci_transfer): Likewise.
	* bus/usb/usbtrans.c (grub_usb_control_msg): Likewise.
	(grub_usb_bulk_readwrite): Likewise.
	* include/grub/pci.h: Add declarations.

2010-06-02  Vladimir Serbinenko  <phcoder@gmail.com>

	CS5536 support.

	* bus/cs5536.c: New file.
	* bus/usb/ohci.c (grub_ohci_pci_iter): Check for CS5536.
	* conf/i386.rmk (pkglib_MODULES): Add cs5536.mod.
	(cs5536_mod_SOURCES): New variable.
	(cs5536_mod_CFLAGS): Likewise.
	(cs5536_mod_LDFLAGS): Likewise.
	* conf/mips-yeeloong.rmk (kernel_img_HEADERS): Add cs5536.h and
	machine/pci.h.
	(kernel_img_SOURCES): Add bus/cs5536.c.
	(pkglib_MODULES): Add usb.mod, usbtest.mod, ohci.mod, usbms.mod and
	usb_keyboard.mod.
	(usb_mod_SOURCES): New variable.
	(usb_mod_CFLAGS): New variable.
	(usb_mod_LDFLAGS): New variable.
	(usbtest_mod_SOURCES): New variable.
	(usbtest_mod_CFLAGS): New variable.
	(usbtest_mod_LDFLAGS): New variable.
	(ohci_mod_SOURCES): New variable.
	(ohci_mod_CFLAGS): New variable.
	(ohci_mod_LDFLAGS): New variable.
	(usbms_mod_SOURCES): New variable.
	(usbms_mod_CFLAGS): New variable.
	(usbms_mod_LDFLAGS): New variable.
	(usb_keyboard_mod_SOURCES): New variable.
	(usb_keyboard_mod_CFLAGS): New variable.
	(usb_keyboard_mod_LDFLAGS): New variable.
	* include/grub/smbus.h: New file.
	* include/grub/cs5536.h: New file.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-06-02 17:16:20 +02:00
..
efi Fill info for remaining platforms. Make efi image identical to image of previous grub-mkimage 2010-04-26 17:19:15 +02:00
efiemu now hangs at maxDec 2009-09-02 13:34:40 +02:00
emu Fix grub-emu issues on NetBSD, with gcc 4.1.3. 2010-05-28 19:18:45 +05:30
i386 Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
ieee1275 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value 2010-05-05 18:52:13 +02:00
lib 2009-05-04 Pavel Roskin <proski@gnu.org> 2009-05-04 20:06:05 +00:00
mips Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
powerpc Some cleanups 2010-04-26 21:11:16 +02:00
sparc64 Some cleanups 2010-04-26 21:11:16 +02:00
util removed some duplicate code 2010-04-27 20:55:12 +05:30
x86_64 Some cleanups 2010-04-26 21:11:16 +02:00
acorn_filecore.h 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
acpi.h remove all trailing whitespace 2009-06-10 21:04:23 +00:00
aout.h aout image support 2010-02-13 16:26:50 +01:00
at_keyboard.h Merge from trunk 2009-12-25 22:29:47 +00:00
ata.h various fixes. MIPSsim support 2009-10-11 18:18:18 +02:00
auth.h 2009-12-24 Carles Pina i Estany <carles@pina.cat> 2009-12-24 23:53:05 +01:00
autoefi.h merge mtrunk into xnu 2009-12-18 03:57:32 +01:00
bitmap_scale.h 2010-02-25 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-25 15:10:18 +01:00
bitmap.h 2010-02-25 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-25 15:10:18 +01:00
boot.h 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
bsdlabel.h Reimport nestpart 2010-02-06 18:43:37 +01:00
bufio.h 2010-02-25 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-25 15:10:18 +01:00
cache.h 2010-02-07 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-07 00:52:31 +01:00
charset.h Core changes hopefully finished 2009-12-24 15:34:33 +01:00
cmos.h datetime for yeeloong 2009-12-11 22:14:09 +01:00
command.h 2009-05-04 Pavel Roskin <proski@gnu.org> 2009-05-04 20:06:05 +00:00
crypto.h Crypto module autoloading 2009-12-23 17:33:35 +01:00
cs5536.h Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
datetime.h Clean building system 2010-02-07 23:49:49 +01:00
device.h 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
disk.h * include/grub/disk.h (GRUB_DISK_SIZE_UNKNOWN): New macro. 2010-05-31 20:49:42 +02:00
dl.h added support for --enable-grub-emu-modules build 2010-04-27 13:57:14 +05:30
elf.h all images binary identical to the ones from trunk 2010-04-26 19:11:38 +02:00
elfload.h linux.c 2009-10-16 17:40:59 +02:00
env_private.h Save 314 bytes on not handling contexts in core 2009-12-20 02:52:39 +01:00
env.h Save 314 bytes on not handling contexts in core 2009-12-20 02:52:39 +01:00
err.h 2010-02-07 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-07 00:46:09 +01:00
extcmd.h 2009-03-21 Bean <bean123ch@gmail.com> 2009-03-21 08:39:59 +00:00
fbblit.h 2009-08-28 Vladimir Serbinenko <phcoder@gmail.com> 2009-08-28 13:54:20 +00:00
fbfill.h 2009-08-18 Pavel Roskin <proski@gnu.org> 2009-08-18 17:26:35 +00:00
fbutil.h 2009-08-18 Pavel Roskin <proski@gnu.org> 2009-08-18 17:26:35 +00:00
file.h This commit is the same than gettext08.patch (see mailing list) 2009-11-22 12:50:46 +00:00
font.h 2010-02-25 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-25 15:10:18 +01:00
fontformat.h 2010-01-25 Carles Pina i Estany <carles@pina.cat> 2010-01-26 20:16:08 +00:00
fs.h 2010-01-03 Robert Millan <rmh.grub@aybabtu.com> 2010-01-03 22:05:07 +00:00
fshelp.h 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com> 2009-04-05 20:19:05 +00:00
gfxmenu_model.h Initial effort for gfxmenu on multiterm branch 2009-12-26 01:49:57 +01:00
gfxmenu_view.h Various fixes to make gfxmenu work smoothly in multioutput environment 2009-12-26 16:41:54 +01:00
gfxterm.h 2010-02-25 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-25 15:10:18 +01:00
gfxwidgets.h gfxmenu import 2009-11-20 16:02:58 +01:00
gpt_partition.h 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com> 2009-04-19 20:38:46 +00:00
gui_string_util.h Initial support for scalable gfxmenu 2009-12-29 17:31:02 +01:00
gui.h Fix gfxmenu crash. 2010-05-13 03:56:14 +02:00
gzio.h 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
handler.h 2009-12-31 BVK Chaitanya <bvk.groups@gmail.com> 2009-12-31 15:03:09 +01:00
hfs.h 2009-12-16 Vladimir Serbinenko <phcoder@gmail.com> 2009-12-16 15:40:31 +01:00
i18n.h * include/grub/i18n.h: Always enable grub_gettext. 2010-05-21 20:12:41 +02:00
icon_manager.h gfxmenu import 2009-11-20 16:02:58 +01:00
kernel.h Some cleanups 2010-04-26 21:11:16 +02:00
libgcc.h Unify libgcc processing. 2010-04-11 01:14:31 +02:00
libpciaccess.h fix emu build with grub-emu-pci and grub-emu-modules 2010-04-19 15:15:59 +05:30
libusb.h Fix usb support 2010-04-10 01:56:51 +02:00
list.h GRUB_FILE implementation 2010-02-09 15:32:42 +01:00
loader.h 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com> 2009-04-27 16:48:58 +00:00
lvm.h remove all trailing whitespace 2009-06-10 21:04:23 +00:00
macho.h crashing snow64 2009-09-02 02:52:10 +02:00
machoload.h crashing snow64 2009-09-02 02:52:10 +02:00
memory.h remove all trailing whitespace 2009-06-10 21:04:23 +00:00
menu_viewer.h Remove menu init hooks. They are useless 2009-12-26 16:39:16 +01:00
menu.h Reimport hotkey support 2009-12-29 23:01:12 +01:00
misc.h Fix cygwin compilation. 2010-04-11 21:24:21 +02:00
mm.h merge mainline into grub-file 2010-03-26 17:06:36 +01:00
msdos_partition.h Reimport nestpart 2010-02-06 18:43:37 +01:00
multiboot_loader.h This patch is to introduce multiboot 2 loading capabilities to grub2 2007-07-25 00:44:03 +00:00
multiboot.h Split coreboot and multiboot ports. 2010-05-01 14:06:53 +02:00
net.h remove all trailing whitespace 2009-06-10 21:04:23 +00:00
normal.h * normal/autofs.c (read_fs_list): New parameter 'prefix'. 2010-04-09 21:07:24 +02:00
ntfs.h 2010-01-03 Robert Millan <rmh.grub@aybabtu.com> 2010-01-03 22:05:07 +00:00
offsets.h Some cleanups 2010-04-26 21:11:16 +02:00
parser.h Work on multi-out terminal 2009-12-24 00:37:11 +01:00
partition.h merge mainline into nestpart 2010-03-26 15:44:13 +01:00
parttool.h remove all trailing whitespace 2009-06-10 21:04:23 +00:00
pci.h Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
pciutils.h pciaccess 2009-10-14 18:17:18 +02:00
raid.h 2009-07-31 Bean <bean123ch@gmail.com> 2009-07-31 14:25:19 +00:00
reader.h Work on multi-out terminal 2009-12-24 00:37:11 +01:00
script_sh.h merged mainline 2010-03-21 11:03:41 +05:30
scsi.h 2008-08-27 Marco Gerards <marco@gnu.org> 2008-08-27 15:05:00 +00:00
scsicmd.h Sort scsi_cmd_t. 2010-06-02 16:45:43 +02:00
sdl.h Build system support for grub-emu modules 2010-02-07 15:17:26 +01:00
search.h definition fixes 2009-11-23 21:15:44 +01:00
serial.h split serial 2009-10-10 20:59:18 +02:00
setjmp.h 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
smbus.h Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
symbol.h 2010-01-03 Robert Millan <rmh.grub@aybabtu.com> 2010-01-03 22:05:07 +00:00
term.h 2010-01-18 Robert Millan <rmh.grub@aybabtu.com> 2010-01-18 19:43:39 +00:00
terminfo.h Restrict terminfo to serial 2009-12-24 23:20:43 +01:00
test.h GRUB_FILE implementation 2010-02-09 15:32:42 +01:00
time.h 2010-02-07 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-07 02:47:18 +01:00
tparm.h 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> 2007-07-21 23:32:33 +00:00
trig.h 2009-11-14 Colin D Bennet <colin@gibibit.com> 2009-11-14 23:11:55 +01:00
types.h Some cleanups 2010-04-26 21:11:16 +02:00
usb.h Merge Aleš' latest patch 2010-06-01 02:10:19 +02:00
usbdesc.h remove all trailing whitespace 2009-06-10 21:04:23 +00:00
usbtrans.h Merge Aleš' latest patch 2010-06-01 02:10:19 +02:00
video_fb.h Initial reimport of double buffering 2009-11-14 17:00:39 +01:00
video.h Transform (broken) vga terminal into (working) vga video driver. 2010-05-09 11:00:21 +02:00
xnu.h merge mainline into gfxmenu 2009-12-25 21:32:46 +01:00