OMAP3: Move get_cpu_id() function to not duplicate code