Barnsley have completed the signing of Crystal Palace defender Peter Ramage on a season-long loan deal.