mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 07:35:12 +07:00
13cf8df97d
Since support for mxc91231 was introduced 2009 it only saw patches that were part of (mxc or arm) global cleanups. The only supported machine only had 4 devices (2x UART, sdhc, watchdog). Cc: Dmitriy Taychenachev <dimichxp@gmail.com> LAKML-Reference: 1302211482-17926-1-git-send-email-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
62 lines
1.8 KiB
C
62 lines
1.8 KiB
C
/*
|
|
* Copyright (C) 1999 ARM Limited
|
|
* Copyright (C) 2000 Deep Blue Solutions Ltd
|
|
* Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef __ASM_ARCH_MXC_SYSTEM_H__
|
|
#define __ASM_ARCH_MXC_SYSTEM_H__
|
|
|
|
#include <mach/hardware.h>
|
|
#include <mach/common.h>
|
|
|
|
extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode);
|
|
|
|
static inline void arch_idle(void)
|
|
{
|
|
/* fix i.MX31 errata TLSbo65953 and i.MX35 errata ENGcm09472 */
|
|
if (cpu_is_mx31() || cpu_is_mx35()) {
|
|
unsigned long reg = 0;
|
|
__asm__ __volatile__(
|
|
/* disable I and D cache */
|
|
"mrc p15, 0, %0, c1, c0, 0\n"
|
|
"bic %0, %0, #0x00001000\n"
|
|
"bic %0, %0, #0x00000004\n"
|
|
"mcr p15, 0, %0, c1, c0, 0\n"
|
|
/* invalidate I cache */
|
|
"mov %0, #0\n"
|
|
"mcr p15, 0, %0, c7, c5, 0\n"
|
|
/* clear and invalidate D cache */
|
|
"mov %0, #0\n"
|
|
"mcr p15, 0, %0, c7, c14, 0\n"
|
|
/* WFI */
|
|
"mov %0, #0\n"
|
|
"mcr p15, 0, %0, c7, c0, 4\n"
|
|
"nop\n" "nop\n" "nop\n" "nop\n"
|
|
"nop\n" "nop\n" "nop\n"
|
|
/* enable I and D cache */
|
|
"mrc p15, 0, %0, c1, c0, 0\n"
|
|
"orr %0, %0, #0x00001000\n"
|
|
"orr %0, %0, #0x00000004\n"
|
|
"mcr p15, 0, %0, c1, c0, 0\n"
|
|
: "=r" (reg));
|
|
} else if (cpu_is_mx51())
|
|
mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
|
|
else
|
|
cpu_do_idle();
|
|
}
|
|
|
|
void arch_reset(char mode, const char *cmd);
|
|
|
|
#endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
|