Green’s Dictionary of Slang

farm n.3

[abbr. funny farm under funny adj.1 ]

(US) a psychiatric institution.

[US]Monteleone Criminal Sl. (rev. edn).
[US](con. 1949) J.G. Dunne True Confessions (1979) 170: She’s ready for the farm, but she won’t file charges.