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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * ip22-setup.c: SGI specific setup, including init of the feature struct.
  4  *
  5  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  6  * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
  7  */
  8 #include <linux/init.h>
  9 #include <linux/kernel.h>
 10 #include <linux/kdev_t.h>
 11 #include <linux/types.h>
 12 #include <linux/console.h>
 13 #include <linux/sched.h>
 14 #include <linux/tty.h>
 15 
 16 #include <asm/addrspace.h>
 17 #include <asm/bcache.h>
 18 #include <asm/bootinfo.h>
 19 #include <asm/irq.h>
 20 #include <asm/reboot.h>
 21 #include <asm/time.h>
 22 #include <asm/io.h>
 23 #include <asm/traps.h>
 24 #include <asm/sgialib.h>
 25 #include <asm/sgi/mc.h>
 26 #include <asm/sgi/hpc3.h>
 27 #include <asm/sgi/ip22.h>
 28 
 29 void __init plat_mem_setup(void)
 30 {
 31         char *ctype;
 32         char *cserial;
 33 
 34         board_be_init = ip22_be_init;
 35 
 36         /* Init the INDY HPC I/O controller.  Need to call this before
 37          * fucking with the memory controller because it needs to know the
 38          * boardID and whether this is a Guiness or a FullHouse machine.
 39          */
 40         sgihpc_init();
 41 
 42         /* Init INDY memory controller. */
 43         sgimc_init();
 44 
 45 #ifdef CONFIG_BOARD_SCACHE
 46         /* Now enable boardcaches, if any. */
 47         indy_sc_init();
 48 #endif
 49 
 50         /* Set EISA IO port base for Indigo2
 51          * ioremap cannot fail */
 52         set_io_port_base((unsigned long)ioremap(0x00080000,
 53                                                 0x1fffffff - 0x00080000));
 54         /* ARCS console environment variable is set to "g?" for
 55          * graphics console, it is set to "d" for the first serial
 56          * line and "d2" for the second serial line.
 57          *
 58          * Need to check if the case is 'g' but no keyboard:
 59          * (ConsoleIn/Out = serial)
 60          */
 61         ctype = ArcGetEnvironmentVariable("console");
 62         cserial = ArcGetEnvironmentVariable("ConsoleOut");
 63 
 64         if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) {
 65                 static char options[8] __initdata;
 66                 char *baud = ArcGetEnvironmentVariable("dbaud");
 67                 if (baud)
 68                         strcpy(options, baud);
 69                 add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
 70                                       baud ? options : NULL);
 71         } else if (!ctype || *ctype != 'g') {
 72                 /* Use ARC if we don't want serial ('d') or graphics ('g'). */
 73                 prom_flags |= PROM_FLAG_USE_AS_CONSOLE;
 74                 add_preferred_console("arc", 0, NULL);
 75         }
 76 }
 77 

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