[Drivers] re-write serial framework.