Here's a general overview of the engines found in different S40 generations:
First generation (1995-2004):
* 1.8-liter and 2.0-liter naturally aspirated gasoline engines
* 1.9-liter turbocharged diesel engine
Second generation (2004-2012):
* 1.6-liter and 1.8-liter naturally aspirated gasoline engines
* 2.0-liter and 2.4-liter naturally aspirated gasoline engines
* 2.0-liter turbocharged gasoline engines
* 1.6-liter and 2.0-liter turbocharged diesel engines
Third generation (2012-2018):
* 1.5-liter and 2.0-liter turbocharged gasoline engines
* 2.0-liter turbocharged diesel engine
Once you tell me the generation of the S40 you're interested in, I can provide you with a more detailed list of the engines offered in that specific model year.