diff options
Diffstat (limited to 'ANDROID_3.4.5/arch/arm/mach-prima2/include')
9 files changed, 193 insertions, 0 deletions
diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/clkdev.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/clkdev.h new file mode 100644 index 00000000..66932518 --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/clkdev.h @@ -0,0 +1,15 @@ +/* + * arch/arm/mach-prima2/include/mach/clkdev.h + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __MACH_CLKDEV_H +#define __MACH_CLKDEV_H + +#define __clk_get(clk) ({ 1; }) +#define __clk_put(clk) do { } while (0) + +#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/debug-macro.S b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/debug-macro.S new file mode 100644 index 00000000..cd97492b --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/debug-macro.S @@ -0,0 +1,29 @@ +/* + * arch/arm/mach-prima2/include/mach/debug-macro.S + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#include <mach/hardware.h> +#include <mach/uart.h> + + .macro addruart, rp, rv, tmp + ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical + ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA] + .endm + + .macro busyuart,rd,rx + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS] + tst \rd, #SIRFSOC_UART1_TXFIFO_EMPTY + beq 1001b + .endm + diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/entry-macro.S b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/entry-macro.S new file mode 100644 index 00000000..86434e7a --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/entry-macro.S @@ -0,0 +1,22 @@ +/* + * arch/arm/mach-prima2/include/mach/entry-macro.S + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#include <mach/hardware.h> + +#define SIRFSOC_INT_ID 0x38 + + .macro get_irqnr_preamble, base, tmp + ldr \base, =sirfsoc_intc_base + ldr \base, [\base] + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqnr, [\base, #SIRFSOC_INT_ID] @ Get the highest priority irq + cmp \irqnr, #0x40 @ the irq num can't be larger than 0x3f + movges \irqnr, #0 + .endm diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/hardware.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/hardware.h new file mode 100644 index 00000000..105b9696 --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/hardware.h @@ -0,0 +1,15 @@ +/* + * arch/arm/mach-prima2/include/mach/hardware.h + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __MACH_HARDWARE_H__ +#define __MACH_HARDWARE_H__ + +#include <asm/sizes.h> +#include <mach/map.h> + +#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/irqs.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/irqs.h new file mode 100644 index 00000000..bb354f95 --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/irqs.h @@ -0,0 +1,17 @@ +/* + * arch/arm/mach-prima2/include/mach/irqs.h + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __ASM_ARCH_IRQS_H +#define __ASM_ARCH_IRQS_H + +#define SIRFSOC_INTENAL_IRQ_START 0 +#define SIRFSOC_INTENAL_IRQ_END 59 + +#define NR_IRQS 220 + +#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/map.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/map.h new file mode 100644 index 00000000..6f243532 --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/map.h @@ -0,0 +1,18 @@ +/* + * memory & I/O static mapping definitions for CSR SiRFprimaII + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __MACH_PRIMA2_MAP_H__ +#define __MACH_PRIMA2_MAP_H__ + +#include <linux/const.h> + +#define SIRFSOC_VA_BASE _AC(0xFEC00000, UL) + +#define SIRFSOC_VA(x) (SIRFSOC_VA_BASE + ((x) & 0x00FFF000)) + +#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/timex.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/timex.h new file mode 100644 index 00000000..d6f98a75 --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/timex.h @@ -0,0 +1,14 @@ +/* + * arch/arm/mach-prima2/include/mach/timex.h + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __MACH_TIMEX_H__ +#define __MACH_TIMEX_H__ + +#define CLOCK_TICK_RATE 1000000 + +#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/uart.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/uart.h new file mode 100644 index 00000000..c98b4d5a --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/uart.h @@ -0,0 +1,23 @@ +/* + * arch/arm/mach-prima2/include/mach/uart.h + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __MACH_PRIMA2_SIRFSOC_UART_H +#define __MACH_PRIMA2_SIRFSOC_UART_H + +/* UART-1: used as serial debug port */ +#define SIRFSOC_UART1_PA_BASE 0xb0060000 +#define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) +#define SIRFSOC_UART1_SIZE SZ_4K + +#define SIRFSOC_UART_TXFIFO_STATUS 0x0114 +#define SIRFSOC_UART_TXFIFO_DATA 0x0118 + +#define SIRFSOC_UART1_TXFIFO_FULL (1 << 5) +#define SIRFSOC_UART1_TXFIFO_EMPTY (1 << 6) + +#endif diff --git a/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/uncompress.h b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/uncompress.h new file mode 100644 index 00000000..83125c6a --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/mach-prima2/include/mach/uncompress.h @@ -0,0 +1,40 @@ +/* + * arch/arm/mach-prima2/include/mach/uncompress.h + * + * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. + * + * Licensed under GPLv2 or later. + */ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +#include <linux/io.h> +#include <mach/hardware.h> +#include <mach/uart.h> + +void arch_decomp_setup(void) +{ +} + +#define arch_decomp_wdog() + +static __inline__ void putc(char c) +{ + /* + * during kernel decompression, all mappings are flat: + * virt_addr == phys_addr + */ + while (__raw_readl(SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_STATUS) + & SIRFSOC_UART1_TXFIFO_FULL) + barrier(); + + __raw_writel(c, SIRFSOC_UART1_PA_BASE + SIRFSOC_UART_TXFIFO_DATA); +} + +static inline void flush(void) +{ +} + +#endif + |