Boil the potatoes whole. Peel and mash into coarse chunks. Set aside.
Heat the oil in a frying pan. Add the urad dal, chana dal, mustard seeds, and red chillis. When the seeds splutter, add the asafoetida powder. Add the onions, green chillis, and curry leaves. Fry till onions are a little browned, about 3 minutes.
Add the potatoes, turmeric powder, chilli powder, salt, and ginger. Mix well and stir fry till the potatoes are heated through, about 5 minutes. Add the lime juice and coriander leaves. Serve immediately with rice and ghee.