This is cloned from TI arago linux kernel source