Commit e024c3d5 authored by viresh kumar's avatar viresh kumar Committed by Russell King
Browse files

ARM: 6011/1: ST SPEAr: Added basic header files for SPEAr6xx machine family

parent a7e9c452
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
/*
 * 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>
+55 −0
Original line number Diff line number Diff line
/*
 * 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
+45 −0
Original line number Diff line number Diff line
/*
 * 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 */
+19 −0
Original line number Diff line number Diff line
/*
 * 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 */
+21 −0
Original line number Diff line number Diff line
/*
 * 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 */
Loading