From: <he...@us...> - 2005-07-10 15:14:48
|
Update of /cvsroot/gc-linux/linux/drivers/block/gcn-di In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31264 Modified Files: Makefile drive_all.S gcn-di.c Added Files: drive_20010831.h Log Message: Added support for the Panasonic Q drive. --- NEW FILE: drive_20010831.h --- static const char drive_20010831_firmware[] = "\xf4\xe1\xa5\x38\xc7\xdc\x00\x80\xf4\x71\xf6\xeb\x08\x80\x6e\xf4" "\xe1\x66\x5f\xc7\xdc\x6e\x80\xa0\xf8\xae\x01\xf4\xe1\x7c\x5f\xc7" "\xf4\x74\x47\xd0\x40\xf7\x20\x4c\x80\xf4\x74\x39\x9e\x08\xf7\x20" "\xd6\xfc\xf4\x74\x02\xb3\x08\xf7\x20\xd2\xfc\x80\x04\xc4\xda\xfc" "\xf4\x74\x40\xd6\x08\xf0\x00\xc8\xda\xfc\xf5\x00\x01\xe9\x73\xc8" "\xda\xfc\xf5\x00\x02\xe8\x03\xfc\xec\x00\xf4\x74\x02\xed\x40\x80" "\x02\xf0\x20\xc8\x78\x80\xc0\x92\x81\xdc\xaa\x80\xf5\x30\x00\xf4" "\x44\x79\xd1\x40\xf8\xaa\x00\x10\xf4\xd0\x74\xd1\x40\xf0\x01\xdc" "\xaa\x80\xf5\x30\x00\xf7\x48\xaa\x00\xe9\x07\xf4\xc4\x79\xd1\x40" "\x10\xfe\xf7\x48\xee\x00\xe8\x0c\xd8\x55\xe9\x25\xcc\xab\x80\xfd" "\x53\x00\xea\x0c\xcc\xab\x80\xc4\xa6\x81\xcc\xac\x80\xc4\x8a\x81" "\xdc\xaa\x80\xf8\xe0\x00\x10\xa0\xf5\x10\x01\xf5\x10\x02\xf5\x10" "\x03\xfe\xcc\xda\xfc\xf7\x00\xfe\xff\xc4\xda\xfc\xcc\x44\xfc\xf7" "\x00\xfe\xff\xc4\x44\xfc\xf2\x7c\xd0\x04\xcc\x5b\x80\xd8\x01\xe9" "\x02\x7c\x04\xf4\x75\x13\xd1\x40\x51\x20\x71\x34\xf4\x7d\x7f\x86" "\x08\xe9\x1b\x80\x00\xcd\xda\xfc\xd8\x00\xe9\x06\xf7\x01\xf7\xff" "\xea\x03\xf5\x09\x08\xc5\xda\xfc\xf4\x75\x78\xd1\x40\x14\xfe\x80" "\x01\xea\xe2\xf7\x10\xff\xf7\x21\xf4\x79\x00\xf0\x00\xe9\x0e\x80" "\x00\xf4\xc9\x78\xd1\x40\xd9\x00\xe8\x03\xf5\x10\x09\x21\xd9\x06" "\xe9\x0f\x61\x06\xf4\xc8\x78\xd1\x40\xd8\x00\xe8\x02\xd5\x06\x41" "\x06\xf4\xe0\xc7\xe1\xc7\xcc\xda\xfc\xf7\x00\xfd\xff\xc4\xda\xfc" "\xcc\x44\xfc\xf7\x00\xfe\xff\xc4\x44\xfc\xf2\x7c\xd0\x04\xcc\x5b" "\x80\xd8\x01\xe9\x02\x7c\x04\xf4\x75\x6f\xd1\x40\x51\x20\xfe\xf4" "\xe0\x10\xce\xc7\xa4\x0a\x08\x00\x01\x00\x00\x00" ; const int drive_20010831_firmware_size = 380; Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/gcn-di/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 17 May 2005 20:59:19 -0000 1.3 +++ Makefile 10 Jul 2005 15:14:36 -0000 1.4 @@ -1,7 +1,8 @@ obj-$(CONFIG_GAMECUBE_DI) += gcn-di.o -$(obj)/gcn-di.o: $(obj)/drive_20020402.h \ - $(obj)/drive_20010608.h \ +$(obj)/gcn-di.o: $(obj)/drive_20010608.h \ + $(obj)/drive_20010831.h \ + $(obj)/drive_20020402.h \ $(obj)/drive_20020823.h #CONFIG_GAMECUBE_DI_BUILD_FIRMWARE=y @@ -24,16 +25,21 @@ rm -f $(obj)/$(@F).o $(obj)/$(@F).elf $(obj)/$(@F).bin $(obj)/$(@F).s -targets += drive_20020402.h -$(obj)/drive_20020402.h: DRIVE_MODEL := 0x20020402 -$(obj)/drive_20020402.h: $(src)/drive_all.S FORCE - $(call if_changed,build_difw) - targets += drive_20010608.h $(obj)/drive_20010608.h: DRIVE_MODEL := 0x20010608 $(obj)/drive_20010608.h: $(src)/drive_all.S FORCE $(call if_changed,build_difw) +targets += drive_20010831.h +$(obj)/drive_20010831.h: DRIVE_MODEL := 0x20010831 +$(obj)/drive_20010831.h: $(src)/drive_all.S FORCE + $(call if_changed,build_difw) + +targets += drive_20020402.h +$(obj)/drive_20020402.h: DRIVE_MODEL := 0x20020402 +$(obj)/drive_20020402.h: $(src)/drive_all.S FORCE + $(call if_changed,build_difw) + targets += drive_20020823.h $(obj)/drive_20020823.h: DRIVE_MODEL := 0x20020823 $(obj)/drive_20020823.h: $(src)/drive_all.S FORCE Index: drive_all.S =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/gcn-di/drive_all.S,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- drive_all.S 11 Jun 2005 22:51:16 -0000 1.3 +++ drive_all.S 10 Jul 2005 15:14:36 -0000 1.4 @@ -30,8 +30,8 @@ .equ ADB1ON, (1<<3) -.equ irq_handler_vector, 0x804c /* 04, 06, 08 */ -.equ irq_depth, 0x805b /* 04, 06, 08 */ +.equ irq_handler_vector, 0x804c /* 04, 06, 08, Panasonic Q */ +.equ irq_depth, 0x805b /* 04, 06, 08, Panasonic Q */ .equ fake_command, 0xaa .equ set_drive_status_command, 0xee /* same as in gcn-di.c */ @@ -61,7 +61,7 @@ .section absolute - .org 0x0808aa /* 04, 06, 08 */ + .org 0x0808aa /* 04, 06, 08, Panasonic Q */ initialize_drive: .org 0x082f27 /* 04, 08 */ @@ -80,7 +80,6 @@ .equ disable_extensions_when_called_from, 0x0885c1 /* 04, 08 */ - #elif DRIVE_MODEL == 0x20010608 /* 06 */ .equ cmdbuf0, 0x80a8 @@ -102,7 +101,7 @@ .section absolute - .org 0x0808aa /* 04, 06, 08 */ + .org 0x0808aa /* 04, 06, 08, Panasonic Q */ initialize_drive: .org 0x082f2e @@ -143,7 +142,7 @@ .section absolute - .org 0x0808aa /* 04, 06, 08 */ + .org 0x0808aa /* 04, 06, 08, Panasonic Q */ initialize_drive: .org 0x082f27 /* 04, 08 */ @@ -162,6 +161,46 @@ .equ disable_extensions_when_called_from, 0x0885c1 /* 04, 08 */ +#elif DRIVE_MODEL == 0x20010831 /* Panasonic Q */ + + .equ cmdbuf0, 0x80aa + .equ drive_status, 0x81a6 + .equ drive_status2, 0x818a + + .equ bert, 0x8078 + .equ ernie, 0x8192 + .equ cactus, 0x40ed02 + + .equ entry_return_address, 0x08d640 + + .equ data1, 0x008000 + .equ data1_size, 0x6e + .equ data1_copy_from, 0x08ebf6 + + .equ bss, 0x00806e + .equ bss_size, 0x1ae + + .section absolute + + .org 0x0808aa /* 04, 06, 08, Panasonic Q */ + initialize_drive: + + .org 0x082f7a + memcpy: + + .org 0x082f9c + memset: + + .equ adb1_break_address, 0x089e39 + .org 0x089f84 + adb1_fixup_exit: + + .equ adb0_break_address, 0x08b302 + .org 0x08b30d + adb0_fixup_exit: + + .equ disable_extensions_when_called_from, 0x08867f + #else #error Sorry, unsupported drive. #endif @@ -462,7 +501,11 @@ .align 2 saved_irq_handler: +#if DRIVE_MODEL != 0x20010831 .long 0x00080A74 /* 04, 06, 08 */ +#else + .long 0x00080AA4 /* Panasonic Q */ +#endif enable_extensions: .byte 0x01 saved_cmdbuf0: Index: gcn-di.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/gcn-di/gcn-di.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gcn-di.c 6 Jul 2005 22:58:52 -0000 1.9 +++ gcn-di.c 10 Jul 2005 15:14:36 -0000 1.10 @@ -347,6 +347,20 @@ }, }; +/* + * Panasonic Q (20010831) firmware extensions. + */ + +#include "drive_20010831.h" + +static struct di_drive_code drive_20010831[] = { + [0] = { + .address = DI_DRIVE_CODE_BASE, + .len = sizeof(drive_20010831_firmware), + .code = (u8 *)drive_20010831_firmware, + }, +}; + /* * Drive operations table, incomplete. @@ -1326,6 +1340,10 @@ di_patch(ddev, drive_20020823, ARRAY_SIZE(drive_20020823)); break; + case 0x20010831: + di_patch(ddev, drive_20010831, + ARRAY_SIZE(drive_20010831)); + break; default: di_printk(KERN_ERR, "sorry, drive %x is not yet" " supported\n", |