/* Routine: beagle_identify Description: Detect if we are running on a Beagle revision Ax/Bx or Cx. This can be done by GPIO_171. If this is low, we are running on a revision C board.  */
void beagle_identify(void)
/* Routine: beagle_identify Description: Detect if we are running on a Beagle revision Ax/Bx or Cx. This can be done by GPIO_171. If this is low, we are running on a revision C board.  */
void beagle_identify(void)
{
	beagle_revision_c = 0;
	if (!omap_request_gpio(171)) {
		unsigned int val;
		omap_set_gpio_direction(171, 1);
		val = omap_get_gpio_datain(171);
		omap_free_gpio(171);
		if (val)
			beagle_revision_c = 0;
		else
			beagle_revision_c = 1;
	}
	printf("Board revision ");
	if (beagle_revision_c)
		printf("C\n");
	else
		printf("Ax/Bx\n");
}