diff options
101 files changed, 907 insertions, 527 deletions
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index 0de639d6e60a..04661fef97f5 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/irq.h> | ||
| 20 | 21 | ||
| 21 | #include <asm/mach/pci.h> | 22 | #include <asm/mach/pci.h> |
| 22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index e2a2230b69f0..a29b3b2b61b6 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| 21 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
| 22 | #include <linux/irq.h> | ||
| 22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
| 23 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
| 24 | 25 | ||
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 273e05f2b8de..0eadec916214 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
| @@ -28,6 +28,7 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | |||
| 28 | 28 | ||
| 29 | # S3C2412 support | 29 | # S3C2412 support |
| 30 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o | 30 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o |
| 31 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o | ||
| 31 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o | 32 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o |
| 32 | 33 | ||
| 33 | # | 34 | # |
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index b0ed9d2d141b..be42e4032a6d 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
| @@ -8,16 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Modifications: | ||
| 13 | * 24-Aug-2004 BJD Start of generic S3C24XX support | ||
| 14 | * 18-Oct-2004 BJD Moved board struct into this file | ||
| 15 | * 04-Jan-2005 BJD New uart initialisation | ||
| 16 | * 10-Jan-2005 BJD Moved generic init here, specific to cpu headers | ||
| 17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call | ||
| 18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT | ||
| 19 | * 14-Mar-2005 BJD Updated for __iomem | ||
| 20 | * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro | ||
| 21 | */ | 11 | */ |
| 22 | 12 | ||
| 23 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | 13 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index ad3845e329ba..cae35ff76f33 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
| @@ -1,22 +1,14 @@ | |||
| 1 | /* linux/arch/arm/mach-s3c2410/devs.c | 1 | /* linux/arch/arm/mach-s3c2410/devs.c |
| 2 | * | 2 | * |
| 3 | * Copyright (c) 2004 Simtec Electronics | 3 | * Copyright (c) 2004 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * | 5 | * |
| 6 | * Base S3C2410 platform device definitions | 6 | * Base S3C24XX platform device definitions |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices | ||
| 14 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} | ||
| 15 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv | ||
| 16 | * 29-Aug-2004 BJD Added timers 0 through 3 | ||
| 17 | * 29-Aug-2004 BJD Changed index of devices we only have one of to -1 | ||
| 18 | * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources | ||
| 19 | * 18-Aug-2004 BJD Created initial version | ||
| 20 | */ | 12 | */ |
| 21 | 13 | ||
| 22 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index 6822dc7f7799..cd6139b35999 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c | |||
| @@ -86,7 +86,7 @@ unsigned long s3c_irqwake_intmask = 0xffffffffL; | |||
| 86 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; | 86 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; |
| 87 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; | 87 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; |
| 88 | 88 | ||
| 89 | static int | 89 | int |
| 90 | s3c_irq_wake(unsigned int irqno, unsigned int state) | 90 | s3c_irq_wake(unsigned int irqno, unsigned int state) |
| 91 | { | 91 | { |
| 92 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); | 92 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); |
| @@ -260,7 +260,7 @@ s3c_irqext_unmask(unsigned int irqno) | |||
| 260 | s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); | 260 | s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | static int | 263 | int |
| 264 | s3c_irqext_type(unsigned int irq, unsigned int type) | 264 | s3c_irqext_type(unsigned int irq, unsigned int type) |
| 265 | { | 265 | { |
| 266 | void __iomem *extint_reg; | 266 | void __iomem *extint_reg; |
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h index 4abf0ca14e00..f7cc4c983de5 100644 --- a/arch/arm/mach-s3c2410/irq.h +++ b/arch/arm/mach-s3c2410/irq.h | |||
| @@ -97,3 +97,8 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) | |||
| 97 | __raw_writel(parentmask, S3C2410_INTPND); | 97 | __raw_writel(parentmask, S3C2410_INTPND); |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | |||
| 101 | /* exported for use in arch/arm/mach-s3c2410 */ | ||
| 102 | |||
| 103 | extern int s3c_irq_wake(unsigned int irqno, unsigned int state); | ||
| 104 | extern int s3c_irqext_type(unsigned int irq, unsigned int type); | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 947234df8160..2968fb235f95 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
| @@ -8,31 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Modifications: | ||
| 13 | * 14-Sep-2004 BJD USB power control | ||
| 14 | * 20-Aug-2004 BJD Added s3c2410_board struct | ||
| 15 | * 18-Aug-2004 BJD Added platform devices from default set | ||
| 16 | * 16-May-2003 BJD Created initial version | ||
| 17 | * 16-Aug-2003 BJD Fixed header files and copyright, added URL | ||
| 18 | * 05-Sep-2003 BJD Moved to v2.6 kernel | ||
| 19 | * 06-Jan-2003 BJD Updates for <arch/map.h> | ||
| 20 | * 18-Jan-2003 BJD Added serial port configuration | ||
| 21 | * 05-Oct-2004 BJD Power management code | ||
| 22 | * 04-Nov-2004 BJD Updated serial port clocks | ||
| 23 | * 04-Jan-2005 BJD New uart init call | ||
| 24 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
| 25 | * 14-Jan-2005 BJD Add support for muitlple NAND devices | ||
| 26 | * 03-Mar-2005 BJD Ensured that bast-cpld.h is included | ||
| 27 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 28 | * 14-Mar-2005 BJD Updated for __iomem changes | ||
| 29 | * 22-Jun-2005 BJD Added DM9000 platform information | ||
| 30 | * 28-Jun-2005 BJD Moved pm functionality out to common code | ||
| 31 | * 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s | ||
| 32 | * 25-Jul-2005 BJD Removed ASIX static mappings | ||
| 33 | * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus | ||
| 34 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 35 | * 26-Oct-2005 BJD Added FB platform data | ||
| 36 | */ | 11 | */ |
| 37 | 12 | ||
| 38 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index aec431b2830a..8c895c077d22 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
| @@ -9,23 +9,6 @@ | |||
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 16-May-2003 BJD Created initial version | ||
| 14 | * 16-Aug-2003 BJD Fixed header files and copyright, added URL | ||
| 15 | * 05-Sep-2003 BJD Moved to v2.6 kernel | ||
| 16 | * 06-Jan-2003 BJD Updates for <arch/map.h> | ||
| 17 | * 18-Jan-2003 BJD Added serial port configuration | ||
| 18 | * 17-Feb-2003 BJD Copied to mach-ipaq.c | ||
| 19 | * 21-Aug-2004 BJD Added struct s3c2410_board | ||
| 20 | * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_ | ||
| 21 | * 18-Oct-2004 BJD Updated new board structure name | ||
| 22 | * 04-Nov-2004 BJD Change for new serial clock | ||
| 23 | * 04-Jan-2005 BJD Updated uart init call | ||
| 24 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
| 25 | * 14-Jan-2005 BJD Added clock init | ||
| 26 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 27 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 28 | * 26-Oct-2005 BJD Changed name of fb init call | ||
| 29 | */ | 12 | */ |
| 30 | 13 | ||
| 31 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c index 306afc1d7cd3..23d7c052013c 100644 --- a/arch/arm/mach-s3c2410/mach-rx3715.c +++ b/arch/arm/mach-s3c2410/mach-rx3715.c | |||
| @@ -9,15 +9,6 @@ | |||
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 16-Sep-2004 BJD Copied from mach-h1940.c | ||
| 14 | * 25-Oct-2004 BJD Updates for 2.6.10-rc1 | ||
| 15 | * 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h | ||
| 16 | * 14-Jan-2005 BJD Added new clock init | ||
| 17 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 18 | * 14-Mar-2005 BJD Fixed __iomem warnings | ||
| 19 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 20 | * 31-Oct-2005 BJD Added LCD setup for framebuffer | ||
| 21 | */ | 12 | */ |
| 22 | 13 | ||
| 23 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 25f7e9f4dcee..b3b0171d5052 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
| @@ -27,10 +27,6 @@ | |||
| 27 | * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by | 27 | * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by |
| 28 | * Ben Dooks <ben@simtec.co.uk> | 28 | * Ben Dooks <ben@simtec.co.uk> |
| 29 | * | 29 | * |
| 30 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 31 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 32 | * 01-Apr-2006 BJD Moved init code to common smdk | ||
| 33 | * | ||
| 34 | ***********************************************************************/ | 30 | ***********************************************************************/ |
| 35 | 31 | ||
| 36 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2410/mach-smdk2413.c index b7ef7d3c54a9..3a4ca7f6f7b9 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2413.c +++ b/arch/arm/mach-s3c2410/mach-smdk2413.c | |||
| @@ -112,7 +112,20 @@ static void __init smdk2413_machine_init(void) | |||
| 112 | smdk_machine_init(); | 112 | smdk_machine_init(); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | MACHINE_START(S3C2413, "SMDK2413") | 115 | MACHINE_START(S3C2413, "S3C2413") |
| 116 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | ||
| 117 | .phys_io = S3C2410_PA_UART, | ||
| 118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
| 119 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 120 | |||
| 121 | .fixup = smdk2413_fixup, | ||
| 122 | .init_irq = s3c24xx_init_irq, | ||
| 123 | .map_io = smdk2413_map_io, | ||
| 124 | .init_machine = smdk2413_machine_init, | ||
| 125 | .timer = &s3c24xx_timer, | ||
| 126 | MACHINE_END | ||
| 127 | |||
| 128 | MACHINE_START(SMDK2413, "SMDK2413") | ||
| 116 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 129 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
| 117 | .phys_io = S3C2410_PA_UART, | 130 | .phys_io = S3C2410_PA_UART, |
| 118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 131 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index d18efb279d3d..a0d7692cdb2b 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
| @@ -10,25 +10,6 @@ | |||
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | 12 | * |
| 13 | * Modifications: | ||
| 14 | * 14-Sep-2004 BJD USB Power control | ||
| 15 | * 04-Sep-2004 BJD Added new uart init, and io init | ||
| 16 | * 21-Aug-2004 BJD Added struct s3c2410_board | ||
| 17 | * 06-Aug-2004 BJD Fixed call to time initialisation | ||
| 18 | * 05-Apr-2004 BJD Copied to make mach-vr1000.c | ||
| 19 | * 18-Oct-2004 BJD Updated board struct | ||
| 20 | * 04-Nov-2004 BJD Clock and serial configuration update | ||
| 21 | * | ||
| 22 | * 04-Jan-2005 BJD Updated uart init call | ||
| 23 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
| 24 | * 14-Jan-2005 BJD Added clock init | ||
| 25 | * 15-Jan-2005 BJD Add serial port device definition | ||
| 26 | * 20-Jan-2005 BJD Use UPF_IOREMAP for ports | ||
| 27 | * 10-Feb-2005 BJD Added power-off capability | ||
| 28 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 29 | * 14-Mar-2006 BJD void __iomem fixes | ||
| 30 | * 22-Jun-2006 BJD Added DM9000 platform information | ||
| 31 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 32 | */ | 13 | */ |
| 33 | 14 | ||
| 34 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2410/s3c2400-gpio.c index 5127f39fa9bf..f2a78175a70a 100644 --- a/arch/arm/mach-s3c2410/s3c2400-gpio.c +++ b/arch/arm/mach-s3c2410/s3c2400-gpio.c | |||
| @@ -17,10 +17,7 @@ | |||
| 17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 20 | * | 20 | */ |
| 21 | * Changelog | ||
| 22 | * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400 | ||
| 23 | */ | ||
| 24 | 21 | ||
| 25 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 26 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h index 73f1a2474a61..fbed084f26d0 100644 --- a/arch/arm/mach-s3c2410/s3c2410.h +++ b/arch/arm/mach-s3c2410/s3c2410.h | |||
| @@ -9,14 +9,6 @@ | |||
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 18-Aug-2004 BJD Created initial version | ||
| 14 | * 20-Aug-2004 BJD Added s3c2410_board struct | ||
| 15 | * 04-Sep-2004 BJD Added s3c2410_init_uarts() call | ||
| 16 | * 17-Oct-2004 BJD Moved board out to cpu | ||
| 17 | * 04-Jan-2005 BJD Changed uart init | ||
| 18 | * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here | ||
| 19 | * 14-Jan-2005 BJD Added s3c2410_init_clocks call | ||
| 20 | */ | 12 | */ |
| 21 | 13 | ||
| 22 | #ifdef CONFIG_CPU_S3C2410 | 14 | #ifdef CONFIG_CPU_S3C2410 |
diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c new file mode 100644 index 000000000000..c80ec93dfea9 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2412-irq.c | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* linux/arch/arm/mach-s3c2412/s3c2412-irq.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2006 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/init.h> | ||
| 23 | #include <linux/module.h> | ||
| 24 | #include <linux/interrupt.h> | ||
| 25 | #include <linux/ioport.h> | ||
| 26 | #include <linux/ptrace.h> | ||
| 27 | #include <linux/sysdev.h> | ||
| 28 | |||
| 29 | #include <asm/hardware.h> | ||
| 30 | #include <asm/irq.h> | ||
| 31 | #include <asm/io.h> | ||
| 32 | |||
| 33 | #include <asm/mach/irq.h> | ||
| 34 | |||
| 35 | #include <asm/arch/regs-irq.h> | ||
| 36 | #include <asm/arch/regs-gpio.h> | ||
| 37 | |||
| 38 | #include "cpu.h" | ||
| 39 | #include "irq.h" | ||
| 40 | |||
| 41 | /* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by | ||
| 42 | * having them turn up in both the INT* and the EINT* registers. Whilst | ||
| 43 | * both show the status, they both now need to be acked when the IRQs | ||
| 44 | * go off. | ||
| 45 | */ | ||
| 46 | |||
| 47 | static void | ||
| 48 | s3c2412_irq_mask(unsigned int irqno) | ||
| 49 | { | ||
| 50 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 51 | unsigned long mask; | ||
| 52 | |||
| 53 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 54 | __raw_writel(mask | bitval, S3C2410_INTMSK); | ||
| 55 | |||
| 56 | mask = __raw_readl(S3C2412_EINTMASK); | ||
| 57 | __raw_writel(mask | bitval, S3C2412_EINTMASK); | ||
| 58 | } | ||
| 59 | |||
| 60 | static inline void | ||
| 61 | s3c2412_irq_ack(unsigned int irqno) | ||
| 62 | { | ||
| 63 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 64 | |||
| 65 | __raw_writel(bitval, S3C2412_EINTPEND); | ||
| 66 | __raw_writel(bitval, S3C2410_SRCPND); | ||
| 67 | __raw_writel(bitval, S3C2410_INTPND); | ||
| 68 | } | ||
| 69 | |||
| 70 | static inline void | ||
| 71 | s3c2412_irq_maskack(unsigned int irqno) | ||
| 72 | { | ||
| 73 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 74 | unsigned long mask; | ||
| 75 | |||
| 76 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 77 | __raw_writel(mask|bitval, S3C2410_INTMSK); | ||
| 78 | |||
| 79 | mask = __raw_readl(S3C2412_EINTMASK); | ||
| 80 | __raw_writel(mask | bitval, S3C2412_EINTMASK); | ||
| 81 | |||
| 82 | __raw_writel(bitval, S3C2412_EINTPEND); | ||
| 83 | __raw_writel(bitval, S3C2410_SRCPND); | ||
| 84 | __raw_writel(bitval, S3C2410_INTPND); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void | ||
| 88 | s3c2412_irq_unmask(unsigned int irqno) | ||
| 89 | { | ||
| 90 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 91 | unsigned long mask; | ||
| 92 | |||
| 93 | mask = __raw_readl(S3C2412_EINTMASK); | ||
| 94 | __raw_writel(mask & ~bitval, S3C2412_EINTMASK); | ||
| 95 | |||
| 96 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 97 | __raw_writel(mask & ~bitval, S3C2410_INTMSK); | ||
| 98 | } | ||
| 99 | |||
| 100 | static struct irqchip s3c2412_irq_eint0t4 = { | ||
| 101 | .ack = s3c2412_irq_ack, | ||
| 102 | .mask = s3c2412_irq_mask, | ||
| 103 | .unmask = s3c2412_irq_unmask, | ||
| 104 | .set_wake = s3c_irq_wake, | ||
| 105 | .set_type = s3c_irqext_type, | ||
| 106 | }; | ||
| 107 | |||
| 108 | static int s3c2412_irq_add(struct sys_device *sysdev) | ||
| 109 | { | ||
| 110 | unsigned int irqno; | ||
| 111 | |||
| 112 | for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { | ||
| 113 | set_irq_chip(irqno, &s3c2412_irq_eint0t4); | ||
| 114 | set_irq_handler(irqno, do_edge_IRQ); | ||
| 115 | set_irq_flags(irqno, IRQF_VALID); | ||
| 116 | } | ||
| 117 | |||
| 118 | return 0; | ||
| 119 | } | ||
| 120 | |||
| 121 | static struct sysdev_driver s3c2412_irq_driver = { | ||
| 122 | .add = s3c2412_irq_add, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static int s3c2412_irq_init(void) | ||
| 126 | { | ||
| 127 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver); | ||
| 128 | } | ||
| 129 | |||
| 130 | arch_initcall(s3c2412_irq_init); | ||
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index acfe3870727b..1667ba1fa43d 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * | 19 | * |
| 20 | * Changelog: | ||
| 21 | * 25-Jul-2005 BJD Split from irq.c | ||
| 22 | * | ||
| 23 | */ | 20 | */ |
| 24 | 21 | ||
| 25 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c index 2aadca1ce7eb..44c5affa9b89 100644 --- a/arch/arm/mach-s3c2410/s3c244x-irq.c +++ b/arch/arm/mach-s3c2410/s3c244x-irq.c | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * | 19 | * |
| 20 | * Changelog: | ||
| 21 | * 25-Jul-2005 BJD Split from irq.c | ||
| 22 | * | ||
| 23 | */ | 20 | */ |
| 24 | 21 | ||
| 25 | #include <linux/init.h> | 22 | #include <linux/init.h> |
| @@ -122,21 +119,24 @@ static int s3c244x_irq_add(struct sys_device *sysdev) | |||
| 122 | return 0; | 119 | return 0; |
| 123 | } | 120 | } |
| 124 | 121 | ||
| 125 | static struct sysdev_driver s3c244x_irq_driver = { | 122 | static struct sysdev_driver s3c2440_irq_driver = { |
| 126 | .add = s3c244x_irq_add, | 123 | .add = s3c244x_irq_add, |
| 127 | }; | 124 | }; |
| 128 | 125 | ||
| 129 | static int s3c2440_irq_init(void) | 126 | static int s3c2440_irq_init(void) |
| 130 | { | 127 | { |
| 131 | return sysdev_driver_register(&s3c2440_sysclass, &s3c244x_irq_driver); | 128 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); |
| 132 | } | 129 | } |
| 133 | 130 | ||
| 134 | arch_initcall(s3c2440_irq_init); | 131 | arch_initcall(s3c2440_irq_init); |
| 135 | 132 | ||
| 133 | static struct sysdev_driver s3c2442_irq_driver = { | ||
| 134 | .add = s3c244x_irq_add, | ||
| 135 | }; | ||
| 136 | 136 | ||
| 137 | static int s3c2442_irq_init(void) | 137 | static int s3c2442_irq_init(void) |
| 138 | { | 138 | { |
| 139 | return sysdev_driver_register(&s3c2442_sysclass, &s3c244x_irq_driver); | 139 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | arch_initcall(s3c2442_irq_init); | 142 | arch_initcall(s3c2442_irq_init); |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 1e89d4080474..44a7a652d625 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
| @@ -480,7 +480,7 @@ __arm926_proc_info: | |||
| 480 | b __arm926_setup | 480 | b __arm926_setup |
| 481 | .long cpu_arch_name | 481 | .long cpu_arch_name |
| 482 | .long cpu_elf_name | 482 | .long cpu_elf_name |
| 483 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA | 483 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA |
| 484 | .long cpu_arm926_name | 484 | .long cpu_arm926_name |
| 485 | .long arm926_processor_functions | 485 | .long arm926_processor_functions |
| 486 | .long v4wbi_tlb_fns | 486 | .long v4wbi_tlb_fns |
diff --git a/arch/i386/kernel/audit.c b/arch/i386/kernel/audit.c index 5a53c6f371ff..3b97cff41549 100644 --- a/arch/i386/kernel/audit.c +++ b/arch/i386/kernel/audit.c | |||
| @@ -8,13 +8,41 @@ static unsigned dir_class[] = { | |||
| 8 | ~0U | 8 | ~0U |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | static unsigned read_class[] = { | ||
| 12 | #include <asm-generic/audit_read.h> | ||
| 13 | ~0U | ||
| 14 | }; | ||
| 15 | |||
| 16 | static unsigned write_class[] = { | ||
| 17 | #include <asm-generic/audit_write.h> | ||
| 18 | ~0U | ||
| 19 | }; | ||
| 20 | |||
| 11 | static unsigned chattr_class[] = { | 21 | static unsigned chattr_class[] = { |
| 12 | #include <asm-generic/audit_change_attr.h> | 22 | #include <asm-generic/audit_change_attr.h> |
| 13 | ~0U | 23 | ~0U |
| 14 | }; | 24 | }; |
| 15 | 25 | ||
| 26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
| 27 | { | ||
| 28 | switch(syscall) { | ||
| 29 | case __NR_open: | ||
| 30 | return 2; | ||
| 31 | case __NR_openat: | ||
| 32 | return 3; | ||
| 33 | case __NR_socketcall: | ||
| 34 | return 4; | ||
| 35 | case __NR_execve: | ||
| 36 | return 5; | ||
| 37 | default: | ||
| 38 | return 0; | ||
| 39 | } | ||
| 40 | } | ||
| 41 | |||
| 16 | static int __init audit_classes_init(void) | 42 | static int __init audit_classes_init(void) |
| 17 | { | 43 | { |
| 44 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
| 45 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
| 18 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | 46 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); |
| 19 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | 47 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); |
| 20 | return 0; | 48 | return 0; |
diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c index ab94f2e58cdd..92d7d0c8d93f 100644 --- a/arch/ia64/ia32/audit.c +++ b/arch/ia64/ia32/audit.c | |||
| @@ -9,3 +9,29 @@ unsigned ia32_chattr_class[] = { | |||
| 9 | #include <asm-generic/audit_change_attr.h> | 9 | #include <asm-generic/audit_change_attr.h> |
| 10 | ~0U | 10 | ~0U |
| 11 | }; | 11 | }; |
| 12 | |||
| 13 | unsigned ia32_write_class[] = { | ||
| 14 | #include <asm-generic/audit_write.h> | ||
| 15 | ~0U | ||
| 16 | }; | ||
| 17 | |||
| 18 | unsigned ia32_read_class[] = { | ||
| 19 | #include <asm-generic/audit_read.h> | ||
| 20 | ~0U | ||
| 21 | }; | ||
| 22 | |||
| 23 | int ia32_classify_syscall(unsigned syscall) | ||
| 24 | { | ||
| 25 | switch(syscall) { | ||
| 26 | case __NR_open: | ||
| 27 | return 2; | ||
| 28 | case __NR_openat: | ||
| 29 | return 3; | ||
| 30 | case __NR_socketcall: | ||
| 31 | return 4; | ||
| 32 | case __NR_execve: | ||
| 33 | return 5; | ||
| 34 | default: | ||
| 35 | return 1; | ||
| 36 | } | ||
| 37 | } | ||
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c index f2512931ccaf..04682555a28c 100644 --- a/arch/ia64/kernel/audit.c +++ b/arch/ia64/kernel/audit.c | |||
| @@ -8,19 +8,54 @@ static unsigned dir_class[] = { | |||
| 8 | ~0U | 8 | ~0U |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | static unsigned read_class[] = { | ||
| 12 | #include <asm-generic/audit_read.h> | ||
| 13 | ~0U | ||
| 14 | }; | ||
| 15 | |||
| 16 | static unsigned write_class[] = { | ||
| 17 | #include <asm-generic/audit_write.h> | ||
| 18 | ~0U | ||
| 19 | }; | ||
| 20 | |||
| 11 | static unsigned chattr_class[] = { | 21 | static unsigned chattr_class[] = { |
| 12 | #include <asm-generic/audit_change_attr.h> | 22 | #include <asm-generic/audit_change_attr.h> |
| 13 | ~0U | 23 | ~0U |
| 14 | }; | 24 | }; |
| 15 | 25 | ||
| 26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
| 27 | { | ||
| 28 | #ifdef CONFIG_IA32_SUPPORT | ||
| 29 | extern int ia32_classify_syscall(unsigned); | ||
| 30 | if (abi == AUDIT_ARCH_I386) | ||
| 31 | return ia32_classify_syscall(syscall); | ||
| 32 | #endif | ||
| 33 | switch(syscall) { | ||
| 34 | case __NR_open: | ||
| 35 | return 2; | ||
| 36 | case __NR_openat: | ||
| 37 | return 3; | ||
| 38 | case __NR_execve: | ||
| 39 | return 5; | ||
| 40 | default: | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 16 | static int __init audit_classes_init(void) | 45 | static int __init audit_classes_init(void) |
| 17 | { | 46 | { |
| 18 | #ifdef CONFIG_IA32_SUPPORT | 47 | #ifdef CONFIG_IA32_SUPPORT |
| 19 | extern __u32 ia32_dir_class[]; | 48 | extern __u32 ia32_dir_class[]; |
| 49 | extern __u32 ia32_write_class[]; | ||
| 50 | extern __u32 ia32_read_class[]; | ||
| 20 | extern __u32 ia32_chattr_class[]; | 51 | extern __u32 ia32_chattr_class[]; |
| 52 | audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class); | ||
| 53 | audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class); | ||
| 21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | 54 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); |
| 22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | 55 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); |
| 23 | #endif | 56 | #endif |
| 57 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
| 58 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
| 24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | 59 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); |
| 25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | 60 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); |
| 26 | return 0; | 61 | return 0; |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 956c2e5564b7..7d32ad0194a4 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
| @@ -70,6 +70,8 @@ obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) | |||
| 70 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o | 70 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o |
| 71 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o | 71 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o |
| 72 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) | 72 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) |
| 73 | obj-$(CONFIG_AUDIT) += audit.o | ||
| 74 | obj64-$(CONFIG_AUDIT) += compat_audit.o | ||
| 73 | 75 | ||
| 74 | ifeq ($(CONFIG_PPC_ISERIES),y) | 76 | ifeq ($(CONFIG_PPC_ISERIES),y) |
| 75 | $(obj)/head_64.o: $(obj)/lparmap.s | 77 | $(obj)/head_64.o: $(obj)/lparmap.s |
diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c new file mode 100644 index 000000000000..7fe5e6300e9a --- /dev/null +++ b/arch/powerpc/kernel/audit.c | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #include <linux/init.h> | ||
| 2 | #include <linux/types.h> | ||
| 3 | #include <linux/audit.h> | ||
| 4 | #include <asm/unistd.h> | ||
| 5 | |||
| 6 | static unsigned dir_class[] = { | ||
| 7 | #include <asm-generic/audit_dir_write.h> | ||
| 8 | ~0U | ||
| 9 | }; | ||
| 10 | |||
| 11 | static unsigned read_class[] = { | ||
| 12 | #include <asm-generic/audit_read.h> | ||
| 13 | ~0U | ||
| 14 | }; | ||
| 15 | |||
| 16 | static unsigned write_class[] = { | ||
| 17 | #include <asm-generic/audit_write.h> | ||
| 18 | ~0U | ||
| 19 | }; | ||
| 20 | |||
| 21 | static unsigned chattr_class[] = { | ||
| 22 | #include <asm-generic/audit_change_attr.h> | ||
| 23 | ~0U | ||
| 24 | }; | ||
| 25 | |||
| 26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
| 27 | { | ||
| 28 | #ifdef CONFIG_PPC64 | ||
| 29 | extern int ppc32_classify_syscall(unsigned); | ||
| 30 | if (abi == AUDIT_ARCH_PPC) | ||
| 31 | return ppc32_classify_syscall(syscall); | ||
| 32 | #endif | ||
| 33 | switch(syscall) { | ||
| 34 | case __NR_open: | ||
| 35 | return 2; | ||
| 36 | case __NR_openat: | ||
| 37 | return 3; | ||
| 38 | case __NR_socketcall: | ||
| 39 | return 4; | ||
| 40 | case __NR_execve: | ||
| 41 | return 5; | ||
| 42 | default: | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | static int __init audit_classes_init(void) | ||
| 48 | { | ||
| 49 | #ifdef CONFIG_PPC64 | ||
| 50 | extern __u32 ppc32_dir_class[]; | ||
| 51 | extern __u32 ppc32_write_class[]; | ||
| 52 | extern __u32 ppc32_read_class[]; | ||
| 53 | extern __u32 ppc32_chattr_class[]; | ||
| 54 | audit_register_class(AUDIT_CLASS_WRITE_32, ppc32_write_class); | ||
| 55 | audit_register_class(AUDIT_CLASS_READ_32, ppc32_read_class); | ||
| 56 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ppc32_dir_class); | ||
| 57 | audit_register_class(AUDIT_CLASS_CHATTR_32, ppc32_chattr_class); | ||
| 58 | #endif | ||
| 59 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
| 60 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
| 61 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
| 62 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
| 63 | return 0; | ||
| 64 | } | ||
| 65 | |||
| 66 | __initcall(audit_classes_init); | ||
diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c new file mode 100644 index 000000000000..640d4bb29321 --- /dev/null +++ b/arch/powerpc/kernel/compat_audit.c | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #undef __powerpc64__ | ||
| 2 | #include <asm/unistd.h> | ||
| 3 | |||
| 4 | unsigned ppc32_dir_class[] = { | ||
| 5 | #include <asm-generic/audit_dir_write.h> | ||
| 6 | ~0U | ||
| 7 | }; | ||
| 8 | |||
| 9 | unsigned ppc32_chattr_class[] = { | ||
| 10 | #include <asm-generic/audit_change_attr.h> | ||
| 11 | ~0U | ||
| 12 | }; | ||
| 13 | |||
| 14 | unsigned ppc32_write_class[] = { | ||
| 15 | #include <asm-generic/audit_write.h> | ||
| 16 | ~0U | ||
| 17 | }; | ||
| 18 | |||
| 19 | unsigned ppc32_read_class[] = { | ||
| 20 | #include <asm-generic/audit_read.h> | ||
| 21 | ~0U | ||
| 22 | }; | ||
| 23 | |||
| 24 | int ppc32_classify_syscall(unsigned syscall) | ||
| 25 | { | ||
| 26 | switch(syscall) { | ||
| 27 | case __NR_open: | ||
| 28 | return 2; | ||
| 29 | case __NR_openat: | ||
| 30 | return 3; | ||
| 31 | case __NR_socketcall: | ||
| 32 | return 4; | ||
| 33 | case __NR_execve: | ||
| 34 | return 5; | ||
| 35 | default: | ||
| 36 | return 1; | ||
| 37 | } | ||
| 38 | } | ||
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 86601a945709..9a33ed6ca696 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
| @@ -16,9 +16,11 @@ extra-y += head.o init_task.o vmlinux.lds | |||
| 16 | obj-$(CONFIG_MODULES) += s390_ksyms.o module.o | 16 | obj-$(CONFIG_MODULES) += s390_ksyms.o module.o |
| 17 | obj-$(CONFIG_SMP) += smp.o | 17 | obj-$(CONFIG_SMP) += smp.o |
| 18 | 18 | ||
| 19 | obj-$(CONFIG_AUDIT) += audit.o | ||
| 20 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o | ||
| 19 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ | 21 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ |
| 20 | compat_wrapper.o compat_exec_domain.o \ | 22 | compat_wrapper.o compat_exec_domain.o \ |
| 21 | binfmt_elf32.o | 23 | binfmt_elf32.o $(compat-obj-y) |
| 22 | 24 | ||
| 23 | obj-$(CONFIG_VIRT_TIMER) += vtime.o | 25 | obj-$(CONFIG_VIRT_TIMER) += vtime.o |
| 24 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 26 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c new file mode 100644 index 000000000000..0741d9193390 --- /dev/null +++ b/arch/s390/kernel/audit.c | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #include <linux/init.h> | ||
| 2 | #include <linux/types.h> | ||
| 3 | #include <linux/audit.h> | ||
| 4 | #include <asm/unistd.h> | ||
| 5 | |||
| 6 | static unsigned dir_class[] = { | ||
| 7 | #include <asm-generic/audit_dir_write.h> | ||
| 8 | ~0U | ||
| 9 | }; | ||
| 10 | |||
| 11 | static unsigned read_class[] = { | ||
| 12 | #include <asm-generic/audit_read.h> | ||
| 13 | ~0U | ||
| 14 | }; | ||
| 15 | |||
| 16 | static unsigned write_class[] = { | ||
| 17 | #include <asm-generic/audit_write.h> | ||
| 18 | ~0U | ||
| 19 | }; | ||
| 20 | |||
| 21 | static unsigned chattr_class[] = { | ||
| 22 | #include <asm-generic/audit_change_attr.h> | ||
| 23 | ~0U | ||
| 24 | }; | ||
| 25 | |||
| 26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
| 27 | { | ||
| 28 | #ifdef CONFIG_COMPAT | ||
| 29 | extern int s390_classify_syscall(unsigned); | ||
| 30 | if (abi == AUDIT_ARCH_S390) | ||
| 31 | return s390_classify_syscall(syscall); | ||
| 32 | #endif | ||
| 33 | switch(syscall) { | ||
| 34 | case __NR_open: | ||
| 35 | return 2; | ||
| 36 | case __NR_openat: | ||
| 37 | return 3; | ||
| 38 | case __NR_socketcall: | ||
| 39 | return 4; | ||
| 40 | case __NR_execve: | ||
| 41 | return 5; | ||
| 42 | default: | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | static int __init audit_classes_init(void) | ||
| 48 | { | ||
| 49 | #ifdef CONFIG_COMPAT | ||
| 50 | extern __u32 s390_dir_class[]; | ||
| 51 | extern __u32 s390_write_class[]; | ||
| 52 | extern __u32 s390_read_class[]; | ||
| 53 | extern __u32 s390_chattr_class[]; | ||
| 54 | audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); | ||
| 55 | audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); | ||
| 56 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); | ||
| 57 | audit_register_class(AUDIT_CLASS_CHATTR_32, s390_chattr_class); | ||
| 58 | #endif | ||
| 59 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
| 60 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
| 61 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
| 62 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
| 63 | return 0; | ||
| 64 | } | ||
| 65 | |||
| 66 | __initcall(audit_classes_init); | ||
diff --git a/arch/s390/kernel/compat_audit.c b/arch/s390/kernel/compat_audit.c new file mode 100644 index 000000000000..16d9436bfa91 --- /dev/null +++ b/arch/s390/kernel/compat_audit.c | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #undef __s390x__ | ||
| 2 | #include <asm/unistd.h> | ||
| 3 | |||
| 4 | unsigned s390_dir_class[] = { | ||
| 5 | #include <asm-generic/audit_dir_write.h> | ||
| 6 | ~0U | ||
| 7 | }; | ||
| 8 | |||
| 9 | unsigned s390_chattr_class[] = { | ||
| 10 | #include <asm-generic/audit_change_attr.h> | ||
| 11 | ~0U | ||
| 12 | }; | ||
| 13 | |||
| 14 | unsigned s390_write_class[] = { | ||
| 15 | #include <asm-generic/audit_write.h> | ||
| 16 | ~0U | ||
| 17 | }; | ||
| 18 | |||
| 19 | unsigned s390_read_class[] = { | ||
| 20 | #include <asm-generic/audit_read.h> | ||
| 21 | ~0U | ||
| 22 | }; | ||
| 23 | |||
| 24 | int s390_classify_syscall(unsigned syscall) | ||
| 25 | { | ||
| 26 | switch(syscall) { | ||
| 27 | case __NR_open: | ||
| 28 | return 2; | ||
| 29 | case __NR_openat: | ||
| 30 | return 3; | ||
| 31 | case __NR_socketcall: | ||
| 32 | return 4; | ||
| 33 | case __NR_execve: | ||
| 34 | return 5; | ||
| 35 | default: | ||
| 36 | return 1; | ||
| 37 | } | ||
| 38 | } | ||
diff --git a/arch/x86_64/ia32/audit.c b/arch/x86_64/ia32/audit.c index ab94f2e58cdd..92d7d0c8d93f 100644 --- a/arch/x86_64/ia32/audit.c +++ b/arch/x86_64/ia32/audit.c | |||
| @@ -9,3 +9,29 @@ unsigned ia32_chattr_class[] = { | |||
| 9 | #include <asm-generic/audit_change_attr.h> | 9 | #include <asm-generic/audit_change_attr.h> |
| 10 | ~0U | 10 | ~0U |
| 11 | }; | 11 | }; |
| 12 | |||
| 13 | unsigned ia32_write_class[] = { | ||
| 14 | #include <asm-generic/audit_write.h> | ||
| 15 | ~0U | ||
| 16 | }; | ||
| 17 | |||
| 18 | unsigned ia32_read_class[] = { | ||
| 19 | #include <asm-generic/audit_read.h> | ||
| 20 | ~0U | ||
| 21 | }; | ||
| 22 | |||
| 23 | int ia32_classify_syscall(unsigned syscall) | ||
| 24 | { | ||
| 25 | switch(syscall) { | ||
| 26 | case __NR_open: | ||
| 27 | return 2; | ||
| 28 | case __NR_openat: | ||
| 29 | return 3; | ||
| 30 | case __NR_socketcall: | ||
| 31 | return 4; | ||
| 32 | case __NR_execve: | ||
| 33 | return 5; | ||
| 34 | default: | ||
| 35 | return 1; | ||
| 36 | } | ||
| 37 | } | ||
diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c index a067aa468a85..21f33387bef3 100644 --- a/arch/x86_64/kernel/audit.c +++ b/arch/x86_64/kernel/audit.c | |||
| @@ -8,19 +8,54 @@ static unsigned dir_class[] = { | |||
| 8 | ~0U | 8 | ~0U |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | static unsigned read_class[] = { | ||
| 12 | #include <asm-generic/audit_read.h> | ||
| 13 | ~0U | ||
| 14 | }; | ||
| 15 | |||
| 16 | static unsigned write_class[] = { | ||
| 17 | #include <asm-generic/audit_write.h> | ||
| 18 | ~0U | ||
| 19 | }; | ||
| 20 | |||
| 11 | static unsigned chattr_class[] = { | 21 | static unsigned chattr_class[] = { |
| 12 | #include <asm-generic/audit_change_attr.h> | 22 | #include <asm-generic/audit_change_attr.h> |
| 13 | ~0U | 23 | ~0U |
| 14 | }; | 24 | }; |
| 15 | 25 | ||
| 26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
| 27 | { | ||
| 28 | #ifdef CONFIG_IA32_EMULATION | ||
| 29 | extern int ia32_classify_syscall(unsigned); | ||
| 30 | if (abi == AUDIT_ARCH_I386) | ||
| 31 | return ia32_classify_syscall(syscall); | ||
| 32 | #endif | ||
| 33 | switch(syscall) { | ||
| 34 | case __NR_open: | ||
| 35 | return 2; | ||
| 36 | case __NR_openat: | ||
| 37 | return 3; | ||
| 38 | case __NR_execve: | ||
| 39 | return 5; | ||
| 40 | default: | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 16 | static int __init audit_classes_init(void) | 45 | static int __init audit_classes_init(void) |
| 17 | { | 46 | { |
| 18 | #ifdef CONFIG_IA32_EMULATION | 47 | #ifdef CONFIG_IA32_EMULATION |
| 19 | extern __u32 ia32_dir_class[]; | 48 | extern __u32 ia32_dir_class[]; |
| 49 | extern __u32 ia32_write_class[]; | ||
| 50 | extern __u32 ia32_read_class[]; | ||
| 20 | extern __u32 ia32_chattr_class[]; | 51 | extern __u32 ia32_chattr_class[]; |
| 52 | audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class); | ||
| 53 | audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class); | ||
| 21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | 54 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); |
| 22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | 55 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); |
| 23 | #endif | 56 | #endif |
| 57 | audit_register_class(AUDIT_CLASS_WRITE, write_class); | ||
| 58 | audit_register_class(AUDIT_CLASS_READ, read_class); | ||
| 24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | 59 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); |
| 25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | 60 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); |
| 26 | return 0; | 61 | return 0; |
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index a7c725f8bf64..f286079d233f 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
| @@ -425,12 +425,12 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
| 425 | return d->init_setup(dev, d); | 425 | return d->init_setup(dev, d); |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | static const struct pci_device_id aec62xx_pci_tbl[] = { | 428 | static struct pci_device_id aec62xx_pci_tbl[] = { |
| 429 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 }, | 429 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
| 430 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 }, | 430 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, |
| 431 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 }, | 431 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, |
| 432 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 }, | 432 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, |
| 433 | { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 }, | 433 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, |
| 434 | { 0, }, | 434 | { 0, }, |
| 435 | }; | 435 | }; |
| 436 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); | 436 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 03677bff0d72..f063d954236c 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
| @@ -649,11 +649,11 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device | |||
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | static struct pci_device_id svwks_pci_tbl[] = { | 651 | static struct pci_device_id svwks_pci_tbl[] = { |
| 652 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, | 652 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 653 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1}, | 653 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
| 654 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, | 654 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
| 655 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3}, | 655 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, |
| 656 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4}, | 656 | { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, |
| 657 | { 0, }, | 657 | { 0, }, |
| 658 | }; | 658 | }; |
| 659 | MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); | 659 | MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 25ceb4a39ed2..20b392948f36 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
| @@ -1082,10 +1082,10 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi | |||
| 1082 | } | 1082 | } |
| 1083 | 1083 | ||
| 1084 | static struct pci_device_id siimage_pci_tbl[] = { | 1084 | static struct pci_device_id siimage_pci_tbl[] = { |
| 1085 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), 0}, | 1085 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
| 1086 | #ifdef CONFIG_BLK_DEV_IDE_SATA | 1086 | #ifdef CONFIG_BLK_DEV_IDE_SATA |
| 1087 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1}, | 1087 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
| 1088 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2}, | 1088 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
| 1089 | #endif | 1089 | #endif |
| 1090 | { 0, }, | 1090 | { 0, }, |
| 1091 | }; | 1091 | }; |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index 7ca9e95bdf89..fb6565b98f32 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
| @@ -91,6 +91,8 @@ struct imxmci_host { | |||
| 91 | int dma_allocated; | 91 | int dma_allocated; |
| 92 | 92 | ||
| 93 | unsigned char actual_bus_width; | 93 | unsigned char actual_bus_width; |
| 94 | |||
| 95 | int prev_cmd_code; | ||
| 94 | }; | 96 | }; |
| 95 | 97 | ||
| 96 | #define IMXMCI_PEND_IRQ_b 0 | 98 | #define IMXMCI_PEND_IRQ_b 0 |
| @@ -248,16 +250,14 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
| 248 | * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. | 250 | * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. |
| 249 | * This is required for SCR read at least. | 251 | * This is required for SCR read at least. |
| 250 | */ | 252 | */ |
| 251 | if (datasz < 64) { | 253 | if (datasz < 512) { |
| 252 | host->dma_size = datasz; | 254 | host->dma_size = datasz; |
| 253 | if (data->flags & MMC_DATA_READ) { | 255 | if (data->flags & MMC_DATA_READ) { |
| 254 | host->dma_dir = DMA_FROM_DEVICE; | 256 | host->dma_dir = DMA_FROM_DEVICE; |
| 255 | 257 | ||
| 256 | /* Hack to enable read SCR */ | 258 | /* Hack to enable read SCR */ |
| 257 | if(datasz < 16) { | 259 | MMC_NOB = 1; |
| 258 | MMC_NOB = 1; | 260 | MMC_BLK_LEN = 512; |
| 259 | MMC_BLK_LEN = 16; | ||
| 260 | } | ||
| 261 | } else { | 261 | } else { |
| 262 | host->dma_dir = DMA_TO_DEVICE; | 262 | host->dma_dir = DMA_TO_DEVICE; |
| 263 | } | 263 | } |
| @@ -409,6 +409,9 @@ static void imxmci_finish_request(struct imxmci_host *host, struct mmc_request * | |||
| 409 | 409 | ||
| 410 | spin_unlock_irqrestore(&host->lock, flags); | 410 | spin_unlock_irqrestore(&host->lock, flags); |
| 411 | 411 | ||
| 412 | if(req && req->cmd) | ||
| 413 | host->prev_cmd_code = req->cmd->opcode; | ||
| 414 | |||
| 412 | host->req = NULL; | 415 | host->req = NULL; |
| 413 | host->cmd = NULL; | 416 | host->cmd = NULL; |
| 414 | host->data = NULL; | 417 | host->data = NULL; |
| @@ -553,7 +556,6 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
| 553 | { | 556 | { |
| 554 | int i; | 557 | int i; |
| 555 | int burst_len; | 558 | int burst_len; |
| 556 | int flush_len; | ||
| 557 | int trans_done = 0; | 559 | int trans_done = 0; |
| 558 | unsigned int stat = *pstat; | 560 | unsigned int stat = *pstat; |
| 559 | 561 | ||
| @@ -566,44 +568,43 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
| 566 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", | 568 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", |
| 567 | stat); | 569 | stat); |
| 568 | 570 | ||
| 571 | udelay(20); /* required for clocks < 8MHz*/ | ||
| 572 | |||
| 569 | if(host->dma_dir == DMA_FROM_DEVICE) { | 573 | if(host->dma_dir == DMA_FROM_DEVICE) { |
| 570 | imxmci_busy_wait_for_status(host, &stat, | 574 | imxmci_busy_wait_for_status(host, &stat, |
| 571 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, | 575 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, |
| 572 | 20, "imxmci_cpu_driven_data read"); | 576 | 50, "imxmci_cpu_driven_data read"); |
| 573 | 577 | ||
| 574 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && | 578 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && |
| 575 | (host->data_cnt < host->dma_size)) { | 579 | (host->data_cnt < 512)) { |
| 576 | if(burst_len >= host->dma_size - host->data_cnt) { | 580 | |
| 577 | flush_len = burst_len; | 581 | udelay(20); /* required for clocks < 8MHz*/ |
| 578 | burst_len = host->dma_size - host->data_cnt; | ||
| 579 | flush_len -= burst_len; | ||
| 580 | host->data_cnt = host->dma_size; | ||
| 581 | trans_done = 1; | ||
| 582 | } else { | ||
| 583 | flush_len = 0; | ||
| 584 | host->data_cnt += burst_len; | ||
| 585 | } | ||
| 586 | 582 | ||
| 587 | for(i = burst_len; i>=2 ; i-=2) { | 583 | for(i = burst_len; i>=2 ; i-=2) { |
| 588 | *(host->data_ptr++) = MMC_BUFFER_ACCESS; | 584 | u16 data; |
| 589 | udelay(20); /* required for clocks < 8MHz*/ | 585 | data = MMC_BUFFER_ACCESS; |
| 586 | udelay(10); /* required for clocks < 8MHz*/ | ||
| 587 | if(host->data_cnt+2 <= host->dma_size) { | ||
| 588 | *(host->data_ptr++) = data; | ||
| 589 | } else { | ||
| 590 | if(host->data_cnt < host->dma_size) | ||
| 591 | *(u8*)(host->data_ptr) = data; | ||
| 592 | } | ||
| 593 | host->data_cnt += 2; | ||
| 590 | } | 594 | } |
| 591 | 595 | ||
| 592 | if(i == 1) | ||
| 593 | *(u8*)(host->data_ptr) = MMC_BUFFER_ACCESS; | ||
| 594 | |||
| 595 | stat = MMC_STATUS; | 596 | stat = MMC_STATUS; |
| 596 | 597 | ||
| 597 | /* Flush extra bytes from FIFO */ | 598 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", |
| 598 | while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){ | 599 | host->data_cnt, burst_len, stat); |
| 599 | i = MMC_BUFFER_ACCESS; | ||
| 600 | stat = MMC_STATUS; | ||
| 601 | stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */ | ||
| 602 | } | ||
| 603 | |||
| 604 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read burst %d STATUS = 0x%x\n", | ||
| 605 | burst_len, stat); | ||
| 606 | } | 600 | } |
| 601 | |||
| 602 | if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) | ||
| 603 | trans_done = 1; | ||
| 604 | |||
| 605 | if(host->dma_size & 0x1ff) | ||
| 606 | stat &= ~STATUS_CRC_READ_ERR; | ||
| 607 | |||
| 607 | } else { | 608 | } else { |
| 608 | imxmci_busy_wait_for_status(host, &stat, | 609 | imxmci_busy_wait_for_status(host, &stat, |
| 609 | STATUS_APPL_BUFF_FE, | 610 | STATUS_APPL_BUFF_FE, |
| @@ -692,8 +693,8 @@ static void imxmci_tasklet_fnc(unsigned long data) | |||
| 692 | what, stat, MMC_INT_MASK); | 693 | what, stat, MMC_INT_MASK); |
| 693 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", | 694 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", |
| 694 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); | 695 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); |
| 695 | dev_err(mmc_dev(host->mmc), "CMD%d, bus %d-bit, dma_size = 0x%x\n", | 696 | dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", |
| 696 | host->cmd?host->cmd->opcode:0, 1<<host->actual_bus_width, host->dma_size); | 697 | host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size); |
| 697 | } | 698 | } |
| 698 | 699 | ||
| 699 | if(!host->present || timeout) | 700 | if(!host->present || timeout) |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 33525bdf2ab6..74eaaee66de0 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
| @@ -247,6 +247,55 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca, | |||
| 247 | 247 | ||
| 248 | EXPORT_SYMBOL(mmc_wait_for_app_cmd); | 248 | EXPORT_SYMBOL(mmc_wait_for_app_cmd); |
| 249 | 249 | ||
| 250 | /** | ||
| 251 | * mmc_set_data_timeout - set the timeout for a data command | ||
| 252 | * @data: data phase for command | ||
| 253 | * @card: the MMC card associated with the data transfer | ||
| 254 | * @write: flag to differentiate reads from writes | ||
| 255 | */ | ||
| 256 | void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, | ||
| 257 | int write) | ||
| 258 | { | ||
| 259 | unsigned int mult; | ||
| 260 | |||
| 261 | /* | ||
| 262 | * SD cards use a 100 multiplier rather than 10 | ||
| 263 | */ | ||
| 264 | mult = mmc_card_sd(card) ? 100 : 10; | ||
| 265 | |||
| 266 | /* | ||
| 267 | * Scale up the multiplier (and therefore the timeout) by | ||
| 268 | * the r2w factor for writes. | ||
| 269 | */ | ||
| 270 | if (write) | ||
| 271 | mult <<= card->csd.r2w_factor; | ||
| 272 | |||
| 273 | data->timeout_ns = card->csd.tacc_ns * mult; | ||
| 274 | data->timeout_clks = card->csd.tacc_clks * mult; | ||
| 275 | |||
| 276 | /* | ||
| 277 | * SD cards also have an upper limit on the timeout. | ||
| 278 | */ | ||
| 279 | if (mmc_card_sd(card)) { | ||
| 280 | unsigned int timeout_us, limit_us; | ||
| 281 | |||
| 282 | timeout_us = data->timeout_ns / 1000; | ||
| 283 | timeout_us += data->timeout_clks * 1000 / | ||
| 284 | (card->host->ios.clock / 1000); | ||
| 285 | |||
| 286 | if (write) | ||
| 287 | limit_us = 250000; | ||
| 288 | else | ||
| 289 | limit_us = 100000; | ||
| 290 | |||
| 291 | if (timeout_us > limit_us) { | ||
| 292 | data->timeout_ns = limit_us * 1000; | ||
| 293 | data->timeout_clks = 0; | ||
| 294 | } | ||
| 295 | } | ||
| 296 | } | ||
| 297 | EXPORT_SYMBOL(mmc_set_data_timeout); | ||
| 298 | |||
| 250 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); | 299 | static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); |
| 251 | 300 | ||
| 252 | /** | 301 | /** |
| @@ -908,11 +957,9 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
| 908 | { | 957 | { |
| 909 | int err; | 958 | int err; |
| 910 | struct mmc_card *card; | 959 | struct mmc_card *card; |
| 911 | |||
| 912 | struct mmc_request mrq; | 960 | struct mmc_request mrq; |
| 913 | struct mmc_command cmd; | 961 | struct mmc_command cmd; |
| 914 | struct mmc_data data; | 962 | struct mmc_data data; |
| 915 | |||
| 916 | struct scatterlist sg; | 963 | struct scatterlist sg; |
| 917 | 964 | ||
| 918 | list_for_each_entry(card, &host->cards, node) { | 965 | list_for_each_entry(card, &host->cards, node) { |
| @@ -947,8 +994,8 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
| 947 | 994 | ||
| 948 | memset(&data, 0, sizeof(struct mmc_data)); | 995 | memset(&data, 0, sizeof(struct mmc_data)); |
| 949 | 996 | ||
| 950 | data.timeout_ns = card->csd.tacc_ns * 10; | 997 | mmc_set_data_timeout(&data, card, 0); |
| 951 | data.timeout_clks = card->csd.tacc_clks * 10; | 998 | |
| 952 | data.blksz_bits = 3; | 999 | data.blksz_bits = 3; |
| 953 | data.blksz = 1 << 3; | 1000 | data.blksz = 1 << 3; |
| 954 | data.blocks = 1; | 1001 | data.blocks = 1; |
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 115cc21094b9..a0e0dad1b419 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
| 31 | 31 | ||
| 32 | #include <linux/mmc/card.h> | 32 | #include <linux/mmc/card.h> |
| 33 | #include <linux/mmc/host.h> | ||
| 33 | #include <linux/mmc/protocol.h> | 34 | #include <linux/mmc/protocol.h> |
| 34 | 35 | ||
| 35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
| @@ -171,8 +172,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
| 171 | 172 | ||
| 172 | brq.cmd.arg = req->sector << 9; | 173 | brq.cmd.arg = req->sector << 9; |
| 173 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; | 174 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; |
| 174 | brq.data.timeout_ns = card->csd.tacc_ns * 10; | ||
| 175 | brq.data.timeout_clks = card->csd.tacc_clks * 10; | ||
| 176 | brq.data.blksz_bits = md->block_bits; | 175 | brq.data.blksz_bits = md->block_bits; |
| 177 | brq.data.blksz = 1 << md->block_bits; | 176 | brq.data.blksz = 1 << md->block_bits; |
| 178 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); | 177 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); |
| @@ -180,6 +179,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
| 180 | brq.stop.arg = 0; | 179 | brq.stop.arg = 0; |
| 181 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; | 180 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; |
| 182 | 181 | ||
| 182 | mmc_set_data_timeout(&brq.data, card, rq_data_dir(req) != READ); | ||
| 183 | |||
| 183 | if (rq_data_dir(req) == READ) { | 184 | if (rq_data_dir(req) == READ) { |
| 184 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; | 185 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; |
| 185 | brq.data.flags |= MMC_DATA_READ; | 186 | brq.data.flags |= MMC_DATA_READ; |
| @@ -187,12 +188,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
| 187 | brq.cmd.opcode = MMC_WRITE_BLOCK; | 188 | brq.cmd.opcode = MMC_WRITE_BLOCK; |
| 188 | brq.data.flags |= MMC_DATA_WRITE; | 189 | brq.data.flags |= MMC_DATA_WRITE; |
| 189 | brq.data.blocks = 1; | 190 | brq.data.blocks = 1; |
| 190 | |||
| 191 | /* | ||
| 192 | * Scale up the timeout by the r2w factor | ||
| 193 | */ | ||
| 194 | brq.data.timeout_ns <<= card->csd.r2w_factor; | ||
| 195 | brq.data.timeout_clks <<= card->csd.r2w_factor; | ||
| 196 | } | 191 | } |
| 197 | 192 | ||
| 198 | if (brq.data.blocks > 1) { | 193 | if (brq.data.blocks > 1) { |
| @@ -324,52 +319,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
| 324 | md->read_only = mmc_blk_readonly(card); | 319 | md->read_only = mmc_blk_readonly(card); |
| 325 | 320 | ||
| 326 | /* | 321 | /* |
| 327 | * Figure out a workable block size. MMC cards have: | 322 | * Both SD and MMC specifications state (although a bit |
| 328 | * - two block sizes, one for read and one for write. | 323 | * unclearly in the MMC case) that a block size of 512 |
| 329 | * - may support partial reads and/or writes | 324 | * bytes must always be supported by the card. |
| 330 | * (allows block sizes smaller than specified) | ||
| 331 | */ | ||
| 332 | md->block_bits = card->csd.read_blkbits; | ||
| 333 | if (card->csd.write_blkbits != card->csd.read_blkbits) { | ||
| 334 | if (card->csd.write_blkbits < card->csd.read_blkbits && | ||
| 335 | card->csd.read_partial) { | ||
| 336 | /* | ||
| 337 | * write block size is smaller than read block | ||
| 338 | * size, but we support partial reads, so choose | ||
| 339 | * the smaller write block size. | ||
| 340 | */ | ||
| 341 | md->block_bits = card->csd.write_blkbits; | ||
| 342 | } else if (card->csd.write_blkbits > card->csd.read_blkbits && | ||
| 343 | card->csd.write_partial) { | ||
| 344 | /* | ||
| 345 | * read block size is smaller than write block | ||
| 346 | * size, but we support partial writes. Use read | ||
| 347 | * block size. | ||
| 348 | */ | ||
| 349 | } else { | ||
| 350 | /* | ||
| 351 | * We don't support this configuration for writes. | ||
| 352 | */ | ||
| 353 | printk(KERN_ERR "%s: unable to select block size for " | ||
| 354 | "writing (rb%u wb%u rp%u wp%u)\n", | ||
| 355 | mmc_card_id(card), | ||
| 356 | 1 << card->csd.read_blkbits, | ||
| 357 | 1 << card->csd.write_blkbits, | ||
| 358 | card->csd.read_partial, | ||
| 359 | card->csd.write_partial); | ||
| 360 | md->read_only = 1; | ||
| 361 | } | ||
| 362 | } | ||
| 363 | |||
| 364 | /* | ||
| 365 | * Refuse to allow block sizes smaller than 512 bytes. | ||
| 366 | */ | 325 | */ |
| 367 | if (md->block_bits < 9) { | 326 | md->block_bits = 9; |
| 368 | printk(KERN_ERR "%s: unable to support block size %u\n", | ||
| 369 | mmc_card_id(card), 1 << md->block_bits); | ||
| 370 | ret = -EINVAL; | ||
| 371 | goto err_kfree; | ||
| 372 | } | ||
| 373 | 327 | ||
| 374 | md->disk = alloc_disk(1 << MMC_SHIFT); | 328 | md->disk = alloc_disk(1 << MMC_SHIFT); |
| 375 | if (md->disk == NULL) { | 329 | if (md->disk == NULL) { |
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 58419985e00f..7c4e32cf0d47 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
| @@ -1435,9 +1435,43 @@ static int ofdm_qual_db(u8 status_quality, u8 rate, unsigned int size) | |||
| 1435 | break; | 1435 | break; |
| 1436 | } | 1436 | } |
| 1437 | 1437 | ||
| 1438 | switch (rate) { | ||
| 1439 | case ZD_OFDM_RATE_6M: | ||
| 1440 | case ZD_OFDM_RATE_9M: | ||
| 1441 | i += 3; | ||
| 1442 | break; | ||
| 1443 | case ZD_OFDM_RATE_12M: | ||
| 1444 | case ZD_OFDM_RATE_18M: | ||
| 1445 | i += 5; | ||
| 1446 | break; | ||
| 1447 | case ZD_OFDM_RATE_24M: | ||
| 1448 | case ZD_OFDM_RATE_36M: | ||
| 1449 | i += 9; | ||
| 1450 | break; | ||
| 1451 | case ZD_OFDM_RATE_48M: | ||
| 1452 | case ZD_OFDM_RATE_54M: | ||
| 1453 | i += 15; | ||
| 1454 | break; | ||
| 1455 | default: | ||
| 1456 | return -EINVAL; | ||
| 1457 | } | ||
| 1458 | |||
| 1438 | return i; | 1459 | return i; |
| 1439 | } | 1460 | } |
| 1440 | 1461 | ||
| 1462 | static int ofdm_qual_percent(u8 status_quality, u8 rate, unsigned int size) | ||
| 1463 | { | ||
| 1464 | int r; | ||
| 1465 | |||
| 1466 | r = ofdm_qual_db(status_quality, rate, size); | ||
| 1467 | ZD_ASSERT(r >= 0); | ||
| 1468 | if (r < 0) | ||
| 1469 | r = 0; | ||
| 1470 | |||
| 1471 | r = (r * 100)/29; | ||
| 1472 | return r <= 100 ? r : 100; | ||
| 1473 | } | ||
| 1474 | |||
| 1441 | static unsigned int log10times100(unsigned int x) | 1475 | static unsigned int log10times100(unsigned int x) |
| 1442 | { | 1476 | { |
| 1443 | static const u8 log10[] = { | 1477 | static const u8 log10[] = { |
| @@ -1481,31 +1515,28 @@ static int cck_snr_db(u8 status_quality) | |||
| 1481 | return r; | 1515 | return r; |
| 1482 | } | 1516 | } |
| 1483 | 1517 | ||
| 1484 | static int rx_qual_db(const void *rx_frame, unsigned int size, | 1518 | static int cck_qual_percent(u8 status_quality) |
| 1485 | const struct rx_status *status) | ||
| 1486 | { | 1519 | { |
| 1487 | return (status->frame_status&ZD_RX_OFDM) ? | 1520 | int r; |
| 1488 | ofdm_qual_db(status->signal_quality_ofdm, | 1521 | |
| 1489 | zd_ofdm_plcp_header_rate(rx_frame), | 1522 | r = cck_snr_db(status_quality); |
| 1490 | size) : | 1523 | r = (100*r)/17; |
| 1491 | cck_snr_db(status->signal_quality_cck); | 1524 | return r <= 100 ? r : 100; |
| 1492 | } | 1525 | } |
| 1493 | 1526 | ||
| 1494 | u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, | 1527 | u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, |
| 1495 | const struct rx_status *status) | 1528 | const struct rx_status *status) |
| 1496 | { | 1529 | { |
| 1497 | int r = rx_qual_db(rx_frame, size, status); | 1530 | return (status->frame_status&ZD_RX_OFDM) ? |
| 1498 | if (r < 0) | 1531 | ofdm_qual_percent(status->signal_quality_ofdm, |
| 1499 | r = 0; | 1532 | zd_ofdm_plcp_header_rate(rx_frame), |
| 1500 | r = (r * 100) / 14; | 1533 | size) : |
| 1501 | if (r > 100) | 1534 | cck_qual_percent(status->signal_quality_cck); |
| 1502 | r = 100; | ||
| 1503 | return r; | ||
| 1504 | } | 1535 | } |
| 1505 | 1536 | ||
| 1506 | u8 zd_rx_strength_percent(u8 rssi) | 1537 | u8 zd_rx_strength_percent(u8 rssi) |
| 1507 | { | 1538 | { |
| 1508 | int r = (rssi*100) / 30; | 1539 | int r = (rssi*100) / 41; |
| 1509 | if (r > 100) | 1540 | if (r > 100) |
| 1510 | r = 100; | 1541 | r = 100; |
| 1511 | return (u8) r; | 1542 | return (u8) r; |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 0eda534a648c..0ddccf893989 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
| @@ -814,13 +814,25 @@ static int filter_rx(struct ieee80211_device *ieee, | |||
| 814 | return -EINVAL; | 814 | return -EINVAL; |
| 815 | } | 815 | } |
| 816 | 816 | ||
| 817 | static void update_qual_rssi(struct zd_mac *mac, u8 qual_percent, u8 rssi) | 817 | static void update_qual_rssi(struct zd_mac *mac, |
| 818 | const u8 *buffer, unsigned int length, | ||
| 819 | u8 qual_percent, u8 rssi_percent) | ||
| 818 | { | 820 | { |
| 819 | unsigned long flags; | 821 | unsigned long flags; |
| 822 | struct ieee80211_hdr_3addr *hdr; | ||
| 823 | int i; | ||
| 824 | |||
| 825 | hdr = (struct ieee80211_hdr_3addr *)buffer; | ||
| 826 | if (length < offsetof(struct ieee80211_hdr_3addr, addr3)) | ||
| 827 | return; | ||
| 828 | if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0) | ||
| 829 | return; | ||
| 820 | 830 | ||
| 821 | spin_lock_irqsave(&mac->lock, flags); | 831 | spin_lock_irqsave(&mac->lock, flags); |
| 822 | mac->qual_average = (7 * mac->qual_average + qual_percent) / 8; | 832 | i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE; |
| 823 | mac->rssi_average = (7 * mac->rssi_average + rssi) / 8; | 833 | mac->qual_buffer[i] = qual_percent; |
| 834 | mac->rssi_buffer[i] = rssi_percent; | ||
| 835 | mac->stats_count++; | ||
| 824 | spin_unlock_irqrestore(&mac->lock, flags); | 836 | spin_unlock_irqrestore(&mac->lock, flags); |
| 825 | } | 837 | } |
| 826 | 838 | ||
| @@ -851,7 +863,6 @@ static int fill_rx_stats(struct ieee80211_rx_stats *stats, | |||
| 851 | if (stats->rate) | 863 | if (stats->rate) |
| 852 | stats->mask |= IEEE80211_STATMASK_RATE; | 864 | stats->mask |= IEEE80211_STATMASK_RATE; |
| 853 | 865 | ||
| 854 | update_qual_rssi(mac, stats->signal, stats->rssi); | ||
| 855 | return 0; | 866 | return 0; |
| 856 | } | 867 | } |
| 857 | 868 | ||
| @@ -875,6 +886,8 @@ int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length) | |||
| 875 | sizeof(struct rx_status); | 886 | sizeof(struct rx_status); |
| 876 | buffer += ZD_PLCP_HEADER_SIZE; | 887 | buffer += ZD_PLCP_HEADER_SIZE; |
| 877 | 888 | ||
| 889 | update_qual_rssi(mac, buffer, length, stats.signal, stats.rssi); | ||
| 890 | |||
| 878 | r = filter_rx(ieee, buffer, length, &stats); | 891 | r = filter_rx(ieee, buffer, length, &stats); |
| 879 | if (r <= 0) | 892 | if (r <= 0) |
| 880 | return r; | 893 | return r; |
| @@ -979,17 +992,31 @@ struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev) | |||
| 979 | { | 992 | { |
| 980 | struct zd_mac *mac = zd_netdev_mac(ndev); | 993 | struct zd_mac *mac = zd_netdev_mac(ndev); |
| 981 | struct iw_statistics *iw_stats = &mac->iw_stats; | 994 | struct iw_statistics *iw_stats = &mac->iw_stats; |
| 995 | unsigned int i, count, qual_total, rssi_total; | ||
| 982 | 996 | ||
| 983 | memset(iw_stats, 0, sizeof(struct iw_statistics)); | 997 | memset(iw_stats, 0, sizeof(struct iw_statistics)); |
| 984 | /* We are not setting the status, because ieee->state is not updated | 998 | /* We are not setting the status, because ieee->state is not updated |
| 985 | * at all and this driver doesn't track authentication state. | 999 | * at all and this driver doesn't track authentication state. |
| 986 | */ | 1000 | */ |
| 987 | spin_lock_irq(&mac->lock); | 1001 | spin_lock_irq(&mac->lock); |
| 988 | iw_stats->qual.qual = mac->qual_average; | 1002 | count = mac->stats_count < ZD_MAC_STATS_BUFFER_SIZE ? |
| 989 | iw_stats->qual.level = mac->rssi_average; | 1003 | mac->stats_count : ZD_MAC_STATS_BUFFER_SIZE; |
| 990 | iw_stats->qual.updated = IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED| | 1004 | qual_total = rssi_total = 0; |
| 991 | IW_QUAL_NOISE_INVALID; | 1005 | for (i = 0; i < count; i++) { |
| 1006 | qual_total += mac->qual_buffer[i]; | ||
| 1007 | rssi_total += mac->rssi_buffer[i]; | ||
| 1008 | } | ||
| 992 | spin_unlock_irq(&mac->lock); | 1009 | spin_unlock_irq(&mac->lock); |
| 1010 | iw_stats->qual.updated = IW_QUAL_NOISE_INVALID; | ||
| 1011 | if (count > 0) { | ||
| 1012 | iw_stats->qual.qual = qual_total / count; | ||
| 1013 | iw_stats->qual.level = rssi_total / count; | ||
| 1014 | iw_stats->qual.updated |= | ||
| 1015 | IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED; | ||
| 1016 | } else { | ||
| 1017 | iw_stats->qual.updated |= | ||
| 1018 | IW_QUAL_QUAL_INVALID|IW_QUAL_LEVEL_INVALID; | ||
| 1019 | } | ||
| 993 | /* TODO: update counter */ | 1020 | /* TODO: update counter */ |
| 994 | return iw_stats; | 1021 | return iw_stats; |
| 995 | } | 1022 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h index 082bcf8ec8dc..2b596cc8a41a 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.h +++ b/drivers/net/wireless/zd1211rw/zd_mac.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* zd_mac.c | 1 | /* zd_mac.h |
| 2 | * | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify | 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
| @@ -87,9 +87,9 @@ struct rx_length_info { | |||
| 87 | #define RX_LENGTH_INFO_TAG 0x697e | 87 | #define RX_LENGTH_INFO_TAG 0x697e |
| 88 | 88 | ||
| 89 | struct rx_status { | 89 | struct rx_status { |
| 90 | u8 signal_quality_cck; | ||
| 90 | /* rssi */ | 91 | /* rssi */ |
| 91 | u8 signal_strength; | 92 | u8 signal_strength; |
| 92 | u8 signal_quality_cck; | ||
| 93 | u8 signal_quality_ofdm; | 93 | u8 signal_quality_ofdm; |
| 94 | u8 decryption_type; | 94 | u8 decryption_type; |
| 95 | u8 frame_status; | 95 | u8 frame_status; |
| @@ -120,14 +120,17 @@ enum mac_flags { | |||
| 120 | MAC_FIXED_CHANNEL = 0x01, | 120 | MAC_FIXED_CHANNEL = 0x01, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | #define ZD_MAC_STATS_BUFFER_SIZE 16 | ||
| 124 | |||
| 123 | struct zd_mac { | 125 | struct zd_mac { |
| 124 | struct zd_chip chip; | 126 | struct zd_chip chip; |
| 125 | spinlock_t lock; | 127 | spinlock_t lock; |
| 126 | struct net_device *netdev; | 128 | struct net_device *netdev; |
| 127 | /* Unlocked reading possible */ | 129 | /* Unlocked reading possible */ |
| 128 | struct iw_statistics iw_stats; | 130 | struct iw_statistics iw_stats; |
| 129 | u8 qual_average; | 131 | unsigned int stats_count; |
| 130 | u8 rssi_average; | 132 | u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; |
| 133 | u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE]; | ||
| 131 | u8 regdomain; | 134 | u8 regdomain; |
| 132 | u8 default_regdomain; | 135 | u8 default_regdomain; |
| 133 | u8 requested_channel; | 136 | u8 requested_channel; |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 2d20caf377f5..a9bb3cb7e89b 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
| @@ -123,7 +123,8 @@ enum { | |||
| 123 | ich6_sata = 4, | 123 | ich6_sata = 4, |
| 124 | ich6_sata_ahci = 5, | 124 | ich6_sata_ahci = 5, |
| 125 | ich6m_sata_ahci = 6, | 125 | ich6m_sata_ahci = 6, |
| 126 | ich8_sata_ahci = 7, | 126 | ich7m_sata_ahci = 7, |
| 127 | ich8_sata_ahci = 8, | ||
| 127 | 128 | ||
| 128 | /* constants for mapping table */ | 129 | /* constants for mapping table */ |
| 129 | P0 = 0, /* port 0 */ | 130 | P0 = 0, /* port 0 */ |
| @@ -188,7 +189,7 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
| 188 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ | 189 | /* 82801GB/GR/GH (ICH7, identical to ICH6) */ |
| 189 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 190 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
| 190 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ | 191 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ |
| 191 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, | 192 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci }, |
| 192 | /* Enterprise Southbridge 2 (where's the datasheet?) */ | 193 | /* Enterprise Southbridge 2 (where's the datasheet?) */ |
| 193 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 194 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
| 194 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ | 195 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ |
| @@ -336,6 +337,24 @@ static const struct piix_map_db ich6m_map_db = { | |||
| 336 | }, | 337 | }, |
| 337 | }; | 338 | }; |
| 338 | 339 | ||
| 340 | static const struct piix_map_db ich7m_map_db = { | ||
| 341 | .mask = 0x3, | ||
| 342 | .port_enable = 0x5, | ||
| 343 | .present_shift = 4, | ||
| 344 | |||
| 345 | /* Map 01b isn't specified in the doc but some notebooks use | ||
| 346 | * it anyway. ATM, the only case spotted carries subsystem ID | ||
| 347 | * 1025:0107. This is the only difference from ich6m. | ||
| 348 | */ | ||
| 349 | .map = { | ||
| 350 | /* PM PS SM SS MAP */ | ||
| 351 | { P0, P2, RV, RV }, /* 00b */ | ||
| 352 | { IDE, IDE, P1, P3 }, /* 01b */ | ||
| 353 | { P0, P2, IDE, IDE }, /* 10b */ | ||
| 354 | { RV, RV, RV, RV }, | ||
| 355 | }, | ||
| 356 | }; | ||
| 357 | |||
| 339 | static const struct piix_map_db ich8_map_db = { | 358 | static const struct piix_map_db ich8_map_db = { |
| 340 | .mask = 0x3, | 359 | .mask = 0x3, |
| 341 | .port_enable = 0x3, | 360 | .port_enable = 0x3, |
| @@ -355,6 +374,7 @@ static const struct piix_map_db *piix_map_db_table[] = { | |||
| 355 | [ich6_sata] = &ich6_map_db, | 374 | [ich6_sata] = &ich6_map_db, |
| 356 | [ich6_sata_ahci] = &ich6_map_db, | 375 | [ich6_sata_ahci] = &ich6_map_db, |
| 357 | [ich6m_sata_ahci] = &ich6m_map_db, | 376 | [ich6m_sata_ahci] = &ich6m_map_db, |
| 377 | [ich7m_sata_ahci] = &ich7m_map_db, | ||
| 358 | [ich8_sata_ahci] = &ich8_map_db, | 378 | [ich8_sata_ahci] = &ich8_map_db, |
| 359 | }; | 379 | }; |
| 360 | 380 | ||
| @@ -444,6 +464,18 @@ static struct ata_port_info piix_port_info[] = { | |||
| 444 | .port_ops = &piix_sata_ops, | 464 | .port_ops = &piix_sata_ops, |
| 445 | }, | 465 | }, |
| 446 | 466 | ||
| 467 | /* ich7m_sata_ahci */ | ||
| 468 | { | ||
| 469 | .sht = &piix_sht, | ||
| 470 | .host_flags = ATA_FLAG_SATA | | ||
| 471 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | | ||
| 472 | PIIX_FLAG_AHCI, | ||
| 473 | .pio_mask = 0x1f, /* pio0-4 */ | ||
| 474 | .mwdma_mask = 0x07, /* mwdma0-2 */ | ||
| 475 | .udma_mask = 0x7f, /* udma0-6 */ | ||
| 476 | .port_ops = &piix_sata_ops, | ||
| 477 | }, | ||
| 478 | |||
| 447 | /* ich8_sata_ahci */ | 479 | /* ich8_sata_ahci */ |
| 448 | { | 480 | { |
| 449 | .sht = &piix_sht, | 481 | .sht = &piix_sht, |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 1053c7c76b7d..fa38a413d16b 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
| @@ -1961,8 +1961,7 @@ comreset_retry: | |||
| 1961 | timeout = jiffies + msecs_to_jiffies(200); | 1961 | timeout = jiffies + msecs_to_jiffies(200); |
| 1962 | do { | 1962 | do { |
| 1963 | sata_scr_read(ap, SCR_STATUS, &sstatus); | 1963 | sata_scr_read(ap, SCR_STATUS, &sstatus); |
| 1964 | sstatus &= 0x3; | 1964 | if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) |
| 1965 | if ((sstatus == 3) || (sstatus == 0)) | ||
| 1966 | break; | 1965 | break; |
| 1967 | 1966 | ||
| 1968 | __msleep(1, can_sleep); | 1967 | __msleep(1, can_sleep); |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 01d40369a8a5..a3727af8b9c1 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
| @@ -77,6 +77,7 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | |||
| 77 | static void vt6420_error_handler(struct ata_port *ap); | 77 | static void vt6420_error_handler(struct ata_port *ap); |
| 78 | 78 | ||
| 79 | static const struct pci_device_id svia_pci_tbl[] = { | 79 | static const struct pci_device_id svia_pci_tbl[] = { |
| 80 | { 0x1106, 0x0591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | ||
| 80 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | 81 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, |
| 81 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, | 82 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, |
| 82 | 83 | ||
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index acb24c6219d9..a2c56b2de589 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
| @@ -1444,7 +1444,7 @@ void hid_init_reports(struct hid_device *hid) | |||
| 1444 | #define USB_DEVICE_ID_GTCO_402 0x0402 | 1444 | #define USB_DEVICE_ID_GTCO_402 0x0402 |
| 1445 | #define USB_DEVICE_ID_GTCO_403 0x0403 | 1445 | #define USB_DEVICE_ID_GTCO_403 0x0403 |
| 1446 | #define USB_DEVICE_ID_GTCO_404 0x0404 | 1446 | #define USB_DEVICE_ID_GTCO_404 0x0404 |
| 1447 | #define USB_DEVICE_ID_GTCO_404 0x0405 | 1447 | #define USB_DEVICE_ID_GTCO_405 0x0405 |
| 1448 | #define USB_DEVICE_ID_GTCO_500 0x0500 | 1448 | #define USB_DEVICE_ID_GTCO_500 0x0500 |
| 1449 | #define USB_DEVICE_ID_GTCO_501 0x0501 | 1449 | #define USB_DEVICE_ID_GTCO_501 0x0501 |
| 1450 | #define USB_DEVICE_ID_GTCO_502 0x0502 | 1450 | #define USB_DEVICE_ID_GTCO_502 0x0502 |
| @@ -1657,7 +1657,7 @@ static const struct hid_blacklist { | |||
| 1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, | 1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, |
| 1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, | 1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, |
| 1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | 1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, |
| 1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | 1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE }, |
| 1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, | 1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, |
| 1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, | 1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, |
| 1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, | 1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, |
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 3b175aa482cd..a338bf4c2d78 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
| @@ -286,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) | |||
| 286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) | 286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) |
| 287 | { | 287 | { |
| 288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); | 288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); |
| 289 | *x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); | 289 | *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); |
| 290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); | 290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); |
| 291 | *touch = ~pkt[7] & 0x20; | 291 | *touch = ~pkt[7] & 0x20; |
| 292 | 292 | ||
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 738bd7c7451f..e16582f3733c 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
| @@ -3435,6 +3435,8 @@ static void sisusb_disconnect(struct usb_interface *intf) | |||
| 3435 | 3435 | ||
| 3436 | static struct usb_device_id sisusb_table [] = { | 3436 | static struct usb_device_id sisusb_table [] = { |
| 3437 | { USB_DEVICE(0x0711, 0x0900) }, | 3437 | { USB_DEVICE(0x0711, 0x0900) }, |
| 3438 | { USB_DEVICE(0x0711, 0x0901) }, | ||
| 3439 | { USB_DEVICE(0x0711, 0x0902) }, | ||
| 3438 | { USB_DEVICE(0x182d, 0x021c) }, | 3440 | { USB_DEVICE(0x182d, 0x021c) }, |
| 3439 | { USB_DEVICE(0x182d, 0x0269) }, | 3441 | { USB_DEVICE(0x182d, 0x0269) }, |
| 3440 | { } | 3442 | { } |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 15945e806f03..c6115aa1b445 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -506,6 +506,7 @@ static struct usb_device_id id_table_combined [] = { | |||
| 506 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, | 506 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, |
| 507 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, | 507 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, |
| 508 | { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, | 508 | { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, |
| 509 | { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, | ||
| 509 | { }, /* Optional parameter entry */ | 510 | { }, /* Optional parameter entry */ |
| 510 | { } /* Terminating entry */ | 511 | { } /* Terminating entry */ |
| 511 | }; | 512 | }; |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 8888cd80a491..77299996f7ee 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
| @@ -467,6 +467,11 @@ | |||
| 467 | #define TESTO_VID 0x128D | 467 | #define TESTO_VID 0x128D |
| 468 | #define TESTO_USB_INTERFACE_PID 0x0001 | 468 | #define TESTO_USB_INTERFACE_PID 0x0001 |
| 469 | 469 | ||
| 470 | /* | ||
| 471 | * Gamma Scout (http://gamma-scout.com/). Submitted by rsc@runtux.com. | ||
| 472 | */ | ||
| 473 | #define FTDI_GAMMA_SCOUT_PID 0xD678 /* Gamma Scout online */ | ||
| 474 | |||
| 470 | /* Commands */ | 475 | /* Commands */ |
| 471 | #define FTDI_SIO_RESET 0 /* Reset the port */ | 476 | #define FTDI_SIO_RESET 0 /* Reset the port */ |
| 472 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ | 477 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ |
diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index 5675b1796b55..40e8e270d337 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h | |||
| @@ -9,9 +9,6 @@ | |||
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | ||
| 13 | * Changelog: | ||
| 14 | * | ||
| 15 | */ | 12 | */ |
| 16 | 13 | ||
| 17 | #ifndef __ASM_ARCH_ANUBISCPLD_H | 14 | #ifndef __ASM_ARCH_ANUBISCPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h index 82f15dbd97e8..4b5f423779df 100644 --- a/include/asm-arm/arch-s3c2410/anubis-irq.h +++ b/include/asm-arm/arch-s3c2410/anubis-irq.h | |||
| @@ -9,9 +9,7 @@ | |||
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | 12 | */ |
| 13 | * Changelog: | ||
| 14 | */ | ||
| 15 | 13 | ||
| 16 | #ifndef __ASM_ARCH_ANUBISIRQ_H | 14 | #ifndef __ASM_ARCH_ANUBISIRQ_H |
| 17 | #define __ASM_ARCH_ANUBISIRQ_H | 15 | #define __ASM_ARCH_ANUBISIRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index d529ffda8599..058a2104b035 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
| @@ -9,8 +9,6 @@ | |||
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | ||
| 13 | * Changelog: | ||
| 14 | */ | 12 | */ |
| 15 | 13 | ||
| 16 | /* needs arch/map.h including with this */ | 14 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 0d276e67f2fb..7e0222276c98 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h | |||
| @@ -9,10 +9,6 @@ | |||
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | ||
| 13 | * Changelog: | ||
| 14 | * 20-Nov-2004 BJD Created file | ||
| 15 | * 07-Mar-2005 BJD Added suspend/resume calls | ||
| 16 | */ | 12 | */ |
| 17 | 13 | ||
| 18 | #ifndef __ASM_ARCH_AUDIO_H | 14 | #ifndef __ASM_ARCH_AUDIO_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h index e28ca51a4975..8969cffe83fa 100644 --- a/include/asm-arm/arch-s3c2410/bast-cpld.h +++ b/include/asm-arm/arch-s3c2410/bast-cpld.h | |||
| @@ -8,11 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 25-May-2003 BJD Created file, added CTRL1 registers | ||
| 14 | * 30-Aug-2004 BJD Updated definitions from 2.4.26 port | ||
| 15 | * 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions | ||
| 16 | */ | 11 | */ |
| 17 | 12 | ||
| 18 | #ifndef __ASM_ARCH_BASTCPLD_H | 13 | #ifndef __ASM_ARCH_BASTCPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h index b79b47f0d126..15ffa66f5011 100644 --- a/include/asm-arm/arch-s3c2410/bast-irq.h +++ b/include/asm-arm/arch-s3c2410/bast-irq.h | |||
| @@ -8,11 +8,7 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | */ |
| 12 | * Changelog: | ||
| 13 | * 14-Sep-2004 BJD Fixed IRQ_USBOC definition | ||
| 14 | * 06-Jan-2003 BJD Linux 2.6.0 version | ||
| 15 | */ | ||
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARCH_BASTIRQ_H | 13 | #ifndef __ASM_ARCH_BASTIRQ_H |
| 18 | #define __ASM_ARCH_BASTIRQ_H | 14 | #define __ASM_ARCH_BASTIRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h index 29c07e302b04..727cef84c70e 100644 --- a/include/asm-arm/arch-s3c2410/bast-map.h +++ b/include/asm-arm/arch-s3c2410/bast-map.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics from arch/map.h | ||
| 14 | * 12-Mar-2004 BJD Fixed header include protection | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | /* needs arch/map.h including with this */ | 13 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h index 758c5c59d4bf..82836027f00f 100644 --- a/include/asm-arm/arch-s3c2410/bast-pmu.h +++ b/include/asm-arm/arch-s3c2410/bast-pmu.h | |||
| @@ -9,9 +9,6 @@ | |||
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | ||
| 13 | * Changelog: | ||
| 14 | * 08-Oct-2003 BJD Initial creation | ||
| 15 | */ | 12 | */ |
| 16 | 13 | ||
| 17 | #ifndef __ASM_ARCH_BASTPMU_H | 14 | #ifndef __ASM_ARCH_BASTPMU_H |
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index b7d15d125458..93064860e0e5 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
| @@ -10,9 +10,6 @@ | |||
| 10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
| 13 | * | ||
| 14 | * Modifications: | ||
| 15 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 16 | */ | 13 | */ |
| 17 | 14 | ||
| 18 | #include <asm/arch/map.h> | 15 | #include <asm/arch/map.h> |
diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h index 4790491ba9d0..71161797bc89 100644 --- a/include/asm-arm/arch-s3c2410/fb.h +++ b/include/asm-arm/arch-s3c2410/fb.h | |||
| @@ -7,13 +7,6 @@ | |||
| 7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | * | ||
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 07-Sep-2004 RTP Created file | ||
| 14 | * 03-Nov-2004 BJD Updated and minor cleanups | ||
| 15 | * 03-Aug-2005 RTP Renamed to fb.h | ||
| 16 | * 26-Oct-2005 BJD Changed name of platdata init | ||
| 17 | */ | 10 | */ |
| 18 | 11 | ||
| 19 | #ifndef __ASM_ARM_FB_H | 12 | #ifndef __ASM_ARM_FB_H |
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index a2330bf83695..871f8af09b8b 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
| @@ -8,16 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 21-May-2003 BJD Created file | ||
| 14 | * 06-Jun-2003 BJD Added CPU frequency settings | ||
| 15 | * 03-Sep-2003 BJD Linux v2.6 support | ||
| 16 | * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars | ||
| 17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio | ||
| 18 | * 01-Oct-2004 BJD Added the new gpio functions | ||
| 19 | * 16-Oct-2004 BJD Removed the clock variables | ||
| 20 | * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() | ||
| 21 | */ | 11 | */ |
| 22 | 12 | ||
| 23 | #ifndef __ASM_ARCH_HARDWARE_H | 13 | #ifndef __ASM_ARCH_HARDWARE_H |
diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h index 749227c09576..eed450608f9c 100644 --- a/include/asm-arm/arch-s3c2410/idle.h +++ b/include/asm-arm/arch-s3c2410/idle.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 CPU Idle controls | 10 | * S3C2410 CPU Idle controls |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 28-Oct-2004 BJD Initial version | ||
| 14 | * | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARCH_IDLE_H | 13 | #ifndef __ASM_ARCH_IDLE_H |
diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h index 518547f6d7a7..ed3d6c7bf6d7 100644 --- a/include/asm-arm/arch-s3c2410/iic.h +++ b/include/asm-arm/arch-s3c2410/iic.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 05-Oct-2004 BJD Created file | ||
| 14 | * 19-Oct-2004 BJD Updated for s3c2440 | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARCH_IIC_H | 13 | #ifndef __ASM_ARCH_IIC_H |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 16fbc8afffd9..6b35a4f2630e 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
| @@ -4,13 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Copyright (C) 1997 Russell King | 5 | * Copyright (C) 1997 Russell King |
| 6 | * (C) 2003 Simtec Electronics | 6 | * (C) 2003 Simtec Electronics |
| 7 | * | 7 | */ |
| 8 | * Modifications: | ||
| 9 | * 06-Dec-1997 RMK Created. | ||
| 10 | * 02-Sep-2003 BJD Modified for S3C2410 | ||
| 11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 12 | * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range | ||
| 13 | */ | ||
| 14 | 8 | ||
| 15 | #ifndef __ASM_ARM_ARCH_IO_H | 9 | #ifndef __ASM_ARM_ARCH_IO_H |
| 16 | #define __ASM_ARM_ARCH_IO_H | 10 | #define __ASM_ARM_ARCH_IO_H |
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index d9773d697268..39a69829d163 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
| @@ -6,14 +6,7 @@ | |||
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | */ |
| 10 | * Changelog: | ||
| 11 | * 12-May-2003 BJD Created file | ||
| 12 | * 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out | ||
| 13 | * 12-Mar-2004 BJD Fixed bug in header protection | ||
| 14 | * 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv | ||
| 15 | * 28-Feb-2005 BJD Updated s3c2440 IRQs | ||
| 16 | */ | ||
| 17 | 10 | ||
| 18 | 11 | ||
| 19 | #ifndef __ASM_ARCH_IRQS_H | 12 | #ifndef __ASM_ARCH_IRQS_H |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index fae2766ff32b..27ba0ac3fdd5 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
| @@ -8,13 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 12-May-2003 BJD Created file | ||
| 14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out | ||
| 15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv | ||
| 16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names | ||
| 17 | * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources | ||
| 18 | */ | 11 | */ |
| 19 | 12 | ||
| 20 | #ifndef __ASM_ARCH_MAP_H | 13 | #ifndef __ASM_ARCH_MAP_H |
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h index 6ab834a14c8e..4be6a74c4303 100644 --- a/include/asm-arm/arch-s3c2410/memory.h +++ b/include/asm-arm/arch-s3c2410/memory.h | |||
| @@ -1,6 +1,4 @@ | |||
| 1 | /* | 1 | /* linux/include/asm-arm/arch-s3c2410/memory.h |
| 2 | * linux/include/asm-arm/arch-s3c2410/memory.h | ||
| 3 | * | ||
| 4 | * from linux/include/asm-arm/arch-rpc/memory.h | 2 | * from linux/include/asm-arm/arch-rpc/memory.h |
| 5 | * | 3 | * |
| 6 | * Copyright (C) 1996,1997,1998 Russell King. | 4 | * Copyright (C) 1996,1997,1998 Russell King. |
| @@ -8,16 +6,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 20-Oct-1996 RMK Created | ||
| 14 | * 31-Dec-1997 RMK Fixed definitions to reduce warnings | ||
| 15 | * 11-Jan-1998 RMK Uninlined to reduce hits on cache | ||
| 16 | * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt | ||
| 17 | * 21-Mar-1999 RMK Renamed to memory.h | ||
| 18 | * RMK Added TASK_SIZE and PAGE_OFFSET | ||
| 19 | * 05-Apr-2004 BJD Copied and altered for arch-s3c2410 | ||
| 20 | * 17-Mar-2005 LCVR Modified for S3C2400 | ||
| 21 | */ | 9 | */ |
| 22 | 10 | ||
| 23 | #ifndef __ASM_ARCH_MEMORY_H | 11 | #ifndef __ASM_ARCH_MEMORY_H |
diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/arch-s3c2410/nand.h index 9148ac045b0d..e350ae2acfc6 100644 --- a/include/asm-arm/arch-s3c2410/nand.h +++ b/include/asm-arm/arch-s3c2410/nand.h | |||
| @@ -8,9 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 23-Sep-2004 BJD Created file | ||
| 14 | */ | 11 | */ |
| 15 | 12 | ||
| 16 | /* struct s3c2410_nand_set | 13 | /* struct s3c2410_nand_set |
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index 7c4b0cd2d14d..e2d406218ae5 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
| @@ -9,8 +9,6 @@ | |||
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | ||
| 13 | * Changelog: | ||
| 14 | */ | 12 | */ |
| 15 | 13 | ||
| 16 | /* needs arch/map.h including with this */ | 14 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index 15bfc2f5754e..c7b90b3ecc9e 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h | |||
| @@ -7,9 +7,6 @@ | |||
| 7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 8 | * | 8 | * |
| 9 | * S3C2410 ADC registers | 9 | * S3C2410 ADC registers |
| 10 | * | ||
| 11 | * Changelog: | ||
| 12 | * 27-09-2004 SAH Created file | ||
| 13 | */ | 10 | */ |
| 14 | 11 | ||
| 15 | #ifndef __ASM_ARCH_REGS_ADC_H | 12 | #ifndef __ASM_ARCH_REGS_ADC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index a7c61feb8433..b2f4690c0791 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
| @@ -8,18 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 clock register definitions | 10 | * S3C2410 clock register definitions |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 18-Aug-2004 Ben Dooks Added 2440 definitions | ||
| 14 | * 08-Aug-2004 Herbert Pötzl Added CLKCON definitions | ||
| 15 | * 19-06-2003 Ben Dooks Created file | ||
| 16 | * 12-03-2004 Ben Dooks Updated include protection | ||
| 17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion | ||
| 18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | ||
| 19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | ||
| 20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | ||
| 21 | * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat) | ||
| 22 | * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat) | ||
| 23 | */ | 11 | */ |
| 24 | 12 | ||
| 25 | #ifndef __ASM_ARM_REGS_CLOCK | 13 | #ifndef __ASM_ARM_REGS_CLOCK |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 6dd17f0f84e0..93c49432db95 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
| @@ -8,21 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 GPIO register definitions | 10 | * S3C2410 GPIO register definitions |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 19-06-2003 BJD Created file | ||
| 14 | * 23-06-2003 BJD Updated GSTATUS registers | ||
| 15 | * 12-03-2004 BJD Updated include protection | ||
| 16 | * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions | ||
| 17 | * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs | ||
| 18 | * 17-10-2004 BJD Added GSTATUS1 register definitions | ||
| 19 | * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6 | ||
| 20 | * 18-11-2004 BJD Added S3C2440 AC97 controls | ||
| 21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | ||
| 23 | * 26-Oct-2005 BJD Added generic configuration types | ||
| 24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers | ||
| 25 | * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro | ||
| 26 | */ | 11 | */ |
| 27 | 12 | ||
| 28 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 18edae50d0b8..91cefa260497 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2440 GPIO J register definitions | 10 | * S3C2440 GPIO J register definitions |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 11-Aug-2004 BJD Created file | ||
| 14 | * 10-Feb-2005 BJD Fix GPJ12 definition (Guillaume Gourat) | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h index fed3288e2046..2ae29522f253 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/arch-s3c2410/regs-iic.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 I2C Controller | 10 | * S3C2410 I2C Controller |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 03-Oct-2004 BJD Initial include for Linux | ||
| 14 | * 08-Nov-2004 BJD Added S3C2440 filter register | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARCH_REGS_IIC_H | 13 | #ifndef __ASM_ARCH_REGS_IIC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index 7fdde9b91cb4..72cd2509822e 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h | |||
| @@ -8,17 +8,7 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 IIS register definition | 10 | * S3C2410 IIS register definition |
| 11 | * | 11 | */ |
| 12 | * Changelog: | ||
| 13 | * 19-06-2003 BJD Created file | ||
| 14 | * 26-06-2003 BJD Finished off definitions for register addresses | ||
| 15 | * 12-03-2004 BJD Updated include protection | ||
| 16 | * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL | ||
| 17 | * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400 | ||
| 18 | * 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL | ||
| 19 | * Correct IISMOD_256FS and IISMOD_384FS | ||
| 20 | * Add IISCON_PSCEN | ||
| 21 | */ | ||
| 22 | 12 | ||
| 23 | #ifndef __ASM_ARCH_REGS_IIS_H | 13 | #ifndef __ASM_ARCH_REGS_IIS_H |
| 24 | #define __ASM_ARCH_REGS_IIS_H | 14 | #define __ASM_ARCH_REGS_IIS_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h index 572fca5d9acf..29fb8ef670f0 100644 --- a/include/asm-arm/arch-s3c2410/regs-irq.h +++ b/include/asm-arm/arch-s3c2410/regs-irq.h | |||
| @@ -6,14 +6,7 @@ | |||
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | */ |
| 10 | * | ||
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 19-06-2003 BJD Created file | ||
| 14 | * 12-03-2004 BJD Updated include protection | ||
| 15 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 16 | */ | ||
| 17 | 10 | ||
| 18 | 11 | ||
| 19 | #ifndef ___ASM_ARCH_REGS_IRQ_H | 12 | #ifndef ___ASM_ARCH_REGS_IRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index b6b1b4e8bbeb..b306d6e3135d 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h | |||
| @@ -6,14 +6,6 @@ | |||
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | ||
| 10 | * | ||
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 12-06-2003 BJD Created file | ||
| 14 | * 26-06-2003 BJD Updated LCDCON register definitions | ||
| 15 | * 12-03-2004 BJD Updated include protection | ||
| 16 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 17 | */ | 9 | */ |
| 18 | 10 | ||
| 19 | 11 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index a2d7d0cec042..375dca50364e 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h | |||
| @@ -8,12 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 Memory Control register definitions | 10 | * S3C2410 Memory Control register definitions |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 29-Sep-2004 BJD Initial include for Linux | ||
| 14 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 15 | * 04-Apr-2005 LCVR Added S3C2400 DRAM/BANKSIZE_MASK definitions | ||
| 16 | * | ||
| 17 | */ | 11 | */ |
| 18 | 12 | ||
| 19 | #ifndef __ASM_ARM_MEMREGS_H | 13 | #ifndef __ASM_ARM_MEMREGS_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index c1470c695c33..b824d371ae0b 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 NAND register definitions | 10 | * S3C2410 NAND register definitions |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated | ||
| 14 | * 01-May-2005 BJD Added definitions for s3c2440 controller | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARM_REGS_NAND | 13 | #ifndef __ASM_ARM_REGS_NAND |
diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h index 0fbec07bb6b8..cd88fd634d12 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/arch-s3c2410/regs-rtc.h | |||
| @@ -8,11 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 Internal RTC register definition | 10 | * S3C2410 Internal RTC register definition |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 19-06-2003 BJD Created file | ||
| 14 | * 12-03-2004 BJD Updated include protection | ||
| 15 | * 15-01-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) | ||
| 16 | */ | 11 | */ |
| 17 | 12 | ||
| 18 | #ifndef __ASM_ARCH_REGS_RTC_H | 13 | #ifndef __ASM_ARCH_REGS_RTC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h index ca9a26fbecec..06e716e5b46d 100644 --- a/include/asm-arm/arch-s3c2410/regs-sdi.h +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h | |||
| @@ -8,11 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 MMC/SDIO register definitions | 10 | * S3C2410 MMC/SDIO register definitions |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 18-Aug-2004 Ben Dooks Created initial file | ||
| 14 | * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates | ||
| 15 | * 29-Nov-2004 Ben Dooks Updated Koen's patch | ||
| 16 | */ | 11 | */ |
| 17 | 12 | ||
| 18 | #ifndef __ASM_ARM_REGS_SDI | 13 | #ifndef __ASM_ARM_REGS_SDI |
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 93f651ae2967..19c77da9c3fe 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
| @@ -27,10 +27,7 @@ | |||
| 27 | * You should have received a copy of the GNU General Public License | 27 | * You should have received a copy of the GNU General Public License |
| 28 | * along with this program; if not, write to the Free Software | 28 | * along with this program; if not, write to the Free Software |
| 29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 30 | * | 30 | */ |
| 31 | * Modifications: | ||
| 32 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) | ||
| 33 | */ | ||
| 34 | 31 | ||
| 35 | #ifndef __ASM_ARM_REGS_SERIAL_H | 32 | #ifndef __ASM_ARM_REGS_SERIAL_H |
| 36 | #define __ASM_ARM_REGS_SERIAL_H | 33 | #define __ASM_ARM_REGS_SERIAL_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/arch-s3c2410/regs-spi.h index 338217858c73..3552280d1e8f 100644 --- a/include/asm-arm/arch-s3c2410/regs-spi.h +++ b/include/asm-arm/arch-s3c2410/regs-spi.h | |||
| @@ -7,13 +7,7 @@ | |||
| 7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 8 | * | 8 | * |
| 9 | * S3C2410 SPI register definition | 9 | * S3C2410 SPI register definition |
| 10 | * | 10 | */ |
| 11 | * Changelog: | ||
| 12 | * 20-04-2004 KF Created file | ||
| 13 | * 04-10-2004 BJD Removed VA address (no longer mapped) | ||
| 14 | * tidied file for submission | ||
| 15 | * 03-04-2005 LCVR Added S3C2400_SPPIN_nCS definition | ||
| 16 | */ | ||
| 17 | 11 | ||
| 18 | #ifndef __ASM_ARCH_REGS_SPI_H | 12 | #ifndef __ASM_ARCH_REGS_SPI_H |
| 19 | #define __ASM_ARCH_REGS_SPI_H | 13 | #define __ASM_ARCH_REGS_SPI_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h index 169064e27520..731918e77831 100644 --- a/include/asm-arm/arch-s3c2410/regs-timer.h +++ b/include/asm-arm/arch-s3c2410/regs-timer.h | |||
| @@ -8,13 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 Timer configuration | 10 | * S3C2410 Timer configuration |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 05-06-2003 BJD Created file | ||
| 14 | * 26-06-2003 BJD Added more timer definitions to mux / control | ||
| 15 | * 12-03-2004 BJD Updated include protection | ||
| 16 | * 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat) | ||
| 17 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 18 | */ | 11 | */ |
| 19 | 12 | ||
| 20 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h index bf315b763252..3aa31a27da1a 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/arch-s3c2410/regs-udc.h | |||
| @@ -6,13 +6,7 @@ | |||
| 6 | * modify it under the terms of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
| 7 | * published by the Free Software Foundation; either version 2 of | 7 | * published by the Free Software Foundation; either version 2 of |
| 8 | * the License, or (at your option) any later version. | 8 | * the License, or (at your option) any later version. |
| 9 | * | 9 | */ |
| 10 | * Changelog: | ||
| 11 | * 01-08-2004 Initial creation | ||
| 12 | * 12-09-2004 Cleanup for submission | ||
| 13 | * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition | ||
| 14 | * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA | ||
| 15 | */ | ||
| 16 | 10 | ||
| 17 | #ifndef __ASM_ARCH_REGS_UDC_H | 11 | #ifndef __ASM_ARCH_REGS_UDC_H |
| 18 | #define __ASM_ARCH_REGS_UDC_H | 12 | #define __ASM_ARCH_REGS_UDC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h index d199ca6aff22..f4fff448c7bd 100644 --- a/include/asm-arm/arch-s3c2410/regs-watchdog.h +++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* linux/include/asm/arch-s3c2410/regs0watchdog.h | 1 | /* linux/include/asm/arch-s3c2410/regs-watchdog.h |
| 2 | * | 2 | * |
| 3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> |
| 4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://www.simtec.co.uk/products/SWLINUX/ |
| @@ -8,11 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * S3C2410 Watchdog timer control | 10 | * S3C2410 Watchdog timer control |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 21-06-2003 BJD Created file | ||
| 14 | * 12-03-2004 BJD Updated include protection | ||
| 15 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 16 | */ | 11 | */ |
| 17 | 12 | ||
| 18 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 9b0d85024cb4..718246d85952 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
| @@ -8,14 +8,7 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | */ |
| 12 | * Changelog: | ||
| 13 | * 12-May-2003 BJD Created file | ||
| 14 | * 14-May-2003 BJD Removed idle to aid debugging | ||
| 15 | * 12-Jun-2003 BJD Added reset via watchdog | ||
| 16 | * 04-Sep-2003 BJD Moved to v2.6 | ||
| 17 | * 28-Oct-2004 BJD Added over-ride for idle, and fixed reset panic() | ||
| 18 | */ | ||
| 19 | 12 | ||
| 20 | #include <asm/hardware.h> | 13 | #include <asm/hardware.h> |
| 21 | #include <asm/io.h> | 14 | #include <asm/io.h> |
diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h index 3558a3a750bf..703c337c5617 100644 --- a/include/asm-arm/arch-s3c2410/timex.h +++ b/include/asm-arm/arch-s3c2410/timex.h | |||
| @@ -8,12 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 02-Sep-2003 BJD Created file | ||
| 14 | * 05-Jan-2004 BJD Updated for Linux 2.6.0 | ||
| 15 | * 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE | ||
| 16 | * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate | ||
| 17 | */ | 11 | */ |
| 18 | 12 | ||
| 19 | #ifndef __ASM_ARCH_TIMEX_H | 13 | #ifndef __ASM_ARCH_TIMEX_H |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index 8e152a05e533..81b3e91c56ab 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
| @@ -8,15 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 22-May-2003 BJD Created | ||
| 14 | * 08-Sep-2003 BJD Moved to linux v2.6 | ||
| 15 | * 12-Mar-2004 BJD Updated header protection | ||
| 16 | * 12-Oct-2004 BJD Take account of debug uart configuration | ||
| 17 | * 15-Nov-2004 BJD Fixed uart configuration | ||
| 18 | * 22-Feb-2005 BJD Added watchdog to uncompress | ||
| 19 | * 04-Apr-2005 LCVR Added support to S3C2400 (no cpuid at GSTATUS1) | ||
| 20 | */ | 11 | */ |
| 21 | 12 | ||
| 22 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 13 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h index bd43b566db3e..35723569a17a 100644 --- a/include/asm-arm/arch-s3c2410/usb-control.h +++ b/include/asm-arm/arch-s3c2410/usb-control.h | |||
| @@ -8,11 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 11-Sep-2004 BJD Created file | ||
| 14 | * 21-Sep-2004 BJD Updated port info | ||
| 15 | * 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc | ||
| 16 | */ | 11 | */ |
| 17 | 12 | ||
| 18 | #ifndef __ASM_ARCH_USBCONTROL_H | 13 | #ifndef __ASM_ARCH_USBCONTROL_H |
diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h index 33963cd5461b..0ae3bdb7e03b 100644 --- a/include/asm-arm/arch-s3c2410/vmalloc.h +++ b/include/asm-arm/arch-s3c2410/vmalloc.h | |||
| @@ -10,11 +10,7 @@ | |||
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * S3C2410 vmalloc definition | 12 | * S3C2410 vmalloc definition |
| 13 | * | 13 | */ |
| 14 | * Changelog: | ||
| 15 | * 12-Mar-2004 BJD Fixed header, added include protection | ||
| 16 | * 12=Mar-2004 BJD Fixed VMALLOC_END definitions | ||
| 17 | */ | ||
| 18 | 14 | ||
| 19 | #ifndef __ASM_ARCH_VMALLOC_H | 15 | #ifndef __ASM_ARCH_VMALLOC_H |
| 20 | #define __ASM_ARCH_VMALLOC_H | 16 | #define __ASM_ARCH_VMALLOC_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h index 0ee373ac60d4..a341b1e1bd98 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h +++ b/include/asm-arm/arch-s3c2410/vr1000-cpld.h | |||
| @@ -8,10 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 25-May-2003 BJD Created file, added CTRL1 registers | ||
| 14 | * 19-Mar-2004 BJD Added VR1000 CPLD definitions | ||
| 15 | */ | 11 | */ |
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARCH_VR1000CPLD_H | 13 | #ifndef __ASM_ARCH_VR1000CPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h index 694f7715d2da..c39a0ffa670d 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-irq.h +++ b/include/asm-arm/arch-s3c2410/vr1000-irq.h | |||
| @@ -8,11 +8,7 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | */ |
| 12 | * Changelog: | ||
| 13 | * 06-Jan-2003 BJD Linux 2.6.0 version | ||
| 14 | * 19-Mar-2004 BJD Updates for VR1000 | ||
| 15 | */ | ||
| 16 | 12 | ||
| 17 | #ifndef __ASM_ARCH_VR1000IRQ_H | 13 | #ifndef __ASM_ARCH_VR1000IRQ_H |
| 18 | #define __ASM_ARCH_VR1000IRQ_H | 14 | #define __ASM_ARCH_VR1000IRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h index 867c9355fd39..1fe4db36c834 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-map.h +++ b/include/asm-arm/arch-s3c2410/vr1000-map.h | |||
| @@ -8,12 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Changelog: | ||
| 13 | * 06-Jan-2003 BJD Linux 2.6.0 version, split specifics from arch/map.h | ||
| 14 | * 12-Mar-2004 BJD Fixed header include protection | ||
| 15 | * 19-Mar-2004 BJD Copied to VR1000 machine headers. | ||
| 16 | * 19-Jan-2005 BJD Updated map definitions | ||
| 17 | */ | 11 | */ |
| 18 | 12 | ||
| 19 | /* needs arch/map.h including with this */ | 13 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index e2f1d75171df..01b7c26a3038 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
| @@ -201,7 +201,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
| 201 | 201 | ||
| 202 | static inline int __raw_read_trylock(raw_rwlock_t *rw) | 202 | static inline int __raw_read_trylock(raw_rwlock_t *rw) |
| 203 | { | 203 | { |
| 204 | unsigned long tmp tmp2 = 1; | 204 | unsigned long tmp, tmp2 = 1; |
| 205 | 205 | ||
| 206 | __asm__ __volatile__( | 206 | __asm__ __volatile__( |
| 207 | "1: ldrex %0, [%2]\n" | 207 | "1: ldrex %0, [%2]\n" |
diff --git a/include/asm-generic/audit_read.h b/include/asm-generic/audit_read.h new file mode 100644 index 000000000000..0e87464d9847 --- /dev/null +++ b/include/asm-generic/audit_read.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | __NR_readlink, | ||
| 2 | __NR_quotactl, | ||
| 3 | __NR_listxattr, | ||
| 4 | __NR_llistxattr, | ||
| 5 | __NR_flistxattr, | ||
| 6 | __NR_getxattr, | ||
| 7 | __NR_lgetxattr, | ||
| 8 | __NR_fgetxattr, | ||
diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h new file mode 100644 index 000000000000..f10d367fb2a5 --- /dev/null +++ b/include/asm-generic/audit_write.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #include <asm-generic/audit_dir_write.h> | ||
| 2 | __NR_acct, | ||
| 3 | __NR_swapon, | ||
| 4 | __NR_quotactl, | ||
| 5 | __NR_truncate, | ||
| 6 | #ifdef __NR_truncate64 | ||
| 7 | __NR_truncate64, | ||
| 8 | #endif | ||
| 9 | #ifdef __NR_bind | ||
| 10 | __NR_bind, /* bind can affect fs object only in one way... */ | ||
| 11 | #endif | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 64f9f9e56ac5..40a6c26294ae 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -132,6 +132,10 @@ | |||
| 132 | #define AUDIT_CLASS_DIR_WRITE_32 1 | 132 | #define AUDIT_CLASS_DIR_WRITE_32 1 |
| 133 | #define AUDIT_CLASS_CHATTR 2 | 133 | #define AUDIT_CLASS_CHATTR 2 |
| 134 | #define AUDIT_CLASS_CHATTR_32 3 | 134 | #define AUDIT_CLASS_CHATTR_32 3 |
| 135 | #define AUDIT_CLASS_READ 4 | ||
| 136 | #define AUDIT_CLASS_READ_32 5 | ||
| 137 | #define AUDIT_CLASS_WRITE 6 | ||
| 138 | #define AUDIT_CLASS_WRITE_32 7 | ||
| 135 | 139 | ||
| 136 | /* This bitmask is used to validate user input. It represents all bits that | 140 | /* This bitmask is used to validate user input. It represents all bits that |
| 137 | * are currently used in an audit field constant understood by the kernel. | 141 | * are currently used in an audit field constant understood by the kernel. |
| @@ -177,6 +181,7 @@ | |||
| 177 | #define AUDIT_EXIT 103 | 181 | #define AUDIT_EXIT 103 |
| 178 | #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ | 182 | #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ |
| 179 | #define AUDIT_WATCH 105 | 183 | #define AUDIT_WATCH 105 |
| 184 | #define AUDIT_PERM 106 | ||
| 180 | 185 | ||
| 181 | #define AUDIT_ARG0 200 | 186 | #define AUDIT_ARG0 200 |
| 182 | #define AUDIT_ARG1 (AUDIT_ARG0+1) | 187 | #define AUDIT_ARG1 (AUDIT_ARG0+1) |
| @@ -252,6 +257,11 @@ | |||
| 252 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | 257 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) |
| 253 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 258 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 254 | 259 | ||
| 260 | #define AUDIT_PERM_EXEC 1 | ||
| 261 | #define AUDIT_PERM_WRITE 2 | ||
| 262 | #define AUDIT_PERM_READ 4 | ||
| 263 | #define AUDIT_PERM_ATTR 8 | ||
| 264 | |||
| 255 | struct audit_status { | 265 | struct audit_status { |
| 256 | __u32 mask; /* Bit mask for valid entries */ | 266 | __u32 mask; /* Bit mask for valid entries */ |
| 257 | __u32 enabled; /* 1 = enabled, 0 = disabled */ | 267 | __u32 enabled; /* 1 = enabled, 0 = disabled */ |
| @@ -314,6 +324,7 @@ struct mqstat; | |||
| 314 | #define AUDITSC_FAILURE 2 | 324 | #define AUDITSC_FAILURE 2 |
| 315 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) | 325 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) |
| 316 | extern int __init audit_register_class(int class, unsigned *list); | 326 | extern int __init audit_register_class(int class, unsigned *list); |
| 327 | extern int audit_classify_syscall(int abi, unsigned syscall); | ||
| 317 | #ifdef CONFIG_AUDITSYSCALL | 328 | #ifdef CONFIG_AUDITSYSCALL |
| 318 | /* These are defined in auditsc.c */ | 329 | /* These are defined in auditsc.c */ |
| 319 | /* Public API */ | 330 | /* Public API */ |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c1f021eddffa..ba095aebedff 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -77,7 +77,7 @@ struct mmc_host { | |||
| 77 | struct device *dev; | 77 | struct device *dev; |
| 78 | struct class_device class_dev; | 78 | struct class_device class_dev; |
| 79 | int index; | 79 | int index; |
| 80 | struct mmc_host_ops *ops; | 80 | const struct mmc_host_ops *ops; |
| 81 | unsigned int f_min; | 81 | unsigned int f_min; |
| 82 | unsigned int f_max; | 82 | unsigned int f_max; |
| 83 | u32 ocr_avail; | 83 | u32 ocr_avail; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 03a14a30c46a..627e2c08ce41 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -105,6 +105,8 @@ extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); | |||
| 105 | extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, | 105 | extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, |
| 106 | struct mmc_command *, int); | 106 | struct mmc_command *, int); |
| 107 | 107 | ||
| 108 | extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int); | ||
| 109 | |||
| 108 | extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); | 110 | extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); |
| 109 | 111 | ||
| 110 | static inline void mmc_claim_host(struct mmc_host *host) | 112 | static inline void mmc_claim_host(struct mmc_host *host) |
diff --git a/kernel/audit.c b/kernel/audit.c index 0a36091ed712..963fd15c9621 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -1028,6 +1028,9 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf, | |||
| 1028 | struct sk_buff *skb; | 1028 | struct sk_buff *skb; |
| 1029 | static const unsigned char *hex = "0123456789ABCDEF"; | 1029 | static const unsigned char *hex = "0123456789ABCDEF"; |
| 1030 | 1030 | ||
| 1031 | if (!ab) | ||
| 1032 | return; | ||
| 1033 | |||
| 1031 | BUG_ON(!ab->skb); | 1034 | BUG_ON(!ab->skb); |
| 1032 | skb = ab->skb; | 1035 | skb = ab->skb; |
| 1033 | avail = skb_tailroom(skb); | 1036 | avail = skb_tailroom(skb); |
| @@ -1060,6 +1063,9 @@ static void audit_log_n_string(struct audit_buffer *ab, size_t slen, | |||
| 1060 | unsigned char *ptr; | 1063 | unsigned char *ptr; |
| 1061 | struct sk_buff *skb; | 1064 | struct sk_buff *skb; |
| 1062 | 1065 | ||
| 1066 | if (!ab) | ||
| 1067 | return; | ||
| 1068 | |||
| 1063 | BUG_ON(!ab->skb); | 1069 | BUG_ON(!ab->skb); |
| 1064 | skb = ab->skb; | 1070 | skb = ab->skb; |
| 1065 | avail = skb_tailroom(skb); | 1071 | avail = skb_tailroom(skb); |
diff --git a/kernel/audit.h b/kernel/audit.h index 6aa33b848cf2..a3370232a390 100644 --- a/kernel/audit.h +++ b/kernel/audit.h | |||
| @@ -104,6 +104,7 @@ static inline int audit_hash_ino(u32 ino) | |||
| 104 | return (ino & (AUDIT_INODE_BUCKETS-1)); | 104 | return (ino & (AUDIT_INODE_BUCKETS-1)); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | extern int audit_match_class(int class, unsigned syscall); | ||
| 107 | extern int audit_comparator(const u32 left, const u32 op, const u32 right); | 108 | extern int audit_comparator(const u32 left, const u32 op, const u32 right); |
| 108 | extern int audit_compare_dname_path(const char *dname, const char *path, | 109 | extern int audit_compare_dname_path(const char *dname, const char *path, |
| 109 | int *dirlen); | 110 | int *dirlen); |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 6a9a5c5a4e7d..a44879b0c72f 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
| @@ -302,6 +302,15 @@ int __init audit_register_class(int class, unsigned *list) | |||
| 302 | return 0; | 302 | return 0; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | int audit_match_class(int class, unsigned syscall) | ||
| 306 | { | ||
| 307 | if (unlikely(syscall >= AUDIT_BITMASK_SIZE * sizeof(__u32))) | ||
| 308 | return 0; | ||
| 309 | if (unlikely(class >= AUDIT_SYSCALL_CLASSES || !classes[class])) | ||
| 310 | return 0; | ||
| 311 | return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); | ||
| 312 | } | ||
| 313 | |||
| 305 | /* Common user-space to kernel rule translation. */ | 314 | /* Common user-space to kernel rule translation. */ |
| 306 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) | 315 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) |
| 307 | { | 316 | { |
| @@ -404,6 +413,7 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) | |||
| 404 | case AUDIT_PERS: | 413 | case AUDIT_PERS: |
| 405 | case AUDIT_ARCH: | 414 | case AUDIT_ARCH: |
| 406 | case AUDIT_MSGTYPE: | 415 | case AUDIT_MSGTYPE: |
| 416 | case AUDIT_PPID: | ||
| 407 | case AUDIT_DEVMAJOR: | 417 | case AUDIT_DEVMAJOR: |
| 408 | case AUDIT_DEVMINOR: | 418 | case AUDIT_DEVMINOR: |
| 409 | case AUDIT_EXIT: | 419 | case AUDIT_EXIT: |
| @@ -413,6 +423,10 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) | |||
| 413 | case AUDIT_ARG2: | 423 | case AUDIT_ARG2: |
| 414 | case AUDIT_ARG3: | 424 | case AUDIT_ARG3: |
| 415 | break; | 425 | break; |
| 426 | case AUDIT_PERM: | ||
| 427 | if (f->val & ~15) | ||
| 428 | goto exit_free; | ||
| 429 | break; | ||
| 416 | case AUDIT_INODE: | 430 | case AUDIT_INODE: |
| 417 | err = audit_to_inode(&entry->rule, f); | 431 | err = audit_to_inode(&entry->rule, f); |
| 418 | if (err) | 432 | if (err) |
| @@ -567,6 +581,10 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, | |||
| 567 | entry->rule.buflen += f->val; | 581 | entry->rule.buflen += f->val; |
| 568 | entry->rule.filterkey = str; | 582 | entry->rule.filterkey = str; |
| 569 | break; | 583 | break; |
| 584 | case AUDIT_PERM: | ||
| 585 | if (f->val & ~15) | ||
| 586 | goto exit_free; | ||
| 587 | break; | ||
| 570 | default: | 588 | default: |
| 571 | goto exit_free; | 589 | goto exit_free; |
| 572 | } | 590 | } |
| @@ -913,7 +931,7 @@ static void audit_update_watch(struct audit_parent *parent, | |||
| 913 | } | 931 | } |
| 914 | 932 | ||
| 915 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | 933 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); |
| 916 | audit_log_format(ab, "audit updated rules specifying watch="); | 934 | audit_log_format(ab, "audit updated rules specifying path="); |
| 917 | audit_log_untrustedstring(ab, owatch->path); | 935 | audit_log_untrustedstring(ab, owatch->path); |
| 918 | audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); | 936 | audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); |
| 919 | audit_log_end(ab); | 937 | audit_log_end(ab); |
| @@ -936,19 +954,28 @@ static void audit_remove_parent_watches(struct audit_parent *parent) | |||
| 936 | struct audit_watch *w, *nextw; | 954 | struct audit_watch *w, *nextw; |
| 937 | struct audit_krule *r, *nextr; | 955 | struct audit_krule *r, *nextr; |
| 938 | struct audit_entry *e; | 956 | struct audit_entry *e; |
| 957 | struct audit_buffer *ab; | ||
| 939 | 958 | ||
| 940 | mutex_lock(&audit_filter_mutex); | 959 | mutex_lock(&audit_filter_mutex); |
| 941 | parent->flags |= AUDIT_PARENT_INVALID; | 960 | parent->flags |= AUDIT_PARENT_INVALID; |
| 942 | list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { | 961 | list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { |
| 943 | list_for_each_entry_safe(r, nextr, &w->rules, rlist) { | 962 | list_for_each_entry_safe(r, nextr, &w->rules, rlist) { |
| 944 | e = container_of(r, struct audit_entry, rule); | 963 | e = container_of(r, struct audit_entry, rule); |
| 964 | |||
| 965 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | ||
| 966 | audit_log_format(ab, "audit implicitly removed rule path="); | ||
| 967 | audit_log_untrustedstring(ab, w->path); | ||
| 968 | if (r->filterkey) { | ||
| 969 | audit_log_format(ab, " key="); | ||
| 970 | audit_log_untrustedstring(ab, r->filterkey); | ||
| 971 | } else | ||
| 972 | audit_log_format(ab, " key=(null)"); | ||
| 973 | audit_log_format(ab, " list=%d", r->listnr); | ||
| 974 | audit_log_end(ab); | ||
| 975 | |||
| 945 | list_del(&r->rlist); | 976 | list_del(&r->rlist); |
| 946 | list_del_rcu(&e->list); | 977 | list_del_rcu(&e->list); |
| 947 | call_rcu(&e->rcu, audit_free_rule_rcu); | 978 | call_rcu(&e->rcu, audit_free_rule_rcu); |
| 948 | |||
| 949 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
| 950 | "audit implicitly removed rule from list=%d\n", | ||
| 951 | AUDIT_FILTER_EXIT); | ||
| 952 | } | 979 | } |
| 953 | audit_remove_watch(w); | 980 | audit_remove_watch(w); |
| 954 | } | 981 | } |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index efc1b74bebf3..1bd8827a0102 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
| @@ -209,6 +209,54 @@ struct audit_context { | |||
| 209 | #endif | 209 | #endif |
| 210 | }; | 210 | }; |
| 211 | 211 | ||
| 212 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | ||
| 213 | static inline int open_arg(int flags, int mask) | ||
| 214 | { | ||
| 215 | int n = ACC_MODE(flags); | ||
| 216 | if (flags & (O_TRUNC | O_CREAT)) | ||
| 217 | n |= AUDIT_PERM_WRITE; | ||
| 218 | return n & mask; | ||
| 219 | } | ||
| 220 | |||
| 221 | static int audit_match_perm(struct audit_context *ctx, int mask) | ||
| 222 | { | ||
| 223 | unsigned n = ctx->major; | ||
| 224 | switch (audit_classify_syscall(ctx->arch, n)) { | ||
| 225 | case 0: /* native */ | ||
| 226 | if ((mask & AUDIT_PERM_WRITE) && | ||
| 227 | audit_match_class(AUDIT_CLASS_WRITE, n)) | ||
| 228 | return 1; | ||
| 229 | if ((mask & AUDIT_PERM_READ) && | ||
| 230 | audit_match_class(AUDIT_CLASS_READ, n)) | ||
| 231 | return 1; | ||
| 232 | if ((mask & AUDIT_PERM_ATTR) && | ||
| 233 | audit_match_class(AUDIT_CLASS_CHATTR, n)) | ||
| 234 | return 1; | ||
| 235 | return 0; | ||
| 236 | case 1: /* 32bit on biarch */ | ||
| 237 | if ((mask & AUDIT_PERM_WRITE) && | ||
| 238 | audit_match_class(AUDIT_CLASS_WRITE_32, n)) | ||
| 239 | return 1; | ||
| 240 | if ((mask & AUDIT_PERM_READ) && | ||
| 241 | audit_match_class(AUDIT_CLASS_READ_32, n)) | ||
| 242 | return 1; | ||
| 243 | if ((mask & AUDIT_PERM_ATTR) && | ||
| 244 | audit_match_class(AUDIT_CLASS_CHATTR_32, n)) | ||
| 245 | return 1; | ||
| 246 | return 0; | ||
| 247 | case 2: /* open */ | ||
| 248 | return mask & ACC_MODE(ctx->argv[1]); | ||
| 249 | case 3: /* openat */ | ||
| 250 | return mask & ACC_MODE(ctx->argv[2]); | ||
| 251 | case 4: /* socketcall */ | ||
| 252 | return ((mask & AUDIT_PERM_WRITE) && ctx->argv[0] == SYS_BIND); | ||
| 253 | case 5: /* execve */ | ||
| 254 | return mask & AUDIT_PERM_EXEC; | ||
| 255 | default: | ||
| 256 | return 0; | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 212 | /* Determine if any context name data matches a rule's watch data */ | 260 | /* Determine if any context name data matches a rule's watch data */ |
| 213 | /* Compare a task_struct with an audit_rule. Return 1 on match, 0 | 261 | /* Compare a task_struct with an audit_rule. Return 1 on match, 0 |
| 214 | * otherwise. */ | 262 | * otherwise. */ |
| @@ -397,6 +445,9 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
| 397 | /* ignore this field for filtering */ | 445 | /* ignore this field for filtering */ |
| 398 | result = 1; | 446 | result = 1; |
| 399 | break; | 447 | break; |
| 448 | case AUDIT_PERM: | ||
| 449 | result = audit_match_perm(ctx, f->val); | ||
| 450 | break; | ||
| 400 | } | 451 | } |
| 401 | 452 | ||
| 402 | if (!result) | 453 | if (!result) |
