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