[U-Boot] [PATCH v4 1/4] Refactor do_reset() into board-specific and CPU-specific portions

Moffett, Kyle D Kyle.D.Moffett at boeing.com
Thu Feb 24 17:24:02 CET 2011


On Feb 23, 2011, at 14:35, Mike Frysinger wrote:
> On Wednesday, February 23, 2011 14:28:44 Kyle Moffett wrote:
>> +__attribute__((__weak__)) int arch_reset(void)
>> +{
>> +	return 0;
>> +}
> 
> is there any cpu which wouldnt provide arch_reset() ?  i dont think it was 
> possible in the past to do this, so i dont see any value in supporting this.

Hmm, good point.

Although, I think there are a few CPUs which fundamentally cannot reset on their own (they rely on external board-specific hardware triggered by GPIOs).

Perhaps the default should instead be something like this?

  __attribute__((__weak__)) int arch_reset(void)
  {
          while(1);
  }

Having a default might make it easier to do the initial standup of a new CPU type (less code to write initially), but you wouldn't get any obvious errors about the fact that you are missing functionality.

I can't really form enough of an opinion to care either way, so if you have any strong preferences please let me know.

Thanks for the review!

Cheers,
Kyle Moffett



More information about the U-Boot mailing list