mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
rk29: no reset while panic and fix gcc warning
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/proc-fns.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <mach/rk29_iomap.h>
|
||||
#include <mach/cru.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mmzone.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <asm/tlb.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/sections.h>
|
||||
@@ -17,16 +11,16 @@
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/stacktrace.h>
|
||||
|
||||
|
||||
|
||||
|
||||
#include <mach/rk29_iomap.h>
|
||||
#include <mach/cru.h>
|
||||
|
||||
#define cru_readl(offset) readl(RK29_CRU_BASE + offset)
|
||||
#define cru_writel(v, offset) do { writel(v, RK29_CRU_BASE + offset); readl(RK29_CRU_BASE + offset); } while (0)
|
||||
|
||||
static inline void delay_500ns(void)
|
||||
{
|
||||
int delay = 12;
|
||||
int delay = 13;
|
||||
barrier();
|
||||
while (delay--)
|
||||
barrier();
|
||||
}
|
||||
@@ -37,7 +31,6 @@ static void pwm2gpiodefault(void)
|
||||
volatile unsigned int * pGRF_GPIO2L_IOMUX = (volatile unsigned int *)(REG_FILE_BASE_ADDR + 0x58);
|
||||
#define GPIO2_BASE_ADDR RK29_GPIO2_BASE
|
||||
volatile unsigned int *pGPIO2_DIR = (volatile unsigned int *)(GPIO2_BASE_ADDR + 0x4);
|
||||
volatile unsigned int *pGPIO2_LEVEL = (volatile unsigned int *)GPIO2_BASE_ADDR;
|
||||
|
||||
// iomux pwm2 to gpio2_a[3]
|
||||
*pGRF_GPIO2L_IOMUX &= ~(0x3<<6);
|
||||
@@ -48,7 +41,11 @@ static void pwm2gpiodefault(void)
|
||||
|
||||
void rk29_arch_reset(int mode, const char *cmd)
|
||||
{
|
||||
u32 pll, reg;
|
||||
u32 reg;
|
||||
|
||||
/* from panic? */
|
||||
if (system_state != SYSTEM_RESTART)
|
||||
machine_power_off();
|
||||
|
||||
local_irq_disable();
|
||||
local_fiq_disable();
|
||||
@@ -106,7 +103,7 @@ void rk29_arch_reset(int mode, const char *cmd)
|
||||
"mcr p15, 0, %0, c1, c0, 0\n\t"
|
||||
// "mcr p15, 0, %0, c8, c7, 0 @ invalidate whole TLB\n\t"
|
||||
// "mcr p15, 0, %0, c7, c5, 6 @ invalidate BTC\n\t"
|
||||
:: "r" (reg));
|
||||
: "=r" (reg));
|
||||
|
||||
asm("b 1f\n\t"
|
||||
".align 5\n\t"
|
||||
|
||||
Reference in New Issue
Block a user