hw/sd: add card-reparenting function