Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77514
b: refs/heads/master
c: 585cf17
h: refs/heads/master
v: v3
  • Loading branch information
Tzachi Perelstein authored and Russell King committed Jan 26, 2008
1 parent 583bc02 commit 2461753
Show file tree
Hide file tree
Showing 20 changed files with 491 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d910a0aa21c9c6e824744d0139bbe6a9ae676e2d
refs/heads/master: 585cf17561d3174a745bec49c422c1a621c95fc4
8 changes: 8 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ config ARCH_MXC
help
Support for Freescale MXC/iMX-based family of processors

config ARCH_ORION
bool "Marvell Orion"
depends on MMU
help
Support for Marvell Orion System on Chip family.

config ARCH_PNX4008
bool "Philips Nexperia PNX4008 Mobile"
help
Expand Down Expand Up @@ -441,6 +447,8 @@ source "arch/arm/mach-omap1/Kconfig"

source "arch/arm/mach-omap2/Kconfig"

source "arch/arm/mach-orion/Kconfig"

source "arch/arm/plat-s3c24xx/Kconfig"
source "arch/arm/plat-s3c/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ endif
machine-$(CONFIG_ARCH_KS8695) := ks8695
incdir-$(CONFIG_ARCH_MXC) := mxc
machine-$(CONFIG_ARCH_MX3) := mx3
machine-$(CONFIG_ARCH_ORION) := orion

ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line.
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-orion/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if ARCH_ORION

menu "Orion Implementations"

endmenu

endif
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-orion/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-y += common.o
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-orion/Makefile.boot
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zreladdr-y := 0x00008000
params_phys-y := 0x00000100
initrd_phys-y := 0x00800000
53 changes: 53 additions & 0 deletions trunk/arch/arm/mach-orion/common.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* arch/arm/mach-orion/common.c
*
* Core functions for Marvell Orion System On Chip
*
* Maintainer: Tzachi Perelstein <tzachi@marvell.com>
*
* 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.
*/

#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/page.h>
#include <asm/mach/map.h>
#include <asm/arch/orion.h>
#include "common.h"

/*****************************************************************************
* I/O Address Mapping
****************************************************************************/
static struct map_desc orion_io_desc[] __initdata = {
{
.virtual = ORION_REGS_BASE,
.pfn = __phys_to_pfn(ORION_REGS_BASE),
.length = ORION_REGS_SIZE,
.type = MT_DEVICE
},
{
.virtual = ORION_PCIE_IO_BASE,
.pfn = __phys_to_pfn(ORION_PCIE_IO_BASE),
.length = ORION_PCIE_IO_SIZE,
.type = MT_DEVICE
},
{
.virtual = ORION_PCI_IO_BASE,
.pfn = __phys_to_pfn(ORION_PCI_IO_BASE),
.length = ORION_PCI_IO_SIZE,
.type = MT_DEVICE
},
{
.virtual = ORION_PCIE_WA_BASE,
.pfn = __phys_to_pfn(ORION_PCIE_WA_BASE),
.length = ORION_PCIE_WA_SIZE,
.type = MT_DEVICE
},
};

void __init orion_map_io(void)
{
iotable_init(orion_io_desc, ARRAY_SIZE(orion_io_desc));
}
9 changes: 9 additions & 0 deletions trunk/arch/arm/mach-orion/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __ARCH_ORION_COMMON_H__
#define __ARCH_ORION_COMMON_H__

/*
* Basic Orion init functions used early by machine-setup.
*/
void __init orion_map_io(void);

#endif /* __ARCH_ORION_COMMON_H__ */
17 changes: 17 additions & 0 deletions trunk/include/asm-arm/arch-orion/debug-macro.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* linux/include/asm-arm/arch-orion/debug-macro.S
*
* Debugging macro include header
*
* 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.
*/

.macro addruart,rx
mov \rx, #0xf1000000
orr \rx, \rx, #0x00012000
.endm

#define UART_SHIFT 2
#include <asm/hardware/debug-8250.S>
1 change: 1 addition & 0 deletions trunk/include/asm-arm/arch-orion/dma.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* empty */
31 changes: 31 additions & 0 deletions trunk/include/asm-arm/arch-orion/entry-macro.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* include/asm-arm/arch-orion/entry-macro.S
*
* Low-level IRQ helper macros for Orion platforms
*
* 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.
*/

#include <asm/arch/orion.h>

.macro disable_fiq
.endm

.macro arch_ret_to_user, tmp1, tmp2
.endm

.macro get_irqnr_preamble, base, tmp
ldr \base, =MAIN_IRQ_CAUSE
.endm

.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
ldr \irqstat, [\base, #0] @ main cause
ldr \tmp, [\base, #(MAIN_IRQ_MASK - MAIN_IRQ_CAUSE)] @ main mask
mov \irqnr, #0 @ default irqnr
@ find cause bits that are unmasked
ands \irqstat, \irqstat, \tmp @ clear Z flag if any
clzne \irqnr, \irqstat @ calc irqnr
rsbne \irqnr, \irqnr, #31
.endm
24 changes: 24 additions & 0 deletions trunk/include/asm-arm/arch-orion/hardware.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* include/asm-arm/arch-orion/hardware.h
*
* 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_HARDWARE_H__
#define __ASM_ARCH_HARDWARE_H__

#include "orion.h"

#define PCI_MEMORY_VADDR ORION_PCI_SYS_MEM_BASE
#define PCI_IO_VADDR ORION_PCI_SYS_IO_BASE

#define pcibios_assign_all_busses() 1

#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0x01000000
#define PCIMEM_BASE PCI_MEMORY_VADDR /* mem base for VGA */

#endif /* _ASM_ARCH_HARDWARE_H */
27 changes: 27 additions & 0 deletions trunk/include/asm-arm/arch-orion/io.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* include/asm-arm/arch-orion/io.h
*
* Tzachi Perelstein <tzachi@marvell.com>
*
* 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_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H

#include "orion.h"

#define IO_SPACE_LIMIT 0xffffffff
#define IO_SPACE_REMAP ORION_PCI_SYS_IO_BASE

static inline void __iomem *__io(unsigned long addr)
{
return (void __iomem *)addr;
}

#define __io(a) __io(a)
#define __mem_pci(a) (a)

#endif
61 changes: 61 additions & 0 deletions trunk/include/asm-arm/arch-orion/irqs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* include/asm-arm/arch-orion/irqs.h
*
* IRQ definitions for Orion SoC
*
* Maintainer: Tzachi Perelstein <tzachi@marvell.com>
*
* 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_IRQS_H__
#define __ASM_ARCH_IRQS_H__

#include "orion.h" /* need GPIO_MAX */

/*
* Orion Main Interrupt Controller
*/
#define IRQ_ORION_BRIDGE 0
#define IRQ_ORION_DOORBELL_H2C 1
#define IRQ_ORION_DOORBELL_C2H 2
#define IRQ_ORION_UART0 3
#define IRQ_ORION_UART1 4
#define IRQ_ORION_I2C 5
#define IRQ_ORION_GPIO_0_7 6
#define IRQ_ORION_GPIO_8_15 7
#define IRQ_ORION_GPIO_16_23 8
#define IRQ_ORION_GPIO_24_31 9
#define IRQ_ORION_PCIE0_ERR 10
#define IRQ_ORION_PCIE0_INT 11
#define IRQ_ORION_USB1_CTRL 12
#define IRQ_ORION_DEV_BUS_ERR 14
#define IRQ_ORION_PCI_ERR 15
#define IRQ_ORION_USB_BR_ERR 16
#define IRQ_ORION_USB0_CTRL 17
#define IRQ_ORION_ETH_RX 18
#define IRQ_ORION_ETH_TX 19
#define IRQ_ORION_ETH_MISC 20
#define IRQ_ORION_ETH_SUM 21
#define IRQ_ORION_ETH_ERR 22
#define IRQ_ORION_IDMA_ERR 23
#define IRQ_ORION_IDMA_0 24
#define IRQ_ORION_IDMA_1 25
#define IRQ_ORION_IDMA_2 26
#define IRQ_ORION_IDMA_3 27
#define IRQ_ORION_CESA 28
#define IRQ_ORION_SATA 29
#define IRQ_ORION_XOR0 30
#define IRQ_ORION_XOR1 31

/*
* Orion General Purpose Pins
*/
#define IRQ_ORION_GPIO_START 32
#define NR_GPIO_IRQS GPIO_MAX

#define NR_IRQS (IRQ_ORION_GPIO_START + NR_GPIO_IRQS)

#endif /* __ASM_ARCH_IRQS_H__ */
15 changes: 15 additions & 0 deletions trunk/include/asm-arm/arch-orion/memory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* include/asm-arm/arch-orion/memory.h
*
* Marvell Orion memory definitions
*/

#ifndef __ASM_ARCH_MMU_H
#define __ASM_ARCH_MMU_H

#define PHYS_OFFSET UL(0x00000000)

#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)

#endif
Loading

0 comments on commit 2461753

Please sign in to comment.