OMAP3: Move get_cpu_type() function to not duplicate code