Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d43e2297
Commit
d43e2297
authored
May 12, 2004
by
Deepak Saxena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add IXP4xx support
parent
3b6e11b5
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
3930 additions
and
0 deletions
+3930
-0
arch/arm/configs/ixp4xx_defconfig
arch/arm/configs/ixp4xx_defconfig
+1081
-0
arch/arm/mach-ixp4xx/Kconfig
arch/arm/mach-ixp4xx/Kconfig
+73
-0
arch/arm/mach-ixp4xx/Makefile
arch/arm/mach-ixp4xx/Makefile
+10
-0
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/common-pci.c
+543
-0
arch/arm/mach-ixp4xx/coyote-pci.c
arch/arm/mach-ixp4xx/coyote-pci.c
+69
-0
arch/arm/mach-ixp4xx/coyote-setup.c
arch/arm/mach-ixp4xx/coyote-setup.c
+97
-0
arch/arm/mach-ixp4xx/ixdp425-pci.c
arch/arm/mach-ixp4xx/ixdp425-pci.c
+84
-0
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-ixp4xx/ixdp425-setup.c
+153
-0
arch/arm/mach-ixp4xx/prpmc1100-pci.c
arch/arm/mach-ixp4xx/prpmc1100-pci.c
+119
-0
arch/arm/mach-ixp4xx/prpmc1100-setup.c
arch/arm/mach-ixp4xx/prpmc1100-setup.c
+96
-0
include/asm-arm/arch-ixp4xx/coyote.h
include/asm-arm/arch-ixp4xx/coyote.h
+36
-0
include/asm-arm/arch-ixp4xx/dma.h
include/asm-arm/arch-ixp4xx/dma.h
+52
-0
include/asm-arm/arch-ixp4xx/hardware.h
include/asm-arm/arch-ixp4xx/hardware.h
+41
-0
include/asm-arm/arch-ixp4xx/ide.h
include/asm-arm/arch-ixp4xx/ide.h
+37
-0
include/asm-arm/arch-ixp4xx/io.h
include/asm-arm/arch-ixp4xx/io.h
+388
-0
include/asm-arm/arch-ixp4xx/irq.h
include/asm-arm/arch-ixp4xx/irq.h
+13
-0
include/asm-arm/arch-ixp4xx/irqs.h
include/asm-arm/arch-ixp4xx/irqs.h
+78
-0
include/asm-arm/arch-ixp4xx/ixdp425.h
include/asm-arm/arch-ixp4xx/ixdp425.h
+38
-0
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+551
-0
include/asm-arm/arch-ixp4xx/memory.h
include/asm-arm/arch-ixp4xx/memory.h
+49
-0
include/asm-arm/arch-ixp4xx/param.h
include/asm-arm/arch-ixp4xx/param.h
+3
-0
include/asm-arm/arch-ixp4xx/platform.h
include/asm-arm/arch-ixp4xx/platform.h
+116
-0
include/asm-arm/arch-ixp4xx/prpmc1100.h
include/asm-arm/arch-ixp4xx/prpmc1100.h
+33
-0
include/asm-arm/arch-ixp4xx/serial.h
include/asm-arm/arch-ixp4xx/serial.h
+27
-0
include/asm-arm/arch-ixp4xx/system.h
include/asm-arm/arch-ixp4xx/system.h
+43
-0
include/asm-arm/arch-ixp4xx/time.h
include/asm-arm/arch-ixp4xx/time.h
+7
-0
include/asm-arm/arch-ixp4xx/timex.h
include/asm-arm/arch-ixp4xx/timex.h
+12
-0
include/asm-arm/arch-ixp4xx/uncompress.h
include/asm-arm/arch-ixp4xx/uncompress.h
+64
-0
include/asm-arm/arch-ixp4xx/vmalloc.h
include/asm-arm/arch-ixp4xx/vmalloc.h
+17
-0
No files found.
arch/arm/configs/ixp4xx_defconfig
0 → 100644
View file @
d43e2297
This diff is collapsed.
Click to expand it.
arch/arm/mach-ixp4xx/Kconfig
0 → 100644
View file @
d43e2297
config ARCH_SUPPORTS_BIG_ENDIAN
bool
depends on ARCH_IXP4XX
default y
menu "Intel IXP4xx Implementation Options"
comment "IXP4xx Platforms"
config ARCH_IXDP425
bool "Support for Intel IXDP425 (Richfield) Development Platform"
depends on ARCH_IXP4XX
help
#
# IXCDP1100 is the exact same HW as IXDP425, but with a different machine
# number from the bootloader due to marketing monkeys, so we just enable it
# by default if IXDP425 is enabled.
#
config ARCH_IXCDP1100
bool
depends on ARCH_IXDP425
default y
config ARCH_PRPMC1100
bool "Support for Motorola PrPMC 1100 Platform"
depends on ARCH_IXP4XX
config ARCH_ADI_COYOTE
bool "Support for ADI Engineering Coyote Gateway Reference Platform"
depends on ARCH_IXP4XX
config ARCH_AVILA
bool "Support for Gateworks Avila Network Platform"
depends on ARCH_IXP4XX
#
# Avila and IXDP share the same source for now. Will change in future
#
config ARCH_IXDP4XX
bool
depends on ARCH_IXDP425 || ARCH_AVILA
default y
comment "IXP4xx Options"
config IXP4XX_INDIRECT_PCI
bool "Use indirect PCI memory access"
depends on ARCH_IXP4XX
help
IXP4xx provides two methods of accessing PCI memory space:
1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
To access PCI via this space, we simply ioremap() the BAR
into the kernel and we can use the standard read[bwl]/write[bwl]
macros. This is the preffered method due to speed but it
limits the system to just 64MB of PCI memory. This can be
problamatic if using video cards and other memory-heavy devices.
2) If > 64MB of memory space is required, the IXP4xx can be
configured to use indirect registers to access PCI This allows
for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus.
The disadvantadge of this is that every PCI access requires
three local register accesses plus a spinlock, but in some
cases the performance hit is acceptable. In addition, you cannot
mmap() PCI devices in this case due to the indirect nature
of the PCI window.
By default, the direct method is used. Choose this option if you
need to use the indirect method instead. If you don't know
what you need, leave this option unselected.
endmenu
arch/arm/mach-ixp4xx/Makefile
0 → 100644
View file @
d43e2297
#
# Makefile for the linux kernel.
#
obj-y
+=
common.o common-pci.o
obj-$(CONFIG_ARCH_IXDP4XX)
+=
ixdp425-pci.o ixdp425-setup.o
obj-$(CONFIG_ARCH_ADI_COYOTE)
+=
coyote-pci.o coyote-setup.o
obj-$(CONFIG_ARCH_PRPMC1100)
+=
prpmc1100-pci.o prpmc1100-setup.o
arch/arm/mach-ixp4xx/common-pci.c
0 → 100644
View file @
d43e2297
This diff is collapsed.
Click to expand it.
arch/arm/mach-ixp4xx/coyote-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arch/mach-ixp4xx/coyote-pci.c
*
* PCI setup routines for ADI Engineering Coyote platform
*
* Copyright (C) 2002 Jungo Software Technologies.
* Copyright (C) 2003 MontaVista Softwrae, Inc.
*
* Maintainer: Deepak Saxena <dsaxena@mvista.com>
*
* 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/pci.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach/pci.h>
extern
void
ixp4xx_pci_preinit
(
void
);
extern
int
ixp4xx_setup
(
int
nr
,
struct
pci_sys_data
*
sys
);
extern
struct
pci_bus
*
ixp4xx_scan_bus
(
int
nr
,
struct
pci_sys_data
*
sys
);
void
__init
coyote_pci_preinit
(
void
)
{
gpio_line_config
(
COYOTE_PCI_SLOT0_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
COYOTE_PCI_SLOT1_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_isr_clear
(
COYOTE_PCI_SLOT0_PIN
);
gpio_line_isr_clear
(
COYOTE_PCI_SLOT1_PIN
);
ixp4xx_pci_preinit
();
}
static
int
__init
coyote_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
{
if
(
slot
==
COYOTE_PCI_SLOT0_DEVID
)
return
IRQ_COYOTE_PCI_SLOT0
;
else
if
(
slot
==
COYOTE_PCI_SLOT1_DEVID
)
return
IRQ_COYOTE_PCI_SLOT1
;
else
return
-
1
;
}
struct
hw_pci
coyote_pci
__initdata
=
{
.
nr_controllers
=
1
,
.
preinit
=
coyote_pci_preinit
,
.
swizzle
=
pci_std_swizzle
,
.
setup
=
ixp4xx_setup
,
.
scan
=
ixp4xx_scan_bus
,
.
map_irq
=
coyote_map_irq
,
};
int
__init
coyote_pci_init
(
void
)
{
if
(
machine_is_adi_coyote
())
pci_common_init
(
&
coyote_pci
);
return
0
;
}
subsys_initcall
(
coyote_pci_init
);
arch/arm/mach-ixp4xx/coyote-setup.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/coyote-setup.c
*
* ADI Engineering Coyote board-setup
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <asm/types.h>
#include <asm/setup.h>
#include <asm/memory.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#ifdef __ARMEB__
#define REG_OFFSET 3
#else
#define REG_OFFSET 0
#endif
/*
* Only one serial port is connected on the Coyote.
*/
static
struct
uart_port
coyote_serial_port
=
{
.
membase
=
(
char
*
)(
IXP4XX_UART2_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART2_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART2
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
0
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
};
void
__init
coyote_map_io
(
void
)
{
early_serial_setup
(
&
coyote_serial_port
);
ixp4xx_map_io
();
}
static
struct
flash_platform_data
coyote_flash_data
=
{
.
map_name
=
"cfi_probe"
,
.
width
=
2
,
};
static
struct
resource
coyote_flash_resource
=
{
.
start
=
COYOTE_FLASH_BASE
,
.
end
=
COYOTE_FLASH_BASE
+
COYOTE_FLASH_SIZE
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
coyote_flash_device
=
{
.
name
=
"IXP4XX-Flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
coyote_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
coyote_flash_resource
,
};
static
int
__init
coyote_init
(
void
)
{
if
(
!
machine_is_adi_coyote
())
return
-
ENODEV
;
platform_add_device
(
&
coyote_flash_device
);
return
0
;
}
arch_initcall
(
coyote_init
);
MACHINE_START
(
ADI_COYOTE
,
"ADI Engineering IXP4XX Coyote Development Platform"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
coyote_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
arch/arm/mach-ixp4xx/ixdp425-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/ixdp425-pci.c
*
* IXDP425 board-level PCI initialization
*
* 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/config.h>
#include <linux/pci.h>
#include <linux/init.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
ixdp425_pci_preinit
(
void
)
{
gpio_line_config
(
IXDP425_PCI_INTA_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
IXDP425_PCI_INTB_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
IXDP425_PCI_INTC_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
IXDP425_PCI_INTD_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_isr_clear
(
IXDP425_PCI_INTA_PIN
);
gpio_line_isr_clear
(
IXDP425_PCI_INTB_PIN
);
gpio_line_isr_clear
(
IXDP425_PCI_INTC_PIN
);
gpio_line_isr_clear
(
IXDP425_PCI_INTD_PIN
);
ixp4xx_pci_preinit
();
}
static
int
__init
ixdp425_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
{
static
int
pci_irq_table
[
IXDP425_PCI_IRQ_LINES
]
=
{
IRQ_IXDP425_PCI_INTA
,
IRQ_IXDP425_PCI_INTB
,
IRQ_IXDP425_PCI_INTC
,
IRQ_IXDP425_PCI_INTD
};
int
irq
=
-
1
;
if
(
slot
>=
1
&&
slot
<=
IXDP425_PCI_MAX_DEV
&&
pin
>=
1
&&
pin
<=
IXDP425_PCI_IRQ_LINES
)
{
irq
=
pci_irq_table
[(
slot
+
pin
-
2
)
%
4
];
}
return
irq
;
}
struct
hw_pci
ixdp425_pci
__initdata
=
{
.
nr_controllers
=
1
,
.
preinit
=
ixdp425_pci_preinit
,
.
swizzle
=
pci_std_swizzle
,
.
setup
=
ixp4xx_setup
,
.
scan
=
ixp4xx_scan_bus
,
.
map_irq
=
ixdp425_map_irq
,
};
int
__init
ixdp425_pci_init
(
void
)
{
if
(
machine_is_ixdp425
()
||
machine_is_ixcdp1100
()
||
machine_is_avila
())
pci_common_init
(
&
ixdp425_pci
);
return
0
;
}
subsys_initcall
(
ixdp425_pci_init
);
arch/arm/mach-ixp4xx/ixdp425-setup.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/ixdp425-setup.c
*
* IXDP425/IXCDP1100 board-setup
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.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>
#ifdef __ARMEB__
#define REG_OFFSET 3
#else
#define REG_OFFSET 0
#endif
/*
* IXDP425 uses both chipset serial ports
*/
static
struct
uart_port
ixdp425_serial_ports
[]
=
{
{
.
membase
=
(
char
*
)(
IXP4XX_UART1_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART1_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART1
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
0
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
}
,
{
.
membase
=
(
char
*
)(
IXP4XX_UART2_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART2_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART2
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
1
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
}
};
void
__init
ixdp425_map_io
(
void
)
{
early_serial_setup
(
&
ixdp425_serial_ports
[
0
]);
early_serial_setup
(
&
ixdp425_serial_ports
[
1
]);
ixp4xx_map_io
();
}
static
struct
flash_platform_data
ixdp425_flash_data
=
{
.
map_name
=
"cfi_probe"
,
.
width
=
2
,
};
static
struct
resource
ixdp425_flash_resource
=
{
.
start
=
IXDP425_FLASH_BASE
,
.
end
=
IXDP425_FLASH_BASE
+
IXDP425_FLASH_SIZE
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
ixdp425_flash_device
=
{
.
name
=
"IXP4XX-Flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
ixdp425_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
ixdp425_flash_resource
,
};
static
struct
ixp4xx_i2c_pins
ixdp425_i2c_gpio_pins
=
{
.
sda_pin
=
IXDP425_SDA_PIN
,
.
scl_pin
=
IXDP425_SCL_PIN
,
};
static
struct
platform_device
ixdp425_i2c_controller
=
{
.
name
=
"IXP4XX-I2C"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
ixdp425_i2c_gpio_pins
,
},
.
num_resources
=
0
};
static
int
__init
ixdp425_init
(
void
)
{
if
(
!
machine_is_ixdp425
()
&&
!
machine_is_ixcdp1100
()
&&
!
machine_is_avila
())
return
-
ENODEV
;
platform_add_device
(
&
ixdp425_flash_device
);
platform_add_device
(
&
ixdp425_i2c_controller
);
return
0
;
}
arch_initcall
(
ixdp425_init
);
MACHINE_START
(
IXDP425
,
"Intel IXDP425 Development Platform"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
ixdp425_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
MACHINE_START
(
IXCDP1100
,
"Intel IXCDP1100 Development Platform"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
ixdp425_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
/*
* Avila is functionally equivalent to IXDP425 except that it adds
* a CF IDE slot hanging off the expansion bus. When we have a
* driver for IXP4xx CF IDE with driver model support we'll move
* Avila to it's own setup file.
*/
#ifdef CONFIG_ARCH_AVILA
MACHINE_START
(
AVILA
,
"Gateworks Avila Network Platform"
)
MAINTAINER
(
"Deepak Saxena <dsaxena@plexity.net>"
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
ixdp425_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
#endif
arch/arm/mach-ixp4xx/prpmc1100-pci.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/prpmc1100-pci.c
*
* PrPMC1100 PCI initialization
*
* Copyright (C) 2003-2004 MontaVista Sofwtare, Inc.
* Based on IXDP425 code originally (C) Intel Corporation
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* PrPMC1100 PCI init code. GPIO usage is similar to that on
* IXDP425, but the IRQ routing is completely different and
* depends on what carrier you are using. This code is written
* to work on the Motorola PrPMC800 ATX carrier board.
*
* 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/config.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/mach/pci.h>
void
__init
prpmc1100_pci_preinit
(
void
)
{
gpio_line_config
(
PRPMC1100_PCI_INTA_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
PRPMC1100_PCI_INTB_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
PRPMC1100_PCI_INTC_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_config
(
PRPMC1100_PCI_INTD_PIN
,
IXP4XX_GPIO_IN
|
IXP4XX_GPIO_ACTIVE_LOW
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTA_PIN
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTB_PIN
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTC_PIN
);
gpio_line_isr_clear
(
PRPMC1100_PCI_INTD_PIN
);
ixp4xx_pci_preinit
();
}
static
int
__init
prpmc1100_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
{
int
irq
=
-
1
;
static
int
pci_irq_table
[][
4
]
=
{
{
/* IDSEL 16 - PMC A1 */
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
},
{
/* IDSEL 17 - PRPMC-A-B */
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
},
{
/* IDSEL 18 - PMC A1-B */
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
,
IRQ_PRPMC1100_PCI_INTD
},
{
/* IDSEL 19 - Unused */
0
,
0
,
0
,
0
},
{
/* IDSEL 20 - P2P Bridge */
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
,
IRQ_PRPMC1100_PCI_INTD
},
{
/* IDSEL 21 - PMC A2 */
IRQ_PRPMC1100_PCI_INTC
,
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
},
{
/* IDSEL 22 - PMC A2-B */
IRQ_PRPMC1100_PCI_INTD
,
IRQ_PRPMC1100_PCI_INTA
,
IRQ_PRPMC1100_PCI_INTB
,
IRQ_PRPMC1100_PCI_INTC
},
};
if
(
slot
>=
PRPMC1100_PCI_MIN_DEVID
&&
slot
<=
PRPMC1100_PCI_MAX_DEVID
&&
pin
>=
1
&&
pin
<=
PRPMC1100_PCI_IRQ_LINES
)
{
irq
=
pci_irq_table
[
slot
-
PRPMC1100_PCI_MIN_DEVID
][
pin
-
1
];
}
return
irq
;
}
struct
hw_pci
prpmc1100_pci
__initdata
=
{
.
nr_controllers
=
1
,
.
preinit
=
prpmc1100_pci_preinit
,
.
swizzle
=
pci_std_swizzle
,
.
setup
=
ixp4xx_setup
,
.
scan
=
ixp4xx_scan_bus
,
.
map_irq
=
prpmc1100_map_irq
,
};
int
__init
prpmc1100_pci_init
(
void
)
{
if
(
machine_is_prpmc1100
())
pci_common_init
(
&
prpmc1100_pci
);
return
0
;
}
subsys_initcall
(
prpmc1100_pci_init
);
arch/arm/mach-ixp4xx/prpmc1100-setup.c
0 → 100644
View file @
d43e2297
/*
* arch/arm/mach-ixp4xx/prpmc1100-setup.c
*
* Motorola PrPMC1100 board setup
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
#include <asm/types.h>
#include <asm/setup.h>
#include <asm/memory.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#ifdef __ARMEB__
#define REG_OFFSET 3
#else
#define REG_OFFSET 0
#endif
/*
* Only one serial port is connected on the PrPMC1100
*/
static
struct
uart_port
prpmc1100_serial_port
=
{
.
membase
=
(
char
*
)(
IXP4XX_UART1_BASE_VIRT
+
REG_OFFSET
),
.
mapbase
=
(
IXP4XX_UART1_BASE_PHYS
),
.
irq
=
IRQ_IXP4XX_UART1
,
.
flags
=
UPF_SKIP_TEST
,
.
iotype
=
UPIO_MEM
,
.
regshift
=
2
,
.
uartclk
=
IXP4XX_UART_XTAL
,
.
line
=
0
,
.
type
=
PORT_XSCALE
,
.
fifosize
=
32
};
void
__init
prpmc1100_map_io
(
void
)
{
early_serial_setup
(
&
prpmc1100_serial_port
);
ixp4xx_map_io
();
}
static
struct
flash_platform_data
prpmc1100_flash_data
=
{
.
map_name
=
"cfi_probe"
,
.
width
=
2
,
};
static
struct
resource
prpmc1100_flash_resource
=
{
.
start
=
PRPMC1100_FLASH_BASE
,
.
end
=
PRPMC1100_FLASH_BASE
+
PRPMC1100_FLASH_SIZE
,
.
flags
=
IORESOURCE_MEM
,
};
static
struct
platform_device
prpmc1100_flash_device
=
{
.
name
=
"IXP4XX-Flash"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
prpmc1100_flash_data
,
},
.
num_resources
=
1
,
.
resource
=
&
prpmc1100_flash_resource
,
};
static
int
__init
prpmc1100_init
(
void
)
{
if
(
!
machine_is_prpmc1100
())
return
-
ENODEV
;
platform_add_device
(
&
prpmc1100_flash_device
);
return
0
;
}
arch_initcall
(
prpmc1100_init
);
MACHINE_START
(
PRPMC1100
,
"Motorola PrPMC1100"
)
MAINTAINER
(
"MontaVista Software, Inc."
)
BOOT_MEM
(
PHYS_OFFSET
,
IXP4XX_PERIPHERAL_BASE_PHYS
,
IXP4XX_PERIPHERAL_BASE_VIRT
)
MAPIO
(
prpmc1100_map_io
)
INITIRQ
(
ixp4xx_init_irq
)
BOOT_PARAMS
(
0x0100
)
MACHINE_END
include/asm-arm/arch-ixp4xx/coyote.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/coyote.h
*
* ADI Engineering platform specific definitions
*
* 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 COYOTE_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define COYOTE_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE * 2
/* PCI controller GPIO to IRQ pin mappings */
#define COYOTE_PCI_SLOT0_PIN 6
#define COYOTE_PCI_SLOT1_PIN 11
#define COYOTE_PCI_SLOT0_DEVID 14
#define COYOTE_PCI_SLOT1_DEVID 15
#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_CS3_BASE_PHYS
#define COYOTE_IDE_BASE_VIRT 0xFFFE1000
#define COYOTE_IDE_REGION_SIZE 0x1000
#define COYOTE_IDE_DATA_PORT 0xFFFE10E0
#define COYOTE_IDE_CTRL_PORT 0xFFFE10FC
#define COYOTE_IDE_ERROR_PORT 0xFFFE10E2
include/asm-arm/arch-ixp4xx/dma.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/dma.h
*
* Copyright (C) 2001-2004 MontaVista Software, Inc.
*
* 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.
*
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
#include <linux/config.h>
#include <linux/device.h>
#include <linux/pci.h>
#include <asm/page.h>
#include <asm/sizes.h>
#include <asm/hardware.h>
#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
/* No DMA */
#define MAX_DMA_CHANNELS 0
/*
* Only first 64MB of memory can be accessed via PCI.
* We use GFP_DMA to allocate safe buffers to do map/unmap.
* This is really ugly and we need a better way of specifying
* DMA-capable regions of memory.
*/
static
inline
void
__arch_adjust_zones
(
int
node
,
unsigned
long
*
zone_size
,
unsigned
long
*
zhole_size
)
{
unsigned
int
sz
=
SZ_64M
>>
PAGE_SHIFT
;
/*
* Only adjust if > 64M on current system
*/
if
(
node
||
(
zone_size
[
0
]
<=
sz
))
return
;
zone_size
[
1
]
=
zone_size
[
0
]
-
sz
;
zone_size
[
0
]
=
sz
;
zhole_size
[
1
]
=
zhole_size
[
0
];
zhole_size
[
0
]
=
0
;
}
#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
#endif
/* _ASM_ARCH_DMA_H */
include/asm-arm/arch-ixp4xx/hardware.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/hardware.h
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* 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.
*
*/
/*
* Hardware definitions for IXP4xx based systems
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#define __ASM_ARCH_HARDWARE_H__
#define PCIBIOS_MIN_IO 0x00001000
#define PCIBIOS_MIN_MEM 0x48000000
/*
* We override the standard dma-mask routines for bouncing.
*/
#define HAVE_ARCH_PCI_SET_DMA_MASK
#define pcibios_assign_all_busses() 1
/* Register locations and bits */
#include "ixp4xx-regs.h"
/* Platform helper functions and definitions */
#include "platform.h"
/* Platform specific details */
#include "ixdp425.h"
#include "coyote.h"
#include "prpmc1100.h"
#endif
/* _ASM_ARCH_HARDWARE_H */
include/asm-arm/arch-ixp4xx/ide.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/ide.h
*
* Copyright (C) 2003-2004 MontaVista Software, Inc.
* Based on original code Copyright (c) 1998 Russell King
*/
/*
* Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses.
*/
static
__inline__
void
ide_init_hwif_ports
(
hw_regs_t
*
hw
,
int
data_port
,
int
ctrl_port
,
int
*
irq
)
{
unsigned
long
reg
=
(
unsigned
long
)
data_port
;
int
i
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
hw
->
io_ports
[
i
]
=
reg
;
reg
+=
1
;
}
hw
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
ctrl_port
;
if
(
irq
)
*
irq
=
0
;
}
/*
* This registers the standard ports for this architecture with the IDE
* driver.
*/
static
__inline__
void
ide_init_default_hwifs
(
void
)
{
/* There are no standard ports */
}
include/asm-arm/arch-ixp4xx/io.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/io.h
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright (C) 2002-2004 MontaVista Software, Inc.
*
* 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.
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
#include <asm/hardware.h>
#define IO_SPACE_LIMIT 0xffff0000
#define BIT(x) ((1)<<(x))
extern
int
(
*
ixp4xx_pci_read
)(
u32
addr
,
u32
cmd
,
u32
*
data
);
extern
int
ixp4xx_pci_write
(
u32
addr
,
u32
cmd
,
u32
data
);
/*
* IXP4xx provides two methods of accessing PCI memory space:
*
* 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
* To access PCI via this space, we simply ioremap() the BAR
* into the kernel and we can use the standard read[bwl]/write[bwl]
* macros. This is the preffered method due to speed but it
* limits the system to just 64MB of PCI memory. This can be
* problamatic if using video cards and other memory-heavy
* targets.
*
* 2) If > 64MB of memory space is required, the IXP4xx can be configured
* to use indirect registers to access PCI (as we do below for I/O
* transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
* of memory on the bus. The disadvantadge of this is that every
* PCI access requires three local register accesses plus a spinlock,
* but in some cases the performance hit is acceptable. In addition,
* you cannot mmap() PCI devices in this case.
*
*/
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
#define __mem_pci(a) ((unsigned long)(a))
#else
#include <linux/mm.h>
/*
* In the case of using indirect PCI, we simply return the actual PCI
* address and our read/write implementation use that to drive the
* access registers. If something outside of PCI is ioremap'd, we
* fallback to the default.
*/
static
inline
void
*
__ixp4xx_ioremap
(
unsigned
long
addr
,
size_t
size
,
unsigned
long
flags
,
unsigned
long
align
)
{
extern
void
*
__ioremap
(
unsigned
long
,
size_t
,
unsigned
long
,
unsigned
long
);
if
((
addr
<
0x48000000
)
||
(
addr
>
0x4fffffff
))
return
__ioremap
(
addr
,
size
,
flags
,
align
);
return
(
void
*
)
addr
;
}
static
inline
void
__ixp4xx_iounmap
(
void
*
addr
)
{
extern
void
__iounmap
(
void
*
addr
);
if
((
u32
)
addr
>
VMALLOC_START
)
__iounmap
(
addr
);
}
#define __arch_ioremap(a, s, f, x) __ixp4xx_ioremap(a, s, f, x)
#define __arch_iounmap(a) __ixp4xx_iounmap(a)
#define writeb(p, v) __ixp4xx_writeb(p, v)
#define writew(p, v) __ixp4xx_writew(p, v)
#define writel(p, v) __ixp4xx_writel(p, v)
#define writesb(p, v, l) __ixp4xx_writesb(p, v, l)
#define writesw(p, v, l) __ixp4xx_writesw(p, v, l)
#define writesl(p, v, l) __ixp4xx_writesl(p, v, l)
#define readb(p) __ixp4xx_readb(p)
#define readw(p) __ixp4xx_readw(p)
#define readl(p) __ixp4xx_readl(p)
#define readsb(p, v, l) __ixp4xx_readsb(p, v, l)
#define readsw(p, v, l) __ixp4xx_readsw(p, v, l)
#define readsl(p, v, l) __ixp4xx_readsl(p, v, l)
static
inline
void
__ixp4xx_writeb
(
u8
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
{
__raw_writeb
(
value
,
addr
);
return
;
}
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_MEMWRITE
,
data
);
}
static
inline
void
__ixp4xx_writesb
(
u32
bus_addr
,
u8
*
vaddr
,
int
count
)
{
while
(
count
--
)
writeb
(
*
vaddr
++
,
bus_addr
);
}
static
inline
void
__ixp4xx_writew
(
u16
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
{
__raw_writew
(
value
,
addr
);
return
;
}
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_MEMWRITE
,
data
);
}
static
inline
void
__ixp4xx_writesw
(
u32
bus_addr
,
u16
*
vaddr
,
int
count
)
{
while
(
count
--
)
writew
(
*
vaddr
++
,
bus_addr
);
}
static
inline
void
__ixp4xx_writel
(
u32
value
,
u32
addr
)
{
if
(
addr
>
VMALLOC_START
)
{
__raw_writel
(
value
,
addr
);
return
;
}
ixp4xx_pci_write
(
addr
,
NP_CMD_MEMWRITE
,
value
);
}
static
inline
void
__ixp4xx_writesl
(
u32
bus_addr
,
u32
*
vaddr
,
int
count
)
{
while
(
count
--
)
writel
(
*
vaddr
++
,
bus_addr
);
}
static
inline
unsigned
char
__ixp4xx_readb
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
return
__raw_readb
(
addr
);
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_MEMREAD
,
&
data
))
return
0xff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_readsb
(
u32
bus_addr
,
u8
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
readb
(
bus_addr
);
}
static
inline
unsigned
short
__ixp4xx_readw
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
if
(
addr
>
VMALLOC_START
)
return
__raw_readw
(
addr
);
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_MEMREAD
,
&
data
))
return
0xffff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_readsw
(
u32
bus_addr
,
u16
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
readw
(
bus_addr
);
}
static
inline
unsigned
long
__ixp4xx_readl
(
u32
addr
)
{
u32
data
;
if
(
addr
>
VMALLOC_START
)
return
__raw_readl
(
addr
);
if
(
ixp4xx_pci_read
(
addr
,
NP_CMD_MEMREAD
,
&
data
))
return
0xffffffff
;
return
data
;
}
static
inline
void
__ixp4xx_readsl
(
u32
bus_addr
,
u32
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
readl
(
bus_addr
);
}
/*
* We can use the built-in functions b/c they end up calling writeb/readb
*/
#define memset_io(c,v,l) _memset_io((c),(v),(l))
#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
#define eth_io_copy_and_sum(s,c,l,b) \
eth_copy_and_sum((s),__mem_pci(c),(l),(b))
static
inline
int
check_signature
(
unsigned
long
bus_addr
,
const
unsigned
char
*
signature
,
int
length
)
{
int
retval
=
0
;
do
{
if
(
readb
(
bus_addr
)
!=
*
signature
)
goto
out
;
bus_addr
++
;
signature
++
;
length
--
;
}
while
(
length
);
retval
=
1
;
out:
return
retval
;
}
#endif
/*
* IXP4xx does not have a transparent cpu -> PCI I/O translation
* window. Instead, it has a set of registers that must be tweaked
* with the proper byte lanes, command types, and address for the
* transaction. This means that we need to override the default
* I/O functions.
*/
#define outb(p, v) __ixp4xx_outb(p, v)
#define outw(p, v) __ixp4xx_outw(p, v)
#define outl(p, v) __ixp4xx_outl(p, v)
#define outsb(p, v, l) __ixp4xx_outsb(p, v, l)
#define outsw(p, v, l) __ixp4xx_outsw(p, v, l)
#define outsl(p, v, l) __ixp4xx_outsl(p, v, l)
#define inb(p) __ixp4xx_inb(p)
#define inw(p) __ixp4xx_inw(p)
#define inl(p) __ixp4xx_inl(p)
#define insb(p, v, l) __ixp4xx_insb(p, v, l)
#define insw(p, v, l) __ixp4xx_insw(p, v, l)
#define insl(p, v, l) __ixp4xx_insl(p, v, l)
static
inline
void
__ixp4xx_outb
(
u8
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_IOWRITE
,
data
);
}
static
inline
void
__ixp4xx_outsb
(
u32
io_addr
,
u8
*
vaddr
,
u32
count
)
{
while
(
count
--
)
outb
(
*
vaddr
++
,
io_addr
);
}
static
inline
void
__ixp4xx_outw
(
u16
value
,
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
data
=
value
<<
(
8
*
n
);
ixp4xx_pci_write
(
addr
,
byte_enables
|
NP_CMD_IOWRITE
,
data
);
}
static
inline
void
__ixp4xx_outsw
(
u32
io_addr
,
u16
*
vaddr
,
u32
count
)
{
while
(
count
--
)
outw
(
cpu_to_le16
(
*
vaddr
++
),
io_addr
);
}
static
inline
void
__ixp4xx_outl
(
u32
value
,
u32
addr
)
{
ixp4xx_pci_write
(
addr
,
NP_CMD_IOWRITE
,
value
);
}
static
inline
void
__ixp4xx_outsl
(
u32
io_addr
,
u32
*
vaddr
,
u32
count
)
{
while
(
count
--
)
outl
(
*
vaddr
++
,
io_addr
);
}
static
inline
u8
__ixp4xx_inb
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
BIT
(
n
))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_IOREAD
,
&
data
))
return
0xff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_insb
(
u32
io_addr
,
u8
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
inb
(
io_addr
);
}
static
inline
u16
__ixp4xx_inw
(
u32
addr
)
{
u32
n
,
byte_enables
,
data
;
n
=
addr
%
4
;
byte_enables
=
(
0xf
&
~
(
BIT
(
n
)
|
BIT
(
n
+
1
)))
<<
IXP4XX_PCI_NP_CBE_BESL
;
if
(
ixp4xx_pci_read
(
addr
,
byte_enables
|
NP_CMD_IOREAD
,
&
data
))
return
0xffff
;
return
data
>>
(
8
*
n
);
}
static
inline
void
__ixp4xx_insw
(
u32
io_addr
,
u16
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
le16_to_cpu
(
inw
(
io_addr
));
}
static
inline
u32
__ixp4xx_inl
(
u32
addr
)
{
u32
data
;
if
(
ixp4xx_pci_read
(
addr
,
NP_CMD_IOREAD
,
&
data
))
return
0xffffffff
;
return
data
;
}
static
inline
void
__ixp4xx_insl
(
u32
io_addr
,
u32
*
vaddr
,
u32
count
)
{
while
(
count
--
)
*
vaddr
++
=
inl
(
io_addr
);
}
#endif // __ASM_ARM_ARCH_IO_H
include/asm-arm/arch-ixp4xx/irq.h
0 → 100644
View file @
d43e2297
/*
* irq.h
*
* Copyright (C) 2002 Intel Corporation.
*
* 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.
*
*/
#define fixup_irq(irq) (irq)
include/asm-arm/arch-ixp4xx/irqs.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/irqs.h
*
* IRQ definitions for IXP4XX based systems
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003 MontaVista Software, Inc.
*
* 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.
*
*/
#ifndef _ARCH_IXP4XX_IRQS_H_
#define _ARCH_IXP4XX_IRQS_H_
#define NR_IRQS 32
#define IRQ_IXP4XX_NPEA 0
#define IRQ_IXP4XX_NPEB 1
#define IRQ_IXP4XX_NPEC 2
#define IRQ_IXP4XX_QM1 3
#define IRQ_IXP4XX_QM2 4
#define IRQ_IXP4XX_TIMER1 5
#define IRQ_IXP4XX_GPIO0 6
#define IRQ_IXP4XX_GPIO1 7
#define IRQ_IXP4XX_PCI_INT 8
#define IRQ_IXP4XX_PCI_DMA1 9
#define IRQ_IXP4XX_PCI_DMA2 10
#define IRQ_IXP4XX_TIMER2 11
#define IRQ_IXP4XX_USB 12
#define IRQ_IXP4XX_UART2 13
#define IRQ_IXP4XX_TIMESTAMP 14
#define IRQ_IXP4XX_UART1 15
#define IRQ_IXP4XX_WDOG 16
#define IRQ_IXP4XX_AHB_PMU 17
#define IRQ_IXP4XX_XSCALE_PMU 18
#define IRQ_IXP4XX_GPIO2 19
#define IRQ_IXP4XX_GPIO3 20
#define IRQ_IXP4XX_GPIO4 21
#define IRQ_IXP4XX_GPIO5 22
#define IRQ_IXP4XX_GPIO6 23
#define IRQ_IXP4XX_GPIO7 24
#define IRQ_IXP4XX_GPIO8 25
#define IRQ_IXP4XX_GPIO9 26
#define IRQ_IXP4XX_GPIO10 27
#define IRQ_IXP4XX_GPIO11 28
#define IRQ_IXP4XX_GPIO12 29
#define IRQ_IXP4XX_SW_INT1 30
#define IRQ_IXP4XX_SW_INT2 31
#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU)
/*
* IXDP425 board IRQs
*/
#define IRQ_IXDP425_PCI_INTA IRQ_IXP4XX_GPIO11
#define IRQ_IXDP425_PCI_INTB IRQ_IXP4XX_GPIO10
#define IRQ_IXDP425_PCI_INTC IRQ_IXP4XX_GPIO9
#define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8
/*
* PrPMC1100 Board IRQs
*/
#define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11
#define IRQ_PRPMC1100_PCI_INTB IRQ_IXP4XX_GPIO10
#define IRQ_PRPMC1100_PCI_INTC IRQ_IXP4XX_GPIO9
#define IRQ_PRPMC1100_PCI_INTD IRQ_IXP4XX_GPIO8
/*
* ADI Coyote Board IRQs
*/
#define IRQ_COYOTE_PCI_SLOT0 IRQ_IXP4XX_GPIO6
#define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11
#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5
#endif
include/asm-arm/arch-ixp4xx/ixdp425.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/ixdp425.h
*
* IXDP425 platform specific definitions
*
* 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 IXDP425_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define IXDP425_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
#define IXDP425_SDA_PIN 7
#define IXDP425_SCL_PIN 6
/*
* IXDP425 PCI IRQs
*/
#define IXDP425_PCI_MAX_DEV 4
#define IXDP425_PCI_IRQ_LINES 4
/* PCI controller GPIO to IRQ pin mappings */
#define IXDP425_PCI_INTA_PIN 11
#define IXDP425_PCI_INTB_PIN 10
#define IXDP425_PCI_INTC_PIN 9
#define IXDP425_PCI_INTD_PIN 8
include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
0 → 100644
View file @
d43e2297
This diff is collapsed.
Click to expand it.
include/asm-arm/arch-ixp4xx/memory.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/memory.h
*
* Copyright (c) 2001-2004 MontaVista Software, Inc.
*/
#ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
#define PAGE_OFFSET (0xc0000000UL)
/*
* Physical DRAM offset.
*/
#define PHYS_OFFSET (0x00000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*
* These are dummies for now.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
include/asm-arm/arch-ixp4xx/param.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/param.h
*/
include/asm-arm/arch-ixp4xx/platform.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/platform.h
*
* Constants and functions that are useful to IXP4xx platform-specific code
* and device drivers.
*
* Copyright (C) 2004 MontaVista Software, Inc.
*/
#ifndef __ASM_ARCH_HARDWARE_H__
#error "Do not include this directly, instead #include <asm/hardware.h>"
#endif
#ifndef __ASSEMBLY__
#include <asm/types.h>
/*
* Expansion bus memory regions
*/
#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000)
#define IXP4XX_EXP_BUS_CSX_REGION_SIZE (0x01000000)
#define IXP4XX_EXP_BUS_CS0_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x00000000)
#define IXP4XX_EXP_BUS_CS1_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x01000000)
#define IXP4XX_EXP_BUS_CS2_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x02000000)
#define IXP4XX_EXP_BUS_CS3_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x03000000)
#define IXP4XX_EXP_BUS_CS4_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x04000000)
#define IXP4XX_EXP_BUS_CS5_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x05000000)
#define IXP4XX_EXP_BUS_CS6_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x06000000)
#define IXP4XX_EXP_BUS_CS7_BASE_PHYS (IXP4XX_EXP_BUS_BASE_PHYS + 0x07000000)
#define IXP4XX_FLASH_WRITABLE (0x2)
#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
#define IXP4XX_FLASH_WRITE (0xbcd23c42)
/*
* Clock Speed Definitions.
*/
#define IXP4XX_PERIPHERAL_BUS_CLOCK (66)
/* 66Mhzi APB BUS */
#define IXP4XX_UART_XTAL 14745600
/*
* The IXP4xx chips do not have an I2C unit, so GPIO lines are just
* used to
* Used as platform_data to provide GPIO pin information to the ixp42x
* I2C driver.
*/
struct
ixp4xx_i2c_pins
{
unsigned
long
sda_pin
;
unsigned
long
scl_pin
;
};
/*
* Functions used by platform-level setup code
*/
extern
void
ixp4xx_map_io
(
void
);
extern
void
ixp4xx_init_irq
(
void
);
extern
void
ixp4xx_pci_preinit
(
void
);
struct
pci_sys_data
;
extern
int
ixp4xx_setup
(
int
nr
,
struct
pci_sys_data
*
sys
);
extern
struct
pci_bus
*
ixp4xx_scan_bus
(
int
nr
,
struct
pci_sys_data
*
sys
);
/*
* GPIO-functions
*/
/*
* The following converted to the real HW bits the gpio_line_config
*/
/* GPIO pin types */
#define IXP4XX_GPIO_OUT 0x1
#define IXP4XX_GPIO_IN 0x2
#define IXP4XX_GPIO_INTSTYLE_MASK 0x7C
/* Bits [6:2] define interrupt style */
/*
* GPIO interrupt types.
*/
#define IXP4XX_GPIO_ACTIVE_HIGH 0x4
/* Default */
#define IXP4XX_GPIO_ACTIVE_LOW 0x8
#define IXP4XX_GPIO_RISING_EDGE 0x10
#define IXP4XX_GPIO_FALLING_EDGE 0x20
#define IXP4XX_GPIO_TRANSITIONAL 0x40
/* GPIO signal types */
#define IXP4XX_GPIO_LOW 0
#define IXP4XX_GPIO_HIGH 1
/* GPIO Clocks */
#define IXP4XX_GPIO_CLK_0 14
#define IXP4XX_GPIO_CLK_1 15
extern
void
gpio_line_config
(
u8
line
,
u32
style
);
static
inline
void
gpio_line_get
(
u8
line
,
int
*
value
)
{
*
value
=
(
*
IXP4XX_GPIO_GPINR
>>
line
)
&
0x1
;
}
static
inline
void
gpio_line_set
(
u8
line
,
int
value
)
{
if
(
value
==
IXP4XX_GPIO_HIGH
)
*
IXP4XX_GPIO_GPOUTR
|=
(
1
<<
line
);
else
if
(
value
==
IXP4XX_GPIO_LOW
)
*
IXP4XX_GPIO_GPOUTR
&=
~
(
1
<<
line
);
}
static
inline
void
gpio_line_isr_clear
(
u8
line
)
{
*
IXP4XX_GPIO_GPISR
=
(
1
<<
line
);
}
#endif // __ASSEMBLY__
include/asm-arm/arch-ixp4xx/prpmc1100.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/prpmc1100.h
*
* Motorolla PrPMC1100 platform specific definitions
*
* 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 PRPMC1100_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define PRPMC1100_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
#define PRPMC1100_PCI_MIN_DEVID 10
#define PRPMC1100_PCI_MAX_DEVID 16
#define PRPMC1100_PCI_IRQ_LINES 4
/* PCI controller GPIO to IRQ pin mappings */
#define PRPMC1100_PCI_INTA_PIN 11
#define PRPMC1100_PCI_INTB_PIN 10
#define PRPMC1100_PCI_INTC_PIN 9
#define PRPMC1100_PCI_INTD_PIN 8
include/asm-arm/arch-ixp4xx/serial.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/serial.h
*
* Author: Deepak Saxena <dsaxena@plexity.net>
*
* Copyright (C) 2002-2004 MontaVista Software, Inc.
*
*/
#ifndef _ARCH_SERIAL_H_
#define _ARCH_SERIAL_H_
/*
* We don't hardcode our serial port information but instead
* fill it in dynamically based on our platform in arch->map_io.
* This allows for per-board serial ports w/o a bunch of
* #ifdefs in this file.
*/
#define STD_SERIAL_PORT_DEFNS
#define EXTRA_SERIAL_PORT_DEFNS
/*
* IXP4XX uses 15.6MHz clock for uart
*/
#define BASE_BAUD ( IXP4XX_UART_XTAL / 16 )
#endif // _ARCH_SERIAL_H_
include/asm-arm/arch-ixp4xx/system.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4x//system.h
*
* Copyright (C) 2002 Intel Corporation.
*
* 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 <asm/hardware.h>
static
inline
void
arch_idle
(
void
)
{
#if 0
if (!hlt_counter)
cpu_do_idle(0);
#endif
}
static
inline
void
arch_reset
(
char
mode
)
{
if
(
1
&&
mode
==
's'
)
{
/* Jump into ROM at address 0 */
cpu_reset
(
0
);
}
else
{
/* Use on-chip reset capability */
/* set the "key" register to enable access to
* "timer" and "enable" registers
*/
*
IXP4XX_OSWK
=
0x482e
;
/* write 0 to the timer register for an immidiate reset */
*
IXP4XX_OSWT
=
0
;
/* disable watchdog interrupt, enable reset, enable count */
*
IXP4XX_OSWE
=
0x3
;
}
}
include/asm-arm/arch-ixp4xx/time.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/time.h
*
* We implement timer code in arch/arm/mach-ixp4xx/time.c
*
*/
include/asm-arm/arch-ixp4xx/timex.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/timex.h
*
*/
#include <asm/hardware.h>
/*
* We use IXP425 General purpose timer for our timer needs, it runs at 66 MHz
*/
#define CLOCK_TICK_RATE (IXP4XX_PERIPHERAL_BUS_CLOCK * 1000000)
include/asm-arm/arch-ixp4xx/uncompress.h
0 → 100644
View file @
d43e2297
/*
* include/asm-arm/arch-ixp4xx/uncompress.h
*
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* 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.
*
*/
#ifndef _ARCH_UNCOMPRESS_H_
#define _ARCH_UNCOMPRESS_H_
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <linux/serial_reg.h>
#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
static
volatile
u32
*
uart_base
;
static
__inline__
void
putc
(
char
c
)
{
/* Check THRE and TEMT bits before we transmit the character.
*/
while
((
uart_base
[
UART_LSR
]
&
TX_DONE
)
!=
TX_DONE
);
*
uart_base
=
c
;
}
/*
* This does not append a newline
*/
static
void
puts
(
const
char
*
s
)
{
while
(
*
s
)
{
putc
(
*
s
);
if
(
*
s
==
'\n'
)
putc
(
'\r'
);
s
++
;
}
}
static
__inline__
void
__arch_decomp_setup
(
unsigned
long
arch_id
)
{
/*
* Coyote only has UART2 connected
*/
if
(
__machine_arch_type
==
MACH_TYPE_ADI_COYOTE
)
uart_base
=
(
volatile
u32
*
)
IXP4XX_UART2_BASE_PHYS
;
else
uart_base
=
(
volatile
u32
*
)
IXP4XX_UART1_BASE_PHYS
;
}
/*
* arch_id is a variable in decompress_kernel()
*/
#define arch_decomp_setup() __arch_decomp_setup(arch_id)
#define arch_decomp_wdog()
#endif
include/asm-arm/arch-ixp4xx/vmalloc.h
0 → 100644
View file @
d43e2297
/*
* linux/include/asm-arm/arch-ixp4xx/vmalloc.h
*/
/*
* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*/
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
#define VMALLOC_END (0xFF000000)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment