/* Unfortunately, this has the side effect that a writable INTERNAL_REG_BASE_ADDR is impossible. Oh well.  */
void my_remap_gt_regs(u32 cur_loc, u32 new_loc)
/* Unfortunately, this has the side effect that a writable INTERNAL_REG_BASE_ADDR is impossible. Oh well.  */
void my_remap_gt_regs(u32 cur_loc, u32 new_loc)
{
	u32 temp;
	temp = in_le32 ((u32 *) (new_loc + INTERNAL_SPACE_DECODE));
	if ((temp & 0xffff) == new_loc >> 16)
		return;
	temp = (in_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE)) &
		0xffff0000) | (new_loc >> 16);
	out_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE), temp);
	while (GTREGREAD (INTERNAL_SPACE_DECODE) != temp);
}