Revision eb38c52c hw/omap1.c

b/hw/omap1.c
3478 3478

  
3479 3479
    switch (offset) {
3480 3480
    case 0x00:	/* SECONDS_REG */
3481
#if ALMDEBUG
3481
#ifdef ALMDEBUG
3482 3482
        printf("RTC SEC_REG <-- %02x\n", value);
3483 3483
#endif
3484 3484
        s->ti -= s->current_tm.tm_sec;
......
3486 3486
        return;
3487 3487

  
3488 3488
    case 0x04:	/* MINUTES_REG */
3489
#if ALMDEBUG
3489
#ifdef ALMDEBUG
3490 3490
        printf("RTC MIN_REG <-- %02x\n", value);
3491 3491
#endif
3492 3492
        s->ti -= s->current_tm.tm_min * 60;
......
3494 3494
        return;
3495 3495

  
3496 3496
    case 0x08:	/* HOURS_REG */
3497
#if ALMDEBUG
3497
#ifdef ALMDEBUG
3498 3498
        printf("RTC HRS_REG <-- %02x\n", value);
3499 3499
#endif
3500 3500
        s->ti -= s->current_tm.tm_hour * 3600;
......
3506 3506
        return;
3507 3507

  
3508 3508
    case 0x0c:	/* DAYS_REG */
3509
#if ALMDEBUG
3509
#ifdef ALMDEBUG
3510 3510
        printf("RTC DAY_REG <-- %02x\n", value);
3511 3511
#endif
3512 3512
        s->ti -= s->current_tm.tm_mday * 86400;
......
3514 3514
        return;
3515 3515

  
3516 3516
    case 0x10:	/* MONTHS_REG */
3517
#if ALMDEBUG
3517
#ifdef ALMDEBUG
3518 3518
        printf("RTC MTH_REG <-- %02x\n", value);
3519 3519
#endif
3520 3520
        memcpy(&new_tm, &s->current_tm, sizeof(new_tm));
......
3533 3533
        return;
3534 3534

  
3535 3535
    case 0x14:	/* YEARS_REG */
3536
#if ALMDEBUG
3536
#ifdef ALMDEBUG
3537 3537
        printf("RTC YRS_REG <-- %02x\n", value);
3538 3538
#endif
3539 3539
        memcpy(&new_tm, &s->current_tm, sizeof(new_tm));
......
3555 3555
        return;	/* Ignored */
3556 3556

  
3557 3557
    case 0x20:	/* ALARM_SECONDS_REG */
3558
#if ALMDEBUG
3558
#ifdef ALMDEBUG
3559 3559
        printf("ALM SEC_REG <-- %02x\n", value);
3560 3560
#endif
3561 3561
        s->alarm_tm.tm_sec = omap_rtc_bin(value);
......
3563 3563
        return;
3564 3564

  
3565 3565
    case 0x24:	/* ALARM_MINUTES_REG */
3566
#if ALMDEBUG
3566
#ifdef ALMDEBUG
3567 3567
        printf("ALM MIN_REG <-- %02x\n", value);
3568 3568
#endif
3569 3569
        s->alarm_tm.tm_min = omap_rtc_bin(value);
......
3571 3571
        return;
3572 3572

  
3573 3573
    case 0x28:	/* ALARM_HOURS_REG */
3574
#if ALMDEBUG
3574
#ifdef ALMDEBUG
3575 3575
        printf("ALM HRS_REG <-- %02x\n", value);
3576 3576
#endif
3577 3577
        if (s->pm_am)
......
3584 3584
        return;
3585 3585

  
3586 3586
    case 0x2c:	/* ALARM_DAYS_REG */
3587
#if ALMDEBUG
3587
#ifdef ALMDEBUG
3588 3588
        printf("ALM DAY_REG <-- %02x\n", value);
3589 3589
#endif
3590 3590
        s->alarm_tm.tm_mday = omap_rtc_bin(value);
......
3592 3592
        return;
3593 3593

  
3594 3594
    case 0x30:	/* ALARM_MONTHS_REG */
3595
#if ALMDEBUG
3595
#ifdef ALMDEBUG
3596 3596
        printf("ALM MON_REG <-- %02x\n", value);
3597 3597
#endif
3598 3598
        s->alarm_tm.tm_mon = omap_rtc_bin(value);
......
3600 3600
        return;
3601 3601

  
3602 3602
    case 0x34:	/* ALARM_YEARS_REG */
3603
#if ALMDEBUG
3603
#ifdef ALMDEBUG
3604 3604
        printf("ALM YRS_REG <-- %02x\n", value);
3605 3605
#endif
3606 3606
        s->alarm_tm.tm_year = omap_rtc_bin(value);
......
3608 3608
        return;
3609 3609

  
3610 3610
    case 0x40:	/* RTC_CTRL_REG */
3611
#if ALMDEBUG
3611
#ifdef ALMDEBUG
3612 3612
        printf("RTC CONTROL <-- %02x\n", value);
3613 3613
#endif
3614 3614
        s->pm_am = (value >> 3) & 1;
......
3620 3620
        return;
3621 3621

  
3622 3622
    case 0x44:	/* RTC_STATUS_REG */
3623
#if ALMDEBUG
3623
#ifdef ALMDEBUG
3624 3624
        printf("RTC STATUSL <-- %02x\n", value);
3625 3625
#endif
3626 3626
        s->status &= ~((value & 0xc0) ^ 0x80);
......
3628 3628
        return;
3629 3629

  
3630 3630
    case 0x48:	/* RTC_INTERRUPTS_REG */
3631
#if ALMDEBUG
3631
#ifdef ALMDEBUG
3632 3632
        printf("RTC INTRS <-- %02x\n", value);
3633 3633
#endif
3634 3634
        s->interrupts = value;
3635 3635
        return;
3636 3636

  
3637 3637
    case 0x4c:	/* RTC_COMP_LSB_REG */
3638
#if ALMDEBUG
3638
#ifdef ALMDEBUG
3639 3639
        printf("RTC COMPLSB <-- %02x\n", value);
3640 3640
#endif
3641 3641
        s->comp_reg &= 0xff00;
......
3643 3643
        return;
3644 3644

  
3645 3645
    case 0x50:	/* RTC_COMP_MSB_REG */
3646
#if ALMDEBUG
3646
#ifdef ALMDEBUG
3647 3647
        printf("RTC COMPMSB <-- %02x\n", value);
3648 3648
#endif
3649 3649
        s->comp_reg &= 0x00ff;

Also available in: Unified diff