forked from Minki/linux
Second Round of Renesas ARM Based SoC Updates for v4.11
* Add more register documentation to R-Car Gen2 PM -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJYicrUAAoJENfPZGlqN0++hX0P/RfsvYchYCwmgwNjUsC45dLJ UCR+jRFEciq4XzOpF4yExqR8+16/Ne7JFU5ayKd6cv9x/NlDbtcWDRl2eJ2uw1QF o2gESzrO67rcrSBSqGp/Fk9lqp42HrrAXlHew9NpmPCLGzlWusgn40ET9IVF9KGa HgWBIeJaB3R0DeViYeUcCiizYgTMORHsi+JPxvHnP1je7+jjfhK2oOLs++nzpISl 0BJgKM5vtW7UCRkMbqYCXNmb+Ej9ReSX+EvfGKlw/EyotGY7uxku0FsQDZFSTsf6 un6wgoGF+41U85KTN6uEEaM+VK42z1+/eAGGgn37efHC+GrpQP/1LXTGJBhNZszB JwWJk7y+a5EjAp5Hfdc00x2G+0vj7ohk++7ffFA+tz249PX7Wbd7JeNzxsQRFzri 8VPpiFtGImVSy6Cq/fR05CjAns20JW8BGM3U8gY1FQare/ZPaExHMisX71lgv/mi 27SJ0M3THOGu2RSkbtzYmOfUUrC1DCmTSUtD6s4ZZYu/79n5db1+6mdNRB+P89UR pDagZqNK6v0YgBaCO7fkLe6jkYhPCKFGjOSxVuOtnDkLAC8kIazQBDE5mNlr/8Yo gVhdskUhBQHmwFU1iuTTnfiiotc2Ef8oiY18JyGTCE5x6AB0sMytN91UlYBkLs9H 4U4iuWx5jYhkQahD6jTM =WcAl -----END PGP SIGNATURE----- Merge tag 'renesas-soc2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Second Round of Renesas ARM Based SoC Updates for v4.11 * Add more register documentation to R-Car Gen2 PM * tag 'renesas-soc2-for-v4.11' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: Add more register documentation Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
8b6bc21e69
@ -20,14 +20,30 @@
|
||||
|
||||
/* RST */
|
||||
#define RST 0xe6160000
|
||||
#define CA15BAR 0x0020
|
||||
#define CA7BAR 0x0030
|
||||
#define CA15RESCNT 0x0040
|
||||
#define CA7RESCNT 0x0044
|
||||
|
||||
#define CA15BAR 0x0020 /* CA15 Boot Address Register */
|
||||
#define CA7BAR 0x0030 /* CA7 Boot Address Register */
|
||||
#define CA15RESCNT 0x0040 /* CA15 Reset Control Register */
|
||||
#define CA7RESCNT 0x0044 /* CA7 Reset Control Register */
|
||||
|
||||
/* SYS Boot Address Register */
|
||||
#define SBAR_BAREN BIT(4) /* SBAR is valid */
|
||||
|
||||
/* Reset Control Registers */
|
||||
#define CA15RESCNT_CODE 0xa5a50000
|
||||
#define CA15RESCNT_CPUS 0xf /* CPU0-3 */
|
||||
#define CA7RESCNT_CODE 0x5a5a0000
|
||||
#define CA7RESCNT_CPUS 0xf /* CPU0-3 */
|
||||
|
||||
|
||||
/* On-chip RAM */
|
||||
#define ICRAM1 0xe63c0000 /* Inter Connect RAM1 (4 KiB) */
|
||||
|
||||
static inline u32 phys_to_sbar(phys_addr_t addr)
|
||||
{
|
||||
return (addr >> 8) & 0xfffffc00;
|
||||
}
|
||||
|
||||
/* SYSC */
|
||||
#define SYSCIER 0x0c
|
||||
#define SYSCIMR 0x10
|
||||
@ -82,22 +98,24 @@ void __init rcar_gen2_pm_init(void)
|
||||
|
||||
/* setup reset vectors */
|
||||
p = ioremap_nocache(RST, 0x63);
|
||||
bar = (boot_vector_addr >> 8) & 0xfffffc00;
|
||||
bar = phys_to_sbar(boot_vector_addr);
|
||||
if (has_a15) {
|
||||
writel_relaxed(bar, p + CA15BAR);
|
||||
writel_relaxed(bar | 0x10, p + CA15BAR);
|
||||
writel_relaxed(bar | SBAR_BAREN, p + CA15BAR);
|
||||
|
||||
/* de-assert reset for CA15 CPUs */
|
||||
writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) |
|
||||
0xa5a50000, p + CA15RESCNT);
|
||||
writel_relaxed((readl_relaxed(p + CA15RESCNT) &
|
||||
~CA15RESCNT_CPUS) | CA15RESCNT_CODE,
|
||||
p + CA15RESCNT);
|
||||
}
|
||||
if (has_a7) {
|
||||
writel_relaxed(bar, p + CA7BAR);
|
||||
writel_relaxed(bar | 0x10, p + CA7BAR);
|
||||
writel_relaxed(bar | SBAR_BAREN, p + CA7BAR);
|
||||
|
||||
/* de-assert reset for CA7 CPUs */
|
||||
writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) |
|
||||
0x5a5a0000, p + CA7RESCNT);
|
||||
writel_relaxed((readl_relaxed(p + CA7RESCNT) &
|
||||
~CA7RESCNT_CPUS) | CA7RESCNT_CODE,
|
||||
p + CA7RESCNT);
|
||||
}
|
||||
iounmap(p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user