2005-04-17 00:20:36 +02:00
|
|
|
/*
|
2011-11-05 18:38:32 +01:00
|
|
|
* linux/arch/arm/mach-clps711x/core.c
|
2005-04-17 00:20:36 +02:00
|
|
|
*
|
2011-11-05 18:38:32 +01:00
|
|
|
* Core support for the CLPS711x-based machines.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2001,2011 Deep Blue Solutions Ltd
|
2005-04-17 00:20:36 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
2014-08-19 14:31:13 +02:00
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
#include <linux/init.h>
|
2012-10-10 17:45:27 +02:00
|
|
|
#include <linux/sizes.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2011-11-05 18:38:32 +01:00
|
|
|
#include <asm/mach/map.h>
|
2012-03-28 19:30:01 +02:00
|
|
|
#include <asm/system_misc.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2012-08-21 18:59:35 +02:00
|
|
|
#include <mach/hardware.h>
|
|
|
|
|
2014-02-02 09:09:01 +01:00
|
|
|
#include "common.h"
|
|
|
|
|
2011-11-05 18:38:32 +01:00
|
|
|
/*
|
|
|
|
* This maps the generic CLPS711x registers
|
|
|
|
*/
|
|
|
|
static struct map_desc clps711x_io_desc[] __initdata = {
|
|
|
|
{
|
2012-05-06 07:21:57 +02:00
|
|
|
.virtual = (unsigned long)CLPS711X_VIRT_BASE,
|
|
|
|
.pfn = __phys_to_pfn(CLPS711X_PHYS_BASE),
|
2016-06-04 09:09:53 +02:00
|
|
|
.length = 48 * SZ_1K,
|
|
|
|
.type = MT_DEVICE,
|
2011-11-05 18:38:32 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void __init clps711x_map_io(void)
|
|
|
|
{
|
|
|
|
iotable_init(clps711x_io_desc, ARRAY_SIZE(clps711x_io_desc));
|
|
|
|
}
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
void __init clps711x_init_irq(void)
|
|
|
|
{
|
2014-02-02 09:09:01 +01:00
|
|
|
clps711x_intc_init(CLPS711X_PHYS_BASE, SZ_16K);
|
2012-11-17 14:57:14 +01:00
|
|
|
}
|
|
|
|
|
2012-11-08 20:40:59 +01:00
|
|
|
void __init clps711x_timer_init(void)
|
2011-11-05 18:38:32 +01:00
|
|
|
{
|
2014-08-19 14:31:13 +02:00
|
|
|
clps711x_clk_init(CLPS711X_VIRT_BASE);
|
|
|
|
clps711x_clksrc_init(CLPS711X_VIRT_BASE + TC1D,
|
|
|
|
CLPS711X_VIRT_BASE + TC2D, IRQ_TC2OI);
|
2011-11-05 18:38:32 +01:00
|
|
|
}
|
|
|
|
|
2013-07-09 01:01:40 +02:00
|
|
|
void clps711x_restart(enum reboot_mode mode, const char *cmd)
|
2011-11-05 18:41:52 +01:00
|
|
|
{
|
|
|
|
soft_restart(0);
|
|
|
|
}
|