aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-13 23:49:48 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-14 00:36:08 -0500
commit3136254ca5dfaf53486f7032c674f9b6d7fd1d53 (patch)
tree101934218e83511dc2783e02d1a458ec85d98da9 /arch/powerpc
parent0c37ec2aa88bd8a6aaeb284ff5c86f4c6d8e8469 (diff)
[PATCH] powerpc: kill ppc64 rtc.c, use genrtc instead
This moves the rtas RTC callbacks to rtas-rtc.c in arch/powerpc/kernel, and kills the rest of arch/ppc64/kernel/rtc.c which was just a duplicate of the genrtc functionality. Also enable build of genrtc for CONFIG_PPC64 (it just works are we already have the required callbacks) and enable it in all defconfigs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/configs/pseries_defconfig206
-rw-r--r--arch/powerpc/kernel/Makefile2
-rw-r--r--arch/powerpc/kernel/rtas-rtc.c105
-rw-r--r--arch/powerpc/platforms/powermac/time.c2
4 files changed, 238 insertions, 77 deletions
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 9f09dff9e11a..913962c1dae0 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -1,18 +1,33 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc4 3# Linux kernel version: 2.6.15-rc1
4# Thu Oct 20 08:32:17 2005 4# Mon Nov 14 15:27:00 2005
5# 5#
6CONFIG_PPC64=y
6CONFIG_64BIT=y 7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y
7CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 11CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 12CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 13CONFIG_PPC=y
11CONFIG_EARLY_PRINTK=y 14CONFIG_EARLY_PRINTK=y
12CONFIG_COMPAT=y 15CONFIG_COMPAT=y
16CONFIG_SYSVIPC_COMPAT=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 17CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y 18CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 19
20#
21# Processor support
22#
23# CONFIG_POWER4_ONLY is not set
24CONFIG_POWER3=y
25CONFIG_POWER4=y
26CONFIG_PPC_FPU=y
27CONFIG_ALTIVEC=y
28CONFIG_PPC_STD_MMU=y
29CONFIG_SMP=y
30CONFIG_NR_CPUS=128
16 31
17# 32#
18# Code maturity level options 33# Code maturity level options
@@ -68,75 +83,103 @@ CONFIG_MODVERSIONS=y
68CONFIG_MODULE_SRCVERSION_ALL=y 83CONFIG_MODULE_SRCVERSION_ALL=y
69CONFIG_KMOD=y 84CONFIG_KMOD=y
70CONFIG_STOP_MACHINE=y 85CONFIG_STOP_MACHINE=y
71CONFIG_SYSVIPC_COMPAT=y 86
87#
88# Block layer
89#
90
91#
92# IO Schedulers
93#
94CONFIG_IOSCHED_NOOP=y
95CONFIG_IOSCHED_AS=y
96CONFIG_IOSCHED_DEADLINE=y
97CONFIG_IOSCHED_CFQ=y
98CONFIG_DEFAULT_AS=y
99# CONFIG_DEFAULT_DEADLINE is not set
100# CONFIG_DEFAULT_CFQ is not set
101# CONFIG_DEFAULT_NOOP is not set
102CONFIG_DEFAULT_IOSCHED="anticipatory"
72 103
73# 104#
74# Platform support 105# Platform support
75# 106#
76# CONFIG_PPC_ISERIES is not set
77CONFIG_PPC_MULTIPLATFORM=y 107CONFIG_PPC_MULTIPLATFORM=y
108# CONFIG_PPC_ISERIES is not set
109# CONFIG_EMBEDDED6xx is not set
110# CONFIG_APUS is not set
78CONFIG_PPC_PSERIES=y 111CONFIG_PPC_PSERIES=y
79# CONFIG_PPC_BPA is not set
80# CONFIG_PPC_PMAC is not set 112# CONFIG_PPC_PMAC is not set
81# CONFIG_PPC_MAPLE is not set 113# CONFIG_PPC_MAPLE is not set
82CONFIG_PPC=y 114# CONFIG_PPC_CELL is not set
83CONFIG_PPC64=y
84CONFIG_PPC_OF=y 115CONFIG_PPC_OF=y
85CONFIG_XICS=y 116CONFIG_XICS=y
117# CONFIG_U3_DART is not set
86CONFIG_MPIC=y 118CONFIG_MPIC=y
87CONFIG_ALTIVEC=y 119CONFIG_PPC_RTAS=y
88CONFIG_PPC_SPLPAR=y 120CONFIG_RTAS_ERROR_LOGGING=y
89CONFIG_KEXEC=y 121CONFIG_RTAS_PROC=y
122CONFIG_RTAS_FLASH=m
123# CONFIG_MMIO_NVRAM is not set
90CONFIG_IBMVIO=y 124CONFIG_IBMVIO=y
91# CONFIG_U3_DART is not set 125# CONFIG_PPC_MPC106 is not set
92# CONFIG_BOOTX_TEXT is not set 126# CONFIG_GENERIC_TBSYNC is not set
93# CONFIG_POWER4_ONLY is not set 127# CONFIG_CPU_FREQ is not set
128# CONFIG_WANT_EARLY_SERIAL is not set
129
130#
131# Kernel options
132#
133# CONFIG_HZ_100 is not set
134CONFIG_HZ_250=y
135# CONFIG_HZ_1000 is not set
136CONFIG_HZ=250
137CONFIG_PREEMPT_NONE=y
138# CONFIG_PREEMPT_VOLUNTARY is not set
139# CONFIG_PREEMPT is not set
140# CONFIG_PREEMPT_BKL is not set
141CONFIG_BINFMT_ELF=y
142# CONFIG_BINFMT_MISC is not set
143CONFIG_FORCE_MAX_ZONEORDER=13
94CONFIG_IOMMU_VMERGE=y 144CONFIG_IOMMU_VMERGE=y
95CONFIG_SMP=y 145CONFIG_HOTPLUG_CPU=y
96CONFIG_NR_CPUS=128 146CONFIG_KEXEC=y
147# CONFIG_IRQ_ALL_CPUS is not set
148CONFIG_PPC_SPLPAR=y
149CONFIG_EEH=y
150CONFIG_SCANLOG=m
151CONFIG_LPARCFG=y
152CONFIG_NUMA=y
97CONFIG_ARCH_SELECT_MEMORY_MODEL=y 153CONFIG_ARCH_SELECT_MEMORY_MODEL=y
98CONFIG_ARCH_FLATMEM_ENABLE=y
99CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
100CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
101CONFIG_ARCH_SPARSEMEM_ENABLE=y 154CONFIG_ARCH_SPARSEMEM_ENABLE=y
155CONFIG_ARCH_SPARSEMEM_DEFAULT=y
102CONFIG_SELECT_MEMORY_MODEL=y 156CONFIG_SELECT_MEMORY_MODEL=y
103# CONFIG_FLATMEM_MANUAL is not set 157# CONFIG_FLATMEM_MANUAL is not set
104CONFIG_DISCONTIGMEM_MANUAL=y 158# CONFIG_DISCONTIGMEM_MANUAL is not set
105# CONFIG_SPARSEMEM_MANUAL is not set 159CONFIG_SPARSEMEM_MANUAL=y
106CONFIG_DISCONTIGMEM=y 160CONFIG_SPARSEMEM=y
107CONFIG_FLAT_NODE_MEM_MAP=y
108CONFIG_NEED_MULTIPLE_NODES=y 161CONFIG_NEED_MULTIPLE_NODES=y
162CONFIG_HAVE_MEMORY_PRESENT=y
109# CONFIG_SPARSEMEM_STATIC is not set 163# CONFIG_SPARSEMEM_STATIC is not set
164CONFIG_SPARSEMEM_EXTREME=y
165# CONFIG_MEMORY_HOTPLUG is not set
166CONFIG_SPLIT_PTLOCK_CPUS=4096
110CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 167CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
111CONFIG_NODES_SPAN_OTHER_NODES=y 168CONFIG_NODES_SPAN_OTHER_NODES=y
112CONFIG_NUMA=y 169# CONFIG_PPC_64K_PAGES is not set
113CONFIG_SCHED_SMT=y 170CONFIG_SCHED_SMT=y
114CONFIG_PREEMPT_NONE=y
115# CONFIG_PREEMPT_VOLUNTARY is not set
116# CONFIG_PREEMPT is not set
117# CONFIG_PREEMPT_BKL is not set
118# CONFIG_HZ_100 is not set
119CONFIG_HZ_250=y
120# CONFIG_HZ_1000 is not set
121CONFIG_HZ=250
122CONFIG_EEH=y
123CONFIG_GENERIC_HARDIRQS=y
124CONFIG_PPC_RTAS=y
125CONFIG_RTAS_PROC=y
126CONFIG_RTAS_FLASH=m
127CONFIG_SCANLOG=m
128CONFIG_LPARCFG=y
129CONFIG_SECCOMP=y
130CONFIG_BINFMT_ELF=y
131# CONFIG_BINFMT_MISC is not set
132CONFIG_HOTPLUG_CPU=y
133CONFIG_PROC_DEVICETREE=y 171CONFIG_PROC_DEVICETREE=y
134# CONFIG_CMDLINE_BOOL is not set 172# CONFIG_CMDLINE_BOOL is not set
173# CONFIG_PM is not set
174CONFIG_SECCOMP=y
135CONFIG_ISA_DMA_API=y 175CONFIG_ISA_DMA_API=y
136 176
137# 177#
138# Bus Options 178# Bus options
139# 179#
180CONFIG_GENERIC_ISA_DMA=y
181CONFIG_PPC_I8259=y
182# CONFIG_PPC_INDIRECT_PCI is not set
140CONFIG_PCI=y 183CONFIG_PCI=y
141CONFIG_PCI_DOMAINS=y 184CONFIG_PCI_DOMAINS=y
142CONFIG_PCI_LEGACY_PROC=y 185CONFIG_PCI_LEGACY_PROC=y
@@ -156,6 +199,7 @@ CONFIG_HOTPLUG_PCI=m
156# CONFIG_HOTPLUG_PCI_SHPC is not set 199# CONFIG_HOTPLUG_PCI_SHPC is not set
157CONFIG_HOTPLUG_PCI_RPA=m 200CONFIG_HOTPLUG_PCI_RPA=m
158CONFIG_HOTPLUG_PCI_RPA_DLPAR=m 201CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
202CONFIG_KERNEL_START=0xc000000000000000
159 203
160# 204#
161# Networking 205# Networking
@@ -197,6 +241,10 @@ CONFIG_TCP_CONG_BIC=y
197# CONFIG_IPV6 is not set 241# CONFIG_IPV6 is not set
198CONFIG_NETFILTER=y 242CONFIG_NETFILTER=y
199# CONFIG_NETFILTER_DEBUG is not set 243# CONFIG_NETFILTER_DEBUG is not set
244
245#
246# Core Netfilter Configuration
247#
200CONFIG_NETFILTER_NETLINK=y 248CONFIG_NETFILTER_NETLINK=y
201CONFIG_NETFILTER_NETLINK_QUEUE=m 249CONFIG_NETFILTER_NETLINK_QUEUE=m
202CONFIG_NETFILTER_NETLINK_LOG=m 250CONFIG_NETFILTER_NETLINK_LOG=m
@@ -299,6 +347,10 @@ CONFIG_LLC=y
299# CONFIG_NET_DIVERT is not set 347# CONFIG_NET_DIVERT is not set
300# CONFIG_ECONET is not set 348# CONFIG_ECONET is not set
301# CONFIG_WAN_ROUTER is not set 349# CONFIG_WAN_ROUTER is not set
350
351#
352# QoS and/or fair queueing
353#
302# CONFIG_NET_SCHED is not set 354# CONFIG_NET_SCHED is not set
303CONFIG_NET_CLS_ROUTE=y 355CONFIG_NET_CLS_ROUTE=y
304 356
@@ -368,14 +420,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
368CONFIG_BLK_DEV_RAM_SIZE=65536 420CONFIG_BLK_DEV_RAM_SIZE=65536
369CONFIG_BLK_DEV_INITRD=y 421CONFIG_BLK_DEV_INITRD=y
370# CONFIG_CDROM_PKTCDVD is not set 422# CONFIG_CDROM_PKTCDVD is not set
371
372#
373# IO Schedulers
374#
375CONFIG_IOSCHED_NOOP=y
376CONFIG_IOSCHED_AS=y
377CONFIG_IOSCHED_DEADLINE=y
378CONFIG_IOSCHED_CFQ=y
379# CONFIG_ATA_OVER_ETH is not set 423# CONFIG_ATA_OVER_ETH is not set
380 424
381# 425#
@@ -473,6 +517,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m
473# 517#
474# SCSI low-level drivers 518# SCSI low-level drivers
475# 519#
520# CONFIG_ISCSI_TCP is not set
476# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 521# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
477# CONFIG_SCSI_3W_9XXX is not set 522# CONFIG_SCSI_3W_9XXX is not set
478# CONFIG_SCSI_ACARD is not set 523# CONFIG_SCSI_ACARD is not set
@@ -559,6 +604,7 @@ CONFIG_DM_MULTIPATH_EMC=m
559# 604#
560# Macintosh device drivers 605# Macintosh device drivers
561# 606#
607# CONFIG_WINDFARM is not set
562 608
563# 609#
564# Network device support 610# Network device support
@@ -645,7 +691,6 @@ CONFIG_IXGB=m
645# CONFIG_IXGB_NAPI is not set 691# CONFIG_IXGB_NAPI is not set
646CONFIG_S2IO=m 692CONFIG_S2IO=m
647# CONFIG_S2IO_NAPI is not set 693# CONFIG_S2IO_NAPI is not set
648# CONFIG_2BUFF_MODE is not set
649 694
650# 695#
651# Token Ring devices 696# Token Ring devices
@@ -674,6 +719,7 @@ CONFIG_PPP_ASYNC=m
674CONFIG_PPP_SYNC_TTY=m 719CONFIG_PPP_SYNC_TTY=m
675CONFIG_PPP_DEFLATE=m 720CONFIG_PPP_DEFLATE=m
676CONFIG_PPP_BSDCOMP=m 721CONFIG_PPP_BSDCOMP=m
722# CONFIG_PPP_MPPE is not set
677CONFIG_PPPOE=m 723CONFIG_PPPOE=m
678# CONFIG_SLIP is not set 724# CONFIG_SLIP is not set
679# CONFIG_NET_FC is not set 725# CONFIG_NET_FC is not set
@@ -784,6 +830,8 @@ CONFIG_HVCS=m
784# 830#
785# CONFIG_WATCHDOG is not set 831# CONFIG_WATCHDOG is not set
786# CONFIG_RTC is not set 832# CONFIG_RTC is not set
833CONFIG_GEN_RTC=y
834# CONFIG_GEN_RTC_X is not set
787# CONFIG_DTLK is not set 835# CONFIG_DTLK is not set
788# CONFIG_R3964 is not set 836# CONFIG_R3964 is not set
789# CONFIG_APPLICOM is not set 837# CONFIG_APPLICOM is not set
@@ -801,6 +849,7 @@ CONFIG_MAX_RAW_DEVS=1024
801# TPM devices 849# TPM devices
802# 850#
803# CONFIG_TCG_TPM is not set 851# CONFIG_TCG_TPM is not set
852# CONFIG_TELCLOCK is not set
804 853
805# 854#
806# I2C support 855# I2C support
@@ -852,6 +901,7 @@ CONFIG_I2C_ALGOBIT=y
852# CONFIG_SENSORS_PCF8591 is not set 901# CONFIG_SENSORS_PCF8591 is not set
853# CONFIG_SENSORS_RTC8564 is not set 902# CONFIG_SENSORS_RTC8564 is not set
854# CONFIG_SENSORS_MAX6875 is not set 903# CONFIG_SENSORS_MAX6875 is not set
904# CONFIG_RTC_X1205_I2C is not set
855# CONFIG_I2C_DEBUG_CORE is not set 905# CONFIG_I2C_DEBUG_CORE is not set
856# CONFIG_I2C_DEBUG_ALGO is not set 906# CONFIG_I2C_DEBUG_ALGO is not set
857# CONFIG_I2C_DEBUG_BUS is not set 907# CONFIG_I2C_DEBUG_BUS is not set
@@ -893,7 +943,6 @@ CONFIG_FB=y
893CONFIG_FB_CFB_FILLRECT=y 943CONFIG_FB_CFB_FILLRECT=y
894CONFIG_FB_CFB_COPYAREA=y 944CONFIG_FB_CFB_COPYAREA=y
895CONFIG_FB_CFB_IMAGEBLIT=y 945CONFIG_FB_CFB_IMAGEBLIT=y
896CONFIG_FB_SOFT_CURSOR=y
897CONFIG_FB_MACMODES=y 946CONFIG_FB_MACMODES=y
898CONFIG_FB_MODE_HELPERS=y 947CONFIG_FB_MODE_HELPERS=y
899CONFIG_FB_TILEBLITTING=y 948CONFIG_FB_TILEBLITTING=y
@@ -905,6 +954,7 @@ CONFIG_FB_OF=y
905# CONFIG_FB_ASILIANT is not set 954# CONFIG_FB_ASILIANT is not set
906# CONFIG_FB_IMSTT is not set 955# CONFIG_FB_IMSTT is not set
907# CONFIG_FB_VGA16 is not set 956# CONFIG_FB_VGA16 is not set
957# CONFIG_FB_S1D13XXX is not set
908# CONFIG_FB_NVIDIA is not set 958# CONFIG_FB_NVIDIA is not set
909# CONFIG_FB_RIVA is not set 959# CONFIG_FB_RIVA is not set
910CONFIG_FB_MATROX=y 960CONFIG_FB_MATROX=y
@@ -927,7 +977,6 @@ CONFIG_FB_RADEON_I2C=y
927# CONFIG_FB_VOODOO1 is not set 977# CONFIG_FB_VOODOO1 is not set
928# CONFIG_FB_CYBLA is not set 978# CONFIG_FB_CYBLA is not set
929# CONFIG_FB_TRIDENT is not set 979# CONFIG_FB_TRIDENT is not set
930# CONFIG_FB_S1D13XXX is not set
931# CONFIG_FB_VIRTUAL is not set 980# CONFIG_FB_VIRTUAL is not set
932 981
933# 982#
@@ -936,6 +985,7 @@ CONFIG_FB_RADEON_I2C=y
936# CONFIG_VGA_CONSOLE is not set 985# CONFIG_VGA_CONSOLE is not set
937CONFIG_DUMMY_CONSOLE=y 986CONFIG_DUMMY_CONSOLE=y
938CONFIG_FRAMEBUFFER_CONSOLE=y 987CONFIG_FRAMEBUFFER_CONSOLE=y
988# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
939# CONFIG_FONTS is not set 989# CONFIG_FONTS is not set
940CONFIG_FONT_8x8=y 990CONFIG_FONT_8x8=y
941CONFIG_FONT_8x16=y 991CONFIG_FONT_8x16=y
@@ -990,12 +1040,15 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
990# 1040#
991# USB Device Class drivers 1041# USB Device Class drivers
992# 1042#
993# CONFIG_USB_BLUETOOTH_TTY is not set
994# CONFIG_USB_ACM is not set 1043# CONFIG_USB_ACM is not set
995# CONFIG_USB_PRINTER is not set 1044# CONFIG_USB_PRINTER is not set
996 1045
997# 1046#
998# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 1047# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1048#
1049
1050#
1051# may also be needed; see USB_STORAGE Help for more information
999# 1052#
1000CONFIG_USB_STORAGE=y 1053CONFIG_USB_STORAGE=y
1001# CONFIG_USB_STORAGE_DEBUG is not set 1054# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1106,6 +1159,7 @@ CONFIG_INFINIBAND_MTHCA=m
1106# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 1159# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
1107CONFIG_INFINIBAND_IPOIB=m 1160CONFIG_INFINIBAND_IPOIB=m
1108# CONFIG_INFINIBAND_IPOIB_DEBUG is not set 1161# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
1162# CONFIG_INFINIBAND_SRP is not set
1109 1163
1110# 1164#
1111# SN Devices 1165# SN Devices
@@ -1288,10 +1342,25 @@ CONFIG_NLS_ISO8859_1=y
1288# CONFIG_NLS_UTF8 is not set 1342# CONFIG_NLS_UTF8 is not set
1289 1343
1290# 1344#
1291# Profiling support 1345# Library routines
1346#
1347CONFIG_CRC_CCITT=m
1348# CONFIG_CRC16 is not set
1349CONFIG_CRC32=y
1350CONFIG_LIBCRC32C=m
1351CONFIG_ZLIB_INFLATE=y
1352CONFIG_ZLIB_DEFLATE=m
1353CONFIG_TEXTSEARCH=y
1354CONFIG_TEXTSEARCH_KMP=m
1355CONFIG_TEXTSEARCH_BM=m
1356CONFIG_TEXTSEARCH_FSM=m
1357
1358#
1359# Instrumentation Support
1292# 1360#
1293CONFIG_PROFILING=y 1361CONFIG_PROFILING=y
1294CONFIG_OPROFILE=y 1362CONFIG_OPROFILE=y
1363# CONFIG_KPROBES is not set
1295 1364
1296# 1365#
1297# Kernel hacking 1366# Kernel hacking
@@ -1308,14 +1377,15 @@ CONFIG_DETECT_SOFTLOCKUP=y
1308# CONFIG_DEBUG_KOBJECT is not set 1377# CONFIG_DEBUG_KOBJECT is not set
1309# CONFIG_DEBUG_INFO is not set 1378# CONFIG_DEBUG_INFO is not set
1310CONFIG_DEBUG_FS=y 1379CONFIG_DEBUG_FS=y
1380# CONFIG_DEBUG_VM is not set
1381# CONFIG_RCU_TORTURE_TEST is not set
1311CONFIG_DEBUG_STACKOVERFLOW=y 1382CONFIG_DEBUG_STACKOVERFLOW=y
1312# CONFIG_KPROBES is not set
1313CONFIG_DEBUG_STACK_USAGE=y 1383CONFIG_DEBUG_STACK_USAGE=y
1314CONFIG_DEBUGGER=y 1384CONFIG_DEBUGGER=y
1315CONFIG_XMON=y 1385CONFIG_XMON=y
1316CONFIG_XMON_DEFAULT=y 1386CONFIG_XMON_DEFAULT=y
1317# CONFIG_PPCDBG is not set
1318CONFIG_IRQSTACKS=y 1387CONFIG_IRQSTACKS=y
1388# CONFIG_BOOTX_TEXT is not set
1319 1389
1320# 1390#
1321# Security options 1391# Security options
@@ -1355,17 +1425,3 @@ CONFIG_CRYPTO_TEST=m
1355# 1425#
1356# Hardware crypto devices 1426# Hardware crypto devices
1357# 1427#
1358
1359#
1360# Library routines
1361#
1362CONFIG_CRC_CCITT=m
1363# CONFIG_CRC16 is not set
1364CONFIG_CRC32=y
1365CONFIG_LIBCRC32C=m
1366CONFIG_ZLIB_INFLATE=y
1367CONFIG_ZLIB_DEFLATE=m
1368CONFIG_TEXTSEARCH=y
1369CONFIG_TEXTSEARCH_KMP=m
1370CONFIG_TEXTSEARCH_BM=m
1371CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 9a74b7ab03a4..046b4bf1f21e 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_PPC_OF) += of_device.o
25procfs-$(CONFIG_PPC64) := proc_ppc64.o 25procfs-$(CONFIG_PPC64) := proc_ppc64.o
26obj-$(CONFIG_PROC_FS) += $(procfs-y) 26obj-$(CONFIG_PROC_FS) += $(procfs-y)
27rtaspci-$(CONFIG_PPC64) := rtas_pci.o 27rtaspci-$(CONFIG_PPC64) := rtas_pci.o
28obj-$(CONFIG_PPC_RTAS) += rtas.o $(rtaspci-y) 28obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y)
29obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o 29obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
30obj-$(CONFIG_RTAS_PROC) += rtas-proc.o 30obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
31obj-$(CONFIG_LPARCFG) += lparcfg.o 31obj-$(CONFIG_LPARCFG) += lparcfg.o
diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c
new file mode 100644
index 000000000000..7b948662704c
--- /dev/null
+++ b/arch/powerpc/kernel/rtas-rtc.c
@@ -0,0 +1,105 @@
1#include <linux/kernel.h>
2#include <linux/time.h>
3#include <linux/timer.h>
4#include <linux/init.h>
5#include <linux/rtc.h>
6#include <linux/delay.h>
7#include <asm/prom.h>
8#include <asm/rtas.h>
9#include <asm/time.h>
10
11
12#define MAX_RTC_WAIT 5000 /* 5 sec */
13#define RTAS_CLOCK_BUSY (-2)
14unsigned long __init rtas_get_boot_time(void)
15{
16 int ret[8];
17 int error, wait_time;
18 unsigned long max_wait_tb;
19
20 max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
21 do {
22 error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
23 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
24 wait_time = rtas_extended_busy_delay_time(error);
25 /* This is boot time so we spin. */
26 udelay(wait_time*1000);
27 error = RTAS_CLOCK_BUSY;
28 }
29 } while (error == RTAS_CLOCK_BUSY && (get_tb() < max_wait_tb));
30
31 if (error != 0 && printk_ratelimit()) {
32 printk(KERN_WARNING "error: reading the clock failed (%d)\n",
33 error);
34 return 0;
35 }
36
37 return mktime(ret[0], ret[1], ret[2], ret[3], ret[4], ret[5]);
38}
39
40/* NOTE: get_rtc_time will get an error if executed in interrupt context
41 * and if a delay is needed to read the clock. In this case we just
42 * silently return without updating rtc_tm.
43 */
44void rtas_get_rtc_time(struct rtc_time *rtc_tm)
45{
46 int ret[8];
47 int error, wait_time;
48 unsigned long max_wait_tb;
49
50 max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
51 do {
52 error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
53 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
54 if (in_interrupt() && printk_ratelimit()) {
55 memset(&rtc_tm, 0, sizeof(struct rtc_time));
56 printk(KERN_WARNING "error: reading clock"
57 " would delay interrupt\n");
58 return; /* delay not allowed */
59 }
60 wait_time = rtas_extended_busy_delay_time(error);
61 msleep(wait_time);
62 error = RTAS_CLOCK_BUSY;
63 }
64 } while (error == RTAS_CLOCK_BUSY && (get_tb() < max_wait_tb));
65
66 if (error != 0 && printk_ratelimit()) {
67 printk(KERN_WARNING "error: reading the clock failed (%d)\n",
68 error);
69 return;
70 }
71
72 rtc_tm->tm_sec = ret[5];
73 rtc_tm->tm_min = ret[4];
74 rtc_tm->tm_hour = ret[3];
75 rtc_tm->tm_mday = ret[2];
76 rtc_tm->tm_mon = ret[1] - 1;
77 rtc_tm->tm_year = ret[0] - 1900;
78}
79
80int rtas_set_rtc_time(struct rtc_time *tm)
81{
82 int error, wait_time;
83 unsigned long max_wait_tb;
84
85 max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
86 do {
87 error = rtas_call(rtas_token("set-time-of-day"), 7, 1, NULL,
88 tm->tm_year + 1900, tm->tm_mon + 1,
89 tm->tm_mday, tm->tm_hour, tm->tm_min,
90 tm->tm_sec, 0);
91 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
92 if (in_interrupt())
93 return 1; /* probably decrementer */
94 wait_time = rtas_extended_busy_delay_time(error);
95 msleep(wait_time);
96 error = RTAS_CLOCK_BUSY;
97 }
98 } while (error == RTAS_CLOCK_BUSY && (get_tb() < max_wait_tb));
99
100 if (error != 0 && printk_ratelimit())
101 printk(KERN_WARNING "error: setting the clock failed (%d)\n",
102 error);
103
104 return 0;
105}
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index 4c7682a65227..b1714f9bd920 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -199,7 +199,7 @@ static unsigned long smu_get_time(void)
199#define smu_set_rtc_time(tm, spin) 0 199#define smu_set_rtc_time(tm, spin) 0
200#endif 200#endif
201 201
202unsigned long pmac_get_boot_time(void) 202unsigned long __init pmac_get_boot_time(void)
203{ 203{
204 /* Get the time from the RTC, used only at boot time */ 204 /* Get the time from the RTC, used only at boot time */
205 switch (sys_ctrler) { 205 switch (sys_ctrler) {