-
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.
ARM: 6010/1: ST SPEAr: Added basic header files for SPEAr3xx machine …
…family Reviewed-by: Linus Walleij <linux.walleij@stericsson.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- Loading branch information
viresh kumar
authored and
Russell King
committed
Apr 14, 2010
1 parent
3971047
commit a7e9c45
Showing
17 changed files
with
826 additions
and
0 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,14 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/debug-macro.S | ||
* | ||
* Debugging macro include header spear3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 <plat/debug-macro.S> |
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,46 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/entry-macro.S | ||
* | ||
* Low-level IRQ helper macros for SPEAr3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 <mach/hardware.h> | ||
#include <mach/spear.h> | ||
#include <asm/hardware/vic.h> | ||
|
||
.macro disable_fiq | ||
.endm | ||
|
||
.macro get_irqnr_preamble, base, tmp | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm | ||
|
||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
ldr \base, =VA_SPEAR3XX_ML1_VIC_BASE | ||
ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
teq \irqstat, #0 | ||
beq 1001f @ this will set/reset | ||
@ zero register | ||
/* | ||
* Following code will find bit position of least significang | ||
* bit set in irqstat, using following equation | ||
* least significant bit set in n = (n & ~(n-1)) | ||
*/ | ||
sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
mvn \tmp, \tmp @ tmp = ~tmp | ||
and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
/* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
clz \tmp, \irqstat @ tmp = leading zeros | ||
rsb \irqnr, \tmp, #0x1F @ irqnr = 32 - tmp - 1 | ||
|
||
1001: /* EQ will be set if no irqs pending */ | ||
.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,58 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/generic.h | ||
* | ||
* SPEAr3XX machine family generic header file | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 __MACH_GENERIC_H | ||
#define __MACH_GENERIC_H | ||
|
||
#include <asm/mach/time.h> | ||
#include <asm/mach/map.h> | ||
#include <linux/init.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/amba/bus.h> | ||
|
||
/* | ||
* Each GPT has 2 timer channels | ||
* Following GPT channels will be used as clock source and clockevent | ||
*/ | ||
#define SPEAR_GPT0_BASE SPEAR3XX_ML1_TMR_BASE | ||
#define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 | ||
#define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 | ||
|
||
/* Add spear3xx family device structure declarations here */ | ||
extern struct amba_device gpio_device; | ||
extern struct amba_device uart_device; | ||
extern struct sys_timer spear_sys_timer; | ||
|
||
/* Add spear3xx family function declarations here */ | ||
void __init spear3xx_map_io(void); | ||
void __init spear3xx_init_irq(void); | ||
void __init spear3xx_init(void); | ||
void __init spear300_init(void); | ||
void __init spear310_init(void); | ||
void __init spear320_init(void); | ||
void __init clk_init(void); | ||
|
||
/* Add spear300 machine device structure declarations here */ | ||
#ifdef CONFIG_MACH_SPEAR300 | ||
extern struct amba_device gpio1_device; | ||
#endif /* CONFIG_MACH_SPEAR300 */ | ||
|
||
/* Add spear310 machine device structure declarations here */ | ||
#ifdef CONFIG_MACH_SPEAR310 | ||
#endif /* CONFIG_MACH_SPEAR310 */ | ||
|
||
/* Add spear320 machine device structure declarations here */ | ||
#ifdef CONFIG_MACH_SPEAR320 | ||
#endif /* CONFIG_MACH_SPEAR320 */ | ||
|
||
#endif /* __MACH_GENERIC_H */ |
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,19 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/gpio.h | ||
* | ||
* GPIO macros for SPEAr3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 __MACH_GPIO_H | ||
#define __MACH_GPIO_H | ||
|
||
#include <plat/gpio.h> | ||
|
||
#endif /* __MACH_GPIO_H */ |
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,20 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/hardware.h | ||
* | ||
* Hardware definitions for SPEAr3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 __MACH_HARDWARE_H | ||
#define __MACH_HARDWARE_H | ||
|
||
/* Vitual to physical translation of statically mapped space */ | ||
#define IO_ADDRESS(x) (x | 0xF0000000) | ||
|
||
#endif /* __MACH_HARDWARE_H */ |
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,19 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/io.h | ||
* | ||
* IO definitions for SPEAr3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 __MACH_IO_H | ||
#define __MACH_IO_H | ||
|
||
#include <plat/io.h> | ||
|
||
#endif /* __MACH_IO_H */ |
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,65 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/irqs.h | ||
* | ||
* IRQ helper macros for SPEAr3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 __MACH_IRQS_H | ||
#define __MACH_IRQS_H | ||
|
||
/* IRQ definitions */ | ||
#define IRQ_HW_ACCEL_MOD_0 0 | ||
#define IRQ_INTRCOMM_RAS_ARM 1 | ||
#define IRQ_CPU_GPT1_1 2 | ||
#define IRQ_CPU_GPT1_2 3 | ||
#define IRQ_BASIC_GPT1_1 4 | ||
#define IRQ_BASIC_GPT1_2 5 | ||
#define IRQ_BASIC_GPT2_1 6 | ||
#define IRQ_BASIC_GPT2_2 7 | ||
#define IRQ_BASIC_DMA 8 | ||
#define IRQ_BASIC_SMI 9 | ||
#define IRQ_BASIC_RTC 10 | ||
#define IRQ_BASIC_GPIO 11 | ||
#define IRQ_BASIC_WDT 12 | ||
#define IRQ_DDR_CONTROLLER 13 | ||
#define IRQ_SYS_ERROR 14 | ||
#define IRQ_WAKEUP_RCV 15 | ||
#define IRQ_JPEG 16 | ||
#define IRQ_IRDA 17 | ||
#define IRQ_ADC 18 | ||
#define IRQ_UART 19 | ||
#define IRQ_SSP 20 | ||
#define IRQ_I2C 21 | ||
#define IRQ_MAC_1 22 | ||
#define IRQ_MAC_2 23 | ||
#define IRQ_USB_DEV 24 | ||
#define IRQ_USB_H_OHCI_0 25 | ||
#define IRQ_USB_H_EHCI_0 26 | ||
#define IRQ_USB_H_EHCI_1 IRQ_USB_H_EHCI_0 | ||
#define IRQ_USB_H_OHCI_1 27 | ||
#define IRQ_GEN_RAS_1 28 | ||
#define IRQ_GEN_RAS_2 29 | ||
#define IRQ_GEN_RAS_3 30 | ||
#define IRQ_HW_ACCEL_MOD_1 31 | ||
#define IRQ_VIC_END 32 | ||
|
||
#define SPEAR_GPIO_INT_BASE IRQ_VIC_END | ||
|
||
#ifdef CONFIG_MACH_SPEAR300 | ||
#define SPEAR_GPIO1_INT_BASE (SPEAR_GPIO_INT_BASE + 8) | ||
#define SPEAR_GPIO_INT_END (SPEAR_GPIO1_INT_BASE + 8) | ||
#else | ||
#define SPEAR_GPIO_INT_END (SPEAR_GPIO_INT_BASE + 8) | ||
#endif | ||
|
||
#define VIRTUAL_IRQS (SPEAR_GPIO_INT_END - IRQ_VIC_END) | ||
#define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) | ||
|
||
#endif /* __MACH_IRQS_H */ |
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,19 @@ | ||
/* | ||
* arch/arm/mach-spear3xx/include/mach/memory.h | ||
* | ||
* Memory map for SPEAr3xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Viresh Kumar<viresh.kumar@st.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 __MACH_MEMORY_H | ||
#define __MACH_MEMORY_H | ||
|
||
#include <plat/memory.h> | ||
|
||
#endif /* __MACH_MEMORY_H */ |
Oops, something went wrong.