diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 01:20:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 01:20:46 -0500 |
commit | 2e6e33bab6e1996a5dec9108fb467b52b841e7a8 (patch) | |
tree | 6b98b15c2fe7899cdeb2453589cdee00f7853492 /arch/ppc/syslib | |
parent | b7ad6d75028d021362221d9b2db19fcff995c3f8 (diff) | |
parent | b88a0b1d5560cf1959c1565617e460a45c688a08 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
[PATCH] powerpc: Add FSL SEC node to documentation
[PATCH] macintosh: tidy-up driver_register() return values
[PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
[PATCH] powerpc: via-pmu warning fix
[PATCH] macintosh: cleanup the use of i2c headers
[PATCH] powerpc: dont allow old RTC to be selected
[PATCH] powerpc: make powerbook_sleep_grackle static
[PATCH] powerpc: Fix warning in add_memory
[PATCH] powerpc: update mailing list addresses
[PATCH] powerpc: Remove calculation of io hole
[PATCH] powerpc: iseries: Add bootargs to /chosen
[PATCH] powerpc: iseries: Add /system-id, /model and /compatible
[PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
[PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
[PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
[PATCH] powerpc: iseries: mf related cleanups
[PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
[PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
[PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
[PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
...
Diffstat (limited to 'arch/ppc/syslib')
60 files changed, 236 insertions, 175 deletions
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 159dcd92a6d1..5cb62c6a51c8 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -17,8 +17,8 @@ obj-$(CONFIG_440GX) += ibm440gx_common.o | |||
17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o | 17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o |
18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o | 18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o |
19 | ifeq ($(CONFIG_4xx),y) | 19 | ifeq ($(CONFIG_4xx),y) |
20 | ifeq ($(CONFIG_VIRTEX_II_PRO),y) | 20 | ifeq ($(CONFIG_XILINX_VIRTEX),y) |
21 | obj-$(CONFIG_40x) += xilinx_pic.o | 21 | obj-$(CONFIG_40x) += xilinx_pic.o ppc_sys.o |
22 | else | 22 | else |
23 | ifeq ($(CONFIG_403),y) | 23 | ifeq ($(CONFIG_403),y) |
24 | obj-$(CONFIG_40x) += ppc403_pic.o | 24 | obj-$(CONFIG_40x) += ppc403_pic.o |
diff --git a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h index f2c002531019..0a8a5d84390f 100644 --- a/arch/ppc/syslib/cpc700.h +++ b/arch/ppc/syslib/cpc700.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700.h | ||
3 | * | ||
4 | * Header file for IBM CPC700 Host Bridge, et. al. | 2 | * Header file for IBM CPC700 Host Bridge, et. al. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c index 75fe8eb10693..5add0a919ef6 100644 --- a/arch/ppc/syslib/cpc700_pic.c +++ b/arch/ppc/syslib/cpc700_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for IBM Spruce | 2 | * Interrupt controller support for IBM Spruce |
5 | * | 3 | * |
6 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters | 4 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters |
diff --git a/arch/ppc/syslib/cpc710.h b/arch/ppc/syslib/cpc710.h index cc0afd804029..5299bf8b5d01 100644 --- a/arch/ppc/syslib/cpc710.h +++ b/arch/ppc/syslib/cpc710.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc710.h | ||
3 | * | ||
4 | * Definitions for the IBM CPC710 PCI Host Bridge | 2 | * Definitions for the IBM CPC710 PCI Host Bridge |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/gen550.h b/arch/ppc/syslib/gen550.h index 039d249e19a8..5254d3cdbca6 100644 --- a/arch/ppc/syslib/gen550.h +++ b/arch/ppc/syslib/gen550.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550.h | ||
3 | * | ||
4 | * gen550 prototypes | 2 | * gen550 prototypes |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c index 9ef0113c83d1..9fcff74bfdd0 100644 --- a/arch/ppc/syslib/gen550_dbg.c +++ b/arch/ppc/syslib/gen550_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_dbg.c | ||
3 | * | ||
4 | * A library of polled 16550 serial routines. These are intended to | 2 | * A library of polled 16550 serial routines. These are intended to |
5 | * be used to support progress messages, xmon, kgdb, etc. on a | 3 | * be used to support progress messages, xmon, kgdb, etc. on a |
6 | * variety of platforms. | 4 | * variety of platforms. |
diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c index 7239d5d7ddcd..874078a7664d 100644 --- a/arch/ppc/syslib/gen550_kgdb.c +++ b/arch/ppc/syslib/gen550_kgdb.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_kgdb.c | ||
3 | * | ||
4 | * Generic 16550 kgdb support intended to be useful on a variety | 2 | * Generic 16550 kgdb support intended to be useful on a variety |
5 | * of platforms. To enable this support, it is necessary to set | 3 | * of platforms. To enable this support, it is necessary to set |
6 | * the CONFIG_GEN550 option. Any virtual mapping of the serial | 4 | * the CONFIG_GEN550 option. Any virtual mapping of the serial |
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c index f97b3a9abd1e..dc3bd9ecbbf6 100644 --- a/arch/ppc/syslib/gt64260_pic.c +++ b/arch/ppc/syslib/gt64260_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gt64260_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Galileo's GT64260. | 2 | * Interrupt controller support for Galileo's GT64260. |
5 | * | 3 | * |
6 | * Author: Chris Zankel <source@mvista.com> | 4 | * Author: Chris Zankel <source@mvista.com> |
diff --git a/arch/ppc/syslib/harrier.c b/arch/ppc/syslib/harrier.c index a6b3f8645793..c1583f488325 100644 --- a/arch/ppc/syslib/harrier.c +++ b/arch/ppc/syslib/harrier.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/harrier.c | ||
3 | * | ||
4 | * Motorola MCG Harrier northbridge/memory controller support | 2 | * Motorola MCG Harrier northbridge/memory controller support |
5 | * | 3 | * |
6 | * Author: Dale Farnsworth | 4 | * Author: Dale Farnsworth |
diff --git a/arch/ppc/syslib/hawk_common.c b/arch/ppc/syslib/hawk_common.c index a9911dc3a82f..c5bf16b0d6a1 100644 --- a/arch/ppc/syslib/hawk_common.c +++ b/arch/ppc/syslib/hawk_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/hawk_common.c | ||
3 | * | ||
4 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. | 2 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c index 0d6be2d6dd67..fbaae5f6d834 100644 --- a/arch/ppc/syslib/ibm440gp_common.c +++ b/arch/ppc/syslib/ibm440gp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440gp_common.c | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ibm440gp_common.h b/arch/ppc/syslib/ibm440gp_common.h index a054d83cb1ac..f48529f3c23d 100644 --- a/arch/ppc/syslib/ibm440gp_common.h +++ b/arch/ppc/syslib/ibm440gp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gp_common.h | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index c36db279b43d..a7dd55f1c63e 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.c | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.h b/arch/ppc/syslib/ibm440gx_common.h index e73aa0411d35..a2ab9fab8e34 100644 --- a/arch/ppc/syslib/ibm440gx_common.h +++ b/arch/ppc/syslib/ibm440gx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.h | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440sp_common.c b/arch/ppc/syslib/ibm440sp_common.c index cdafda127d81..293e4138d172 100644 --- a/arch/ppc/syslib/ibm440sp_common.c +++ b/arch/ppc/syslib/ibm440sp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.c | ||
3 | * | ||
4 | * PPC440SP/PPC440SPe system library | 2 | * PPC440SP/PPC440SPe system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm440sp_common.h b/arch/ppc/syslib/ibm440sp_common.h index a21a9906dcc9..8077bf8ed118 100644 --- a/arch/ppc/syslib/ibm440sp_common.h +++ b/arch/ppc/syslib/ibm440sp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.h | ||
3 | * | ||
4 | * PPC440SP system library | 2 | * PPC440SP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c index 71db11d22158..14a981a5cea7 100644 --- a/arch/ppc/syslib/ibm44x_common.c +++ b/arch/ppc/syslib/ibm44x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm44x_common.c | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.h b/arch/ppc/syslib/ibm44x_common.h index b25a8995e4e9..f179db8634e0 100644 --- a/arch/ppc/syslib/ibm44x_common.h +++ b/arch/ppc/syslib/ibm44x_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm44x_common.h | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 1dc7e4e1d491..99e4bc0e42af 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8260_pci9.c | ||
3 | * | ||
4 | * Workaround for device erratum PCI 9. | 2 | * Workaround for device erratum PCI 9. |
5 | * See Motorola's "XPC826xA Family Device Errata Reference." | 3 | * See Motorola's "XPC826xA Family Device Errata Reference." |
6 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled | 4 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled |
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 76a2aa4ce65e..b7a6cb2d8d52 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/m8260_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 688616de3cde..dae9af78bde1 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
@@ -34,6 +32,13 @@ | |||
34 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
35 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
36 | 34 | ||
35 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
36 | #include <linux/mtd/partitions.h> | ||
37 | #include <linux/mtd/physmap.h> | ||
38 | #include <linux/mtd/mtd.h> | ||
39 | #include <linux/mtd/map.h> | ||
40 | #endif | ||
41 | |||
37 | #include <asm/mmu.h> | 42 | #include <asm/mmu.h> |
38 | #include <asm/reg.h> | 43 | #include <asm/reg.h> |
39 | #include <asm/residual.h> | 44 | #include <asm/residual.h> |
@@ -49,6 +54,34 @@ | |||
49 | 54 | ||
50 | #include "ppc8xx_pic.h" | 55 | #include "ppc8xx_pic.h" |
51 | 56 | ||
57 | #ifdef CONFIG_MTD_PHYSMAP | ||
58 | #define MPC8xxADS_BANK_WIDTH 4 | ||
59 | #endif | ||
60 | |||
61 | #define MPC8xxADS_U_BOOT_SIZE 0x80000 | ||
62 | #define MPC8xxADS_FREE_AREA_OFFSET MPC8xxADS_U_BOOT_SIZE | ||
63 | |||
64 | #if defined(CONFIG_MTD_PARTITIONS) | ||
65 | /* | ||
66 | NOTE: bank width and interleave relative to the installed flash | ||
67 | should have been chosen within MTD_CFI_GEOMETRY options. | ||
68 | */ | ||
69 | static struct mtd_partition mpc8xxads_partitions[] = { | ||
70 | { | ||
71 | .name = "bootloader", | ||
72 | .size = MPC8xxADS_U_BOOT_SIZE, | ||
73 | .offset = 0, | ||
74 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
75 | }, { | ||
76 | .name = "User FS", | ||
77 | .offset = MPC8xxADS_FREE_AREA_OFFSET | ||
78 | } | ||
79 | }; | ||
80 | |||
81 | #define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0])) | ||
82 | |||
83 | #endif | ||
84 | |||
52 | static int m8xx_set_rtc_time(unsigned long time); | 85 | static int m8xx_set_rtc_time(unsigned long time); |
53 | static unsigned long m8xx_get_rtc_time(void); | 86 | static unsigned long m8xx_get_rtc_time(void); |
54 | void m8xx_calibrate_decr(void); | 87 | void m8xx_calibrate_decr(void); |
@@ -71,6 +104,10 @@ board_init(void) | |||
71 | void __init | 104 | void __init |
72 | m8xx_setup_arch(void) | 105 | m8xx_setup_arch(void) |
73 | { | 106 | { |
107 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
108 | bd_t *binfo = (bd_t *)__res; | ||
109 | #endif | ||
110 | |||
74 | /* Reset the Communication Processor Module. | 111 | /* Reset the Communication Processor Module. |
75 | */ | 112 | */ |
76 | m8xx_cpm_reset(); | 113 | m8xx_cpm_reset(); |
@@ -106,6 +143,17 @@ m8xx_setup_arch(void) | |||
106 | } | 143 | } |
107 | #endif | 144 | #endif |
108 | #endif | 145 | #endif |
146 | |||
147 | #if defined (CONFIG_MPC86XADS) || defined (CONFIG_MPC885ADS) | ||
148 | #if defined(CONFIG_MTD_PHYSMAP) | ||
149 | physmap_configure(binfo->bi_flashstart, binfo->bi_flashsize, | ||
150 | MPC8xxADS_BANK_WIDTH, NULL); | ||
151 | #ifdef CONFIG_MTD_PARTITIONS | ||
152 | physmap_set_partitions(mpc8xxads_partitions, mpc8xxads_part_num); | ||
153 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
154 | #endif /* CONFIG_MTD_PHYSMAP */ | ||
155 | #endif | ||
156 | |||
109 | board_init(); | 157 | board_init(); |
110 | } | 158 | } |
111 | 159 | ||
@@ -140,9 +188,11 @@ void __init __attribute__ ((weak)) | |||
140 | init_internal_rtc(void) | 188 | init_internal_rtc(void) |
141 | { | 189 | { |
142 | /* Disable the RTC one second and alarm interrupts. */ | 190 | /* Disable the RTC one second and alarm interrupts. */ |
143 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) & ~(RTCSC_SIE | RTCSC_ALE)); | 191 | clrbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_SIE | RTCSC_ALE)); |
192 | |||
144 | /* Enable the RTC */ | 193 | /* Enable the RTC */ |
145 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) | (RTCSC_RTF | RTCSC_RTE)); | 194 | setbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_RTF | RTCSC_RTE)); |
195 | |||
146 | } | 196 | } |
147 | 197 | ||
148 | /* The decrementer counts at the system (internal) clock frequency divided by | 198 | /* The decrementer counts at the system (internal) clock frequency divided by |
@@ -159,8 +209,7 @@ void __init m8xx_calibrate_decr(void) | |||
159 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); | 209 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); |
160 | 210 | ||
161 | /* Force all 8xx processors to use divide by 16 processor clock. */ | 211 | /* Force all 8xx processors to use divide by 16 processor clock. */ |
162 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, | 212 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, 0x02000000); |
163 | in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr)|0x02000000); | ||
164 | /* Processor frequency is MHz. | 213 | /* Processor frequency is MHz. |
165 | * The value 'fp' is the number of decrementer ticks per second. | 214 | * The value 'fp' is the number of decrementer ticks per second. |
166 | */ | 215 | */ |
@@ -239,8 +288,8 @@ m8xx_restart(char *cmd) | |||
239 | __volatile__ unsigned char dummy; | 288 | __volatile__ unsigned char dummy; |
240 | 289 | ||
241 | local_irq_disable(); | 290 | local_irq_disable(); |
242 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr) | 0x00000080); | ||
243 | 291 | ||
292 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, 0x00000080); | ||
244 | /* Clear the ME bit in MSR to cause checkstop on machine check | 293 | /* Clear the ME bit in MSR to cause checkstop on machine check |
245 | */ | 294 | */ |
246 | mtmsr(mfmsr() & ~0x1000); | 295 | mtmsr(mfmsr() & ~0x1000); |
@@ -310,8 +359,8 @@ m8xx_init_IRQ(void) | |||
310 | i8259_init(0); | 359 | i8259_init(0); |
311 | 360 | ||
312 | /* The i8259 cascade interrupt must be level sensitive. */ | 361 | /* The i8259 cascade interrupt must be level sensitive. */ |
313 | out_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, in_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel & ~(0x80000000 >> ISA_BRIDGE_INT))); | ||
314 | 362 | ||
363 | clrbits32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, (0x80000000 >> ISA_BRIDGE_INT)); | ||
315 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) | 364 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) |
316 | enable_irq(ISA_BRIDGE_INT); | 365 | enable_irq(ISA_BRIDGE_INT); |
317 | #endif /* CONFIG_PCI */ | 366 | #endif /* CONFIG_PCI */ |
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index df6c9557b86a..ac11d7bab443 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -41,8 +41,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
41 | 41 | ||
42 | m8xx_wdt_reset(); | 42 | m8xx_wdt_reset(); |
43 | 43 | ||
44 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ | 44 | setbits16(&imap->im_sit.sit_piscr, PISCR_PS); |
45 | |||
46 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
47 | } | 46 | } |
48 | 47 | ||
diff --git a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c index 3e039706bdbc..2fc7c4150a18 100644 --- a/arch/ppc/syslib/mpc10x_common.c +++ b/arch/ppc/syslib/mpc10x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc10x_common.c | ||
3 | * | ||
4 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, | 2 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, |
5 | * Mem ctlr, EPIC, etc. | 3 | * Mem ctlr, EPIC, etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_devices.c b/arch/ppc/syslib/mpc52xx_devices.c index da3c74bfdc92..7487539a4e92 100644 --- a/arch/ppc/syslib/mpc52xx_devices.c +++ b/arch/ppc/syslib/mpc52xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_devices.c | ||
3 | * | ||
4 | * Freescale MPC52xx device descriptions | 2 | * Freescale MPC52xx device descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c index 313c96ec7eb1..9ec525f9fe98 100644 --- a/arch/ppc/syslib/mpc52xx_pci.c +++ b/arch/ppc/syslib/mpc52xx_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.c | ||
3 | * | ||
4 | * PCI code for the Freescale MPC52xx embedded CPU. | 2 | * PCI code for the Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.h b/arch/ppc/syslib/mpc52xx_pci.h index 04b509a02530..77d47dbba85e 100644 --- a/arch/ppc/syslib/mpc52xx_pci.h +++ b/arch/ppc/syslib/mpc52xx_pci.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.h | ||
3 | * | ||
4 | * PCI Include file the Freescale MPC52xx embedded cpu chips | 2 | * PCI Include file the Freescale MPC52xx embedded cpu chips |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c index 4c4497e62517..c4406f9dc6a3 100644 --- a/arch/ppc/syslib/mpc52xx_pic.c +++ b/arch/ppc/syslib/mpc52xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pic.c | ||
3 | * | ||
4 | * Programmable Interrupt Controller functions for the Freescale MPC52xx | 2 | * Programmable Interrupt Controller functions for the Freescale MPC52xx |
5 | * embedded CPU. | 3 | * embedded CPU. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index a4a4b02227df..2ee48ce0a517 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_setup.c | ||
3 | * | ||
4 | * Common code for the boards based on Freescale MPC52xx embedded CPU. | 2 | * Common code for the boards based on Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_sys.c b/arch/ppc/syslib/mpc52xx_sys.c index 9a0f90aa8aac..b4e6f978f057 100644 --- a/arch/ppc/syslib/mpc52xx_sys.c +++ b/arch/ppc/syslib/mpc52xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_sys.c | ||
3 | * | ||
4 | * Freescale MPC52xx system descriptions | 2 | * Freescale MPC52xx system descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index f9b95de70e23..1af2c000fcfa 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_devices.c | ||
3 | * | ||
4 | * MPC83xx Device descriptions | 2 | * MPC83xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c index 82cf3ab77f4a..0498ae7e01e3 100644 --- a/arch/ppc/syslib/mpc83xx_sys.c +++ b/arch/ppc/syslib/mpc83xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_sys.c | ||
3 | * | ||
4 | * MPC83xx System descriptions | 2 | * MPC83xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 00e9b6ff2f6e..7735336f5b8f 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_devices.c | ||
3 | * | ||
4 | * MPC85xx Device descriptions | 2 | * MPC85xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c index 397cfbcce5ea..d96a93dbcb5a 100644 --- a/arch/ppc/syslib/mpc85xx_sys.c +++ b/arch/ppc/syslib/mpc85xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_sys.c | ||
3 | * | ||
4 | * MPC85xx System descriptions | 2 | * MPC85xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index 92dc98b36bde..bd41ed83beb3 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc8xx_devices.c | ||
3 | * | ||
4 | * MPC8xx Device descriptions | 2 | * MPC8xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c index d3c617521603..eee213284855 100644 --- a/arch/ppc/syslib/mpc8xx_sys.c +++ b/arch/ppc/syslib/mpc8xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8xx_sys.c | ||
3 | * | ||
4 | * MPC8xx System descriptions | 2 | * MPC8xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 58b0aa813e85..5a19697060f0 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/mv64360_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Marvell's MV64360. | 2 | * Interrupt controller support for Marvell's MV64360. |
5 | * | 3 | * |
6 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> | 4 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 1f01b7e2376b..3b039c30a439 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60.c | ||
3 | * | ||
4 | * Common routines for the Marvell/Galileo Discovery line of host bridges | 2 | * Common routines for the Marvell/Galileo Discovery line of host bridges |
5 | * (gt64260, mv64360, mv64460, ...). | 3 | * (gt64260, mv64360, mv64460, ...). |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c index fa5b2e45e0ca..9cf18764a1a1 100644 --- a/arch/ppc/syslib/mv64x60_dbg.c +++ b/arch/ppc/syslib/mv64x60_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_dbg.c | ||
3 | * | ||
4 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). | 2 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/syslib/mv64x60_win.c b/arch/ppc/syslib/mv64x60_win.c index 5b827e2bbe22..4bf1ad17bf1a 100644 --- a/arch/ppc/syslib/mv64x60_win.c +++ b/arch/ppc/syslib/mv64x60_win.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_win.c | ||
3 | * | ||
4 | * Tables with info on how to manipulate the 32 & 64 bit windows on the | 2 | * Tables with info on how to manipulate the 32 & 64 bit windows on the |
5 | * various types of Marvell bridge chips. | 3 | * various types of Marvell bridge chips. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index 2fe28ded2c60..a4ecc2ee579f 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -451,10 +451,9 @@ ocp_driver_init(void) | |||
451 | DBG(("ocp: ocp_driver_init()...\n")); | 451 | DBG(("ocp: ocp_driver_init()...\n")); |
452 | 452 | ||
453 | /* Allocate/register primary OCP bus */ | 453 | /* Allocate/register primary OCP bus */ |
454 | ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL); | 454 | ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL); |
455 | if (ocp_bus == NULL) | 455 | if (ocp_bus == NULL) |
456 | return 1; | 456 | return 1; |
457 | memset(ocp_bus, 0, sizeof(struct device)); | ||
458 | strcpy(ocp_bus->bus_id, "ocp"); | 457 | strcpy(ocp_bus->bus_id, "ocp"); |
459 | 458 | ||
460 | bus_register(&ocp_bus_type); | 459 | bus_register(&ocp_bus_type); |
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 894779712b46..38e5b93fbe41 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index 1c40049b9a45..bcbe40de26fe 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic_defs.h b/arch/ppc/syslib/open_pic_defs.h index 6c94e7131463..3a25de7cb572 100644 --- a/arch/ppc/syslib/open_pic_defs.h +++ b/arch/ppc/syslib/open_pic_defs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic_defs.h -- OpenPIC definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is based on the following documentation: | 4 | * This file is based on the following documentation: |
diff --git a/arch/ppc/syslib/pci_auto.c b/arch/ppc/syslib/pci_auto.c index d64207c2a972..ee20a86fcc4b 100644 --- a/arch/ppc/syslib/pci_auto.c +++ b/arch/ppc/syslib/pci_auto.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pci_auto.c | ||
3 | * | ||
4 | * PCI autoconfiguration library | 2 | * PCI autoconfiguration library |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c index 05ccd598dd4e..b40b96a8c609 100644 --- a/arch/ppc/syslib/ppc4xx_dma.c +++ b/arch/ppc/syslib/ppc4xx_dma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_dma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine core library | 2 | * IBM PPC4xx DMA engine core library |
5 | * | 3 | * |
6 | * Copyright 2000-2004 MontaVista Software Inc. | 4 | * Copyright 2000-2004 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index aa4165144ec2..fd9af0fc0e9f 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc4xx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for PowerPC 4xx-based processors. | 2 | * Interrupt controller driver for PowerPC 4xx-based processors. |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ppc4xx_pm.c b/arch/ppc/syslib/ppc4xx_pm.c deleted file mode 100644 index 60a479204885..000000000000 --- a/arch/ppc/syslib/ppc4xx_pm.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Author: Armin Kuster <akuster@mvista.com> | ||
3 | * | ||
4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
5 | * the terms of the GNU General Public License version 2. This program | ||
6 | * is licensed "as is" without any warranty of any kind, whether express | ||
7 | * or implied. | ||
8 | * | ||
9 | * This an attempt to get Power Management going for the IBM 4xx processor. | ||
10 | * This was derived from the ppc4xx._setup.c file | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/ibm4xx.h> | ||
17 | |||
18 | void __init | ||
19 | ppc4xx_pm_init(void) | ||
20 | { | ||
21 | |||
22 | unsigned int value = 0; | ||
23 | |||
24 | /* turn off unused hardware to save power */ | ||
25 | #ifdef CONFIG_405GP | ||
26 | value |= CPM_DCP; /* CodePack */ | ||
27 | #endif | ||
28 | |||
29 | #if !defined(CONFIG_IBM_OCP_GPIO) | ||
30 | value |= CPM_GPIO0; | ||
31 | #endif | ||
32 | |||
33 | #if !defined(CONFIG_PPC405_I2C_ADAP) | ||
34 | value |= CPM_IIC0; | ||
35 | #ifdef CONFIG_STB03xxx | ||
36 | value |= CPM_IIC1; | ||
37 | #endif | ||
38 | #endif | ||
39 | |||
40 | |||
41 | #if !defined(CONFIG_405_DMA) | ||
42 | value |= CPM_DMA; | ||
43 | #endif | ||
44 | |||
45 | mtdcr(DCRN_CPMFR, value); | ||
46 | |||
47 | } | ||
diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c index 9f76e8ee39ed..280ea010a9c8 100644 --- a/arch/ppc/syslib/ppc4xx_sgdma.c +++ b/arch/ppc/syslib/ppc4xx_sgdma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_sgdma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine scatter/gather library | 2 | * IBM PPC4xx DMA engine scatter/gather library |
5 | * | 3 | * |
6 | * Copyright 2002-2003 MontaVista Software Inc. | 4 | * Copyright 2002-2003 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 7bada82527a8..26afd637dc81 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.c | ||
3 | * | ||
4 | * MPC83XX common board code | 2 | * MPC83XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h index a122a7322e5e..478b011cd963 100644 --- a/arch/ppc/syslib/ppc83xx_setup.h +++ b/arch/ppc/syslib/ppc83xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.h | ||
3 | * | ||
4 | * MPC83XX common board definitions | 2 | * MPC83XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c index 19ad537225e4..0145c968f9ad 100644 --- a/arch/ppc/syslib/ppc85xx_common.c +++ b/arch/ppc/syslib/ppc85xx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.c | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h index 94edf32151dd..182744a1321c 100644 --- a/arch/ppc/syslib/ppc85xx_common.h +++ b/arch/ppc/syslib/ppc85xx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.h | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index e4dda43fdaa7..e70b34ee6275 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.c | ||
3 | * | ||
4 | * MPC85XX common board code | 2 | * MPC85XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h index e340b0545fb5..f55b8032d3d9 100644 --- a/arch/ppc/syslib/ppc85xx_setup.h +++ b/arch/ppc/syslib/ppc85xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.h | ||
3 | * | ||
4 | * MPC85XX common board definitions | 2 | * MPC85XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index c0b93c4191ee..60c724e11584 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc_sys.c | ||
3 | * | ||
4 | * PPC System library functions | 2 | * PPC System library functions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -15,11 +13,22 @@ | |||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/bootmem.h> | ||
18 | #include <asm/ppc_sys.h> | 17 | #include <asm/ppc_sys.h> |
19 | 18 | ||
20 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); | 19 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); |
21 | 20 | ||
22 | static int ppc_sys_inited; | 21 | static int ppc_sys_inited; |
22 | static int ppc_sys_func_inited; | ||
23 | |||
24 | static const char *ppc_sys_func_names[] = { | ||
25 | [PPC_SYS_FUNC_DUMMY] = "dummy", | ||
26 | [PPC_SYS_FUNC_ETH] = "eth", | ||
27 | [PPC_SYS_FUNC_UART] = "uart", | ||
28 | [PPC_SYS_FUNC_HLDC] = "hldc", | ||
29 | [PPC_SYS_FUNC_USB] = "usb", | ||
30 | [PPC_SYS_FUNC_IRDA] = "irda", | ||
31 | }; | ||
23 | 32 | ||
24 | void __init identify_ppc_sys_by_id(u32 id) | 33 | void __init identify_ppc_sys_by_id(u32 id) |
25 | { | 34 | { |
@@ -38,13 +47,13 @@ void __init identify_ppc_sys_by_id(u32 id) | |||
38 | void __init identify_ppc_sys_by_name(char *name) | 47 | void __init identify_ppc_sys_by_name(char *name) |
39 | { | 48 | { |
40 | unsigned int i = 0; | 49 | unsigned int i = 0; |
41 | while (ppc_sys_specs[i].ppc_sys_name[0]) | 50 | while (ppc_sys_specs[i].ppc_sys_name[0]) { |
42 | { | ||
43 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) | 51 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) |
44 | break; | 52 | break; |
45 | i++; | 53 | i++; |
46 | } | 54 | } |
47 | cur_ppc_sys_spec = &ppc_sys_specs[i]; | 55 | cur_ppc_sys_spec = &ppc_sys_specs[i]; |
56 | |||
48 | return; | 57 | return; |
49 | } | 58 | } |
50 | 59 | ||
@@ -128,6 +137,165 @@ void ppc_sys_device_remove(enum ppc_sys_devices dev) | |||
128 | } | 137 | } |
129 | } | 138 | } |
130 | 139 | ||
140 | /* Platform-notify mapping | ||
141 | * Helper function for BSP code to assign board-specific platfom-divice bits | ||
142 | */ | ||
143 | |||
144 | void platform_notify_map(const struct platform_notify_dev_map *map, | ||
145 | struct device *dev) | ||
146 | { | ||
147 | struct platform_device *pdev; | ||
148 | int len, idx; | ||
149 | const char *s; | ||
150 | |||
151 | /* do nothing if no device or no bus_id */ | ||
152 | if (!dev || !dev->bus_id) | ||
153 | return; | ||
154 | |||
155 | /* call per device map */ | ||
156 | while (map->bus_id != NULL) { | ||
157 | idx = -1; | ||
158 | s = strrchr(dev->bus_id, '.'); | ||
159 | if (s != NULL) | ||
160 | idx = (int)simple_strtol(s + 1, NULL, 10); | ||
161 | else | ||
162 | s = dev->bus_id; | ||
163 | |||
164 | len = s - dev->bus_id; | ||
165 | |||
166 | if (!strncmp(dev->bus_id, map->bus_id, len)) { | ||
167 | pdev = container_of(dev, struct platform_device, dev); | ||
168 | map->rtn(pdev, idx); | ||
169 | } | ||
170 | map++; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | Function assignment stuff. | ||
176 | Intended to work as follows: | ||
177 | the device name defined in foo_devices.c will be concatenated with :"func", | ||
178 | where func is string map of respective function from platfom_device_func enum | ||
179 | |||
180 | The PPC_SYS_FUNC_DUMMY function is intended to remove all assignments, making the device to appear | ||
181 | in platform bus with unmodified name. | ||
182 | */ | ||
183 | |||
184 | /* | ||
185 | Here we'll replace .name pointers with fixed-lenght strings | ||
186 | Hereby, this should be called *before* any func stuff triggeded. | ||
187 | */ | ||
188 | void ppc_sys_device_initfunc(void) | ||
189 | { | ||
190 | int i; | ||
191 | const char *name; | ||
192 | static char new_names[NUM_PPC_SYS_DEVS][BUS_ID_SIZE]; | ||
193 | enum ppc_sys_devices cur_dev; | ||
194 | |||
195 | /* If inited yet, do nothing */ | ||
196 | if (ppc_sys_func_inited) | ||
197 | return; | ||
198 | |||
199 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
200 | if ((cur_dev = cur_ppc_sys_spec->device_list[i]) < 0) | ||
201 | continue; | ||
202 | |||
203 | if (ppc_sys_platform_devices[cur_dev].name) { | ||
204 | /*backup name */ | ||
205 | name = ppc_sys_platform_devices[cur_dev].name; | ||
206 | strlcpy(new_names[i], name, BUS_ID_SIZE); | ||
207 | ppc_sys_platform_devices[cur_dev].name = new_names[i]; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | ppc_sys_func_inited = 1; | ||
212 | } | ||
213 | |||
214 | /*The "engine" of the func stuff. Here we either concat specified function string description | ||
215 | to the name, or remove it if PPC_SYS_FUNC_DUMMY parameter is passed here*/ | ||
216 | void ppc_sys_device_setfunc(enum ppc_sys_devices dev, | ||
217 | enum platform_device_func func) | ||
218 | { | ||
219 | char *s; | ||
220 | char *name = (char *)ppc_sys_platform_devices[dev].name; | ||
221 | char tmp[BUS_ID_SIZE]; | ||
222 | |||
223 | if (!ppc_sys_func_inited) { | ||
224 | printk(KERN_ERR "Unable to alter function - not inited!\n"); | ||
225 | return; | ||
226 | } | ||
227 | |||
228 | if (ppc_sys_inited) { | ||
229 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
230 | } | ||
231 | |||
232 | if ((s = (char *)strchr(name, ':')) != NULL) { /* reassign */ | ||
233 | /* Either change the name after ':' or remove func modifications */ | ||
234 | if (func != PPC_SYS_FUNC_DUMMY) | ||
235 | strlcpy(s + 1, ppc_sys_func_names[func], BUS_ID_SIZE); | ||
236 | else | ||
237 | *s = 0; | ||
238 | } else if (func != PPC_SYS_FUNC_DUMMY) { | ||
239 | /* do assignment if it is not just "clear" request */ | ||
240 | sprintf(tmp, "%s:%s", name, ppc_sys_func_names[func]); | ||
241 | strlcpy(name, tmp, BUS_ID_SIZE); | ||
242 | } | ||
243 | |||
244 | if (ppc_sys_inited) { | ||
245 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | void ppc_sys_device_disable(enum ppc_sys_devices dev) | ||
250 | { | ||
251 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
252 | |||
253 | /*Check if it is enabled*/ | ||
254 | if(!(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED)) { | ||
255 | if (ppc_sys_inited) { | ||
256 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
257 | } | ||
258 | cur_ppc_sys_spec->config[dev] |= PPC_SYS_CONFIG_DISABLED; | ||
259 | } | ||
260 | } | ||
261 | |||
262 | void ppc_sys_device_enable(enum ppc_sys_devices dev) | ||
263 | { | ||
264 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
265 | |||
266 | /*Check if it is disabled*/ | ||
267 | if(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED) { | ||
268 | if (ppc_sys_inited) { | ||
269 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
270 | } | ||
271 | cur_ppc_sys_spec->config[dev] &= ~PPC_SYS_CONFIG_DISABLED; | ||
272 | } | ||
273 | |||
274 | } | ||
275 | |||
276 | void ppc_sys_device_enable_all(void) | ||
277 | { | ||
278 | enum ppc_sys_devices cur_dev; | ||
279 | int i; | ||
280 | |||
281 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
282 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
283 | ppc_sys_device_enable(cur_dev); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | void ppc_sys_device_disable_all(void) | ||
288 | { | ||
289 | enum ppc_sys_devices cur_dev; | ||
290 | int i; | ||
291 | |||
292 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
293 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
294 | ppc_sys_device_disable(cur_dev); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | |||
131 | static int __init ppc_sys_init(void) | 299 | static int __init ppc_sys_init(void) |
132 | { | 300 | { |
133 | unsigned int i, dev_id, ret = 0; | 301 | unsigned int i, dev_id, ret = 0; |
@@ -136,7 +304,8 @@ static int __init ppc_sys_init(void) | |||
136 | 304 | ||
137 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | 305 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { |
138 | dev_id = cur_ppc_sys_spec->device_list[i]; | 306 | dev_id = cur_ppc_sys_spec->device_list[i]; |
139 | if (dev_id != -1) { | 307 | if ((dev_id != -1) && |
308 | !(cur_ppc_sys_spec->config[dev_id] & PPC_SYS_CONFIG_DISABLED)) { | ||
140 | if (ppc_sys_device_fixup != NULL) | 309 | if (ppc_sys_device_fixup != NULL) |
141 | ppc_sys_device_fixup(&ppc_sys_platform_devices | 310 | ppc_sys_device_fixup(&ppc_sys_platform_devices |
142 | [dev_id]); | 311 | [dev_id]); |
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index 6ff3aab82fc3..0636aed7b827 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 Device descriptions | 2 | * PQ2 Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index 36d6e2179940..75e64f1c144d 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 System descriptions | 2 | * PQ2 System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/prep_nvram.c b/arch/ppc/syslib/prep_nvram.c index 2c6364d9641f..474dccbc4a8a 100644 --- a/arch/ppc/syslib/prep_nvram.c +++ b/arch/ppc/syslib/prep_nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/prep_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Corey Minyard | 2 | * Copyright (C) 1998 Corey Minyard |
5 | * | 3 | * |
6 | * This reads the NvRAM on PReP compliant machines (generally from IBM or | 4 | * This reads the NvRAM on PReP compliant machines (generally from IBM or |
diff --git a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c index 1323c641c19d..a8168b8e5683 100644 --- a/arch/ppc/syslib/todc_time.c +++ b/arch/ppc/syslib/todc_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/todc_time.c | ||
3 | * | ||
4 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 | 2 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 |
5 | * Real Time Clocks/Timekeepers. | 3 | * Real Time Clocks/Timekeepers. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index 47f04c71fe9c..e672b600f315 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/xilinx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for Xilinx Virtex-II Pro. | 2 | * Interrupt controller driver for Xilinx Virtex-II Pro. |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -15,7 +13,7 @@ | |||
15 | #include <linux/init.h> | 13 | #include <linux/init.h> |
16 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
17 | #include <asm/io.h> | 15 | #include <asm/io.h> |
18 | #include <asm/xparameters.h> | 16 | #include <platforms/4xx/xparameters/xparameters.h> |
19 | #include <asm/ibm4xx.h> | 17 | #include <asm/ibm4xx.h> |
20 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
21 | 19 | ||