From 8e81725b17b07ed5052bbd826ff0479a4c22a0ea Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 21 May 2007 09:38:51 +0100 Subject: [ARM] 4401/1: S3C2443: Add definitions for port GPIOJ Add definitions for S3C2443 functions in GPIOJ Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/regs-gpioj.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 02131a5..0362332 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h @@ -98,5 +98,9 @@ #define S3C2440_GPJ12_OUTP (0x01 << 24) #define S3C2440_GPJ12_CAMRESET (0x02 << 24) +#define S3C2443_GPJ13 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 13) +#define S3C2443_GPJ14 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 14) +#define S3C2443_GPJ15 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 15) + #endif /* __ASM_ARCH_REGS_GPIOJ_H */ -- cgit v1.1 From ece97941c378b4a424530585a7c855e466f1bd2c Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 21 May 2007 09:40:06 +0100 Subject: [ARM] 4402/1: S3C2443: Add physical address of HSMMC controller Add physical address of HSMMC to include/asm-arm/arch-s3c2410/map.h Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/map.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 4505aef..19e77f0 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h @@ -153,6 +153,10 @@ #define S3C2440_PA_AC97 (0x5B000000) #define S3C2440_SZ_AC97 SZ_1M +/* S3C2443 High-speed SD/MMC */ +#define S3C2443_PA_HSMMC (0x4A800000) +#define S3C2443_SZ_HSMMC (256) + /* ISA style IO, for each machine to sort out mappings for, if it * implements it. We reserve two 16M regions for ISA. */ -- cgit v1.1 From 6776f3d26aec60cb6e0fc770a00993accd09376f Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Mon, 21 May 2007 12:29:40 +0100 Subject: [ARM] 4403/1: Make the PXA-I2C driver work with lockdep validator Using lockdep validator causes warnings like INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. [] (dump_stack+0x0/0x14) from [] (__lock_acquire+0x150/0xc40) [] (__lock_acquire+0x0/0xc40) from [] (lock_acquire+0x5c/0x70) [] (lock_acquire+0x0/0x70) from [] (_spin_lock_irq+0x48/0x58) r7:c07e5144 r6:00000000 r5:c015fb94 r4:c07e50b8 [] (_spin_lock_irq+0x0/0x58) from [] (i2c_pxa_xfer+0x110/0x2e0) r5:c07e50b8 r4:0000001f This is caused by memcpy'ing a statical initialized spin-lock. This patch removes a static pxa_i2c structure which was used only as a source for this memcpy() operation. Instead of, members and the spinlock will be initialized manually. Signed-off-by: Enrico Scholz Signed-off-by: Russell King --- drivers/i2c/busses/i2c-pxa.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 8a0a99b..28e7b91 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -837,20 +837,10 @@ static const struct i2c_algorithm i2c_pxa_algorithm = { .functionality = i2c_pxa_functionality, }; -static struct pxa_i2c i2c_pxa = { - .lock = __SPIN_LOCK_UNLOCKED(i2c_pxa.lock), - .adap = { - .owner = THIS_MODULE, - .algo = &i2c_pxa_algorithm, - .name = "pxa2xx-i2c.0", - .retries = 5, - }, -}; - #define res_len(r) ((r)->end - (r)->start + 1) static int i2c_pxa_probe(struct platform_device *dev) { - struct pxa_i2c *i2c = &i2c_pxa; + struct pxa_i2c *i2c; struct resource *res; struct i2c_pxa_platform_data *plat = dev->dev.platform_data; int ret; @@ -864,15 +854,20 @@ static int i2c_pxa_probe(struct platform_device *dev) if (!request_mem_region(res->start, res_len(res), res->name)) return -ENOMEM; - i2c = kmalloc(sizeof(struct pxa_i2c), GFP_KERNEL); + i2c = kzalloc(sizeof(struct pxa_i2c), GFP_KERNEL); if (!i2c) { ret = -ENOMEM; goto emalloc; } - memcpy(i2c, &i2c_pxa, sizeof(struct pxa_i2c)); + i2c->adap.owner = THIS_MODULE; + i2c->adap.algo = &i2c_pxa_algorithm; + i2c->adap.retries = 5; + + spin_lock_init(&i2c->lock); init_waitqueue_head(&i2c->wait); - i2c->adap.name[strlen(i2c->adap.name) - 1] = '0' + dev->id % 10; + + sprintf(i2c->adap.name, "pxa_i2c-i2c.%u", dev->id); i2c->reg_base = ioremap(res->start, res_len(res)); if (!i2c->reg_base) { -- cgit v1.1 From e87a8e85e90660183d3ef8e700627689c6292a3f Mon Sep 17 00:00:00 2001 From: Michael-Luke Jones Date: Wed, 23 May 2007 22:36:44 +0100 Subject: [ARM] 4404/1: Trivial IXP42x Kconfig cleanup Avila and IXDP4xx support were separated in 2.6.21 so this comment isn't correct any more. Signed-off-by: Michael-Luke Jones Signed-off-by: Russell King --- arch/arm/mach-ixp4xx/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index 9715ef5..0609098 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig @@ -104,9 +104,6 @@ config MACH_DSMG600 DSM-G600 RevA device. For more information on this platform, see http://www.nslu2-linux.org/wiki/DSMG600/HomePage -# -# Avila and IXDP share the same source for now. Will change in future -# config ARCH_IXDP4XX bool depends on ARCH_IXDP425 || MACH_IXDP465 || MACH_KIXRP435 -- cgit v1.1 From 435c5da00b9610f9664c5d6f38dfdafce419ef4a Mon Sep 17 00:00:00 2001 From: Michael-Luke Jones Date: Wed, 23 May 2007 22:38:45 +0100 Subject: [ARM] 4405/1: NSLU2, DSM-G600 frequency fixup code This patch is required as the frequency fixup in nslu2_init does not run sufficiently early in the boot sequence to take effect. In addition the dsmg600 setup code behaviour has been improved such that a 'fixup' routine is avoided. Signed-off-by: Michael-Luke Jones Signed-off-by: Russell King --- arch/arm/mach-ixp4xx/common.c | 2 +- arch/arm/mach-ixp4xx/dsmg600-setup.c | 24 +++++++++++++++--------- arch/arm/mach-ixp4xx/nslu2-setup.c | 18 +++++++++++++++--- include/asm-arm/arch-ixp4xx/platform.h | 1 + 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 64685da..8112f72 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -283,7 +283,7 @@ static struct irqaction ixp4xx_timer_irq = { .handler = ixp4xx_timer_interrupt, }; -static void __init ixp4xx_timer_init(void) +void __init ixp4xx_timer_init(void) { /* Reset/disable counter */ *IXP4XX_OSRT1 = 0; diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 1caff65..1e75e10 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c @@ -18,6 +18,7 @@ #include #include #include +#include static struct flash_platform_data dsmg600_flash_data = { .map_name = "cfi_probe", @@ -128,6 +129,19 @@ static void dsmg600_power_off(void) gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH); } +static void __init dsmg600_timer_init(void) +{ + /* The xtal on this machine is non-standard. */ + ixp4xx_timer_freq = DSMG600_FREQ; + + /* Call standard timer_init function. */ + ixp4xx_timer_init(); +} + +static struct sys_timer dsmg600_timer = { + .init = dsmg600_timer_init, +}; + static void __init dsmg600_init(void) { ixp4xx_sys_init(); @@ -155,21 +169,13 @@ static void __init dsmg600_init(void) #endif } -static void __init dsmg600_fixup(struct machine_desc *desc, - struct tag *tags, char **cmdline, struct meminfo *mi) -{ - /* The xtal on this machine is non-standard. */ - ixp4xx_timer_freq = DSMG600_FREQ; -} - MACHINE_START(DSMG600, "D-Link DSM-G600 RevA") /* Maintainer: www.nslu2-linux.org */ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, .boot_params = 0x00000100, - .fixup = dsmg600_fixup, .map_io = ixp4xx_map_io, .init_irq = ixp4xx_init_irq, - .timer = &ixp4xx_timer, + .timer = &dsmg600_timer, .init_machine = dsmg600_init, MACHINE_END diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 162c266..1aa45a2 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c @@ -22,6 +22,7 @@ #include #include #include +#include static struct flash_platform_data nslu2_flash_data = { .map_name = "cfi_probe", @@ -157,10 +158,21 @@ static void nslu2_power_off(void) gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH); } -static void __init nslu2_init(void) +static void __init nslu2_timer_init(void) { - ixp4xx_timer_freq = NSLU2_FREQ; + /* The xtal on this machine is non-standard. */ + ixp4xx_timer_freq = NSLU2_FREQ; + + /* Call standard timer_init function. */ + ixp4xx_timer_init(); +} +static struct sys_timer nslu2_timer = { + .init = nslu2_timer_init, +}; + +static void __init nslu2_init(void) +{ ixp4xx_sys_init(); nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); @@ -185,6 +197,6 @@ MACHINE_START(NSLU2, "Linksys NSLU2") .boot_params = 0x00000100, .map_io = ixp4xx_map_io, .init_irq = ixp4xx_init_irq, - .timer = &ixp4xx_timer, + .timer = &nslu2_timer, .init_machine = nslu2_init, MACHINE_END diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index ab194e5..2a44d3d 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h @@ -113,6 +113,7 @@ extern unsigned long ixp4xx_timer_freq; extern void ixp4xx_map_io(void); extern void ixp4xx_init_irq(void); extern void ixp4xx_sys_init(void); +extern void ixp4xx_timer_init(void); extern struct sys_timer ixp4xx_timer; extern void ixp4xx_pci_preinit(void); struct pci_sys_data; -- cgit v1.1 From cc50a0df51e4f2a7982ade338b3d74825ca67e08 Mon Sep 17 00:00:00 2001 From: Michael-Luke Jones Date: Wed, 23 May 2007 22:41:53 +0100 Subject: [ARM] 4406/1: Trivial NSLU2 / NAS-100D header & setup code cleanup This trivial patch updates the nslu2 and nas-100d headers to remove pointless GPIO defines, and updates nslu2-setup.c accordingly. In addition minor style cleanups to some comments are included. Signed-off-by: Michael-Luke Jones Signed-off-by: Russell King --- arch/arm/mach-ixp4xx/nas100d-setup.c | 3 ++- arch/arm/mach-ixp4xx/nslu2-setup.c | 19 ++++++++------- include/asm-arm/arch-ixp4xx/nas100d.h | 28 +++------------------ include/asm-arm/arch-ixp4xx/nslu2.h | 46 +++++++++-------------------------- 4 files changed, 28 insertions(+), 68 deletions(-) diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 9a31444..78a1741 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c @@ -155,7 +155,8 @@ static void __init nas100d_init(void) pm_power_off = nas100d_power_off; - /* This is only useful on a modified machine, but it is valuable + /* + * This is only useful on a modified machine, but it is valuable * to have it first in order to see debug messages, and so that * it does *not* get removed if platform_add_devices fails! */ diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 1aa45a2..9bf8ccb 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c @@ -50,26 +50,26 @@ static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = { static struct resource nslu2_led_resources[] = { { .name = "ready", /* green led */ - .start = NSLU2_LED_GRN, - .end = NSLU2_LED_GRN, + .start = NSLU2_LED_GRN_GPIO, + .end = NSLU2_LED_GRN_GPIO, .flags = IXP4XX_GPIO_HIGH, }, { .name = "status", /* red led */ - .start = NSLU2_LED_RED, - .end = NSLU2_LED_RED, + .start = NSLU2_LED_RED_GPIO, + .end = NSLU2_LED_RED_GPIO, .flags = IXP4XX_GPIO_HIGH, }, { .name = "disk-1", - .start = NSLU2_LED_DISK1, - .end = NSLU2_LED_DISK1, + .start = NSLU2_LED_DISK1_GPIO, + .end = NSLU2_LED_DISK1_GPIO, .flags = IXP4XX_GPIO_LOW, }, { .name = "disk-2", - .start = NSLU2_LED_DISK2, - .end = NSLU2_LED_DISK2, + .start = NSLU2_LED_DISK2_GPIO, + .end = NSLU2_LED_DISK2_GPIO, .flags = IXP4XX_GPIO_LOW, }, }; @@ -181,7 +181,8 @@ static void __init nslu2_init(void) pm_power_off = nslu2_power_off; - /* This is only useful on a modified machine, but it is valuable + /* + * This is only useful on a modified machine, but it is valuable * to have it first in order to see debug messages, and so that * it does *not* get removed if platform_add_devices fails! */ diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h index 84467a5..131e0a1 100644 --- a/include/asm-arm/arch-ixp4xx/nas100d.h +++ b/include/asm-arm/arch-ixp4xx/nas100d.h @@ -10,7 +10,7 @@ * based on ixdp425.h: * Copyright 2004 (c) MontaVista, Software, Inc. * - * This file is licensed under the terms of the GNU General Public + * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ @@ -36,31 +36,11 @@ #define NAS100D_PCI_INTD_PIN 8 #define NAS100D_PCI_INTE_PIN 7 -/* GPIO */ - -#define NAS100D_GPIO0 0 -#define NAS100D_GPIO1 1 -#define NAS100D_GPIO2 2 -#define NAS100D_GPIO3 3 -#define NAS100D_GPIO4 4 -#define NAS100D_GPIO5 5 -#define NAS100D_GPIO6 6 -#define NAS100D_GPIO7 7 -#define NAS100D_GPIO8 8 -#define NAS100D_GPIO9 9 -#define NAS100D_GPIO10 10 -#define NAS100D_GPIO11 11 -#define NAS100D_GPIO12 12 -#define NAS100D_GPIO13 13 -#define NAS100D_GPIO14 14 -#define NAS100D_GPIO15 15 - - /* Buttons */ -#define NAS100D_PB_GPIO NAS100D_GPIO14 -#define NAS100D_RB_GPIO NAS100D_GPIO4 -#define NAS100D_PO_GPIO NAS100D_GPIO12 /* power off */ +#define NAS100D_PB_GPIO 14 +#define NAS100D_RB_GPIO 4 +#define NAS100D_PO_GPIO 12 /* power off */ #define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14 #define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4 diff --git a/include/asm-arm/arch-ixp4xx/nslu2.h b/include/asm-arm/arch-ixp4xx/nslu2.h index 6b437f7..850fdc5 100644 --- a/include/asm-arm/arch-ixp4xx/nslu2.h +++ b/include/asm-arm/arch-ixp4xx/nslu2.h @@ -9,7 +9,7 @@ * based on ixdp425.h: * Copyright 2004 (c) MontaVista, Software, Inc. * - * This file is licensed under the terms of the GNU General Public + * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ @@ -34,36 +34,14 @@ #define NSLU2_PCI_INTC_PIN 9 #define NSLU2_PCI_INTD_PIN 8 - /* NSLU2 Timer */ #define NSLU2_FREQ 66000000 -#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) -#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) - -/* GPIO */ - -#define NSLU2_GPIO0 0 -#define NSLU2_GPIO1 1 -#define NSLU2_GPIO2 2 -#define NSLU2_GPIO3 3 -#define NSLU2_GPIO4 4 -#define NSLU2_GPIO5 5 -#define NSLU2_GPIO6 6 -#define NSLU2_GPIO7 7 -#define NSLU2_GPIO8 8 -#define NSLU2_GPIO9 9 -#define NSLU2_GPIO10 10 -#define NSLU2_GPIO11 11 -#define NSLU2_GPIO12 12 -#define NSLU2_GPIO13 13 -#define NSLU2_GPIO14 14 -#define NSLU2_GPIO15 15 /* Buttons */ -#define NSLU2_PB_GPIO NSLU2_GPIO5 -#define NSLU2_PO_GPIO NSLU2_GPIO8 /* power off */ -#define NSLU2_RB_GPIO NSLU2_GPIO12 +#define NSLU2_PB_GPIO 5 +#define NSLU2_PO_GPIO 8 /* power off */ +#define NSLU2_RB_GPIO 12 #define NSLU2_PB_IRQ IRQ_IXP4XX_GPIO5 #define NSLU2_RB_IRQ IRQ_IXP4XX_GPIO12 @@ -79,16 +57,16 @@ /* LEDs */ -#define NSLU2_LED_RED NSLU2_GPIO0 -#define NSLU2_LED_GRN NSLU2_GPIO1 +#define NSLU2_LED_RED_GPIO 0 +#define NSLU2_LED_GRN_GPIO 1 -#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED) -#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN) +#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED_GPIO) +#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN_GPIO) -#define NSLU2_LED_DISK1 NSLU2_GPIO3 -#define NSLU2_LED_DISK2 NSLU2_GPIO2 +#define NSLU2_LED_DISK1_GPIO 3 +#define NSLU2_LED_DISK2_GPIO 2 -#define NSLU2_LED_DISK1_BM (1L << NSLU2_GPIO2) -#define NSLU2_LED_DISK2_BM (1L << NSLU2_GPIO3) +#define NSLU2_LED_DISK1_BM (1L << NSLU2_LED_DISK1_GPIO) +#define NSLU2_LED_DISK2_BM (1L << NSLU2_LED_DISK2_GPIO) -- cgit v1.1 From 43e7f6adf33da1f7816ff738d3725bbde8fd98de Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Wed, 23 May 2007 14:14:14 -0700 Subject: [ARM] remove unused header file: arch/arm/mach-s3c2410/bast.h Signed-off-by: Robert P. J. Day Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Russell King --- arch/arm/mach-s3c2410/bast.h | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 arch/arm/mach-s3c2410/bast.h diff --git a/arch/arm/mach-s3c2410/bast.h b/arch/arm/mach-s3c2410/bast.h deleted file mode 100644 index e985437..0000000 --- a/arch/arm/mach-s3c2410/bast.h +++ /dev/null @@ -1,2 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/bast.h -extern void bast_init_irq(void); -- cgit v1.1 From 3abc12012f957d1c5b9f35b244256f88ad146564 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 23 May 2007 14:14:15 -0700 Subject: [ARM] enable arbitary speed tty ioctls and split input/output speed Add the ioctls and values needed for this to the ARM26/ARM32 ports. The actual code has been in the base kernel for a while and automatically turns on when a port sets the required defines. [RMK: also added termbits.h changes to avoid build breakage] Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Russell King --- include/asm-arm/ioctls.h | 4 ++++ include/asm-arm/termbits.h | 16 +++++++++++++++- include/asm-arm/termios.h | 6 ++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/include/asm-arm/ioctls.h b/include/asm-arm/ioctls.h index bb9a7aa..a91d8a1 100644 --- a/include/asm-arm/ioctls.h +++ b/include/asm-arm/ioctls.h @@ -46,6 +46,10 @@ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ +#define TCGETS2 _IOR('T',0x2A, struct termios2) +#define TCSETS2 _IOW('T',0x2B, struct termios2) +#define TCSETSW2 _IOW('T',0x2C, struct termios2) +#define TCSETSF2 _IOW('T',0x2D, struct termios2) #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ diff --git a/include/asm-arm/termbits.h b/include/asm-arm/termbits.h index a3f4fe1..f784d11 100644 --- a/include/asm-arm/termbits.h +++ b/include/asm-arm/termbits.h @@ -15,6 +15,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ @@ -128,6 +139,7 @@ struct ktermios { #define HUPCL 0002000 #define CLOCAL 0004000 #define CBAUDEX 0010000 +#define BOTHER 0010000 #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 @@ -143,10 +155,12 @@ struct ktermios { #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 -#define CIBAUD 002003600000 /* input baud rate (not used) */ +#define CIBAUD 002003600000 /* input baud rate */ #define CMSPAR 010000000000 /* mark or space (stick) parity */ #define CRTSCTS 020000000000 /* flow control */ +#define IBSHIFT 16 + /* c_lflag bits */ #define ISIG 0000001 #define ICANON 0000002 diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h index 329c324..293e3f1 100644 --- a/include/asm-arm/termios.h +++ b/include/asm-arm/termios.h @@ -82,8 +82,10 @@ struct termio { copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ }) -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) +#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) +#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) +#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) +#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) #endif /* __KERNEL__ */ -- cgit v1.1 From b91d8a1205faa76affc4e1b7d5ccac1d17026970 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Fri, 11 May 2007 16:18:55 -0700 Subject: [ARM] use __used attribute Use the newly introduced __used attribute in place of the deprecated __attribute_used__. Functionally the same. Signed-off-by: David Rientjes Signed-off-by: Russell King --- arch/arm/kernel/armksyms.c | 2 +- include/asm-arm/mach/arch.h | 2 +- include/asm-arm/setup.h | 4 ++-- include/asm-arm26/setup.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 9179e82..f73d62e 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c @@ -57,7 +57,7 @@ extern void fp_enter(void); #define EXPORT_SYMBOL_ALIAS(sym,orig) \ EXPORT_CRC_ALIAS(sym) \ static const struct kernel_symbol __ksymtab_##sym \ - __attribute_used__ __attribute__((section("__ksymtab"))) = \ + __used __attribute__((section("__ksymtab"))) = \ { (unsigned long)&orig, #sym }; /* diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index fd2f9bf..c59fad1 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h @@ -49,7 +49,7 @@ struct machine_desc { */ #define MACHINE_START(_type,_name) \ static const struct machine_desc __mach_desc_##_type \ - __attribute_used__ \ + __used \ __attribute__((__section__(".arch.info.init"))) = { \ .nr = MACH_TYPE_##_type, \ .name = _name, diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h index e540739..7bbf105 100644 --- a/include/asm-arm/setup.h +++ b/include/asm-arm/setup.h @@ -185,7 +185,7 @@ struct tagtable { #ifdef __KERNEL__ -#define __tag __attribute_used__ __attribute__((__section__(".taglist.init"))) +#define __tag __used __attribute__((__section__(".taglist.init"))) #define __tagtable(tag, fn) \ static struct tagtable __tagtable_##fn __tag = { tag, fn } @@ -218,7 +218,7 @@ struct early_params { }; #define __early_param(name,fn) \ -static struct early_params __early_##fn __attribute_used__ \ +static struct early_params __early_##fn __used \ __attribute__((__section__(".early_param.init"))) = { name, fn } #endif /* __KERNEL__ */ diff --git a/include/asm-arm26/setup.h b/include/asm-arm26/setup.h index 10fd07c..e825623 100644 --- a/include/asm-arm26/setup.h +++ b/include/asm-arm26/setup.h @@ -173,7 +173,7 @@ struct tagtable { int (*parse)(const struct tag *); }; -#define __tag __attribute_used__ __attribute__((__section__(".taglist"))) +#define __tag __used __attribute__((__section__(".taglist"))) #define __tagtable(tag, fn) \ static struct tagtable __tagtable_##fn __tag = { tag, fn } -- cgit v1.1 From 5b10c8e436b69f25b6dcb5586bbdc5e39c20ed1d Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 26 May 2007 12:04:17 +0100 Subject: [ARM] Fix stacktrace FP range checking Fix an oops in the stacktrace code, caused by improper range checking. We subtract 12 off 'fp' before testing to see if it's below the low bound. However, if 'fp' were zero before, it becomes a very large positive number, causing this test to succeed where it should fail. Signed-off-by: Russell King --- arch/arm/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 8b63ad8..ae31deb 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c @@ -13,7 +13,7 @@ int walk_stackframe(unsigned long fp, unsigned long low, unsigned long high, /* * Check current frame pointer is within bounds */ - if ((fp - 12) < low || fp + 4 >= high) + if (fp < (low + 12) || fp + 4 >= high) break; frame = (struct stackframe *)(fp - 12); -- cgit v1.1 From 28c670cb9b0df7c8579f78c9d06e148896378cf4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 26 May 2007 12:08:29 +0100 Subject: [ARM] oprofile: avoid lockdep warnings on mpcore oprofile init Fix lockdep warnings, caused by 'set_affinity' being called without the correct locks taken and local interrupts disabled: ================================= [ INFO: inconsistent lock state ] 2.6.22-rc2 #1 --------------------------------- inconsistent {in-hardirq-W} -> {hardirq-on-W} usage. swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes: (irq_controller_lock){++..}, at: [] gic_set_cpu+0x60/0xa0 {in-hardirq-W} state was registered at: [] lock_acquire+0x58/0x6c [] _spin_lock+0x40/0x50 [] gic_mask_irq+0x2c/0x6c [] handle_level_irq+0x11c/0x14c [] asm_do_IRQ+0x60/0x84 [] __irq_svc+0x4c/0xc0 [] __alloc_bootmem_nopanic+0x74/0x88 [] __alloc_bootmem+0x18/0x3c [] alloc_large_system_hash+0x16c/0x200 [] inode_init_early+0x5c/0xa4 [] vfs_caches_init_early+0x24/0xa0 [] start_kernel+0x220/0x2fc [<00008078>] 0x8078 irq event stamp: 88438 hardirqs last enabled at (88438): [] preempt_return+0x20/0x2c hardirqs last disabled at (88436): [] __do_softirq+0xb0/0x138 softirqs last enabled at (88437): [] __do_softirq+0x104/0x138 softirqs last disabled at (88428): [] irq_exit+0x68/0x7c other info that might help us debug this: no locks held by swapper/1. stack backtrace: [] (dump_stack+0x0/0x14) from [] (print_usage_bug+0x138/0x168) [] (print_usage_bug+0x0/0x168) from [] (mark_lock+0x484/0x6a0) [] (mark_lock+0x0/0x6a0) from [] (__lock_acquire+0x3c0/0x10c8) [] (__lock_acquire+0x0/0x10c8) from [] (lock_acquire+0x58/0x6c) [] (lock_acquire+0x0/0x6c) from [] (_spin_lock+0x40/0x50) [] (_spin_lock+0x0/0x50) from [] (gic_set_cpu+0x60/0xa0) [] (gic_set_cpu+0x0/0xa0) from [] (em_route_irq+0x38/0x40) [] (em_route_irq+0x0/0x40) from [] (em_setup+0x18/0xa4) [] (em_setup+0x0/0xa4) from [] (oprofile_arch_init+0x24/0xe8) [] (oprofile_arch_init+0x0/0xe8) from [] (oprofile_init+0x1c/0x64) [] (oprofile_init+0x0/0x64) from [] (kernel_init+0x154/0x368) [] (kernel_init+0x0/0x368) from [] (do_exit+0x0/0x904) oprofile: using arm/mpcore Signed-off-by: Russell King --- arch/arm/oprofile/op_model_mpcore.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c index 8985007..7791da7 100644 --- a/arch/arm/oprofile/op_model_mpcore.c +++ b/arch/arm/oprofile/op_model_mpcore.c @@ -257,8 +257,13 @@ static void em_stop(void) */ static void em_route_irq(int irq, unsigned int cpu) { - irq_desc[irq].affinity = cpumask_of_cpu(cpu); - irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu)); + struct irq_desc *desc = irq_desc + irq; + cpumask_t mask = cpumask_of_cpu(cpu); + + spin_lock_irq(&desc->lock); + desc->affinity = mask; + desc->chip->set_affinity(irq, mask); + spin_unlock_irq(&desc->lock); } static int em_setup(void) -- cgit v1.1 From 486cab2ba25b469f7a8822e84fd43960a472e3d9 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Mon, 28 May 2007 10:47:19 +0100 Subject: [ARM] 4411/1: KS8695: Another serial driver fix Fix a error reported by newer versions of GCC. error: static declaration of 'ks8695_reg' follows non-static declaration Signed-off-by: Andrew Victor Signed-off-by: Russell King --- drivers/serial/serial_ks8695.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c index 698763b..8721afe 100644 --- a/drivers/serial/serial_ks8695.c +++ b/drivers/serial/serial_ks8695.c @@ -589,7 +589,7 @@ static int __init ks8695_console_setup(struct console *co, char *options) return uart_set_options(port, co, baud, parity, bits, flow); } -extern struct uart_driver ks8695_reg; +static struct uart_driver ks8695_reg; static struct console ks8695_console = { .name = SERIAL_KS8695_DEVNAME, -- cgit v1.1 From eca8c2424171b6b6b2dcb0faa92dfddd1e3297d9 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 28 May 2007 18:19:16 +0100 Subject: [ARM] 4412/1: S3C2412: reset errata fix The S3C2412 has an reset-errata where the clock may cause a glitch switching back to EXTCLK. We force a switch to EXTCLK before writing the reset register to force use of the CLKCON sync logic to properly switch. Fix problem reported by Matthieu Castet. Signed-off-by: Ben Dooks Signed-off-by: Russell King --- arch/arm/mach-s3c2412/s3c2412.c | 24 ++++++++++++++++++++++++ include/asm-arm/arch-s3c2410/regs-s3c2412.h | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 include/asm-arm/arch-s3c2410/regs-s3c2412.h diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index c602aa3..782b581 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include +#include #include #include @@ -38,6 +40,7 @@ #include #include #include +#include #include #include @@ -106,6 +109,23 @@ static void s3c2412_idle(void) cpu_do_idle(); } +static void s3c2412_hard_reset(void) +{ + /* errata "Watch-dog/Software Reset Problem" specifies that + * this reset must be done with the SYSCLK sourced from + * EXTCLK instead of FOUT to avoid a glitch in the reset + * mechanism. + * + * See the watchdog section of the S3C2412 manual for more + * information on this fix. + */ + + __raw_writel(0x00, S3C2412_CLKSRC); + __raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST); + + mdelay(1); +} + /* s3c2412_map_io * * register the standard cpu IO areas, and any passed in from the @@ -122,6 +142,10 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) s3c24xx_idle = s3c2412_idle; + /* set custom reset hook */ + + s3c24xx_reset_hook = s3c2412_hard_reset; + /* register our io-tables */ iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2412.h b/include/asm-arm/arch-s3c2410/regs-s3c2412.h new file mode 100644 index 0000000..8ca6a3b --- /dev/null +++ b/include/asm-arm/arch-s3c2410/regs-s3c2412.h @@ -0,0 +1,21 @@ +/* linux/include/asm-arm/arch-s3c2410/regs-s3c2412.h + * + * Copyright 2007 Simtec Electronics + * http://armlinux.simtec.co.uk/ + * Ben Dooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2412 specific register definitions +*/ + +#ifndef __ASM_ARCH_REGS_S3C2412_H +#define __ASM_ARCH_REGS_S3C2412_H "s3c2412" + +#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30) +#define S3C2412_SWRST_RESET (0x533C2412) + +#endif /* __ASM_ARCH_REGS_S3C2412_H */ + -- cgit v1.1 From 0cc69daa3e6c958bc678b3db268dc279b68fd76f Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 28 May 2007 18:55:43 +0100 Subject: [ARM] 4414/1: S3C2443: sparse fix for clock.c Fix sparse warnings in the arch/arm/mach-s3c2443/clock.c, including an bug in initialising the cf clock initialiser where two values are being set for the ctrlbit. arch/arm/mach-s3c2443/clock.c:397:12: warning: symbol 'clk_usb_bus_host' was not declared. Should it be static? arch/arm/mach-s3c2443/clock.c:760:4: error: Initializer entry defined twice arch/arm/mach-s3c2443/clock.c:761:4: also defined here Signed-off-by: Ben Dooks Signed-off-by: Russell King --- arch/arm/mach-s3c2443/clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index 5955efb..5840294 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c @@ -394,7 +394,7 @@ static int s3c2443_setrate_usbhost(struct clk *clk, unsigned long rate) return 0; } -struct clk clk_usb_bus_host = { +static struct clk clk_usb_bus_host = { .name = "usb-bus-host-parent", .id = -1, .parent = &clk_esysclk, @@ -758,7 +758,6 @@ static struct clk init_clocks[] = { .parent = &clk_h, .enable = s3c2443_clkcon_enable_h, .ctrlbit = S3C2443_HCLKCON_CFC, - .ctrlbit = S3C2443_HCLKCON_HSMMC, }, { .name = "ssmc", .id = -1, -- cgit v1.1 From e078761a0a815e142eee9f546f821ea259c82f7c Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 28 May 2007 18:57:31 +0100 Subject: [ARM] 4415/1: AML5900: fix sparse warnings from map_io The map_io function does not need to be exported from this file, and therefore should be declared static. Signed-off-by: Ben Dooks Signed-off-by: Russell King --- arch/arm/mach-s3c2410/mach-amlm5900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index bc308ce..435adcc 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c @@ -160,7 +160,7 @@ static struct platform_device *amlm5900_devices[] __initdata = { #endif }; -void __init amlm5900_map_io(void) +static void __init amlm5900_map_io(void) { s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); s3c24xx_init_clocks(0); -- cgit v1.1 From 1ff082882f0f36536ab91b020573607668f9bb61 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 28 May 2007 19:03:47 +0100 Subject: [ARM] 4416/1: NWFPE: fix undeclared symbols Fix the undeclared symbols sparse is warning about. arch/arm/nwfpe/softfloat.c:1727:7: warning: symbol 'float64_to_uint32' was not declared. Should it be static? arch/arm/nwfpe/softfloat.c:1753:7: warning: symbol 'float64_to_uint32_round_to_zero' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Russell King --- arch/arm/nwfpe/softfloat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/nwfpe/softfloat.h b/arch/arm/nwfpe/softfloat.h index 0a30674..260fe29 100644 --- a/arch/arm/nwfpe/softfloat.h +++ b/arch/arm/nwfpe/softfloat.h @@ -273,4 +273,7 @@ static inline flag float64_lt_nocheck(float64 a, float64 b) extern flag float32_is_nan( float32 a ); extern flag float64_is_nan( float64 a ); +extern int32 float64_to_uint32( struct roundingData *roundData, float64 a ); +extern int32 float64_to_uint32_round_to_zero( float64 a ); + #endif -- cgit v1.1 From 919a84292070949691346adaf3dfba642f12329e Mon Sep 17 00:00:00 2001 From: Michael-Luke Jones Date: Sun, 27 May 2007 21:33:28 +0100 Subject: [ARM] 4410/1: Remove extern declarations in coyote/ixdpg425-pci.c This patch removes apparently unnecessary extern declarations in coyote-pci.c and ixdpg425-pci.c within arch/arm/mach-ixp4xx and has been compile-tested without producing warnings or errors. Kernel coding style forbids the use of extern declarations within .c files. Signed-off-by: Michael-Luke Jones Signed-off-by: Russell King --- arch/arm/mach-ixp4xx/coyote-pci.c | 4 ---- arch/arm/mach-ixp4xx/ixdpg425-pci.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index 7bc94f3..ad2e5b9 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c @@ -25,10 +25,6 @@ #include -extern void ixp4xx_pci_preinit(void); -extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); -extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); - void __init coyote_pci_preinit(void) { set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQT_LOW); diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index 509a95a..d1e75b7 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c @@ -23,10 +23,6 @@ #include -extern void ixp4xx_pci_preinit(void); -extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); -extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); - void __init ixdpg425_pci_preinit(void) { set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW); -- cgit v1.1 From 2ccdd1e77da52ad494e9af46bf272d816830cb28 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 18 May 2007 11:25:31 +0100 Subject: [ARM] 4394/1: ARMv7: Add the TLB range operations We are currently using the ARMv6 operations but need to duplicate some of the code because of the introduction of the new CPU barrier instructions in ARMv7. Signed-off-by: Catalin Marinas Signed-off-by: Russell King --- arch/arm/mm/Kconfig | 5 ++- arch/arm/mm/Makefile | 1 + arch/arm/mm/proc-v7.S | 2 +- arch/arm/mm/tlb-v7.S | 88 ++++++++++++++++++++++++++++++++++++++++++++++ include/asm-arm/tlbflush.h | 13 +++++++ 5 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mm/tlb-v7.S diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 5f472a8..e7904bc9 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -379,7 +379,7 @@ config CPU_V7 select CPU_CP15_MMU select CPU_HAS_ASID select CPU_COPY_V6 if MMU - select CPU_TLB_V6 if MMU + select CPU_TLB_V7 if MMU # Figure out what processor architecture version we should be using. # This defines the compiler instruction set which depends on the machine type. @@ -498,6 +498,9 @@ config CPU_TLB_V4WBI config CPU_TLB_V6 bool +config CPU_TLB_V7 + bool + endif config CPU_HAS_ASID diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index b5bd335..7627027 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile @@ -46,6 +46,7 @@ obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o obj-$(CONFIG_CPU_TLB_V6) += tlb-v6.o +obj-$(CONFIG_CPU_TLB_V7) += tlb-v7.o obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index dd823dd..718f478 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -256,7 +256,7 @@ __v7_proc_info: .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP .long cpu_v7_name .long v7_processor_functions - .long v6wbi_tlb_fns + .long v7wbi_tlb_fns .long v6_user_fns .long v7_cache_fns .size __v7_proc_info, . - __v7_proc_info diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S new file mode 100644 index 0000000..b56dda8 --- /dev/null +++ b/arch/arm/mm/tlb-v7.S @@ -0,0 +1,88 @@ +/* + * linux/arch/arm/mm/tlb-v7.S + * + * Copyright (C) 1997-2002 Russell King + * Modified for ARMv7 by Catalin Marinas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ARM architecture version 6 TLB handling functions. + * These assume a split I/D TLB. + */ +#include +#include +#include +#include +#include "proc-macros.S" + +/* + * v7wbi_flush_user_tlb_range(start, end, vma) + * + * Invalidate a range of TLB entries in the specified address space. + * + * - start - start address (may not be aligned) + * - end - end address (exclusive, may not be aligned) + * - vma - vma_struct describing address range + * + * It is assumed that: + * - the "Invalidate single entry" instruction will invalidate + * both the I and the D TLBs on Harvard-style TLBs + */ +ENTRY(v7wbi_flush_user_tlb_range) + vma_vm_mm r3, r2 @ get vma->vm_mm + mmid r3, r3 @ get vm_mm->context.id + dsb + mov r0, r0, lsr #PAGE_SHIFT @ align address + mov r1, r1, lsr #PAGE_SHIFT + asid r3, r3 @ mask ASID + orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA + mov r1, r1, lsl #PAGE_SHIFT + vma_vm_flags r2, r2 @ get vma->vm_flags +1: + mcr p15, 0, r0, c8, c6, 1 @ TLB invalidate D MVA (was 1) + tst r2, #VM_EXEC @ Executable area ? + mcrne p15, 0, r0, c8, c5, 1 @ TLB invalidate I MVA (was 1) + add r0, r0, #PAGE_SZ + cmp r0, r1 + blo 1b + mov ip, #0 + mcr p15, 0, ip, c7, c5, 6 @ flush BTAC/BTB + dsb + mov pc, lr + +/* + * v7wbi_flush_kern_tlb_range(start,end) + * + * Invalidate a range of kernel TLB entries + * + * - start - start address (may not be aligned) + * - end - end address (exclusive, may not be aligned) + */ +ENTRY(v7wbi_flush_kern_tlb_range) + dsb + mov r0, r0, lsr #PAGE_SHIFT @ align address + mov r1, r1, lsr #PAGE_SHIFT + mov r0, r0, lsl #PAGE_SHIFT + mov r1, r1, lsl #PAGE_SHIFT +1: + mcr p15, 0, r0, c8, c6, 1 @ TLB invalidate D MVA + mcr p15, 0, r0, c8, c5, 1 @ TLB invalidate I MVA + add r0, r0, #PAGE_SZ + cmp r0, r1 + blo 1b + mov r2, #0 + mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB + dsb + isb + mov pc, lr + + .section ".text.init", #alloc, #execinstr + + .type v7wbi_tlb_fns, #object +ENTRY(v7wbi_tlb_fns) + .long v7wbi_flush_user_tlb_range + .long v7wbi_flush_kern_tlb_range + .long v6wbi_tlb_flags + .size v7wbi_tlb_fns, . - v7wbi_tlb_fns diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index ccd0de0..71be4fd 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h @@ -138,6 +138,19 @@ # define v6wbi_always_flags (-1UL) #endif +#ifdef CONFIG_CPU_TLB_V7 +# define v7wbi_possible_flags v6wbi_tlb_flags +# define v7wbi_always_flags v6wbi_tlb_flags +# ifdef _TLB +# define MULTI_TLB 1 +# else +# define _TLB v7wbi +# endif +#else +# define v7wbi_possible_flags 0 +# define v7wbi_always_flags (-1UL) +#endif + #ifndef _TLB #error Unknown TLB model #endif -- cgit v1.1 From 2389b272168ceec056ca1d8a870a97fa9c26e11a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 29 May 2007 21:53:50 +0100 Subject: [ARM] 4417/1: Serial: Fix AMBA drivers locking The -rt patch triggered a lockdep warning in the amba serial drivers, which never shows up on UP kernels. On SMP systems this would trigger as well. Release the port lock before calling tty_flip_buffer_push() and reacquire it after the call. This matches the code in the 8250 serial driver. Signed-off-by: Thomas Gleixner Signed-off-by: Russell King --- drivers/serial/amba-pl010.c | 3 ++- drivers/serial/amba-pl011.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 1a9a24b..00d1255 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c @@ -167,8 +167,9 @@ static void pl010_rx_chars(struct uart_amba_port *uap) ignore_char: status = readb(uap->port.membase + UART01x_FR); } + spin_unlock(&port->lock); tty_flip_buffer_push(tty); - return; + spin_lock(&port->lock); } static void pl010_tx_chars(struct uart_amba_port *uap) diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 44639e7..954073c 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -153,8 +153,9 @@ static void pl011_rx_chars(struct uart_amba_port *uap) ignore_char: status = readw(uap->port.membase + UART01x_FR); } + spin_unlock(&uap->port.lock); tty_flip_buffer_push(tty); - return; + spin_lock(&uap->port.lock); } static void pl011_tx_chars(struct uart_amba_port *uap) -- cgit v1.1 From cdea460643072e1ee3647434aa254b5b81364f68 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 30 May 2007 17:48:45 +0100 Subject: [ARM] Fix some section mismatch warnings The following patch fixes these section mismatch warnings: WARNING: arch/arm/mach-at91/built-in.o(.text+0xdf4): Section mismatch: reference to .init.data:dk_nand_partition (between 'nand_partitions' and 'at91_leds_event') WARNING: arch/arm/mach-at91/built-in.o(.text+0xbdc): Section mismatch: reference to .init.data:ek_nand_partition (after 'nand_partitions') WARNING: arch/arm/mach-at91/built-in.o(.text+0xbdc): Section mismatch: reference to .init.data:ek_nand_partition (between 'nand_partitions' and 'ads7843_pendown_state') WARNING: arch/arm/mach-at91/built-in.o(.text+0xbdc): Section mismatch: reference to .init.data:ek_nand_partition (after 'nand_partitions') WARNING: arch/arm/mach-at91/built-in.o(.text+0xc28): Section mismatch: reference to .init.data:kb9202_nand_partition (after 'nand_partitions') WARNING: arch/arm/mach-footbridge/built-in.o(.text+0xaa4): Section mismatch: reference to .init.data:cats_pci (between 'cats_pci_init' and 'ebsa285_leds_event')WARNING: arch/arm/mach-ixp2000/built-in.o(.text+0xb54): Section mismatch: reference to .init.text:ixp2000_init_irq (between 'ixdp2x00_init_irq' and 'ixdp2x00_irq_handler') WARNING: arch/arm/mach-ixp23xx/built-in.o(.text+0x670): Section mismatch: reference to .init.text:ixp23xx_pci_common_init (between 'ixp23xx_pci_slave_init' and 'ixp23xx_pci_scan_bus') WARNING: arch/arm/mach-ixp23xx/built-in.o(.text+0x890): Section mismatch: reference to .init.text:ixp23xx_init_irq (between 'ixdp2351_init_irq' and 'roadrunner_pci_preinit') WARNING: arch/arm/mach-ixp23xx/built-in.o(.text+0x9a8): Section mismatch: reference to .init.text:ixp23xx_pci_preinit (after 'roadrunner_pci_preinit') WARNING: arch/arm/mach-imx/built-in.o(__ksymtab+0x80): Section mismatch: reference to .init.text:imx_set_mmc_info (between '__ksymtab_imx_set_mmc_info' and '__ksymtab_set_imx_fb_info') WARNING: arch/arm/mach-imx/built-in.o(__ksymtab+0x88): Section mismatch: reference to .init.text:set_imx_fb_info (after '__ksymtab_set_imx_fb_info') WARNING: arch/arm/mach-sa1100/built-in.o(.text+0x1930): Section mismatch: reference to .init.data:neponset_port_fns (between 'neponset_probe' and 'assabet_leds_event') WARNING: drivers/built-in.o(.text+0x3f100): Section mismatch: reference to .init.text:ps2_clear_input (between 'ps2_probe' and 'ps2_cmd_aborted') WARNING: drivers/built-in.o(.text+0x3f1c8): Section mismatch: reference to .init.text:ps2_clear_input (between 'ps2_probe' and 'ps2_cmd_aborted') WARNING: drivers/built-in.o(.text+0x4f988): Section mismatch: reference to .init.text:ps2_clear_input (between 'ps2_probe' and 'ps2_cmd_aborted') WARNING: drivers/built-in.o(.text+0x4fa50): Section mismatch: reference to .init.text:ps2_clear_input (between 'ps2_probe' and 'ps2_cmd_aborted') Signed-off-by: Sam Ravnborg Acked-by: Lennert Buytenhek Signed-off-by: Russell King --- arch/arm/mach-at91/board-dk.c | 2 +- arch/arm/mach-at91/board-kb9202.c | 2 +- arch/arm/mach-at91/board-sam9261ek.c | 2 +- arch/arm/mach-at91/board-sam9263ek.c | 2 +- arch/arm/mach-at91/board-sam9rlek.c | 2 +- arch/arm/mach-footbridge/cats-pci.c | 2 +- arch/arm/mach-imx/generic.c | 1 - arch/arm/mach-ixp2000/ixdp2400.c | 2 +- arch/arm/mach-ixp2000/ixdp2800.c | 2 +- arch/arm/mach-ixp2000/ixdp2x00.c | 2 +- arch/arm/mach-ixp23xx/ixdp2351.c | 2 +- arch/arm/mach-ixp23xx/pci.c | 2 +- arch/arm/mach-ixp23xx/roadrunner.c | 2 +- arch/arm/mach-sa1100/neponset.c | 4 ++-- drivers/input/serio/sa1111ps2.c | 4 ++-- 15 files changed, 16 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c index 6043c38..af49789 100644 --- a/arch/arm/mach-at91/board-dk.c +++ b/arch/arm/mach-at91/board-dk.c @@ -132,7 +132,7 @@ static struct mtd_partition __initdata dk_nand_partition[] = { }, }; -static struct mtd_partition *nand_partitions(int size, int *num_partitions) +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) { *num_partitions = ARRAY_SIZE(dk_nand_partition); return dk_nand_partition; diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index 76f6e1e..7d9b1a2 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c @@ -96,7 +96,7 @@ static struct mtd_partition __initdata kb9202_nand_partition[] = { }, }; -static struct mtd_partition *nand_partitions(int size, int *num_partitions) +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) { *num_partitions = ARRAY_SIZE(kb9202_nand_partition); return kb9202_nand_partition; diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 1f0c8a4..26ca8ab3 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c @@ -178,7 +178,7 @@ static struct mtd_partition __initdata ek_nand_partition[] = { }, }; -static struct mtd_partition *nand_partitions(int size, int *num_partitions) +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) { *num_partitions = ARRAY_SIZE(ek_nand_partition); return ek_nand_partition; diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index f574585..c164c8e 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c @@ -180,7 +180,7 @@ static struct mtd_partition __initdata ek_nand_partition[] = { }, }; -static struct mtd_partition *nand_partitions(int size, int *num_partitions) +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) { *num_partitions = ARRAY_SIZE(ek_nand_partition); return ek_nand_partition; diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 30c79ac..9b61320 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c @@ -87,7 +87,7 @@ static struct mtd_partition __initdata ek_nand_partition[] = { }, }; -static struct mtd_partition *nand_partitions(int size, int *num_partitions) +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) { *num_partitions = ARRAY_SIZE(ek_nand_partition); return ek_nand_partition; diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c index 4f984fd..35eb232 100644 --- a/arch/arm/mach-footbridge/cats-pci.c +++ b/arch/arm/mach-footbridge/cats-pci.c @@ -45,7 +45,7 @@ static struct hw_pci cats_pci __initdata = { .postinit = dc21285_postinit, }; -static int cats_pci_init(void) +static int __init cats_pci_init(void) { if (machine_is_cats()) pci_common_init(&cats_pci); diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c index 7a7fa51..1c474cf 100644 --- a/arch/arm/mach-imx/generic.c +++ b/arch/arm/mach-imx/generic.c @@ -201,7 +201,6 @@ void __init imx_set_mmc_info(struct imxmmc_platform_data *info) { imx_mmc_device.dev.platform_data = info; } -EXPORT_SYMBOL(imx_set_mmc_info); static struct imxfb_mach_info imx_fb_info; diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index 0fdd03a..ce7c15c 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c @@ -164,7 +164,7 @@ int __init ixdp2400_pci_init(void) subsys_initcall(ixdp2400_pci_init); -void ixdp2400_init_irq(void) +void __init ixdp2400_init_irq(void) { ixdp2x00_init_irq(IXDP2400_CPLD_INT_STAT, IXDP2400_CPLD_INT_MASK, IXDP2400_NR_IRQS); } diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index 70d247f..14f09b80 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c @@ -279,7 +279,7 @@ int __init ixdp2800_pci_init(void) subsys_initcall(ixdp2800_pci_init); -void ixdp2800_init_irq(void) +void __init ixdp2800_init_irq(void) { ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2800_NR_IRQS); } diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 011065b..73c651e 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c @@ -145,7 +145,7 @@ static struct irq_chip ixdp2x00_cpld_irq_chip = { .unmask = ixdp2x00_irq_unmask }; -void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_irqs) +void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_irqs) { unsigned int irq; diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index 7a86a25..c41a6b5 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c @@ -124,7 +124,7 @@ static struct irq_chip ixdp2351_intb_chip = { .unmask = ixdp2351_intb_unmask }; -void ixdp2351_init_irq(void) +void __init ixdp2351_init_irq(void) { int irq; diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c index ac7d43d..227f808 100644 --- a/arch/arm/mach-ixp23xx/pci.c +++ b/arch/arm/mach-ixp23xx/pci.c @@ -284,7 +284,7 @@ int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys) return 1; } -void ixp23xx_pci_slave_init(void) +void __init ixp23xx_pci_slave_init(void) { ixp23xx_pci_common_init(); } diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c index d06e21b..e3564496 100644 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ b/arch/arm/mach-ixp23xx/roadrunner.c @@ -110,7 +110,7 @@ static int __init roadrunner_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) return NO_IRQ; } -static void roadrunner_pci_preinit(void) +static void __init roadrunner_pci_preinit(void) { set_irq_type(IRQ_ROADRUNNER_PCI_INTC, IRQT_LOW); set_irq_type(IRQ_ROADRUNNER_PCI_INTD, IRQT_LOW); diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index d7c038a..4cbf946 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c @@ -139,12 +139,12 @@ static u_int neponset_get_mctrl(struct uart_port *port) return ret; } -static struct sa1100_port_fns neponset_port_fns __initdata = { +static struct sa1100_port_fns neponset_port_fns __devinitdata = { .set_mctrl = neponset_set_mctrl, .get_mctrl = neponset_get_mctrl, }; -static int neponset_probe(struct platform_device *dev) +static int __devinit neponset_probe(struct platform_device *dev) { sa1100_register_uart_fns(&neponset_port_fns); diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index 5595087..d31ece8 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c @@ -170,7 +170,7 @@ static void ps2_close(struct serio *io) /* * Clear the input buffer. */ -static void __init ps2_clear_input(struct ps2if *ps2if) +static void __devinit ps2_clear_input(struct ps2if *ps2if) { int maxread = 100; @@ -228,7 +228,7 @@ static int __init ps2_test(struct ps2if *ps2if) /* * Add one device to this driver. */ -static int ps2_probe(struct sa1111_dev *dev) +static int __devinit ps2_probe(struct sa1111_dev *dev) { struct ps2if *ps2if; struct serio *serio; -- cgit v1.1