Can't seem to write to spi flash
I just hate that this is still at the top of the 'unanswered' list, so I'm going to answer.

As stated in the comments by 'confused', there is a command called 'Global Unlock' that must be executed before writing to the flash part.