From: John Bowler Date: Sun, 19 Jun 2005 01:29:10 +0000 (+0000) Subject: Different soft reset hack for the openslug kernel X-Git-Tag: Release-2010-05/1~9453^2~4408 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0970518a8019bb86fe3896ca551a41a258d026d;p=openembedded.git Different soft reset hack for the openslug kernel BKrev: 42b4ca66Zv9jGJlhTR2cqUzkziNgLg --- diff --git a/packages/linux/openslug-kernel-2.6.11.2/defconfig b/packages/linux/openslug-kernel-2.6.11.2/defconfig index b8aed8ab07..15cac97e3e 100644 --- a/packages/linux/openslug-kernel-2.6.11.2/defconfig +++ b/packages/linux/openslug-kernel-2.6.11.2/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.11.2 -# Thu May 26 13:35:59 2005 +# Sat Jun 18 15:52:14 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -160,7 +160,7 @@ CONFIG_PM=y # CONFIG_PREEMPT is not set CONFIG_APM=y # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/mtdblock4 rw rootfstype=jffs2 mem=32M@0x00000000 init=/linuxrc console=ttyS0,115200n8" +CONFIG_CMDLINE="root=/dev/mtdblock4 rw rootfstype=jffs2 mem=32M@0x00000000 init=/linuxrc reboot=s console=ttyS0,115200n8" CONFIG_ALIGNMENT_TRAP=y # diff --git a/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch b/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch index e69de29bb2..3995ba691e 100644 --- a/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch +++ b/packages/linux/openslug-kernel-2.6.11.2/xscale-reset.patch @@ -0,0 +1,155 @@ +--- linux-2.6.11.2/arch/arm/mm/proc-xscale.S 2005-03-09 00:12:44.000000000 -0800 ++++ linux-2.6.11.2/arch/arm/mm/proc-xscale.S 2005-06-18 15:39:22.701222319 -0700 +@@ -137,23 +137,129 @@ + * same state as it would be if it had been reset, and branch + * to what would be the reset vector. + * ++ * This code is ixp425 specific with respect to the reset of ++ * the 'configuration register' - to be found at address ++ * 0xC40000020 'IXP425_EXP_CNFGO' ++ * + * loc: location to jump to for soft reset + */ + .align 5 + ENTRY(cpu_xscale_reset) ++ @ always branch to 0 ++ mov r0, #0 ++ ++ @ disable both FIQ and IRQ, put us into 32 bit ++ @ SVC mode (no thumb). + mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE + msr cpsr_c, r1 @ reset CPSR +- mrc p15, 0, r1, c1, c0, 0 @ ctrl register +- bic r1, r1, #0x0086 @ ........B....CA. +- bic r1, r1, #0x3900 @ ..VIZ..S........ +- mcr p15, 0, r1, c1, c0, 0 @ ctrl register +- mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB +- bic r1, r1, #0x0001 @ ...............M +- mcr p15, 0, r1, c1, c0, 0 @ ctrl register +- @ CAUTION: MMU turned off from this point. We count on the pipeline +- @ already containing those two last instructions to survive. ++ ++ @ disable debug, clock and power registers are ++ @ unimplemented. ++ mcr p14, 0, r0, c10, c0, 0 @ disable debug ++ ++ @ disable the performance monitor ++ mcr p14, 0, r0, c0, c1, 0 @ PMNC (ctrl reg) ++ mcr p14, 0, r0, c4, c1, 0 @ INTEN (intrpt enable) ++ ++ @ wait for p14 to complete ++ mrc p14, 0, ip, c4, c1, 0 @ arbitrary read ++ mov ip, ip @ sync ++ ++ @ clear the PID register ++ mcr p15, 0, r0, c13, c0, 0 @ OR nothing with address! ++ ++ @ unlock the TLBs and the I/D cache locks ++ mcr p15, 0, r0, c10, c8, 1 @ data TLB unlocked ++ mcr p15, 0, r0, c10, c4, 1 @ instruction TLB unlocked ++ mcr p15, 0, r0, c9, c2, 1 @ unlock data cache ++ mcr p15, 0, r0, c9, c1, 1 @ unlock instruction cache ++ ++ @ zap the minidata cache to write through with write coalescing ++ @ disabled. ++ mov r1, #0x21 @ MD=b10, K=1 ++ mcr p15, 0, r0, c7, c10, 4 @ drain write buffer ++ mrc p15, 0, ip, c1, c0, 0 @ read of ctrl register ++ mov ip, ip @ sync ++ mcr p15, 0, r1, c1, c0, 1 @ write through, no coalesc ++ ++ @ set the control register, the MMU is enabled but everything else ++ @ is disabled at this point, r1 contains the control register flags ++ @ the process is now in little-endian mode (no matter, we aren't ++ @ going to do any