Added NCM support (copied patch from tuna ncm support)

Change-Id: I7a676c127ec1e5c68defddcdd85e868d8bac820a