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