-
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: 6011/1: ST SPEAr: Added basic header files for SPEAr6xx machine …
…family Reviewed-by: Linus Walleij <linux.walleij@stericsson.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Rajeev Kumar <rajeev-dlh.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
a7e9c45
commit e024c3d
Showing
15 changed files
with
732 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-spear6xx/include/mach/debug-macro.S | ||
* | ||
* Debugging macro include header for SPEAr6xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar<rajeev-dlh.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,55 @@ | ||
/* | ||
* arch/arm/mach-spear6xx/include/mach/entry-macro.S | ||
* | ||
* Low-level IRQ helper macros for SPEAr6xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar<rajeev-dlh.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_SPEAR6XX_CPU_VIC_PRI_BASE | ||
ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
mov \irqnr, #0 | ||
teq \irqstat, #0 | ||
bne 1001f | ||
ldr \base, =VA_SPEAR6XX_CPU_VIC_SEC_BASE | ||
ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
teq \irqstat, #0 | ||
beq 1002f @ this will set/reset | ||
@ zero register | ||
mov \irqnr, #32 | ||
1001: | ||
/* | ||
* 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 \tmp, \tmp, #0x1F @ tmp = 32 - tmp - 1 | ||
add \irqnr, \irqnr, \tmp | ||
|
||
1002: /* 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,45 @@ | ||
/* | ||
* arch/arm/mach-spear6xx/include/mach/generic.h | ||
* | ||
* SPEAr6XX machine family specific generic header file | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar<rajeev-dlh.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 SPEAR6XX_CPU_TMR_BASE | ||
#define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 | ||
#define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 | ||
|
||
/* Add spear6xx 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 spear6xx family function declarations here */ | ||
void __init spear6xx_map_io(void); | ||
void __init spear6xx_init_irq(void); | ||
void __init spear6xx_init(void); | ||
void __init spear600_init(void); | ||
void __init clk_init(void); | ||
|
||
/* Add spear600 machine device structure declarations here */ | ||
|
||
#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-spear6xx/include/mach/gpio.h | ||
* | ||
* GPIO macros for SPEAr6xx 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,21 @@ | ||
/* | ||
* arch/arm/mach-spear6xx/include/mach/hardware.h | ||
* | ||
* Hardware definitions for SPEAr6xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar<rajeev-dlh.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,20 @@ | ||
/* | ||
* arch/arm/mach-spear6xx/include/mach/io.h | ||
* | ||
* IO definitions for SPEAr6xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar Kumar<rajeev-dlh.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,96 @@ | ||
/* | ||
* arch/arm/mach-spear6xx/include/mach/irqs.h | ||
* | ||
* IRQ helper macros for SPEAr6xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar<rajeev-dlh.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 */ | ||
/* VIC 1 */ | ||
#define IRQ_INTRCOMM_SW_IRQ 0 | ||
#define IRQ_INTRCOMM_CPU_1 1 | ||
#define IRQ_INTRCOMM_CPU_2 2 | ||
#define IRQ_INTRCOMM_RAS2A11_1 3 | ||
#define IRQ_INTRCOMM_RAS2A11_2 4 | ||
#define IRQ_INTRCOMM_RAS2A12_1 5 | ||
#define IRQ_INTRCOMM_RAS2A12_2 6 | ||
#define IRQ_GEN_RAS_0 7 | ||
#define IRQ_GEN_RAS_1 8 | ||
#define IRQ_GEN_RAS_2 9 | ||
#define IRQ_GEN_RAS_3 10 | ||
#define IRQ_GEN_RAS_4 11 | ||
#define IRQ_GEN_RAS_5 12 | ||
#define IRQ_GEN_RAS_6 13 | ||
#define IRQ_GEN_RAS_7 14 | ||
#define IRQ_GEN_RAS_8 15 | ||
#define IRQ_CPU_GPT1_1 16 | ||
#define IRQ_CPU_GPT1_2 17 | ||
#define IRQ_LOCAL_GPIO 18 | ||
#define IRQ_PLL_UNLOCK 19 | ||
#define IRQ_JPEG 20 | ||
#define IRQ_FSMC 21 | ||
#define IRQ_IRDA 22 | ||
#define IRQ_RESERVED 23 | ||
#define IRQ_UART_0 24 | ||
#define IRQ_UART_1 25 | ||
#define IRQ_SSP_1 26 | ||
#define IRQ_SSP_2 27 | ||
#define IRQ_I2C 28 | ||
#define IRQ_GEN_RAS_9 29 | ||
#define IRQ_GEN_RAS_10 30 | ||
#define IRQ_GEN_RAS_11 31 | ||
|
||
/* VIC 2 */ | ||
#define IRQ_APPL_GPT1_1 32 | ||
#define IRQ_APPL_GPT1_2 33 | ||
#define IRQ_APPL_GPT2_1 34 | ||
#define IRQ_APPL_GPT2_2 35 | ||
#define IRQ_APPL_GPIO 36 | ||
#define IRQ_APPL_SSP 37 | ||
#define IRQ_APPL_ADC 38 | ||
#define IRQ_APPL_RESERVED 39 | ||
#define IRQ_AHB_EXP_MASTER 40 | ||
#define IRQ_DDR_CONTROLLER 41 | ||
#define IRQ_BASIC_DMA 42 | ||
#define IRQ_BASIC_RESERVED1 43 | ||
#define IRQ_BASIC_SMI 44 | ||
#define IRQ_BASIC_CLCD 45 | ||
#define IRQ_EXP_AHB_1 46 | ||
#define IRQ_EXP_AHB_2 47 | ||
#define IRQ_BASIC_GPT1_1 48 | ||
#define IRQ_BASIC_GPT1_2 49 | ||
#define IRQ_BASIC_RTC 50 | ||
#define IRQ_BASIC_GPIO 51 | ||
#define IRQ_BASIC_WDT 52 | ||
#define IRQ_BASIC_RESERVED 53 | ||
#define IRQ_AHB_EXP_SLAVE 54 | ||
#define IRQ_GMAC_1 55 | ||
#define IRQ_GMAC_2 56 | ||
#define IRQ_USB_DEV 57 | ||
#define IRQ_USB_H_OHCI_0 58 | ||
#define IRQ_USB_H_EHCI_0 59 | ||
#define IRQ_USB_H_OHCI_1 60 | ||
#define IRQ_USB_H_EHCI_1 61 | ||
#define IRQ_EXP_AHB_3 62 | ||
#define IRQ_EXP_AHB_4 63 | ||
|
||
#define IRQ_VIC_END 64 | ||
|
||
#define SPEAR_GPIO_INT_BASE IRQ_VIC_END | ||
#define SPEAR_GPIO0_INT_BASE SPEAR_GPIO_INT_BASE | ||
#define SPEAR_GPIO1_INT_BASE (SPEAR_GPIO0_INT_BASE + 8) | ||
#define SPEAR_GPIO2_INT_BASE (SPEAR_GPIO1_INT_BASE + 8) | ||
#define SPEAR_GPIO_INT_END (SPEAR_GPIO2_INT_BASE + 8) | ||
#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-spear6xx/include/mach/memory.h | ||
* | ||
* Memory map for SPEAr6xx machine family | ||
* | ||
* Copyright (C) 2009 ST Microelectronics | ||
* Rajeev Kumar<rajeev-dlh.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.