diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/locomo.c | 23 | ||||
-rw-r--r-- | arch/arm/common/sa1111.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/compat.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/compat.h | 13 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 3 | ||||
-rw-r--r-- | arch/arm/kernel/ptrace.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/devs.c | 12 |
9 files changed, 59 insertions, 31 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 159ad7ed7a4..23609400a8e 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -629,6 +629,22 @@ static int locomo_resume(struct platform_device *dev) } #endif + +#define LCM_ALC_EN 0x8000 + +void frontlight_set(struct locomo *lchip, int duty, int vr, int bpwf) +{ + unsigned long flags; + + spin_lock_irqsave(&lchip->lock, flags); + locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); + udelay(100); + locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); + locomo_writel(bpwf | LCM_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); + spin_unlock_irqrestore(&lchip->lock, flags); +} + + /** * locomo_probe - probe for a single LoCoMo chip. * @phys_addr: physical address of device. @@ -688,6 +704,11 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) /* FrontLight */ locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); + + /* Same constants can be used for collie and poodle + (depending on CONFIG options in original sharp code)? */ + frontlight_set(lchip, 163, 0, 148); + /* Longtime timer */ locomo_writel(0, lchip->base + LOCOMO_LTINT); /* SPI */ @@ -767,6 +788,8 @@ static int locomo_probe(struct platform_device *dev) if (!mem) return -EINVAL; irq = platform_get_irq(dev, 0); + if (irq < 0) + return -ENXIO; return __locomo_probe(&dev->dev, mem, irq); } diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 1475089f9b4..93352f6097c 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -943,6 +943,8 @@ static int sa1111_probe(struct platform_device *pdev) if (!mem) return -EINVAL; irq = platform_get_irq(pdev, 0); + if (irq < 0) + return -ENXIO; return __sa1111_probe(&pdev->dev, mem, irq); } diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/compat.c index 7195add42e7..60cfa7f3226 100644 --- a/arch/arm/kernel/compat.c +++ b/arch/arm/kernel/compat.c @@ -27,6 +27,8 @@ #include <asm/mach/arch.h> +#include "compat.h" + /* * Usage: * - do not go blindly adding fields, add them at the end diff --git a/arch/arm/kernel/compat.h b/arch/arm/kernel/compat.h new file mode 100644 index 00000000000..27e61a68bd1 --- /dev/null +++ b/arch/arm/kernel/compat.h @@ -0,0 +1,13 @@ +/* + * linux/arch/arm/kernel/compat.h + * + * Copyright (C) 2001 Russell King + * + * 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. +*/ + +extern void convert_to_tag_list(struct tag *tags); + +extern void squash_mem_tags(struct tag *tag); diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 4b4e4cf79c8..489c069e5c3 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -27,6 +27,7 @@ #include <linux/kallsyms.h> #include <linux/init.h> #include <linux/cpu.h> +#include <linux/elfcore.h> #include <asm/leds.h> #include <asm/processor.h> @@ -83,7 +84,7 @@ EXPORT_SYMBOL(pm_power_off); * This is our default idle handler. We need to disable * interrupts here to ensure we don't miss a wakeup call. */ -void default_idle(void) +static void default_idle(void) { if (hlt_counter) cpu_relax(); diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index bc9e2f8ae32..a1d1b2906e8 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -628,7 +628,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) return -EACCES; iwmmxt_task_release(thread); /* force a reload */ - return copy_from_user(&thead->fpstate.iwmmxt, ufp, IWMMXT_SIZE) + return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE) ? -EFAULT : 0; } diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 68273b4dc88..08974cbe982 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -37,6 +37,8 @@ #include <asm/mach/irq.h> #include <asm/mach/time.h> +#include "compat.h" + #ifndef MEM_SIZE #define MEM_SIZE (16*1024*1024) #endif @@ -53,10 +55,7 @@ static int __init fpe_setup(char *line) __setup("fpe=", fpe_setup); #endif -extern unsigned int mem_fclk_21285; extern void paging_init(struct meminfo *, struct machine_desc *desc); -extern void convert_to_tag_list(struct tag *tags); -extern void squash_mem_tags(struct tag *tag); extern void reboot_setup(char *str); extern int root_mountflags; extern void _stext, _text, _etext, __data_start, _edata, _end; diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 4303d988c4b..d13270c5d7c 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -202,11 +202,6 @@ struct clk realview_clcd_clk = { /* * CLCD support. */ -#define SYS_CLCD_MODE_MASK (3 << 0) -#define SYS_CLCD_MODE_888 (0 << 0) -#define SYS_CLCD_MODE_5551 (1 << 0) -#define SYS_CLCD_MODE_565_RLSB (2 << 0) -#define SYS_CLCD_MODE_565_BLSB (3 << 0) #define SYS_CLCD_NLCDIOON (1 << 2) #define SYS_CLCD_VDDPOSSWITCH (1 << 3) #define SYS_CLCD_PWR3V5SWITCH (1 << 4) @@ -360,29 +355,10 @@ static void realview_clcd_enable(struct clcd_fb *fb) void __iomem *sys_clcd = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_CLCD_OFFSET; u32 val; - val = readl(sys_clcd); - val &= ~SYS_CLCD_MODE_MASK; - - switch (fb->fb.var.green.length) { - case 5: - val |= SYS_CLCD_MODE_5551; - break; - case 6: - val |= SYS_CLCD_MODE_565_RLSB; - break; - case 8: - val |= SYS_CLCD_MODE_888; - break; - } - - /* - * Set the MUX - */ - writel(val, sys_clcd); - /* - * And now enable the PSUs + * Enable the PSUs */ + val = readl(sys_clcd); val |= SYS_CLCD_NLCDIOON | SYS_CLCD_PWR3V5SWITCH; writel(val, sys_clcd); } diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index 0a47d38789a..ca09ba516e4 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c @@ -334,11 +334,17 @@ static struct resource s3c_spi0_resource[] = { }; +static u64 s3c_device_spi0_dmamask = 0xffffffffUL; + struct platform_device s3c_device_spi0 = { .name = "s3c2410-spi", .id = 0, .num_resources = ARRAY_SIZE(s3c_spi0_resource), .resource = s3c_spi0_resource, + .dev = { + .dma_mask = &s3c_device_spi0_dmamask, + .coherent_dma_mask = 0xffffffffUL + } }; EXPORT_SYMBOL(s3c_device_spi0); @@ -359,11 +365,17 @@ static struct resource s3c_spi1_resource[] = { }; +static u64 s3c_device_spi1_dmamask = 0xffffffffUL; + struct platform_device s3c_device_spi1 = { .name = "s3c2410-spi", .id = 1, .num_resources = ARRAY_SIZE(s3c_spi1_resource), .resource = s3c_spi1_resource, + .dev = { + .dma_mask = &s3c_device_spi1_dmamask, + .coherent_dma_mask = 0xffffffffUL + } }; EXPORT_SYMBOL(s3c_device_spi1); |