imx: Move some i.MX common functions into the imx-common directory