From 699d8412c1bf505f24d1a2048b49b8ffd8fe1d00 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 7 Mar 2007 03:35:30 -0800 Subject: [PATCH] ARM: OMAP: Clean up bitrot to sync with mainline - Remove old ARM11 oprofile support and use the mainline version - Remove old omap-rng and use the mainline version - Whitespace fixes Signed-off-by: Tony Lindgren --- arch/arm/Makefile | 2 +- arch/arm/oprofile/Makefile | 4 +- arch/arm/oprofile/common.c | 8 +++ arch/arm/oprofile/op_arm_model.h | 3 + arch/arm/plat-omap/devices.c | 2 +- arch/arm/plat-omap/gpio.c | 1 - drivers/cbus/Kconfig | 6 +- drivers/cbus/retu-pwrbutton.c | 2 +- drivers/cbus/tahvo-usb.c | 2 +- drivers/char/Kconfig | 10 ---- drivers/char/omap-rng.c | 98 -------------------------------- drivers/char/watchdog/Makefile | 1 - 12 files changed, 21 insertions(+), 118 deletions(-) delete mode 100644 drivers/char/omap-rng.c diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 9892296f521..ab9f2d4bd04 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -71,7 +71,7 @@ tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale -tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=arm1136jfs) +tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) ifeq ($(CONFIG_AEABI),y) CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork diff --git a/arch/arm/oprofile/Makefile b/arch/arm/oprofile/Makefile index 6a94e54848f..e61d0cc520b 100644 --- a/arch/arm/oprofile/Makefile +++ b/arch/arm/oprofile/Makefile @@ -8,4 +8,6 @@ DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \ oprofile-y := $(DRIVER_OBJS) common.o backtrace.o oprofile-$(CONFIG_CPU_XSCALE) += op_model_xscale.o - +oprofile-$(CONFIG_OPROFILE_ARM11_CORE) += op_model_arm11_core.o +oprofile-$(CONFIG_OPROFILE_ARMV6) += op_model_v6.o +oprofile-$(CONFIG_OPROFILE_MPCORE) += op_model_mpcore.o diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 7ebbbca7d1d..a9de727c932 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c @@ -137,6 +137,14 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) spec = &op_xscale_spec; #endif +#ifdef CONFIG_OPROFILE_ARMV6 + spec = &op_armv6_spec; +#endif + +#ifdef CONFIG_OPROFILE_MPCORE + spec = &op_mpcore_spec; +#endif + if (spec) { ret = spec->init(); if (ret < 0) diff --git a/arch/arm/oprofile/op_arm_model.h b/arch/arm/oprofile/op_arm_model.h index 38c6ad15854..4899c629aa0 100644 --- a/arch/arm/oprofile/op_arm_model.h +++ b/arch/arm/oprofile/op_arm_model.h @@ -24,6 +24,9 @@ struct op_arm_model_spec { extern struct op_arm_model_spec op_xscale_spec; #endif +extern struct op_arm_model_spec op_armv6_spec; +extern struct op_arm_model_spec op_mpcore_spec; + extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth); extern int __init op_arm_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec); diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 93bf7c76754..2e0419fd976 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c @@ -77,7 +77,7 @@ int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev) mutex_init(&kdev->lock); mutex_lock(&dsp_pdata_lock); - list_add_tail(&kdev->entry, &dsp_pdata.kdev_list); + list_add_tail(&kdev->entry, &dsp_pdata.kdev_list); mutex_unlock(&dsp_pdata_lock); return 0; diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 250e8b2d7b3..7e90cea37a4 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/drivers/cbus/Kconfig b/drivers/cbus/Kconfig index 008d193ccba..f1a5c63e8c9 100644 --- a/drivers/cbus/Kconfig +++ b/drivers/cbus/Kconfig @@ -25,14 +25,14 @@ config CBUS_TAHVO_USER depends on CBUS_TAHVO bool "Support for Tahvo user space functions" ---help--- - If you want support for Tahvo's user space read/write etc. functions, + If you want support for Tahvo's user space read/write etc. functions, you should say Y here. config CBUS_TAHVO_USB depends on CBUS_TAHVO && USB tristate "Support for Tahvo USB transceiver" ---help--- - If you want Tahvo support for USB transceiver, say Y or M here. + If you want Tahvo support for USB transceiver, say Y or M here. config CBUS_TAHVO_USB_HOST_BY_DEFAULT depends on CBUS_TAHVO_USB && USB_OTG @@ -53,7 +53,7 @@ config CBUS_RETU_USER depends on CBUS_RETU bool "Support for Retu user space functions" ---help--- - If you want support for Retu's user space read/write etc. functions, + If you want support for Retu's user space read/write etc. functions, you should say Y here. config CBUS_RETU_POWERBUTTON diff --git a/drivers/cbus/retu-pwrbutton.c b/drivers/cbus/retu-pwrbutton.c index 7a7469f6f62..ad37b6d051b 100644 --- a/drivers/cbus/retu-pwrbutton.c +++ b/drivers/cbus/retu-pwrbutton.c @@ -91,7 +91,7 @@ static int __init retubutton_init(void) pwrbtn_dev = input_allocate_device(); if (!pwrbtn_dev) return -ENOMEM; - + pwrbtn_dev->evbit[0] = BIT(EV_KEY); pwrbtn_dev->keybit[LONG(KEY_POWER)] = BIT(KEY_POWER); pwrbtn_dev->name = "retu-pwrbutton"; diff --git a/drivers/cbus/tahvo-usb.c b/drivers/cbus/tahvo-usb.c index 934400f6988..1c5a2a53d6e 100644 --- a/drivers/cbus/tahvo-usb.c +++ b/drivers/cbus/tahvo-usb.c @@ -105,7 +105,7 @@ static struct platform_device tahvo_usb_device; * OTG related functions * * These shoud be separated into omap-otg.c driver module, as they are used - * by various transceivers. These functions are needed in the UDC-only case + * by various transceivers. These functions are needed in the UDC-only case * as well. These functions are copied from GPL isp1301_omap.c * --------------------------------------------------------------------------- */ diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 948b06494d7..8a54a2b5c98 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -703,16 +703,6 @@ config NWFLASH source "drivers/char/hw_random/Kconfig" -config OMAP_RNG - tristate "OMAP Random Number Generator support" - depends on ARCH_OMAP16XX || ARCH_OMAP24XX - ---help--- - This driver provides kernel-side support for the Random Number - Generator hardware found on OMAP16xx and OMAP24xx multimedia - processors. - - If unsure, say N. - config NVRAM tristate "/dev/nvram support" depends on ATARI || X86 || ARM || GENERIC_NVRAM diff --git a/drivers/char/omap-rng.c b/drivers/char/omap-rng.c deleted file mode 100644 index cc3290ef70d..00000000000 --- a/drivers/char/omap-rng.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * drivers/char/omap-rng.c - * - * Copyright (C) 2005 Nokia Corporation - * Author: Juha Yrjölä - * - * OMAP16xx and OMAP24xx Random Number Generator driver - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -#include -#include -#include -#include -#include - -#include - -#if defined (CONFIG_ARCH_OMAP16XX) -#define RNG_BASE 0xfffe5000 -#endif -#if defined (CONFIG_ARCH_OMAP24XX) -#define RNG_BASE 0x480A0000 -#endif - -#define RNG_OUT_REG 0x00 /* Output register */ -#define RNG_STAT_REG 0x04 /* Status register - [0] = STAT_BUSY */ -#define RNG_ALARM_REG 0x24 /* Alarm register - [7:0] = ALARM_COUNTER */ -#define RNG_CONFIG_REG 0x28 /* Configuration register - [11:6] = RESET_COUNT - [5:3] = RING2_DELAY - [2:0] = RING1_DELAY */ -#define RNG_REV_REG 0x3c /* Revision register - [7:0] = REV_NB */ -#define RNG_MASK_REG 0x40 /* Mask and reset register - [2] = IT_EN - [1] = SOFTRESET - [0] = AUTOIDLE */ -#define RNG_SYSSTATUS 0x44 /* System status - [0] = RESETDONE */ - -#define ENTROPY_WORD_COUNT 128 - -static u32 rng_base = io_p2v(RNG_BASE); - -static struct clk *rng_ick = NULL; - -static u32 rng_read_reg(int reg) -{ - return __raw_readl(rng_base + reg); -} - -static void rng_write_reg(int reg, u32 val) -{ - __raw_writel(val, rng_base + reg); -} - -static void rng_feed_entropy(int count) -{ - u32 l; - - while (count--) { - while (rng_read_reg(RNG_STAT_REG)); - l = rng_read_reg(RNG_OUT_REG); - add_input_randomness(0, 0, l); - } -} - -static int __init rng_init(void) -{ - if (!cpu_is_omap16xx() && !cpu_is_omap24xx()) - return -ENODEV; - - if (cpu_is_omap24xx()) { - rng_ick = clk_get(NULL, "rng_ick"); - if (IS_ERR(rng_ick)) { - printk(KERN_ERR "omap-rng.c: Could not get rng_ick\n"); - return PTR_ERR(rng_ick); - } - clk_enable(rng_ick); - } - - printk("OMAP Random Number Generator ver. %02x\n", - rng_read_reg(RNG_REV_REG)); - rng_write_reg(RNG_MASK_REG, 0x00000001); - rng_feed_entropy(ENTROPY_WORD_COUNT); - rng_write_reg(RNG_MASK_REG, 0x00000000); - printk("%d words of entropy generated\n", ENTROPY_WORD_COUNT); - - return 0; -} -late_initcall(rng_init); diff --git a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile index b15f99e83bd..2cd8ff8d10a 100644 --- a/drivers/char/watchdog/Makefile +++ b/drivers/char/watchdog/Makefile @@ -29,7 +29,6 @@ obj-$(CONFIG_21285_WATCHDOG) += wdt285.o obj-$(CONFIG_977_WATCHDOG) += wdt977.o obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o -obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o -- 2.41.1