Register only via a specific e-mail domain
the "user restrictions module" is supposed to offer that feature. But it doesn't seem ready for production yet. However you could use the code to write your own.

I also tried to do it with the rules module and setup a rule for the "event" "user: before saving account" with a condition "data comparison" on field "account:mail". 
Add "value contains" and use "@whatever.com" and then check the "negate" box. That will basically trigger the rule for all emails that don't contain @whatever.com.

However I couldn't find a way to stop the username from getting saved. If you use the event "user: after saving account" you can show an error to the user and block the account. It prevents the registration but shows a second message to your user "you'll get notified by the administrator". Not a great experience for your customers.