US STOCKS-Wall Street ends stronger after volatile session
* S&P 500 ends higher after early decline
* U.S. oil prices reverse losses
* China slowdown fears have dragged commodities towards 2015 lows
* AMD revenue warning weighs on semiconductor companies
* Indexes end higher: Dow 0.53 pct, S&P 0.61 pct, Nasdaq 0.11 pct (Updates with detail on Greece, Iran negotiations)
By Noel Randewich
July 7 (Reuters) - U.S. stocks ended higher after a choppy session on Tuesday, as a rebound in U.S. oil prices helped offset concerns about a slowdown in China and the Greek debt crisis.
The S&P energy index reversed course to trade up 0.9 percent as U.S. crude oil rose 0.7 percent after trading as much as 3.7 percent lower earlier in the day.
Oil markets have been keeping a close eye on negotiations between Iran and six major powers over a nuclear deal. The sides gave themselves at least until Friday to reach an agreement on the Iranian nuclear program, but a source from one of the powers said on Tuesday they had to wrap up in the next 48 hours. Continuación...