linux/arch/mips
Dmitri Vorobiev 84c21e2542 [MIPS] Malta: Fix software reset on big endian
I noticed that the commit f197465384
(MIPS Tech: Get rid of volatile in core code) broke the software
reset functionality for MIPS Malta boards in big-endian mode.

According to the MIPS Malta board user's manual, writing the magic
32-bit GORESET value into the SOFTRES register initiates board soft
reset. My experimentation has shown that the endianness of the GORESET
integer should thereby be the same as the endianness, which has been
set for the CPU itself. The writew() function used to write the magic
value in the code introduced by the commit mentioned above, however,
swaps bytes for big-endian kernels and transfers 16 bits instead of 32.

The patch below replaces the writew() function by the __raw_writel()
routine, which leaves the byte order intact and transfers the whole
MIPS machine word. Trivial code cleanup (replacing spaces by a tab
and cutting oversized lines to make checkpatch.pl happy) is also
included.

The patch was tested using a Malta evaluation board running in both
BE and LE modes. For both modes, software reset was fully functional
after the change.

P.S. I suspect that the same commit broke the "standby" functionality
for MIPS Atlas boards. However, I did not touch the Atlas code as I
don't have such board at my disposal and also because the linux-mips.org
Web site claims that Atlas support is scheduled for removal.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-01-11 17:05:41 +00:00
..
au1000 [MIPS] Alchemy: Fix use of __init code bug exposed by modpost warning 2008-01-07 15:32:03 +00:00
basler/excite [MIPS] Excite: Fix build error. 2007-11-02 16:13:47 +00:00
bcm47xx [MIPS] Kill duplicated setup_irq() for cp0 timer 2007-10-19 18:15:58 +01:00
boot [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
cobalt [MIPS] time: Set up Cobalt's mips_hpt_frequency 2007-12-14 17:34:29 +00:00
configs [MIPS] Malta: Enable tickless and highres timers. 2007-12-09 04:51:10 +00:00
dec [MIPS] Allow hardwiring of the CPU type to a single type for optimization. 2007-10-11 23:46:15 +01:00
emma2rh [MIPS] Kill duplicated setup_irq() for cp0 timer 2007-10-19 18:15:58 +01:00
fw [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
gt64120/wrppmc [MIPS] time: Remove wrppmc's definition of plat_timer_setup. 2007-10-29 19:35:34 +00:00
jazz [MIPS] Jazz: disable PIT; cleanup R4030 clockevent 2007-11-02 16:13:49 +00:00
jmr3927 [MIPS] txx9tmr clockevent/clocksource driver 2007-10-29 19:35:35 +00:00
kernel [MIPS] Fix CONFIG_BOOT_RAW. 2008-01-07 15:32:04 +00:00
lasat [MIPS] Lasat: Fix overlap of interrupt number ranges. 2007-11-15 23:21:50 +00:00
lemote/lm2e [MIPS] Kill duplicated setup_irq() for cp0 timer 2007-10-19 18:15:58 +01:00
lib [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
math-emu [MIPS] Compliment va_start() with va_end(). 2007-11-26 17:26:15 +00:00
mips-boards [MIPS] Malta: Fix software reset on big endian 2008-01-11 17:05:41 +00:00
mipssim [MIPS] time: MIPSsim's plat_time_init doesn't need to be irq safe. 2007-11-26 17:26:13 +00:00
mm [MIPS] Wrong CONFIG option prevents setup of DMA zone. 2008-01-11 17:05:41 +00:00
oprofile [MIPS] Oprofile: Fix computation of number of counters. 2007-12-06 17:15:58 +00:00
pci [MIPS] Fix IP32 breakage 2008-01-07 15:32:03 +00:00
philips/pnx8550 [MIPS] pnx8xxx: move to clocksource 2008-01-11 17:05:41 +00:00
pmc-sierra [MIPS] Only build r4k clocksource for systems that work ok with it. 2007-11-26 17:26:14 +00:00
qemu qemu: do not enable IP7 blindly 2007-12-09 04:51:10 +00:00
sgi-ip22 IP22ZILOG: fix lockup and sysrq 2007-11-29 09:24:53 -08:00
sgi-ip27 [MIPS] IP27: Fix build error. 2007-11-02 16:13:47 +00:00
sgi-ip32 [MIPS] Fix IP32 breakage 2008-01-07 15:32:03 +00:00
sibyte [MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR. 2007-11-15 23:21:49 +00:00
sni [MIPS] SNI: s/achknowledge/acknowledge/ 2007-11-15 23:21:51 +00:00
tx4927 [MIPS] txx9tmr clockevent/clocksource driver 2007-10-29 19:35:35 +00:00
tx4938 [MIPS] txx9tmr clockevent/clocksource driver 2007-10-29 19:35:35 +00:00
vr41xx [MIPS] Only build r4k clocksource for systems that work ok with it. 2007-11-26 17:26:14 +00:00
defconfig [MIPS] Update a few defconfigs. 2007-08-27 02:16:55 +01:00
Kconfig [MIPS] Move inclusing of kernel/time/Kconfig menu to appropriate place 2008-01-07 15:32:03 +00:00
Kconfig.debug [MIPS] Kbuild: Use the new cc-cross-prefix feature. 2007-10-22 22:09:01 +01:00
Makefile [MIPS] Makefile: Fix canonical system names 2007-11-15 23:21:51 +00:00