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

TOMOYO Linux Cross Reference
Linux/arch/m68k/sun3/prom/misc.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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/sun3/prom/misc.c (Architecture i386) and /arch/m68k/sun3/prom/misc.c (Architecture m68k)


  1 // SPDX-License-Identifier: GPL-2.0                 1 // SPDX-License-Identifier: GPL-2.0
  2 /*                                                  2 /*
  3  * misc.c:  Miscellaneous prom functions that       3  * misc.c:  Miscellaneous prom functions that don't belong
  4  *          anywhere else.                          4  *          anywhere else.
  5  *                                                  5  *
  6  * Copyright (C) 1995 David S. Miller (davem@c      6  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  7  */                                                 7  */
  8                                                     8 
  9 #include <linux/types.h>                            9 #include <linux/types.h>
 10 #include <linux/kernel.h>                          10 #include <linux/kernel.h>
 11 #include <linux/sched.h>                           11 #include <linux/sched.h>
 12 #include <asm/sun3-head.h>                         12 #include <asm/sun3-head.h>
 13 #include <asm/idprom.h>                            13 #include <asm/idprom.h>
 14 #include <asm/openprom.h>                          14 #include <asm/openprom.h>
 15 #include <asm/oplib.h>                             15 #include <asm/oplib.h>
 16 #include <asm/movs.h>                              16 #include <asm/movs.h>
 17                                                    17 
 18 /* Reset and reboot the machine with the comma     18 /* Reset and reboot the machine with the command 'bcommand'. */
 19 void                                               19 void
 20 prom_reboot(char *bcommand)                        20 prom_reboot(char *bcommand)
 21 {                                                  21 {
 22         unsigned long flags;                       22         unsigned long flags;
 23         local_irq_save(flags);                     23         local_irq_save(flags);
 24         (*(romvec->pv_reboot))(bcommand);          24         (*(romvec->pv_reboot))(bcommand);
 25         local_irq_restore(flags);                  25         local_irq_restore(flags);
 26 }                                                  26 }
 27                                                    27 
 28 /* Drop into the prom, with the chance to cont     28 /* Drop into the prom, with the chance to continue with the 'go'
 29  * prom command.                                   29  * prom command.
 30  */                                                30  */
 31 void                                               31 void
 32 prom_cmdline(void)                                 32 prom_cmdline(void)
 33 {                                                  33 {
 34 }                                                  34 }
 35                                                    35 
 36 /* Drop into the prom, but completely terminat     36 /* Drop into the prom, but completely terminate the program.
 37  * No chance of continuing.                        37  * No chance of continuing.
 38  */                                                38  */
 39 void                                               39 void
 40 prom_halt(void)                                    40 prom_halt(void)
 41 {                                                  41 {
 42         unsigned long flags;                       42         unsigned long flags;
 43 again:                                             43 again:
 44         local_irq_save(flags);                     44         local_irq_save(flags);
 45         (*(romvec->pv_halt))();                    45         (*(romvec->pv_halt))();
 46         local_irq_restore(flags);                  46         local_irq_restore(flags);
 47         goto again; /* PROM is out to get me -     47         goto again; /* PROM is out to get me -DaveM */
 48 }                                                  48 }
 49                                                    49 
 50 typedef void (*sfunc_t)(void);                     50 typedef void (*sfunc_t)(void);
 51                                                    51 
 52 /* Get the idprom and stuff it into buffer 'id     52 /* Get the idprom and stuff it into buffer 'idbuf'.  Returns the
 53  * format type.  'num_bytes' is the number of      53  * format type.  'num_bytes' is the number of bytes that your idbuf
 54  * has space for.  Returns 0xff on error.          54  * has space for.  Returns 0xff on error.
 55  */                                                55  */
 56 unsigned char                                      56 unsigned char
 57 prom_get_idprom(char *idbuf, int num_bytes)        57 prom_get_idprom(char *idbuf, int num_bytes)
 58 {                                                  58 {
 59         int i, oldsfc;                             59         int i, oldsfc;
 60         GET_SFC(oldsfc);                           60         GET_SFC(oldsfc);
 61         SET_SFC(FC_CONTROL);                       61         SET_SFC(FC_CONTROL);
 62         for(i=0;i<num_bytes; i++)                  62         for(i=0;i<num_bytes; i++)
 63         {                                          63         {
 64                 /* There is a problem with the     64                 /* There is a problem with the GET_CONTROL_BYTE
 65                 macro; defining the extra vari     65                 macro; defining the extra variable
 66                 gets around it.                    66                 gets around it.
 67                 */                                 67                 */
 68                 int c;                             68                 int c;
 69                 GET_CONTROL_BYTE(SUN3_IDPROM_B     69                 GET_CONTROL_BYTE(SUN3_IDPROM_BASE + i, c);
 70                 idbuf[i] = c;                      70                 idbuf[i] = c;
 71         }                                          71         }
 72         SET_SFC(oldsfc);                           72         SET_SFC(oldsfc);
 73         return idbuf[0];                           73         return idbuf[0];
 74 }                                                  74 }
 75                                                    75 
 76 /* Get the major prom version number. */           76 /* Get the major prom version number. */
 77 int                                                77 int
 78 prom_version(void)                                 78 prom_version(void)
 79 {                                                  79 {
 80         return romvec->pv_romvers;                 80         return romvec->pv_romvers;
 81 }                                                  81 }
 82                                                    82 
 83 /* Get the prom plugin-revision. */                83 /* Get the prom plugin-revision. */
 84 int                                                84 int
 85 prom_getrev(void)                                  85 prom_getrev(void)
 86 {                                                  86 {
 87         return prom_rev;                           87         return prom_rev;
 88 }                                                  88 }
 89                                                    89 
 90 /* Get the prom firmware print revision. */        90 /* Get the prom firmware print revision. */
 91 int                                                91 int
 92 prom_getprev(void)                                 92 prom_getprev(void)
 93 {                                                  93 {
 94         return prom_prev;                          94         return prom_prev;
 95 }                                                  95 }
 96                                                    96 

~ [ 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