-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 48883 b: refs/heads/master c: 0f18597 h: refs/heads/master i: 48881: 31a2c60 48879: 2ef361e v: v3
- Loading branch information
Michael-Luke Jones
authored and
Russell King
committed
Feb 6, 2007
1 parent
34afff2
commit f9abdc1
Showing
8 changed files
with
292 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 6e98a2f88e65d57cff9c98ce1744ff8e4498de31 | ||
refs/heads/master: 0f1859719537acf5a611fd18be5d81c0cfd5fbf4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* arch/arm/mach-ixp4xx/avila-pci.c | ||
* | ||
* Gateworks Avila board-level PCI initialization | ||
* | ||
* Author: Michael-Luke Jones <mlj28@cam.ac.uk> | ||
* | ||
* Based on ixdp-pci.c | ||
* Copyright (C) 2002 Intel Corporation. | ||
* Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
* | ||
* Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/pci.h> | ||
#include <linux/init.h> | ||
#include <linux/irq.h> | ||
#include <linux/delay.h> | ||
|
||
#include <asm/mach/pci.h> | ||
#include <asm/irq.h> | ||
#include <asm/hardware.h> | ||
#include <asm/mach-types.h> | ||
|
||
void __init avila_pci_preinit(void) | ||
{ | ||
set_irq_type(IRQ_AVILA_PCI_INTA, IRQT_LOW); | ||
set_irq_type(IRQ_AVILA_PCI_INTB, IRQT_LOW); | ||
set_irq_type(IRQ_AVILA_PCI_INTC, IRQT_LOW); | ||
set_irq_type(IRQ_AVILA_PCI_INTD, IRQT_LOW); | ||
|
||
ixp4xx_pci_preinit(); | ||
} | ||
|
||
static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
{ | ||
static int pci_irq_table[AVILA_PCI_IRQ_LINES] = { | ||
IRQ_AVILA_PCI_INTA, | ||
IRQ_AVILA_PCI_INTB, | ||
IRQ_AVILA_PCI_INTC, | ||
IRQ_AVILA_PCI_INTD | ||
}; | ||
|
||
int irq = -1; | ||
|
||
if (slot >= 1 && | ||
slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) && | ||
pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) { | ||
irq = pci_irq_table[(slot + pin - 2) % 4]; | ||
} | ||
|
||
return irq; | ||
} | ||
|
||
struct hw_pci avila_pci __initdata = { | ||
.nr_controllers = 1, | ||
.preinit = avila_pci_preinit, | ||
.swizzle = pci_std_swizzle, | ||
.setup = ixp4xx_setup, | ||
.scan = ixp4xx_scan_bus, | ||
.map_irq = avila_map_irq, | ||
}; | ||
|
||
int __init avila_pci_init(void) | ||
{ | ||
if (machine_is_avila() || machine_is_loft()) | ||
pci_common_init(&avila_pci); | ||
return 0; | ||
} | ||
|
||
subsys_initcall(avila_pci_init); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/* | ||
* arch/arm/mach-ixp4xx/avila-setup.c | ||
* | ||
* Gateworks Avila board-setup | ||
* | ||
* Author: Michael-Luke Jones <mlj28@cam.ac.uk> | ||
* | ||
* Based on ixdp-setup.c | ||
* Copyright (C) 2003-2005 MontaVista Software, Inc. | ||
* | ||
* Author: Deepak Saxena <dsaxena@plexity.net> | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/device.h> | ||
#include <linux/serial.h> | ||
#include <linux/tty.h> | ||
#include <linux/serial_8250.h> | ||
#include <linux/slab.h> | ||
|
||
#include <asm/types.h> | ||
#include <asm/setup.h> | ||
#include <asm/memory.h> | ||
#include <asm/hardware.h> | ||
#include <asm/mach-types.h> | ||
#include <asm/irq.h> | ||
#include <asm/mach/arch.h> | ||
#include <asm/mach/flash.h> | ||
|
||
static struct flash_platform_data avila_flash_data = { | ||
.map_name = "cfi_probe", | ||
.width = 2, | ||
}; | ||
|
||
static struct resource avila_flash_resource = { | ||
.flags = IORESOURCE_MEM, | ||
}; | ||
|
||
static struct platform_device avila_flash = { | ||
.name = "IXP4XX-Flash", | ||
.id = 0, | ||
.dev = { | ||
.platform_data = &avila_flash_data, | ||
}, | ||
.num_resources = 1, | ||
.resource = &avila_flash_resource, | ||
}; | ||
|
||
static struct ixp4xx_i2c_pins avila_i2c_gpio_pins = { | ||
.sda_pin = AVILA_SDA_PIN, | ||
.scl_pin = AVILA_SCL_PIN, | ||
}; | ||
|
||
static struct platform_device avila_i2c_controller = { | ||
.name = "IXP4XX-I2C", | ||
.id = 0, | ||
.dev = { | ||
.platform_data = &avila_i2c_gpio_pins, | ||
}, | ||
.num_resources = 0 | ||
}; | ||
|
||
static struct resource avila_uart_resources[] = { | ||
{ | ||
.start = IXP4XX_UART1_BASE_PHYS, | ||
.end = IXP4XX_UART1_BASE_PHYS + 0x0fff, | ||
.flags = IORESOURCE_MEM | ||
}, | ||
{ | ||
.start = IXP4XX_UART2_BASE_PHYS, | ||
.end = IXP4XX_UART2_BASE_PHYS + 0x0fff, | ||
.flags = IORESOURCE_MEM | ||
} | ||
}; | ||
|
||
static struct plat_serial8250_port avila_uart_data[] = { | ||
{ | ||
.mapbase = IXP4XX_UART1_BASE_PHYS, | ||
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET, | ||
.irq = IRQ_IXP4XX_UART1, | ||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
.iotype = UPIO_MEM, | ||
.regshift = 2, | ||
.uartclk = IXP4XX_UART_XTAL, | ||
}, | ||
{ | ||
.mapbase = IXP4XX_UART2_BASE_PHYS, | ||
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, | ||
.irq = IRQ_IXP4XX_UART2, | ||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
.iotype = UPIO_MEM, | ||
.regshift = 2, | ||
.uartclk = IXP4XX_UART_XTAL, | ||
}, | ||
{ }, | ||
}; | ||
|
||
static struct platform_device avila_uart = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM, | ||
.dev.platform_data = avila_uart_data, | ||
.num_resources = 2, | ||
.resource = avila_uart_resources | ||
}; | ||
|
||
static struct platform_device *avila_devices[] __initdata = { | ||
&avila_i2c_controller, | ||
&avila_flash, | ||
&avila_uart | ||
}; | ||
|
||
static void __init avila_init(void) | ||
{ | ||
ixp4xx_sys_init(); | ||
|
||
avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); | ||
avila_flash_resource.end = | ||
IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; | ||
|
||
platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices)); | ||
} | ||
|
||
MACHINE_START(AVILA, "Gateworks Avila Network Platform") | ||
/* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ | ||
.phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, | ||
.io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, | ||
.map_io = ixp4xx_map_io, | ||
.init_irq = ixp4xx_init_irq, | ||
.timer = &ixp4xx_timer, | ||
.boot_params = 0x0100, | ||
.init_machine = avila_init, | ||
MACHINE_END | ||
|
||
/* | ||
* Loft is functionally equivalent to Avila except that it has a | ||
* different number for the maximum PCI devices. The MACHINE | ||
* structure below is identical to Avila except for the comment. | ||
*/ | ||
#ifdef CONFIG_MACH_LOFT | ||
MACHINE_START(LOFT, "Giant Shoulder Inc Loft board") | ||
/* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */ | ||
.phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, | ||
.io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, | ||
.map_io = ixp4xx_map_io, | ||
.init_irq = ixp4xx_init_irq, | ||
.timer = &ixp4xx_timer, | ||
.boot_params = 0x0100, | ||
.init_machine = avila_init, | ||
MACHINE_END | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* include/asm-arm/arch-ixp4xx/avila.h | ||
* | ||
* Gateworks Avila platform specific definitions | ||
* | ||
* Author: Michael-Luke Jones <mlj28@cam.ac.uk> | ||
* | ||
* Based on ixdp425.h | ||
* Author: Deepak Saxena <dsaxena@plexity.net> | ||
* | ||
* Copyright 2004 (c) MontaVista, Software, Inc. | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_HARDWARE_H__ | ||
#error "Do not include this directly, instead #include <asm/hardware.h>" | ||
#endif | ||
|
||
#define AVILA_SDA_PIN 7 | ||
#define AVILA_SCL_PIN 6 | ||
|
||
/* | ||
* AVILA PCI IRQs | ||
*/ | ||
#define AVILA_PCI_MAX_DEV 4 | ||
#define LOFT_PCI_MAX_DEV 6 | ||
#define AVILA_PCI_IRQ_LINES 4 | ||
|
||
|
||
/* PCI controller GPIO to IRQ pin mappings */ | ||
#define AVILA_PCI_INTA_PIN 11 | ||
#define AVILA_PCI_INTB_PIN 10 | ||
#define AVILA_PCI_INTC_PIN 9 | ||
#define AVILA_PCI_INTD_PIN 8 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters