Once Rangadasa, a staunch devotee of Vishnu, joined Vaikhanasa Gopinatha, who was going to Tirumala to worship Lord Venkateswara. After bathing in the Swami Pushkarini, he beheld the lotus-eyed and blue-bodied Vishnu resting beneath a tamarind tree. He lay exposed to the sun, wind and rain and was protected only by the wings of Garuda. Astounded Rangadasa raised a rough wall of stones around the deity, and started supplying flowers to Gopinatha for worship everyday. But one day he got distracted and forgot to supply flowers. The Lord revealed himself and told Rangadasa He had been testing the latter`s continence. However, the Lord accepted his devoted service and blessed Rangadasa that he would be reborn as an affluent ruler and would continue to serve the Lord, and would construct a beautiful temple with a vimana and high surrounding walls, and earn eternal glory.
Rangadasa was reborn as Tondaman, son of rulers Suvira and Nandini. Tondaman. One day, he set out on a hunting expedition on the Tirumala Hill, and saw Vishnu under the same tamarind tree. He returned home, deeply affected. On inheriting the kingdom Tondaman according to the directions constructed a prakaram and dvara gopura, and arranged for regular worship of the Lord. In the Kali Yuga, ruler of Tondamandalam daughter of Akasaraja, the Tondamandalam ruler, Padmavathi was ultimately married Venkateswara.