root/trunk/patches/2.6.22/13-fsg3-support.patch
| Revision 876, 11.7 kB (checked in by rwhitby, 3 years ago) |
|---|
-
linux-2.6.22-rc5-armeb/arch/arm/mach-ixp4xx/Kconfig
old new 109 109 depends on ARCH_IXDP425 || MACH_IXDP465 || MACH_KIXRP435 110 110 default y 111 111 112 config MACH_FSG 113 bool 114 prompt "Freecom FSG-3" 115 select PCI 116 help 117 Say 'Y' here if you want your kernel to support Freecom's 118 FSG-3 device. For more information on this platform 119 see http://www.nslu2-linux.org/wiki/FSG3/HomePage 120 112 121 # 113 122 # Certain registers and IRQs are only enabled if supporting IXP465 CPUs 114 123 # -
linux-2.6.22-rc5-armeb/arch/arm/mach-ixp4xx/Makefile
old new 13 13 obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o 14 14 obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o 15 15 obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o 16 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o 16 17 17 18 obj-y += common.o 18 19 … … 24 25 obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o 25 26 obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o 26 27 obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o 28 obj-$(CONFIG_MACH_FSG) += fsg-setup.o 27 29 28 30 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o 29 31 obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o -
/dev/null
old new 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 } 50 printk("%s: Mapped slot %d pin %d to IRQ %d\n", __FUNCTION__,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); -
/dev/null
old new 1 /* 2 * arch/arm/mach-ixp4xx/fsg-setup.c 3 * 4 * FSG board-setup 5 * 6 * based ixdp425-setup.c: 7 * Copyright (C) 2003-2004 MontaVista Software, Inc. 8 * 9 * Author: Rod Whitby <rod@whitby.id.au> 10 * Maintainers: http://www.nslu2-linux.org/ 11 * 12 */ 13 14 #include <linux/kernel.h> 15 #include <linux/serial.h> 16 #include <linux/serial_8250.h> 17 #include <linux/leds.h> 18 #include <linux/i2c-gpio.h> 19 20 #include <asm/mach-types.h> 21 #include <asm/mach/arch.h> 22 #include <asm/mach/flash.h> 23 24 static struct flash_platform_data fsg_flash_data = { 25 .map_name = "cfi_probe", 26 .width = 2, 27 }; 28 29 static struct resource fsg_flash_resource = { 30 .flags = IORESOURCE_MEM, 31 }; 32 33 static struct platform_device fsg_flash = { 34 .name = "IXP4XX-Flash", 35 .id = 0, 36 .dev.platform_data = &fsg_flash_data, 37 .num_resources = 1, 38 .resource = &fsg_flash_resource, 39 }; 40 41 static struct i2c_gpio_platform_data fsg_i2c_gpio_data = { 42 .sda_pin = FSG_SDA_PIN, 43 .scl_pin = FSG_SCL_PIN, 44 }; 45 46 static struct platform_device fsg_i2c_gpio = { 47 .name = "i2c-gpio", 48 .id = 0, 49 .dev = { 50 .platform_data = &fsg_i2c_gpio_data, 51 }, 52 }; 53 54 #ifdef CONFIG_LEDS_CLASS 55 static struct resource fsg_led_resources[] = { 56 { 57 .name = "ring", 58 .start = FSG_LED_RING_GPIO, 59 .end = FSG_LED_RING_GPIO, 60 .flags = IXP4XX_GPIO_HIGH, 61 }, 62 { 63 .name = "sync", 64 .start = FSG_LED_SYNC_GPIO, 65 .end = FSG_LED_SYNC_GPIO, 66 .flags = IXP4XX_GPIO_HIGH, 67 }, 68 { 69 .name = "usb", 70 .start = FSG_LED_USB_GPIO, 71 .end = FSG_LED_USB_GPIO, 72 .flags = IXP4XX_GPIO_HIGH, 73 }, 74 { 75 .name = "sata", 76 .start = FSG_LED_SATA_GPIO, 77 .end = FSG_LED_SATA_GPIO, 78 .flags = IXP4XX_GPIO_HIGH, 79 }, 80 { 81 .name = "wan", 82 .start = FSG_LED_WAN_GPIO, 83 .end = FSG_LED_WAN_GPIO, 84 .flags = IXP4XX_GPIO_HIGH, 85 }, 86 { 87 .name = "wlan", 88 .start = FSG_LED_WLAN_GPIO, 89 .end = FSG_LED_WLAN_GPIO, 90 .flags = IXP4XX_GPIO_HIGH, 91 }, 92 }; 93 94 static struct platform_device fsg_leds = { 95 .name = "IXP4XX-GPIO-LED", 96 .id = -1, 97 .num_resources = ARRAY_SIZE(fsg_led_resources), 98 .resource = fsg_led_resources, 99 }; 100 #endif 101 102 static struct resource fsg_uart_resources[] = { 103 { 104 .start = IXP4XX_UART1_BASE_PHYS, 105 .end = IXP4XX_UART1_BASE_PHYS + 0x0fff, 106 .flags = IORESOURCE_MEM, 107 }, 108 { 109 .start = IXP4XX_UART2_BASE_PHYS, 110 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff, 111 .flags = IORESOURCE_MEM, 112 } 113 }; 114 115 static struct plat_serial8250_port fsg_uart_data[] = { 116 { 117 .mapbase = IXP4XX_UART1_BASE_PHYS, 118 .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET, 119 .irq = IRQ_IXP4XX_UART1, 120 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 121 .iotype = UPIO_MEM, 122 .regshift = 2, 123 .uartclk = IXP4XX_UART_XTAL, 124 }, 125 { 126 .mapbase = IXP4XX_UART2_BASE_PHYS, 127 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, 128 .irq = IRQ_IXP4XX_UART2, 129 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 130 .iotype = UPIO_MEM, 131 .regshift = 2, 132 .uartclk = IXP4XX_UART_XTAL, 133 }, 134 { } 135 }; 136 137 static struct platform_device fsg_uart = { 138 .name = "serial8250", 139 .id = PLAT8250_DEV_PLATFORM, 140 .dev.platform_data = fsg_uart_data, 141 .num_resources = ARRAY_SIZE(fsg_uart_resources), 142 .resource = fsg_uart_resources, 143 }; 144 145 static struct platform_device *fsg_devices[] __initdata = { 146 &fsg_i2c_gpio, 147 &fsg_flash, 148 #ifdef CONFIG_LEDS_IXP4XX 149 &fsg_leds, 150 #endif 151 }; 152 153 static void __init fsg_init(void) 154 { 155 ixp4xx_sys_init(); 156 157 fsg_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); 158 fsg_flash_resource.end = 159 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 160 161 *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE; 162 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; 163 164 /* Configure CS2 for operation, 8bit and writable */ 165 *IXP4XX_EXP_CS2 = 0xbfff0002; 166 167 /* This is only useful on a modified machine, but it is valuable 168 * to have it first in order to see debug messages, and so that 169 * it does *not* get removed if platform_add_devices fails! 170 */ 171 (void)platform_device_register(&fsg_uart); 172 173 platform_add_devices(fsg_devices, ARRAY_SIZE(fsg_devices)); 174 } 175 176 MACHINE_START(FSG, "Freecom FSG-3") 177 /* Maintainer: www.nslu2-linux.org */ 178 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 179 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 180 .map_io = ixp4xx_map_io, 181 .init_irq = ixp4xx_init_irq, 182 .timer = &ixp4xx_timer, 183 .boot_params = 0x0100, 184 .init_machine = fsg_init, 185 MACHINE_END 186 -
/dev/null
old new 1 /* 2 * include/asm-arm/arch-ixp4xx/fsg.h 3 * 4 * Freecom FSG-3 platform specific definitions 5 * 6 * Author: Rod Whitby <rod@whitby.id.au> 7 * Author: Tomasz Chmielewski <mangoo@wpkg.org> 8 * Maintainers: http://www.nslu2-linux.org 9 * 10 * Based on coyote.h by 11 * Copyright 2004 (c) MontaVista, Software, Inc. 12 * 13 * This file is licensed under the terms of the GNU General Public 14 * License version 2. This program is licensed "as is" without any 15 * warranty of any kind, whether express or implied. 16 */ 17 18 #ifndef __ASM_ARCH_HARDWARE_H__ 19 #error "Do not include this directly, instead #include <asm/hardware.h>" 20 #endif 21 22 #define FSG_SDA_PIN 12 23 #define FSG_SCL_PIN 13 24 25 /* 26 * FSG PCI IRQs 27 */ 28 #define FSG_PCI_MAX_DEV 3 29 #define FSG_PCI_IRQ_LINES 3 30 31 32 /* PCI controller GPIO to IRQ pin mappings */ 33 #define FSG_PCI_INTA_PIN 6 34 #define FSG_PCI_INTB_PIN 7 35 #define FSG_PCI_INTC_PIN 5 36 37 /* Buttons */ 38 39 #define FSG_SB_GPIO 4 40 #define FSG_RB_GPIO 9 41 #define FSG_UB_GPIO 10 42 43 #define FSG_SB_IRQ IRQ_IXP4XX_GPIO4 44 #define FSG_RB_IRQ IRQ_IXP4XX_GPIO9 45 #define FSG_UB_IRQ IRQ_IXP4XX_GPIO10 46 47 #define FSG_SB_BM (1L << FSG_SB_GPIO) 48 #define FSG_RB_BM (1L << FSG_RB_GPIO) 49 #define FSG_UB_BM (1L << FSG_UB_GPIO) 50 51 /* LEDs */ 52 53 #define FSG_LED_RING_GPIO 0 54 #define FSG_LED_SYNC_GPIO 1 55 #define FSG_LED_USB_GPIO 2 56 #define FSG_LED_SATA_GPIO 3 57 #define FSG_LED_WAN_GPIO 4 58 #define FSG_LED_WLAN_GPIO 5 59 60 /* %%% REMOVE %%% 61 #define FSG_PCI_SLOT0_PIN 6 62 #define FSG_PCI_SLOT1_PIN 7 63 64 #define FSG_PCI_SLOT0_DEVID 14 65 #define FSG_PCI_SLOT1_DEVID 15 66 67 #define FSG_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3) 68 #define FSG_IDE_BASE_VIRT 0xFFFE1000 69 #define FSG_IDE_REGION_SIZE 0x1000 70 71 #define FSG_IDE_DATA_PORT 0xFFFE10E0 72 #define FSG_IDE_CTRL_PORT 0xFFFE10FC 73 #define FSG_IDE_ERROR_PORT 0xFFFE10E2 74 */ -
linux-2.6.22-rc5-armeb/include/asm-arm/arch-ixp4xx/hardware.h
old new 45 45 #include "nslu2.h" 46 46 #include "nas100d.h" 47 47 #include "dsmg600.h" 48 #include "fsg.h" 48 49 49 50 #endif /* _ASM_ARCH_HARDWARE_H */ -
linux-2.6.22-rc5-armeb/include/asm-arm/arch-ixp4xx/irqs.h
old new 128 128 #define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7 129 129 #define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6 130 130 131 /* 132 * Freecom FSG-3 Board IRQs 133 */ 134 #define IRQ_FSG_PCI_INTA IRQ_IXP4XX_GPIO6 135 #define IRQ_FSG_PCI_INTB IRQ_IXP4XX_GPIO7 136 #define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5 137 138 /* %%% REMOVE %%% 139 #define IRQ_FSG_PCI_SLOT0 IRQ_IXP4XX_GPIO6 140 #define IRQ_FSG_PCI_SLOT1 IRQ_IXP4XX_GPIO7 141 #define IRQ_FSG_IDE IRQ_IXP4XX_GPIO5 142 */ 143 131 144 #endif
Note: See TracBrowser for help on using the browser.
