Fixed write_field and treansfered the bit masking functionality to devmem.