Skip to content
Snippets Groups Projects
Commit 85082fd7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (241 commits)
  [ARM] 5171/1: ep93xx: fix compilation of modules using clocks
  [ARM] 5133/2: at91sam9g20 defconfig file
  [ARM] 5130/4: Support for the at91sam9g20
  [ARM] 5160/1: IOP3XX: gpio/gpiolib support
  [ARM] at91: Fix NAND FLASH timings for at91sam9x evaluation kits.
  [ARM] 5084/1: zylonite: Register AC97 device
  [ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model
  [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers
  [ARM] 5147/1: pxaficp_ir: drop pxa_gpio_mode calls, as pin setting
  [ARM] 5145/1: PXA2xx: provide api to control IrDA pins state
  [ARM] 5144/1: pxaficp_ir: cleanup includes
  [ARM] pxa: remove pxa_set_cken()
  [ARM] pxa: allow clk aliases
  [ARM] Feroceon: don't disable BPU on boot
  [ARM] Orion: LED support for HP mv2120
  [ARM] Orion: add RD88F5181L-FXO support
  [ARM] Orion: add RD88F5181L-GE support
  [ARM] Orion: add Netgear WNR854T support
  [ARM] s3c2410_defconfig: update for current build
  [ARM] Acer n30: Minor style and indentation fixes.
  ...
parents 666484f0 53ffe3b4
No related merge requests found
Showing
with 426 additions and 857 deletions
...@@ -1242,6 +1242,11 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -1242,6 +1242,11 @@ and is between 256 and 4096 characters. It is defined in the file
mtdparts= [MTD] mtdparts= [MTD]
See drivers/mtd/cmdlinepart.c. See drivers/mtd/cmdlinepart.c.
mtdset= [ARM]
ARM/S3C2412 JIVE boot control
See arch/arm/mach-s3c2412/mach-jive.c
mtouchusb.raw_coordinates= mtouchusb.raw_coordinates=
[HW] Make the MicroTouch USB driver use raw coordinates [HW] Make the MicroTouch USB driver use raw coordinates
('y', default) or cooked coordinates ('n') ('y', default) or cooked coordinates ('n')
......
...@@ -24,6 +24,9 @@ config ARM ...@@ -24,6 +24,9 @@ config ARM
Europe. There is an ARM Linux project with a web page at Europe. There is an ARM Linux project with a web page at
<http://www.arm.linux.org.uk/>. <http://www.arm.linux.org.uk/>.
config HAVE_PWM
bool
config SYS_SUPPORTS_APM_EMULATION config SYS_SUPPORTS_APM_EMULATION
bool bool
...@@ -86,6 +89,11 @@ config STACKTRACE_SUPPORT ...@@ -86,6 +89,11 @@ config STACKTRACE_SUPPORT
bool bool
default y default y
config HAVE_LATENCYTOP_SUPPORT
bool
depends on !SMP
default y
config LOCKDEP_SUPPORT config LOCKDEP_SUPPORT
bool bool
default y default y
...@@ -149,6 +157,10 @@ config FIQ ...@@ -149,6 +157,10 @@ config FIQ
config ARCH_MTD_XIP config ARCH_MTD_XIP
bool bool
config GENERIC_HARDIRQS_NO__DO_IRQ
bool
def_bool y
if OPROFILE if OPROFILE
config OPROFILE_ARMV6 config OPROFILE_ARMV6
...@@ -234,13 +246,6 @@ config ARCH_CLPS711X ...@@ -234,13 +246,6 @@ config ARCH_CLPS711X
help help
Support for Cirrus Logic 711x/721x based boards. Support for Cirrus Logic 711x/721x based boards.
config ARCH_CO285
bool "Co-EBSA285"
select FOOTBRIDGE
select FOOTBRIDGE_ADDIN
help
Support for Intel's EBSA285 companion chip.
config ARCH_EBSA110 config ARCH_EBSA110
bool "EBSA-110" bool "EBSA-110"
select ISA select ISA
...@@ -301,6 +306,8 @@ config ARCH_IOP32X ...@@ -301,6 +306,8 @@ config ARCH_IOP32X
depends on MMU depends on MMU
select PLAT_IOP select PLAT_IOP
select PCI select PCI
select GENERIC_GPIO
select HAVE_GPIO_LIB
help help
Support for Intel's 80219 and IOP32X (XScale) family of Support for Intel's 80219 and IOP32X (XScale) family of
processors. processors.
...@@ -310,6 +317,8 @@ config ARCH_IOP33X ...@@ -310,6 +317,8 @@ config ARCH_IOP33X
depends on MMU depends on MMU
select PLAT_IOP select PLAT_IOP
select PCI select PCI
select GENERIC_GPIO
select HAVE_GPIO_LIB
help help
Support for Intel's IOP33X (XScale) family of processors. Support for Intel's IOP33X (XScale) family of processors.
...@@ -349,6 +358,16 @@ config ARCH_L7200 ...@@ -349,6 +358,16 @@ config ARCH_L7200
If you have any questions or comments about the Linux kernel port If you have any questions or comments about the Linux kernel port
to this board, send e-mail to <sjhill@cotw.com>. to this board, send e-mail to <sjhill@cotw.com>.
config ARCH_KIRKWOOD
bool "Marvell Kirkwood"
select PCI
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select PLAT_ORION
help
Support for the following Marvell Kirkwood series SoCs:
88F6180, 88F6192 and 88F6281.
config ARCH_KS8695 config ARCH_KS8695
bool "Micrel/Kendin KS8695" bool "Micrel/Kendin KS8695"
select GENERIC_GPIO select GENERIC_GPIO
...@@ -367,9 +386,31 @@ config ARCH_NS9XXX ...@@ -367,9 +386,31 @@ config ARCH_NS9XXX
<http://www.digi.com/products/microprocessors/index.jsp> <http://www.digi.com/products/microprocessors/index.jsp>
config ARCH_LOKI
bool "Marvell Loki (88RC8480)"
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select PLAT_ORION
help
Support for the Marvell Loki (88RC8480) SoC.
config ARCH_MV78XX0
bool "Marvell MV78xx0"
select PCI
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select PLAT_ORION
help
Support for the following Marvell MV78xx0 series SoCs:
MV781x0, MV782x0.
config ARCH_MXC config ARCH_MXC
bool "Freescale MXC/iMX-based" bool "Freescale MXC/iMX-based"
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
select ARCH_MTD_XIP select ARCH_MTD_XIP
select GENERIC_GPIO
select HAVE_GPIO_LIB
help help
Support for Freescale MXC/iMX-based family of processors Support for Freescale MXC/iMX-based family of processors
...@@ -383,7 +424,8 @@ config ARCH_ORION5X ...@@ -383,7 +424,8 @@ config ARCH_ORION5X
select PLAT_ORION select PLAT_ORION
help help
Support for the following Marvell Orion 5x series SoCs: Support for the following Marvell Orion 5x series SoCs:
Orion-1 (5181), Orion-NAS (5182), Orion-2 (5281.) Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
Orion-2 (5281).
config ARCH_PNX4008 config ARCH_PNX4008
bool "Philips Nexperia PNX4008 Mobile" bool "Philips Nexperia PNX4008 Mobile"
...@@ -408,6 +450,7 @@ config ARCH_RPC ...@@ -408,6 +450,7 @@ config ARCH_RPC
select FIQ select FIQ
select TIMER_ACORN select TIMER_ACORN
select ARCH_MAY_HAVE_PC_FDC select ARCH_MAY_HAVE_PC_FDC
select HAVE_PATA_PLATFORM
select ISA_DMA_API select ISA_DMA_API
select NO_IOPORT select NO_IOPORT
help help
...@@ -504,6 +547,10 @@ source "arch/arm/mach-ixp2000/Kconfig" ...@@ -504,6 +547,10 @@ source "arch/arm/mach-ixp2000/Kconfig"
source "arch/arm/mach-ixp23xx/Kconfig" source "arch/arm/mach-ixp23xx/Kconfig"
source "arch/arm/mach-loki/Kconfig"
source "arch/arm/mach-mv78xx0/Kconfig"
source "arch/arm/mach-pxa/Kconfig" source "arch/arm/mach-pxa/Kconfig"
source "arch/arm/mach-sa1100/Kconfig" source "arch/arm/mach-sa1100/Kconfig"
...@@ -516,6 +563,8 @@ source "arch/arm/mach-omap2/Kconfig" ...@@ -516,6 +563,8 @@ source "arch/arm/mach-omap2/Kconfig"
source "arch/arm/mach-orion5x/Kconfig" source "arch/arm/mach-orion5x/Kconfig"
source "arch/arm/mach-kirkwood/Kconfig"
source "arch/arm/plat-s3c24xx/Kconfig" source "arch/arm/plat-s3c24xx/Kconfig"
source "arch/arm/plat-s3c/Kconfig" source "arch/arm/plat-s3c/Kconfig"
...@@ -705,27 +754,6 @@ config PREEMPT ...@@ -705,27 +754,6 @@ config PREEMPT
Say Y here if you are building a kernel for a desktop, embedded Say Y here if you are building a kernel for a desktop, embedded
or real-time system. Say N if you are unsure. or real-time system. Say N if you are unsure.
config NO_IDLE_HZ
bool "Dynamic tick timer"
depends on !GENERIC_CLOCKEVENTS
help
Select this option if you want to disable continuous timer ticks
and have them programmed to occur as required. This option saves
power as the system can remain in idle state for longer.
By default dynamic tick is disabled during the boot, and can be
manually enabled with:
echo 1 > /sys/devices/system/timer/timer0/dyn_tick
Alternatively, if you want dynamic tick automatically enabled
during boot, pass "dyntick=enable" via the kernel command string.
Please note that dynamic tick may affect the accuracy of
timekeeping on some platforms depending on the implementation.
Currently at least OMAP, PXA2xx and SA11x0 platforms are known
to have accurate timekeeping with dynamic tick.
config HZ config HZ
int int
default 128 if ARCH_L7200 default 128 if ARCH_L7200
...@@ -791,7 +819,7 @@ source "mm/Kconfig" ...@@ -791,7 +819,7 @@ source "mm/Kconfig"
config LEDS config LEDS
bool "Timer and CPU usage LEDs" bool "Timer and CPU usage LEDs"
depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \ depends on ARCH_CDB89712 || ARCH_EBSA110 || \
ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \ ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \
ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
......
...@@ -100,8 +100,6 @@ textofs-y := 0x00008000 ...@@ -100,8 +100,6 @@ textofs-y := 0x00008000
incdir-$(CONFIG_ARCH_CLPS7500) := cl7500 incdir-$(CONFIG_ARCH_CLPS7500) := cl7500
machine-$(CONFIG_FOOTBRIDGE) := footbridge machine-$(CONFIG_FOOTBRIDGE) := footbridge
incdir-$(CONFIG_FOOTBRIDGE) := ebsa285 incdir-$(CONFIG_FOOTBRIDGE) := ebsa285
machine-$(CONFIG_ARCH_CO285) := footbridge
incdir-$(CONFIG_ARCH_CO285) := ebsa285
machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_SHARK) := shark
machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SA1100) := sa1100
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
...@@ -135,11 +133,15 @@ endif ...@@ -135,11 +133,15 @@ endif
machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_NETX) := netx
machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
machine-$(CONFIG_ARCH_DAVINCI) := davinci machine-$(CONFIG_ARCH_DAVINCI) := davinci
machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
machine-$(CONFIG_ARCH_KS8695) := ks8695 machine-$(CONFIG_ARCH_KS8695) := ks8695
incdir-$(CONFIG_ARCH_MXC) := mxc incdir-$(CONFIG_ARCH_MXC) := mxc
machine-$(CONFIG_ARCH_MX2) := mx2
machine-$(CONFIG_ARCH_MX3) := mx3 machine-$(CONFIG_ARCH_MX3) := mx3
machine-$(CONFIG_ARCH_ORION5X) := orion5x machine-$(CONFIG_ARCH_ORION5X) := orion5x
machine-$(CONFIG_ARCH_MSM7X00A) := msm machine-$(CONFIG_ARCH_MSM7X00A) := msm
machine-$(CONFIG_ARCH_LOKI) := loki
machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
ifeq ($(CONFIG_ARCH_EBSA110),y) ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line. # This is what happens if you forget the IOCS16 line.
...@@ -190,8 +192,6 @@ core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/ ...@@ -190,8 +192,6 @@ core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/
core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/ core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/
libs-y := arch/arm/lib/ $(libs-y) libs-y := arch/arm/lib/ $(libs-y)
......
...@@ -623,8 +623,8 @@ proc_types: ...@@ -623,8 +623,8 @@ proc_types:
b __armv4_mmu_cache_off b __armv4_mmu_cache_off
b __armv4_mmu_cache_flush b __armv4_mmu_cache_flush
.word 0x56055310 @ Feroceon .word 0x56050000 @ Feroceon
.word 0xfffffff0 .word 0xff0f0000
b __armv4_mmu_cache_on b __armv4_mmu_cache_on
b __armv4_mmu_cache_off b __armv4_mmu_cache_off
b __armv5tej_mmu_cache_flush b __armv5tej_mmu_cache_flush
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
obj-y += rtctime.o
obj-$(CONFIG_ARM_GIC) += gic.o obj-$(CONFIG_ARM_GIC) += gic.o
obj-$(CONFIG_ARM_VIC) += vic.o obj-$(CONFIG_ARM_VIC) += vic.o
obj-$(CONFIG_ICST525) += icst525.o obj-$(CONFIG_ICST525) += icst525.o
......
/*
* linux/arch/arm/common/rtctime.c
*
* Copyright (C) 2003 Deep Blue Solutions Ltd.
* Based on sa1100-rtc.c, Nils Faerber, CIH, Nicolas Pitre.
* Based on rtc.c by Paul Gortmaker
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/rtc.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/miscdevice.h>
#include <linux/spinlock.h>
#include <linux/capability.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <asm/rtc.h>
static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
static struct fasync_struct *rtc_async_queue;
/*
* rtc_lock protects rtc_irq_data
*/
static DEFINE_SPINLOCK(rtc_lock);
static unsigned long rtc_irq_data;
/*
* rtc_sem protects rtc_inuse and rtc_ops
*/
static DEFINE_MUTEX(rtc_mutex);
static unsigned long rtc_inuse;
static struct rtc_ops *rtc_ops;
#define rtc_epoch 1900UL
/*
* Calculate the next alarm time given the requested alarm time mask
* and the current time.
*/
void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc_time *alrm)
{
unsigned long next_time;
unsigned long now_time;
next->tm_year = now->tm_year;
next->tm_mon = now->tm_mon;
next->tm_mday = now->tm_mday;
next->tm_hour = alrm->tm_hour;
next->tm_min = alrm->tm_min;
next->tm_sec = alrm->tm_sec;
rtc_tm_to_time(now, &now_time);
rtc_tm_to_time(next, &next_time);
if (next_time < now_time) {
/* Advance one day */
next_time += 60 * 60 * 24;
rtc_time_to_tm(next_time, next);
}
}
EXPORT_SYMBOL(rtc_next_alarm_time);
static inline int rtc_arm_read_time(struct rtc_ops *ops, struct rtc_time *tm)
{
memset(tm, 0, sizeof(struct rtc_time));
return ops->read_time(tm);
}
static inline int rtc_arm_set_time(struct rtc_ops *ops, struct rtc_time *tm)
{
int ret;
ret = rtc_valid_tm(tm);
if (ret == 0)
ret = ops->set_time(tm);
return ret;
}
static inline int rtc_arm_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
{
int ret = -EINVAL;
if (ops->read_alarm) {
memset(alrm, 0, sizeof(struct rtc_wkalrm));
ret = ops->read_alarm(alrm);
}
return ret;
}
static inline int rtc_arm_set_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
{
int ret = -EINVAL;
if (ops->set_alarm)
ret = ops->set_alarm(alrm);
return ret;
}
void rtc_update(unsigned long num, unsigned long events)
{
spin_lock(&rtc_lock);
rtc_irq_data = (rtc_irq_data + (num << 8)) | events;
spin_unlock(&rtc_lock);
wake_up_interruptible(&rtc_wait);
kill_fasync(&rtc_async_queue, SIGIO, POLL_IN);
}
EXPORT_SYMBOL(rtc_update);
static ssize_t
rtc_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
DECLARE_WAITQUEUE(wait, current);
unsigned long data;
ssize_t ret;
if (count < sizeof(unsigned long))
return -EINVAL;
add_wait_queue(&rtc_wait, &wait);
do {
__set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irq(&rtc_lock);
data = rtc_irq_data;
rtc_irq_data = 0;
spin_unlock_irq(&rtc_lock);
if (data != 0) {
ret = 0;
break;
}
if (file->f_flags & O_NONBLOCK) {
ret = -EAGAIN;
break;
}
if (signal_pending(current)) {
ret = -ERESTARTSYS;
break;
}
schedule();
} while (1);
set_current_state(TASK_RUNNING);
remove_wait_queue(&rtc_wait, &wait);
if (ret == 0) {
ret = put_user(data, (unsigned long __user *)buf);
if (ret == 0)
ret = sizeof(unsigned long);
}
return ret;
}
static unsigned int rtc_poll(struct file *file, poll_table *wait)
{
unsigned long data;
poll_wait(file, &rtc_wait, wait);
spin_lock_irq(&rtc_lock);
data = rtc_irq_data;
spin_unlock_irq(&rtc_lock);
return data != 0 ? POLLIN | POLLRDNORM : 0;
}
static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
struct rtc_ops *ops = file->private_data;
struct rtc_time tm;
struct rtc_wkalrm alrm;
void __user *uarg = (void __user *)arg;
int ret = -EINVAL;
switch (cmd) {
case RTC_ALM_READ:
ret = rtc_arm_read_alarm(ops, &alrm);
if (ret)
break;
ret = copy_to_user(uarg, &alrm.time, sizeof(tm));
if (ret)
ret = -EFAULT;
break;
case RTC_ALM_SET:
ret = copy_from_user(&alrm.time, uarg, sizeof(tm));
if (ret) {
ret = -EFAULT;
break;
}
alrm.enabled = 0;
alrm.pending = 0;
alrm.time.tm_mday = -1;
alrm.time.tm_mon = -1;
alrm.time.tm_year = -1;
alrm.time.tm_wday = -1;
alrm.time.tm_yday = -1;
alrm.time.tm_isdst = -1;
ret = rtc_arm_set_alarm(ops, &alrm);
break;
case RTC_RD_TIME:
ret = rtc_arm_read_time(ops, &tm);
if (ret)
break;
ret = copy_to_user(uarg, &tm, sizeof(tm));
if (ret)
ret = -EFAULT;
break;
case RTC_SET_TIME:
if (!capable(CAP_SYS_TIME)) {
ret = -EACCES;
break;
}
ret = copy_from_user(&tm, uarg, sizeof(tm));
if (ret) {
ret = -EFAULT;
break;
}
ret = rtc_arm_set_time(ops, &tm);
break;
case RTC_EPOCH_SET:
#ifndef rtc_epoch
/*
* There were no RTC clocks before 1900.
*/
if (arg < 1900) {
ret = -EINVAL;
break;
}
if (!capable(CAP_SYS_TIME)) {
ret = -EACCES;
break;
}
rtc_epoch = arg;
ret = 0;
#endif
break;
case RTC_EPOCH_READ:
ret = put_user(rtc_epoch, (unsigned long __user *)uarg);
break;
case RTC_WKALM_SET:
ret = copy_from_user(&alrm, uarg, sizeof(alrm));
if (ret) {
ret = -EFAULT;
break;
}
ret = rtc_arm_set_alarm(ops, &alrm);
break;
case RTC_WKALM_RD:
ret = rtc_arm_read_alarm(ops, &alrm);
if (ret)
break;
ret = copy_to_user(uarg, &alrm, sizeof(alrm));
if (ret)
ret = -EFAULT;
break;
default:
if (ops->ioctl)
ret = ops->ioctl(cmd, arg);
break;
}
return ret;
}
static int rtc_open(struct inode *inode, struct file *file)
{
int ret;
mutex_lock(&rtc_mutex);
if (rtc_inuse) {
ret = -EBUSY;
} else if (!rtc_ops || !try_module_get(rtc_ops->owner)) {
ret = -ENODEV;
} else {
file->private_data = rtc_ops;
ret = rtc_ops->open ? rtc_ops->open() : 0;
if (ret == 0) {
spin_lock_irq(&rtc_lock);
rtc_irq_data = 0;
spin_unlock_irq(&rtc_lock);
rtc_inuse = 1;
}
}
mutex_unlock(&rtc_mutex);
return ret;
}
static int rtc_release(struct inode *inode, struct file *file)
{
struct rtc_ops *ops = file->private_data;
if (ops->release)
ops->release();
spin_lock_irq(&rtc_lock);
rtc_irq_data = 0;
spin_unlock_irq(&rtc_lock);
module_put(rtc_ops->owner);
rtc_inuse = 0;
return 0;
}
static int rtc_fasync(int fd, struct file *file, int on)
{
return fasync_helper(fd, file, on, &rtc_async_queue);
}
static const struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.read = rtc_read,
.poll = rtc_poll,
.ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
.fasync = rtc_fasync,
};
static struct miscdevice rtc_miscdev = {
.minor = RTC_MINOR,
.name = "rtc",
.fops = &rtc_fops,
};
static int rtc_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data)
{
struct rtc_ops *ops = data;
struct rtc_wkalrm alrm;
struct rtc_time tm;
char *p = page;
if (rtc_arm_read_time(ops, &tm) == 0) {
p += sprintf(p,
"rtc_time\t: %02d:%02d:%02d\n"
"rtc_date\t: %04d-%02d-%02d\n"
"rtc_epoch\t: %04lu\n",
tm.tm_hour, tm.tm_min, tm.tm_sec,
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
rtc_epoch);
}
if (rtc_arm_read_alarm(ops, &alrm) == 0) {
p += sprintf(p, "alrm_time\t: ");
if ((unsigned int)alrm.time.tm_hour <= 24)
p += sprintf(p, "%02d:", alrm.time.tm_hour);
else
p += sprintf(p, "**:");
if ((unsigned int)alrm.time.tm_min <= 59)
p += sprintf(p, "%02d:", alrm.time.tm_min);
else
p += sprintf(p, "**:");
if ((unsigned int)alrm.time.tm_sec <= 59)
p += sprintf(p, "%02d\n", alrm.time.tm_sec);
else
p += sprintf(p, "**\n");
p += sprintf(p, "alrm_date\t: ");
if ((unsigned int)alrm.time.tm_year <= 200)
p += sprintf(p, "%04d-", alrm.time.tm_year + 1900);
else
p += sprintf(p, "****-");
if ((unsigned int)alrm.time.tm_mon <= 11)
p += sprintf(p, "%02d-", alrm.time.tm_mon + 1);
else
p += sprintf(p, "**-");
if ((unsigned int)alrm.time.tm_mday <= 31)
p += sprintf(p, "%02d\n", alrm.time.tm_mday);
else
p += sprintf(p, "**\n");
p += sprintf(p, "alrm_wakeup\t: %s\n",
alrm.enabled ? "yes" : "no");
p += sprintf(p, "alrm_pending\t: %s\n",
alrm.pending ? "yes" : "no");
}
if (ops->proc)
p += ops->proc(p);
return p - page;
}
int register_rtc(struct rtc_ops *ops)
{
int ret = -EBUSY;
mutex_lock(&rtc_mutex);
if (rtc_ops == NULL) {
rtc_ops = ops;
ret = misc_register(&rtc_miscdev);
if (ret == 0)
create_proc_read_entry("driver/rtc", 0, NULL,
rtc_read_proc, ops);
}
mutex_unlock(&rtc_mutex);
return ret;
}
EXPORT_SYMBOL(register_rtc);
void unregister_rtc(struct rtc_ops *rtc)
{
mutex_lock(&rtc_mutex);
if (rtc == rtc_ops) {
remove_proc_entry("driver/rtc", NULL);
misc_deregister(&rtc_miscdev);
rtc_ops = NULL;
}
mutex_unlock(&rtc_mutex);
}
EXPORT_SYMBOL(unregister_rtc);
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/arch/pm.h> #include <asm/arch/pm.h>
#include <asm/arch/pxa-regs.h> #include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa2xx-regs.h>
#include <asm/arch/sharpsl.h> #include <asm/arch/sharpsl.h>
#include <asm/hardware/sharpsl_pm.h> #include <asm/hardware/sharpsl_pm.h>
...@@ -157,6 +158,7 @@ static void sharpsl_battery_thread(struct work_struct *private_) ...@@ -157,6 +158,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage, dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage,
sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies); sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
#ifdef CONFIG_BACKLIGHT_CORGI
/* If battery is low. limit backlight intensity to save power. */ /* If battery is low. limit backlight intensity to save power. */
if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
&& ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) || && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
...@@ -169,6 +171,7 @@ static void sharpsl_battery_thread(struct work_struct *private_) ...@@ -169,6 +171,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
sharpsl_pm.machinfo->backlight_limit(0); sharpsl_pm.machinfo->backlight_limit(0);
sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT; sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
} }
#endif
/* Suspend if critical battery level */ /* Suspend if critical battery level */
if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
......
...@@ -213,7 +213,6 @@ CONFIG_CPU_CP15_MMU=y ...@@ -213,7 +213,6 @@ CONFIG_CPU_CP15_MMU=y
# #
# CONFIG_TICK_ONESHOT is not set # CONFIG_TICK_ONESHOT is not set
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
CONFIG_AEABI=y CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y CONFIG_OABI_COMPAT=y
...@@ -907,7 +906,32 @@ CONFIG_USB_MON=y ...@@ -907,7 +906,32 @@ CONFIG_USB_MON=y
# #
# USB Gadget Support # USB Gadget Support
# #
# CONFIG_USB_GADGET is not set CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_AMD5536UDC is not set
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_USB_ATMEL_USBA=y
# CONFIG_USB_GADGET_FSL_USB2 is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_PXA2XX is not set
# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LH7A40X is not set
# CONFIG_USB_GADGET_OMAP is not set
# CONFIG_USB_GADGET_S3C2410 is not set
# CONFIG_USB_GADGET_AT91 is not set
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
# CONFIG_USB_GADGETFS is not set
CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_FILE_STORAGE_TEST is not set
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_MIDI_GADGET is not set
CONFIG_MMC=y CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set # CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set # CONFIG_MMC_UNSAFE_RESUME is not set
...@@ -926,7 +950,59 @@ CONFIG_MMC_AT91=y ...@@ -926,7 +950,59 @@ CONFIG_MMC_AT91=y
# CONFIG_MMC_SPI is not set # CONFIG_MMC_SPI is not set
# CONFIG_NEW_LEDS is not set # CONFIG_NEW_LEDS is not set
CONFIG_RTC_LIB=y CONFIG_RTC_LIB=y
# CONFIG_RTC_CLASS is not set CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_R9701 is not set
# CONFIG_RTC_DRV_RS5C348 is not set
#
# Platform RTC drivers
#
# CONFIG_RTC_DRV_CMOS is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_V3020 is not set
#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_AT91SAM9=y
CONFIG_RTC_DRV_AT91SAM9_RTT=0
CONFIG_RTC_DRV_AT91SAM9_GPBR=0
# #
# File systems # File systems
......
...@@ -169,7 +169,6 @@ CONFIG_AT91_CF=y ...@@ -169,7 +169,6 @@ CONFIG_AT91_CF=y
# Kernel Features # Kernel Features
# #
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
......
...@@ -160,7 +160,6 @@ CONFIG_ISA_DMA_API=y ...@@ -160,7 +160,6 @@ CONFIG_ISA_DMA_API=y
# Kernel Features # Kernel Features
# #
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
......
...@@ -220,7 +220,6 @@ CONFIG_CPU_CP15_MMU=y ...@@ -220,7 +220,6 @@ CONFIG_CPU_CP15_MMU=y
# #
# CONFIG_TICK_ONESHOT is not set # CONFIG_TICK_ONESHOT is not set
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
...@@ -213,7 +213,6 @@ CONFIG_CPU_CP15_MMU=y ...@@ -213,7 +213,6 @@ CONFIG_CPU_CP15_MMU=y
# #
# CONFIG_TICK_ONESHOT is not set # CONFIG_TICK_ONESHOT is not set
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
...@@ -213,7 +213,6 @@ CONFIG_CPU_CP15_MMU=y ...@@ -213,7 +213,6 @@ CONFIG_CPU_CP15_MMU=y
# #
# CONFIG_TICK_ONESHOT is not set # CONFIG_TICK_ONESHOT is not set
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
...@@ -211,7 +211,6 @@ CONFIG_CPU_CP15_MMU=y ...@@ -211,7 +211,6 @@ CONFIG_CPU_CP15_MMU=y
# #
# CONFIG_TICK_ONESHOT is not set # CONFIG_TICK_ONESHOT is not set
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
...@@ -171,7 +171,6 @@ CONFIG_AT91_CF=m ...@@ -171,7 +171,6 @@ CONFIG_AT91_CF=m
# Kernel Features # Kernel Features
# #
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_NO_IDLE_HZ=y
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
...@@ -166,7 +166,6 @@ CONFIG_PCMCIA_SA1100=y ...@@ -166,7 +166,6 @@ CONFIG_PCMCIA_SA1100=y
# Kernel Features # Kernel Features
# #
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
......
...@@ -165,7 +165,6 @@ CONFIG_PCMCIA_PXA2XX=y ...@@ -165,7 +165,6 @@ CONFIG_PCMCIA_PXA2XX=y
# Kernel Features # Kernel Features
# #
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
# CONFIG_NO_IDLE_HZ is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
......
...@@ -230,7 +230,6 @@ CONFIG_AT91_CF=y ...@@ -230,7 +230,6 @@ CONFIG_AT91_CF=y
# #
# CONFIG_TICK_ONESHOT is not set # CONFIG_TICK_ONESHOT is not set
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
...@@ -184,7 +184,6 @@ CONFIG_ARM_AMBA=y ...@@ -184,7 +184,6 @@ CONFIG_ARM_AMBA=y
# Kernel Features # Kernel Features
# #
# CONFIG_PREEMPT is not set # CONFIG_PREEMPT is not set
# CONFIG_NO_IDLE_HZ is not set
CONFIG_HZ=100 CONFIG_HZ=100
# CONFIG_AEABI is not set # CONFIG_AEABI is not set
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment