Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * ARM PrimeXsys System Controller SP810 header file
0003  *
0004  * Copyright (C) 2009 ST Microelectronics
0005  * Viresh Kumar <vireshk@kernel.org>
0006  *
0007  * This file is licensed under the terms of the GNU General Public
0008  * License version 2. This program is licensed "as is" without any
0009  * warranty of any kind, whether express or implied.
0010  */
0011 
0012 #ifndef __AMBA_SP810_H
0013 #define __AMBA_SP810_H
0014 
0015 #include <linux/io.h>
0016 
0017 /* sysctl registers offset */
0018 #define SCCTRL          0x000
0019 #define SCSYSSTAT       0x004
0020 #define SCIMCTRL        0x008
0021 #define SCIMSTAT        0x00C
0022 #define SCXTALCTRL      0x010
0023 #define SCPLLCTRL       0x014
0024 #define SCPLLFCTRL      0x018
0025 #define SCPERCTRL0      0x01C
0026 #define SCPERCTRL1      0x020
0027 #define SCPEREN         0x024
0028 #define SCPERDIS        0x028
0029 #define SCPERCLKEN      0x02C
0030 #define SCPERSTAT       0x030
0031 #define SCSYSID0        0xEE0
0032 #define SCSYSID1        0xEE4
0033 #define SCSYSID2        0xEE8
0034 #define SCSYSID3        0xEEC
0035 #define SCITCR          0xF00
0036 #define SCITIR0         0xF04
0037 #define SCITIR1         0xF08
0038 #define SCITOR          0xF0C
0039 #define SCCNTCTRL       0xF10
0040 #define SCCNTDATA       0xF14
0041 #define SCCNTSTEP       0xF18
0042 #define SCPERIPHID0     0xFE0
0043 #define SCPERIPHID1     0xFE4
0044 #define SCPERIPHID2     0xFE8
0045 #define SCPERIPHID3     0xFEC
0046 #define SCPCELLID0      0xFF0
0047 #define SCPCELLID1      0xFF4
0048 #define SCPCELLID2      0xFF8
0049 #define SCPCELLID3      0xFFC
0050 
0051 #define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2))
0052 
0053 static inline void sysctl_soft_reset(void __iomem *base)
0054 {
0055     /* switch to slow mode */
0056     writel(0x2, base + SCCTRL);
0057 
0058     /* writing any value to SCSYSSTAT reg will reset system */
0059     writel(0, base + SCSYSSTAT);
0060 }
0061 
0062 #endif /* __AMBA_SP810_H */