The Spain goalkeeper has been constantly linked with a move to Real Madrid and was set to quit after running out of patience with life under former boss Louis van Gaal.