2 * Maxtor Shared Storage II Board Setup
4 * Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com>
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.
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>
21 #include "bridge-regs.h"
24 /*****************************************************************************
25 * Maxtor Shared Storage II Info
26 ****************************************************************************/
28 /****************************************************************************
30 ****************************************************************************/
31 static int __init
mss2_pci_map_irq(const struct pci_dev
*dev
, u8 slot
, u8 pin
)
36 * Check for devices with hard-wired IRQs.
38 irq
= orion5x_pci_map_irq(dev
, slot
, pin
);
45 static struct hw_pci mss2_pci __initdata
= {
47 .setup
= orion5x_pci_sys_setup
,
48 .scan
= orion5x_pci_sys_scan_bus
,
49 .map_irq
= mss2_pci_map_irq
,
52 static int __init
mss2_pci_init(void)
54 if (machine_is_mss2())
55 pci_common_init(&mss2_pci
);
59 subsys_initcall(mss2_pci_init
);
61 /*****************************************************************************
62 * MSS2 power off method
63 ****************************************************************************/
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
68 * - U-boot starts and go into an idle mode until the user press "power"
70 static void mss2_power_off(void)
75 * Enable and issue soft reset
77 reg
= readl(RSTOUTn_MASK
);
79 writel(reg
, RSTOUTn_MASK
);
81 reg
= readl(CPU_SOFT_RESET
);
83 writel(reg
, CPU_SOFT_RESET
);
86 void __init
mss2_init(void)
88 /* register mss2 specific power-off method */
89 pm_power_off
= mss2_power_off
;