What are you protecting against?
What type of motor?
If it is reverse EMF/current from the motor, the diode should be across the motor. Assuming protecting from reverse EMF/current from the motor....
In general the calculation will be something along the lines of:
- when transistor switched off, the same current will continue to flow through the inductor and diode; hence the diode must be able to take that forward current
- energy stored in the inductor will have to be dissipated somewhere; that will be in the diode with a 0.6V drop, so you can work out how long the current will flow
- if you want faster dissipation then add a resistor in series with the diode, thus "increasing the 0.6V" to V=0.6+IR; choose R so that V does not damage the other components
You would be well advised to find application notes for drivers for the type of motor you are using