diff options
author | Rod Whitby <rod@whitby.id.au> | 2008-04-01 05:53:23 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-04 05:03:59 -0400 |
commit | 7e36e2f5355ab87f8946041d044b34cda01e2077 (patch) | |
tree | 634798504df6b50a1001b0ea439d3d0987c46319 /arch/arm/mach-ixp4xx/fsg-pci.c | |
parent | 05dda977f2574c3341abef9b74c27d2b362e1e3a (diff) |
[ARM] 4874/2: ixp4xx: Add support for the Freecom FSG-3 board
The Freecom-FSG3 is a small network-attached-storage device with the
following feature set:
* Intel IXP422
* 4MB Flash (ixp4xx flash driver)
* 64MB RAM
* 4 USB 2.0 host ports (ehci and ohci drivers)
* 1 WAN (eth1) and 3 LAN (eth0) ethernet ports
* Supported by the open source ixp4xx ethernet driver
* Via VT6421 disk controller (libata and sata-via drivers)
* Internal hard disk (PATA supported, SATA not yet supported)
* External SATA port (not yet supported)
* ISL1208 RTC chip
* Winbond 83782 temp sensor and fan controller
* MiniPCI slot
The ixp4xx_defconfig is also updated to support this device (the
leds-fsg driver is to be submitted separately via the leds tree after
this initial support is merged, as it depends on header gpio defines).
Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/fsg-pci.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/fsg-pci.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c new file mode 100644 index 000000000000..f19f3f6feda1 --- /dev/null +++ b/arch/arm/mach-ixp4xx/fsg-pci.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * arch/arch/mach-ixp4xx/fsg-pci.c | ||
3 | * | ||
4 | * FSG board-level PCI initialization | ||
5 | * | ||
6 | * Author: Rod Whitby <rod@whitby.id.au> | ||
7 | * Maintainer: http://www.nslu2-linux.org/ | ||
8 | * | ||
9 | * based on ixdp425-pci.c: | ||
10 | * Copyright (C) 2002 Intel Corporation. | ||
11 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/pci.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/irq.h> | ||
22 | |||
23 | #include <asm/mach/pci.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | |||
26 | void __init fsg_pci_preinit(void) | ||
27 | { | ||
28 | set_irq_type(IRQ_FSG_PCI_INTA, IRQT_LOW); | ||
29 | set_irq_type(IRQ_FSG_PCI_INTB, IRQT_LOW); | ||
30 | set_irq_type(IRQ_FSG_PCI_INTC, IRQT_LOW); | ||
31 | |||
32 | ixp4xx_pci_preinit(); | ||
33 | } | ||
34 | |||
35 | static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
36 | { | ||
37 | static int pci_irq_table[FSG_PCI_IRQ_LINES] = { | ||
38 | IRQ_FSG_PCI_INTC, | ||
39 | IRQ_FSG_PCI_INTB, | ||
40 | IRQ_FSG_PCI_INTA, | ||
41 | }; | ||
42 | |||
43 | int irq = -1; | ||
44 | slot = slot - 11; | ||
45 | |||
46 | if (slot >= 1 && slot <= FSG_PCI_MAX_DEV && | ||
47 | pin >= 1 && pin <= FSG_PCI_IRQ_LINES) | ||
48 | irq = pci_irq_table[(slot - 1)]; | ||
49 | printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n", | ||
50 | __func__, slot, pin, irq); | ||
51 | |||
52 | return irq; | ||
53 | } | ||
54 | |||
55 | struct hw_pci fsg_pci __initdata = { | ||
56 | .nr_controllers = 1, | ||
57 | .preinit = fsg_pci_preinit, | ||
58 | .swizzle = pci_std_swizzle, | ||
59 | .setup = ixp4xx_setup, | ||
60 | .scan = ixp4xx_scan_bus, | ||
61 | .map_irq = fsg_map_irq, | ||
62 | }; | ||
63 | |||
64 | int __init fsg_pci_init(void) | ||
65 | { | ||
66 | if (machine_is_fsg()) | ||
67 | pci_common_init(&fsg_pci); | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | subsys_initcall(fsg_pci_init); | ||