PL050 PS/2 Controller

From OSDev.wiki
Revision as of 04:17, 25 March 2012 by Brendan (talk | contribs) (Shifting PL050 stuff)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page is a stub.
You can help the wiki by accurately adding more contents to it.

Another example is the ARM Integrator/CP board which implements the PS/2 interface encapsulated in the PL050 (where the PL050 is analogous to the I8042) except you communicate with the PL050 differently than the I8042. But, after the PL050 is configured you then proceed with the PS/2 mouse protocol. For example:

	KMI_MMIO	volatile *mmio;
	uint32       tmp;
	mmio = (KMI_MMIO*)KMI_MS_BASE;
	mmio->cr = 0x4;
	/* talk to the PS2 controller and enable it */
	mmio->data = 0xF4;
	/* keyboard sends back ACK */
	while(!KMI_TXFULL(mmio->stat));
	tmp = mmio->data;

The above uses memory mapped input/output (MMIO), but other architectures may use I/O ports instead or a combination of I/O ports and MMIO for example the X84/64. So understanding your platform is very important to understand how to proceed in talking to the devices.

Above, the PL050 is also called the KMI (Keyboard And Mouse Interface). So first we have to configure the PL050 by enabling it. Now, it provides a interface to the PS2 interface which then interfaces with the mouse. So, the next thing I have to do is write the value 0xF4 which you can find in the table above to enable the mouse.


See Also

External Links