some minor modification to at25f512b