~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/sun3/intersil.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/sun3/intersil.c (Architecture mips) and /arch/alpha/sun3/intersil.c (Architecture alpha)


  1 /*                                                  1 
  2  * arch/m68k/sun3/intersil.c                      
  3  *                                                
  4  * basic routines for accessing the intersil c    
  5  *                                                
  6  * started 11/12/1999 Sam Creasey                 
  7  *                                                
  8  * This file is subject to the terms and condi    
  9  * License.  See the file COPYING in the main     
 10  * for more details.                              
 11  */                                               
 12                                                   
 13 #include <linux/kernel.h>                         
 14 #include <linux/rtc.h>                            
 15                                                   
 16 #include <asm/errno.h>                            
 17 #include <asm/intersil.h>                         
 18 #include <asm/machdep.h>                          
 19                                                   
 20 #include "sun3.h"                                 
 21                                                   
 22 /* bits to set for start/run of the intersil *    
 23 #define STOP_VAL (INTERSIL_STOP | INTERSIL_INT    
 24 #define START_VAL (INTERSIL_RUN | INTERSIL_INT    
 25                                                   
 26 /* get/set hwclock */                             
 27                                                   
 28 int sun3_hwclk(int set, struct rtc_time *t)       
 29 {                                                 
 30         volatile struct intersil_dt *todinters    
 31         unsigned long flags;                      
 32                                                   
 33         todintersil = (struct intersil_dt *) &    
 34                                                   
 35         local_irq_save(flags);                    
 36                                                   
 37         intersil_clock->cmd_reg = STOP_VAL;       
 38                                                   
 39         /* set or read the clock */               
 40         if(set) {                                 
 41                 todintersil->csec = 0;            
 42                 todintersil->hour = t->tm_hour    
 43                 todintersil->minute = t->tm_mi    
 44                 todintersil->second = t->tm_se    
 45                 todintersil->month = t->tm_mon    
 46                 todintersil->day = t->tm_mday;    
 47                 todintersil->year = (t->tm_yea    
 48                 todintersil->weekday = t->tm_w    
 49         } else {                                  
 50                 /* read clock */                  
 51                 t->tm_sec = todintersil->csec;    
 52                 t->tm_hour = todintersil->hour    
 53                 t->tm_min = todintersil->minut    
 54                 t->tm_sec = todintersil->secon    
 55                 t->tm_mon = todintersil->month    
 56                 t->tm_mday = todintersil->day;    
 57                 t->tm_year = todintersil->year    
 58                 t->tm_wday = todintersil->week    
 59                 if (t->tm_year < 70)              
 60                         t->tm_year += 100;        
 61         }                                         
 62                                                   
 63         intersil_clock->cmd_reg = START_VAL;      
 64                                                   
 65         local_irq_restore(flags);                 
 66                                                   
 67         return 0;                                 
 68                                                   
 69 }                                                 
 70                                                   
 71                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php