summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2006-04-14 06:39:54 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-14 06:39:54 +0000
commitc9cadd074271be3812dfc501d98ae93df22d7bd0 (patch)
tree5817ca1378e5e20cae845cfe0dfe48764529e6c5
parent5c26c1237a294e04c6a8542d11d15a4200f70a8a (diff)
ixp4xx-kernel: Removed obsolete patches, and refreshed patchset from the nslu2-linux kernel CVS repo.
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/10-mtdpart-redboot-fis-byteswap.patch70
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/40-rtc-class.patch2434
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/45-eeprom-new-notifier.patch209
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/45-eeprom-notifier.patch184
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/50-i2c-bus-ixp4xx-hwmon.patch14
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/70-artop-latency.patch27
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/75-dsmg600.patch40
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/82-nas100d-power.patch15
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/92-nas100d-mac.patch85
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/92-nslu2-mac.patch88
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/94-loft-setup.patch105
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/94-nas100d-setup.patch73
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/96-nslu2-leds.patch4
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/linux-2.6.16-i2c.patch13671
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.16/patch-2.6.16-rc4-ide218474
-rw-r--r--packages/linux/ixp4xx-kernel_2.6.16.bb16
16 files changed, 15929 insertions, 19580 deletions
diff --git a/packages/linux/ixp4xx-kernel/2.6.16/10-mtdpart-redboot-fis-byteswap.patch b/packages/linux/ixp4xx-kernel/2.6.16/10-mtdpart-redboot-fis-byteswap.patch
deleted file mode 100644
index 3fa0535abf..0000000000
--- a/packages/linux/ixp4xx-kernel/2.6.16/10-mtdpart-redboot-fis-byteswap.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-drivers/mtd/redboot.c: recognise a foreign byte sex partition table
-
-The RedBoot boot loader writes flash partition tables containing native
-byte sex 32 bit values. When booting an opposite byte sex kernel (e.g. an
-LE kernel from BE RedBoot) the current MTD driver fails to handle the
-partition table and therefore is unable to generate the correct partition
-map for the flash.
-
-The patch recognises that the FIS directory (the partition table) is
-byte-reversed by examining the partition table size, which is known to be
-one erase block (this is an assumption made elsewhere in redboot.c). If
-the size matches the erase block after byte swapping the value then
-byte-reversal is assumed, if not no further action is taken. The patched
-code is fail safe; should redboot.c be changed to support a partition table
-with a modified size field the test will fail and the partition table will
-be assumed to have the host byte sex.
-
-If byte-reversal is detected the patch byte swaps the remainder of the 32
-bit fields in the copy of the table; this copy is then used to set up the
-MTD partition map.
-
-Signed-off-by: John Bowler <jbowler@acm.org>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Modified slightly and
-Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-
-Index: drivers/mtd/redboot.c
-===================================================================
-RCS file: /home/cvs/mtd/drivers/mtd/redboot.c,v
-retrieving revision 1.18
-retrieving revision 1.19
-diff -u -p -r1.18 -r1.19
---- linux-2.6.15/drivers/mtd/redboot.c 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.15/drivers/mtd/redboot.c 1970-01-01 00:00:00.000000000 +0000
-@@ -89,8 +89,32 @@ static int parse_redboot_partitions(stru
- i = numslots;
- break;
- }
-- if (!memcmp(buf[i].name, "FIS directory", 14))
-+ if (!memcmp(buf[i].name, "FIS directory", 14)) {
-+ /* This is apparently the FIS directory entry for the
-+ * FIS directory itself. The FIS directory size is
-+ * one erase block; if the buf[i].size field is
-+ * swab32(erasesize) then we know we are looking at
-+ * a byte swapped FIS directory - swap all the entries!
-+ * (NOTE: this is 'size' not 'data_length'; size is
-+ * the full size of the entry.)
-+ */
-+ if (swab32(buf[i].size) == master->erasesize) {
-+ int j;
-+ for (j = 0; j < numslots && buf[j].name[0] != 0xff; ++j) {
-+ /* The unsigned long fields were written with the
-+ * wrong byte sex, name and pad have no byte sex.
-+ */
-+ swab32s(&buf[j].flash_base);
-+ swab32s(&buf[j].mem_base);
-+ swab32s(&buf[j].size);
-+ swab32s(&buf[j].entry_point);
-+ swab32s(&buf[j].data_length);
-+ swab32s(&buf[j].desc_cksum);
-+ swab32s(&buf[j].file_cksum);
-+ }
-+ }
- break;
-+ }
- }
- if (i == numslots) {
- /* Didn't find it */
-
-
diff --git a/packages/linux/ixp4xx-kernel/2.6.16/40-rtc-class.patch b/packages/linux/ixp4xx-kernel/2.6.16/40-rtc-class.patch
index 3cc84b2a9b..044bd3abc1 100644
--- a/packages/linux/ixp4xx-kernel/2.6.16/40-rtc-class.patch
+++ b/packages/linux/ixp4xx-kernel/2.6.16/40-rtc-class.patch
@@ -1,6 +1,365 @@
---- linux-rtc.orig/include/linux/rtc.h 2006-02-19 23:33:10.000000000 +0100
-+++ linux-rtc/include/linux/rtc.h 2006-02-19 23:33:15.000000000 +0100
-@@ -93,8 +93,97 @@ struct rtc_pll_info {
+---
+ CREDITS | 5
+ MAINTAINERS | 6
+ arch/arm/Kconfig | 3
+ arch/arm/common/rtctime.c | 108 --
+ arch/arm/mach-integrator/time.c | 16
+ arch/arm/mach-pxa/generic.c | 6
+ arch/arm/mach-sa1100/generic.c | 6
+ arch/mips/ddb5xxx/common/rtc_ds1386.c | 4
+ arch/mips/dec/time.c | 4
+ arch/mips/ite-boards/generic/time.c | 4
+ arch/mips/jmr3927/common/rtc_ds1742.c | 4
+ arch/mips/kernel/time.c | 22
+ arch/mips/lasat/setup.c | 4
+ arch/mips/mips-boards/atlas/atlas_setup.c | 2
+ arch/mips/mips-boards/malta/malta_setup.c | 2
+ arch/mips/momentum/jaguar_atx/setup.c | 4
+ arch/mips/momentum/ocelot_3/setup.c | 4
+ arch/mips/momentum/ocelot_c/setup.c | 4
+ arch/mips/pmc-sierra/yosemite/setup.c | 4
+ arch/mips/sgi-ip22/ip22-time.c | 4
+ arch/mips/sgi-ip32/ip32-setup.c | 4
+ arch/mips/sibyte/swarm/setup.c | 8
+ arch/mips/sni/setup.c | 4
+ arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c | 4
+ arch/mips/tx4938/common/rtc_rx5c348.c | 4
+ drivers/Kconfig | 2
+ drivers/Makefile | 1
+ drivers/char/Kconfig | 2
+ drivers/i2c/chips/Kconfig | 18
+ drivers/i2c/chips/Makefile | 2
+ drivers/i2c/chips/rtc8564.c | 385 -------
+ drivers/i2c/chips/rtc8564.h | 78 -
+ drivers/i2c/chips/x1205.c | 698 -------------
+ drivers/rtc/Kconfig | 156 ++
+ drivers/rtc/Makefile | 20
+ drivers/rtc/class.c | 145 ++
+ drivers/rtc/hctosys.c | 69 +
+ drivers/rtc/interface.c | 277 +++++
+ drivers/rtc/rtc-dev.c | 382 +++++++
+ drivers/rtc/rtc-ds1672.c | 233 ++++
+ drivers/rtc/rtc-ep93xx.c | 163 +++
+ drivers/rtc/rtc-lib.c | 99 +
+ drivers/rtc/rtc-pcf8563.c | 355 ++++++
+ drivers/rtc/rtc-proc.c | 162 +++
+ drivers/rtc/rtc-rs5c372.c | 295 +++++
+ drivers/rtc/rtc-sa1100.c | 392 +++++++
+ drivers/rtc/rtc-sysfs.c | 124 ++
+ drivers/rtc/rtc-test.c | 205 +++
+ drivers/rtc/rtc-x1205.c | 619 +++++++++++
+ include/asm-arm/rtc.h | 3
+ include/asm-mips/time.h | 12
+ include/linux/rtc.h | 92 +
+ include/linux/x1205.h | 31
+ 53 files changed, 3888 insertions(+), 1372 deletions(-)
+
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-ixp4xx/drivers/rtc/rtc-lib.c 2006-03-08 01:59:26.000000000 +0100
+@@ -0,0 +1,99 @@
++/*
++ * rtc and date/time utility functions
++ *
++ * Copyright (C) 2005-06 Tower Technologies
++ * Author: Alessandro Zummo <a.zummo@towertech.it>
++ *
++ * based on arch/arm/common/rtctime.c and other bits
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; version 2 of the License.
++*/
++
++#include <linux/module.h>
++#include <linux/rtc.h>
++
++static const unsigned char rtc_days_in_month[] = {
++ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
++};
++
++#define LEAPS_THRU_END_OF(y) ((y)/4 - (y)/100 + (y)/400)
++#define LEAP_YEAR(year) ((!(year % 4) && (year % 100)) || !(year % 400))
++
++int rtc_month_days(unsigned int month, unsigned int year)
++{
++ return rtc_days_in_month[month] + (LEAP_YEAR(year) && month == 1);
++}
++EXPORT_SYMBOL(rtc_month_days);
++
++/*
++ * Convert seconds since 01-01-1970 00:00:00 to Gregorian date.
++ */
++void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
++{
++ register int days, month, year;
++
++ days = time / 86400;
++ time -= days * 86400;
++
++ /* day of the week, 1970-01-01 was a Thursday */
++ tm->tm_wday = (days + 4) % 7;
++
++ year = 1970 + days / 365;
++ days -= (year - 1970) * 365
++ + LEAPS_THRU_END_OF(year - 1)
++ - LEAPS_THRU_END_OF(1970 - 1);
++ if (days < 0) {
++ year -= 1;
++ days += 365 + LEAP_YEAR(year);
++ }
++ tm->tm_year = year - 1900;
++ tm->tm_yday = days + 1;
++
++ for (month = 0; month < 11; month++) {
++ int newdays;
++
++ newdays = days - rtc_month_days(month, year);
++ if (newdays < 0)
++ break;
++ days = newdays;
++ }
++ tm->tm_mon = month;
++ tm->tm_mday = days + 1;
++
++ tm->tm_hour = time / 3600;
++ time -= tm->tm_hour * 3600;
++ tm->tm_min = time / 60;
++ tm->tm_sec = time - tm->tm_min * 60;
++}
++EXPORT_SYMBOL(rtc_time_to_tm);
++
++/*
++ * Does the rtc_time represent a valid date/time?
++ */
++int rtc_valid_tm(struct rtc_time *tm)
++{
++ if (tm->tm_year < 70
++ || tm->tm_mon >= 12
++ || tm->tm_mday < 1
++ || tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900)
++ || tm->tm_hour >= 24
++ || tm->tm_min >= 60
++ || tm->tm_sec >= 60)
++ return -EINVAL;
++
++ return 0;
++}
++EXPORT_SYMBOL(rtc_valid_tm);
++
++/*
++ * Convert Gregorian date to seconds since 01-01-1970 00:00:00.
++ */
++int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time)
++{
++ *time = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
++ tm->tm_hour, tm->tm_min, tm->tm_sec);
++ return 0;
++}
++EXPORT_SYMBOL(rtc_tm_to_time);
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-ixp4xx/drivers/rtc/Makefile 2006-03-08 01:59:26.000000000 +0100
+@@ -0,0 +1,20 @@
++#
++# Makefile for RTC class/drivers.
++#
++
++obj-$(CONFIG_RTC_LIB) += rtc-lib.o
++obj-$(CONFIG_RTC_HCTOSYS) += hctosys.o
++obj-$(CONFIG_RTC_CLASS) += rtc-core.o
++rtc-core-y := class.o interface.o
++
++obj-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o
++obj-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o
++obj-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o
++
++obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
++obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
++obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o
++obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o
++obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o
++obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
++obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-ixp4xx/drivers/rtc/Kconfig 2006-03-08 01:59:26.000000000 +0100
+@@ -0,0 +1,156 @@
++\#
++# RTC class/drivers configuration
++#
++
++menu "Real Time Clock"
++
++config RTC_LIB
++ bool
++
++config RTC_CLASS
++ tristate "RTC class"
++ depends on EXPERIMENTAL
++ default n
++ select RTC_LIB
++ help
++ Generic RTC class support. If you say yes here, you will
++ be allowed to plug one or more RTCs to your system. You will
++ probably want to enable one of more of the interfaces below.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-class.
++
++config RTC_HCTOSYS
++ bool "Set system time from RTC on startup"
++ depends on RTC_CLASS = y
++ default y
++ help
++ If you say yes here, the system time will be set using
++ the value read from the specified RTC device. This is useful
++ in order to avoid unnecessary fschk runs.
++
++config RTC_HCTOSYS_DEVICE
++ string "The RTC to read the time from"
++ depends on RTC_HCTOSYS = y
++ default "rtc0"
++ help
++ The RTC device that will be used as the source for
++ the system time, usually rtc0.
++
++comment "RTC interfaces"
++ depends on RTC_CLASS
++
++config RTC_INTF_SYSFS
++ tristate "sysfs"
++ depends on RTC_CLASS && SYSFS
++ default RTC_CLASS
++ help
++ Say yes here if you want to use your RTC using the sysfs
++ interface, /sys/class/rtc/rtcX .
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-sysfs.
++
++config RTC_INTF_PROC
++ tristate "proc"
++ depends on RTC_CLASS && PROC_FS
++ default RTC_CLASS
++ help
++ Say yes here if you want to use your RTC using the proc
++ interface, /proc/driver/rtc .
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-proc.
++
++config RTC_INTF_DEV
++ tristate "dev"
++ depends on RTC_CLASS
++ default RTC_CLASS
++ help
++ Say yes here if you want to use your RTC using the dev
++ interface, /dev/rtc .
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-dev.
++
++comment "RTC drivers"
++ depends on RTC_CLASS
++
++config RTC_DRV_X1205
++ tristate "Xicor/Intersil X1205 RTC chip"
++ depends on RTC_CLASS && I2C
++ help
++ If you say yes here you get support for the
++ Xicor/Intersil X1205 RTC chip.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-x1205.
++
++config RTC_DRV_DS1672
++ tristate "Dallas/Maxim DS1672"
++ depends on RTC_CLASS && I2C
++ help
++ If you say yes here you get support for the
++ Dallas/Maxim DS1672 timekeeping chip.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-ds1672.
++
++config RTC_DRV_PCF8563
++ tristate "Philips PCF8563/Epson RTC8564"
++ depends on RTC_CLASS && I2C
++ help
++ If you say yes here you get support for the
++ Philips PCF8563 RTC chip. The Epson RTC8564
++ should work as well.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-pcf8563.
++
++config RTC_DRV_RS5C372
++ tristate "Ricoh RS5C372A/B"
++ depends on RTC_CLASS && I2C
++ help
++ If you say yes here you get support for the
++ Ricoh RS5C372A and RS5C372B RTC chips.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-rs5c372.
++
++config RTC_DRV_EP93XX
++ tristate "Cirrus Logic EP93XX"
++ depends on RTC_CLASS && ARCH_EP93XX
++ help
++ If you say yes here you get support for the
++ RTC embedded in the Cirrus Logic EP93XX processors.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-ep93xx.
++
++
++config RTC_DRV_SA1100
++ bool "SA11x0/PXA2xx RTC support"
++ depends on ARCH_SA1100 || ARCH_PXA
++ help
++ If you say Y here you will get access to the real time clock
++ built into your SA11x0 or PXA2xx CPU.
++
++ To compile this driver as a module, choose M here: the
++ module will be called rtc-sa1100.
++
++config RTC_DRV_TEST
++ tristate "Test driver/device"
++ depends on RTC_CLASS
++ help
++ If you say yes here you get support for the
++ RTC test driver. It's a software RTC which can be
++ used to test the RTC subsystem APIs. It gets
++ the time from the system clock.
++ You want this driver only if you are doing development
++ on the RTC subsystem. Please read the source code
++ for further details.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-test.
++
++endmenu
+--- linux-ixp4xx.orig/drivers/Kconfig 2006-03-08 01:59:18.000000000 +0100
++++ linux-ixp4xx/drivers/Kconfig 2006-03-08 01:59:26.000000000 +0100
+@@ -72,4 +72,6 @@ source "drivers/sn/Kconfig"
+
+ source "drivers/edac/Kconfig"
+
++source "drivers/rtc/Kconfig"
++
+ endmenu
+--- linux-ixp4xx.orig/drivers/Makefile 2006-03-08 01:59:18.000000000 +0100
++++ linux-ixp4xx/drivers/Makefile 2006-03-08 01:59:26.000000000 +0100
+@@ -56,6 +56,7 @@ obj-$(CONFIG_USB_GADGET) += usb/gadget/
+ obj-$(CONFIG_GAMEPORT) += input/gameport/
+ obj-$(CONFIG_INPUT) += input/
+ obj-$(CONFIG_I2O) += message/
++obj-$(CONFIG_RTC_LIB) += rtc/
+ obj-$(CONFIG_I2C) += i2c/
+ obj-$(CONFIG_W1) += w1/
+ obj-$(CONFIG_HWMON) += hwmon/
+--- linux-ixp4xx.orig/include/linux/rtc.h 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/include/linux/rtc.h 2006-03-08 01:59:26.000000000 +0100
+@@ -93,8 +93,100 @@ struct rtc_pll_info {
#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */
#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */
@@ -12,12 +371,19 @@
+
#ifdef __KERNEL__
++extern int rtc_month_days(unsigned int month, unsigned int year);
++extern int rtc_valid_tm(struct rtc_time *tm);
++extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time);
++extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm);
++
+#include <linux/device.h>
+#include <linux/seq_file.h>
+#include <linux/cdev.h>
+#include <linux/poll.h>
+#include <linux/mutex.h>
+
++extern struct class *rtc_class;
++
+struct rtc_class_ops {
+ int (*open)(struct device *);
+ void (*release)(struct device *);
@@ -47,6 +413,7 @@
+ struct rtc_class_ops *ops;
+ struct mutex ops_lock;
+
++ struct class_device *rtc_dev;
+ struct cdev char_dev;
+ struct mutex char_lock;
+
@@ -68,11 +435,6 @@
+extern void rtc_device_unregister(struct rtc_device *rdev);
+extern int rtc_interface_register(struct class_interface *intf);
+
-+extern int rtc_month_days(unsigned int month, unsigned int year);
-+extern int rtc_valid_tm(struct rtc_time *tm);
-+extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time);
-+extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm);
-+
+extern int rtc_read_time(struct class_device *class_dev, struct rtc_time *tm);
+extern int rtc_set_time(struct class_device *class_dev, struct rtc_time *tm);
+extern int rtc_set_mmss(struct class_device *class_dev, unsigned long secs);
@@ -98,28 +460,609 @@
typedef struct rtc_task {
void (*func)(void *private_data);
void *private_data;
---- linux-rtc.orig/drivers/Kconfig 2006-02-19 23:33:10.000000000 +0100
-+++ linux-rtc/drivers/Kconfig 2006-02-19 23:33:15.000000000 +0100
-@@ -70,4 +70,6 @@ source "drivers/sn/Kconfig"
+--- linux-ixp4xx.orig/arch/arm/common/rtctime.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/arm/common/rtctime.c 2006-03-08 01:59:26.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include <linux/capability.h>
+ #include <linux/device.h>
+ #include <linux/mutex.h>
++#include <linux/rtc.h>
- source "drivers/edac/Kconfig"
+ #include <asm/rtc.h>
+ #include <asm/semaphore.h>
+@@ -42,89 +43,6 @@ static struct rtc_ops *rtc_ops;
+
+ #define rtc_epoch 1900UL
+
+-static const unsigned char days_in_month[] = {
+- 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+-};
+-
+-#define LEAPS_THRU_END_OF(y) ((y)/4 - (y)/100 + (y)/400)
+-#define LEAP_YEAR(year) ((!(year % 4) && (year % 100)) || !(year % 400))
+-
+-static int month_days(unsigned int month, unsigned int year)
+-{
+- return days_in_month[month] + (LEAP_YEAR(year) && month == 1);
+-}
+-
+-/*
+- * Convert seconds since 01-01-1970 00:00:00 to Gregorian date.
+- */
+-void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
+-{
+- int days, month, year;
+-
+- days = time / 86400;
+- time -= days * 86400;
+-
+- tm->tm_wday = (days + 4) % 7;
+-
+- year = 1970 + days / 365;
+- days -= (year - 1970) * 365
+- + LEAPS_THRU_END_OF(year - 1)
+- - LEAPS_THRU_END_OF(1970 - 1);
+- if (days < 0) {
+- year -= 1;
+- days += 365 + LEAP_YEAR(year);
+- }
+- tm->tm_year = year - 1900;
+- tm->tm_yday = days + 1;
+-
+- for (month = 0; month < 11; month++) {
+- int newdays;
+-
+- newdays = days - month_days(month, year);
+- if (newdays < 0)
+- break;
+- days = newdays;
+- }
+- tm->tm_mon = month;
+- tm->tm_mday = days + 1;
+-
+- tm->tm_hour = time / 3600;
+- time -= tm->tm_hour * 3600;
+- tm->tm_min = time / 60;
+- tm->tm_sec = time - tm->tm_min * 60;
+-}
+-EXPORT_SYMBOL(rtc_time_to_tm);
+-
+-/*
+- * Does the rtc_time represent a valid date/time?
+- */
+-int rtc_valid_tm(struct rtc_time *tm)
+-{
+- if (tm->tm_year < 70 ||
+- tm->tm_mon >= 12 ||
+- tm->tm_mday < 1 ||
+- tm->tm_mday > month_days(tm->tm_mon, tm->tm_year + 1900) ||
+- tm->tm_hour >= 24 ||
+- tm->tm_min >= 60 ||
+- tm->tm_sec >= 60)
+- return -EINVAL;
+-
+- return 0;
+-}
+-EXPORT_SYMBOL(rtc_valid_tm);
+-
+-/*
+- * Convert Gregorian date to seconds since 01-01-1970 00:00:00.
+- */
+-int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time)
+-{
+- *time = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+- tm->tm_hour, tm->tm_min, tm->tm_sec);
+-
+- return 0;
+-}
+-EXPORT_SYMBOL(rtc_tm_to_time);
+-
+ /*
+ * Calculate the next alarm time given the requested alarm time mask
+ * and the current time.
+@@ -151,13 +69,13 @@ void rtc_next_alarm_time(struct rtc_time
+ }
+ }
+
+-static inline int rtc_read_time(struct rtc_ops *ops, struct rtc_time *tm)
++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_set_time(struct rtc_ops *ops, struct rtc_time *tm)
++static inline int rtc_arm_set_time(struct rtc_ops *ops, struct rtc_time *tm)
+ {
+ int ret;
+
+@@ -168,7 +86,7 @@ static inline int rtc_set_time(struct rt
+ return ret;
+ }
+
+-static inline int rtc_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
++static inline int rtc_arm_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
+ {
+ int ret = -EINVAL;
+ if (ops->read_alarm) {
+@@ -178,7 +96,7 @@ static inline int rtc_read_alarm(struct
+ return ret;
+ }
+
+-static inline int rtc_set_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
++static inline int rtc_arm_set_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm)
+ {
+ int ret = -EINVAL;
+ if (ops->set_alarm)
+@@ -266,7 +184,7 @@ static int rtc_ioctl(struct inode *inode
+
+ switch (cmd) {
+ case RTC_ALM_READ:
+- ret = rtc_read_alarm(ops, &alrm);
++ ret = rtc_arm_read_alarm(ops, &alrm);
+ if (ret)
+ break;
+ ret = copy_to_user(uarg, &alrm.time, sizeof(tm));
+@@ -288,11 +206,11 @@ static int rtc_ioctl(struct inode *inode
+ alrm.time.tm_wday = -1;
+ alrm.time.tm_yday = -1;
+ alrm.time.tm_isdst = -1;
+- ret = rtc_set_alarm(ops, &alrm);
++ ret = rtc_arm_set_alarm(ops, &alrm);
+ break;
+
+ case RTC_RD_TIME:
+- ret = rtc_read_time(ops, &tm);
++ ret = rtc_arm_read_time(ops, &tm);
+ if (ret)
+ break;
+ ret = copy_to_user(uarg, &tm, sizeof(tm));
+@@ -310,7 +228,7 @@ static int rtc_ioctl(struct inode *inode
+ ret = -EFAULT;
+ break;
+ }
+- ret = rtc_set_time(ops, &tm);
++ ret = rtc_arm_set_time(ops, &tm);
+ break;
+
+ case RTC_EPOCH_SET:
+@@ -341,11 +259,11 @@ static int rtc_ioctl(struct inode *inode
+ ret = -EFAULT;
+ break;
+ }
+- ret = rtc_set_alarm(ops, &alrm);
++ ret = rtc_arm_set_alarm(ops, &alrm);
+ break;
+
+ case RTC_WKALM_RD:
+- ret = rtc_read_alarm(ops, &alrm);
++ ret = rtc_arm_read_alarm(ops, &alrm);
+ if (ret)
+ break;
+ ret = copy_to_user(uarg, &alrm, sizeof(alrm));
+@@ -435,7 +353,7 @@ static int rtc_read_proc(char *page, cha
+ struct rtc_time tm;
+ char *p = page;
+
+- if (rtc_read_time(ops, &tm) == 0) {
++ 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"
+@@ -445,7 +363,7 @@ static int rtc_read_proc(char *page, cha
+ rtc_epoch);
+ }
+
+- if (rtc_read_alarm(ops, &alrm) == 0) {
++ 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);
+--- linux-ixp4xx.orig/include/asm-arm/rtc.h 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/include/asm-arm/rtc.h 2006-03-08 01:59:26.000000000 +0100
+@@ -25,9 +25,6 @@ struct rtc_ops {
+ int (*proc)(char *buf);
+ };
+
+-void rtc_time_to_tm(unsigned long, struct rtc_time *);
+-int rtc_tm_to_time(struct rtc_time *, unsigned long *);
+-int rtc_valid_tm(struct rtc_time *);
+ void rtc_next_alarm_time(struct rtc_time *, struct rtc_time *, struct rtc_time *);
+ void rtc_update(unsigned long, unsigned long);
+ int register_rtc(struct rtc_ops *);
+--- linux-ixp4xx.orig/drivers/char/Kconfig 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/drivers/char/Kconfig 2006-03-08 01:59:26.000000000 +0100
+@@ -695,7 +695,7 @@ config NVRAM
+
+ config RTC
+ tristate "Enhanced Real Time Clock Support"
+- depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV
++ depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) && !FRV && !ARM
+ ---help---
+ If you say Y here and create a character special file /dev/rtc with
+ major number 10 and minor number 135 using mknod ("man mknod"), you
+--- linux-ixp4xx.orig/arch/arm/Kconfig 2006-03-08 01:59:18.000000000 +0100
++++ linux-ixp4xx/arch/arm/Kconfig 2006-03-08 01:59:26.000000000 +0100
+@@ -8,6 +8,7 @@ mainmenu "Linux Kernel Configuration"
+ config ARM
+ bool
+ default y
++ select RTC_LIB
+ help
+ The ARM series is a line of low-power-consumption RISC chip designs
+ licensed by ARM Ltd and targeted at embedded applications and
+@@ -819,6 +820,8 @@ source "drivers/usb/Kconfig"
+
+ source "drivers/mmc/Kconfig"
+source "drivers/rtc/Kconfig"
+
endmenu
---- linux-rtc.orig/drivers/Makefile 2006-02-19 23:33:10.000000000 +0100
-+++ linux-rtc/drivers/Makefile 2006-02-19 23:33:15.000000000 +0100
-@@ -56,6 +56,7 @@ obj-$(CONFIG_USB_GADGET) += usb/gadget/
- obj-$(CONFIG_GAMEPORT) += input/gameport/
- obj-$(CONFIG_INPUT) += input/
- obj-$(CONFIG_I2O) += message/
-+obj-y += rtc/
- obj-$(CONFIG_I2C) += i2c/
- obj-$(CONFIG_W1) += w1/
- obj-$(CONFIG_HWMON) += hwmon/
+
+ source "fs/Kconfig"
+--- linux-ixp4xx.orig/arch/arm/mach-integrator/time.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/arm/mach-integrator/time.c 2006-03-08 01:59:26.000000000 +0100
+@@ -40,13 +40,13 @@ static int integrator_set_rtc(void)
+ return 1;
+ }
+
+-static int rtc_read_alarm(struct rtc_wkalrm *alrm)
++static int integrator_rtc_read_alarm(struct rtc_wkalrm *alrm)
+ {
+ rtc_time_to_tm(readl(rtc_base + RTC_MR), &alrm->time);
+ return 0;
+ }
+
+-static inline int rtc_set_alarm(struct rtc_wkalrm *alrm)
++static inline int integrator_rtc_set_alarm(struct rtc_wkalrm *alrm)
+ {
+ unsigned long time;
+ int ret;
+@@ -62,7 +62,7 @@ static inline int rtc_set_alarm(struct r
+ return ret;
+ }
+
+-static int rtc_read_time(struct rtc_time *tm)
++static int integrator_rtc_read_time(struct rtc_time *tm)
+ {
+ rtc_time_to_tm(readl(rtc_base + RTC_DR), tm);
+ return 0;
+@@ -76,7 +76,7 @@ static int rtc_read_time(struct rtc_time
+ * edge of the 1Hz clock, we must write the time one second
+ * in advance.
+ */
+-static inline int rtc_set_time(struct rtc_time *tm)
++static inline int integrator_rtc_set_time(struct rtc_time *tm)
+ {
+ unsigned long time;
+ int ret;
+@@ -90,10 +90,10 @@ static inline int rtc_set_time(struct rt
+
+ static struct rtc_ops rtc_ops = {
+ .owner = THIS_MODULE,
+- .read_time = rtc_read_time,
+- .set_time = rtc_set_time,
+- .read_alarm = rtc_read_alarm,
+- .set_alarm = rtc_set_alarm,
++ .read_time = integrator_rtc_read_time,
++ .set_time = integrator_rtc_set_time,
++ .read_alarm = integrator_rtc_read_alarm,
++ .set_alarm = integrator_rtc_set_alarm,
+ };
+
+ static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id,
+--- linux-ixp4xx.orig/arch/mips/ddb5xxx/common/rtc_ds1386.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/mips/ddb5xxx/common/rtc_ds1386.c 2006-03-08 01:59:26.000000000 +0100
+@@ -165,6 +165,6 @@ rtc_ds1386_init(unsigned long base)
+ WRITE_RTC(0xB, byte);
+
+ /* set the function pointers */
+- rtc_get_time = rtc_ds1386_get_time;
+- rtc_set_time = rtc_ds1386_set_time;
++ rtc_mips_get_time = rtc_ds1386_get_time;
++ rtc_mips_set_time = rtc_ds1386_set_time;
+ }
+--- linux-ixp4xx.orig/arch/mips/dec/time.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/mips/dec/time.c 2006-03-08 01:59:26.000000000 +0100
+@@ -193,8 +193,8 @@ static void dec_ioasic_hpt_init(unsigned
+
+ void __init dec_time_init(void)
+ {
+- rtc_get_time = dec_rtc_get_time;
+- rtc_set_mmss = dec_rtc_set_mmss;
++ rtc_mips_get_time = dec_rtc_get_time;
++ rtc_mips_set_mmss = dec_rtc_set_mmss;
+
+ mips_timer_state = dec_timer_state;
+ mips_timer_ack = dec_timer_ack;
+--- linux-ixp4xx.orig/arch/mips/ite-boards/generic/time.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/mips/ite-boards/generic/time.c 2006-03-08 01:59:26.000000000 +0100
+@@ -227,8 +227,8 @@ void __init it8172_time_init(void)
+
+ local_irq_restore(flags);
+
+- rtc_get_time = it8172_rtc_get_time;
+- rtc_set_time = it8172_rtc_set_time;
++ rtc_mips_get_time = it8172_rtc_get_time;
++ rtc_mips_set_time = it8172_rtc_set_time;
+ }
+
+ #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
+--- linux-ixp4xx.orig/arch/mips/jmr3927/common/rtc_ds1742.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/mips/jmr3927/common/rtc_ds1742.c 2006-03-08 01:59:26.000000000 +0100
+@@ -159,8 +159,8 @@ rtc_ds1742_init(unsigned long base)
+ db_assert((rtc_base & 0xe0000000) == KSEG1);
+
+ /* set the function pointers */
+- rtc_get_time = rtc_ds1742_get_time;
+- rtc_set_time = rtc_ds1742_set_time;
++ rtc_mips_get_time = rtc_ds1742_get_time;
++ rtc_mips_set_time = rtc_ds1742_set_time;
+
+ /* clear oscillator stop bit */
+ CMOS_WRITE(RTC_READ, RTC_CONTROL);
+--- linux-ixp4xx.orig/arch/mips/kernel/time.c 2006-03-08 01:59:09.000000000 +0100
++++ linux-ixp4xx/arch/mips/kernel/time.c 2006-03-08 01:59:26.000000000 +0100
+@@ -65,9 +65,9 @@ static int null_rtc_set_time(unsigned lo
+ return 0;
+ }
+
+-unsigned long (*rtc_get_time)(void) = null_rtc_get_time;
+-int (*rtc_set_time)(unsigned long) = null_rtc_set_time;
+-int (*rtc_set_mmss)(unsigned long);
++unsigned long (*rtc_mips_get_time)(void) = null_rtc_get_time;
++int (*rtc_mips_set_time)(unsigned long) = null_rtc_set_time;
++int (*rtc_mips_set_mmss)(unsigned long);
+
+
+ /* usecs per counter cycle, shifted to left by 32 bits */
+@@ -438,7 +438,7 @@ irqreturn_t timer_interrupt(int irq, voi
+
+ /*
+ * If we have an externally synchronized Linux clock, then update
+- * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be
++ * CMOS clock accordingly every ~11 minutes. rtc_mips_set_time() has to be
+ * called as close as possible to 500 ms before the new second starts.
+ */
+ write_seqlock(&xtime_lock);
+@@ -446,7 +446,7 @@ irqreturn_t timer_interrupt(int irq, voi
+ xtime.tv_sec > last_rtc_update + 660 &&
+ (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
+ (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
+- if (rtc_set_mmss(xtime.tv_sec) == 0) {
++ if (rtc_mips_set_mmss(xtime.tv_sec) == 0) {
+ last_rtc_update = xtime.tv_sec;
+ } else {
+ /* do it again in 60 s */
+@@ -563,7 +563,7 @@ asmlinkage void ll_local_timer_interrupt
+ * b) (optional) calibrate and set the mips_hpt_frequency
+ * (only needed if you intended to use fixed_rate_gettimeoffset
+ * or use cpu counter as timer interrupt source)
+- * 2) setup xtime based on rtc_get_time().
++ * 2) setup xtime based on rtc_mips