[Skiboot] [PATCH 2/2] fsp/rtc: Introduce the rtc write state machine

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Sun Mar 8 18:58:24 AEDT 2015


On 03/08/2015 12:57 PM, Vasant Hegde wrote:
> On 03/07/2015 10:34 AM, Neelesh Gupta wrote:
>> Similar to rtc read requests, have a state machine to handle the
>> write transitions.
>>
>> Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
> 
> Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> 
>> ---
>>  hw/fsp/fsp-rtc.c |  118 ++++++++++++++++++++++++++++++++++--------------------
>>  1 file changed, 74 insertions(+), 44 deletions(-)
>>
>> diff --git a/hw/fsp/fsp-rtc.c b/hw/fsp/fsp-rtc.c
>> index 2c7a592..955521b 100644
>> --- a/hw/fsp/fsp-rtc.c
>> +++ b/hw/fsp/fsp-rtc.c
>> @@ -68,9 +68,10 @@ static enum {
>>  } rtc_tod_state = RTC_TOD_INVALID;
> 
> .../...
> 
>> +
>> +static int64_t fsp_opal_rtc_write(uint32_t year_month_day,
>> +				  uint64_t hour_minute_second_millisecond)
>> +{
>> +	int rc;
>> +
>> +	lock(&rtc_lock);
> 
> Minor nit ... better check fsp present or not here.

Ignore. We don't need this check as we are checking for TOD state variable.

-Vasant



More information about the Skiboot mailing list