~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/x86/kernel/acpi/realmode/wakemain.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        }
62
62
}
63
63
 
 
64
#define I8042_STATUS_REG        0x64
 
65
#define I8042_DATA_REG          0x60
 
66
#define I8042_SET_LED_BITS      0xed
 
67
#define I8042_STR_IBF           0x02
 
68
 
 
69
static void flash_keyboard_leds(void)
 
70
{
 
71
        int i;
 
72
        unsigned char leds = 7;
 
73
 
 
74
        /* Flash keyboard LEDs 3 times */
 
75
        for (i = 0; i < 6; i++) {
 
76
                while (inb(I8042_STATUS_REG) & I8042_STR_IBF)
 
77
                        ;
 
78
                outb(I8042_SET_LED_BITS, I8042_DATA_REG);
 
79
                while (inb(I8042_STATUS_REG) & I8042_STR_IBF)
 
80
                        ;
 
81
                outb(leds, I8042_DATA_REG);
 
82
                leds ^= 7;
 
83
                udelay(500000);
 
84
        }
 
85
}
 
86
 
 
87
 
64
88
void main(void)
65
89
{
66
90
        /* Kill machine if structures are wrong */
78
102
                probe_cards(0);
79
103
                set_mode(wakeup_header.video_mode);
80
104
        }
 
105
 
 
106
        if (wakeup_header.realmode_flags & 8)
 
107
                flash_keyboard_leds();
81
108
}