mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-28 22:52:03 +07:00
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
This commit is contained in:
commit
9f2fa46638
@ -177,6 +177,16 @@ Who: Jean Delvare <khali@linux-fr.org>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports
|
||||||
|
(temporary transition config option provided until then)
|
||||||
|
The transition config option will also be removed at the same time.
|
||||||
|
When: before 2.6.19
|
||||||
|
Why: Unused symbols are both increasing the size of the kernel binary
|
||||||
|
and are often a sign of "wrong API"
|
||||||
|
Who: Arjan van de Ven <arjan@linux.intel.com>
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
|
||||||
What: remove EXPORT_SYMBOL(tasklist_lock)
|
What: remove EXPORT_SYMBOL(tasklist_lock)
|
||||||
When: August 2006
|
When: August 2006
|
||||||
Files: kernel/fork.c
|
Files: kernel/fork.c
|
||||||
|
@ -22,78 +22,9 @@
|
|||||||
to run the program with an "&" to run it in the background!)
|
to run the program with an "&" to run it in the background!)
|
||||||
|
|
||||||
If you want to write a program to be compatible with the PC Watchdog
|
If you want to write a program to be compatible with the PC Watchdog
|
||||||
driver, simply do the following:
|
driver, simply use of modify the watchdog test program:
|
||||||
|
Documentation/watchdog/src/watchdog-test.c
|
||||||
|
|
||||||
-- Snippet of code --
|
|
||||||
/*
|
|
||||||
* Watchdog Driver Test Program
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/watchdog.h>
|
|
||||||
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This function simply sends an IOCTL to the driver, which in turn ticks
|
|
||||||
* the PC Watchdog card to reset its internal timer so it doesn't trigger
|
|
||||||
* a computer reset.
|
|
||||||
*/
|
|
||||||
void keep_alive(void)
|
|
||||||
{
|
|
||||||
int dummy;
|
|
||||||
|
|
||||||
ioctl(fd, WDIOC_KEEPALIVE, &dummy);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The main program. Run the program with "-d" to disable the card,
|
|
||||||
* or "-e" to enable the card.
|
|
||||||
*/
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
fd = open("/dev/watchdog", O_WRONLY);
|
|
||||||
|
|
||||||
if (fd == -1) {
|
|
||||||
fprintf(stderr, "Watchdog device not enabled.\n");
|
|
||||||
fflush(stderr);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argc > 1) {
|
|
||||||
if (!strncasecmp(argv[1], "-d", 2)) {
|
|
||||||
ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD);
|
|
||||||
fprintf(stderr, "Watchdog card disabled.\n");
|
|
||||||
fflush(stderr);
|
|
||||||
exit(0);
|
|
||||||
} else if (!strncasecmp(argv[1], "-e", 2)) {
|
|
||||||
ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD);
|
|
||||||
fprintf(stderr, "Watchdog card enabled.\n");
|
|
||||||
fflush(stderr);
|
|
||||||
exit(0);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "-d to disable, -e to enable.\n");
|
|
||||||
fprintf(stderr, "run by itself to tick the card.\n");
|
|
||||||
fflush(stderr);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Watchdog Ticking Away!\n");
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
keep_alive();
|
|
||||||
sleep(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-- End snippet --
|
|
||||||
|
|
||||||
Other IOCTL functions include:
|
Other IOCTL functions include:
|
||||||
|
|
||||||
|
15
Documentation/watchdog/src/watchdog-simple.c
Normal file
15
Documentation/watchdog/src/watchdog-simple.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
int main(int argc, const char *argv[]) {
|
||||||
|
int fd = open("/dev/watchdog", O_WRONLY);
|
||||||
|
if (fd == -1) {
|
||||||
|
perror("watchdog");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
while (1) {
|
||||||
|
write(fd, "\0", 1);
|
||||||
|
fsync(fd);
|
||||||
|
sleep(10);
|
||||||
|
}
|
||||||
|
}
|
68
Documentation/watchdog/src/watchdog-test.c
Normal file
68
Documentation/watchdog/src/watchdog-test.c
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* Watchdog Driver Test Program
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <linux/types.h>
|
||||||
|
#include <linux/watchdog.h>
|
||||||
|
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This function simply sends an IOCTL to the driver, which in turn ticks
|
||||||
|
* the PC Watchdog card to reset its internal timer so it doesn't trigger
|
||||||
|
* a computer reset.
|
||||||
|
*/
|
||||||
|
void keep_alive(void)
|
||||||
|
{
|
||||||
|
int dummy;
|
||||||
|
|
||||||
|
ioctl(fd, WDIOC_KEEPALIVE, &dummy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The main program. Run the program with "-d" to disable the card,
|
||||||
|
* or "-e" to enable the card.
|
||||||
|
*/
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
fd = open("/dev/watchdog", O_WRONLY);
|
||||||
|
|
||||||
|
if (fd == -1) {
|
||||||
|
fprintf(stderr, "Watchdog device not enabled.\n");
|
||||||
|
fflush(stderr);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc > 1) {
|
||||||
|
if (!strncasecmp(argv[1], "-d", 2)) {
|
||||||
|
ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD);
|
||||||
|
fprintf(stderr, "Watchdog card disabled.\n");
|
||||||
|
fflush(stderr);
|
||||||
|
exit(0);
|
||||||
|
} else if (!strncasecmp(argv[1], "-e", 2)) {
|
||||||
|
ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD);
|
||||||
|
fprintf(stderr, "Watchdog card enabled.\n");
|
||||||
|
fflush(stderr);
|
||||||
|
exit(0);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "-d to disable, -e to enable.\n");
|
||||||
|
fprintf(stderr, "run by itself to tick the card.\n");
|
||||||
|
fflush(stderr);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Watchdog Ticking Away!\n");
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
keep_alive();
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
}
|
@ -34,22 +34,7 @@ activates as soon as /dev/watchdog is opened and will reboot unless
|
|||||||
the watchdog is pinged within a certain time, this time is called the
|
the watchdog is pinged within a certain time, this time is called the
|
||||||
timeout or margin. The simplest way to ping the watchdog is to write
|
timeout or margin. The simplest way to ping the watchdog is to write
|
||||||
some data to the device. So a very simple watchdog daemon would look
|
some data to the device. So a very simple watchdog daemon would look
|
||||||
like this:
|
like this source file: see Documentation/watchdog/src/watchdog-simple.c
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
int main(int argc, const char *argv[]) {
|
|
||||||
int fd=open("/dev/watchdog",O_WRONLY);
|
|
||||||
if (fd==-1) {
|
|
||||||
perror("watchdog");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
while(1) {
|
|
||||||
write(fd, "\0", 1);
|
|
||||||
sleep(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
A more advanced driver could for example check that a HTTP server is
|
A more advanced driver could for example check that a HTTP server is
|
||||||
still responding before doing the write call to ping the watchdog.
|
still responding before doing the write call to ping the watchdog.
|
||||||
@ -110,7 +95,40 @@ current timeout using the GETTIMEOUT ioctl.
|
|||||||
ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
|
ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
|
||||||
printf("The timeout was is %d seconds\n", timeout);
|
printf("The timeout was is %d seconds\n", timeout);
|
||||||
|
|
||||||
Envinronmental monitoring:
|
Pretimeouts:
|
||||||
|
|
||||||
|
Some watchdog timers can be set to have a trigger go off before the
|
||||||
|
actual time they will reset the system. This can be done with an NMI,
|
||||||
|
interrupt, or other mechanism. This allows Linux to record useful
|
||||||
|
information (like panic information and kernel coredumps) before it
|
||||||
|
resets.
|
||||||
|
|
||||||
|
pretimeout = 10;
|
||||||
|
ioctl(fd, WDIOC_SETPRETIMEOUT, &pretimeout);
|
||||||
|
|
||||||
|
Note that the pretimeout is the number of seconds before the time
|
||||||
|
when the timeout will go off. It is not the number of seconds until
|
||||||
|
the pretimeout. So, for instance, if you set the timeout to 60 seconds
|
||||||
|
and the pretimeout to 10 seconds, the pretimout will go of in 50
|
||||||
|
seconds. Setting a pretimeout to zero disables it.
|
||||||
|
|
||||||
|
There is also a get function for getting the pretimeout:
|
||||||
|
|
||||||
|
ioctl(fd, WDIOC_GETPRETIMEOUT, &timeout);
|
||||||
|
printf("The pretimeout was is %d seconds\n", timeout);
|
||||||
|
|
||||||
|
Not all watchdog drivers will support a pretimeout.
|
||||||
|
|
||||||
|
Get the number of seconds before reboot:
|
||||||
|
|
||||||
|
Some watchdog drivers have the ability to report the remaining time
|
||||||
|
before the system will reboot. The WDIOC_GETTIMELEFT is the ioctl
|
||||||
|
that returns the number of seconds before reboot.
|
||||||
|
|
||||||
|
ioctl(fd, WDIOC_GETTIMELEFT, &timeleft);
|
||||||
|
printf("The timeout was is %d seconds\n", timeleft);
|
||||||
|
|
||||||
|
Environmental monitoring:
|
||||||
|
|
||||||
All watchdog drivers are required return more information about the system,
|
All watchdog drivers are required return more information about the system,
|
||||||
some do temperature, fan and power level monitoring, some can tell you
|
some do temperature, fan and power level monitoring, some can tell you
|
||||||
@ -169,6 +187,10 @@ The watchdog saw a keepalive ping since it was last queried.
|
|||||||
|
|
||||||
WDIOF_SETTIMEOUT Can set/get the timeout
|
WDIOF_SETTIMEOUT Can set/get the timeout
|
||||||
|
|
||||||
|
The watchdog can do pretimeouts.
|
||||||
|
|
||||||
|
WDIOF_PRETIMEOUT Pretimeout (in seconds), get/set
|
||||||
|
|
||||||
|
|
||||||
For those drivers that return any bits set in the option field, the
|
For those drivers that return any bits set in the option field, the
|
||||||
GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current
|
GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current
|
||||||
|
@ -65,28 +65,7 @@ The external event interfaces on the WDT boards are not currently supported.
|
|||||||
Minor numbers are however allocated for it.
|
Minor numbers are however allocated for it.
|
||||||
|
|
||||||
|
|
||||||
Example Watchdog Driver
|
Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c
|
||||||
-----------------------
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
int main(int argc, const char *argv[])
|
|
||||||
{
|
|
||||||
int fd=open("/dev/watchdog",O_WRONLY);
|
|
||||||
if(fd==-1)
|
|
||||||
{
|
|
||||||
perror("watchdog");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
write(fd,"\0",1);
|
|
||||||
fsync(fd);
|
|
||||||
sleep(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Contact Information
|
Contact Information
|
||||||
|
@ -188,23 +188,27 @@ config ARCH_IMX
|
|||||||
|
|
||||||
config ARCH_IOP3XX
|
config ARCH_IOP3XX
|
||||||
bool "IOP3xx-based"
|
bool "IOP3xx-based"
|
||||||
|
depends on MMU
|
||||||
select PCI
|
select PCI
|
||||||
help
|
help
|
||||||
Support for Intel's IOP3XX (XScale) family of processors.
|
Support for Intel's IOP3XX (XScale) family of processors.
|
||||||
|
|
||||||
config ARCH_IXP4XX
|
config ARCH_IXP4XX
|
||||||
bool "IXP4xx-based"
|
bool "IXP4xx-based"
|
||||||
|
depends on MMU
|
||||||
help
|
help
|
||||||
Support for Intel's IXP4XX (XScale) family of processors.
|
Support for Intel's IXP4XX (XScale) family of processors.
|
||||||
|
|
||||||
config ARCH_IXP2000
|
config ARCH_IXP2000
|
||||||
bool "IXP2400/2800-based"
|
bool "IXP2400/2800-based"
|
||||||
|
depends on MMU
|
||||||
select PCI
|
select PCI
|
||||||
help
|
help
|
||||||
Support for Intel's IXP2400/2800 (XScale) family of processors.
|
Support for Intel's IXP2400/2800 (XScale) family of processors.
|
||||||
|
|
||||||
config ARCH_IXP23XX
|
config ARCH_IXP23XX
|
||||||
bool "IXP23XX-based"
|
bool "IXP23XX-based"
|
||||||
|
depends on MMU
|
||||||
select PCI
|
select PCI
|
||||||
help
|
help
|
||||||
Support for Intel's IXP23xx (XScale) family of processors.
|
Support for Intel's IXP23xx (XScale) family of processors.
|
||||||
@ -229,6 +233,7 @@ config ARCH_PNX4008
|
|||||||
|
|
||||||
config ARCH_PXA
|
config ARCH_PXA
|
||||||
bool "PXA2xx-based"
|
bool "PXA2xx-based"
|
||||||
|
depends on MMU
|
||||||
select ARCH_MTD_XIP
|
select ARCH_MTD_XIP
|
||||||
help
|
help
|
||||||
Support for Intel's PXA2XX processor line.
|
Support for Intel's PXA2XX processor line.
|
||||||
@ -339,6 +344,10 @@ config XSCALE_PMU
|
|||||||
depends on CPU_XSCALE && !XSCALE_PMU_TIMER
|
depends on CPU_XSCALE && !XSCALE_PMU_TIMER
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
if !MMU
|
||||||
|
source "arch/arm/Kconfig-nommu"
|
||||||
|
endif
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
source "arch/arm/common/Kconfig"
|
source "arch/arm/common/Kconfig"
|
||||||
|
@ -22,6 +22,9 @@ obj-$(CONFIG_PCI) += bios32.o
|
|||||||
obj-$(CONFIG_SMP) += smp.o
|
obj-$(CONFIG_SMP) += smp.o
|
||||||
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
|
||||||
|
AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
|
||||||
|
|
||||||
obj-$(CONFIG_IWMMXT) += iwmmxt.o
|
obj-$(CONFIG_IWMMXT) += iwmmxt.o
|
||||||
AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
|
AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
|
||||||
|
|
||||||
|
@ -109,11 +109,13 @@ EXPORT_SYMBOL(memchr);
|
|||||||
EXPORT_SYMBOL(__memzero);
|
EXPORT_SYMBOL(__memzero);
|
||||||
|
|
||||||
/* user mem (segment) */
|
/* user mem (segment) */
|
||||||
EXPORT_SYMBOL(__arch_copy_from_user);
|
EXPORT_SYMBOL(__strnlen_user);
|
||||||
EXPORT_SYMBOL(__arch_copy_to_user);
|
EXPORT_SYMBOL(__strncpy_from_user);
|
||||||
EXPORT_SYMBOL(__arch_clear_user);
|
|
||||||
EXPORT_SYMBOL(__arch_strnlen_user);
|
#ifdef CONFIG_MMU
|
||||||
EXPORT_SYMBOL(__arch_strncpy_from_user);
|
EXPORT_SYMBOL(__copy_from_user);
|
||||||
|
EXPORT_SYMBOL(__copy_to_user);
|
||||||
|
EXPORT_SYMBOL(__clear_user);
|
||||||
|
|
||||||
EXPORT_SYMBOL(__get_user_1);
|
EXPORT_SYMBOL(__get_user_1);
|
||||||
EXPORT_SYMBOL(__get_user_2);
|
EXPORT_SYMBOL(__get_user_2);
|
||||||
@ -123,6 +125,7 @@ EXPORT_SYMBOL(__put_user_1);
|
|||||||
EXPORT_SYMBOL(__put_user_2);
|
EXPORT_SYMBOL(__put_user_2);
|
||||||
EXPORT_SYMBOL(__put_user_4);
|
EXPORT_SYMBOL(__put_user_4);
|
||||||
EXPORT_SYMBOL(__put_user_8);
|
EXPORT_SYMBOL(__put_user_8);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* crypto hash */
|
/* crypto hash */
|
||||||
EXPORT_SYMBOL(sha_transform);
|
EXPORT_SYMBOL(sha_transform);
|
||||||
|
@ -59,6 +59,9 @@ int main(void)
|
|||||||
DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate));
|
DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate));
|
||||||
#ifdef CONFIG_IWMMXT
|
#ifdef CONFIG_IWMMXT
|
||||||
DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt));
|
DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt));
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
DEFINE(TI_CRUNCH_STATE, offsetof(struct thread_info, crunchstate));
|
||||||
#endif
|
#endif
|
||||||
BLANK();
|
BLANK();
|
||||||
DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0));
|
DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0));
|
||||||
|
305
arch/arm/kernel/crunch-bits.S
Normal file
305
arch/arm/kernel/crunch-bits.S
Normal file
@ -0,0 +1,305 @@
|
|||||||
|
/*
|
||||||
|
* arch/arm/kernel/crunch-bits.S
|
||||||
|
* Cirrus MaverickCrunch context switching and handling
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
|
*
|
||||||
|
* Shamelessly stolen from the iWMMXt code by Nicolas Pitre, which is
|
||||||
|
* Copyright (c) 2003-2004, MontaVista Software, 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/linkage.h>
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
#include <asm/thread_info.h>
|
||||||
|
#include <asm/asm-offsets.h>
|
||||||
|
#include <asm/arch/ep93xx-regs.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We can't use hex constants here due to a bug in gas.
|
||||||
|
*/
|
||||||
|
#define CRUNCH_MVDX0 0
|
||||||
|
#define CRUNCH_MVDX1 8
|
||||||
|
#define CRUNCH_MVDX2 16
|
||||||
|
#define CRUNCH_MVDX3 24
|
||||||
|
#define CRUNCH_MVDX4 32
|
||||||
|
#define CRUNCH_MVDX5 40
|
||||||
|
#define CRUNCH_MVDX6 48
|
||||||
|
#define CRUNCH_MVDX7 56
|
||||||
|
#define CRUNCH_MVDX8 64
|
||||||
|
#define CRUNCH_MVDX9 72
|
||||||
|
#define CRUNCH_MVDX10 80
|
||||||
|
#define CRUNCH_MVDX11 88
|
||||||
|
#define CRUNCH_MVDX12 96
|
||||||
|
#define CRUNCH_MVDX13 104
|
||||||
|
#define CRUNCH_MVDX14 112
|
||||||
|
#define CRUNCH_MVDX15 120
|
||||||
|
#define CRUNCH_MVAX0L 128
|
||||||
|
#define CRUNCH_MVAX0M 132
|
||||||
|
#define CRUNCH_MVAX0H 136
|
||||||
|
#define CRUNCH_MVAX1L 140
|
||||||
|
#define CRUNCH_MVAX1M 144
|
||||||
|
#define CRUNCH_MVAX1H 148
|
||||||
|
#define CRUNCH_MVAX2L 152
|
||||||
|
#define CRUNCH_MVAX2M 156
|
||||||
|
#define CRUNCH_MVAX2H 160
|
||||||
|
#define CRUNCH_MVAX3L 164
|
||||||
|
#define CRUNCH_MVAX3M 168
|
||||||
|
#define CRUNCH_MVAX3H 172
|
||||||
|
#define CRUNCH_DSPSC 176
|
||||||
|
|
||||||
|
#define CRUNCH_SIZE 184
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lazy switching of crunch coprocessor context
|
||||||
|
*
|
||||||
|
* r10 = struct thread_info pointer
|
||||||
|
* r9 = ret_from_exception
|
||||||
|
* lr = undefined instr exit
|
||||||
|
*
|
||||||
|
* called from prefetch exception handler with interrupts disabled
|
||||||
|
*/
|
||||||
|
ENTRY(crunch_task_enable)
|
||||||
|
ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr
|
||||||
|
|
||||||
|
ldr r1, [r8, #0x80]
|
||||||
|
tst r1, #0x00800000 @ access to crunch enabled?
|
||||||
|
movne pc, lr @ if so no business here
|
||||||
|
mov r3, #0xaa @ unlock syscon swlock
|
||||||
|
str r3, [r8, #0xc0]
|
||||||
|
orr r1, r1, #0x00800000 @ enable access to crunch
|
||||||
|
str r1, [r8, #0x80]
|
||||||
|
|
||||||
|
ldr r3, =crunch_owner
|
||||||
|
add r0, r10, #TI_CRUNCH_STATE @ get task crunch save area
|
||||||
|
ldr r2, [sp, #60] @ current task pc value
|
||||||
|
ldr r1, [r3] @ get current crunch owner
|
||||||
|
str r0, [r3] @ this task now owns crunch
|
||||||
|
sub r2, r2, #4 @ adjust pc back
|
||||||
|
str r2, [sp, #60]
|
||||||
|
|
||||||
|
ldr r2, [r8, #0x80]
|
||||||
|
mov r2, r2 @ flush out enable (@@@)
|
||||||
|
|
||||||
|
teq r1, #0 @ test for last ownership
|
||||||
|
mov lr, r9 @ normal exit from exception
|
||||||
|
beq crunch_load @ no owner, skip save
|
||||||
|
|
||||||
|
crunch_save:
|
||||||
|
cfstr64 mvdx0, [r1, #CRUNCH_MVDX0] @ save 64b registers
|
||||||
|
cfstr64 mvdx1, [r1, #CRUNCH_MVDX1]
|
||||||
|
cfstr64 mvdx2, [r1, #CRUNCH_MVDX2]
|
||||||
|
cfstr64 mvdx3, [r1, #CRUNCH_MVDX3]
|
||||||
|
cfstr64 mvdx4, [r1, #CRUNCH_MVDX4]
|
||||||
|
cfstr64 mvdx5, [r1, #CRUNCH_MVDX5]
|
||||||
|
cfstr64 mvdx6, [r1, #CRUNCH_MVDX6]
|
||||||
|
cfstr64 mvdx7, [r1, #CRUNCH_MVDX7]
|
||||||
|
cfstr64 mvdx8, [r1, #CRUNCH_MVDX8]
|
||||||
|
cfstr64 mvdx9, [r1, #CRUNCH_MVDX9]
|
||||||
|
cfstr64 mvdx10, [r1, #CRUNCH_MVDX10]
|
||||||
|
cfstr64 mvdx11, [r1, #CRUNCH_MVDX11]
|
||||||
|
cfstr64 mvdx12, [r1, #CRUNCH_MVDX12]
|
||||||
|
cfstr64 mvdx13, [r1, #CRUNCH_MVDX13]
|
||||||
|
cfstr64 mvdx14, [r1, #CRUNCH_MVDX14]
|
||||||
|
cfstr64 mvdx15, [r1, #CRUNCH_MVDX15]
|
||||||
|
|
||||||
|
#ifdef __ARMEB__
|
||||||
|
#error fix me for ARMEB
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cfmv32al mvfx0, mvax0 @ save 72b accumulators
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX0L]
|
||||||
|
cfmv32am mvfx0, mvax0
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX0M]
|
||||||
|
cfmv32ah mvfx0, mvax0
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX0H]
|
||||||
|
cfmv32al mvfx0, mvax1
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX1L]
|
||||||
|
cfmv32am mvfx0, mvax1
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX1M]
|
||||||
|
cfmv32ah mvfx0, mvax1
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX1H]
|
||||||
|
cfmv32al mvfx0, mvax2
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX2L]
|
||||||
|
cfmv32am mvfx0, mvax2
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX2M]
|
||||||
|
cfmv32ah mvfx0, mvax2
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX2H]
|
||||||
|
cfmv32al mvfx0, mvax3
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX3L]
|
||||||
|
cfmv32am mvfx0, mvax3
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX3M]
|
||||||
|
cfmv32ah mvfx0, mvax3
|
||||||
|
cfstr32 mvfx0, [r1, #CRUNCH_MVAX3H]
|
||||||
|
|
||||||
|
cfmv32sc mvdx0, dspsc @ save status word
|
||||||
|
cfstr64 mvdx0, [r1, #CRUNCH_DSPSC]
|
||||||
|
|
||||||
|
teq r0, #0 @ anything to load?
|
||||||
|
cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered
|
||||||
|
moveq pc, lr
|
||||||
|
|
||||||
|
crunch_load:
|
||||||
|
cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word
|
||||||
|
cfmvsc32 dspsc, mvdx0
|
||||||
|
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX0L] @ load 72b accumulators
|
||||||
|
cfmval32 mvax0, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX0M]
|
||||||
|
cfmvam32 mvax0, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX0H]
|
||||||
|
cfmvah32 mvax0, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX1L]
|
||||||
|
cfmval32 mvax1, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX1M]
|
||||||
|
cfmvam32 mvax1, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX1H]
|
||||||
|
cfmvah32 mvax1, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX2L]
|
||||||
|
cfmval32 mvax2, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX2M]
|
||||||
|
cfmvam32 mvax2, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX2H]
|
||||||
|
cfmvah32 mvax2, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX3L]
|
||||||
|
cfmval32 mvax3, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX3M]
|
||||||
|
cfmvam32 mvax3, mvfx0
|
||||||
|
cfldr32 mvfx0, [r0, #CRUNCH_MVAX3H]
|
||||||
|
cfmvah32 mvax3, mvfx0
|
||||||
|
|
||||||
|
cfldr64 mvdx0, [r0, #CRUNCH_MVDX0] @ load 64b registers
|
||||||
|
cfldr64 mvdx1, [r0, #CRUNCH_MVDX1]
|
||||||
|
cfldr64 mvdx2, [r0, #CRUNCH_MVDX2]
|
||||||
|
cfldr64 mvdx3, [r0, #CRUNCH_MVDX3]
|
||||||
|
cfldr64 mvdx4, [r0, #CRUNCH_MVDX4]
|
||||||
|
cfldr64 mvdx5, [r0, #CRUNCH_MVDX5]
|
||||||
|
cfldr64 mvdx6, [r0, #CRUNCH_MVDX6]
|
||||||
|
cfldr64 mvdx7, [r0, #CRUNCH_MVDX7]
|
||||||
|
cfldr64 mvdx8, [r0, #CRUNCH_MVDX8]
|
||||||
|
cfldr64 mvdx9, [r0, #CRUNCH_MVDX9]
|
||||||
|
cfldr64 mvdx10, [r0, #CRUNCH_MVDX10]
|
||||||
|
cfldr64 mvdx11, [r0, #CRUNCH_MVDX11]
|
||||||
|
cfldr64 mvdx12, [r0, #CRUNCH_MVDX12]
|
||||||
|
cfldr64 mvdx13, [r0, #CRUNCH_MVDX13]
|
||||||
|
cfldr64 mvdx14, [r0, #CRUNCH_MVDX14]
|
||||||
|
cfldr64 mvdx15, [r0, #CRUNCH_MVDX15]
|
||||||
|
|
||||||
|
mov pc, lr
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Back up crunch regs to save area and disable access to them
|
||||||
|
* (mainly for gdb or sleep mode usage)
|
||||||
|
*
|
||||||
|
* r0 = struct thread_info pointer of target task or NULL for any
|
||||||
|
*/
|
||||||
|
ENTRY(crunch_task_disable)
|
||||||
|
stmfd sp!, {r4, r5, lr}
|
||||||
|
|
||||||
|
mrs ip, cpsr
|
||||||
|
orr r2, ip, #PSR_I_BIT @ disable interrupts
|
||||||
|
msr cpsr_c, r2
|
||||||
|
|
||||||
|
ldr r4, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr
|
||||||
|
|
||||||
|
ldr r3, =crunch_owner
|
||||||
|
add r2, r0, #TI_CRUNCH_STATE @ get task crunch save area
|
||||||
|
ldr r1, [r3] @ get current crunch owner
|
||||||
|
teq r1, #0 @ any current owner?
|
||||||
|
beq 1f @ no: quit
|
||||||
|
teq r0, #0 @ any owner?
|
||||||
|
teqne r1, r2 @ or specified one?
|
||||||
|
bne 1f @ no: quit
|
||||||
|
|
||||||
|
ldr r5, [r4, #0x80] @ enable access to crunch
|
||||||
|
mov r2, #0xaa
|
||||||
|
str r2, [r4, #0xc0]
|
||||||
|
orr r5, r5, #0x00800000
|
||||||
|
str r5, [r4, #0x80]
|
||||||
|
|
||||||
|
mov r0, #0 @ nothing to load
|
||||||
|
str r0, [r3] @ no more current owner
|
||||||
|
ldr r2, [r4, #0x80] @ flush out enable (@@@)
|
||||||
|
mov r2, r2
|
||||||
|
bl crunch_save
|
||||||
|
|
||||||
|
mov r2, #0xaa @ disable access to crunch
|
||||||
|
str r2, [r4, #0xc0]
|
||||||
|
bic r5, r5, #0x00800000
|
||||||
|
str r5, [r4, #0x80]
|
||||||
|
ldr r5, [r4, #0x80] @ flush out enable (@@@)
|
||||||
|
mov r5, r5
|
||||||
|
|
||||||
|
1: msr cpsr_c, ip @ restore interrupt mode
|
||||||
|
ldmfd sp!, {r4, r5, pc}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy crunch state to given memory address
|
||||||
|
*
|
||||||
|
* r0 = struct thread_info pointer of target task
|
||||||
|
* r1 = memory address where to store crunch state
|
||||||
|
*
|
||||||
|
* this is called mainly in the creation of signal stack frames
|
||||||
|
*/
|
||||||
|
ENTRY(crunch_task_copy)
|
||||||
|
mrs ip, cpsr
|
||||||
|
orr r2, ip, #PSR_I_BIT @ disable interrupts
|
||||||
|
msr cpsr_c, r2
|
||||||
|
|
||||||
|
ldr r3, =crunch_owner
|
||||||
|
add r2, r0, #TI_CRUNCH_STATE @ get task crunch save area
|
||||||
|
ldr r3, [r3] @ get current crunch owner
|
||||||
|
teq r2, r3 @ does this task own it...
|
||||||
|
beq 1f
|
||||||
|
|
||||||
|
@ current crunch values are in the task save area
|
||||||
|
msr cpsr_c, ip @ restore interrupt mode
|
||||||
|
mov r0, r1
|
||||||
|
mov r1, r2
|
||||||
|
mov r2, #CRUNCH_SIZE
|
||||||
|
b memcpy
|
||||||
|
|
||||||
|
1: @ this task owns crunch regs -- grab a copy from there
|
||||||
|
mov r0, #0 @ nothing to load
|
||||||
|
mov r3, lr @ preserve return address
|
||||||
|
bl crunch_save
|
||||||
|
msr cpsr_c, ip @ restore interrupt mode
|
||||||
|
mov pc, r3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Restore crunch state from given memory address
|
||||||
|
*
|
||||||
|
* r0 = struct thread_info pointer of target task
|
||||||
|
* r1 = memory address where to get crunch state from
|
||||||
|
*
|
||||||
|
* this is used to restore crunch state when unwinding a signal stack frame
|
||||||
|
*/
|
||||||
|
ENTRY(crunch_task_restore)
|
||||||
|
mrs ip, cpsr
|
||||||
|
orr r2, ip, #PSR_I_BIT @ disable interrupts
|
||||||
|
msr cpsr_c, r2
|
||||||
|
|
||||||
|
ldr r3, =crunch_owner
|
||||||
|
add r2, r0, #TI_CRUNCH_STATE @ get task crunch save area
|
||||||
|
ldr r3, [r3] @ get current crunch owner
|
||||||
|
teq r2, r3 @ does this task own it...
|
||||||
|
beq 1f
|
||||||
|
|
||||||
|
@ this task doesn't own crunch regs -- use its save area
|
||||||
|
msr cpsr_c, ip @ restore interrupt mode
|
||||||
|
mov r0, r2
|
||||||
|
mov r2, #CRUNCH_SIZE
|
||||||
|
b memcpy
|
||||||
|
|
||||||
|
1: @ this task owns crunch regs -- load them directly
|
||||||
|
mov r0, r1
|
||||||
|
mov r1, #0 @ nothing to save
|
||||||
|
mov r3, lr @ preserve return address
|
||||||
|
bl crunch_load
|
||||||
|
msr cpsr_c, ip @ restore interrupt mode
|
||||||
|
mov pc, r3
|
83
arch/arm/kernel/crunch.c
Normal file
83
arch/arm/kernel/crunch.c
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* arch/arm/kernel/crunch.c
|
||||||
|
* Cirrus MaverickCrunch context switching and handling
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
|
*
|
||||||
|
* 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/config.h>
|
||||||
|
#include <linux/types.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/signal.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <asm/arch/ep93xx-regs.h>
|
||||||
|
#include <asm/thread_notify.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
struct crunch_state *crunch_owner;
|
||||||
|
|
||||||
|
void crunch_task_release(struct thread_info *thread)
|
||||||
|
{
|
||||||
|
local_irq_disable();
|
||||||
|
if (crunch_owner == &thread->crunchstate)
|
||||||
|
crunch_owner = NULL;
|
||||||
|
local_irq_enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int crunch_enabled(u32 devcfg)
|
||||||
|
{
|
||||||
|
return !!(devcfg & EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t)
|
||||||
|
{
|
||||||
|
struct thread_info *thread = (struct thread_info *)t;
|
||||||
|
struct crunch_state *crunch_state;
|
||||||
|
u32 devcfg;
|
||||||
|
|
||||||
|
crunch_state = &thread->crunchstate;
|
||||||
|
|
||||||
|
switch (cmd) {
|
||||||
|
case THREAD_NOTIFY_FLUSH:
|
||||||
|
memset(crunch_state, 0, sizeof(*crunch_state));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FALLTHROUGH: Ensure we don't try to overwrite our newly
|
||||||
|
* initialised state information on the first fault.
|
||||||
|
*/
|
||||||
|
|
||||||
|
case THREAD_NOTIFY_RELEASE:
|
||||||
|
crunch_task_release(thread);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case THREAD_NOTIFY_SWITCH:
|
||||||
|
devcfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
|
||||||
|
if (crunch_enabled(devcfg) || crunch_owner == crunch_state) {
|
||||||
|
devcfg ^= EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE;
|
||||||
|
__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
|
||||||
|
__raw_writel(devcfg, EP93XX_SYSCON_DEVICE_CONFIG);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NOTIFY_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct notifier_block crunch_notifier_block = {
|
||||||
|
.notifier_call = crunch_do,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init crunch_init(void)
|
||||||
|
{
|
||||||
|
thread_register_notifier(&crunch_notifier_block);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
late_initcall(crunch_init);
|
@ -492,9 +492,15 @@ call_fpe:
|
|||||||
b do_fpe @ CP#1 (FPE)
|
b do_fpe @ CP#1 (FPE)
|
||||||
b do_fpe @ CP#2 (FPE)
|
b do_fpe @ CP#2 (FPE)
|
||||||
mov pc, lr @ CP#3
|
mov pc, lr @ CP#3
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
b crunch_task_enable @ CP#4 (MaverickCrunch)
|
||||||
|
b crunch_task_enable @ CP#5 (MaverickCrunch)
|
||||||
|
b crunch_task_enable @ CP#6 (MaverickCrunch)
|
||||||
|
#else
|
||||||
mov pc, lr @ CP#4
|
mov pc, lr @ CP#4
|
||||||
mov pc, lr @ CP#5
|
mov pc, lr @ CP#5
|
||||||
mov pc, lr @ CP#6
|
mov pc, lr @ CP#6
|
||||||
|
#endif
|
||||||
mov pc, lr @ CP#7
|
mov pc, lr @ CP#7
|
||||||
mov pc, lr @ CP#8
|
mov pc, lr @ CP#8
|
||||||
mov pc, lr @ CP#9
|
mov pc, lr @ CP#9
|
||||||
|
@ -634,6 +634,32 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
/*
|
||||||
|
* Get the child Crunch state.
|
||||||
|
*/
|
||||||
|
static int ptrace_getcrunchregs(struct task_struct *tsk, void __user *ufp)
|
||||||
|
{
|
||||||
|
struct thread_info *thread = task_thread_info(tsk);
|
||||||
|
|
||||||
|
crunch_task_disable(thread); /* force it to ram */
|
||||||
|
return copy_to_user(ufp, &thread->crunchstate, CRUNCH_SIZE)
|
||||||
|
? -EFAULT : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the child Crunch state.
|
||||||
|
*/
|
||||||
|
static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp)
|
||||||
|
{
|
||||||
|
struct thread_info *thread = task_thread_info(tsk);
|
||||||
|
|
||||||
|
crunch_task_release(thread); /* force a reload */
|
||||||
|
return copy_from_user(&thread->crunchstate, ufp, CRUNCH_SIZE)
|
||||||
|
? -EFAULT : 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||||
{
|
{
|
||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
@ -765,6 +791,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
child->ptrace_message = data;
|
child->ptrace_message = data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
case PTRACE_GETCRUNCHREGS:
|
||||||
|
ret = ptrace_getcrunchregs(child, (void __user *)data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PTRACE_SETCRUNCHREGS:
|
||||||
|
ret = ptrace_setcrunchregs(child, (void __user *)data);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = ptrace_request(child, request, addr, data);
|
ret = ptrace_request(child, request, addr, data);
|
||||||
break;
|
break;
|
||||||
|
@ -132,6 +132,37 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
static int preserve_crunch_context(struct crunch_sigframe *frame)
|
||||||
|
{
|
||||||
|
char kbuf[sizeof(*frame) + 8];
|
||||||
|
struct crunch_sigframe *kframe;
|
||||||
|
|
||||||
|
/* the crunch context must be 64 bit aligned */
|
||||||
|
kframe = (struct crunch_sigframe *)((unsigned long)(kbuf + 8) & ~7);
|
||||||
|
kframe->magic = CRUNCH_MAGIC;
|
||||||
|
kframe->size = CRUNCH_STORAGE_SIZE;
|
||||||
|
crunch_task_copy(current_thread_info(), &kframe->storage);
|
||||||
|
return __copy_to_user(frame, kframe, sizeof(*frame));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int restore_crunch_context(struct crunch_sigframe *frame)
|
||||||
|
{
|
||||||
|
char kbuf[sizeof(*frame) + 8];
|
||||||
|
struct crunch_sigframe *kframe;
|
||||||
|
|
||||||
|
/* the crunch context must be 64 bit aligned */
|
||||||
|
kframe = (struct crunch_sigframe *)((unsigned long)(kbuf + 8) & ~7);
|
||||||
|
if (__copy_from_user(kframe, frame, sizeof(*frame)))
|
||||||
|
return -1;
|
||||||
|
if (kframe->magic != CRUNCH_MAGIC ||
|
||||||
|
kframe->size != CRUNCH_STORAGE_SIZE)
|
||||||
|
return -1;
|
||||||
|
crunch_task_restore(current_thread_info(), &kframe->storage);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_IWMMXT
|
#ifdef CONFIG_IWMMXT
|
||||||
|
|
||||||
static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame)
|
static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame)
|
||||||
@ -214,6 +245,10 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
|
|||||||
err |= !valid_user_regs(regs);
|
err |= !valid_user_regs(regs);
|
||||||
|
|
||||||
aux = (struct aux_sigframe __user *) sf->uc.uc_regspace;
|
aux = (struct aux_sigframe __user *) sf->uc.uc_regspace;
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
if (err == 0)
|
||||||
|
err |= restore_crunch_context(&aux->crunch);
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_IWMMXT
|
#ifdef CONFIG_IWMMXT
|
||||||
if (err == 0 && test_thread_flag(TIF_USING_IWMMXT))
|
if (err == 0 && test_thread_flag(TIF_USING_IWMMXT))
|
||||||
err |= restore_iwmmxt_context(&aux->iwmmxt);
|
err |= restore_iwmmxt_context(&aux->iwmmxt);
|
||||||
@ -333,6 +368,10 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set)
|
|||||||
err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(*set));
|
err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(*set));
|
||||||
|
|
||||||
aux = (struct aux_sigframe __user *) sf->uc.uc_regspace;
|
aux = (struct aux_sigframe __user *) sf->uc.uc_regspace;
|
||||||
|
#ifdef CONFIG_CRUNCH
|
||||||
|
if (err == 0)
|
||||||
|
err |= preserve_crunch_context(&aux->crunch);
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_IWMMXT
|
#ifdef CONFIG_IWMMXT
|
||||||
if (err == 0 && test_thread_flag(TIF_USING_IWMMXT))
|
if (err == 0 && test_thread_flag(TIF_USING_IWMMXT))
|
||||||
err |= preserve_iwmmxt_context(&aux->iwmmxt);
|
err |= preserve_iwmmxt_context(&aux->iwmmxt);
|
||||||
|
@ -80,6 +80,10 @@ SECTIONS
|
|||||||
*(.exit.text)
|
*(.exit.text)
|
||||||
*(.exit.data)
|
*(.exit.data)
|
||||||
*(.exitcall.exit)
|
*(.exitcall.exit)
|
||||||
|
#ifndef CONFIG_MMU
|
||||||
|
*(.fixup)
|
||||||
|
*(__ex_table)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
.text : { /* Real text segment */
|
.text : { /* Real text segment */
|
||||||
@ -87,7 +91,9 @@ SECTIONS
|
|||||||
*(.text)
|
*(.text)
|
||||||
SCHED_TEXT
|
SCHED_TEXT
|
||||||
LOCK_TEXT
|
LOCK_TEXT
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
|
#endif
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
*(.rodata.*)
|
*(.rodata.*)
|
||||||
@ -142,7 +148,9 @@ SECTIONS
|
|||||||
*/
|
*/
|
||||||
. = ALIGN(32);
|
. = ALIGN(32);
|
||||||
__start___ex_table = .;
|
__start___ex_table = .;
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
*(__ex_table)
|
*(__ex_table)
|
||||||
|
#endif
|
||||||
__stop___ex_table = .;
|
__stop___ex_table = .;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -6,28 +6,31 @@
|
|||||||
|
|
||||||
lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
|
lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
|
||||||
csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
|
csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
|
||||||
copy_page.o delay.o findbit.o memchr.o memcpy.o \
|
delay.o findbit.o memchr.o memcpy.o \
|
||||||
memmove.o memset.o memzero.o setbit.o \
|
memmove.o memset.o memzero.o setbit.o \
|
||||||
strncpy_from_user.o strnlen_user.o \
|
strncpy_from_user.o strnlen_user.o \
|
||||||
strchr.o strrchr.o \
|
strchr.o strrchr.o \
|
||||||
testchangebit.o testclearbit.o testsetbit.o \
|
testchangebit.o testclearbit.o testsetbit.o \
|
||||||
getuser.o putuser.o clear_user.o \
|
|
||||||
ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
|
ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
|
||||||
ucmpdi2.o lib1funcs.o div64.o sha1.o \
|
ucmpdi2.o lib1funcs.o div64.o sha1.o \
|
||||||
io-readsb.o io-writesb.o io-readsl.o io-writesl.o
|
io-readsb.o io-writesb.o io-readsl.o io-writesl.o
|
||||||
|
|
||||||
|
mmu-y := clear_user.o copy_page.o getuser.o putuser.o
|
||||||
|
|
||||||
# the code in uaccess.S is not preemption safe and
|
# the code in uaccess.S is not preemption safe and
|
||||||
# probably faster on ARMv3 only
|
# probably faster on ARMv3 only
|
||||||
ifeq ($(CONFIG_PREEMPT),y)
|
ifeq ($(CONFIG_PREEMPT),y)
|
||||||
lib-y += copy_from_user.o copy_to_user.o
|
mmu-y += copy_from_user.o copy_to_user.o
|
||||||
else
|
else
|
||||||
ifneq ($(CONFIG_CPU_32v3),y)
|
ifneq ($(CONFIG_CPU_32v3),y)
|
||||||
lib-y += copy_from_user.o copy_to_user.o
|
mmu-y += copy_from_user.o copy_to_user.o
|
||||||
else
|
else
|
||||||
lib-y += uaccess.o
|
mmu-y += uaccess.o
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
lib-$(CONFIG_MMU) += $(mmu-y)
|
||||||
|
|
||||||
ifeq ($(CONFIG_CPU_32v3),y)
|
ifeq ($(CONFIG_CPU_32v3),y)
|
||||||
lib-y += io-readsw-armv3.o io-writesw-armv3.o
|
lib-y += io-readsw-armv3.o io-writesw-armv3.o
|
||||||
else
|
else
|
||||||
|
@ -97,16 +97,13 @@ ENTRY(c_backtrace)
|
|||||||
b 1007f
|
b 1007f
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fixup for LDMDB
|
* Fixup for LDMDB. Note that this must not be in the fixup section.
|
||||||
*/
|
*/
|
||||||
.section .fixup,"ax"
|
|
||||||
.align 0
|
|
||||||
1007: ldr r0, =.Lbad
|
1007: ldr r0, =.Lbad
|
||||||
mov r1, frame
|
mov r1, frame
|
||||||
bl printk
|
bl printk
|
||||||
ldmfd sp!, {r4 - r8, pc}
|
ldmfd sp!, {r4 - r8, pc}
|
||||||
.ltorg
|
.ltorg
|
||||||
.previous
|
|
||||||
|
|
||||||
.section __ex_table,"a"
|
.section __ex_table,"a"
|
||||||
.align 3
|
.align 3
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
/* Prototype: int __arch_clear_user(void *addr, size_t sz)
|
/* Prototype: int __clear_user(void *addr, size_t sz)
|
||||||
* Purpose : clear some user memory
|
* Purpose : clear some user memory
|
||||||
* Params : addr - user memory address to clear
|
* Params : addr - user memory address to clear
|
||||||
* : sz - number of bytes to clear
|
* : sz - number of bytes to clear
|
||||||
* Returns : number of bytes NOT cleared
|
* Returns : number of bytes NOT cleared
|
||||||
*/
|
*/
|
||||||
ENTRY(__arch_clear_user)
|
ENTRY(__clear_user)
|
||||||
stmfd sp!, {r1, lr}
|
stmfd sp!, {r1, lr}
|
||||||
mov r2, #0
|
mov r2, #0
|
||||||
cmp r1, #4
|
cmp r1, #4
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
/*
|
/*
|
||||||
* Prototype:
|
* Prototype:
|
||||||
*
|
*
|
||||||
* size_t __arch_copy_from_user(void *to, const void *from, size_t n)
|
* size_t __copy_from_user(void *to, const void *from, size_t n)
|
||||||
*
|
*
|
||||||
* Purpose:
|
* Purpose:
|
||||||
*
|
*
|
||||||
@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
ENTRY(__arch_copy_from_user)
|
ENTRY(__copy_from_user)
|
||||||
|
|
||||||
#include "copy_template.S"
|
#include "copy_template.S"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
/*
|
/*
|
||||||
* Prototype:
|
* Prototype:
|
||||||
*
|
*
|
||||||
* size_t __arch_copy_to_user(void *to, const void *from, size_t n)
|
* size_t __copy_to_user(void *to, const void *from, size_t n)
|
||||||
*
|
*
|
||||||
* Purpose:
|
* Purpose:
|
||||||
*
|
*
|
||||||
@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
ENTRY(__arch_copy_to_user)
|
ENTRY(__copy_to_user)
|
||||||
|
|
||||||
#include "copy_template.S"
|
#include "copy_template.S"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* returns the number of characters copied (strlen of copied string),
|
* returns the number of characters copied (strlen of copied string),
|
||||||
* -EFAULT on exception, or "len" if we fill the whole buffer
|
* -EFAULT on exception, or "len" if we fill the whole buffer
|
||||||
*/
|
*/
|
||||||
ENTRY(__arch_strncpy_from_user)
|
ENTRY(__strncpy_from_user)
|
||||||
mov ip, r1
|
mov ip, r1
|
||||||
1: subs r2, r2, #1
|
1: subs r2, r2, #1
|
||||||
USER( ldrplbt r3, [r1], #1)
|
USER( ldrplbt r3, [r1], #1)
|
||||||
|
@ -14,13 +14,13 @@
|
|||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
|
|
||||||
/* Prototype: unsigned long __arch_strnlen_user(const char *str, long n)
|
/* Prototype: unsigned long __strnlen_user(const char *str, long n)
|
||||||
* Purpose : get length of a string in user memory
|
* Purpose : get length of a string in user memory
|
||||||
* Params : str - address of string in user memory
|
* Params : str - address of string in user memory
|
||||||
* Returns : length of string *including terminator*
|
* Returns : length of string *including terminator*
|
||||||
* or zero on exception, or n + 1 if too long
|
* or zero on exception, or n + 1 if too long
|
||||||
*/
|
*/
|
||||||
ENTRY(__arch_strnlen_user)
|
ENTRY(__strnlen_user)
|
||||||
mov r2, r0
|
mov r2, r0
|
||||||
1:
|
1:
|
||||||
USER( ldrbt r3, [r0], #1)
|
USER( ldrbt r3, [r0], #1)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#define PAGE_SHIFT 12
|
#define PAGE_SHIFT 12
|
||||||
|
|
||||||
/* Prototype: int __arch_copy_to_user(void *to, const char *from, size_t n)
|
/* Prototype: int __copy_to_user(void *to, const char *from, size_t n)
|
||||||
* Purpose : copy a block to user memory from kernel memory
|
* Purpose : copy a block to user memory from kernel memory
|
||||||
* Params : to - user memory
|
* Params : to - user memory
|
||||||
* : from - kernel memory
|
* : from - kernel memory
|
||||||
@ -39,7 +39,7 @@ USER( strgtbt r3, [r0], #1) @ May fault
|
|||||||
sub r2, r2, ip
|
sub r2, r2, ip
|
||||||
b .Lc2u_dest_aligned
|
b .Lc2u_dest_aligned
|
||||||
|
|
||||||
ENTRY(__arch_copy_to_user)
|
ENTRY(__copy_to_user)
|
||||||
stmfd sp!, {r2, r4 - r7, lr}
|
stmfd sp!, {r2, r4 - r7, lr}
|
||||||
cmp r2, #4
|
cmp r2, #4
|
||||||
blt .Lc2u_not_enough
|
blt .Lc2u_not_enough
|
||||||
@ -283,7 +283,7 @@ USER( strgtbt r3, [r0], #1) @ May fault
|
|||||||
9001: ldmfd sp!, {r0, r4 - r7, pc}
|
9001: ldmfd sp!, {r0, r4 - r7, pc}
|
||||||
.previous
|
.previous
|
||||||
|
|
||||||
/* Prototype: unsigned long __arch_copy_from_user(void *to,const void *from,unsigned long n);
|
/* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n);
|
||||||
* Purpose : copy a block from user memory to kernel memory
|
* Purpose : copy a block from user memory to kernel memory
|
||||||
* Params : to - kernel memory
|
* Params : to - kernel memory
|
||||||
* : from - user memory
|
* : from - user memory
|
||||||
@ -302,7 +302,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault
|
|||||||
sub r2, r2, ip
|
sub r2, r2, ip
|
||||||
b .Lcfu_dest_aligned
|
b .Lcfu_dest_aligned
|
||||||
|
|
||||||
ENTRY(__arch_copy_from_user)
|
ENTRY(__copy_from_user)
|
||||||
stmfd sp!, {r0, r2, r4 - r7, lr}
|
stmfd sp!, {r0, r2, r4 - r7, lr}
|
||||||
cmp r2, #4
|
cmp r2, #4
|
||||||
blt .Lcfu_not_enough
|
blt .Lcfu_not_enough
|
||||||
|
@ -2,8 +2,19 @@ if ARCH_EP93XX
|
|||||||
|
|
||||||
menu "Cirrus EP93xx Implementation Options"
|
menu "Cirrus EP93xx Implementation Options"
|
||||||
|
|
||||||
|
config CRUNCH
|
||||||
|
bool "Support for MaverickCrunch"
|
||||||
|
help
|
||||||
|
Enable kernel support for MaverickCrunch.
|
||||||
|
|
||||||
comment "EP93xx Platforms"
|
comment "EP93xx Platforms"
|
||||||
|
|
||||||
|
config MACH_EDB9315
|
||||||
|
bool "Support Cirrus Logic EDB9315"
|
||||||
|
help
|
||||||
|
Say 'Y' here if you want your kernel to support the Cirrus
|
||||||
|
Logic EDB9315 Evaluation Board.
|
||||||
|
|
||||||
config MACH_GESBC9312
|
config MACH_GESBC9312
|
||||||
bool "Support Glomation GESBC-9312-sx"
|
bool "Support Glomation GESBC-9312-sx"
|
||||||
help
|
help
|
||||||
|
@ -6,5 +6,6 @@ obj-m :=
|
|||||||
obj-n :=
|
obj-n :=
|
||||||
obj- :=
|
obj- :=
|
||||||
|
|
||||||
|
obj-$(CONFIG_MACH_EDB9315) += edb9315.o
|
||||||
obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
|
obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
|
||||||
obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
|
obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
|
||||||
|
62
arch/arm/mach-ep93xx/edb9315.c
Normal file
62
arch/arm/mach-ep93xx/edb9315.c
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* arch/arm/mach-ep93xx/edb9315.c
|
||||||
|
* Cirrus Logic EDB9315 support.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/config.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/ioport.h>
|
||||||
|
#include <linux/mtd/physmap.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
#include <asm/hardware.h>
|
||||||
|
#include <asm/mach-types.h>
|
||||||
|
#include <asm/mach/arch.h>
|
||||||
|
|
||||||
|
static struct physmap_flash_data edb9315_flash_data = {
|
||||||
|
.width = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource edb9315_flash_resource = {
|
||||||
|
.start = 0x60000000,
|
||||||
|
.end = 0x61ffffff,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device edb9315_flash = {
|
||||||
|
.name = "physmap-flash",
|
||||||
|
.id = 0,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &edb9315_flash_data,
|
||||||
|
},
|
||||||
|
.num_resources = 1,
|
||||||
|
.resource = &edb9315_flash_resource,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init edb9315_init_machine(void)
|
||||||
|
{
|
||||||
|
ep93xx_init_devices();
|
||||||
|
platform_device_register(&edb9315_flash);
|
||||||
|
}
|
||||||
|
|
||||||
|
MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
|
||||||
|
/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
|
||||||
|
.phys_io = EP93XX_APB_PHYS_BASE,
|
||||||
|
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
|
||||||
|
.boot_params = 0x00000100,
|
||||||
|
.map_io = ep93xx_map_io,
|
||||||
|
.init_irq = ep93xx_init_irq,
|
||||||
|
.timer = &ep93xx_timer,
|
||||||
|
.init_machine = edb9315_init_machine,
|
||||||
|
MACHINE_END
|
@ -30,7 +30,7 @@ static struct physmap_flash_data gesbc9312_flash_data = {
|
|||||||
|
|
||||||
static struct resource gesbc9312_flash_resource = {
|
static struct resource gesbc9312_flash_resource = {
|
||||||
.start = 0x60000000,
|
.start = 0x60000000,
|
||||||
.end = 0x60800000,
|
.end = 0x607fffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ static struct physmap_flash_data ts72xx_flash_data = {
|
|||||||
|
|
||||||
static struct resource ts72xx_flash_resource = {
|
static struct resource ts72xx_flash_resource = {
|
||||||
.start = TS72XX_NOR_PHYS_BASE,
|
.start = TS72XX_NOR_PHYS_BASE,
|
||||||
.end = TS72XX_NOR_PHYS_BASE + 0x01000000,
|
.end = TS72XX_NOR_PHYS_BASE + 0x00ffffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ static struct physmap_flash_data espresso_flash_data = {
|
|||||||
|
|
||||||
static struct resource espresso_flash_resource = {
|
static struct resource espresso_flash_resource = {
|
||||||
.start = 0x90000000,
|
.start = 0x90000000,
|
||||||
.end = 0x92000000,
|
.end = 0x91ffffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ static struct physmap_flash_data ixdp2351_flash_data = {
|
|||||||
|
|
||||||
static struct resource ixdp2351_flash_resource = {
|
static struct resource ixdp2351_flash_resource = {
|
||||||
.start = 0x90000000,
|
.start = 0x90000000,
|
||||||
.end = 0x94000000,
|
.end = 0x93ffffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ static struct physmap_flash_data roadrunner_flash_data = {
|
|||||||
|
|
||||||
static struct resource roadrunner_flash_resource = {
|
static struct resource roadrunner_flash_resource = {
|
||||||
.start = 0x90000000,
|
.start = 0x90000000,
|
||||||
.end = 0x94000000,
|
.end = 0x93ffffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,8 +88,8 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type)
|
|||||||
|
|
||||||
if (type == IRQT_PROBE) {
|
if (type == IRQT_PROBE) {
|
||||||
/* Don't mess with enabled GPIOs using preconfigured edges or
|
/* Don't mess with enabled GPIOs using preconfigured edges or
|
||||||
GPIOs set to alternate function during probe */
|
GPIOs set to alternate function or to output during probe */
|
||||||
if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx]) &
|
if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx] | GPDR(gpio)) &
|
||||||
GPIO_bit(gpio))
|
GPIO_bit(gpio))
|
||||||
return 0;
|
return 0;
|
||||||
if (GAFR(gpio) & (0x3 << (((gpio) & 0xf)*2)))
|
if (GAFR(gpio) & (0x3 << (((gpio) & 0xf)*2)))
|
||||||
|
@ -69,6 +69,7 @@ void __init s3c244x_map_io(struct map_desc *mach_desc, int size)
|
|||||||
|
|
||||||
s3c_device_i2c.name = "s3c2440-i2c";
|
s3c_device_i2c.name = "s3c2440-i2c";
|
||||||
s3c_device_nand.name = "s3c2440-nand";
|
s3c_device_nand.name = "s3c2440-nand";
|
||||||
|
s3c_device_usbgadget.name = "s3c2440-usbgadget";
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init s3c244x_init_clocks(int xtal)
|
void __init s3c244x_init_clocks(int xtal)
|
||||||
|
@ -15,8 +15,8 @@ config CPU_ARM610
|
|||||||
select CPU_32v3
|
select CPU_32v3
|
||||||
select CPU_CACHE_V3
|
select CPU_CACHE_V3
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V3
|
select CPU_COPY_V3 if MMU
|
||||||
select CPU_TLB_V3
|
select CPU_TLB_V3 if MMU
|
||||||
help
|
help
|
||||||
The ARM610 is the successor to the ARM3 processor
|
The ARM610 is the successor to the ARM3 processor
|
||||||
and was produced by VLSI Technology Inc.
|
and was produced by VLSI Technology Inc.
|
||||||
@ -31,8 +31,8 @@ config CPU_ARM710
|
|||||||
select CPU_32v3
|
select CPU_32v3
|
||||||
select CPU_CACHE_V3
|
select CPU_CACHE_V3
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V3
|
select CPU_COPY_V3 if MMU
|
||||||
select CPU_TLB_V3
|
select CPU_TLB_V3 if MMU
|
||||||
help
|
help
|
||||||
A 32-bit RISC microprocessor based on the ARM7 processor core
|
A 32-bit RISC microprocessor based on the ARM7 processor core
|
||||||
designed by Advanced RISC Machines Ltd. The ARM710 is the
|
designed by Advanced RISC Machines Ltd. The ARM710 is the
|
||||||
@ -50,8 +50,8 @@ config CPU_ARM720T
|
|||||||
select CPU_ABRT_LV4T
|
select CPU_ABRT_LV4T
|
||||||
select CPU_CACHE_V4
|
select CPU_CACHE_V4
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WT
|
select CPU_COPY_V4WT if MMU
|
||||||
select CPU_TLB_V4WT
|
select CPU_TLB_V4WT if MMU
|
||||||
help
|
help
|
||||||
A 32-bit RISC processor with 8kByte Cache, Write Buffer and
|
A 32-bit RISC processor with 8kByte Cache, Write Buffer and
|
||||||
MMU built around an ARM7TDMI core.
|
MMU built around an ARM7TDMI core.
|
||||||
@ -68,8 +68,8 @@ config CPU_ARM920T
|
|||||||
select CPU_ABRT_EV4T
|
select CPU_ABRT_EV4T
|
||||||
select CPU_CACHE_V4WT
|
select CPU_CACHE_V4WT
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
The ARM920T is licensed to be produced by numerous vendors,
|
The ARM920T is licensed to be produced by numerous vendors,
|
||||||
and is used in the Maverick EP9312 and the Samsung S3C2410.
|
and is used in the Maverick EP9312 and the Samsung S3C2410.
|
||||||
@ -89,8 +89,8 @@ config CPU_ARM922T
|
|||||||
select CPU_ABRT_EV4T
|
select CPU_ABRT_EV4T
|
||||||
select CPU_CACHE_V4WT
|
select CPU_CACHE_V4WT
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
The ARM922T is a version of the ARM920T, but with smaller
|
The ARM922T is a version of the ARM920T, but with smaller
|
||||||
instruction and data caches. It is used in Altera's
|
instruction and data caches. It is used in Altera's
|
||||||
@ -108,8 +108,8 @@ config CPU_ARM925T
|
|||||||
select CPU_ABRT_EV4T
|
select CPU_ABRT_EV4T
|
||||||
select CPU_CACHE_V4WT
|
select CPU_CACHE_V4WT
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
The ARM925T is a mix between the ARM920T and ARM926T, but with
|
The ARM925T is a mix between the ARM920T and ARM926T, but with
|
||||||
different instruction and data caches. It is used in TI's OMAP
|
different instruction and data caches. It is used in TI's OMAP
|
||||||
@ -126,8 +126,8 @@ config CPU_ARM926T
|
|||||||
select CPU_32v5
|
select CPU_32v5
|
||||||
select CPU_ABRT_EV5TJ
|
select CPU_ABRT_EV5TJ
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
This is a variant of the ARM920. It has slightly different
|
This is a variant of the ARM920. It has slightly different
|
||||||
instruction sequences for cache and TLB operations. Curiously,
|
instruction sequences for cache and TLB operations. Curiously,
|
||||||
@ -144,8 +144,8 @@ config CPU_ARM1020
|
|||||||
select CPU_ABRT_EV4T
|
select CPU_ABRT_EV4T
|
||||||
select CPU_CACHE_V4WT
|
select CPU_CACHE_V4WT
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
The ARM1020 is the 32K cached version of the ARM10 processor,
|
The ARM1020 is the 32K cached version of the ARM10 processor,
|
||||||
with an addition of a floating-point unit.
|
with an addition of a floating-point unit.
|
||||||
@ -161,8 +161,8 @@ config CPU_ARM1020E
|
|||||||
select CPU_ABRT_EV4T
|
select CPU_ABRT_EV4T
|
||||||
select CPU_CACHE_V4WT
|
select CPU_CACHE_V4WT
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
depends on n
|
depends on n
|
||||||
|
|
||||||
# ARM1022E
|
# ARM1022E
|
||||||
@ -172,8 +172,8 @@ config CPU_ARM1022
|
|||||||
select CPU_32v5
|
select CPU_32v5
|
||||||
select CPU_ABRT_EV4T
|
select CPU_ABRT_EV4T
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB # can probably do better
|
select CPU_COPY_V4WB if MMU # can probably do better
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
The ARM1022E is an implementation of the ARMv5TE architecture
|
The ARM1022E is an implementation of the ARMv5TE architecture
|
||||||
based upon the ARM10 integer core with a 16KiB L1 Harvard cache,
|
based upon the ARM10 integer core with a 16KiB L1 Harvard cache,
|
||||||
@ -189,8 +189,8 @@ config CPU_ARM1026
|
|||||||
select CPU_32v5
|
select CPU_32v5
|
||||||
select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10
|
select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB # can probably do better
|
select CPU_COPY_V4WB if MMU # can probably do better
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
help
|
help
|
||||||
The ARM1026EJ-S is an implementation of the ARMv5TEJ architecture
|
The ARM1026EJ-S is an implementation of the ARMv5TEJ architecture
|
||||||
based upon the ARM10 integer core.
|
based upon the ARM10 integer core.
|
||||||
@ -207,8 +207,8 @@ config CPU_SA110
|
|||||||
select CPU_ABRT_EV4
|
select CPU_ABRT_EV4
|
||||||
select CPU_CACHE_V4WB
|
select CPU_CACHE_V4WB
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_COPY_V4WB
|
select CPU_COPY_V4WB if MMU
|
||||||
select CPU_TLB_V4WB
|
select CPU_TLB_V4WB if MMU
|
||||||
help
|
help
|
||||||
The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
|
The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
|
||||||
is available at five speeds ranging from 100 MHz to 233 MHz.
|
is available at five speeds ranging from 100 MHz to 233 MHz.
|
||||||
@ -227,7 +227,7 @@ config CPU_SA1100
|
|||||||
select CPU_ABRT_EV4
|
select CPU_ABRT_EV4
|
||||||
select CPU_CACHE_V4WB
|
select CPU_CACHE_V4WB
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_TLB_V4WB
|
select CPU_TLB_V4WB if MMU
|
||||||
|
|
||||||
# XScale
|
# XScale
|
||||||
config CPU_XSCALE
|
config CPU_XSCALE
|
||||||
@ -237,7 +237,7 @@ config CPU_XSCALE
|
|||||||
select CPU_32v5
|
select CPU_32v5
|
||||||
select CPU_ABRT_EV5T
|
select CPU_ABRT_EV5T
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
|
|
||||||
# XScale Core Version 3
|
# XScale Core Version 3
|
||||||
config CPU_XSC3
|
config CPU_XSC3
|
||||||
@ -247,7 +247,7 @@ config CPU_XSC3
|
|||||||
select CPU_32v5
|
select CPU_32v5
|
||||||
select CPU_ABRT_EV5T
|
select CPU_ABRT_EV5T
|
||||||
select CPU_CACHE_VIVT
|
select CPU_CACHE_VIVT
|
||||||
select CPU_TLB_V4WBI
|
select CPU_TLB_V4WBI if MMU
|
||||||
select IO_36
|
select IO_36
|
||||||
|
|
||||||
# ARMv6
|
# ARMv6
|
||||||
@ -258,8 +258,8 @@ config CPU_V6
|
|||||||
select CPU_ABRT_EV6
|
select CPU_ABRT_EV6
|
||||||
select CPU_CACHE_V6
|
select CPU_CACHE_V6
|
||||||
select CPU_CACHE_VIPT
|
select CPU_CACHE_VIPT
|
||||||
select CPU_COPY_V6
|
select CPU_COPY_V6 if MMU
|
||||||
select CPU_TLB_V6
|
select CPU_TLB_V6 if MMU
|
||||||
|
|
||||||
# ARMv6k
|
# ARMv6k
|
||||||
config CPU_32v6K
|
config CPU_32v6K
|
||||||
@ -277,17 +277,17 @@ config CPU_32v6K
|
|||||||
# This defines the compiler instruction set which depends on the machine type.
|
# This defines the compiler instruction set which depends on the machine type.
|
||||||
config CPU_32v3
|
config CPU_32v3
|
||||||
bool
|
bool
|
||||||
select TLS_REG_EMUL if SMP
|
select TLS_REG_EMUL if SMP || !MMU
|
||||||
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
||||||
|
|
||||||
config CPU_32v4
|
config CPU_32v4
|
||||||
bool
|
bool
|
||||||
select TLS_REG_EMUL if SMP
|
select TLS_REG_EMUL if SMP || !MMU
|
||||||
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
||||||
|
|
||||||
config CPU_32v5
|
config CPU_32v5
|
||||||
bool
|
bool
|
||||||
select TLS_REG_EMUL if SMP
|
select TLS_REG_EMUL if SMP || !MMU
|
||||||
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
||||||
|
|
||||||
config CPU_32v6
|
config CPU_32v6
|
||||||
@ -334,6 +334,7 @@ config CPU_CACHE_VIVT
|
|||||||
config CPU_CACHE_VIPT
|
config CPU_CACHE_VIPT
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
if MMU
|
||||||
# The copy-page model
|
# The copy-page model
|
||||||
config CPU_COPY_V3
|
config CPU_COPY_V3
|
||||||
bool
|
bool
|
||||||
@ -372,6 +373,8 @@ config CPU_TLB_V4WBI
|
|||||||
config CPU_TLB_V6
|
config CPU_TLB_V6
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# CPU supports 36-bit I/O
|
# CPU supports 36-bit I/O
|
||||||
#
|
#
|
||||||
|
@ -2,10 +2,16 @@
|
|||||||
# Makefile for the linux arm-specific parts of the memory manager.
|
# Makefile for the linux arm-specific parts of the memory manager.
|
||||||
#
|
#
|
||||||
|
|
||||||
obj-y := consistent.o extable.o fault-armv.o \
|
obj-y := consistent.o extable.o fault.o init.o \
|
||||||
fault.o flush.o init.o ioremap.o mmap.o \
|
iomap.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_MMU) += fault-armv.o flush.o ioremap.o mmap.o \
|
||||||
mm-armv.o
|
mm-armv.o
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_MMU),y)
|
||||||
|
obj-y += nommu.o
|
||||||
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_MODULES) += proc-syms.o
|
obj-$(CONFIG_MODULES) += proc-syms.o
|
||||||
|
|
||||||
obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
|
obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
#include <asm/mach/map.h>
|
#include <asm/mach/map.h>
|
||||||
|
|
||||||
#define TABLE_SIZE (2 * PTRS_PER_PTE * sizeof(pte_t))
|
|
||||||
|
|
||||||
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
|
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
|
||||||
|
|
||||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
|
||||||
|
55
arch/arm/mm/iomap.c
Normal file
55
arch/arm/mm/iomap.c
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* linux/arch/arm/mm/iomap.c
|
||||||
|
*
|
||||||
|
* Map IO port and PCI memory spaces so that {read,write}[bwl] can
|
||||||
|
* be used to access this memory.
|
||||||
|
*/
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pci.h>
|
||||||
|
#include <linux/ioport.h>
|
||||||
|
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
#ifdef __io
|
||||||
|
void __iomem *ioport_map(unsigned long port, unsigned int nr)
|
||||||
|
{
|
||||||
|
return __io(port);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(ioport_map);
|
||||||
|
|
||||||
|
void ioport_unmap(void __iomem *addr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(ioport_unmap);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
|
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
|
||||||
|
{
|
||||||
|
unsigned long start = pci_resource_start(dev, bar);
|
||||||
|
unsigned long len = pci_resource_len(dev, bar);
|
||||||
|
unsigned long flags = pci_resource_flags(dev, bar);
|
||||||
|
|
||||||
|
if (!len || !start)
|
||||||
|
return NULL;
|
||||||
|
if (maxlen && len > maxlen)
|
||||||
|
len = maxlen;
|
||||||
|
if (flags & IORESOURCE_IO)
|
||||||
|
return ioport_map(start, len);
|
||||||
|
if (flags & IORESOURCE_MEM) {
|
||||||
|
if (flags & IORESOURCE_CACHEABLE)
|
||||||
|
return ioremap(start, len);
|
||||||
|
return ioremap_nocache(start, len);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(pci_iomap);
|
||||||
|
|
||||||
|
void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
|
||||||
|
{
|
||||||
|
if ((unsigned long)addr >= VMALLOC_START &&
|
||||||
|
(unsigned long)addr < VMALLOC_END)
|
||||||
|
iounmap(addr);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(pci_iounmap);
|
||||||
|
#endif
|
@ -176,50 +176,3 @@ void __iounmap(void __iomem *addr)
|
|||||||
vunmap((void *)(PAGE_MASK & (unsigned long)addr));
|
vunmap((void *)(PAGE_MASK & (unsigned long)addr));
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__iounmap);
|
EXPORT_SYMBOL(__iounmap);
|
||||||
|
|
||||||
#ifdef __io
|
|
||||||
void __iomem *ioport_map(unsigned long port, unsigned int nr)
|
|
||||||
{
|
|
||||||
return __io(port);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(ioport_map);
|
|
||||||
|
|
||||||
void ioport_unmap(void __iomem *addr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(ioport_unmap);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <linux/ioport.h>
|
|
||||||
|
|
||||||
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
|
|
||||||
{
|
|
||||||
unsigned long start = pci_resource_start(dev, bar);
|
|
||||||
unsigned long len = pci_resource_len(dev, bar);
|
|
||||||
unsigned long flags = pci_resource_flags(dev, bar);
|
|
||||||
|
|
||||||
if (!len || !start)
|
|
||||||
return NULL;
|
|
||||||
if (maxlen && len > maxlen)
|
|
||||||
len = maxlen;
|
|
||||||
if (flags & IORESOURCE_IO)
|
|
||||||
return ioport_map(start, len);
|
|
||||||
if (flags & IORESOURCE_MEM) {
|
|
||||||
if (flags & IORESOURCE_CACHEABLE)
|
|
||||||
return ioremap(start, len);
|
|
||||||
return ioremap_nocache(start, len);
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(pci_iomap);
|
|
||||||
|
|
||||||
void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
|
|
||||||
{
|
|
||||||
if ((unsigned long)addr >= VMALLOC_START &&
|
|
||||||
(unsigned long)addr < VMALLOC_END)
|
|
||||||
iounmap(addr);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(pci_iounmap);
|
|
||||||
#endif
|
|
||||||
|
39
arch/arm/mm/nommu.c
Normal file
39
arch/arm/mm/nommu.c
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* linux/arch/arm/mm/nommu.c
|
||||||
|
*
|
||||||
|
* ARM uCLinux supporting functions.
|
||||||
|
*/
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
#include <linux/pagemap.h>
|
||||||
|
|
||||||
|
#include <asm/cacheflush.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
|
||||||
|
void flush_dcache_page(struct page *page)
|
||||||
|
{
|
||||||
|
__cpuc_flush_dcache_page(page_address(page));
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(flush_dcache_page);
|
||||||
|
|
||||||
|
void __iomem *__ioremap_pfn(unsigned long pfn, unsigned long offset,
|
||||||
|
size_t size, unsigned long flags)
|
||||||
|
{
|
||||||
|
if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
|
||||||
|
return NULL;
|
||||||
|
return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(__ioremap_pfn);
|
||||||
|
|
||||||
|
void __iomem *__ioremap(unsigned long phys_addr, size_t size,
|
||||||
|
unsigned long flags)
|
||||||
|
{
|
||||||
|
return (void __iomem *)phys_addr;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(__ioremap);
|
||||||
|
|
||||||
|
void __iounmap(void __iomem *addr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(__iounmap);
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2000 ARM Limited
|
* Copyright (C) 2000 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -101,7 +102,9 @@ ENTRY(cpu_arm1020_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -359,6 +362,7 @@ ENTRY(cpu_arm1020_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1020_switch_mm)
|
ENTRY(cpu_arm1020_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
mcr p15, 0, r3, c7, c10, 4
|
mcr p15, 0, r3, c7, c10, 4
|
||||||
mov r1, #0xF @ 16 segments
|
mov r1, #0xF @ 16 segments
|
||||||
@ -383,6 +387,7 @@ ENTRY(cpu_arm1020_switch_mm)
|
|||||||
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -392,6 +397,7 @@ ENTRY(cpu_arm1020_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1020_set_pte)
|
ENTRY(cpu_arm1020_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -421,6 +427,7 @@ ENTRY(cpu_arm1020_set_pte)
|
|||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
#endif
|
#endif
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -430,7 +437,9 @@ __arm1020_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, arm1020_cr1_clear
|
ldr r5, arm1020_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2000 ARM Limited
|
* Copyright (C) 2000 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -101,7 +102,9 @@ ENTRY(cpu_arm1020e_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -344,6 +347,7 @@ ENTRY(cpu_arm1020e_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1020e_switch_mm)
|
ENTRY(cpu_arm1020e_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
mcr p15, 0, r3, c7, c10, 4
|
mcr p15, 0, r3, c7, c10, 4
|
||||||
mov r1, #0xF @ 16 segments
|
mov r1, #0xF @ 16 segments
|
||||||
@ -367,6 +371,7 @@ ENTRY(cpu_arm1020e_switch_mm)
|
|||||||
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -376,6 +381,7 @@ ENTRY(cpu_arm1020e_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1020e_set_pte)
|
ENTRY(cpu_arm1020e_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -403,6 +409,7 @@ ENTRY(cpu_arm1020e_set_pte)
|
|||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -412,7 +419,9 @@ __arm1020e_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, arm1020e_cr1_clear
|
ldr r5, arm1020e_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2000 ARM Limited
|
* Copyright (C) 2000 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -90,7 +91,9 @@ ENTRY(cpu_arm1022_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -333,6 +336,7 @@ ENTRY(cpu_arm1022_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1022_switch_mm)
|
ENTRY(cpu_arm1022_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
mov r1, #(CACHE_DSEGMENTS - 1) << 5 @ 16 segments
|
mov r1, #(CACHE_DSEGMENTS - 1) << 5 @ 16 segments
|
||||||
1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries
|
1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries
|
||||||
@ -349,6 +353,7 @@ ENTRY(cpu_arm1022_switch_mm)
|
|||||||
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -358,6 +363,7 @@ ENTRY(cpu_arm1022_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1022_set_pte)
|
ENTRY(cpu_arm1022_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -385,6 +391,7 @@ ENTRY(cpu_arm1022_set_pte)
|
|||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -394,7 +401,9 @@ __arm1022_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, arm1022_cr1_clear
|
ldr r5, arm1022_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2000 ARM Limited
|
* Copyright (C) 2000 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -90,7 +91,9 @@ ENTRY(cpu_arm1026_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -327,6 +330,7 @@ ENTRY(cpu_arm1026_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1026_switch_mm)
|
ENTRY(cpu_arm1026_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
1: mrc p15, 0, r15, c7, c14, 3 @ test, clean, invalidate
|
1: mrc p15, 0, r15, c7, c14, 3 @ test, clean, invalidate
|
||||||
@ -338,6 +342,7 @@ ENTRY(cpu_arm1026_switch_mm)
|
|||||||
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
mcr p15, 0, r1, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -347,6 +352,7 @@ ENTRY(cpu_arm1026_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm1026_set_pte)
|
ENTRY(cpu_arm1026_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -374,6 +380,7 @@ ENTRY(cpu_arm1026_set_pte)
|
|||||||
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
#ifndef CONFIG_CPU_DCACHE_DISABLE
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
|
|
||||||
@ -384,8 +391,10 @@ __arm1026_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
mcr p15, 0, r4, c2, c0 @ load page table pointer
|
mcr p15, 0, r4, c2, c0 @ load page table pointer
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
mov r0, #4 @ explicitly disable writeback
|
mov r0, #4 @ explicitly disable writeback
|
||||||
mcr p15, 7, r0, c15, c0, 0
|
mcr p15, 7, r0, c15, c0, 0
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* linux/arch/arm/mm/proc-arm6,7.S
|
* linux/arch/arm/mm/proc-arm6,7.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 1997-2000 Russell King
|
* Copyright (C) 1997-2000 Russell King
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
@ -199,10 +200,12 @@ ENTRY(cpu_arm7_do_idle)
|
|||||||
*/
|
*/
|
||||||
ENTRY(cpu_arm6_switch_mm)
|
ENTRY(cpu_arm6_switch_mm)
|
||||||
ENTRY(cpu_arm7_switch_mm)
|
ENTRY(cpu_arm7_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
mcr p15, 0, r1, c7, c0, 0 @ flush cache
|
mcr p15, 0, r1, c7, c0, 0 @ flush cache
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ update page table ptr
|
mcr p15, 0, r0, c2, c0, 0 @ update page table ptr
|
||||||
mcr p15, 0, r1, c5, c0, 0 @ flush TLBs
|
mcr p15, 0, r1, c5, c0, 0 @ flush TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -214,6 +217,7 @@ ENTRY(cpu_arm7_switch_mm)
|
|||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm6_set_pte)
|
ENTRY(cpu_arm6_set_pte)
|
||||||
ENTRY(cpu_arm7_set_pte)
|
ENTRY(cpu_arm7_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -232,6 +236,7 @@ ENTRY(cpu_arm7_set_pte)
|
|||||||
movne r2, #0
|
movne r2, #0
|
||||||
|
|
||||||
str r2, [r0] @ hardware version
|
str r2, [r0] @ hardware version
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -243,7 +248,9 @@ ENTRY(cpu_arm6_reset)
|
|||||||
ENTRY(cpu_arm7_reset)
|
ENTRY(cpu_arm7_reset)
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
mcr p15, 0, r1, c7, c0, 0 @ flush cache
|
mcr p15, 0, r1, c7, c0, 0 @ flush cache
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r1, c5, c0, 0 @ flush TLB
|
mcr p15, 0, r1, c5, c0, 0 @ flush TLB
|
||||||
|
#endif
|
||||||
mov r1, #0x30
|
mov r1, #0x30
|
||||||
mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc
|
mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc
|
||||||
mov pc, r0
|
mov pc, r0
|
||||||
@ -253,19 +260,27 @@ ENTRY(cpu_arm7_reset)
|
|||||||
.type __arm6_setup, #function
|
.type __arm6_setup, #function
|
||||||
__arm6_setup: mov r0, #0
|
__arm6_setup: mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c0 @ flush caches on v3
|
mcr p15, 0, r0, c7, c0 @ flush caches on v3
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c5, c0 @ flush TLBs on v3
|
mcr p15, 0, r0, c5, c0 @ flush TLBs on v3
|
||||||
mov r0, #0x3d @ . ..RS BLDP WCAM
|
mov r0, #0x3d @ . ..RS BLDP WCAM
|
||||||
orr r0, r0, #0x100 @ . ..01 0011 1101
|
orr r0, r0, #0x100 @ . ..01 0011 1101
|
||||||
|
#else
|
||||||
|
mov r0, #0x3c @ . ..RS BLDP WCA.
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
.size __arm6_setup, . - __arm6_setup
|
.size __arm6_setup, . - __arm6_setup
|
||||||
|
|
||||||
.type __arm7_setup, #function
|
.type __arm7_setup, #function
|
||||||
__arm7_setup: mov r0, #0
|
__arm7_setup: mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c0 @ flush caches on v3
|
mcr p15, 0, r0, c7, c0 @ flush caches on v3
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c5, c0 @ flush TLBs on v3
|
mcr p15, 0, r0, c5, c0 @ flush TLBs on v3
|
||||||
mcr p15, 0, r0, c3, c0 @ load domain access register
|
mcr p15, 0, r0, c3, c0 @ load domain access register
|
||||||
mov r0, #0x7d @ . ..RS BLDP WCAM
|
mov r0, #0x7d @ . ..RS BLDP WCAM
|
||||||
orr r0, r0, #0x100 @ . ..01 0111 1101
|
orr r0, r0, #0x100 @ . ..01 0111 1101
|
||||||
|
#else
|
||||||
|
mov r0, #0x7c @ . ..RS BLDP WCA.
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
.size __arm7_setup, . - __arm7_setup
|
.size __arm7_setup, . - __arm7_setup
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
|
* Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
|
||||||
* Rob Scott (rscott@mtrob.fdns.net)
|
* Rob Scott (rscott@mtrob.fdns.net)
|
||||||
* Copyright (C) 2000 ARM Limited, Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 ARM Limited, Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2004.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -29,6 +30,7 @@
|
|||||||
* out of 'proc-arm6,7.S' per RMK discussion
|
* out of 'proc-arm6,7.S' per RMK discussion
|
||||||
* 07-25-2000 SJH Added idle function.
|
* 07-25-2000 SJH Added idle function.
|
||||||
* 08-25-2000 DBS Updated for integration of ARM Ltd version.
|
* 08-25-2000 DBS Updated for integration of ARM Ltd version.
|
||||||
|
* 04-20-2004 HSC modified for non-paged memory management mode.
|
||||||
*/
|
*/
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@ -75,10 +77,12 @@ ENTRY(cpu_arm720_do_idle)
|
|||||||
* the new.
|
* the new.
|
||||||
*/
|
*/
|
||||||
ENTRY(cpu_arm720_switch_mm)
|
ENTRY(cpu_arm720_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
mcr p15, 0, r1, c7, c7, 0 @ invalidate cache
|
mcr p15, 0, r1, c7, c7, 0 @ invalidate cache
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ update page table ptr
|
mcr p15, 0, r0, c2, c0, 0 @ update page table ptr
|
||||||
mcr p15, 0, r1, c8, c7, 0 @ flush TLB (v4)
|
mcr p15, 0, r1, c8, c7, 0 @ flush TLB (v4)
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -89,6 +93,7 @@ ENTRY(cpu_arm720_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm720_set_pte)
|
ENTRY(cpu_arm720_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -107,6 +112,7 @@ ENTRY(cpu_arm720_set_pte)
|
|||||||
movne r2, #0
|
movne r2, #0
|
||||||
|
|
||||||
str r2, [r0] @ hardware version
|
str r2, [r0] @ hardware version
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -117,7 +123,9 @@ ENTRY(cpu_arm720_set_pte)
|
|||||||
ENTRY(cpu_arm720_reset)
|
ENTRY(cpu_arm720_reset)
|
||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate cache
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate cache
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ flush TLB (v4)
|
mcr p15, 0, ip, c8, c7, 0 @ flush TLB (v4)
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ get ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ get ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x2100 @ ..v....s........
|
bic ip, ip, #0x2100 @ ..v....s........
|
||||||
@ -130,7 +138,9 @@ ENTRY(cpu_arm720_reset)
|
|||||||
__arm710_setup:
|
__arm710_setup:
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7, 0 @ invalidate caches
|
mcr p15, 0, r0, c7, c7, 0 @ invalidate caches
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4)
|
mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4)
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register
|
mrc p15, 0, r0, c1, c0 @ get control register
|
||||||
ldr r5, arm710_cr1_clear
|
ldr r5, arm710_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
@ -156,7 +166,9 @@ arm710_cr1_set:
|
|||||||
__arm720_setup:
|
__arm720_setup:
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7, 0 @ invalidate caches
|
mcr p15, 0, r0, c7, c7, 0 @ invalidate caches
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4)
|
mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4)
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register
|
mrc p15, 0, r0, c1, c0 @ get control register
|
||||||
ldr r5, arm720_cr1_clear
|
ldr r5, arm720_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 1999,2000 ARM Limited
|
* Copyright (C) 1999,2000 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -97,7 +98,9 @@ ENTRY(cpu_arm920_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -317,6 +320,7 @@ ENTRY(cpu_arm920_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm920_switch_mm)
|
ENTRY(cpu_arm920_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov ip, #0
|
mov ip, #0
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
||||||
@ -337,6 +341,7 @@ ENTRY(cpu_arm920_switch_mm)
|
|||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -346,6 +351,7 @@ ENTRY(cpu_arm920_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm920_set_pte)
|
ENTRY(cpu_arm920_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -372,6 +378,7 @@ ENTRY(cpu_arm920_set_pte)
|
|||||||
mov r0, r0
|
mov r0, r0
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -381,7 +388,9 @@ __arm920_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, arm920_cr1_clear
|
ldr r5, arm920_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 1999,2000 ARM Limited
|
* Copyright (C) 1999,2000 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
* Copyright (C) 2001 Altera Corporation
|
* Copyright (C) 2001 Altera Corporation
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -99,7 +100,9 @@ ENTRY(cpu_arm922_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -321,6 +324,7 @@ ENTRY(cpu_arm922_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm922_switch_mm)
|
ENTRY(cpu_arm922_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov ip, #0
|
mov ip, #0
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
||||||
@ -341,6 +345,7 @@ ENTRY(cpu_arm922_switch_mm)
|
|||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -350,6 +355,7 @@ ENTRY(cpu_arm922_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm922_set_pte)
|
ENTRY(cpu_arm922_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -376,6 +382,7 @@ ENTRY(cpu_arm922_set_pte)
|
|||||||
mov r0, r0
|
mov r0, r0
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -385,7 +392,9 @@ __arm922_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, arm922_cr1_clear
|
ldr r5, arm922_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
* Update for Linux-2.6 and cache flush improvements
|
* Update for Linux-2.6 and cache flush improvements
|
||||||
* Copyright (C) 2004 Nokia Corporation by Tony Lindgren <tony@atomide.com>
|
* Copyright (C) 2004 Nokia Corporation by Tony Lindgren <tony@atomide.com>
|
||||||
*
|
*
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2004.
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@ -122,7 +124,9 @@ ENTRY(cpu_arm925_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -369,6 +373,7 @@ ENTRY(cpu_arm925_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm925_switch_mm)
|
ENTRY(cpu_arm925_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov ip, #0
|
mov ip, #0
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
||||||
@ -383,6 +388,7 @@ ENTRY(cpu_arm925_switch_mm)
|
|||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -392,6 +398,7 @@ ENTRY(cpu_arm925_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm925_set_pte)
|
ENTRY(cpu_arm925_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -420,6 +427,7 @@ ENTRY(cpu_arm925_set_pte)
|
|||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
#endif
|
#endif
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -438,7 +446,9 @@ __arm925_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
mov r0, #4 @ disable write-back on caches explicitly
|
mov r0, #4 @ disable write-back on caches explicitly
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 1999-2001 ARM Limited
|
* Copyright (C) 1999-2001 ARM Limited
|
||||||
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
* Copyright (C) 2000 Deep Blue Solutions Ltd.
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -85,7 +86,9 @@ ENTRY(cpu_arm926_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -329,6 +332,7 @@ ENTRY(cpu_arm926_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm926_switch_mm)
|
ENTRY(cpu_arm926_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov ip, #0
|
mov ip, #0
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
|
||||||
@ -341,6 +345,7 @@ ENTRY(cpu_arm926_switch_mm)
|
|||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -350,6 +355,7 @@ ENTRY(cpu_arm926_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_arm926_set_pte)
|
ENTRY(cpu_arm926_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -378,6 +384,7 @@ ENTRY(cpu_arm926_set_pte)
|
|||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
#endif
|
#endif
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -387,7 +394,9 @@ __arm926_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* linux/arch/arm/mm/proc-sa110.S
|
* linux/arch/arm/mm/proc-sa110.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 1997-2002 Russell King
|
* Copyright (C) 1997-2002 Russell King
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
@ -67,7 +68,9 @@ ENTRY(cpu_sa110_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -130,11 +133,15 @@ ENTRY(cpu_sa110_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_sa110_switch_mm)
|
ENTRY(cpu_sa110_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str lr, [sp, #-4]!
|
str lr, [sp, #-4]!
|
||||||
bl v4wb_flush_kern_cache_all @ clears IP
|
bl v4wb_flush_kern_cache_all @ clears IP
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
ldr pc, [sp], #4
|
ldr pc, [sp], #4
|
||||||
|
#else
|
||||||
|
mov pc, lr
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cpu_sa110_set_pte(ptep, pte)
|
* cpu_sa110_set_pte(ptep, pte)
|
||||||
@ -143,6 +150,7 @@ ENTRY(cpu_sa110_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_sa110_set_pte)
|
ENTRY(cpu_sa110_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -164,6 +172,7 @@ ENTRY(cpu_sa110_set_pte)
|
|||||||
mov r0, r0
|
mov r0, r0
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -173,7 +182,9 @@ __sa110_setup:
|
|||||||
mov r10, #0
|
mov r10, #0
|
||||||
mcr p15, 0, r10, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r10, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r10, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r10, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, sa110_cr1_clear
|
ldr r5, sa110_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* linux/arch/arm/mm/proc-sa1100.S
|
* linux/arch/arm/mm/proc-sa1100.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 1997-2002 Russell King
|
* Copyright (C) 1997-2002 Russell King
|
||||||
|
* hacked for non-paged-MM by Hyok S. Choi, 2003.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
@ -77,7 +78,9 @@ ENTRY(cpu_sa1100_reset)
|
|||||||
mov ip, #0
|
mov ip, #0
|
||||||
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches
|
||||||
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
mcr p15, 0, ip, c7, c10, 4 @ drain WB
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
|
#endif
|
||||||
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
mrc p15, 0, ip, c1, c0, 0 @ ctrl register
|
||||||
bic ip, ip, #0x000f @ ............wcam
|
bic ip, ip, #0x000f @ ............wcam
|
||||||
bic ip, ip, #0x1100 @ ...i...s........
|
bic ip, ip, #0x1100 @ ...i...s........
|
||||||
@ -142,12 +145,16 @@ ENTRY(cpu_sa1100_dcache_clean_area)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_sa1100_switch_mm)
|
ENTRY(cpu_sa1100_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str lr, [sp, #-4]!
|
str lr, [sp, #-4]!
|
||||||
bl v4wb_flush_kern_cache_all @ clears IP
|
bl v4wb_flush_kern_cache_all @ clears IP
|
||||||
mcr p15, 0, ip, c9, c0, 0 @ invalidate RB
|
mcr p15, 0, ip, c9, c0, 0 @ invalidate RB
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
|
||||||
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs
|
||||||
ldr pc, [sp], #4
|
ldr pc, [sp], #4
|
||||||
|
#else
|
||||||
|
mov pc, lr
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cpu_sa1100_set_pte(ptep, pte)
|
* cpu_sa1100_set_pte(ptep, pte)
|
||||||
@ -156,6 +163,7 @@ ENTRY(cpu_sa1100_switch_mm)
|
|||||||
*/
|
*/
|
||||||
.align 5
|
.align 5
|
||||||
ENTRY(cpu_sa1100_set_pte)
|
ENTRY(cpu_sa1100_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
|
||||||
@ -177,6 +185,7 @@ ENTRY(cpu_sa1100_set_pte)
|
|||||||
mov r0, r0
|
mov r0, r0
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
mcr p15, 0, r0, c7, c10, 1 @ clean D entry
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
mcr p15, 0, r0, c7, c10, 4 @ drain WB
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
__INIT
|
__INIT
|
||||||
@ -186,7 +195,9 @@ __sa1100_setup:
|
|||||||
mov r0, #0
|
mov r0, #0
|
||||||
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
|
||||||
|
#endif
|
||||||
mrc p15, 0, r0, c1, c0 @ get control register v4
|
mrc p15, 0, r0, c1, c0 @ get control register v4
|
||||||
ldr r5, sa1100_cr1_clear
|
ldr r5, sa1100_cr1_clear
|
||||||
bic r0, r0, r5
|
bic r0, r0, r5
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* linux/arch/arm/mm/proc-v6.S
|
* linux/arch/arm/mm/proc-v6.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2001 Deep Blue Solutions Ltd.
|
* Copyright (C) 2001 Deep Blue Solutions Ltd.
|
||||||
|
* Modified by Catalin Marinas for noMMU support
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
@ -88,6 +89,7 @@ ENTRY(cpu_v6_dcache_clean_area)
|
|||||||
* - we are not using split page tables
|
* - we are not using split page tables
|
||||||
*/
|
*/
|
||||||
ENTRY(cpu_v6_switch_mm)
|
ENTRY(cpu_v6_switch_mm)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mov r2, #0
|
mov r2, #0
|
||||||
ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id
|
ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
@ -97,6 +99,7 @@ ENTRY(cpu_v6_switch_mm)
|
|||||||
mcr p15, 0, r2, c7, c10, 4 @ drain write buffer
|
mcr p15, 0, r2, c7, c10, 4 @ drain write buffer
|
||||||
mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
|
mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
|
||||||
mcr p15, 0, r1, c13, c0, 1 @ set context ID
|
mcr p15, 0, r1, c13, c0, 1 @ set context ID
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -119,6 +122,7 @@ ENTRY(cpu_v6_switch_mm)
|
|||||||
* 1111 0 1 1 r/w r/w
|
* 1111 0 1 1 r/w r/w
|
||||||
*/
|
*/
|
||||||
ENTRY(cpu_v6_set_pte)
|
ENTRY(cpu_v6_set_pte)
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
str r1, [r0], #-2048 @ linux version
|
str r1, [r0], #-2048 @ linux version
|
||||||
|
|
||||||
bic r2, r1, #0x000003f0
|
bic r2, r1, #0x000003f0
|
||||||
@ -145,6 +149,7 @@ ENTRY(cpu_v6_set_pte)
|
|||||||
|
|
||||||
str r2, [r0]
|
str r2, [r0]
|
||||||
mcr p15, 0, r0, c7, c10, 1 @ flush_pte
|
mcr p15, 0, r0, c7, c10, 1 @ flush_pte
|
||||||
|
#endif
|
||||||
mov pc, lr
|
mov pc, lr
|
||||||
|
|
||||||
|
|
||||||
@ -194,12 +199,14 @@ __v6_setup:
|
|||||||
mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
|
mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
|
||||||
mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache
|
mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache
|
||||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
|
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
|
||||||
|
#ifdef CONFIG_MMU
|
||||||
mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
|
mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
|
||||||
mcr p15, 0, r0, c2, c0, 2 @ TTB control register
|
mcr p15, 0, r0, c2, c0, 2 @ TTB control register
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
orr r4, r4, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable
|
orr r4, r4, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable
|
||||||
#endif
|
#endif
|
||||||
mcr p15, 0, r4, c2, c0, 1 @ load TTB1
|
mcr p15, 0, r4, c2, c0, 1 @ load TTB1
|
||||||
|
#endif /* CONFIG_MMU */
|
||||||
#ifdef CONFIG_VFP
|
#ifdef CONFIG_VFP
|
||||||
mrc p15, 0, r0, c1, c0, 2
|
mrc p15, 0, r0, c1, c0, 2
|
||||||
orr r0, r0, #(0xf << 20)
|
orr r0, r0, #(0xf << 20)
|
||||||
|
@ -60,6 +60,12 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
|
|||||||
u32 *isp;
|
u32 *isp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (unlikely((unsigned)irq >= NR_IRQS)) {
|
||||||
|
printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
|
||||||
|
__FUNCTION__, irq);
|
||||||
|
BUG();
|
||||||
|
}
|
||||||
|
|
||||||
irq_enter();
|
irq_enter();
|
||||||
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
||||||
/* Debugging check for stack overflow: is there less than 1KB free? */
|
/* Debugging check for stack overflow: is there less than 1KB free? */
|
||||||
|
@ -114,7 +114,7 @@ CONFIG_IA64_CYCLONE=y
|
|||||||
CONFIG_IOSAPIC=y
|
CONFIG_IOSAPIC=y
|
||||||
CONFIG_FORCE_MAX_ZONEORDER=17
|
CONFIG_FORCE_MAX_ZONEORDER=17
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
CONFIG_NR_CPUS=4
|
CONFIG_NR_CPUS=16
|
||||||
CONFIG_HOTPLUG_CPU=y
|
CONFIG_HOTPLUG_CPU=y
|
||||||
CONFIG_PERMIT_BSP_REMOVE=y
|
CONFIG_PERMIT_BSP_REMOVE=y
|
||||||
CONFIG_FORCE_CPEI_RETARGET=y
|
CONFIG_FORCE_CPEI_RETARGET=y
|
||||||
|
@ -998,7 +998,7 @@ palinfo_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Register for future delivery via notify registration */
|
/* Register for future delivery via notify registration */
|
||||||
register_cpu_notifier(&palinfo_cpu_notifier);
|
register_hotcpu_notifier(&palinfo_cpu_notifier);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -458,7 +458,7 @@ void __init sn_setup(char **cmdline_p)
|
|||||||
* support here so we don't have to listen to failed keyboard probe
|
* support here so we don't have to listen to failed keyboard probe
|
||||||
* messages.
|
* messages.
|
||||||
*/
|
*/
|
||||||
if (version <= 0x0209 && acpi_kbd_controller_present) {
|
if (is_shub1() && version <= 0x0209 && acpi_kbd_controller_present) {
|
||||||
printk(KERN_INFO "Disabling legacy keyboard support as prom "
|
printk(KERN_INFO "Disabling legacy keyboard support as prom "
|
||||||
"is too old and doesn't provide FADT\n");
|
"is too old and doesn't provide FADT\n");
|
||||||
acpi_kbd_controller_present = 0;
|
acpi_kbd_controller_present = 0;
|
||||||
@ -577,7 +577,8 @@ void __init sn_cpu_init(void)
|
|||||||
int i;
|
int i;
|
||||||
static int wars_have_been_checked;
|
static int wars_have_been_checked;
|
||||||
|
|
||||||
if (smp_processor_id() == 0 && IS_MEDUSA()) {
|
cpuid = smp_processor_id();
|
||||||
|
if (cpuid == 0 && IS_MEDUSA()) {
|
||||||
if (ia64_sn_is_fake_prom())
|
if (ia64_sn_is_fake_prom())
|
||||||
sn_prom_type = 2;
|
sn_prom_type = 2;
|
||||||
else
|
else
|
||||||
@ -596,6 +597,12 @@ void __init sn_cpu_init(void)
|
|||||||
BUG();
|
BUG();
|
||||||
sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2;
|
sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't check status. The SAL call is not supported on all PROMs
|
||||||
|
* but a failure is harmless.
|
||||||
|
*/
|
||||||
|
(void) ia64_sn_set_cpu_number(cpuid);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The boot cpu makes this call again after platform initialization is
|
* The boot cpu makes this call again after platform initialization is
|
||||||
* complete.
|
* complete.
|
||||||
@ -607,7 +614,6 @@ void __init sn_cpu_init(void)
|
|||||||
if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0)
|
if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
cpuid = smp_processor_id();
|
|
||||||
cpuphyid = get_sapicid();
|
cpuphyid = get_sapicid();
|
||||||
|
|
||||||
if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice))
|
if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice))
|
||||||
|
@ -595,7 +595,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
|
|||||||
|
|
||||||
/* sanity check prom rev */
|
/* sanity check prom rev */
|
||||||
|
|
||||||
if (sn_sal_rev() < 0x0406) {
|
if (is_shub1() && sn_sal_rev() < 0x0406) {
|
||||||
printk
|
printk
|
||||||
(KERN_ERR "%s: SGI prom rev 4.06 or greater required "
|
(KERN_ERR "%s: SGI prom rev 4.06 or greater required "
|
||||||
"for tioca support\n", __FUNCTION__);
|
"for tioca support\n", __FUNCTION__);
|
||||||
|
@ -540,6 +540,59 @@ config RAM32BIT
|
|||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
comment "ROM configuration"
|
||||||
|
|
||||||
|
config ROM
|
||||||
|
bool "Specify ROM linker regions"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Define a ROM region for the linker script. This creates a kernel
|
||||||
|
that can be stored in flash, with possibly the text, and data
|
||||||
|
regions being copied out to RAM at startup.
|
||||||
|
|
||||||
|
config ROMBASE
|
||||||
|
hex "Address of the base of ROM device"
|
||||||
|
default "0"
|
||||||
|
depends on ROM
|
||||||
|
help
|
||||||
|
Define the address that the ROM region starts at. Some platforms
|
||||||
|
use this to set their chip select region accordingly for the boot
|
||||||
|
device.
|
||||||
|
|
||||||
|
config ROMVEC
|
||||||
|
hex "Address of the base of the ROM vectors"
|
||||||
|
default "0"
|
||||||
|
depends on ROM
|
||||||
|
help
|
||||||
|
This is almost always the same as the base of the ROM. Since on all
|
||||||
|
68000 type varients the vectors are at the base of the boot device
|
||||||
|
on system startup.
|
||||||
|
|
||||||
|
config ROMVECSIZE
|
||||||
|
hex "Size of ROM vector region (in bytes)"
|
||||||
|
default "0x400"
|
||||||
|
depends on ROM
|
||||||
|
help
|
||||||
|
Define the size of the vector region in ROM. For most 68000
|
||||||
|
varients this would be 0x400 bytes in size. Set to 0 if you do
|
||||||
|
not want a vector region at the start of the ROM.
|
||||||
|
|
||||||
|
config ROMSTART
|
||||||
|
hex "Address of the base of system image in ROM"
|
||||||
|
default "0x400"
|
||||||
|
depends on ROM
|
||||||
|
help
|
||||||
|
Define the start address of the system image in ROM. Commonly this
|
||||||
|
is strait after the ROM vectors.
|
||||||
|
|
||||||
|
config ROMSIZE
|
||||||
|
hex "Size of the ROM device"
|
||||||
|
default "0x100000"
|
||||||
|
depends on ROM
|
||||||
|
help
|
||||||
|
Size of the ROM device. On some platforms this is used to setup
|
||||||
|
the chip select that controls the boot ROM device.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Kernel executes from"
|
prompt "Kernel executes from"
|
||||||
---help---
|
---help---
|
||||||
|
@ -3,63 +3,13 @@
|
|||||||
*
|
*
|
||||||
* (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
|
* (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com>
|
||||||
*
|
*
|
||||||
* This ends up looking compilcated, because of the number of
|
* This linker script is equiped to build either ROM loaded or RAM
|
||||||
* address variations for ram and rom/flash layouts. The real
|
* run kernels.
|
||||||
* work of the linker script is all at the end, and reasonably
|
|
||||||
* strait forward.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/config.h>
|
#include <linux/config.h>
|
||||||
#include <asm-generic/vmlinux.lds.h>
|
#include <asm-generic/vmlinux.lds.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* Original Palm pilot (same for Xcopilot).
|
|
||||||
* There is really only a rom target for this.
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_PILOT3
|
|
||||||
#define ROMVEC_START 0x10c00000
|
|
||||||
#define ROMVEC_LENGTH 0x10400
|
|
||||||
#define ROM_START 0x10c10400
|
|
||||||
#define ROM_LENGTH 0xfec00
|
|
||||||
#define ROM_END 0x10d00000
|
|
||||||
#define DATA_ADDR CONFIG_KERNELBASE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Same setup on both the uCsimm and uCdimm.
|
|
||||||
*/
|
|
||||||
#if defined(CONFIG_UCSIMM) || defined(CONFIG_UCDIMM)
|
|
||||||
#ifdef CONFIG_RAMKERNEL
|
|
||||||
#define ROMVEC_START 0x10c10000
|
|
||||||
#define ROMVEC_LENGTH 0x400
|
|
||||||
#define ROM_START 0x10c10400
|
|
||||||
#define ROM_LENGTH 0x1efc00
|
|
||||||
#define ROM_END 0x10e00000
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_ROMKERNEL
|
|
||||||
#define ROMVEC_START 0x10c10000
|
|
||||||
#define ROMVEC_LENGTH 0x400
|
|
||||||
#define ROM_START 0x10c10400
|
|
||||||
#define ROM_LENGTH 0x1efc00
|
|
||||||
#define ROM_END 0x10e00000
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HIMEMKERNEL
|
|
||||||
#define ROMVEC_START 0x00600000
|
|
||||||
#define ROMVEC_LENGTH 0x400
|
|
||||||
#define ROM_START 0x00600400
|
|
||||||
#define ROM_LENGTH 0x1efc00
|
|
||||||
#define ROM_END 0x007f0000
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_UCQUICC
|
|
||||||
#define ROMVEC_START 0x00000000
|
|
||||||
#define ROMVEC_LENGTH 0x404
|
|
||||||
#define ROM_START 0x00000404
|
|
||||||
#define ROM_LENGTH 0x1ff6fc
|
|
||||||
#define ROM_END 0x00200000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_RAMKERNEL)
|
#if defined(CONFIG_RAMKERNEL)
|
||||||
#define RAM_START CONFIG_KERNELBASE
|
#define RAM_START CONFIG_KERNELBASE
|
||||||
#define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
|
#define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE)
|
||||||
@ -71,6 +21,10 @@
|
|||||||
#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
|
#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
|
||||||
#define RAM_START CONFIG_RAMBASE
|
#define RAM_START CONFIG_RAMBASE
|
||||||
#define RAM_LENGTH CONFIG_RAMSIZE
|
#define RAM_LENGTH CONFIG_RAMSIZE
|
||||||
|
#define ROMVEC_START CONFIG_ROMVEC
|
||||||
|
#define ROMVEC_LENGTH CONFIG_ROMVECSIZE
|
||||||
|
#define ROM_START CONFIG_ROMSTART
|
||||||
|
#define ROM_LENGTH CONFIG_ROMSIZE
|
||||||
#define TEXT rom
|
#define TEXT rom
|
||||||
#define DATA ram
|
#define DATA ram
|
||||||
#define INIT ram
|
#define INIT ram
|
||||||
@ -90,7 +44,6 @@ MEMORY {
|
|||||||
#ifdef ROM_START
|
#ifdef ROM_START
|
||||||
romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
|
romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH
|
||||||
rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
|
rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH
|
||||||
erom : ORIGIN = ROM_END, LENGTH = 0
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,13 +120,6 @@ SECTIONS {
|
|||||||
_etext = . ;
|
_etext = . ;
|
||||||
} > TEXT
|
} > TEXT
|
||||||
|
|
||||||
#ifdef ROM_END
|
|
||||||
. = ROM_END ;
|
|
||||||
.erom : {
|
|
||||||
__rom_end = . ;
|
|
||||||
} > erom
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.data DATA_ADDR : {
|
.data DATA_ADDR : {
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_sdata = . ;
|
_sdata = . ;
|
||||||
|
@ -8,6 +8,7 @@ head-$(CONFIG_DRAGEN2) = head-de2.o
|
|||||||
|
|
||||||
obj-y += entry.o ints.o timers.o
|
obj-y += entry.o ints.o timers.o
|
||||||
obj-$(CONFIG_M68328) += config.o
|
obj-$(CONFIG_M68328) += config.o
|
||||||
|
obj-$(CONFIG_ROM) += romvec.o
|
||||||
|
|
||||||
extra-y := head.o
|
extra-y := head.o
|
||||||
extra-$(CONFIG_M68328) += bootlogo.rh head.o
|
extra-$(CONFIG_M68328) += bootlogo.rh head.o
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
#include <asm/irqnode.h>
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/machdep.h>
|
#include <asm/machdep.h>
|
||||||
@ -82,25 +83,6 @@ unsigned int local_irq_count[NR_CPUS];
|
|||||||
/* irq node variables for the 32 (potential) on chip sources */
|
/* irq node variables for the 32 (potential) on chip sources */
|
||||||
static irq_node_t int_irq_list[NR_IRQS];
|
static irq_node_t int_irq_list[NR_IRQS];
|
||||||
|
|
||||||
#if !defined(CONFIG_DRAGEN2)
|
|
||||||
asm (".global _start, __ramend/n/t"
|
|
||||||
".section .romvec/n"
|
|
||||||
"e_vectors:\n\t"
|
|
||||||
".long __ramend-4, _start, buserr, trap, trap, trap, trap, trap\n\t"
|
|
||||||
".long trap, trap, trap, trap, trap, trap, trap, trap\n\t"
|
|
||||||
".long trap, trap, trap, trap, trap, trap, trap, trap\n\t"
|
|
||||||
".long trap, trap, trap, trap\n\t"
|
|
||||||
".long trap, trap, trap, trap\n\t"
|
|
||||||
/*.long inthandler, inthandler, inthandler, inthandler
|
|
||||||
.long inthandler4, inthandler, inthandler, inthandler */
|
|
||||||
/* TRAP #0-15 */
|
|
||||||
".long system_call, trap, trap, trap, trap, trap, trap, trap\n\t"
|
|
||||||
".long trap, trap, trap, trap, trap, trap, trap, trap\n\t"
|
|
||||||
".long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n\t"
|
|
||||||
".text\n"
|
|
||||||
"ignore: rte");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function should be called during kernel startup to initialize
|
* This function should be called during kernel startup to initialize
|
||||||
* the IRQ handling routines.
|
* the IRQ handling routines.
|
||||||
|
37
arch/m68knommu/platform/68328/romvec.S
Normal file
37
arch/m68knommu/platform/68328/romvec.S
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* linux/arch/m68knommu/platform/68328/romvec.S
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
|
* License. See the file COPYING in the main directory of this archive
|
||||||
|
* for more details.
|
||||||
|
*
|
||||||
|
* Copyright 1996 Roman Zippel
|
||||||
|
* Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
|
||||||
|
* Copyright 2006 Greg Ungerer <gerg@snapgear.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/config.h>
|
||||||
|
|
||||||
|
.global _start
|
||||||
|
.global _buserr
|
||||||
|
.global trap
|
||||||
|
.global system_call
|
||||||
|
|
||||||
|
.section .romvec
|
||||||
|
|
||||||
|
e_vectors:
|
||||||
|
.long CONFIG_RAMBASE+CONFIG_RAMSIZE-4, _start, buserr, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
/* TRAP #0-15 */
|
||||||
|
.long system_call, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long trap, trap, trap, trap
|
||||||
|
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
|
@ -141,13 +141,13 @@ int BSP_set_clock_mmss (unsigned long nowtime)
|
|||||||
void BSP_reset (void)
|
void BSP_reset (void)
|
||||||
{
|
{
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
asm volatile ("
|
asm volatile (
|
||||||
moveal #_start, %a0;
|
"moveal #_start, %a0;\n"
|
||||||
moveb #0, 0xFFFFF300;
|
"moveb #0, 0xFFFFF300;\n"
|
||||||
moveal 0(%a0), %sp;
|
"moveal 0(%a0), %sp;\n"
|
||||||
moveal 4(%a0), %a0;
|
"moveal 4(%a0), %a0;\n"
|
||||||
jmp (%a0);
|
"jmp (%a0);\n"
|
||||||
");
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char *scc1_hwaddr;
|
unsigned char *scc1_hwaddr;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
#include <asm/irqnode.h>
|
||||||
#include <asm/traps.h>
|
#include <asm/traps.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/machdep.h>
|
#include <asm/machdep.h>
|
||||||
|
@ -42,13 +42,13 @@ void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int
|
|||||||
void m68ez328_reset(void)
|
void m68ez328_reset(void)
|
||||||
{
|
{
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
asm volatile ("
|
asm volatile (
|
||||||
moveal #0x10c00000, %a0;
|
"moveal #0x10c00000, %a0;\n"
|
||||||
moveb #0, 0xFFFFF300;
|
"moveb #0, 0xFFFFF300;\n"
|
||||||
moveal 0(%a0), %sp;
|
"moveal 0(%a0), %sp;\n"
|
||||||
moveal 4(%a0), %a0;
|
"moveal 4(%a0), %a0;\n"
|
||||||
jmp (%a0);
|
"jmp (%a0);\n"
|
||||||
");
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -141,13 +141,13 @@ static void init_hardware(char *command, int size)
|
|||||||
static void m68vz328_reset(void)
|
static void m68vz328_reset(void)
|
||||||
{
|
{
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
asm volatile ("
|
asm volatile (
|
||||||
moveal #0x10c00000, %a0;
|
"moveal #0x10c00000, %a0;\n\t"
|
||||||
moveb #0, 0xFFFFF300;
|
"moveb #0, 0xFFFFF300;\n\t"
|
||||||
moveal 0(%a0), %sp;
|
"moveal 0(%a0), %sp;\n\t"
|
||||||
moveal 4(%a0), %a0;
|
"moveal 4(%a0), %a0;\n\t"
|
||||||
jmp (%a0);
|
"jmp (%a0);\n"
|
||||||
");
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char *cs8900a_hwaddr;
|
unsigned char *cs8900a_hwaddr;
|
||||||
|
@ -119,7 +119,14 @@ int pmac_backlight_set_legacy_brightness(int brightness)
|
|||||||
down(&pmac_backlight->sem);
|
down(&pmac_backlight->sem);
|
||||||
props = pmac_backlight->props;
|
props = pmac_backlight->props;
|
||||||
props->brightness = brightness *
|
props->brightness = brightness *
|
||||||
props->max_brightness / OLD_BACKLIGHT_MAX;
|
(props->max_brightness + 1) /
|
||||||
|
(OLD_BACKLIGHT_MAX + 1);
|
||||||
|
|
||||||
|
if (props->brightness > props->max_brightness)
|
||||||
|
props->brightness = props->max_brightness;
|
||||||
|
else if (props->brightness < 0)
|
||||||
|
props->brightness = 0;
|
||||||
|
|
||||||
props->update_status(pmac_backlight);
|
props->update_status(pmac_backlight);
|
||||||
up(&pmac_backlight->sem);
|
up(&pmac_backlight->sem);
|
||||||
|
|
||||||
@ -140,8 +147,11 @@ int pmac_backlight_get_legacy_brightness()
|
|||||||
|
|
||||||
down(&pmac_backlight->sem);
|
down(&pmac_backlight->sem);
|
||||||
props = pmac_backlight->props;
|
props = pmac_backlight->props;
|
||||||
|
|
||||||
result = props->brightness *
|
result = props->brightness *
|
||||||
OLD_BACKLIGHT_MAX / props->max_brightness;
|
(OLD_BACKLIGHT_MAX + 1) /
|
||||||
|
(props->max_brightness + 1);
|
||||||
|
|
||||||
up(&pmac_backlight->sem);
|
up(&pmac_backlight->sem);
|
||||||
}
|
}
|
||||||
mutex_unlock(&pmac_backlight_mutex);
|
mutex_unlock(&pmac_backlight_mutex);
|
||||||
|
@ -118,6 +118,12 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
|
|||||||
/* high bit used in ret_from_ code */
|
/* high bit used in ret_from_ code */
|
||||||
unsigned irq = ~regs->orig_rax;
|
unsigned irq = ~regs->orig_rax;
|
||||||
|
|
||||||
|
if (unlikely(irq >= NR_IRQS)) {
|
||||||
|
printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
|
||||||
|
__FUNCTION__, irq);
|
||||||
|
BUG();
|
||||||
|
}
|
||||||
|
|
||||||
exit_idle();
|
exit_idle();
|
||||||
irq_enter();
|
irq_enter();
|
||||||
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
#ifdef CONFIG_DEBUG_STACKOVERFLOW
|
||||||
|
@ -607,11 +607,13 @@ void set_nmi_callback(nmi_callback_t callback)
|
|||||||
vmalloc_sync_all();
|
vmalloc_sync_all();
|
||||||
rcu_assign_pointer(nmi_callback, callback);
|
rcu_assign_pointer(nmi_callback, callback);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(set_nmi_callback);
|
||||||
|
|
||||||
void unset_nmi_callback(void)
|
void unset_nmi_callback(void)
|
||||||
{
|
{
|
||||||
nmi_callback = dummy_nmi_callback;
|
nmi_callback = dummy_nmi_callback;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(unset_nmi_callback);
|
||||||
|
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
|
|||||||
{
|
{
|
||||||
struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
|
struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
|
||||||
struct address_space *mapping = file->f_mapping;
|
struct address_space *mapping = file->f_mapping;
|
||||||
struct address_space_operations *aops = mapping->a_ops;
|
const struct address_space_operations *aops = mapping->a_ops;
|
||||||
pgoff_t index;
|
pgoff_t index;
|
||||||
unsigned offset, bv_offs;
|
unsigned offset, bv_offs;
|
||||||
int len, ret;
|
int len, ret;
|
||||||
@ -784,7 +784,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
|
|||||||
|
|
||||||
error = -EINVAL;
|
error = -EINVAL;
|
||||||
if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
|
if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
|
||||||
struct address_space_operations *aops = mapping->a_ops;
|
const struct address_space_operations *aops = mapping->a_ops;
|
||||||
/*
|
/*
|
||||||
* If we can't read - sorry. If we only can't write - well,
|
* If we can't read - sorry. If we only can't write - well,
|
||||||
* it's going to be read-only.
|
* it's going to be read-only.
|
||||||
|
@ -191,7 +191,7 @@ static int ramdisk_set_page_dirty(struct page *page)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct address_space_operations ramdisk_aops = {
|
static const struct address_space_operations ramdisk_aops = {
|
||||||
.readpage = ramdisk_readpage,
|
.readpage = ramdisk_readpage,
|
||||||
.prepare_write = ramdisk_prepare_write,
|
.prepare_write = ramdisk_prepare_write,
|
||||||
.commit_write = ramdisk_commit_write,
|
.commit_write = ramdisk_commit_write,
|
||||||
|
@ -3738,11 +3738,8 @@ static int ipmi_init_msghandler(void)
|
|||||||
proc_ipmi_root->owner = THIS_MODULE;
|
proc_ipmi_root->owner = THIS_MODULE;
|
||||||
#endif /* CONFIG_PROC_FS */
|
#endif /* CONFIG_PROC_FS */
|
||||||
|
|
||||||
init_timer(&ipmi_timer);
|
setup_timer(&ipmi_timer, ipmi_timeout, 0);
|
||||||
ipmi_timer.data = 0;
|
mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
|
||||||
ipmi_timer.function = ipmi_timeout;
|
|
||||||
ipmi_timer.expires = jiffies + IPMI_TIMEOUT_JIFFIES;
|
|
||||||
add_timer(&ipmi_timer);
|
|
||||||
|
|
||||||
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||||
|
|
||||||
|
@ -55,23 +55,6 @@
|
|||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#ifdef CONFIG_HIGH_RES_TIMERS
|
|
||||||
#include <linux/hrtime.h>
|
|
||||||
# if defined(schedule_next_int)
|
|
||||||
/* Old high-res timer code, do translations. */
|
|
||||||
# define get_arch_cycles(a) quick_update_jiffies_sub(a)
|
|
||||||
# define arch_cycles_per_jiffy cycles_per_jiffies
|
|
||||||
# endif
|
|
||||||
static inline void add_usec_to_timer(struct timer_list *t, long v)
|
|
||||||
{
|
|
||||||
t->arch_cycle_expires += nsec_to_arch_cycle(v * 1000);
|
|
||||||
while (t->arch_cycle_expires >= arch_cycles_per_jiffy)
|
|
||||||
{
|
|
||||||
t->expires++;
|
|
||||||
t->arch_cycle_expires -= arch_cycles_per_jiffy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/rcupdate.h>
|
#include <linux/rcupdate.h>
|
||||||
#include <linux/ipmi_smi.h>
|
#include <linux/ipmi_smi.h>
|
||||||
@ -243,8 +226,6 @@ static int register_xaction_notifier(struct notifier_block * nb)
|
|||||||
return atomic_notifier_chain_register(&xaction_notifier_list, nb);
|
return atomic_notifier_chain_register(&xaction_notifier_list, nb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void si_restart_short_timer(struct smi_info *smi_info);
|
|
||||||
|
|
||||||
static void deliver_recv_msg(struct smi_info *smi_info,
|
static void deliver_recv_msg(struct smi_info *smi_info,
|
||||||
struct ipmi_smi_msg *msg)
|
struct ipmi_smi_msg *msg)
|
||||||
{
|
{
|
||||||
@ -768,7 +749,6 @@ static void sender(void *send_info,
|
|||||||
&& (smi_info->curr_msg == NULL))
|
&& (smi_info->curr_msg == NULL))
|
||||||
{
|
{
|
||||||
start_next_msg(smi_info);
|
start_next_msg(smi_info);
|
||||||
si_restart_short_timer(smi_info);
|
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&(smi_info->si_lock), flags);
|
spin_unlock_irqrestore(&(smi_info->si_lock), flags);
|
||||||
}
|
}
|
||||||
@ -833,37 +813,6 @@ static void request_events(void *send_info)
|
|||||||
|
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
|
|
||||||
/* Must be called with interrupts off and with the si_lock held. */
|
|
||||||
static void si_restart_short_timer(struct smi_info *smi_info)
|
|
||||||
{
|
|
||||||
#if defined(CONFIG_HIGH_RES_TIMERS)
|
|
||||||
unsigned long flags;
|
|
||||||
unsigned long jiffies_now;
|
|
||||||
unsigned long seq;
|
|
||||||
|
|
||||||
if (del_timer(&(smi_info->si_timer))) {
|
|
||||||
/* If we don't delete the timer, then it will go off
|
|
||||||
immediately, anyway. So we only process if we
|
|
||||||
actually delete the timer. */
|
|
||||||
|
|
||||||
do {
|
|
||||||
seq = read_seqbegin_irqsave(&xtime_lock, flags);
|
|
||||||
jiffies_now = jiffies;
|
|
||||||
smi_info->si_timer.expires = jiffies_now;
|
|
||||||
smi_info->si_timer.arch_cycle_expires
|
|
||||||
= get_arch_cycles(jiffies_now);
|
|
||||||
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
|
|
||||||
|
|
||||||
add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);
|
|
||||||
|
|
||||||
add_timer(&(smi_info->si_timer));
|
|
||||||
spin_lock_irqsave(&smi_info->count_lock, flags);
|
|
||||||
smi_info->timeout_restarts++;
|
|
||||||
spin_unlock_irqrestore(&smi_info->count_lock, flags);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void smi_timeout(unsigned long data)
|
static void smi_timeout(unsigned long data)
|
||||||
{
|
{
|
||||||
struct smi_info *smi_info = (struct smi_info *) data;
|
struct smi_info *smi_info = (struct smi_info *) data;
|
||||||
@ -904,31 +853,15 @@ static void smi_timeout(unsigned long data)
|
|||||||
/* If the state machine asks for a short delay, then shorten
|
/* If the state machine asks for a short delay, then shorten
|
||||||
the timer timeout. */
|
the timer timeout. */
|
||||||
if (smi_result == SI_SM_CALL_WITH_DELAY) {
|
if (smi_result == SI_SM_CALL_WITH_DELAY) {
|
||||||
#if defined(CONFIG_HIGH_RES_TIMERS)
|
|
||||||
unsigned long seq;
|
|
||||||
#endif
|
|
||||||
spin_lock_irqsave(&smi_info->count_lock, flags);
|
spin_lock_irqsave(&smi_info->count_lock, flags);
|
||||||
smi_info->short_timeouts++;
|
smi_info->short_timeouts++;
|
||||||
spin_unlock_irqrestore(&smi_info->count_lock, flags);
|
spin_unlock_irqrestore(&smi_info->count_lock, flags);
|
||||||
#if defined(CONFIG_HIGH_RES_TIMERS)
|
|
||||||
do {
|
|
||||||
seq = read_seqbegin_irqsave(&xtime_lock, flags);
|
|
||||||
smi_info->si_timer.expires = jiffies;
|
|
||||||
smi_info->si_timer.arch_cycle_expires
|
|
||||||
= get_arch_cycles(smi_info->si_timer.expires);
|
|
||||||
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
|
|
||||||
add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);
|
|
||||||
#else
|
|
||||||
smi_info->si_timer.expires = jiffies + 1;
|
smi_info->si_timer.expires = jiffies + 1;
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
spin_lock_irqsave(&smi_info->count_lock, flags);
|
spin_lock_irqsave(&smi_info->count_lock, flags);
|
||||||
smi_info->long_timeouts++;
|
smi_info->long_timeouts++;
|
||||||
spin_unlock_irqrestore(&smi_info->count_lock, flags);
|
spin_unlock_irqrestore(&smi_info->count_lock, flags);
|
||||||
smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
|
smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES;
|
||||||
#if defined(CONFIG_HIGH_RES_TIMERS)
|
|
||||||
smi_info->si_timer.arch_cycle_expires = 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_add_timer:
|
do_add_timer:
|
||||||
|
@ -949,9 +949,10 @@ static int wdog_reboot_handler(struct notifier_block *this,
|
|||||||
/* Disable the WDT if we are shutting down. */
|
/* Disable the WDT if we are shutting down. */
|
||||||
ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
|
ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
|
||||||
panic_halt_ipmi_set_timeout();
|
panic_halt_ipmi_set_timeout();
|
||||||
} else {
|
} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
|
||||||
/* Set a long timer to let the reboot happens, but
|
/* Set a long timer to let the reboot happens, but
|
||||||
reboot if it hangs. */
|
reboot if it hangs, but only if the watchdog
|
||||||
|
timer was already running. */
|
||||||
timeout = 120;
|
timeout = 120;
|
||||||
pretimeout = 0;
|
pretimeout = 0;
|
||||||
ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
|
ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
|
||||||
@ -973,16 +974,17 @@ static int wdog_panic_handler(struct notifier_block *this,
|
|||||||
{
|
{
|
||||||
static int panic_event_handled = 0;
|
static int panic_event_handled = 0;
|
||||||
|
|
||||||
/* On a panic, if we have a panic timeout, make sure that the thing
|
/* On a panic, if we have a panic timeout, make sure to extend
|
||||||
reboots, even if it hangs during that panic. */
|
the watchdog timer to a reasonable value to complete the
|
||||||
if (watchdog_user && !panic_event_handled) {
|
panic, if the watchdog timer is running. Plus the
|
||||||
/* Make sure the panic doesn't hang, and make sure we
|
pretimeout is meaningless at panic time. */
|
||||||
do this only once. */
|
if (watchdog_user && !panic_event_handled &&
|
||||||
|
ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
|
||||||
|
/* Make sure we do this only once. */
|
||||||
panic_event_handled = 1;
|
panic_event_handled = 1;
|
||||||
|
|
||||||
timeout = 255;
|
timeout = 255;
|
||||||
pretimeout = 0;
|
pretimeout = 0;
|
||||||
ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
|
|
||||||
panic_halt_ipmi_set_timeout();
|
panic_halt_ipmi_set_timeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -996,7 +996,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
|
|||||||
|
|
||||||
info->session = current->signal->session;
|
info->session = current->signal->session;
|
||||||
info->pgrp = process_group(current);
|
info->pgrp = process_group(current);
|
||||||
clear_bit(TTY_DONT_FLIP, &tty->flags);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
status = mxser_get_msr(info->base, 0, info->port);
|
status = mxser_get_msr(info->base, 0, info->port);
|
||||||
|
@ -1132,7 +1132,7 @@ static inline int input_available_p(struct tty_struct *tty, int amt)
|
|||||||
* buffer, and once to drain the space from the (physical) beginning of
|
* buffer, and once to drain the space from the (physical) beginning of
|
||||||
* the buffer to head pointer.
|
* the buffer to head pointer.
|
||||||
*
|
*
|
||||||
* Called under the tty->atomic_read_lock sem and with TTY_DONT_FLIP set
|
* Called under the tty->atomic_read_lock sem
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1271,7 +1271,6 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_wait_queue(&tty->read_wait, &wait);
|
add_wait_queue(&tty->read_wait, &wait);
|
||||||
set_bit(TTY_DONT_FLIP, &tty->flags);
|
|
||||||
while (nr) {
|
while (nr) {
|
||||||
/* First test for status change. */
|
/* First test for status change. */
|
||||||
if (tty->packet && tty->link->ctrl_status) {
|
if (tty->packet && tty->link->ctrl_status) {
|
||||||
@ -1315,9 +1314,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
n_tty_set_room(tty);
|
n_tty_set_room(tty);
|
||||||
clear_bit(TTY_DONT_FLIP, &tty->flags);
|
|
||||||
timeout = schedule_timeout(timeout);
|
timeout = schedule_timeout(timeout);
|
||||||
set_bit(TTY_DONT_FLIP, &tty->flags);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
__set_current_state(TASK_RUNNING);
|
__set_current_state(TASK_RUNNING);
|
||||||
@ -1394,7 +1391,6 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
|
|||||||
if (time)
|
if (time)
|
||||||
timeout = time;
|
timeout = time;
|
||||||
}
|
}
|
||||||
clear_bit(TTY_DONT_FLIP, &tty->flags);
|
|
||||||
mutex_unlock(&tty->atomic_read_lock);
|
mutex_unlock(&tty->atomic_read_lock);
|
||||||
remove_wait_queue(&tty->read_wait, &wait);
|
remove_wait_queue(&tty->read_wait, &wait);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ static void pty_unthrottle(struct tty_struct * tty)
|
|||||||
*
|
*
|
||||||
* FIXME: Our pty_write method is called with our ldisc lock held but
|
* FIXME: Our pty_write method is called with our ldisc lock held but
|
||||||
* not our partners. We can't just take the other one blindly without
|
* not our partners. We can't just take the other one blindly without
|
||||||
* risking deadlocks. There is also the small matter of TTY_DONT_FLIP
|
* risking deadlocks.
|
||||||
*/
|
*/
|
||||||
static int pty_write(struct tty_struct * tty, const unsigned char *buf, int count)
|
static int pty_write(struct tty_struct * tty, const unsigned char *buf, int count)
|
||||||
{
|
{
|
||||||
|
@ -3029,6 +3029,9 @@ static int __init stl_init(void)
|
|||||||
int i;
|
int i;
|
||||||
printk(KERN_INFO "%s: version %s\n", stl_drvtitle, stl_drvversion);
|
printk(KERN_INFO "%s: version %s\n", stl_drvtitle, stl_drvversion);
|
||||||
|
|
||||||
|
spin_lock_init(&stallion_lock);
|
||||||
|
spin_lock_init(&brd_lock);
|
||||||
|
|
||||||
stl_initbrds();
|
stl_initbrds();
|
||||||
|
|
||||||
stl_serial = alloc_tty_driver(STL_MAXBRDS * STL_MAXPORTS);
|
stl_serial = alloc_tty_driver(STL_MAXBRDS * STL_MAXPORTS);
|
||||||
|
@ -267,7 +267,6 @@ static struct tty_buffer *tty_buffer_alloc(size_t size)
|
|||||||
p->used = 0;
|
p->used = 0;
|
||||||
p->size = size;
|
p->size = size;
|
||||||
p->next = NULL;
|
p->next = NULL;
|
||||||
p->active = 0;
|
|
||||||
p->commit = 0;
|
p->commit = 0;
|
||||||
p->read = 0;
|
p->read = 0;
|
||||||
p->char_buf_ptr = (char *)(p->data);
|
p->char_buf_ptr = (char *)(p->data);
|
||||||
@ -327,10 +326,9 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size)
|
|||||||
/* OPTIMISATION: We could keep a per tty "zero" sized buffer to
|
/* OPTIMISATION: We could keep a per tty "zero" sized buffer to
|
||||||
remove this conditional if its worth it. This would be invisible
|
remove this conditional if its worth it. This would be invisible
|
||||||
to the callers */
|
to the callers */
|
||||||
if ((b = tty->buf.tail) != NULL) {
|
if ((b = tty->buf.tail) != NULL)
|
||||||
left = b->size - b->used;
|
left = b->size - b->used;
|
||||||
b->active = 1;
|
else
|
||||||
} else
|
|
||||||
left = 0;
|
left = 0;
|
||||||
|
|
||||||
if (left < size) {
|
if (left < size) {
|
||||||
@ -338,12 +336,10 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size)
|
|||||||
if ((n = tty_buffer_find(tty, size)) != NULL) {
|
if ((n = tty_buffer_find(tty, size)) != NULL) {
|
||||||
if (b != NULL) {
|
if (b != NULL) {
|
||||||
b->next = n;
|
b->next = n;
|
||||||
b->active = 0;
|
|
||||||
b->commit = b->used;
|
b->commit = b->used;
|
||||||
} else
|
} else
|
||||||
tty->buf.head = n;
|
tty->buf.head = n;
|
||||||
tty->buf.tail = n;
|
tty->buf.tail = n;
|
||||||
n->active = 1;
|
|
||||||
} else
|
} else
|
||||||
size = left;
|
size = left;
|
||||||
}
|
}
|
||||||
@ -404,10 +400,8 @@ void tty_schedule_flip(struct tty_struct *tty)
|
|||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
spin_lock_irqsave(&tty->buf.lock, flags);
|
spin_lock_irqsave(&tty->buf.lock, flags);
|
||||||
if (tty->buf.tail != NULL) {
|
if (tty->buf.tail != NULL)
|
||||||
tty->buf.tail->active = 0;
|
|
||||||
tty->buf.tail->commit = tty->buf.tail->used;
|
tty->buf.tail->commit = tty->buf.tail->used;
|
||||||
}
|
|
||||||
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
||||||
schedule_delayed_work(&tty->buf.work, 1);
|
schedule_delayed_work(&tty->buf.work, 1);
|
||||||
}
|
}
|
||||||
@ -784,11 +778,8 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
clear_bit(TTY_LDISC, &tty->flags);
|
clear_bit(TTY_LDISC, &tty->flags);
|
||||||
clear_bit(TTY_DONT_FLIP, &tty->flags);
|
if (o_tty)
|
||||||
if (o_tty) {
|
|
||||||
clear_bit(TTY_LDISC, &o_tty->flags);
|
clear_bit(TTY_LDISC, &o_tty->flags);
|
||||||
clear_bit(TTY_DONT_FLIP, &o_tty->flags);
|
|
||||||
}
|
|
||||||
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
|
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1955,7 +1946,6 @@ static void release_dev(struct file * filp)
|
|||||||
* race with the set_ldisc code path.
|
* race with the set_ldisc code path.
|
||||||
*/
|
*/
|
||||||
clear_bit(TTY_LDISC, &tty->flags);
|
clear_bit(TTY_LDISC, &tty->flags);
|
||||||
clear_bit(TTY_DONT_FLIP, &tty->flags);
|
|
||||||
cancel_delayed_work(&tty->buf.work);
|
cancel_delayed_work(&tty->buf.work);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2775,8 +2765,7 @@ static void flush_to_ldisc(void *private_)
|
|||||||
struct tty_struct *tty = (struct tty_struct *) private_;
|
struct tty_struct *tty = (struct tty_struct *) private_;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct tty_ldisc *disc;
|
struct tty_ldisc *disc;
|
||||||
struct tty_buffer *tbuf;
|
struct tty_buffer *tbuf, *head;
|
||||||
int count;
|
|
||||||
char *char_buf;
|
char *char_buf;
|
||||||
unsigned char *flag_buf;
|
unsigned char *flag_buf;
|
||||||
|
|
||||||
@ -2784,32 +2773,37 @@ static void flush_to_ldisc(void *private_)
|
|||||||
if (disc == NULL) /* !TTY_LDISC */
|
if (disc == NULL) /* !TTY_LDISC */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (test_bit(TTY_DONT_FLIP, &tty->flags)) {
|
|
||||||
/*
|
|
||||||
* Do it after the next timer tick:
|
|
||||||
*/
|
|
||||||
schedule_delayed_work(&tty->buf.work, 1);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
spin_lock_irqsave(&tty->buf.lock, flags);
|
spin_lock_irqsave(&tty->buf.lock, flags);
|
||||||
while((tbuf = tty->buf.head) != NULL) {
|
head = tty->buf.head;
|
||||||
while ((count = tbuf->commit - tbuf->read) != 0) {
|
if (head != NULL) {
|
||||||
char_buf = tbuf->char_buf_ptr + tbuf->read;
|
tty->buf.head = NULL;
|
||||||
flag_buf = tbuf->flag_buf_ptr + tbuf->read;
|
for (;;) {
|
||||||
tbuf->read += count;
|
int count = head->commit - head->read;
|
||||||
|
if (!count) {
|
||||||
|
if (head->next == NULL)
|
||||||
|
break;
|
||||||
|
tbuf = head;
|
||||||
|
head = head->next;
|
||||||
|
tty_buffer_free(tty, tbuf);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!tty->receive_room) {
|
||||||
|
schedule_delayed_work(&tty->buf.work, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (count > tty->receive_room)
|
||||||
|
count = tty->receive_room;
|
||||||
|
char_buf = head->char_buf_ptr + head->read;
|
||||||
|
flag_buf = head->flag_buf_ptr + head->read;
|
||||||
|
head->read += count;
|
||||||
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
||||||
disc->receive_buf(tty, char_buf, flag_buf, count);
|
disc->receive_buf(tty, char_buf, flag_buf, count);
|
||||||
spin_lock_irqsave(&tty->buf.lock, flags);
|
spin_lock_irqsave(&tty->buf.lock, flags);
|
||||||
}
|
}
|
||||||
if (tbuf->active)
|
tty->buf.head = head;
|
||||||
break;
|
|
||||||
tty->buf.head = tbuf->next;
|
|
||||||
if (tty->buf.head == NULL)
|
|
||||||
tty->buf.tail = NULL;
|
|
||||||
tty_buffer_free(tty, tbuf);
|
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
||||||
out:
|
|
||||||
tty_ldisc_deref(disc);
|
tty_ldisc_deref(disc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2902,10 +2896,8 @@ void tty_flip_buffer_push(struct tty_struct *tty)
|
|||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
spin_lock_irqsave(&tty->buf.lock, flags);
|
spin_lock_irqsave(&tty->buf.lock, flags);
|
||||||
if (tty->buf.tail != NULL) {
|
if (tty->buf.tail != NULL)
|
||||||
tty->buf.tail->active = 0;
|
|
||||||
tty->buf.tail->commit = tty->buf.tail->used;
|
tty->buf.tail->commit = tty->buf.tail->used;
|
||||||
}
|
|
||||||
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
spin_unlock_irqrestore(&tty->buf.lock, flags);
|
||||||
|
|
||||||
if (tty->low_latency)
|
if (tty->low_latency)
|
||||||
|
@ -17,14 +17,15 @@
|
|||||||
#include <linux/miscdevice.h>
|
#include <linux/miscdevice.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/watchdog.h>
|
#include <linux/watchdog.h>
|
||||||
#include <asm/bitops.h>
|
#include <asm/bitops.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
|
||||||
|
|
||||||
#define WDT_DEFAULT_TIME 5 /* 5 seconds */
|
#define WDT_DEFAULT_TIME 5 /* seconds */
|
||||||
#define WDT_MAX_TIME 256 /* 256 seconds */
|
#define WDT_MAX_TIME 256 /* seconds */
|
||||||
|
|
||||||
static int wdt_time = WDT_DEFAULT_TIME;
|
static int wdt_time = WDT_DEFAULT_TIME;
|
||||||
static int nowayout = WATCHDOG_NOWAYOUT;
|
static int nowayout = WATCHDOG_NOWAYOUT;
|
||||||
@ -32,8 +33,10 @@ static int nowayout = WATCHDOG_NOWAYOUT;
|
|||||||
module_param(wdt_time, int, 0);
|
module_param(wdt_time, int, 0);
|
||||||
MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default="__MODULE_STRING(WDT_DEFAULT_TIME) ")");
|
MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default="__MODULE_STRING(WDT_DEFAULT_TIME) ")");
|
||||||
|
|
||||||
|
#ifdef CONFIG_WATCHDOG_NOWAYOUT
|
||||||
module_param(nowayout, int, 0);
|
module_param(nowayout, int, 0);
|
||||||
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
|
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static unsigned long at91wdt_busy;
|
static unsigned long at91wdt_busy;
|
||||||
@ -138,7 +141,7 @@ static int at91_wdt_ioctl(struct inode *inode, struct file *file,
|
|||||||
case WDIOC_SETTIMEOUT:
|
case WDIOC_SETTIMEOUT:
|
||||||
if (get_user(new_value, p))
|
if (get_user(new_value, p))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (at91_wdt_settimeout(new_value))
|
if (at91_wdt_settimeout(new_value))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -196,27 +199,84 @@ static struct miscdevice at91wdt_miscdev = {
|
|||||||
.fops = &at91wdt_fops,
|
.fops = &at91wdt_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init at91_wdt_init(void)
|
static int __init at91wdt_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
/* Check that the heartbeat value is within range; if not reset to the default */
|
if (at91wdt_miscdev.dev)
|
||||||
if (at91_wdt_settimeout(wdt_time)) {
|
return -EBUSY;
|
||||||
at91_wdt_settimeout(WDT_DEFAULT_TIME);
|
at91wdt_miscdev.dev = &pdev->dev;
|
||||||
printk(KERN_INFO "at91_wdt: wdt_time value must be 1 <= wdt_time <= 256, using %d\n", wdt_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
res = misc_register(&at91wdt_miscdev);
|
res = misc_register(&at91wdt_miscdev);
|
||||||
if (res)
|
if (res)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
printk("AT91 Watchdog Timer enabled (%d seconds, nowayout=%d)\n", wdt_time, nowayout);
|
printk("AT91 Watchdog Timer enabled (%d seconds%s)\n", wdt_time, nowayout ? ", nowayout" : "");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __exit at91wdt_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
|
||||||
|
res = misc_deregister(&at91wdt_miscdev);
|
||||||
|
if (!res)
|
||||||
|
at91wdt_miscdev.dev = NULL;
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void at91wdt_shutdown(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
at91_wdt_stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
|
||||||
|
static int at91wdt_suspend(struct platform_device *pdev, pm_message_t message)
|
||||||
|
{
|
||||||
|
at91_wdt_stop();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int at91wdt_resume(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
if (at91wdt_busy)
|
||||||
|
at91_wdt_start();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define at91wdt_suspend NULL
|
||||||
|
#define at91wdt_resume NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static struct platform_driver at91wdt_driver = {
|
||||||
|
.probe = at91wdt_probe,
|
||||||
|
.remove = __exit_p(at91wdt_remove),
|
||||||
|
.shutdown = at91wdt_shutdown,
|
||||||
|
.suspend = at91wdt_suspend,
|
||||||
|
.resume = at91wdt_resume,
|
||||||
|
.driver = {
|
||||||
|
.name = "at91_wdt",
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init at91_wdt_init(void)
|
||||||
|
{
|
||||||
|
/* Check that the heartbeat value is within range; if not reset to the default */
|
||||||
|
if (at91_wdt_settimeout(wdt_time)) {
|
||||||
|
at91_wdt_settimeout(WDT_DEFAULT_TIME);
|
||||||
|
pr_info("at91_wdt: wdt_time value must be 1 <= wdt_time <= 256, using %d\n", wdt_time);
|
||||||
|
}
|
||||||
|
|
||||||
|
return platform_driver_register(&at91wdt_driver);
|
||||||
|
}
|
||||||
|
|
||||||
static void __exit at91_wdt_exit(void)
|
static void __exit at91_wdt_exit(void)
|
||||||
{
|
{
|
||||||
misc_deregister(&at91wdt_miscdev);
|
platform_driver_unregister(&at91wdt_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(at91_wdt_init);
|
module_init(at91_wdt_init);
|
||||||
|
@ -205,6 +205,23 @@ static int tco_timer_set_heartbeat (int t)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int tco_timer_get_timeleft (int *time_left)
|
||||||
|
{
|
||||||
|
unsigned char val;
|
||||||
|
|
||||||
|
spin_lock(&tco_lock);
|
||||||
|
|
||||||
|
/* read the TCO Timer */
|
||||||
|
val = inb (TCO1_RLD);
|
||||||
|
val &= 0x3f;
|
||||||
|
|
||||||
|
spin_unlock(&tco_lock);
|
||||||
|
|
||||||
|
*time_left = (int)((val * 6) / 10);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* /dev/watchdog handling
|
* /dev/watchdog handling
|
||||||
*/
|
*/
|
||||||
@ -272,6 +289,7 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
|
|||||||
{
|
{
|
||||||
int new_options, retval = -EINVAL;
|
int new_options, retval = -EINVAL;
|
||||||
int new_heartbeat;
|
int new_heartbeat;
|
||||||
|
int time_left;
|
||||||
void __user *argp = (void __user *)arg;
|
void __user *argp = (void __user *)arg;
|
||||||
int __user *p = argp;
|
int __user *p = argp;
|
||||||
static struct watchdog_info ident = {
|
static struct watchdog_info ident = {
|
||||||
@ -320,7 +338,7 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (tco_timer_set_heartbeat(new_heartbeat))
|
if (tco_timer_set_heartbeat(new_heartbeat))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
tco_timer_keepalive ();
|
tco_timer_keepalive ();
|
||||||
/* Fall */
|
/* Fall */
|
||||||
@ -329,6 +347,14 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
|
|||||||
case WDIOC_GETTIMEOUT:
|
case WDIOC_GETTIMEOUT:
|
||||||
return put_user(heartbeat, p);
|
return put_user(heartbeat, p);
|
||||||
|
|
||||||
|
case WDIOC_GETTIMELEFT:
|
||||||
|
{
|
||||||
|
if (tco_timer_get_timeleft(&time_left))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
return put_user(time_left, p);
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -ENOIOCTLCMD;
|
return -ENOIOCTLCMD;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A bells and whistles driver is available from:
|
* A bells and whistles driver is available from:
|
||||||
* http://www.kernel.org/pub/linux/kernel/people/wim/pcwd/pcwd_pci/
|
* http://www.kernel.org/pub/linux/kernel/people/wim/pcwd/pcwd_pci/
|
||||||
*
|
*
|
||||||
* More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/
|
* More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/
|
||||||
@ -390,6 +390,24 @@ static int pcipcwd_get_temperature(int *temperature)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int pcipcwd_get_timeleft(int *time_left)
|
||||||
|
{
|
||||||
|
int msb;
|
||||||
|
int lsb;
|
||||||
|
|
||||||
|
/* Read the time that's left before rebooting */
|
||||||
|
/* Note: if the board is not yet armed then we will read 0xFFFF */
|
||||||
|
send_command(CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb);
|
||||||
|
|
||||||
|
*time_left = (msb << 8) + lsb;
|
||||||
|
|
||||||
|
if (debug >= VERBOSE)
|
||||||
|
printk(KERN_DEBUG PFX "Time left before next reboot: %d\n",
|
||||||
|
*time_left);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* /dev/watchdog handling
|
* /dev/watchdog handling
|
||||||
*/
|
*/
|
||||||
@ -512,6 +530,16 @@ static int pcipcwd_ioctl(struct inode *inode, struct file *file,
|
|||||||
case WDIOC_GETTIMEOUT:
|
case WDIOC_GETTIMEOUT:
|
||||||
return put_user(heartbeat, p);
|
return put_user(heartbeat, p);
|
||||||
|
|
||||||
|
case WDIOC_GETTIMELEFT:
|
||||||
|
{
|
||||||
|
int time_left;
|
||||||
|
|
||||||
|
if (pcipcwd_get_timeleft(&time_left))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
|
return put_user(time_left, p);
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -ENOIOCTLCMD;
|
return -ENOIOCTLCMD;
|
||||||
}
|
}
|
||||||
|
@ -317,6 +317,19 @@ static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, int *temp
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd, int *time_left)
|
||||||
|
{
|
||||||
|
unsigned char msb, lsb;
|
||||||
|
|
||||||
|
/* Read the time that's left before rebooting */
|
||||||
|
/* Note: if the board is not yet armed then we will read 0xFFFF */
|
||||||
|
usb_pcwd_send_command(usb_pcwd, CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb);
|
||||||
|
|
||||||
|
*time_left = (msb << 8) + lsb;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* /dev/watchdog handling
|
* /dev/watchdog handling
|
||||||
*/
|
*/
|
||||||
@ -422,6 +435,16 @@ static int usb_pcwd_ioctl(struct inode *inode, struct file *file,
|
|||||||
case WDIOC_GETTIMEOUT:
|
case WDIOC_GETTIMEOUT:
|
||||||
return put_user(heartbeat, p);
|
return put_user(heartbeat, p);
|
||||||
|
|
||||||
|
case WDIOC_GETTIMELEFT:
|
||||||
|
{
|
||||||
|
int time_left;
|
||||||
|
|
||||||
|
if (usb_pcwd_get_timeleft(usb_pcwd_device, &time_left))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
|
return put_user(time_left, p);
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -ENOIOCTLCMD;
|
return -ENOIOCTLCMD;
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ)
|
if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ && hwif->err_stops_fifo == 0)
|
||||||
try_to_flush_leftover_data(drive);
|
try_to_flush_leftover_data(drive);
|
||||||
|
|
||||||
if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
|
if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
|
||||||
|
@ -597,6 +597,10 @@ u8 eighty_ninty_three (ide_drive_t *drive)
|
|||||||
{
|
{
|
||||||
if(HWIF(drive)->udma_four == 0)
|
if(HWIF(drive)->udma_four == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* Check for SATA but only if we are ATA5 or higher */
|
||||||
|
if (drive->id->hw_config == 0 && (drive->id->major_rev_num & 0x7FE0))
|
||||||
|
return 1;
|
||||||
if (!(drive->id->hw_config & 0x6000))
|
if (!(drive->id->hw_config & 0x6000))
|
||||||
return 0;
|
return 0;
|
||||||
#ifndef CONFIG_IDEDMA_IVB
|
#ifndef CONFIG_IDEDMA_IVB
|
||||||
|
@ -22,7 +22,7 @@ struct chipset_bus_clock_list_entry {
|
|||||||
u8 ultra_settings;
|
u8 ultra_settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct chipset_bus_clock_list_entry aec6xxx_33_base [] = {
|
static const struct chipset_bus_clock_list_entry aec6xxx_33_base [] = {
|
||||||
{ XFER_UDMA_6, 0x31, 0x07 },
|
{ XFER_UDMA_6, 0x31, 0x07 },
|
||||||
{ XFER_UDMA_5, 0x31, 0x06 },
|
{ XFER_UDMA_5, 0x31, 0x06 },
|
||||||
{ XFER_UDMA_4, 0x31, 0x05 },
|
{ XFER_UDMA_4, 0x31, 0x05 },
|
||||||
@ -42,7 +42,7 @@ static struct chipset_bus_clock_list_entry aec6xxx_33_base [] = {
|
|||||||
{ 0, 0x00, 0x00 }
|
{ 0, 0x00, 0x00 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct chipset_bus_clock_list_entry aec6xxx_34_base [] = {
|
static const struct chipset_bus_clock_list_entry aec6xxx_34_base [] = {
|
||||||
{ XFER_UDMA_6, 0x41, 0x06 },
|
{ XFER_UDMA_6, 0x41, 0x06 },
|
||||||
{ XFER_UDMA_5, 0x41, 0x05 },
|
{ XFER_UDMA_5, 0x41, 0x05 },
|
||||||
{ XFER_UDMA_4, 0x41, 0x04 },
|
{ XFER_UDMA_4, 0x41, 0x04 },
|
||||||
@ -425,12 +425,12 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
|
|||||||
return d->init_setup(dev, d);
|
return d->init_setup(dev, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id aec62xx_pci_tbl[] = {
|
static const struct pci_device_id aec62xx_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 },
|
||||||
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 },
|
||||||
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 },
|
||||||
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 },
|
||||||
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
|
{ PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 },
|
||||||
{ 0, },
|
{ 0, },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl);
|
||||||
|
@ -189,14 +189,6 @@ static int cmd64x_get_info (char *buffer, char **addr, off_t offset, int count)
|
|||||||
|
|
||||||
#endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */
|
#endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */
|
||||||
|
|
||||||
/*
|
|
||||||
* Registers and masks for easy access by drive index:
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
static u8 prefetch_regs[4] = {CNTRL, CNTRL, ARTTIM23, ARTTIM23};
|
|
||||||
static u8 prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine writes the prepared setup/active/recovery counts
|
* This routine writes the prepared setup/active/recovery counts
|
||||||
* for a drive into the cmd646 chipset registers to active them.
|
* for a drive into the cmd646 chipset registers to active them.
|
||||||
@ -606,13 +598,6 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha
|
|||||||
pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
|
pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
|
||||||
class_rev &= 0xff;
|
class_rev &= 0xff;
|
||||||
|
|
||||||
#ifdef __i386__
|
|
||||||
if (dev->resource[PCI_ROM_RESOURCE].start) {
|
|
||||||
pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
|
|
||||||
printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch(dev->device) {
|
switch(dev->device) {
|
||||||
case PCI_DEVICE_ID_CMD_643:
|
case PCI_DEVICE_ID_CMD_643:
|
||||||
break;
|
break;
|
||||||
|
@ -338,6 +338,8 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
|
|||||||
hwif->ultra_mask = 0x7f;
|
hwif->ultra_mask = 0x7f;
|
||||||
hwif->mwdma_mask = 0x07;
|
hwif->mwdma_mask = 0x07;
|
||||||
|
|
||||||
|
hwif->err_stops_fifo = 1;
|
||||||
|
|
||||||
hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate;
|
hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate;
|
||||||
hwif->ide_dma_lostirq = &pdcnew_ide_dma_lostirq;
|
hwif->ide_dma_lostirq = &pdcnew_ide_dma_lostirq;
|
||||||
hwif->ide_dma_timeout = &pdcnew_ide_dma_timeout;
|
hwif->ide_dma_timeout = &pdcnew_ide_dma_timeout;
|
||||||
|
@ -101,31 +101,6 @@ static const char *pdc_quirk_drives[] = {
|
|||||||
#define MC1 0x02 /* DMA"C" timing */
|
#define MC1 0x02 /* DMA"C" timing */
|
||||||
#define MC0 0x01 /* DMA"C" timing */
|
#define MC0 0x01 /* DMA"C" timing */
|
||||||
|
|
||||||
#if 0
|
|
||||||
unsigned long bibma = pci_resource_start(dev, 4);
|
|
||||||
u8 hi = 0, lo = 0;
|
|
||||||
|
|
||||||
u8 sc1c = inb_p((u16)bibma + 0x1c);
|
|
||||||
u8 sc1e = inb_p((u16)bibma + 0x1e);
|
|
||||||
u8 sc1f = inb_p((u16)bibma + 0x1f);
|
|
||||||
|
|
||||||
p += sprintf(p, "Host Mode : %s\n",
|
|
||||||
(sc1f & 0x08) ? "Tri-Stated" : "Normal");
|
|
||||||
p += sprintf(p, "Bus Clocking : %s\n",
|
|
||||||
((sc1f & 0xC0) == 0xC0) ? "100 External" :
|
|
||||||
((sc1f & 0x80) == 0x80) ? "66 External" :
|
|
||||||
((sc1f & 0x40) == 0x40) ? "33 External" : "33 PCI Internal");
|
|
||||||
p += sprintf(p, "IO pad select : %s mA\n",
|
|
||||||
((sc1c & 0x03) == 0x03) ? "10" :
|
|
||||||
((sc1c & 0x02) == 0x02) ? "8" :
|
|
||||||
((sc1c & 0x01) == 0x01) ? "6" :
|
|
||||||
((sc1c & 0x00) == 0x00) ? "4" : "??");
|
|
||||||
hi = sc1e >> 4;
|
|
||||||
lo = sc1e & 0xf;
|
|
||||||
p += sprintf(p, "Status Polling Period : %d\n", hi);
|
|
||||||
p += sprintf(p, "Interrupt Check Status Polling Delay : %d\n", lo);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static u8 pdc202xx_ratemask (ide_drive_t *drive)
|
static u8 pdc202xx_ratemask (ide_drive_t *drive)
|
||||||
{
|
{
|
||||||
u8 mode;
|
u8 mode;
|
||||||
@ -505,42 +480,13 @@ static void pdc202xx_reset (ide_drive_t *drive)
|
|||||||
|
|
||||||
pdc202xx_reset_host(hwif);
|
pdc202xx_reset_host(hwif);
|
||||||
pdc202xx_reset_host(mate);
|
pdc202xx_reset_host(mate);
|
||||||
#if 0
|
|
||||||
/*
|
|
||||||
* FIXME: Have to kick all the drives again :-/
|
|
||||||
* What a pain in the ACE!
|
|
||||||
*/
|
|
||||||
if (hwif->present) {
|
|
||||||
u16 hunit = 0;
|
|
||||||
for (hunit = 0; hunit < MAX_DRIVES; ++hunit) {
|
|
||||||
ide_drive_t *hdrive = &hwif->drives[hunit];
|
|
||||||
if (hdrive->present) {
|
|
||||||
if (hwif->ide_dma_check)
|
|
||||||
hwif->ide_dma_check(hdrive);
|
|
||||||
else
|
|
||||||
hwif->tuneproc(hdrive, 5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mate->present) {
|
|
||||||
u16 munit = 0;
|
|
||||||
for (munit = 0; munit < MAX_DRIVES; ++munit) {
|
|
||||||
ide_drive_t *mdrive = &mate->drives[munit];
|
|
||||||
if (mdrive->present) {
|
|
||||||
if (mate->ide_dma_check)
|
|
||||||
mate->ide_dma_check(mdrive);
|
|
||||||
else
|
|
||||||
mate->tuneproc(mdrive, 5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
hwif->tuneproc(drive, 5);
|
hwif->tuneproc(drive, 5);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const char *name)
|
static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev,
|
||||||
|
const char *name)
|
||||||
{
|
{
|
||||||
|
/* This doesn't appear needed */
|
||||||
if (dev->resource[PCI_ROM_RESOURCE].start) {
|
if (dev->resource[PCI_ROM_RESOURCE].start) {
|
||||||
pci_write_config_dword(dev, PCI_ROM_ADDRESS,
|
pci_write_config_dword(dev, PCI_ROM_ADDRESS,
|
||||||
dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
|
dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
|
||||||
@ -548,30 +494,6 @@ static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const c
|
|||||||
name, dev->resource[PCI_ROM_RESOURCE].start);
|
name, dev->resource[PCI_ROM_RESOURCE].start);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* software reset - this is required because the bios
|
|
||||||
* will set UDMA timing on if the hdd supports it. The
|
|
||||||
* user may want to turn udma off. A bug in the pdc20262
|
|
||||||
* is that it cannot handle a downgrade in timing from
|
|
||||||
* UDMA to DMA. Disk accesses after issuing a set
|
|
||||||
* feature command will result in errors. A software
|
|
||||||
* reset leaves the timing registers intact,
|
|
||||||
* but resets the drives.
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
if ((dev->device == PCI_DEVICE_ID_PROMISE_20267) ||
|
|
||||||
(dev->device == PCI_DEVICE_ID_PROMISE_20265) ||
|
|
||||||
(dev->device == PCI_DEVICE_ID_PROMISE_20263) ||
|
|
||||||
(dev->device == PCI_DEVICE_ID_PROMISE_20262)) {
|
|
||||||
unsigned long high_16 = pci_resource_start(dev, 4);
|
|
||||||
byte udma_speed_flag = inb(high_16 + 0x001f);
|
|
||||||
outb(udma_speed_flag | 0x10, high_16 + 0x001f);
|
|
||||||
mdelay(100);
|
|
||||||
outb(udma_speed_flag & ~0x10, high_16 + 0x001f);
|
|
||||||
mdelay(2000); /* 2 seconds ?! */
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return dev->irq;
|
return dev->irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,6 +521,8 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
|
|||||||
hwif->mwdma_mask = 0x07;
|
hwif->mwdma_mask = 0x07;
|
||||||
hwif->swdma_mask = 0x07;
|
hwif->swdma_mask = 0x07;
|
||||||
|
|
||||||
|
hwif->err_stops_fifo = 1;
|
||||||
|
|
||||||
hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate;
|
hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate;
|
||||||
hwif->ide_dma_lostirq = &pdc202xx_ide_dma_lostirq;
|
hwif->ide_dma_lostirq = &pdc202xx_ide_dma_lostirq;
|
||||||
hwif->ide_dma_timeout = &pdc202xx_ide_dma_timeout;
|
hwif->ide_dma_timeout = &pdc202xx_ide_dma_timeout;
|
||||||
@ -687,19 +611,6 @@ static int __devinit init_setup_pdc202ata4(struct pci_dev *dev,
|
|||||||
"mirror fixed.\n", d->name);
|
"mirror fixed.\n", d->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (dev->device == PCI_DEVICE_ID_PROMISE_20262)
|
|
||||||
if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
|
|
||||||
(tmp & e->mask) != e->val))
|
|
||||||
|
|
||||||
if (d->enablebits[0].reg != d->enablebits[1].reg) {
|
|
||||||
d->enablebits[0].reg = d->enablebits[1].reg;
|
|
||||||
d->enablebits[0].mask = d->enablebits[1].mask;
|
|
||||||
d->enablebits[0].val = d->enablebits[1].val;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ide_setup_pci_device(dev, d);
|
return ide_setup_pci_device(dev, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -714,22 +625,6 @@ static int __devinit init_setup_pdc20265(struct pci_dev *dev,
|
|||||||
"attached to I2O RAID controller.\n");
|
"attached to I2O RAID controller.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
u8 pri = 0, sec = 0;
|
|
||||||
|
|
||||||
if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
|
|
||||||
(tmp & e->mask) != e->val))
|
|
||||||
|
|
||||||
if (d->enablebits[0].reg != d->enablebits[1].reg) {
|
|
||||||
d->enablebits[0].reg = d->enablebits[1].reg;
|
|
||||||
d->enablebits[0].mask = d->enablebits[1].mask;
|
|
||||||
d->enablebits[0].val = d->enablebits[1].val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ide_setup_pci_device(dev, d);
|
return ide_setup_pci_device(dev, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,7 +395,6 @@ static int sc1200_resume (struct pci_dev *dev)
|
|||||||
{
|
{
|
||||||
ide_hwif_t *hwif = NULL;
|
ide_hwif_t *hwif = NULL;
|
||||||
|
|
||||||
printk("SC1200: resume\n");
|
|
||||||
pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state
|
pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state
|
||||||
dev->current_state = PM_EVENT_ON;
|
dev->current_state = PM_EVENT_ON;
|
||||||
pci_enable_device(dev);
|
pci_enable_device(dev);
|
||||||
@ -405,7 +404,6 @@ printk("SC1200: resume\n");
|
|||||||
while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) {
|
while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) {
|
||||||
unsigned int basereg, r, d, format;
|
unsigned int basereg, r, d, format;
|
||||||
sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data;
|
sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data;
|
||||||
printk("%s: SC1200: resume\n", hwif->name);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Restore timing registers: this may be unnecessary if BIOS also does it
|
// Restore timing registers: this may be unnecessary if BIOS also does it
|
||||||
@ -493,7 +491,7 @@ static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_devic
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id sc1200_pci_tbl[] = {
|
static struct pci_device_id sc1200_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE), 0},
|
||||||
{ 0, },
|
{ 0, },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl);
|
||||||
|
@ -123,11 +123,11 @@ static u8 svwks_csb_check (struct pci_dev *dev)
|
|||||||
}
|
}
|
||||||
static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed)
|
static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed)
|
||||||
{
|
{
|
||||||
u8 udma_modes[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
|
static const u8 udma_modes[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
|
||||||
u8 dma_modes[] = { 0x77, 0x21, 0x20 };
|
static const u8 dma_modes[] = { 0x77, 0x21, 0x20 };
|
||||||
u8 pio_modes[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
|
static const u8 pio_modes[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
|
||||||
u8 drive_pci[] = { 0x41, 0x40, 0x43, 0x42 };
|
static const u8 drive_pci[] = { 0x41, 0x40, 0x43, 0x42 };
|
||||||
u8 drive_pci2[] = { 0x45, 0x44, 0x47, 0x46 };
|
static const u8 drive_pci2[] = { 0x45, 0x44, 0x47, 0x46 };
|
||||||
|
|
||||||
ide_hwif_t *hwif = HWIF(drive);
|
ide_hwif_t *hwif = HWIF(drive);
|
||||||
struct pci_dev *dev = hwif->pci_dev;
|
struct pci_dev *dev = hwif->pci_dev;
|
||||||
@ -392,16 +392,6 @@ static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const cha
|
|||||||
}
|
}
|
||||||
outb_p(0x06, 0x0c00);
|
outb_p(0x06, 0x0c00);
|
||||||
dev->irq = inb_p(0x0c01);
|
dev->irq = inb_p(0x0c01);
|
||||||
#if 0
|
|
||||||
printk("%s: device class (0x%04x)\n",
|
|
||||||
name, dev->class);
|
|
||||||
if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
|
|
||||||
dev->class &= ~0x000F0F00;
|
|
||||||
// dev->class |= ~0x00000400;
|
|
||||||
dev->class |= ~0x00010100;
|
|
||||||
/**/
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
struct pci_dev * findev = NULL;
|
struct pci_dev * findev = NULL;
|
||||||
u8 reg41 = 0;
|
u8 reg41 = 0;
|
||||||
@ -452,7 +442,7 @@ static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const cha
|
|||||||
pci_write_config_byte(dev, 0x5A, btr);
|
pci_write_config_byte(dev, 0x5A, btr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (dev->irq) ? dev->irq : 0;
|
return dev->irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
|
static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
|
||||||
@ -500,11 +490,6 @@ static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
|
|||||||
{
|
{
|
||||||
struct pci_dev *dev = hwif->pci_dev;
|
struct pci_dev *dev = hwif->pci_dev;
|
||||||
|
|
||||||
/* Per Specified Design by OEM, and ASIC Architect */
|
|
||||||
if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) ||
|
|
||||||
(dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* Server Works */
|
/* Server Works */
|
||||||
if (dev->subsystem_vendor == PCI_VENDOR_ID_SERVERWORKS)
|
if (dev->subsystem_vendor == PCI_VENDOR_ID_SERVERWORKS)
|
||||||
return ata66_svwks_svwks (hwif);
|
return ata66_svwks_svwks (hwif);
|
||||||
@ -517,10 +502,14 @@ static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
|
|||||||
if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN)
|
if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN)
|
||||||
return ata66_svwks_cobalt (hwif);
|
return ata66_svwks_cobalt (hwif);
|
||||||
|
|
||||||
|
/* Per Specified Design by OEM, and ASIC Architect */
|
||||||
|
if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) ||
|
||||||
|
(dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2))
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef CAN_SW_DMA
|
|
||||||
static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
|
static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
|
||||||
{
|
{
|
||||||
u8 dma_stat = 0;
|
u8 dma_stat = 0;
|
||||||
@ -537,9 +526,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
|
|||||||
hwif->ultra_mask = 0x3f;
|
hwif->ultra_mask = 0x3f;
|
||||||
|
|
||||||
hwif->mwdma_mask = 0x07;
|
hwif->mwdma_mask = 0x07;
|
||||||
#ifdef CAN_SW_DMA
|
|
||||||
hwif->swdma_mask = 0x07;
|
|
||||||
#endif /* CAN_SW_DMA */
|
|
||||||
|
|
||||||
hwif->autodma = 0;
|
hwif->autodma = 0;
|
||||||
|
|
||||||
@ -562,8 +548,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
|
|||||||
hwif->drives[1].autodma = (dma_stat & 0x40);
|
hwif->drives[1].autodma = (dma_stat & 0x40);
|
||||||
hwif->drives[0].autotune = (!(dma_stat & 0x20));
|
hwif->drives[0].autotune = (!(dma_stat & 0x20));
|
||||||
hwif->drives[1].autotune = (!(dma_stat & 0x40));
|
hwif->drives[1].autotune = (!(dma_stat & 0x40));
|
||||||
// hwif->drives[0].autodma = hwif->autodma;
|
|
||||||
// hwif->drives[1].autodma = hwif->autodma;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -593,11 +577,6 @@ static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
|
|||||||
if (dev->resource[0].start == 0x01f1)
|
if (dev->resource[0].start == 0x01f1)
|
||||||
d->bootable = ON_BOARD;
|
d->bootable = ON_BOARD;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
if ((IDE_PCI_DEVID_EQ(d->devid, DEVID_CSB6) &&
|
|
||||||
(!(PCI_FUNC(dev->devfn) & 1)))
|
|
||||||
d->autodma = AUTODMA;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
|
d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE ||
|
||||||
dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
|
dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) &&
|
||||||
@ -671,11 +650,11 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id svwks_pci_tbl[] = {
|
static struct pci_device_id svwks_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},
|
||||||
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
|
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1},
|
||||||
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
|
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2},
|
||||||
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
|
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3},
|
||||||
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
|
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4},
|
||||||
{ 0, },
|
{ 0, },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);
|
||||||
|
@ -38,9 +38,6 @@
|
|||||||
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
#undef SIIMAGE_VIRTUAL_DMAPIO
|
|
||||||
#undef SIIMAGE_LARGE_DMA
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pdev_is_sata - check if device is SATA
|
* pdev_is_sata - check if device is SATA
|
||||||
* @pdev: PCI device to check
|
* @pdev: PCI device to check
|
||||||
@ -461,36 +458,6 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/**
|
|
||||||
* siimage_mmio_ide_dma_count - DMA bytes done
|
|
||||||
* @drive
|
|
||||||
*
|
|
||||||
* If we are doing VDMA the CMD680 requires a little bit
|
|
||||||
* of more careful handling and we have to read the counts
|
|
||||||
* off ourselves. For non VDMA life is normal.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int siimage_mmio_ide_dma_count (ide_drive_t *drive)
|
|
||||||
{
|
|
||||||
#ifdef SIIMAGE_VIRTUAL_DMAPIO
|
|
||||||
struct request *rq = HWGROUP(drive)->rq;
|
|
||||||
ide_hwif_t *hwif = HWIF(drive);
|
|
||||||
u32 count = (rq->nr_sectors * SECTOR_SIZE);
|
|
||||||
u32 rcount = 0;
|
|
||||||
unsigned long addr = siimage_selreg(hwif, 0x1C);
|
|
||||||
|
|
||||||
hwif->OUTL(count, addr);
|
|
||||||
rcount = hwif->INL(addr);
|
|
||||||
|
|
||||||
printk("\n%s: count = %d, rcount = %d, nr_sectors = %lu\n",
|
|
||||||
drive->name, count, rcount, rq->nr_sectors);
|
|
||||||
|
|
||||||
#endif /* SIIMAGE_VIRTUAL_DMAPIO */
|
|
||||||
return __ide_dma_count(drive);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* siimage_mmio_ide_dma_test_irq - check we caused an IRQ
|
* siimage_mmio_ide_dma_test_irq - check we caused an IRQ
|
||||||
* @drive: drive we are testing
|
* @drive: drive we are testing
|
||||||
@ -512,12 +479,10 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive)
|
|||||||
u32 sata_error = hwif->INL(SATA_ERROR_REG);
|
u32 sata_error = hwif->INL(SATA_ERROR_REG);
|
||||||
hwif->OUTL(sata_error, SATA_ERROR_REG);
|
hwif->OUTL(sata_error, SATA_ERROR_REG);
|
||||||
watchdog = (sata_error & 0x00680000) ? 1 : 0;
|
watchdog = (sata_error & 0x00680000) ? 1 : 0;
|
||||||
#if 1
|
|
||||||
printk(KERN_WARNING "%s: sata_error = 0x%08x, "
|
printk(KERN_WARNING "%s: sata_error = 0x%08x, "
|
||||||
"watchdog = %d, %s\n",
|
"watchdog = %d, %s\n",
|
||||||
drive->name, sata_error, watchdog,
|
drive->name, sata_error, watchdog,
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
#endif
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
watchdog = (ext_stat & 0x8000) ? 1 : 0;
|
watchdog = (ext_stat & 0x8000) ? 1 : 0;
|
||||||
@ -863,7 +828,7 @@ static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const ch
|
|||||||
* time.
|
* time.
|
||||||
*
|
*
|
||||||
* The hardware supports buffered taskfiles and also some rather nice
|
* The hardware supports buffered taskfiles and also some rather nice
|
||||||
* extended PRD tables. Unfortunately right now we don't.
|
* extended PRD tables. For better SI3112 support use the libata driver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
|
static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
|
||||||
@ -900,9 +865,6 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
|
|||||||
* so we can't currently use it sanely since we want to
|
* so we can't currently use it sanely since we want to
|
||||||
* use LBA48 mode.
|
* use LBA48 mode.
|
||||||
*/
|
*/
|
||||||
// base += 0x10;
|
|
||||||
// hwif->no_lba48 = 1;
|
|
||||||
|
|
||||||
hw.io_ports[IDE_DATA_OFFSET] = base;
|
hw.io_ports[IDE_DATA_OFFSET] = base;
|
||||||
hw.io_ports[IDE_ERROR_OFFSET] = base + 1;
|
hw.io_ports[IDE_ERROR_OFFSET] = base + 1;
|
||||||
hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2;
|
hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2;
|
||||||
@ -936,15 +898,8 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
|
|||||||
|
|
||||||
base = (unsigned long) addr;
|
base = (unsigned long) addr;
|
||||||
|
|
||||||
#ifdef SIIMAGE_LARGE_DMA
|
|
||||||
/* Watch the brackets - even Ken and Dennis get some language design wrong */
|
|
||||||
hwif->dma_base = base + (ch ? 0x18 : 0x10);
|
|
||||||
hwif->dma_base2 = base + (ch ? 0x08 : 0x00);
|
|
||||||
hwif->dma_prdtable = hwif->dma_base2 + 4;
|
|
||||||
#else /* ! SIIMAGE_LARGE_DMA */
|
|
||||||
hwif->dma_base = base + (ch ? 0x08 : 0x00);
|
hwif->dma_base = base + (ch ? 0x08 : 0x00);
|
||||||
hwif->dma_base2 = base + (ch ? 0x18 : 0x10);
|
hwif->dma_base2 = base + (ch ? 0x18 : 0x10);
|
||||||
#endif /* SIIMAGE_LARGE_DMA */
|
|
||||||
hwif->mmio = 2;
|
hwif->mmio = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1052,9 +1007,16 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
|
|||||||
hwif->reset_poll = &siimage_reset_poll;
|
hwif->reset_poll = &siimage_reset_poll;
|
||||||
hwif->pre_reset = &siimage_pre_reset;
|
hwif->pre_reset = &siimage_pre_reset;
|
||||||
|
|
||||||
if(is_sata(hwif))
|
if(is_sata(hwif)) {
|
||||||
|
static int first = 1;
|
||||||
|
|
||||||
hwif->busproc = &siimage_busproc;
|
hwif->busproc = &siimage_busproc;
|
||||||
|
|
||||||
|
if (first) {
|
||||||
|
printk(KERN_INFO "siimage: For full SATA support you should use the libata sata_sil module.\n");
|
||||||
|
first = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!hwif->dma_base) {
|
if (!hwif->dma_base) {
|
||||||
hwif->drives[0].autotune = 1;
|
hwif->drives[0].autotune = 1;
|
||||||
hwif->drives[1].autotune = 1;
|
hwif->drives[1].autotune = 1;
|
||||||
@ -1121,10 +1083,10 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id siimage_pci_tbl[] = {
|
static struct pci_device_id siimage_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
{ PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), 0},
|
||||||
#ifdef CONFIG_BLK_DEV_IDE_SATA
|
#ifdef CONFIG_BLK_DEV_IDE_SATA
|
||||||
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
|
{ PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1},
|
||||||
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
|
{ PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2},
|
||||||
#endif
|
#endif
|
||||||
{ 0, },
|
{ 0, },
|
||||||
};
|
};
|
||||||
|
@ -447,7 +447,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
|
|||||||
printk(" %s: Winbond 553 bridge revision %d, BM-DMA disabled\n",
|
printk(" %s: Winbond 553 bridge revision %d, BM-DMA disabled\n",
|
||||||
hwif->name, rev);
|
hwif->name, rev);
|
||||||
} else {
|
} else {
|
||||||
#ifdef CONFIG_BLK_DEV_IDEDMA
|
|
||||||
dma_state |= 0x60;
|
dma_state |= 0x60;
|
||||||
|
|
||||||
hwif->atapi_dma = 1;
|
hwif->atapi_dma = 1;
|
||||||
@ -468,7 +467,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
|
|||||||
|
|
||||||
if (hwif->mate)
|
if (hwif->mate)
|
||||||
hwif->serialized = hwif->mate->serialized = 1;
|
hwif->serialized = hwif->mate->serialized = 1;
|
||||||
#endif /* CONFIG_BLK_DEV_IDEDMA */
|
|
||||||
}
|
}
|
||||||
hwif->OUTB(dma_state, hwif->dma_base + 2);
|
hwif->OUTB(dma_state, hwif->dma_base + 2);
|
||||||
}
|
}
|
||||||
@ -489,7 +487,7 @@ static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_dev
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id sl82c105_pci_tbl[] = {
|
static struct pci_device_id sl82c105_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
{ PCI_DEVICE(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105), 0},
|
||||||
{ 0, },
|
{ 0, },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, sl82c105_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, sl82c105_pci_tbl);
|
||||||
|
@ -72,7 +72,8 @@ static void slc90e66_tune_drive (ide_drive_t *drive, u8 pio)
|
|||||||
u16 master_data;
|
u16 master_data;
|
||||||
u8 slave_data;
|
u8 slave_data;
|
||||||
/* ISP RTC */
|
/* ISP RTC */
|
||||||
u8 timings[][2] = { { 0, 0 },
|
static const u8 timings[][2]= {
|
||||||
|
{ 0, 0 },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
{ 1, 0 },
|
{ 1, 0 },
|
||||||
{ 2, 1 },
|
{ 2, 1 },
|
||||||
@ -119,7 +120,6 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
|
|||||||
pci_read_config_word(dev, 0x4a, ®4a);
|
pci_read_config_word(dev, 0x4a, ®4a);
|
||||||
|
|
||||||
switch(speed) {
|
switch(speed) {
|
||||||
#ifdef CONFIG_BLK_DEV_IDEDMA
|
|
||||||
case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break;
|
case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break;
|
||||||
case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break;
|
case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break;
|
||||||
case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break;
|
case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break;
|
||||||
@ -128,7 +128,6 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
|
|||||||
case XFER_MW_DMA_2:
|
case XFER_MW_DMA_2:
|
||||||
case XFER_MW_DMA_1:
|
case XFER_MW_DMA_1:
|
||||||
case XFER_SW_DMA_2: break;
|
case XFER_SW_DMA_2: break;
|
||||||
#endif /* CONFIG_BLK_DEV_IDEDMA */
|
|
||||||
case XFER_PIO_4:
|
case XFER_PIO_4:
|
||||||
case XFER_PIO_3:
|
case XFER_PIO_3:
|
||||||
case XFER_PIO_2:
|
case XFER_PIO_2:
|
||||||
@ -156,7 +155,6 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed)
|
|||||||
return (ide_config_drive_speed(drive, speed));
|
return (ide_config_drive_speed(drive, speed));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_IDEDMA
|
|
||||||
static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
|
static int slc90e66_config_drive_for_dma (ide_drive_t *drive)
|
||||||
{
|
{
|
||||||
u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive));
|
u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive));
|
||||||
@ -194,7 +192,6 @@ static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive)
|
|||||||
/* IORDY not supported */
|
/* IORDY not supported */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BLK_DEV_IDEDMA */
|
|
||||||
|
|
||||||
static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
|
static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
|
||||||
{
|
{
|
||||||
@ -222,7 +219,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
|
|||||||
hwif->mwdma_mask = 0x07;
|
hwif->mwdma_mask = 0x07;
|
||||||
hwif->swdma_mask = 0x07;
|
hwif->swdma_mask = 0x07;
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_IDEDMA
|
|
||||||
if (!(hwif->udma_four))
|
if (!(hwif->udma_four))
|
||||||
/* bit[0(1)]: 0:80, 1:40 */
|
/* bit[0(1)]: 0:80, 1:40 */
|
||||||
hwif->udma_four = (reg47 & mask) ? 0 : 1;
|
hwif->udma_four = (reg47 & mask) ? 0 : 1;
|
||||||
@ -232,7 +228,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
|
|||||||
hwif->autodma = 1;
|
hwif->autodma = 1;
|
||||||
hwif->drives[0].autodma = hwif->autodma;
|
hwif->drives[0].autodma = hwif->autodma;
|
||||||
hwif->drives[1].autodma = hwif->autodma;
|
hwif->drives[1].autodma = hwif->autodma;
|
||||||
#endif /* !CONFIG_BLK_DEV_IDEDMA */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ide_pci_device_t slc90e66_chipset __devinitdata = {
|
static ide_pci_device_t slc90e66_chipset __devinitdata = {
|
||||||
@ -250,7 +245,7 @@ static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_dev
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_device_id slc90e66_pci_tbl[] = {
|
static struct pci_device_id slc90e66_pci_tbl[] = {
|
||||||
{ PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
{ PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1), 0},
|
||||||
{ 0, },
|
{ 0, },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(pci, slc90e66_pci_tbl);
|
MODULE_DEVICE_TABLE(pci, slc90e66_pci_tbl);
|
||||||
|
@ -584,7 +584,7 @@ static struct db9 __init *db9_probe(int parport, int mode)
|
|||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (db9_mode[mode].bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
|
if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
|
||||||
printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");
|
printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto err_put_pp;
|
goto err_put_pp;
|
||||||
|
@ -459,7 +459,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
input_regs(dev, regs);
|
input_regs(dev, regs);
|
||||||
input_report_key(dev, keycode, value);
|
input_event(dev, EV_KEY, keycode, value);
|
||||||
input_sync(dev);
|
input_sync(dev);
|
||||||
|
|
||||||
if (value && add_release_event) {
|
if (value && add_release_event) {
|
||||||
|
@ -285,6 +285,15 @@ static struct key_entry keymap_fujitsu_n3510[] = {
|
|||||||
{ KE_END, 0 }
|
{ KE_END, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct key_entry keymap_wistron_ms2111[] = {
|
||||||
|
{ KE_KEY, 0x11, KEY_PROG1 },
|
||||||
|
{ KE_KEY, 0x12, KEY_PROG2 },
|
||||||
|
{ KE_KEY, 0x13, KEY_PROG3 },
|
||||||
|
{ KE_KEY, 0x31, KEY_MAIL },
|
||||||
|
{ KE_KEY, 0x36, KEY_WWW },
|
||||||
|
{ KE_END, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
static struct key_entry keymap_wistron_ms2141[] = {
|
static struct key_entry keymap_wistron_ms2141[] = {
|
||||||
{ KE_KEY, 0x11, KEY_PROG1 },
|
{ KE_KEY, 0x11, KEY_PROG1 },
|
||||||
{ KE_KEY, 0x12, KEY_PROG2 },
|
{ KE_KEY, 0x12, KEY_PROG2 },
|
||||||
@ -326,6 +335,7 @@ static struct key_entry keymap_aopen_1559as[] = {
|
|||||||
{ KE_WIFI, 0x30, 0 },
|
{ KE_WIFI, 0x30, 0 },
|
||||||
{ KE_KEY, 0x31, KEY_MAIL },
|
{ KE_KEY, 0x31, KEY_MAIL },
|
||||||
{ KE_KEY, 0x36, KEY_WWW },
|
{ KE_KEY, 0x36, KEY_WWW },
|
||||||
|
{ KE_END, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -388,6 +398,15 @@ static struct dmi_system_id dmi_ids[] = {
|
|||||||
},
|
},
|
||||||
.driver_data = keymap_aopen_1559as
|
.driver_data = keymap_aopen_1559as
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.callback = dmi_matched,
|
||||||
|
.ident = "Medion MD 9783",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "MEDIONNB"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "MD 9783"),
|
||||||
|
},
|
||||||
|
.driver_data = keymap_wistron_ms2111
|
||||||
|
},
|
||||||
{ NULL, }
|
{ NULL, }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -162,6 +162,16 @@ config RTC_DRV_PCF8583
|
|||||||
This driver can also be built as a module. If so, the module
|
This driver can also be built as a module. If so, the module
|
||||||
will be called rtc-pcf8583.
|
will be called rtc-pcf8583.
|
||||||
|
|
||||||
|
config RTC_DRV_RS5C348
|
||||||
|
tristate "Ricoh RS5C348A/B"
|
||||||
|
depends on RTC_CLASS && SPI
|
||||||
|
help
|
||||||
|
If you say yes here you get support for the
|
||||||
|
Ricoh RS5C348A and RS5C348B RTC chips.
|
||||||
|
|
||||||
|
This driver can also be built as a module. If so, the module
|
||||||
|
will be called rtc-rs5c348.
|
||||||
|
|
||||||
config RTC_DRV_RS5C372
|
config RTC_DRV_RS5C372
|
||||||
tristate "Ricoh RS5C372A/B"
|
tristate "Ricoh RS5C372A/B"
|
||||||
depends on RTC_CLASS && I2C
|
depends on RTC_CLASS && I2C
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user