/* assuming the pin is muxed as a gpio output, set its value.  */
int at91_set_pio_value(unsigned port, unsigned pin, int value)
/* assuming the pin is muxed as a gpio output, set its value.  */
int at91_set_pio_value(unsigned port, unsigned pin, int value)
{
	at91_pio_t	*pio 	= (at91_pio_t *) AT91_PIO_BASE;
	u32		mask;
	if ((port < AT91_PIO_PORTS) && (pin < 32)) {
		mask = 1 << pin;
		if (value)
			writel(mask, &pio->port[port].sodr);
		else
			writel(mask, &pio->port[port].codr);
	}
	return 0;
}