mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 12:47:04 +07:00
445959821f
This patch changes 24xx to use new register access, except for clock framework. Clock framework register access will get updates in the next patch. Note that board-*.c files change GPMC (General Purpose Memory Controller) access to use gpmc_cs_write_reg() instead of accessing the registers directly. The code also uses gpmc_fck instead of it's parent clock core_l3_ck for GPMC clock. The H4 board file also adds h4_init_flash() function, which specify the flash start and end addresses. Also note that sleep.S removes some unused registers addresses. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/*
|
|
* linux/arch/arm/mach-omap2/prcm.c
|
|
*
|
|
* OMAP 24xx Power Reset and Clock Management (PRCM) functions
|
|
*
|
|
* Copyright (C) 2005 Nokia Corporation
|
|
*
|
|
* Written by Tony Lindgren <tony.lindgren@nokia.com>
|
|
*
|
|
* Some pieces of code Copyright (C) 2005 Texas Instruments, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
#include <linux/module.h>
|
|
#include <linux/init.h>
|
|
#include <linux/clk.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include "prm.h"
|
|
#include "prm-regbits-24xx.h"
|
|
|
|
extern void omap2_clk_prepare_for_reboot(void);
|
|
|
|
u32 omap_prcm_get_reset_sources(void)
|
|
{
|
|
return prm_read_mod_reg(WKUP_MOD, RM_RSTST) & 0x7f;
|
|
}
|
|
EXPORT_SYMBOL(omap_prcm_get_reset_sources);
|
|
|
|
/* Resets clock rates and reboots the system. Only called from system.h */
|
|
void omap_prcm_arch_reset(char mode)
|
|
{
|
|
u32 wkup;
|
|
omap2_clk_prepare_for_reboot();
|
|
|
|
if (cpu_is_omap24xx()) {
|
|
wkup = prm_read_mod_reg(WKUP_MOD, RM_RSTCTRL) | OMAP_RST_DPLL3;
|
|
prm_write_mod_reg(wkup, WKUP_MOD, RM_RSTCTRL);
|
|
}
|
|
}
|