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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-orion5x/board-mss2.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  * Maxtor Shared Storage II Board Setup
  3  *
  4  * Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com>
  5  *
  6  * This program is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU General Public License
  8  * as published by the Free Software Foundation; either version
  9  * 2 of the License, or (at your option) any later version.
 10  */
 11 
 12 #include <linux/kernel.h>
 13 #include <linux/init.h>
 14 #include <linux/platform_device.h>
 15 #include <linux/pci.h>
 16 #include <linux/irq.h>
 17 #include <asm/mach-types.h>
 18 #include <asm/mach/arch.h>
 19 #include <asm/mach/pci.h>
 20 #include "orion5x.h"
 21 #include "bridge-regs.h"
 22 #include "common.h"
 23 
 24 /*****************************************************************************
 25  * Maxtor Shared Storage II Info
 26  ****************************************************************************/
 27 
 28 /****************************************************************************
 29  * PCI setup
 30  ****************************************************************************/
 31 static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 32 {
 33         int irq;
 34 
 35         /*
 36          * Check for devices with hard-wired IRQs.
 37          */
 38         irq = orion5x_pci_map_irq(dev, slot, pin);
 39         if (irq != -1)
 40                 return irq;
 41 
 42         return -1;
 43 }
 44 
 45 static struct hw_pci mss2_pci __initdata = {
 46         .nr_controllers = 2,
 47         .setup          = orion5x_pci_sys_setup,
 48         .scan           = orion5x_pci_sys_scan_bus,
 49         .map_irq        = mss2_pci_map_irq,
 50 };
 51 
 52 static int __init mss2_pci_init(void)
 53 {
 54         if (machine_is_mss2())
 55                 pci_common_init(&mss2_pci);
 56 
 57         return 0;
 58 }
 59 subsys_initcall(mss2_pci_init);
 60 
 61 /*****************************************************************************
 62  * MSS2 power off method
 63  ****************************************************************************/
 64 /*
 65  * On the Maxtor Shared Storage II, the shutdown process is the following :
 66  * - Userland modifies U-boot env to tell U-boot to go idle at next boot
 67  * - The board reboots
 68  * - U-boot starts and go into an idle mode until the user press "power"
 69  */
 70 static void mss2_power_off(void)
 71 {
 72         u32 reg;
 73 
 74         /*
 75          * Enable and issue soft reset
 76          */
 77         reg = readl(RSTOUTn_MASK);
 78         reg |= 1 << 2;
 79         writel(reg, RSTOUTn_MASK);
 80 
 81         reg = readl(CPU_SOFT_RESET);
 82         reg |= 1;
 83         writel(reg, CPU_SOFT_RESET);
 84 }
 85 
 86 void __init mss2_init(void)
 87 {
 88         /* register mss2 specific power-off method */
 89         pm_power_off = mss2_power_off;
 90 }
 91 

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