Edward James Olmos has admitted the thought of giving up "entered his mind" a lot during cancer treatment.