Check these keys for Intel chipset, set to 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Msahci
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\IastorV
Changing from RAID to AHCI, you may need one more step. Msahci driver requires Atapi.sys miniport to be loaded during boot as well.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\atapi
For AMD chipsets
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\nvstor
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\nvraid
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\amdsata (non raid)