Commit 59136ef3 authored by Russell King's avatar Russell King

Merge branch 'restart-cleanup' into restart

parents e879c862 3f1517a7
......@@ -4,7 +4,7 @@
# Object file lists.
obj-y := irq.o mm.o time.o
obj-y := common.o
obj-m :=
obj-n :=
obj- :=
......
/*
* linux/arch/arm/mach-clps711x/irq.c
* linux/arch/arm/mach-clps711x/core.c
*
* Copyright (C) 2000 Deep Blue Solutions Ltd.
* Core support for the CLPS711x-based machines.
*
* Copyright (C) 2001,2011 Deep Blue Solutions Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -17,16 +19,42 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/sched.h>
#include <linux/timex.h>
#include <asm/mach/irq.h>
#include <asm/sizes.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/leds.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/hardware/clps7111.h>
/*
* This maps the generic CLPS711x registers
*/
static struct map_desc clps711x_io_desc[] __initdata = {
{
.virtual = CLPS7111_VIRT_BASE,
.pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
.length = SZ_1M,
.type = MT_DEVICE
}
};
void __init clps711x_map_io(void)
{
iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
}
static void int1_mask(struct irq_data *d)
{
u32 intmr1;
......@@ -112,15 +140,15 @@ void __init clps711x_init_irq(void)
for (i = 0; i < NR_IRQS; i++) {
if (INT1_IRQS & (1 << i)) {
irq_set_chip_and_handler(i, &int1_chip,
irq_set_chip_and_handler(i, &int1_chip,
handle_level_irq);
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
}
if (INT2_IRQS & (1 << i)) {
irq_set_chip_and_handler(i, &int2_chip,
handle_level_irq);
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
}
}
}
/*
......@@ -141,3 +169,54 @@ void __init clps711x_init_irq(void)
clps_writel(0, SYNCIO);
clps_writel(0, KBDEOI);
}
/*
* gettimeoffset() returns time since last timer tick, in usecs.
*
* 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
* 'tick' is usecs per jiffy.
*/
static unsigned long clps711x_gettimeoffset(void)
{
unsigned long hwticks;
hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
return (hwticks * (tick_nsec / 1000)) / LATCH;
}
/*
* IRQ handler for the timer
*/
static irqreturn_t p720t_timer_interrupt(int irq, void *dev_id)
{
timer_tick();
return IRQ_HANDLED;
}
static struct irqaction clps711x_timer_irq = {
.name = "CLPS711x Timer Tick",
.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
.handler = p720t_timer_interrupt,
};
static void __init clps711x_timer_init(void)
{
struct timespec tv;
unsigned int syscon;
syscon = clps_readl(SYSCON1);
syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
clps_writel(syscon, SYSCON1);
clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
tv.tv_nsec = 0;
tv.tv_sec = clps_readl(RTCDR);
do_settimeofday(&tv);
}
struct sys_timer clps711x_timer = {
.init = clps711x_timer_init,
.offset = clps711x_gettimeoffset,
};
/*
* linux/arch/arm/mach-clps711x/mm.c
*
* Generic MM setup for the CLPS711x-based machines.
*
* Copyright (C) 2001 Deep Blue Solutions Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/sizes.h>
#include <mach/hardware.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/mach/map.h>
#include <asm/hardware/clps7111.h>
/*
* This maps the generic CLPS711x registers
*/
static struct map_desc clps711x_io_desc[] __initdata = {
{
.virtual = CLPS7111_VIRT_BASE,
.pfn = __phys_to_pfn(CLPS7111_PHYS_BASE),
.length = SZ_1M,
.type = MT_DEVICE
}
};
void __init clps711x_map_io(void)
{
iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
}
/*
* linux/arch/arm/mach-clps711x/time.c
*
* Copyright (C) 2001 Deep Blue Solutions 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/timex.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sched.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/leds.h>
#include <asm/hardware/clps7111.h>
#include <asm/mach/time.h>
/*
* gettimeoffset() returns time since last timer tick, in usecs.
*
* 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
* 'tick' is usecs per jiffy.
*/
static unsigned long clps711x_gettimeoffset(void)
{
unsigned long hwticks;
hwticks = LATCH - (clps_readl(TC2D) & 0xffff); /* since last underflow */
return (hwticks * (tick_nsec / 1000)) / LATCH;
}
/*
* IRQ handler for the timer
*/
static irqreturn_t
p720t_timer_interrupt(int irq, void *dev_id)
{
timer_tick();
return IRQ_HANDLED;
}
static struct irqaction clps711x_timer_irq = {
.name = "CLPS711x Timer Tick",
.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
.handler = p720t_timer_interrupt,
};
static void __init clps711x_timer_init(void)
{
struct timespec tv;
unsigned int syscon;
syscon = clps_readl(SYSCON1);
syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
clps_writel(syscon, SYSCON1);
clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
tv.tv_nsec = 0;
tv.tv_sec = clps_readl(RTCDR);
do_settimeofday(&tv);
}
struct sys_timer clps711x_timer = {
.init = clps711x_timer_init,
.offset = clps711x_gettimeoffset,
};
......@@ -11,8 +11,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
local_irq_disable();
/*
* Set then clear the SWRST bit to initiate a software reset
*/
......
......@@ -18,8 +18,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
local_irq_disable();
if (machine_is_n2100()) {
gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
......
......@@ -19,8 +19,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd)
{
local_irq_disable();
/*
* Reset flash banking register so that we are pointing at
* RedBoot bank.
......
......@@ -33,9 +33,6 @@ static inline void arch_reset(char mode, const char *cmd)
case 'h':
printk(KERN_CRIT "RESET: Rebooting system\n");
/* Disable interrupts */
local_irq_disable();
lpc32xx_watchdog_reset();
break;
......
......@@ -35,7 +35,7 @@
#include <plat/mux.h>
#include <plat/usb.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <mach/camera.h>
#include <mach/ams-delta-fiq.h>
......
......@@ -32,7 +32,7 @@
#include <plat/flash.h>
#include <plat/fpga.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
/* fsample is pretty close to p2-sample */
......
......@@ -25,7 +25,7 @@
#include <plat/mux.h>
#include <plat/usb.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
/* assume no Mini-AB port */
......
......@@ -43,7 +43,7 @@
#include <plat/irda.h>
#include <plat/usb.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <plat/flash.h>
#include "board-h2.h"
......
......@@ -45,7 +45,7 @@
#include <plat/usb.h>
#include <plat/keypad.h>
#include <plat/dma.h>
#include <plat/common.h>
#include "common.h"
#include <plat/flash.h>
#include "board-h3.h"
......
......@@ -41,7 +41,7 @@
#include <asm/mach/arch.h>
#include <plat/omap7xx.h>
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
#include <plat/keypad.h>
#include <plat/usb.h>
......
......@@ -37,7 +37,7 @@
#include <plat/tc.h>
#include <plat/usb.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <plat/mmc.h>
/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
......
......@@ -30,7 +30,7 @@
#include <plat/usb.h>
#include <plat/board.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <plat/hwa742.h>
#include <plat/lcd_mipid.h>
#include <plat/mmc.h>
......
......@@ -51,7 +51,7 @@
#include <plat/usb.h>
#include <plat/mux.h>
#include <plat/tc.h>
#include <plat/common.h>
#include "common.h"
/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
#define OMAP_OSK_ETHR_START 0x04800300
......
......@@ -41,7 +41,7 @@
#include <plat/board.h>
#include <plat/irda.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#define PALMTE_USBDETECT_GPIO 0
#define PALMTE_USB_OR_DC_GPIO 1
......
......@@ -39,7 +39,7 @@
#include <plat/board.h>
#include <plat/irda.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
......
......@@ -41,7 +41,7 @@
#include <plat/board.h>
#include <plat/irda.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
......
......@@ -32,7 +32,7 @@
#include <plat/fpga.h>
#include <plat/flash.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
static const unsigned int p2_keymap[] = {
......
......@@ -40,7 +40,7 @@
#include <plat/usb.h>
#include <plat/tc.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/keypad.h>
#include <plat/board-sx1.h>
......
......@@ -34,7 +34,7 @@
#include <asm/mach/map.h>
#include <plat/board-voiceblue.h>
#include <plat/common.h>
#include "common.h"
#include <plat/flash.h>
#include <plat/mux.h>
#include <plat/tc.h>
......
/*
*
* Header for code common to all OMAP1 machines.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H
#define __ARCH_ARM_MACH_OMAP1_COMMON_H
#include <plat/common.h>
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
void omap7xx_map_io(void);
#else
static inline void omap7xx_map_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP15XX
void omap15xx_map_io(void);
#else
static inline void omap15xx_map_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
void omap16xx_map_io(void);
#else
static inline void omap16xx_map_io(void)
{
}
#endif
void omap1_init_early(void);
void omap1_init_irq(void);
extern struct sys_timer omap1_timer;
extern bool omap_32k_timer_init(void);
#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
......@@ -22,7 +22,7 @@
#include <mach/hardware.h>
#include <asm/mach/map.h>
#include <plat/common.h>
#include "common.h"
#include <plat/tc.h>
#include <plat/board.h>
#include <plat/mux.h>
......
......@@ -54,7 +54,7 @@
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
#include <plat/common.h>
#include "common.h"
#ifdef CONFIG_OMAP_MPU_TIMER
......
......@@ -52,7 +52,7 @@
#include <asm/irq.h>
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
#include <plat/common.h>
#include "common.h"
#include <plat/dmtimer.h>
/*
......
......@@ -34,7 +34,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <plat/usb.h>
#include <plat/gpmc-smc91x.h>
......
......@@ -33,7 +33,7 @@
#include <plat/mcspi.h>
#include <plat/board.h>
#include <plat/usb.h>
#include <plat/common.h>
#include "common.h"
#include <plat/dma.h>
#include <plat/gpmc.h>
#include <video/omapdss.h>
......
......@@ -16,7 +16,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
#include <plat/gpmc-smc91x.h>
#include <plat/usb.h>
......
......@@ -27,13 +27,12 @@
#include <linux/leds_pwm.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/usb.h>
#include <plat/mmc.h>
#include <plat/omap4-keypad.h>
......
......@@ -27,7 +27,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/usb.h>
#include "mux.h"
......
......@@ -32,7 +32,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/usb.h>
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
......
......@@ -37,7 +37,7 @@
#include <plat/led.h>
#include <plat/usb.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <video/omapdss.h>
......
......@@ -37,7 +37,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/nand.h>
#include <plat/gpmc.h>
#include <plat/usb.h>
......
......@@ -39,7 +39,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/usb.h>
#include <plat/nand.h>
#include <plat/gpmc.h>
......
......@@ -41,7 +41,7 @@
#include <asm/mach/flash.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <plat/nand.h>
#include <plat/usb.h>
......
......@@ -20,8 +20,7 @@
#include <asm/mach/arch.h>
#include <plat/board.h>
#include <plat/common.h>
#include <mach/omap4-common.h>
#include "common.h"
#include "common-board-devices.h"
/*
......
......@@ -34,7 +34,7 @@
#include <plat/usb.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/menelaus.h>
#include <plat/dma.h>
#include <plat/gpmc.h>
......
......@@ -28,7 +28,7 @@
#include <asm/mach/arch.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <plat/usb.h>
#include <video/omapdss.h>
......
......@@ -36,7 +36,7 @@
#include <plat/mcspi.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <mach/board-zoom.h>
......
......@@ -26,7 +26,7 @@
#include <asm/mach-types.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/menelaus.h>
#include <mach/irqs.h>
#include <plat/mcspi.h>
......
......@@ -40,7 +40,7 @@
#include <asm/mach/flash.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <video/omapdss.h>
#include <video/omap-panel-dvi.h>
#include <plat/gpmc.h>
......
......@@ -43,7 +43,7 @@
#include <plat/board.h>
#include <plat/usb.h>
#include <plat/common.h>
#include "common.h"
#include <plat/mcspi.h>
#include <video/omapdss.h>
#include <video/omap-panel-dvi.h>
......
......@@ -40,7 +40,7 @@
#include <plat/mux.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc-smsc911x.h>
#include <plat/gpmc.h>
#include <plat/sdrc.h>
......
......@@ -41,7 +41,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <mach/hardware.h>
#include <plat/mcspi.h>
#include <plat/usb.h>
......
......@@ -35,7 +35,7 @@
#include <asm/mach/flash.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <plat/nand.h>
#include <plat/usb.h>
......
......@@ -44,7 +44,7 @@
#include <asm/mach/flash.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/gpmc.h>
#include <plat/nand.h>
#include <plat/usb.h>
......
......@@ -30,14 +30,13 @@
#include <linux/wl12xx.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <video/omapdss.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/usb.h>
#include <plat/mmc.h>
#include <video/omap-panel-dvi.h>
......
......@@ -43,7 +43,7 @@
#include <asm/mach/map.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-dvi.h>
......
......@@ -25,7 +25,7 @@
#include <plat/mmc.h>
#include <plat/usb.h>
#include <plat/gpmc.h>
#include <plat/common.h>
#include "common.h"
#include <plat/onenand.h>
#include "mux.h"
......
......@@ -27,7 +27,7 @@
#include <plat/mcspi.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/dma.h>
#include <plat/gpmc.h>
#include <plat/onenand.h>
......
......@@ -25,7 +25,7 @@
#include <plat/mcspi.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
#include <plat/dma.h>
#include <plat/gpmc.h>
#include <plat/usb.h>
......
......@@ -22,7 +22,7 @@
#include <plat/irqs.h>
#include <plat/board.h>
#include <plat/common.h>
#include "common.h"
static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
};
......
......@@ -24,7 +24,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <plat/common.h>
#include "common.h"
#include <plat/usb.h>
#include <mach/board-zoom.h>
......
......@@ -21,7 +21,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
#include <plat/usb.h>
......
......@@ -18,7 +18,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include "cm.h"
#include "cm2xxx_3xxx.h"
......
......@@ -18,7 +18,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include "cm.h"
#include "cm1_44xx.h"
......
......@@ -20,7 +20,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include "cm.h"
#include "cm1_44xx.h"
......
......@@ -17,7 +17,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
#include <plat/mux.h>
......
/*
* Header for code common to all OMAP2+ machines.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H
#define __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H
#include <linux/delay.h>
#include <plat/common.h>
#ifdef CONFIG_SOC_OMAP2420
extern void omap242x_map_common_io(void);
#else
static inline void omap242x_map_common_io(void)
{
}
#endif
#ifdef CONFIG_SOC_OMAP2430
extern void omap243x_map_common_io(void);
#else
static inline void omap243x_map_common_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP3
extern void omap34xx_map_common_io(void);
#else
static inline void omap34xx_map_common_io(void)
{
}
#endif
#ifdef CONFIG_SOC_OMAPTI816X
extern void omapti816x_map_common_io(void);
#else
static inline void omapti816x_map_common_io(void)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP4
extern void omap44xx_map_common_io(void);
#else
static inline void omap44xx_map_common_io(void)
{
}
#endif
extern void omap2_init_common_infrastructure(void);
extern struct sys_timer omap2_timer;
extern struct sys_timer omap3_timer;
extern struct sys_timer omap3_secure_timer;
extern struct sys_timer omap4_timer;
void omap2420_init_early(void);
void omap2430_init_early(void);
void omap3430_init_early(void);
void omap35xx_init_early(void);
void omap3630_init_early(void);
void omap3_init_early(void); /* Do not use this one */
void am35xx_init_early(void);
void ti816x_init_early(void);
void omap4430_init_early(void);
/*
* IO bases for various OMAP processors
* Except the tap base, rest all the io bases
* listed are physical addresses.
*/
struct omap_globals {
u32 class; /* OMAP class to detect */
void __iomem *tap; /* Control module ID code */
void __iomem *sdrc; /* SDRAM Controller */
void __iomem *sms; /* SDRAM Memory Scheduler */
void __iomem *ctrl; /* System Control Module */
void __iomem *ctrl_pad; /* PAD Control Module */
void __iomem *prm; /* Power and Reset Management */
void __iomem *cm; /* Clock Management */
void __iomem *cm2;
};
void omap2_set_globals_242x(void);
void omap2_set_globals_243x(void);
void omap2_set_globals_3xxx(void);
void omap2_set_globals_443x(void);
void omap2_set_globals_ti816x(void);
/* These get called from omap2_set_globals_xxxx(), do not call these */
void omap2_set_globals_tap(struct omap_globals *);
void omap2_set_globals_sdrc(struct omap_globals *);
void omap2_set_globals_control(struct omap_globals *);
void omap2_set_globals_prcm(struct omap_globals *);
void omap242x_map_io(void);
void omap243x_map_io(void);
void omap3_map_io(void);
void omap4_map_io(void);
/**
* omap_test_timeout - busy-loop, testing a condition
* @cond: condition to test until it evaluates to true
* @timeout: maximum number of microseconds in the timeout
* @index: loop index (integer)
*
* Loop waiting for @cond to become true or until at least @timeout
* microseconds have passed. To use, define some integer @index in the
* calling code. After running, if @index == @timeout, then the loop has
* timed out.
*/
#define omap_test_timeout(cond, timeout, index) \
({ \
for (index = 0; index < timeout; index++) { \
if (cond) \
break; \
udelay(1); \
} \
})
extern struct device *omap2_get_mpuss_device(void);
extern struct device *omap2_get_iva_device(void);
extern struct device *omap2_get_l3_device(void);
extern struct device *omap4_get_dsp_device(void);
void omap2_init_irq(void);
void omap3_init_irq(void);
void ti816x_init_irq(void);
extern int omap_irq_pending(void);
void omap_intc_save_context(void);
void omap_intc_restore_context(void);
void omap3_intc_suspend(void);
void omap3_intc_prepare_idle(void);
void omap3_intc_resume_idle(void);
/*
* wfi used in low power code. Directly opcode is used instead
* of instruction to avoid mulit-omap build break
*/
#ifdef CONFIG_THUMB2_KERNEL
#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
#else
#define do_wfi() \
__asm__ __volatile__ (".word 0xe320f003" : : : "memory")
#endif
#ifdef CONFIG_CACHE_L2X0
extern void __iomem *l2cache_base;
#endif
extern void __iomem *gic_dist_base_addr;
extern void __init gic_init_irq(void);
extern void omap_smc1(u32 fn, u32 arg);
#ifdef CONFIG_SMP
/* Needed for secondary core boot */
extern void omap_secondary_startup(void);
extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
extern void omap_auxcoreboot_addr(u32 cpu_addr);
extern u32 omap_read_auxcoreboot0(void);
#endif
#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
......@@ -15,7 +15,7 @@
#include <linux/kernel.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/sdrc.h>
#include "cm-regbits-34xx.h"
......
......@@ -21,7 +21,7 @@
#include <plat/cpu.h>
#include <plat/i2c.h>
#include <plat/common.h>
#include "common.h"
#include <plat/omap_hwmod.h>
#include "mux.h"
......
......@@ -21,7 +21,7 @@
#include <asm/cputype.h>
#include <plat/common.h>
#include "common.h"
#include <plat/cpu.h>
#include <mach/id.h>
......
/*
* omap4-common.h: OMAP4 specific common header file
*
* Copyright (C) 2010 Texas Instruments, Inc.
*
* Author:
* Santosh Shilimkar <santosh.shilimkar@ti.com>
*
* 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 OMAP_ARCH_OMAP4_COMMON_H
#define OMAP_ARCH_OMAP4_COMMON_H
/*
* wfi used in low power code. Directly opcode is used instead
* of instruction to avoid mulit-omap build break
*/
#ifdef CONFIG_THUMB2_KERNEL
#define do_wfi() __asm__ __volatile__ ("wfi" : : : "memory")
#else
#define do_wfi() \
__asm__ __volatile__ (".word 0xe320f003" : : : "memory")
#endif
#ifdef CONFIG_CACHE_L2X0
extern void __iomem *l2cache_base;
#endif
extern void __iomem *gic_dist_base_addr;
extern void __init gic_init_irq(void);
extern void omap_smc1(u32 fn, u32 arg);
#ifdef CONFIG_SMP
/* Needed for secondary core boot */
extern void omap_secondary_startup(void);
extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
extern void omap_auxcoreboot_addr(u32 cpu_addr);
extern u32 omap_read_auxcoreboot0(void);
#endif
#endif
......@@ -35,7 +35,7 @@
#include "clock3xxx.h"
#include "clock44xx.h"
#include <plat/common.h>
#include "common.h"
#include <plat/omap-pm.h>
#include "voltage.h"
#include "powerdomain.h"
......@@ -43,7 +43,7 @@
#include "clockdomain.h"
#include <plat/omap_hwmod.h>
#include <plat/multi.h>
#include <plat/common.h>
#include "common.h"
/*
* The machine specific code may provide the extra mapping besides the
......
......@@ -19,7 +19,8 @@
#include <linux/smp.h>
#include <asm/cacheflush.h>
#include <mach/omap4-common.h>
#include "common.h"
int platform_cpu_kill(unsigned int cpu)
{
......
......@@ -24,7 +24,8 @@
#include <asm/hardware/gic.h>
#include <asm/smp_scu.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
#include "common.h"
/* SCU base address */
static void __iomem *scu_base;
......
......@@ -22,7 +22,8 @@
#include <plat/irqs.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
#include "common.h"
#ifdef CONFIG_CACHE_L2X0
void __iomem *l2cache_base;
......
......@@ -137,7 +137,7 @@
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <plat/common.h>
#include "common.h"
#include <plat/cpu.h>
#include "clockdomain.h"
#include "powerdomain.h"
......
......@@ -18,7 +18,7 @@
#include <plat/omap-pm.h>
#include <plat/omap_device.h>
#include <plat/common.h>
#include "common.h"
#include "voltage.h"
#include "powerdomain.h"
......
......@@ -42,6 +42,7 @@
#include <plat/dma.h>
#include <plat/board.h>
#include "common.h"
#include "prm2xxx_3xxx.h"
#include "prm-regbits-24xx.h"
#include "cm2xxx_3xxx.h"
......
......@@ -42,6 +42,7 @@
#include <plat/gpmc.h>
#include <plat/dma.h>
#include "common.h"
#include "cm2xxx_3xxx.h"
#include "cm-regbits-34xx.h"
#include "prm-regbits-34xx.h"
......
......@@ -16,8 +16,8 @@
#include <linux/err.h>
#include <linux/slab.h>
#include "common.h"
#include "powerdomain.h"
#include <mach/omap4-common.h>
struct power_state {
struct powerdomain *pwrdm;
......
......@@ -26,7 +26,7 @@
#include <linux/export.h>
#include <mach/system.h>
#include <plat/common.h>
#include "common.h"
#include <plat/prcm.h>
#include <plat/irqs.h>
......
......@@ -15,7 +15,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include "prcm_mpu44xx.h"
#include "cm-regbits-44xx.h"
......
......@@ -16,7 +16,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/cpu.h>
#include <plat/prcm.h>
......
......@@ -17,7 +17,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/cpu.h>
#include <plat/prcm.h>
......
......@@ -16,7 +16,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include "prm44xx.h"
#include "prminst44xx.h"
......
......@@ -18,7 +18,7 @@
#include <linux/io.h>
#include <plat/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/clock.h>
#include <plat/sdrc.h>
......
......@@ -23,7 +23,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/clock.h>
#include <plat/sram.h>
......
......@@ -24,7 +24,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <plat/common.h>
#include "common.h"
#include <plat/clock.h>
#include <plat/sram.h>
......
......@@ -33,7 +33,7 @@
#include <plat/omap-serial.h>
#endif
#include <plat/common.h>
#include "common.h"
#include <plat/board.h>
#include <plat/clock.h>
#include <plat/dma.h>
......
......@@ -26,7 +26,7 @@
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <plat/common.h>
#include "common.h"
#include "pm.h"
#include "smartreflex.h"
......
......@@ -41,7 +41,7 @@
#include <plat/dmtimer.h>
#include <asm/localtimer.h>
#include <asm/sched_clock.h>
#include <plat/common.h>
#include "common.h"
#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
#include <plat/omap-pm.h>
......
......@@ -18,7 +18,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include "prm-regbits-34xx.h"
#include "voltage.h"
......
......@@ -18,7 +18,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include "prm44xx.h"
#include "prm-regbits-44xx.h"
......
......@@ -27,7 +27,7 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <plat/common.h>
#include "common.h"
#include "prm-regbits-34xx.h"
#include "prm-regbits-44xx.h"
......
......@@ -18,7 +18,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include <plat/cpu.h>
#include "prm-regbits-34xx.h"
......
......@@ -21,7 +21,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include "prm-regbits-44xx.h"
#include "prm44xx.h"
......
#include <linux/kernel.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include "voltage.h"
#include "vp.h"
......
......@@ -19,7 +19,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include "prm-regbits-34xx.h"
#include "voltage.h"
......
......@@ -19,7 +19,7 @@
#include <linux/err.h>
#include <linux/init.h>
#include <plat/common.h>
#include "common.h"
#include "prm44xx.h"
#include "prm-regbits-44xx.h"
......
......@@ -420,17 +420,11 @@ static void poodle_poweroff(void)
arm_machine_restart('h', NULL);
}
static void poodle_restart(char mode, const char *cmd)
{
arm_machine_restart('h', cmd);
}
static void __init poodle_init(void)
{
int ret = 0;
pm_power_off = poodle_poweroff;
arm_pm_restart = poodle_restart;
PCFR |= PCFR_OPDE;
......
......@@ -29,7 +29,6 @@
void arch_reset(char mode, const char *cmd)
{
short temp;
local_irq_disable();
/* Reset the Machine via pc[3] of the sequoia chipset */
outw(0x09,0x24);
temp=inw(0x26);
......
......@@ -27,8 +27,6 @@ static void arch_reset(char mode, const char *cmd)
case 's':
case 'h':
printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
/* Disable interrupts */
local_irq_disable();
#ifdef CONFIG_COH901327_WATCHDOG
coh901327_watchdog_reset();
#endif
......
......@@ -28,6 +28,8 @@
#include <mach/hardware.h>
#include <mach/regs-irq.h>
#include "nuc9xx.h"
struct group_irq {
unsigned long gpen;
unsigned int enabled;
......
......@@ -12,14 +12,7 @@
* published by the Free Software Foundation.
*
*/
struct map_desc;
struct sys_timer;
/* core initialisation functions */
extern void nuc900_init_irq(void);
extern struct sys_timer nuc900_timer;
#include "nuc9xx.h"
/* extern file from nuc910.c */
......
......@@ -12,14 +12,7 @@
* published by the Free Software Foundation.
*
*/
struct map_desc;
struct sys_timer;
/* core initialisation functions */
extern void nuc900_init_irq(void);
extern struct sys_timer nuc900_timer;
#include "nuc9xx.h"
/* extern file from nuc950.c */
......
......@@ -12,14 +12,7 @@
* published by the Free Software Foundation.
*
*/
struct map_desc;
struct sys_timer;
/* core initialisation functions */
extern void nuc900_init_irq(void);
extern struct sys_timer nuc900_timer;
#include "nuc9xx.h"
/* extern file from nuc960.c */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment