diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach | |
download | trunk-36060-master.tar.gz trunk-36060-master.tar.bz2 trunk-36060-master.zip |
Diffstat (limited to 'target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach')
27 files changed, 1028 insertions, 0 deletions
diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/entries b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/entries new file mode 100644 index 0000000..d83f9c6 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/entries @@ -0,0 +1,470 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach +svn://svn.openwrt.org/openwrt + + + +2013-03-16T22:25:47.833948Z +36060 +florian + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +entry-macro.S +file + + + + +2013-03-17T12:12:49.000000Z +04db70e8a57a503e132661f69c63220b +2013-03-16T22:25:47.833948Z +36060 +florian + + + + + + + + + + + + + + + + + + + + + +131 + +hardware.h +file + + + + +2013-03-17T12:12:49.000000Z +6d7278547e18c99de492e74637d4d2db +2012-06-23T11:03:40.441712Z +32487 +florian + + + + + + + + + + + + + + + + + + + + + +332 + +gpio.h +file + + + + +2013-03-17T12:12:49.000000Z +674568d2dfb6b13819425444e47fc429 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +370 + +irqs.h +file + + + + +2013-03-17T12:12:49.000000Z +ae125f5fa07dcc605da49211c8549234 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +484 + +uncompress.h +file + + + + +2013-03-17T12:12:49.000000Z +14c481a483c4b3fc7267a3840c360635 +2012-06-23T11:03:50.410642Z +32489 +florian + + + + + + + + + + + + + + + + + + + + + +907 + +debug-macro.S +file + + + + +2013-03-17T12:12:49.000000Z +8431e426ee9f03ce277dba42b31c1cad +2012-06-23T11:03:50.410642Z +32489 +florian + + + + + + + + + + + + + + + + + + + + + +274 + +param.h +file + + + + +2013-03-17T12:12:49.000000Z +01a5e2d375d93e20e9412b44cfd8af01 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +319 + +system.h +file + + + + +2013-03-17T12:12:49.000000Z +5d03c1e355566270e00f6e8d4a160f5f +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +421 + +timex.h +file + + + + +2013-03-17T12:12:49.000000Z +f1497801be212a45be3c3d41c02cc0f3 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +375 + +cpu.h +file + + + + +2013-03-17T12:12:49.000000Z +12dba962b94cc6df7afbc83a5df3ccf4 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +407 + +io.h +file + + + + +2013-03-17T12:12:49.000000Z +5106a6f4d7f494810e66246bd4f02487 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +777 + +mcs814x.h +file + + + + +2013-03-17T12:12:49.000000Z +66ea6b6e55f534a52b211179fa57a23e +2012-07-05T18:46:52.204448Z +32627 +florian + + + + + + + + + + + + + + + + + + + + + +1341 + +memory.h +file + + + + +2013-03-17T12:12:49.000000Z +9864a03b0a9b4981c7dd488d3cddd730 +2012-06-19T14:48:56.071313Z +32462 +florian + + + + + + + + + + + + + + + + + + + + + +409 + diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/cpu.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/cpu.h.svn-base new file mode 100644 index 0000000..1ef3c4a --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/cpu.h.svn-base @@ -0,0 +1,16 @@ +#ifndef __ASM_ARCH_CPU_H__ +#define __ASM_ARCH_CPU_H__ + +#include <asm/cputype.h> + +#define MCS8140_ID 0x41069260 /* ARM926EJ-S */ +#define MCS814X_MASK 0xff0ffff0 + +#ifdef CONFIG_MCS8140 +/* Moschip MCS8140 is based on an ARM926EJ-S core */ +#define soc_is_mcs8140() ((read_cpuid_id() & MCS814X_MASK) == MCS8140_ID) +#else +#define soc_is_mcs8140() (0) +#endif /* !CONFIG_MCS8140 */ + +#endif /* __ASM_ARCH_CPU_H__ */ diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/debug-macro.S.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/debug-macro.S.svn-base new file mode 100644 index 0000000..93ecea4 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/debug-macro.S.svn-base @@ -0,0 +1,11 @@ +#include <mach/mcs814x.h> + + .macro addruart, rp, rv, tmp + ldr \rp, =MCS814X_PHYS_BASE + ldr \rv, =MCS814X_VIRT_BASE + orr \rp, \rp, #MCS814X_UART + orr \rv, \rv, #MCS814X_UART + .endm + +#define UART_SHIFT 2 +#include <asm/hardware/debug-8250.S> diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/entry-macro.S.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/entry-macro.S.svn-base new file mode 100644 index 0000000..16d2d6d --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/entry-macro.S.svn-base @@ -0,0 +1,6 @@ +#include <mach/mcs814x.h> + .macro disable_fiq + .endm + + .macro arch_ret_to_user, tmp1, tmp2 + .endm diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/gpio.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/gpio.h.svn-base new file mode 100644 index 0000000..20240c2 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/gpio.h.svn-base @@ -0,0 +1,21 @@ +#ifndef __ASM_ARCH_GPIO_H +#define __ASM_ARCH_GPIO_H + +/* new generic GPIO API */ +#include <asm-generic/gpio.h> + +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value +#define gpio_cansleep __gpio_cansleep + +static inline int gpio_to_irq(unsigned gpio) +{ + return -EINVAL; +} + +static inline int irq_to_gpio(unsigned irq) +{ + return -EINVAL; +} + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/hardware.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/hardware.h.svn-base new file mode 100644 index 0000000..529f648 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/hardware.h.svn-base @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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 "mcs814x.h" + +#endif + diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/io.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/io.h.svn-base new file mode 100644 index 0000000..80e56f6 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/io.h.svn-base @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * 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 + +#define IO_SPACE_LIMIT 0xffffffff + +/* + * We don't support ins[lb]/outs[lb]. Make them fault. + */ +#define __raw_readsb(p, d, l) do { *(int *)0 = 0; } while (0) +#define __raw_readsl(p, d, l) do { *(int *)0 = 0; } while (0) +#define __raw_writesb(p, d, l) do { *(int *)0 = 0; } while (0) +#define __raw_writesl(p, d, l) do { *(int *)0 = 0; } while (0) + +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/irqs.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/irqs.h.svn-base new file mode 100644 index 0000000..78021d1 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/irqs.h.svn-base @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_IRQS_H +#define __ASM_ARCH_IRQS_H + +#define FIQ_START 0 + +#define NR_IRQS 32 + +#define IRQ_PCI_INTA 22 +#define IRQ_PCI_INTB 23 +#define IRQ_PCI_INTC 24 +#define IRQ_PCI_INTD 26 + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/mcs814x.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/mcs814x.h.svn-base new file mode 100644 index 0000000..8252d33 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/mcs814x.h.svn-base @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_MCS814X_H +#define __ASM_ARCH_MCS814X_H + +#define MCS814X_IO_BASE 0xF0000000 +#define MCS814X_IO_START 0x40000000 +#define MCS814X_IO_SIZE 0x00100000 + +/* IRQ controller register offset */ +#define MCS814X_IRQ_ICR 0x00 +#define MCS814X_IRQ_ISR 0x04 +#define MCS814X_IRQ_MASK 0x20 +#define MCS814X_IRQ_STS0 0x40 + +#define MCS814X_PHYS_BASE 0x40000000 +#define MCS814X_VIRT_BASE MCS814X_IO_BASE + +#define MCS814X_UART 0x000DC000 +#define MCS814X_DBGLED 0x000EC000 +#define MCS814X_SYSDBG 0x000F8000 +#define MCS814X_SYSDBG_SIZE 0x50 + +/* System configuration and bootstrap registers */ +#define SYSDBG_BS1 0x00 +#define CPU_FREQ_SHIFT 27 +#define CPU_FREQ_MASK 0x0F +#define SDRAM_FREQ_BIT (1 << 22) + +#define SYSDBG_BS2 0x04 +#define LED_CFG_MASK 0x03 +#define CPU_MODE_SHIFT 23 +#define CPU_MODE_MASK 0x03 + +#define SYSDBG_SYSCTL_MAC 0x1d +#define BUF_SHIFT_BIT (1 << 0) + +#define SYSDBG_SYSCTL 0x08 +#define SYSCTL_EMAC (1 << 0) +#define SYSCTL_EPHY (1 << 0) /* active low */ +#define SYSCTL_CIPHER (1 << 16) + +#define SYSDBG_PLL_CTL 0x3C + +#endif /* __ASM_ARCH_MCS814X_H */ + diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/memory.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/memory.h.svn-base new file mode 100644 index 0000000..ad87c7b --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/memory.h.svn-base @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * 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_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#define PLAT_PHYS_OFFSET UL(0x00000000) + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/param.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/param.h.svn-base new file mode 100644 index 0000000..7ffe70b --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/param.h.svn-base @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_PARAM_H +#define __ASM_ARCH_PARAM_H + +#define HZ 100 + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/system.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/system.h.svn-base new file mode 100644 index 0000000..cf5453d --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/system.h.svn-base @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * Copyright (C) 2012 Florian Fainelli <florian@openwrt.org> + * + * 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_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +static inline void arch_idle(void) +{ + cpu_do_idle(); +} +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/timex.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/timex.h.svn-base new file mode 100644 index 0000000..f05c8ee --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/timex.h.svn-base @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_TIMEX_H +#define __ASM_ARCH_TIMEX_H + +/* + * Timex specification for MCS814X + */ +#define CLOCK_TICK_RATE 100 + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/uncompress.h.svn-base b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/uncompress.h.svn-base new file mode 100644 index 0000000..cf3ed9a --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/.svn/text-base/uncompress.h.svn-base @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * 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_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +#include <linux/serial_reg.h> +#include <asm/io.h> +#include <mach/mcs814x.h> +#include <mach/cpu.h> + +#define UART_SHIFT (2) + +/* cannot be static because the code will be inlined */ +void __iomem *uart_base; + +static inline void putc(int c) +{ + while (!(__raw_readb(uart_base + (UART_LSR << UART_SHIFT)) & UART_LSR_TEMT)); + __raw_writeb(c, uart_base + (UART_TX << UART_SHIFT)); +} + +static inline void flush(void) +{ +} + +static inline void arch_decomp_setup(void) +{ + if (soc_is_mcs8140()) + uart_base = (void __iomem *)(MCS814X_PHYS_BASE +MCS814X_UART); +} + +#define arch_decomp_wdog() + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/cpu.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/cpu.h new file mode 100644 index 0000000..1ef3c4a --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/cpu.h @@ -0,0 +1,16 @@ +#ifndef __ASM_ARCH_CPU_H__ +#define __ASM_ARCH_CPU_H__ + +#include <asm/cputype.h> + +#define MCS8140_ID 0x41069260 /* ARM926EJ-S */ +#define MCS814X_MASK 0xff0ffff0 + +#ifdef CONFIG_MCS8140 +/* Moschip MCS8140 is based on an ARM926EJ-S core */ +#define soc_is_mcs8140() ((read_cpuid_id() & MCS814X_MASK) == MCS8140_ID) +#else +#define soc_is_mcs8140() (0) +#endif /* !CONFIG_MCS8140 */ + +#endif /* __ASM_ARCH_CPU_H__ */ diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/debug-macro.S b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/debug-macro.S new file mode 100644 index 0000000..93ecea4 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/debug-macro.S @@ -0,0 +1,11 @@ +#include <mach/mcs814x.h> + + .macro addruart, rp, rv, tmp + ldr \rp, =MCS814X_PHYS_BASE + ldr \rv, =MCS814X_VIRT_BASE + orr \rp, \rp, #MCS814X_UART + orr \rv, \rv, #MCS814X_UART + .endm + +#define UART_SHIFT 2 +#include <asm/hardware/debug-8250.S> diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/entry-macro.S b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/entry-macro.S new file mode 100644 index 0000000..16d2d6d --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/entry-macro.S @@ -0,0 +1,6 @@ +#include <mach/mcs814x.h> + .macro disable_fiq + .endm + + .macro arch_ret_to_user, tmp1, tmp2 + .endm diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/gpio.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/gpio.h new file mode 100644 index 0000000..20240c2 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/gpio.h @@ -0,0 +1,21 @@ +#ifndef __ASM_ARCH_GPIO_H +#define __ASM_ARCH_GPIO_H + +/* new generic GPIO API */ +#include <asm-generic/gpio.h> + +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value +#define gpio_cansleep __gpio_cansleep + +static inline int gpio_to_irq(unsigned gpio) +{ + return -EINVAL; +} + +static inline int irq_to_gpio(unsigned irq) +{ + return -EINVAL; +} + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/hardware.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/hardware.h new file mode 100644 index 0000000..529f648 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/hardware.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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 "mcs814x.h" + +#endif + diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/io.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/io.h new file mode 100644 index 0000000..80e56f6 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/io.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * 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 + +#define IO_SPACE_LIMIT 0xffffffff + +/* + * We don't support ins[lb]/outs[lb]. Make them fault. + */ +#define __raw_readsb(p, d, l) do { *(int *)0 = 0; } while (0) +#define __raw_readsl(p, d, l) do { *(int *)0 = 0; } while (0) +#define __raw_writesb(p, d, l) do { *(int *)0 = 0; } while (0) +#define __raw_writesl(p, d, l) do { *(int *)0 = 0; } while (0) + +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/irqs.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/irqs.h new file mode 100644 index 0000000..78021d1 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/irqs.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_IRQS_H +#define __ASM_ARCH_IRQS_H + +#define FIQ_START 0 + +#define NR_IRQS 32 + +#define IRQ_PCI_INTA 22 +#define IRQ_PCI_INTB 23 +#define IRQ_PCI_INTC 24 +#define IRQ_PCI_INTD 26 + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/mcs814x.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/mcs814x.h new file mode 100644 index 0000000..8252d33 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/mcs814x.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_MCS814X_H +#define __ASM_ARCH_MCS814X_H + +#define MCS814X_IO_BASE 0xF0000000 +#define MCS814X_IO_START 0x40000000 +#define MCS814X_IO_SIZE 0x00100000 + +/* IRQ controller register offset */ +#define MCS814X_IRQ_ICR 0x00 +#define MCS814X_IRQ_ISR 0x04 +#define MCS814X_IRQ_MASK 0x20 +#define MCS814X_IRQ_STS0 0x40 + +#define MCS814X_PHYS_BASE 0x40000000 +#define MCS814X_VIRT_BASE MCS814X_IO_BASE + +#define MCS814X_UART 0x000DC000 +#define MCS814X_DBGLED 0x000EC000 +#define MCS814X_SYSDBG 0x000F8000 +#define MCS814X_SYSDBG_SIZE 0x50 + +/* System configuration and bootstrap registers */ +#define SYSDBG_BS1 0x00 +#define CPU_FREQ_SHIFT 27 +#define CPU_FREQ_MASK 0x0F +#define SDRAM_FREQ_BIT (1 << 22) + +#define SYSDBG_BS2 0x04 +#define LED_CFG_MASK 0x03 +#define CPU_MODE_SHIFT 23 +#define CPU_MODE_MASK 0x03 + +#define SYSDBG_SYSCTL_MAC 0x1d +#define BUF_SHIFT_BIT (1 << 0) + +#define SYSDBG_SYSCTL 0x08 +#define SYSCTL_EMAC (1 << 0) +#define SYSCTL_EPHY (1 << 0) /* active low */ +#define SYSCTL_CIPHER (1 << 16) + +#define SYSDBG_PLL_CTL 0x3C + +#endif /* __ASM_ARCH_MCS814X_H */ + diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/memory.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/memory.h new file mode 100644 index 0000000..ad87c7b --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/memory.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * 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_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#define PLAT_PHYS_OFFSET UL(0x00000000) + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/param.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/param.h new file mode 100644 index 0000000..7ffe70b --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/param.h @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_PARAM_H +#define __ASM_ARCH_PARAM_H + +#define HZ 100 + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/system.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/system.h new file mode 100644 index 0000000..cf5453d --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/system.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * Copyright (C) 2012 Florian Fainelli <florian@openwrt.org> + * + * 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_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +static inline void arch_idle(void) +{ + cpu_do_idle(); +} +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/timex.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/timex.h new file mode 100644 index 0000000..f05c8ee --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/timex.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2003 Artec Design Ltd. + * + * 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_TIMEX_H +#define __ASM_ARCH_TIMEX_H + +/* + * Timex specification for MCS814X + */ +#define CLOCK_TICK_RATE 100 + +#endif diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/uncompress.h b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/uncompress.h new file mode 100644 index 0000000..cf3ed9a --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/include/mach/uncompress.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * 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_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +#include <linux/serial_reg.h> +#include <asm/io.h> +#include <mach/mcs814x.h> +#include <mach/cpu.h> + +#define UART_SHIFT (2) + +/* cannot be static because the code will be inlined */ +void __iomem *uart_base; + +static inline void putc(int c) +{ + while (!(__raw_readb(uart_base + (UART_LSR << UART_SHIFT)) & UART_LSR_TEMT)); + __raw_writeb(c, uart_base + (UART_TX << UART_SHIFT)); +} + +static inline void flush(void) +{ +} + +static inline void arch_decomp_setup(void) +{ + if (soc_is_mcs8140()) + uart_base = (void __iomem *)(MCS814X_PHYS_BASE +MCS814X_UART); +} + +#define arch_decomp_wdog() + +#endif |