diff options
| author | Miguel <m.i@gmx.at> | 2018-08-22 16:35:12 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-08-22 16:35:12 +0200 |
| commit | 98bf7b67543b36b6fe49f2b68c115ebeaf630603 (patch) | |
| tree | aad818381dfc42c4158b923d588bbe8d34f51e51 /xxx/inactive | |
| parent | 323fb9d3e09903d6fa43ef7e1f0cc8934414c8d4 (diff) | |
cleanup logging
Diffstat (limited to 'xxx/inactive')
| -rw-r--r-- | xxx/inactive/floppy.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/xxx/inactive/floppy.c b/xxx/inactive/floppy.c index b7c2f55..842b7d9 100644 --- a/xxx/inactive/floppy.c +++ b/xxx/inactive/floppy.c @@ -57,7 +57,7 @@ void flpydsk_initialize_dma () { x86_outb (0x80, 0); //external page register = 0 x86_outb (0x0a, 0x02); //unmask dma channel 2 - log("dma",5,"initialized"); + klog("initialized"); } //! prepare the DMA for read transfer @@ -67,7 +67,7 @@ void flpydsk_dma_read () { x86_outb (0x0b, 0x56); //single transfer, address increment, autoinit, read, channel 2 x86_outb (0x0a, 0x02); //unmask dma channel 2 - log("dma",5,"configured for reading"); + klog("configured for reading"); } //! prepare the DMA for write transfer @@ -76,7 +76,7 @@ void flpydsk_dma_write () { x86_outb (0x0a, 0x06); //mask dma channel 2 x86_outb (0x0b, 0x5a); //single transfer, address increment, autoinit, write, channel 2 x86_outb (0x0a, 0x02); //unmask dma channel 2 - log("dma",5,"configured for writing"); + klog("configured for writing"); } // // @@ -169,7 +169,7 @@ void flpydsk_write_ccr (uint8_t val) { void flpydsk_motor_on() { - log(FOOLOS_MODULE_NAME,20,"starting motor..."); + klog("starting motor..."); //x86_outb (FLPYDSK_DOR, FLPYDSK_DOR_MASK_DRIVE0_MOTOR | FLPYDSK_DOR_MASK_RESET); x86_outb (FLPYDSK_DOR, 0x1c); sleep(10); // wait ~ 1/3 second @@ -177,7 +177,7 @@ void flpydsk_motor_on() void flpydsk_motor_off() { - log(FOOLOS_MODULE_NAME,20,"stopping motor..."); + klog("stopping motor..."); x86_outb (FLPYDSK_DOR, 0x0c); } @@ -188,7 +188,7 @@ int flpydsk_calibrate (uint32_t drive) { if (drive >= 4) { - log(FOOLOS_MODULE_NAME,5,"ERROR!"); + klog("ERROR!"); return -2; } @@ -198,7 +198,7 @@ int flpydsk_calibrate (uint32_t drive) { int i; for (i = 0; i < 10; i++) { - log(FOOLOS_MODULE_NAME,20,"calibrating"); + klog("calibrating"); //! send command flpydsk_send_command ( FDC_CMD_CALIBRATE ); flpydsk_send_command ( drive ); @@ -208,14 +208,14 @@ int flpydsk_calibrate (uint32_t drive) { //! did we fine cylinder 0? if so, we are done if (!cyl) { if(st0 & 0xC0) { - log(FOOLOS_MODULE_NAME,5,"calibrating FAILED!"); + klog("calibrating FAILED!"); } // flpydsk_control_motor (false); flpydsk_motor_off(); return 0; } } - log(FOOLOS_MODULE_NAME,5,"calibrating FAILED!"); + klog("calibrating FAILED!"); // flpydsk_control_motor (false); flpydsk_motor_off(); @@ -249,7 +249,7 @@ uint8_t flpydsk_read_data () { if ( flpydsk_read_status () & FLPYDSK_MSR_MASK_DATAREG ) return x86_inb (FLPYDSK_FIFO); - log(FOOLOS_MODULE_NAME,5,"reading data FAILED!"); + klog("reading data FAILED!"); } void flpydsk_send_command (uint8_t cmd) { @@ -261,7 +261,7 @@ void flpydsk_send_command (uint8_t cmd) { x86_outb(FLPYDSK_FIFO, cmd); return; } - log(FOOLOS_MODULE_NAME,5,"writing data FAILED!"); + klog("writing data FAILED!"); } void flpydsk_drive_data (uint32_t stepr, uint32_t loadt, uint32_t unloadt, int dma ) { @@ -282,7 +282,7 @@ void flpydsk_reset() uint32_t st0, cyl; //! reset the controller - log(FOOLOS_MODULE_NAME,20,"reset controller"); + klog("reset controller"); flpydsk_disable_controller (); flpydsk_enable_controller (); flpydsk_wait_irq (); @@ -316,7 +316,7 @@ void int_floppy_handler() void flpydsk_wait_irq() { - log(FOOLOS_MODULE_NAME,99,"waiting for irq6"); + klog("waiting for irq6"); while (1) { @@ -329,7 +329,7 @@ void flpydsk_wait_irq() _FloppyDiskIRQ = 0; x86_int_enable(); - log(FOOLOS_MODULE_NAME,99,"irq6 received"); + klog("irq6 received"); } void flpydsk_check_int (uint32_t* st0, uint32_t* cyl) { @@ -347,7 +347,7 @@ void flpydsk_write_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { flpydsk_dma_write (); //flpydsk_drive_data (13, 1, 0xf, 0); - log(FOOLOS_MODULE_NAME,20,"writing head/track/sector"); + klog("writing head/track/sector"); uint32_t st0, cyl; @@ -390,7 +390,7 @@ void flpydsk_read_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { flpydsk_dma_read (); //flpydsk_drive_data (13, 1, 0xf, 0); - log(FOOLOS_MODULE_NAME,20,"reading head/track/sector"); + klog("reading head/track/sector"); uint32_t st0, cyl; @@ -441,7 +441,7 @@ int flpydsk_seek ( uint32_t cyl, uint32_t head ) int i; for (i = 0; i < 10; i++ ) { - log(FOOLOS_MODULE_NAME,20,"seeking cyl: %d, head: %d",cyl,head); + klog("seeking cyl: %d, head: %d",cyl,head); //! send the command flpydsk_send_command (FDC_CMD_SEEK); @@ -477,7 +477,7 @@ void flpydsk_lba_to_chs (int lba,int *head,int *track,int *sector) { uint8_t* flpydsk_read_sector (int sectorLBA) { - log(FOOLOS_MODULE_NAME,20,"reading sector: %d",sectorLBA); + klog("reading sector: %d",sectorLBA); if (_CurrentDrive >= 4) @@ -508,7 +508,7 @@ uint8_t* flpydsk_read_sector (int sectorLBA) { uint8_t* flpydsk_write_sector (int sectorLBA) { - log(FOOLOS_MODULE_NAME,20,"writing sector: %d",sectorLBA); + klog("writing sector: %d",sectorLBA); if (_CurrentDrive >= 4) return 0; @@ -544,29 +544,29 @@ void floppy_init() _CurrentDrive=0; _FloppyDiskIRQ = 0; - log(FOOLOS_MODULE_NAME,5,"driver init (wathchdog: 0x%08X)",&_FloppyDiskIRQ); + klog("driver init (wathchdog: 0x%08X)",&_FloppyDiskIRQ); flpydsk_reset (); char *dma=0x0500; - log(FOOLOS_MODULE_NAME,5,"test reading"); + klog("test reading"); flpydsk_read_sector(65); - log(FOOLOS_MODULE_NAME,5,"finished reading"); + klog("finished reading"); flpydsk_reset (); flpydsk_read_sector(64); - log(FOOLOS_MODULE_NAME,5,"finished reading"); - log(FOOLOS_MODULE_NAME,5,"test read: %s",dma); + klog("finished reading"); + klog("test read: %s",dma); flpydsk_reset (); -// log(FOOLOS_MODULE_NAME,5,"test write (sector: 100)"); +// klog("test write (sector: 100)"); // flpydsk_write_sector(100); -// log(FOOLOS_MODULE_NAME,5,"finished writing"); +// klog("finished writing"); } |
