1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Maxtor Shared Storage II Board Setup
5 * Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com>
8 #include <linux/kernel.h>
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/pci.h>
12 #include <linux/irq.h>
13 #include <asm/mach-types.h>
14 #include <asm/mach/arch.h>
15 #include <asm/mach/pci.h>
17 #include "bridge-regs.h"
20 /*****************************************************************************
21 * Maxtor Shared Storage II Info
22 ****************************************************************************/
24 /****************************************************************************
26 ****************************************************************************/
27 static int __init
mss2_pci_map_irq(const struct pci_dev
*dev
, u8 slot
, u8 pin
)
32 * Check for devices with hard-wired IRQs.
34 irq
= orion5x_pci_map_irq(dev
, slot
, pin
);
41 static struct hw_pci mss2_pci __initdata
= {
43 .setup
= orion5x_pci_sys_setup
,
44 .scan
= orion5x_pci_sys_scan_bus
,
45 .map_irq
= mss2_pci_map_irq
,
48 static int __init
mss2_pci_init(void)
50 if (machine_is_mss2())
51 pci_common_init(&mss2_pci
);
55 subsys_initcall(mss2_pci_init
);
57 /*****************************************************************************
58 * MSS2 power off method
59 ****************************************************************************/
61 * On the Maxtor Shared Storage II, the shutdown process is the following :
62 * - Userland modifies U-boot env to tell U-boot to go idle at next boot
64 * - U-boot starts and go into an idle mode until the user press "power"
66 static void mss2_power_off(void)
71 * Enable and issue soft reset
73 reg
= readl(RSTOUTn_MASK
);
75 writel(reg
, RSTOUTn_MASK
);
77 reg
= readl(CPU_SOFT_RESET
);
79 writel(reg
, CPU_SOFT_RESET
);
82 void __init
mss2_init(void)
84 /* register mss2 specific power-off method */
85 pm_power_off
= mss2_power_off
;