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

TOMOYO Linux Cross Reference
Linux/arch/mips/sgi-ip22/ip22-hpc.c

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * ip22-hpc.c: Routines for generic manipulation of the HPC controllers.
  3  *
  4  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  5  * Copyright (C) 1998 Ralf Baechle
  6  */
  7 
  8 #include <linux/init.h>
  9 #include <linux/module.h>
 10 #include <linux/types.h>
 11 
 12 #include <asm/io.h>
 13 #include <asm/sgi/hpc3.h>
 14 #include <asm/sgi/ioc.h>
 15 #include <asm/sgi/ip22.h>
 16 
 17 struct hpc3_regs *hpc3c0, *hpc3c1;
 18 
 19 EXPORT_SYMBOL(hpc3c0);
 20 EXPORT_SYMBOL(hpc3c1);
 21 
 22 struct sgioc_regs *sgioc;
 23 
 24 EXPORT_SYMBOL(sgioc);
 25 
 26 /* We need software copies of these because they are write only. */
 27 u8 sgi_ioc_reset, sgi_ioc_write;
 28 
 29 extern char *system_type;
 30 
 31 void __init sgihpc_init(void)
 32 {
 33         /* ioremap can't fail */
 34         hpc3c0 = (struct hpc3_regs *)
 35                  ioremap(HPC3_CHIP0_BASE, sizeof(struct hpc3_regs));
 36         hpc3c1 = (struct hpc3_regs *)
 37                  ioremap(HPC3_CHIP1_BASE, sizeof(struct hpc3_regs));
 38         /* IOC lives in PBUS PIO channel 6 */
 39         sgioc = (struct sgioc_regs *)hpc3c0->pbus_extregs[6];
 40 
 41         hpc3c0->pbus_piocfg[6][0] |= HPC3_PIOCFG_DS16;
 42         if (ip22_is_fullhouse()) {
 43                 /* Full House comes with INT2 which lives in PBUS PIO
 44                  * channel 4 */
 45                 sgint = (struct sgint_regs *)hpc3c0->pbus_extregs[4];
 46                 system_type = "SGI Indigo2";
 47         } else {
 48                 /* Guiness comes with INT3 which is part of IOC */
 49                 sgint = &sgioc->int3;
 50                 system_type = "SGI Indy";
 51         }
 52 
 53         sgi_ioc_reset = (SGIOC_RESET_PPORT | SGIOC_RESET_KBDMOUSE |
 54                          SGIOC_RESET_EISA | SGIOC_RESET_ISDN |
 55                          SGIOC_RESET_LC0OFF);
 56 
 57         sgi_ioc_write = (SGIOC_WRITE_EASEL | SGIOC_WRITE_NTHRESH |
 58                          SGIOC_WRITE_TPSPEED | SGIOC_WRITE_EPSEL |
 59                          SGIOC_WRITE_U0AMODE | SGIOC_WRITE_U1AMODE);
 60 
 61         sgioc->reset = sgi_ioc_reset;
 62         sgioc->write = sgi_ioc_write;
 63 }
 64 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp