-
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.
Merge branch 'zynq/master' of git+ssh://master.kernel.org/pub/scm/lin…
…ux/kernel/git/arm/linux-arm-soc into next/soc Conflicts: arch/arm/Kconfig arch/arm/mm/Kconfig
- Loading branch information
Showing
24 changed files
with
918 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Xilinx Zynq EP107 Emulation Platform board | ||
|
||
This board is an emulation platform for the Zynq product which is | ||
based on an ARM Cortex A9 processor. | ||
|
||
Required root node properties: | ||
- compatible = "xlnx,zynq-ep107"; |
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,52 @@ | ||
/* | ||
* Copyright (C) 2011 Xilinx | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
/dts-v1/; | ||
/ { | ||
model = "Xilinx Zynq EP107"; | ||
compatible = "xlnx,zynq-ep107"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
interrupt-parent = <&intc>; | ||
|
||
memory { | ||
device_type = "memory"; | ||
reg = <0x0 0x10000000>; | ||
}; | ||
|
||
chosen { | ||
bootargs = "console=ttyPS0,9600 root=/dev/ram rw initrd=0x800000,8M earlyprintk"; | ||
linux,stdout-path = &uart0; | ||
}; | ||
|
||
amba { | ||
compatible = "simple-bus"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
ranges; | ||
|
||
intc: interrupt-controller@f8f01000 { | ||
interrupt-controller; | ||
compatible = "arm,gic"; | ||
reg = <0xF8F01000 0x1000>; | ||
#interrupt-cells = <2>; | ||
}; | ||
|
||
uart0: uart@e0000000 { | ||
compatible = "xlnx,xuartps"; | ||
reg = <0xE0000000 0x1000>; | ||
interrupts = <59 0>; | ||
clock = <50000000>; | ||
}; | ||
}; | ||
}; |
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,6 @@ | ||
# | ||
# Makefile for the linux kernel. | ||
# | ||
|
||
# Common support | ||
obj-y := common.o timer.o board_dt.o |
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,3 @@ | ||
zreladdr-y := 0x00008000 | ||
params_phys-y := 0x00000100 | ||
initrd_phys-y := 0x00800000 |
Empty file.
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,118 @@ | ||
/* | ||
* This file contains common code that is intended to be used across | ||
* boards so that it's not replicated. | ||
* | ||
* Copyright (C) 2011 Xilinx | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/kernel.h> | ||
#include <linux/cpumask.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/clk.h> | ||
#include <linux/of_irq.h> | ||
#include <linux/of_platform.h> | ||
#include <linux/of.h> | ||
|
||
#include <asm/mach/arch.h> | ||
#include <asm/mach/map.h> | ||
#include <asm/mach-types.h> | ||
#include <asm/page.h> | ||
#include <asm/hardware/gic.h> | ||
#include <asm/hardware/cache-l2x0.h> | ||
|
||
#include <mach/zynq_soc.h> | ||
#include <mach/clkdev.h> | ||
#include "common.h" | ||
|
||
static struct of_device_id zynq_of_bus_ids[] __initdata = { | ||
{ .compatible = "simple-bus", }, | ||
{} | ||
}; | ||
|
||
/** | ||
* xilinx_init_machine() - System specific initialization, intended to be | ||
* called from board specific initialization. | ||
*/ | ||
static void __init xilinx_init_machine(void) | ||
{ | ||
#ifdef CONFIG_CACHE_L2X0 | ||
/* | ||
* 64KB way size, 8-way associativity, parity disabled | ||
*/ | ||
l2x0_init(PL310_L2CC_BASE, 0x02060000, 0xF0F0FFFF); | ||
#endif | ||
|
||
of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL); | ||
} | ||
|
||
/** | ||
* xilinx_irq_init() - Interrupt controller initialization for the GIC. | ||
*/ | ||
static void __init xilinx_irq_init(void) | ||
{ | ||
gic_init(0, 29, SCU_GIC_DIST_BASE, SCU_GIC_CPU_BASE); | ||
} | ||
|
||
/* The minimum devices needed to be mapped before the VM system is up and | ||
* running include the GIC, UART and Timer Counter. | ||
*/ | ||
|
||
static struct map_desc io_desc[] __initdata = { | ||
{ | ||
.virtual = TTC0_VIRT, | ||
.pfn = __phys_to_pfn(TTC0_PHYS), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = SCU_PERIPH_VIRT, | ||
.pfn = __phys_to_pfn(SCU_PERIPH_PHYS), | ||
.length = SZ_8K, | ||
.type = MT_DEVICE, | ||
}, { | ||
.virtual = PL310_L2CC_VIRT, | ||
.pfn = __phys_to_pfn(PL310_L2CC_PHYS), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, | ||
|
||
#ifdef CONFIG_DEBUG_LL | ||
{ | ||
.virtual = UART0_VIRT, | ||
.pfn = __phys_to_pfn(UART0_PHYS), | ||
.length = SZ_4K, | ||
.type = MT_DEVICE, | ||
}, | ||
#endif | ||
|
||
}; | ||
|
||
/** | ||
* xilinx_map_io() - Create memory mappings needed for early I/O. | ||
*/ | ||
static void __init xilinx_map_io(void) | ||
{ | ||
iotable_init(io_desc, ARRAY_SIZE(io_desc)); | ||
} | ||
|
||
static const char *xilinx_dt_match[] = { | ||
"xlnx,zynq-ep107", | ||
NULL | ||
}; | ||
|
||
MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | ||
.map_io = xilinx_map_io, | ||
.init_irq = xilinx_irq_init, | ||
.init_machine = xilinx_init_machine, | ||
.timer = &xttcpss_sys_timer, | ||
.dt_compat = xilinx_dt_match, | ||
MACHINE_END |
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,24 @@ | ||
/* | ||
* This file contains common function prototypes to avoid externs | ||
* in the c files. | ||
* | ||
* Copyright (C) 2011 Xilinx | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef __MACH_ZYNQ_COMMON_H__ | ||
#define __MACH_ZYNQ_COMMON_H__ | ||
|
||
#include <asm/mach/time.h> | ||
|
||
extern struct sys_timer xttcpss_sys_timer; | ||
|
||
#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,32 @@ | ||
/* | ||
* arch/arm/mach-zynq/include/mach/clkdev.h | ||
* | ||
* Copyright (C) 2011 Xilinx, Inc. | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
#ifndef __MACH_CLKDEV_H__ | ||
#define __MACH_CLKDEV_H__ | ||
|
||
#include <plat/clock.h> | ||
|
||
struct clk { | ||
unsigned long rate; | ||
const struct clk_ops *ops; | ||
const struct icst_params *params; | ||
void __iomem *vcoreg; | ||
}; | ||
|
||
#define __clk_get(clk) ({ 1; }) | ||
#define __clk_put(clk) do { } while (0) | ||
|
||
#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,36 @@ | ||
/* arch/arm/mach-zynq/include/mach/debug-macro.S | ||
* | ||
* Debugging macro include header | ||
* | ||
* Copyright (C) 2011 Xilinx | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#include <mach/zynq_soc.h> | ||
#include <mach/uart.h> | ||
|
||
.macro addruart, rp, rv | ||
ldr \rp, =LL_UART_PADDR @ physical | ||
ldr \rv, =LL_UART_VADDR @ virtual | ||
.endm | ||
|
||
.macro senduart,rd,rx | ||
str \rd, [\rx, #UART_FIFO_OFFSET] @ TXDATA | ||
.endm | ||
|
||
.macro waituart,rd,rx | ||
.endm | ||
|
||
.macro busyuart,rd,rx | ||
1002: ldr \rd, [\rx, #UART_SR_OFFSET] @ get status register | ||
tst \rd, #UART_SR_TXFULL @ | ||
bne 1002b @ wait if FIFO is full | ||
.endm |
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,30 @@ | ||
/* | ||
* arch/arm/mach-zynq/include/mach/entry-macro.S | ||
* | ||
* Low-level IRQ helper macros | ||
* | ||
* Copyright (C) 2011 Xilinx | ||
* | ||
* based on arch/plat-mxc/include/mach/entry-macro.S | ||
* | ||
* Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> | ||
* Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#include <mach/hardware.h> | ||
#include <asm/hardware/entry-macro-gic.S> | ||
|
||
.macro disable_fiq | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm |
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,18 @@ | ||
/* arch/arm/mach-zynq/include/mach/hardware.h | ||
* | ||
* Copyright (C) 2011 Xilinx | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef __MACH_HARDWARE_H__ | ||
#define __MACH_HARDWARE_H__ | ||
|
||
#endif |
Oops, something went wrong.