2005-04-16 15:20:36 -07:00
/*
2011-11-05 17:38:32 +00:00
* linux / arch / arm / mach - clps711x / core . c
2005-04-16 15:20:36 -07: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 15:20:36 -07: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 16:31:13 +04:00
2005-04-16 15:20:36 -07:00
# include <linux/init.h>
2012-10-10 19:45:27 +04:00
# include <linux/sizes.h>
2005-04-16 15:20:36 -07:00
2011-11-05 17:38:32 +00:00
# include <asm/mach/map.h>
2012-03-28 18:30:01 +01:00
# include <asm/system_misc.h>
2005-04-16 15:20:36 -07:00
2012-08-21 20:59:35 +04:00
# include <mach/hardware.h>
2014-02-02 12:09:01 +04: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 09:21:57 +04:00
. virtual = ( unsigned long ) CLPS711X_VIRT_BASE ,
. pfn = __phys_to_pfn ( CLPS711X_PHYS_BASE ) ,
2012-10-10 19:45:31 +04:00
. length = SZ_64K ,
2011-11-05 17:38:32 +00:00
. type = MT_DEVICE
}
} ;
void __init clps711x_map_io ( void )
{
iotable_init ( clps711x_io_desc , ARRAY_SIZE ( clps711x_io_desc ) ) ;
}
2005-04-16 15:20:36 -07:00
void __init clps711x_init_irq ( void )
{
2014-02-02 12:09:01 +04:00
clps711x_intc_init ( CLPS711X_PHYS_BASE , SZ_16K ) ;
2012-11-17 17:57:14 +04:00
}
2012-11-08 12:40:59 -07:00
void __init clps711x_timer_init ( void )
2011-11-05 17:38:32 +00:00
{
2014-08-19 16:31:13 +04: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 16:01:40 -07:00
void clps711x_restart ( enum reboot_mode mode , const char * cmd )
2011-11-05 17:41:52 +00:00
{
soft_restart ( 0 ) ;
}