diff options
390 files changed, 18237 insertions, 9399 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 76733a3962f0..20e0e6cb0347 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -50,7 +50,7 @@ Table of Contents | |||
50 | g) Freescale SOC SEC Security Engines | 50 | g) Freescale SOC SEC Security Engines |
51 | h) Board Control and Status (BCSR) | 51 | h) Board Control and Status (BCSR) |
52 | i) Freescale QUICC Engine module (QE) | 52 | i) Freescale QUICC Engine module (QE) |
53 | j) Flash chip nodes | 53 | j) CFI or JEDEC memory-mapped NOR flash |
54 | k) Global Utilities Block | 54 | k) Global Utilities Block |
55 | 55 | ||
56 | VII - Specifying interrupt information for devices | 56 | VII - Specifying interrupt information for devices |
@@ -1757,45 +1757,69 @@ platforms are moved over to use the flattened-device-tree model. | |||
1757 | }; | 1757 | }; |
1758 | }; | 1758 | }; |
1759 | 1759 | ||
1760 | j) Flash chip nodes | 1760 | j) CFI or JEDEC memory-mapped NOR flash |
1761 | 1761 | ||
1762 | Flash chips (Memory Technology Devices) are often used for solid state | 1762 | Flash chips (Memory Technology Devices) are often used for solid state |
1763 | file systems on embedded devices. | 1763 | file systems on embedded devices. |
1764 | 1764 | ||
1765 | Required properties: | 1765 | - compatible : should contain the specific model of flash chip(s) |
1766 | used, if known, followed by either "cfi-flash" or "jedec-flash" | ||
1767 | - reg : Address range of the flash chip | ||
1768 | - bank-width : Width (in bytes) of the flash bank. Equal to the | ||
1769 | device width times the number of interleaved chips. | ||
1770 | - device-width : (optional) Width of a single flash chip. If | ||
1771 | omitted, assumed to be equal to 'bank-width'. | ||
1772 | - #address-cells, #size-cells : Must be present if the flash has | ||
1773 | sub-nodes representing partitions (see below). In this case | ||
1774 | both #address-cells and #size-cells must be equal to 1. | ||
1775 | |||
1776 | For JEDEC compatible devices, the following additional properties | ||
1777 | are defined: | ||
1778 | |||
1779 | - vendor-id : Contains the flash chip's vendor id (1 byte). | ||
1780 | - device-id : Contains the flash chip's device id (1 byte). | ||
1781 | |||
1782 | In addition to the information on the flash bank itself, the | ||
1783 | device tree may optionally contain additional information | ||
1784 | describing partitions of the flash address space. This can be | ||
1785 | used on platforms which have strong conventions about which | ||
1786 | portions of the flash are used for what purposes, but which don't | ||
1787 | use an on-flash partition table such as RedBoot. | ||
1788 | |||
1789 | Each partition is represented as a sub-node of the flash device. | ||
1790 | Each node's name represents the name of the corresponding | ||
1791 | partition of the flash device. | ||
1792 | |||
1793 | Flash partitions | ||
1794 | - reg : The partition's offset and size within the flash bank. | ||
1795 | - label : (optional) The label / name for this flash partition. | ||
1796 | If omitted, the label is taken from the node name (excluding | ||
1797 | the unit address). | ||
1798 | - read-only : (optional) This parameter, if present, is a hint to | ||
1799 | Linux that this flash partition should only be mounted | ||
1800 | read-only. This is usually used for flash partitions | ||
1801 | containing early-boot firmware images or data which should not | ||
1802 | be clobbered. | ||
1766 | 1803 | ||
1767 | - device_type : has to be "rom" | 1804 | Example: |
1768 | - compatible : Should specify what this flash device is compatible with. | ||
1769 | Currently, this is most likely to be "direct-mapped" (which | ||
1770 | corresponds to the MTD physmap mapping driver). | ||
1771 | - reg : Offset and length of the register set (or memory mapping) for | ||
1772 | the device. | ||
1773 | - bank-width : Width of the flash data bus in bytes. Required | ||
1774 | for the NOR flashes (compatible == "direct-mapped" and others) ONLY. | ||
1775 | |||
1776 | Recommended properties : | ||
1777 | |||
1778 | - partitions : Several pairs of 32-bit values where the first value is | ||
1779 | partition's offset from the start of the device and the second one is | ||
1780 | partition size in bytes with LSB used to signify a read only | ||
1781 | partition (so, the partition size should always be an even number). | ||
1782 | - partition-names : The list of concatenated zero terminated strings | ||
1783 | representing the partition names. | ||
1784 | - probe-type : The type of probe which should be done for the chip | ||
1785 | (JEDEC vs CFI actually). Valid ONLY for NOR flashes. | ||
1786 | |||
1787 | Example: | ||
1788 | 1805 | ||
1789 | flash@ff000000 { | 1806 | flash@ff000000 { |
1790 | device_type = "rom"; | 1807 | compatible = "amd,am29lv128ml", "cfi-flash"; |
1791 | compatible = "direct-mapped"; | 1808 | reg = <ff000000 01000000>; |
1792 | probe-type = "CFI"; | 1809 | bank-width = <4>; |
1793 | reg = <ff000000 01000000>; | 1810 | device-width = <1>; |
1794 | bank-width = <4>; | 1811 | #address-cells = <1>; |
1795 | partitions = <00000000 00f80000 | 1812 | #size-cells = <1>; |
1796 | 00f80000 00080001>; | 1813 | fs@0 { |
1797 | partition-names = "fs\0firmware"; | 1814 | label = "fs"; |
1798 | }; | 1815 | reg = <0 f80000>; |
1816 | }; | ||
1817 | firmware@f80000 { | ||
1818 | label ="firmware"; | ||
1819 | reg = <f80000 80000>; | ||
1820 | read-only; | ||
1821 | }; | ||
1822 | }; | ||
1799 | 1823 | ||
1800 | k) Global Utilities Block | 1824 | k) Global Utilities Block |
1801 | 1825 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 9a91d9e3f1f2..2ef086214135 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1543,7 +1543,7 @@ P: Pantelis Antoniou | |||
1543 | M: pantelis.antoniou@gmail.com | 1543 | M: pantelis.antoniou@gmail.com |
1544 | P: Vitaly Bordug | 1544 | P: Vitaly Bordug |
1545 | M: vbordug@ru.mvista.com | 1545 | M: vbordug@ru.mvista.com |
1546 | L: linuxppc-embedded@ozlabs.org | 1546 | L: linuxppc-dev@ozlabs.org |
1547 | L: netdev@vger.kernel.org | 1547 | L: netdev@vger.kernel.org |
1548 | S: Maintained | 1548 | S: Maintained |
1549 | 1549 | ||
@@ -1551,14 +1551,14 @@ FREESCALE HIGHSPEED USB DEVICE DRIVER | |||
1551 | P: Li Yang | 1551 | P: Li Yang |
1552 | M: leoli@freescale.com | 1552 | M: leoli@freescale.com |
1553 | L: linux-usb-devel@lists.sourceforge.net | 1553 | L: linux-usb-devel@lists.sourceforge.net |
1554 | L: linuxppc-embedded@ozlabs.org | 1554 | L: linuxppc-dev@ozlabs.org |
1555 | S: Maintained | 1555 | S: Maintained |
1556 | 1556 | ||
1557 | FREESCALE QUICC ENGINE UCC ETHERNET DRIVER | 1557 | FREESCALE QUICC ENGINE UCC ETHERNET DRIVER |
1558 | P: Li Yang | 1558 | P: Li Yang |
1559 | M: leoli@freescale.com | 1559 | M: leoli@freescale.com |
1560 | L: netdev@vger.kernel.org | 1560 | L: netdev@vger.kernel.org |
1561 | L: linuxppc-embedded@ozlabs.org | 1561 | L: linuxppc-dev@ozlabs.org |
1562 | S: Maintained | 1562 | S: Maintained |
1563 | 1563 | ||
1564 | FILE LOCKING (flock() and fcntl()/lockf()) | 1564 | FILE LOCKING (flock() and fcntl()/lockf()) |
@@ -2291,35 +2291,37 @@ M: tnt@246tNt.com | |||
2291 | W: http://www.246tNt.com/mpc52xx/ | 2291 | W: http://www.246tNt.com/mpc52xx/ |
2292 | W: http://www.penguinppc.org/ | 2292 | W: http://www.penguinppc.org/ |
2293 | L: linuxppc-dev@ozlabs.org | 2293 | L: linuxppc-dev@ozlabs.org |
2294 | L: linuxppc-embedded@ozlabs.org | ||
2295 | S: Maintained | 2294 | S: Maintained |
2296 | 2295 | ||
2297 | LINUX FOR POWERPC EMBEDDED PPC4XX | 2296 | LINUX FOR POWERPC EMBEDDED PPC4XX |
2297 | P: Josh Boyer | ||
2298 | M: jwboyer@linux.vnet.ibm.com | ||
2298 | P: Matt Porter | 2299 | P: Matt Porter |
2299 | M: mporter@kernel.crashing.org | 2300 | M: mporter@kernel.crashing.org |
2300 | W: http://www.penguinppc.org/ | 2301 | W: http://www.penguinppc.org/ |
2301 | L: linuxppc-embedded@ozlabs.org | 2302 | L: linuxppc-dev@ozlabs.org |
2303 | T: git kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc.git | ||
2302 | S: Maintained | 2304 | S: Maintained |
2303 | 2305 | ||
2304 | LINUX FOR POWERPC BOOT CODE | 2306 | LINUX FOR POWERPC BOOT CODE |
2305 | P: Tom Rini | 2307 | P: Tom Rini |
2306 | M: trini@kernel.crashing.org | 2308 | M: trini@kernel.crashing.org |
2307 | W: http://www.penguinppc.org/ | 2309 | W: http://www.penguinppc.org/ |
2308 | L: linuxppc-embedded@ozlabs.org | 2310 | L: linuxppc-dev@ozlabs.org |
2309 | S: Maintained | 2311 | S: Maintained |
2310 | 2312 | ||
2311 | LINUX FOR POWERPC EMBEDDED PPC8XX | 2313 | LINUX FOR POWERPC EMBEDDED PPC8XX |
2312 | P: Marcelo Tosatti | 2314 | P: Marcelo Tosatti |
2313 | M: marcelo@kvack.org | 2315 | M: marcelo@kvack.org |
2314 | W: http://www.penguinppc.org/ | 2316 | W: http://www.penguinppc.org/ |
2315 | L: linuxppc-embedded@ozlabs.org | 2317 | L: linuxppc-dev@ozlabs.org |
2316 | S: Maintained | 2318 | S: Maintained |
2317 | 2319 | ||
2318 | LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX | 2320 | LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX |
2319 | P: Kumar Gala | 2321 | P: Kumar Gala |
2320 | M: galak@kernel.crashing.org | 2322 | M: galak@kernel.crashing.org |
2321 | W: http://www.penguinppc.org/ | 2323 | W: http://www.penguinppc.org/ |
2322 | L: linuxppc-embedded@ozlabs.org | 2324 | L: linuxppc-dev@ozlabs.org |
2323 | S: Maintained | 2325 | S: Maintained |
2324 | 2326 | ||
2325 | LINUX FOR POWERPC PA SEMI PWRFICIENT | 2327 | LINUX FOR POWERPC PA SEMI PWRFICIENT |
@@ -2975,7 +2977,7 @@ POWERPC 4xx EMAC DRIVER | |||
2975 | P: Eugene Surovegin | 2977 | P: Eugene Surovegin |
2976 | M: ebs@ebshome.net | 2978 | M: ebs@ebshome.net |
2977 | W: http://kernel.ebshome.net/emac/ | 2979 | W: http://kernel.ebshome.net/emac/ |
2978 | L: linuxppc-embedded@ozlabs.org | 2980 | L: linuxppc-dev@ozlabs.org |
2979 | L: netdev@vger.kernel.org | 2981 | L: netdev@vger.kernel.org |
2980 | S: Maintained | 2982 | S: Maintained |
2981 | 2983 | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 00099efe0e9f..6819a94f2cac 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -14,6 +14,11 @@ config 64BIT | |||
14 | bool | 14 | bool |
15 | default y if PPC64 | 15 | default y if PPC64 |
16 | 16 | ||
17 | config WORD_SIZE | ||
18 | int | ||
19 | default 64 if PPC64 | ||
20 | default 32 if !PPC64 | ||
21 | |||
17 | config PPC_MERGE | 22 | config PPC_MERGE |
18 | def_bool y | 23 | def_bool y |
19 | 24 | ||
@@ -21,6 +26,15 @@ config MMU | |||
21 | bool | 26 | bool |
22 | default y | 27 | default y |
23 | 28 | ||
29 | config GENERIC_CMOS_UPDATE | ||
30 | def_bool y | ||
31 | |||
32 | config GENERIC_TIME | ||
33 | def_bool y | ||
34 | |||
35 | config GENERIC_TIME_VSYSCALL | ||
36 | def_bool y | ||
37 | |||
24 | config GENERIC_HARDIRQS | 38 | config GENERIC_HARDIRQS |
25 | bool | 39 | bool |
26 | default y | 40 | default y |
@@ -181,16 +195,17 @@ config MATH_EMULATION | |||
181 | instructions to run. | 195 | instructions to run. |
182 | 196 | ||
183 | config IOMMU_VMERGE | 197 | config IOMMU_VMERGE |
184 | bool "Enable IOMMU virtual merging (EXPERIMENTAL)" | 198 | bool "Enable IOMMU virtual merging" |
185 | depends on EXPERIMENTAL && PPC64 | 199 | depends on PPC64 |
186 | default n | 200 | default y |
187 | help | 201 | help |
188 | Cause IO segments sent to a device for DMA to be merged virtually | 202 | Cause IO segments sent to a device for DMA to be merged virtually |
189 | by the IOMMU when they happen to have been allocated contiguously. | 203 | by the IOMMU when they happen to have been allocated contiguously. |
190 | This doesn't add pressure to the IOMMU allocator. However, some | 204 | This doesn't add pressure to the IOMMU allocator. However, some |
191 | drivers don't support getting large merged segments coming back | 205 | drivers don't support getting large merged segments coming back |
192 | from *_map_sg(). Say Y if you know the drivers you are using are | 206 | from *_map_sg(). |
193 | properly handling this case. | 207 | |
208 | Most drivers don't have this problem; it is safe to say Y here. | ||
194 | 209 | ||
195 | config HOTPLUG_CPU | 210 | config HOTPLUG_CPU |
196 | bool "Support for enabling/disabling CPUs" | 211 | bool "Support for enabling/disabling CPUs" |
@@ -662,3 +677,7 @@ config KEYS_COMPAT | |||
662 | default y | 677 | default y |
663 | 678 | ||
664 | source "crypto/Kconfig" | 679 | source "crypto/Kconfig" |
680 | |||
681 | config PPC_CLOCK | ||
682 | bool | ||
683 | default n | ||
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 22acece95b11..c38bc2237057 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
@@ -124,6 +124,16 @@ config IRQSTACKS | |||
124 | for handling hard and soft interrupts. This can help avoid | 124 | for handling hard and soft interrupts. This can help avoid |
125 | overflowing the process kernel stacks. | 125 | overflowing the process kernel stacks. |
126 | 126 | ||
127 | config VIRQ_DEBUG | ||
128 | bool "Expose hardware/virtual IRQ mapping via debugfs" | ||
129 | depends on DEBUG_FS && PPC_MERGE | ||
130 | help | ||
131 | This option will show the mapping relationship between hardware irq | ||
132 | numbers and virtual irq numbers. The mapping is exposed via debugfs | ||
133 | in the file powerpc/virq_mapping. | ||
134 | |||
135 | If you don't know what this means you don't need it. | ||
136 | |||
127 | config BDI_SWITCH | 137 | config BDI_SWITCH |
128 | bool "Include BDI-2000 user context switcher" | 138 | bool "Include BDI-2000 user context switcher" |
129 | depends on DEBUG_KERNEL && PPC32 | 139 | depends on DEBUG_KERNEL && PPC32 |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 6c1e36c33faa..643839a3f5d8 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -35,11 +35,14 @@ endif | |||
35 | 35 | ||
36 | export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY | 36 | export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY |
37 | 37 | ||
38 | ifeq ($(CROSS_COMPILE),) | ||
38 | KBUILD_DEFCONFIG := $(shell uname -m)_defconfig | 39 | KBUILD_DEFCONFIG := $(shell uname -m)_defconfig |
40 | else | ||
41 | KBUILD_DEFCONFIG := ppc64_defconfig | ||
42 | endif | ||
39 | 43 | ||
40 | ifeq ($(CONFIG_PPC64),y) | 44 | ifeq ($(CONFIG_PPC64),y) |
41 | OLDARCH := ppc64 | 45 | OLDARCH := ppc64 |
42 | SZ := 64 | ||
43 | 46 | ||
44 | new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) | 47 | new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) |
45 | 48 | ||
@@ -49,22 +52,26 @@ endif | |||
49 | 52 | ||
50 | else | 53 | else |
51 | OLDARCH := ppc | 54 | OLDARCH := ppc |
52 | SZ := 32 | 55 | endif |
56 | |||
57 | # It seems there are times we use this Makefile without | ||
58 | # including the config file, but this replicates the old behaviour | ||
59 | ifeq ($(CONFIG_WORD_SIZE),) | ||
60 | CONFIG_WORD_SIZE := 32 | ||
53 | endif | 61 | endif |
54 | 62 | ||
55 | UTS_MACHINE := $(OLDARCH) | 63 | UTS_MACHINE := $(OLDARCH) |
56 | 64 | ||
57 | ifeq ($(HAS_BIARCH),y) | 65 | ifeq ($(HAS_BIARCH),y) |
58 | override AS += -a$(SZ) | 66 | override AS += -a$(CONFIG_WORD_SIZE) |
59 | override LD += -m elf$(SZ)ppc | 67 | override LD += -m elf$(CONFIG_WORD_SIZE)ppc |
60 | override CC += -m$(SZ) | 68 | override CC += -m$(CONFIG_WORD_SIZE) |
61 | override AR := GNUTARGET=elf$(SZ)-powerpc $(AR) | 69 | override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-powerpc $(AR) |
62 | endif | 70 | endif |
63 | 71 | ||
64 | LDFLAGS_vmlinux := -Bstatic | 72 | LDFLAGS_vmlinux := -Bstatic |
65 | 73 | ||
66 | # The -Iarch/$(ARCH)/include is temporary while we are merging | 74 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
67 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include | ||
68 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) | 75 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
69 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc | 76 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc |
70 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple | 77 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple |
@@ -72,11 +79,8 @@ CPPFLAGS += $(CPPFLAGS-y) | |||
72 | AFLAGS += $(AFLAGS-y) | 79 | AFLAGS += $(AFLAGS-y) |
73 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | 80 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) |
74 | CPP = $(CC) -E $(CFLAGS) | 81 | CPP = $(CC) -E $(CFLAGS) |
75 | # Temporary hack until we have migrated to asm-powerpc | ||
76 | LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include | ||
77 | LINUXINCLUDE += $(LINUXINCLUDE-y) | ||
78 | 82 | ||
79 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ | 83 | CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ |
80 | 84 | ||
81 | ifeq ($(CONFIG_PPC64),y) | 85 | ifeq ($(CONFIG_PPC64),y) |
82 | GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) | 86 | GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) |
@@ -96,6 +100,10 @@ else | |||
96 | endif | 100 | endif |
97 | endif | 101 | endif |
98 | 102 | ||
103 | ifeq ($(CONFIG_TUNE_CELL),y) | ||
104 | CFLAGS += $(call cc-option,-mtune=cell) | ||
105 | endif | ||
106 | |||
99 | # No AltiVec instruction when building kernel | 107 | # No AltiVec instruction when building kernel |
100 | CFLAGS += $(call cc-option,-mno-altivec) | 108 | CFLAGS += $(call cc-option,-mno-altivec) |
101 | 109 | ||
@@ -120,10 +128,9 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200 | |||
120 | AFLAGS += $(cpu-as-y) | 128 | AFLAGS += $(cpu-as-y) |
121 | CFLAGS += $(cpu-as-y) | 129 | CFLAGS += $(cpu-as-y) |
122 | 130 | ||
123 | head-y := arch/powerpc/kernel/head_32.o | 131 | head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o |
124 | head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o | ||
125 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o | 132 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o |
126 | head-$(CONFIG_4xx) := arch/powerpc/kernel/head_4xx.o | 133 | head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o |
127 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o | 134 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o |
128 | head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o | 135 | head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o |
129 | 136 | ||
@@ -166,25 +173,20 @@ define archhelp | |||
166 | @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' | 173 | @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' |
167 | endef | 174 | endef |
168 | 175 | ||
169 | install: | 176 | install: vdso_install |
170 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install | 177 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install |
171 | 178 | ||
179 | vdso_install: | ||
180 | ifeq ($(CONFIG_PPC64),y) | ||
181 | $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@ | ||
182 | endif | ||
183 | $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@ | ||
184 | |||
172 | archclean: | 185 | archclean: |
173 | $(Q)$(MAKE) $(clean)=$(boot) | 186 | $(Q)$(MAKE) $(clean)=$(boot) |
174 | 187 | ||
175 | archmrproper: | ||
176 | $(Q)rm -rf arch/$(ARCH)/include | ||
177 | |||
178 | archprepare: checkbin | 188 | archprepare: checkbin |
179 | 189 | ||
180 | ifeq ($(CONFIG_PPC32),y) | ||
181 | # Temporary hack until we have migrated to asm-powerpc | ||
182 | include/asm: arch/$(ARCH)/include/asm | ||
183 | arch/$(ARCH)/include/asm: FORCE | ||
184 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi | ||
185 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm | ||
186 | endif | ||
187 | |||
188 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output | 190 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
189 | # to stdout and these checks are run even on install targets. | 191 | # to stdout and these checks are run even on install targets. |
190 | TOUT := .tmp_gas_check | 192 | TOUT := .tmp_gas_check |
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index eec7af7e5993..2c187ca05982 100644 --- a/arch/powerpc/boot/.gitignore +++ b/arch/powerpc/boot/.gitignore | |||
@@ -18,14 +18,14 @@ kernel-vmlinux.strip.c | |||
18 | kernel-vmlinux.strip.gz | 18 | kernel-vmlinux.strip.gz |
19 | mktree | 19 | mktree |
20 | uImage | 20 | uImage |
21 | cuImage | 21 | cuImage.* |
22 | cuImage.bin.gz | ||
23 | cuImage.elf | ||
24 | zImage | 22 | zImage |
23 | zImage.bin.* | ||
25 | zImage.chrp | 24 | zImage.chrp |
26 | zImage.coff | 25 | zImage.coff |
27 | zImage.coff.lds | 26 | zImage.coff.lds |
28 | zImage.lds | 27 | zImage.ep* |
28 | zImage.*lds | ||
29 | zImage.miboot | 29 | zImage.miboot |
30 | zImage.pmac | 30 | zImage.pmac |
31 | zImage.pseries | 31 | zImage.pseries |
diff --git a/arch/powerpc/boot/44x.c b/arch/powerpc/boot/44x.c deleted file mode 100644 index 9f64e840bef6..000000000000 --- a/arch/powerpc/boot/44x.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2007 David Gibson, IBM Corporation. | ||
3 | * | ||
4 | * Based on earlier code: | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * Copyright 2002-2005 MontaVista Software Inc. | ||
7 | * | ||
8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
9 | * Copyright (c) 2003, 2004 Zultys Technologies | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | #include <stddef.h> | ||
17 | #include "types.h" | ||
18 | #include "string.h" | ||
19 | #include "stdio.h" | ||
20 | #include "ops.h" | ||
21 | #include "reg.h" | ||
22 | #include "dcr.h" | ||
23 | |||
24 | /* Read the 44x memory controller to get size of system memory. */ | ||
25 | void ibm44x_fixup_memsize(void) | ||
26 | { | ||
27 | int i; | ||
28 | unsigned long memsize, bank_config; | ||
29 | |||
30 | memsize = 0; | ||
31 | for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) { | ||
32 | mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]); | ||
33 | bank_config = mfdcr(DCRN_SDRAM0_CFGDATA); | ||
34 | |||
35 | if (bank_config & SDRAM_CONFIG_BANK_ENABLE) | ||
36 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); | ||
37 | } | ||
38 | |||
39 | dt_fixup_memory(0, memsize); | ||
40 | } | ||
41 | |||
42 | #define SPRN_DBCR0 0x134 | ||
43 | #define DBCR0_RST_SYSTEM 0x30000000 | ||
44 | |||
45 | void ibm44x_dbcr_reset(void) | ||
46 | { | ||
47 | unsigned long tmp; | ||
48 | |||
49 | asm volatile ( | ||
50 | "mfspr %0,%1\n" | ||
51 | "oris %0,%0,%2@h\n" | ||
52 | "mtspr %1,%0" | ||
53 | : "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM) | ||
54 | ); | ||
55 | |||
56 | } | ||
57 | |||
58 | /* Read 4xx EBC bus bridge registers to get mappings of the peripheral | ||
59 | * banks into the OPB address space */ | ||
60 | void ibm4xx_fixup_ebc_ranges(const char *ebc) | ||
61 | { | ||
62 | void *devp; | ||
63 | u32 bxcr; | ||
64 | u32 ranges[EBC_NUM_BANKS*4]; | ||
65 | u32 *p = ranges; | ||
66 | int i; | ||
67 | |||
68 | for (i = 0; i < EBC_NUM_BANKS; i++) { | ||
69 | mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i)); | ||
70 | bxcr = mfdcr(DCRN_EBC0_CFGDATA); | ||
71 | |||
72 | if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) { | ||
73 | *p++ = i; | ||
74 | *p++ = 0; | ||
75 | *p++ = bxcr & EBC_BXCR_BAS; | ||
76 | *p++ = EBC_BXCR_BANK_SIZE(bxcr); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | devp = finddevice(ebc); | ||
81 | if (! devp) | ||
82 | fatal("Couldn't locate EBC node %s\n\r", ebc); | ||
83 | |||
84 | setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); | ||
85 | } | ||
diff --git a/arch/powerpc/boot/44x.h b/arch/powerpc/boot/44x.h index 577982c9a3cd..02563443788a 100644 --- a/arch/powerpc/boot/44x.h +++ b/arch/powerpc/boot/44x.h | |||
@@ -10,10 +10,7 @@ | |||
10 | #ifndef _PPC_BOOT_44X_H_ | 10 | #ifndef _PPC_BOOT_44X_H_ |
11 | #define _PPC_BOOT_44X_H_ | 11 | #define _PPC_BOOT_44X_H_ |
12 | 12 | ||
13 | void ibm44x_fixup_memsize(void); | ||
14 | void ibm4xx_fixup_ebc_ranges(const char *ebc); | ||
15 | |||
16 | void ibm44x_dbcr_reset(void); | ||
17 | void ebony_init(void *mac0, void *mac1); | 13 | void ebony_init(void *mac0, void *mac1); |
14 | void bamboo_init(void *mac0, void *mac1); | ||
18 | 15 | ||
19 | #endif /* _PPC_BOOT_44X_H_ */ | 16 | #endif /* _PPC_BOOT_44X_H_ */ |
diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c new file mode 100644 index 000000000000..ebf9e217612d --- /dev/null +++ b/arch/powerpc/boot/4xx.c | |||
@@ -0,0 +1,300 @@ | |||
1 | /* | ||
2 | * Copyright 2007 David Gibson, IBM Corporation. | ||
3 | * | ||
4 | * Based on earlier code: | ||
5 | * Matt Porter <mporter@kernel.crashing.org> | ||
6 | * Copyright 2002-2005 MontaVista Software Inc. | ||
7 | * | ||
8 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | ||
9 | * Copyright (c) 2003, 2004 Zultys Technologies | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | #include <stddef.h> | ||
17 | #include "types.h" | ||
18 | #include "string.h" | ||
19 | #include "stdio.h" | ||
20 | #include "ops.h" | ||
21 | #include "reg.h" | ||
22 | #include "dcr.h" | ||
23 | |||
24 | /* Read the 4xx SDRAM controller to get size of system memory. */ | ||
25 | void ibm4xx_fixup_memsize(void) | ||
26 | { | ||
27 | int i; | ||
28 | unsigned long memsize, bank_config; | ||
29 | |||
30 | memsize = 0; | ||
31 | for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) { | ||
32 | mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]); | ||
33 | bank_config = mfdcr(DCRN_SDRAM0_CFGDATA); | ||
34 | |||
35 | if (bank_config & SDRAM_CONFIG_BANK_ENABLE) | ||
36 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); | ||
37 | } | ||
38 | |||
39 | dt_fixup_memory(0, memsize); | ||
40 | } | ||
41 | |||
42 | /* 4xx DDR1/2 Denali memory controller support */ | ||
43 | /* DDR0 registers */ | ||
44 | #define DDR0_02 2 | ||
45 | #define DDR0_08 8 | ||
46 | #define DDR0_10 10 | ||
47 | #define DDR0_14 14 | ||
48 | #define DDR0_42 42 | ||
49 | #define DDR0_43 43 | ||
50 | |||
51 | /* DDR0_02 */ | ||
52 | #define DDR_START 0x1 | ||
53 | #define DDR_START_SHIFT 0 | ||
54 | #define DDR_MAX_CS_REG 0x3 | ||
55 | #define DDR_MAX_CS_REG_SHIFT 24 | ||
56 | #define DDR_MAX_COL_REG 0xf | ||
57 | #define DDR_MAX_COL_REG_SHIFT 16 | ||
58 | #define DDR_MAX_ROW_REG 0xf | ||
59 | #define DDR_MAX_ROW_REG_SHIFT 8 | ||
60 | /* DDR0_08 */ | ||
61 | #define DDR_DDR2_MODE 0x1 | ||
62 | #define DDR_DDR2_MODE_SHIFT 0 | ||
63 | /* DDR0_10 */ | ||
64 | #define DDR_CS_MAP 0x3 | ||
65 | #define DDR_CS_MAP_SHIFT 8 | ||
66 | /* DDR0_14 */ | ||
67 | #define DDR_REDUC 0x1 | ||
68 | #define DDR_REDUC_SHIFT 16 | ||
69 | /* DDR0_42 */ | ||
70 | #define DDR_APIN 0x7 | ||
71 | #define DDR_APIN_SHIFT 24 | ||
72 | /* DDR0_43 */ | ||
73 | #define DDR_COL_SZ 0x7 | ||
74 | #define DDR_COL_SZ_SHIFT 8 | ||
75 | #define DDR_BANK8 0x1 | ||
76 | #define DDR_BANK8_SHIFT 0 | ||
77 | |||
78 | #define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask)) | ||
79 | |||
80 | static inline u32 mfdcr_sdram0(u32 reg) | ||
81 | { | ||
82 | mtdcr(DCRN_SDRAM0_CFGADDR, reg); | ||
83 | return mfdcr(DCRN_SDRAM0_CFGDATA); | ||
84 | } | ||
85 | |||
86 | void ibm4xx_denali_fixup_memsize(void) | ||
87 | { | ||
88 | u32 val, max_cs, max_col, max_row; | ||
89 | u32 cs, col, row, bank, dpath; | ||
90 | unsigned long memsize; | ||
91 | |||
92 | val = mfdcr_sdram0(DDR0_02); | ||
93 | if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT)) | ||
94 | fatal("DDR controller is not initialized\n"); | ||
95 | |||
96 | /* get maximum cs col and row values */ | ||
97 | max_cs = DDR_GET_VAL(val, DDR_MAX_CS_REG, DDR_MAX_CS_REG_SHIFT); | ||
98 | max_col = DDR_GET_VAL(val, DDR_MAX_COL_REG, DDR_MAX_COL_REG_SHIFT); | ||
99 | max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT); | ||
100 | |||
101 | /* get CS value */ | ||
102 | val = mfdcr_sdram0(DDR0_10); | ||
103 | |||
104 | val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT); | ||
105 | cs = 0; | ||
106 | while (val) { | ||
107 | if (val && 0x1) | ||
108 | cs++; | ||
109 | val = val >> 1; | ||
110 | } | ||
111 | |||
112 | if (!cs) | ||
113 | fatal("No memory installed\n"); | ||
114 | if (cs > max_cs) | ||
115 | fatal("DDR wrong CS configuration\n"); | ||
116 | |||
117 | /* get data path bytes */ | ||
118 | val = mfdcr_sdram0(DDR0_14); | ||
119 | |||
120 | if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT)) | ||
121 | dpath = 8; /* 64 bits */ | ||
122 | else | ||
123 | dpath = 4; /* 32 bits */ | ||
124 | |||
125 | /* get adress pins (rows) */ | ||
126 | val = mfdcr_sdram0(DDR0_42); | ||
127 | |||
128 | row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT); | ||
129 | if (row > max_row) | ||
130 | fatal("DDR wrong APIN configuration\n"); | ||
131 | row = max_row - row; | ||
132 | |||
133 | /* get collomn size and banks */ | ||
134 | val = mfdcr_sdram0(DDR0_43); | ||
135 | |||
136 | col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT); | ||
137 | if (col > max_col) | ||
138 | fatal("DDR wrong COL configuration\n"); | ||
139 | col = max_col - col; | ||
140 | |||
141 | if (DDR_GET_VAL(val, DDR_BANK8, DDR_BANK8_SHIFT)) | ||
142 | bank = 8; /* 8 banks */ | ||
143 | else | ||
144 | bank = 4; /* 4 banks */ | ||
145 | |||
146 | memsize = cs * (1 << (col+row)) * bank * dpath; | ||
147 | dt_fixup_memory(0, memsize); | ||
148 | } | ||
149 | |||
150 | #define SPRN_DBCR0_40X 0x3F2 | ||
151 | #define SPRN_DBCR0_44X 0x134 | ||
152 | #define DBCR0_RST_SYSTEM 0x30000000 | ||
153 | |||
154 | void ibm44x_dbcr_reset(void) | ||
155 | { | ||
156 | unsigned long tmp; | ||
157 | |||
158 | asm volatile ( | ||
159 | "mfspr %0,%1\n" | ||
160 | "oris %0,%0,%2@h\n" | ||
161 | "mtspr %1,%0" | ||
162 | : "=&r"(tmp) : "i"(SPRN_DBCR0_44X), "i"(DBCR0_RST_SYSTEM) | ||
163 | ); | ||
164 | |||
165 | } | ||
166 | |||
167 | void ibm40x_dbcr_reset(void) | ||
168 | { | ||
169 | unsigned long tmp; | ||
170 | |||
171 | asm volatile ( | ||
172 | "mfspr %0,%1\n" | ||
173 | "oris %0,%0,%2@h\n" | ||
174 | "mtspr %1,%0" | ||
175 | : "=&r"(tmp) : "i"(SPRN_DBCR0_40X), "i"(DBCR0_RST_SYSTEM) | ||
176 | ); | ||
177 | } | ||
178 | |||
179 | #define EMAC_RESET 0x20000000 | ||
180 | void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1) | ||
181 | { | ||
182 | /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */ | ||
183 | if (emac0) | ||
184 | *emac0 = EMAC_RESET; | ||
185 | if (emac1) | ||
186 | *emac1 = EMAC_RESET; | ||
187 | |||
188 | mtdcr(DCRN_MAL0_CFG, MAL_RESET); | ||
189 | } | ||
190 | |||
191 | /* Read 4xx EBC bus bridge registers to get mappings of the peripheral | ||
192 | * banks into the OPB address space */ | ||
193 | void ibm4xx_fixup_ebc_ranges(const char *ebc) | ||
194 | { | ||
195 | void *devp; | ||
196 | u32 bxcr; | ||
197 | u32 ranges[EBC_NUM_BANKS*4]; | ||
198 | u32 *p = ranges; | ||
199 | int i; | ||
200 | |||
201 | for (i = 0; i < EBC_NUM_BANKS; i++) { | ||
202 | mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i)); | ||
203 | bxcr = mfdcr(DCRN_EBC0_CFGDATA); | ||
204 | |||
205 | if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) { | ||
206 | *p++ = i; | ||
207 | *p++ = 0; | ||
208 | *p++ = bxcr & EBC_BXCR_BAS; | ||
209 | *p++ = EBC_BXCR_BANK_SIZE(bxcr); | ||
210 | } | ||
211 | } | ||
212 | |||
213 | devp = finddevice(ebc); | ||
214 | if (! devp) | ||
215 | fatal("Couldn't locate EBC node %s\n\r", ebc); | ||
216 | |||
217 | setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); | ||
218 | } | ||
219 | |||
220 | #define SPRN_CCR1 0x378 | ||
221 | void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) | ||
222 | { | ||
223 | u32 cpu, plb, opb, ebc, tb, uart0, m, vco; | ||
224 | u32 reg; | ||
225 | u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp; | ||
226 | |||
227 | mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0); | ||
228 | reg = mfdcr(DCRN_CPR0_DATA); | ||
229 | tmp = (reg & 0x000F0000) >> 16; | ||
230 | fwdva = tmp ? tmp : 16; | ||
231 | tmp = (reg & 0x00000700) >> 8; | ||
232 | fwdvb = tmp ? tmp : 8; | ||
233 | tmp = (reg & 0x1F000000) >> 24; | ||
234 | fbdv = tmp ? tmp : 32; | ||
235 | lfbdv = (reg & 0x0000007F); | ||
236 | |||
237 | mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0); | ||
238 | reg = mfdcr(DCRN_CPR0_DATA); | ||
239 | tmp = (reg & 0x03000000) >> 24; | ||
240 | opbdv0 = tmp ? tmp : 4; | ||
241 | |||
242 | mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0); | ||
243 | reg = mfdcr(DCRN_CPR0_DATA); | ||
244 | tmp = (reg & 0x07000000) >> 24; | ||
245 | perdv0 = tmp ? tmp : 8; | ||
246 | |||
247 | mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0); | ||
248 | reg = mfdcr(DCRN_CPR0_DATA); | ||
249 | tmp = (reg & 0x07000000) >> 24; | ||
250 | prbdv0 = tmp ? tmp : 8; | ||
251 | |||
252 | mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID); | ||
253 | reg = mfdcr(DCRN_CPR0_DATA); | ||
254 | tmp = (reg & 0x03000000) >> 24; | ||
255 | spcid0 = tmp ? tmp : 4; | ||
256 | |||
257 | /* Calculate M */ | ||
258 | mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0); | ||
259 | reg = mfdcr(DCRN_CPR0_DATA); | ||
260 | tmp = (reg & 0x03000000) >> 24; | ||
261 | if (tmp == 0) { /* PLL output */ | ||
262 | tmp = (reg & 0x20000000) >> 29; | ||
263 | if (!tmp) /* PLLOUTA */ | ||
264 | m = fbdv * lfbdv * fwdva; | ||
265 | else | ||
266 | m = fbdv * lfbdv * fwdvb; | ||
267 | } | ||
268 | else if (tmp == 1) /* CPU output */ | ||
269 | m = fbdv * fwdva; | ||
270 | else | ||
271 | m = perdv0 * opbdv0 * fwdvb; | ||
272 | |||
273 | vco = (m * sysclk) + (m >> 1); | ||
274 | cpu = vco / fwdva; | ||
275 | plb = vco / fwdvb / prbdv0; | ||
276 | opb = plb / opbdv0; | ||
277 | ebc = plb / perdv0; | ||
278 | |||
279 | /* FIXME */ | ||
280 | uart0 = ser_clk; | ||
281 | |||
282 | /* Figure out timebase. Either CPU or default TmrClk */ | ||
283 | asm volatile ( | ||
284 | "mfspr %0,%1\n" | ||
285 | : | ||
286 | "=&r"(reg) : "i"(SPRN_CCR1)); | ||
287 | if (reg & 0x0080) | ||
288 | tb = 25000000; /* TmrClk is 25MHz */ | ||
289 | else | ||
290 | tb = cpu; | ||
291 | |||
292 | dt_fixup_cpu_clocks(cpu, tb, 0); | ||
293 | dt_fixup_clock("/plb", plb); | ||
294 | dt_fixup_clock("/plb/opb", opb); | ||
295 | dt_fixup_clock("/plb/opb/ebc", ebc); | ||
296 | dt_fixup_clock("/plb/opb/serial@ef600300", uart0); | ||
297 | dt_fixup_clock("/plb/opb/serial@ef600400", uart0); | ||
298 | dt_fixup_clock("/plb/opb/serial@ef600500", uart0); | ||
299 | dt_fixup_clock("/plb/opb/serial@ef600600", uart0); | ||
300 | } | ||
diff --git a/arch/powerpc/boot/4xx.h b/arch/powerpc/boot/4xx.h new file mode 100644 index 000000000000..adba6a599a93 --- /dev/null +++ b/arch/powerpc/boot/4xx.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * PowerPC 4xx related functions | ||
3 | * | ||
4 | * Copyright 2007 IBM Corporation. | ||
5 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | #ifndef _POWERPC_BOOT_4XX_H_ | ||
12 | #define _POWERPC_BOOT_4XX_H_ | ||
13 | |||
14 | void ibm4xx_fixup_memsize(void); | ||
15 | void ibm4xx_denali_fixup_memsize(void); | ||
16 | void ibm44x_dbcr_reset(void); | ||
17 | void ibm40x_dbcr_reset(void); | ||
18 | void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1); | ||
19 | void ibm4xx_fixup_ebc_ranges(const char *ebc); | ||
20 | void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk); | ||
21 | |||
22 | #endif /* _POWERPC_BOOT_4XX_H_ */ | ||
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 61a6f34ca5ed..a6bba9a69e66 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -31,7 +31,7 @@ endif | |||
31 | 31 | ||
32 | BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) | 32 | BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) |
33 | 33 | ||
34 | $(obj)/44x.o: BOOTCFLAGS += -mcpu=440 | 34 | $(obj)/4xx.o: BOOTCFLAGS += -mcpu=440 |
35 | $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 | 35 | $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 |
36 | 36 | ||
37 | zlib := inffast.c inflate.c inftrees.c | 37 | zlib := inffast.c inflate.c inftrees.c |
@@ -44,10 +44,12 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ | |||
44 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ | 44 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ |
45 | ns16550.c serial.c simple_alloc.c div64.S util.S \ | 45 | ns16550.c serial.c simple_alloc.c div64.S util.S \ |
46 | gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ | 46 | gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ |
47 | 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c | 47 | 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ |
48 | src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ | 48 | cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c |
49 | src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.c \ | ||
49 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ | 50 | cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ |
50 | ps3-head.S ps3-hvcall.S ps3.c | 51 | ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ |
52 | cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c | ||
51 | src-boot := $(src-wlib) $(src-plat) empty.c | 53 | src-boot := $(src-wlib) $(src-plat) empty.c |
52 | 54 | ||
53 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 55 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
@@ -139,9 +141,15 @@ image-$(CONFIG_PPC_ISERIES) += zImage.iseries | |||
139 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage | 141 | image-$(CONFIG_DEFAULT_UIMAGE) += uImage |
140 | 142 | ||
141 | ifneq ($(CONFIG_DEVICE_TREE),"") | 143 | ifneq ($(CONFIG_DEVICE_TREE),"") |
144 | image-$(CONFIG_PPC_8xx) += cuImage.8xx | ||
145 | image-$(CONFIG_8260) += cuImage.pq2 | ||
146 | image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx | ||
142 | image-$(CONFIG_PPC_83xx) += cuImage.83xx | 147 | image-$(CONFIG_PPC_83xx) += cuImage.83xx |
143 | image-$(CONFIG_PPC_85xx) += cuImage.85xx | 148 | image-$(CONFIG_PPC_85xx) += cuImage.85xx |
144 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony | 149 | image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony |
150 | image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo | ||
151 | image-$(CONFIG_SEQUOIA) += cuImage.sequoia | ||
152 | image-$(CONFIG_WALNUT) += treeImage.walnut | ||
145 | endif | 153 | endif |
146 | 154 | ||
147 | # For 32-bit powermacs, build the COFF and miboot images | 155 | # For 32-bit powermacs, build the COFF and miboot images |
diff --git a/arch/powerpc/boot/bamboo.c b/arch/powerpc/boot/bamboo.c new file mode 100644 index 000000000000..f61fcdab1c7c --- /dev/null +++ b/arch/powerpc/boot/bamboo.c | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright IBM Corporation, 2007 | ||
3 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
4 | * | ||
5 | * Based on ebony wrapper: | ||
6 | * Copyright 2007 David Gibson, IBM Corporation. | ||
7 | * | ||
8 | * Clocking code based on code by: | ||
9 | * Stefan Roese <sr@denx.de> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; version 2 of the License | ||
14 | */ | ||
15 | #include <stdarg.h> | ||
16 | #include <stddef.h> | ||
17 | #include "types.h" | ||
18 | #include "elf.h" | ||
19 | #include "string.h" | ||
20 | #include "stdio.h" | ||
21 | #include "page.h" | ||
22 | #include "ops.h" | ||
23 | #include "dcr.h" | ||
24 | #include "4xx.h" | ||
25 | #include "44x.h" | ||
26 | |||
27 | static u8 *bamboo_mac0, *bamboo_mac1; | ||
28 | |||
29 | static void bamboo_fixups(void) | ||
30 | { | ||
31 | unsigned long sysclk = 33333333; | ||
32 | |||
33 | ibm440ep_fixup_clocks(sysclk, 11059200); | ||
34 | ibm4xx_fixup_memsize(); | ||
35 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); | ||
36 | dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1); | ||
37 | } | ||
38 | |||
39 | void bamboo_init(void *mac0, void *mac1) | ||
40 | { | ||
41 | platform_ops.fixups = bamboo_fixups; | ||
42 | platform_ops.exit = ibm44x_dbcr_reset; | ||
43 | bamboo_mac0 = mac0; | ||
44 | bamboo_mac1 = mac1; | ||
45 | ft_init(_dtb_start, 0, 32); | ||
46 | serial_console_init(); | ||
47 | } | ||
diff --git a/arch/powerpc/boot/cpm-serial.c b/arch/powerpc/boot/cpm-serial.c new file mode 100644 index 000000000000..fcb8b5e956bd --- /dev/null +++ b/arch/powerpc/boot/cpm-serial.c | |||
@@ -0,0 +1,249 @@ | |||
1 | /* | ||
2 | * CPM serial console support. | ||
3 | * | ||
4 | * Copyright 2007 Freescale Semiconductor, Inc. | ||
5 | * Author: Scott Wood <scottwood@freescale.com> | ||
6 | * | ||
7 | * It is assumed that the firmware (or the platform file) has already set | ||
8 | * up the port. | ||
9 | */ | ||
10 | |||
11 | #include "types.h" | ||
12 | #include "io.h" | ||
13 | #include "ops.h" | ||
14 | |||
15 | struct cpm_scc { | ||
16 | u32 gsmrl; | ||
17 | u32 gsmrh; | ||
18 | u16 psmr; | ||
19 | u8 res1[2]; | ||
20 | u16 todr; | ||
21 | u16 dsr; | ||
22 | u16 scce; | ||
23 | u8 res2[2]; | ||
24 | u16 sccm; | ||
25 | u8 res3; | ||
26 | u8 sccs; | ||
27 | u8 res4[8]; | ||
28 | }; | ||
29 | |||
30 | struct cpm_smc { | ||
31 | u8 res1[2]; | ||
32 | u16 smcmr; | ||
33 | u8 res2[2]; | ||
34 | u8 smce; | ||
35 | u8 res3[3]; | ||
36 | u8 smcm; | ||
37 | u8 res4[5]; | ||
38 | }; | ||
39 | |||
40 | struct cpm_param { | ||
41 | u16 rbase; | ||
42 | u16 tbase; | ||
43 | u8 rfcr; | ||
44 | u8 tfcr; | ||
45 | }; | ||
46 | |||
47 | struct cpm_bd { | ||
48 | u16 sc; /* Status and Control */ | ||
49 | u16 len; /* Data length in buffer */ | ||
50 | u8 *addr; /* Buffer address in host memory */ | ||
51 | }; | ||
52 | |||
53 | static void *cpcr; | ||
54 | static struct cpm_param *param; | ||
55 | static struct cpm_smc *smc; | ||
56 | static struct cpm_scc *scc; | ||
57 | struct cpm_bd *tbdf, *rbdf; | ||
58 | static u32 cpm_cmd; | ||
59 | static u8 *dpram_start; | ||
60 | |||
61 | static void (*do_cmd)(int op); | ||
62 | static void (*enable_port)(void); | ||
63 | static void (*disable_port)(void); | ||
64 | |||
65 | #define CPM_CMD_STOP_TX 4 | ||
66 | #define CPM_CMD_RESTART_TX 6 | ||
67 | #define CPM_CMD_INIT_RX_TX 0 | ||
68 | |||
69 | static void cpm1_cmd(int op) | ||
70 | { | ||
71 | while (in_be16(cpcr) & 1) | ||
72 | ; | ||
73 | |||
74 | out_be16(cpcr, (op << 8) | cpm_cmd | 1); | ||
75 | |||
76 | while (in_be16(cpcr) & 1) | ||
77 | ; | ||
78 | } | ||
79 | |||
80 | static void cpm2_cmd(int op) | ||
81 | { | ||
82 | while (in_be32(cpcr) & 0x10000) | ||
83 | ; | ||
84 | |||
85 | out_be32(cpcr, op | cpm_cmd | 0x10000); | ||
86 | |||
87 | while (in_be32(cpcr) & 0x10000) | ||
88 | ; | ||
89 | } | ||
90 | |||
91 | static void smc_disable_port(void) | ||
92 | { | ||
93 | do_cmd(CPM_CMD_STOP_TX); | ||
94 | out_be16(&smc->smcmr, in_be16(&smc->smcmr) & ~3); | ||
95 | } | ||
96 | |||
97 | static void scc_disable_port(void) | ||
98 | { | ||
99 | do_cmd(CPM_CMD_STOP_TX); | ||
100 | out_be32(&scc->gsmrl, in_be32(&scc->gsmrl) & ~0x30); | ||
101 | } | ||
102 | |||
103 | static void smc_enable_port(void) | ||
104 | { | ||
105 | out_be16(&smc->smcmr, in_be16(&smc->smcmr) | 3); | ||
106 | do_cmd(CPM_CMD_RESTART_TX); | ||
107 | } | ||
108 | |||
109 | static void scc_enable_port(void) | ||
110 | { | ||
111 | out_be32(&scc->gsmrl, in_be32(&scc->gsmrl) | 0x30); | ||
112 | do_cmd(CPM_CMD_RESTART_TX); | ||
113 | } | ||
114 | |||
115 | static int cpm_serial_open(void) | ||
116 | { | ||
117 | int dpaddr = 0x800; | ||
118 | disable_port(); | ||
119 | |||
120 | out_8(¶m->rfcr, 0x10); | ||
121 | out_8(¶m->tfcr, 0x10); | ||
122 | |||
123 | rbdf = (struct cpm_bd *)(dpram_start + dpaddr); | ||
124 | rbdf->addr = (u8 *)(rbdf + 2); | ||
125 | rbdf->sc = 0xa000; | ||
126 | rbdf->len = 1; | ||
127 | |||
128 | tbdf = rbdf + 1; | ||
129 | tbdf->addr = (u8 *)(rbdf + 2) + 1; | ||
130 | tbdf->sc = 0x2000; | ||
131 | tbdf->len = 1; | ||
132 | |||
133 | sync(); | ||
134 | out_be16(¶m->rbase, dpaddr); | ||
135 | out_be16(¶m->tbase, dpaddr + sizeof(struct cpm_bd)); | ||
136 | |||
137 | do_cmd(CPM_CMD_INIT_RX_TX); | ||
138 | |||
139 | enable_port(); | ||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static void cpm_serial_putc(unsigned char c) | ||
144 | { | ||
145 | while (tbdf->sc & 0x8000) | ||
146 | barrier(); | ||
147 | |||
148 | sync(); | ||
149 | |||
150 | tbdf->addr[0] = c; | ||
151 | eieio(); | ||
152 | tbdf->sc |= 0x8000; | ||
153 | } | ||
154 | |||
155 | static unsigned char cpm_serial_tstc(void) | ||
156 | { | ||
157 | barrier(); | ||
158 | return !(rbdf->sc & 0x8000); | ||
159 | } | ||
160 | |||
161 | static unsigned char cpm_serial_getc(void) | ||
162 | { | ||
163 | unsigned char c; | ||
164 | |||
165 | while (!cpm_serial_tstc()) | ||
166 | ; | ||
167 | |||
168 | sync(); | ||
169 | c = rbdf->addr[0]; | ||
170 | eieio(); | ||
171 | rbdf->sc |= 0x8000; | ||
172 | |||
173 | return c; | ||
174 | } | ||
175 | |||
176 | int cpm_console_init(void *devp, struct serial_console_data *scdp) | ||
177 | { | ||
178 | void *reg_virt[2]; | ||
179 | int is_smc = 0, is_cpm2 = 0, n; | ||
180 | unsigned long reg_phys; | ||
181 | void *parent; | ||
182 | |||
183 | if (dt_is_compatible(devp, "fsl,cpm1-smc-uart")) { | ||
184 | is_smc = 1; | ||
185 | } else if (dt_is_compatible(devp, "fsl,cpm2-scc-uart")) { | ||
186 | is_cpm2 = 1; | ||
187 | } else if (dt_is_compatible(devp, "fsl,cpm2-smc-uart")) { | ||
188 | is_cpm2 = 1; | ||
189 | is_smc = 1; | ||
190 | } | ||
191 | |||
192 | if (is_smc) { | ||
193 | enable_port = smc_enable_port; | ||
194 | disable_port = smc_disable_port; | ||
195 | } else { | ||
196 | enable_port = scc_enable_port; | ||
197 | disable_port = scc_disable_port; | ||
198 | } | ||
199 | |||
200 | if (is_cpm2) | ||
201 | do_cmd = cpm2_cmd; | ||
202 | else | ||
203 | do_cmd = cpm1_cmd; | ||
204 | |||
205 | n = getprop(devp, "fsl,cpm-command", &cpm_cmd, 4); | ||
206 | if (n < 4) | ||
207 | return -1; | ||
208 | |||
209 | n = getprop(devp, "virtual-reg", reg_virt, sizeof(reg_virt)); | ||
210 | if (n < (int)sizeof(reg_virt)) { | ||
211 | for (n = 0; n < 2; n++) { | ||
212 | if (!dt_xlate_reg(devp, n, ®_phys, NULL)) | ||
213 | return -1; | ||
214 | |||
215 | reg_virt[n] = (void *)reg_phys; | ||
216 | } | ||
217 | } | ||
218 | |||
219 | if (is_smc) | ||
220 | smc = reg_virt[0]; | ||
221 | else | ||
222 | scc = reg_virt[0]; | ||
223 | |||
224 | param = reg_virt[1]; | ||
225 | |||
226 | parent = get_parent(devp); | ||
227 | if (!parent) | ||
228 | return -1; | ||
229 | |||
230 | n = getprop(parent, "virtual-reg", reg_virt, sizeof(reg_virt)); | ||
231 | if (n < (int)sizeof(reg_virt)) { | ||
232 | for (n = 0; n < 2; n++) { | ||
233 | if (!dt_xlate_reg(parent, n, ®_phys, NULL)) | ||
234 | return -1; | ||
235 | |||
236 | reg_virt[n] = (void *)reg_phys; | ||
237 | } | ||
238 | } | ||
239 | |||
240 | cpcr = reg_virt[0]; | ||
241 | dpram_start = reg_virt[1]; | ||
242 | |||
243 | scdp->open = cpm_serial_open; | ||
244 | scdp->putc = cpm_serial_putc; | ||
245 | scdp->getc = cpm_serial_getc; | ||
246 | scdp->tstc = cpm_serial_tstc; | ||
247 | |||
248 | return 0; | ||
249 | } | ||
diff --git a/arch/powerpc/boot/cuboot-52xx.c b/arch/powerpc/boot/cuboot-52xx.c new file mode 100644 index 000000000000..9256a26d40e4 --- /dev/null +++ b/arch/powerpc/boot/cuboot-52xx.c | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for MPC5200 | ||
3 | * | ||
4 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
5 | * | ||
6 | * Copyright (c) 2007 Secret Lab Technologies Ltd. | ||
7 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include "ops.h" | ||
15 | #include "stdio.h" | ||
16 | #include "io.h" | ||
17 | #include "cuboot.h" | ||
18 | |||
19 | #define TARGET_PPC_MPC52xx | ||
20 | #include "ppcboot.h" | ||
21 | |||
22 | static bd_t bd; | ||
23 | |||
24 | static void platform_fixups(void) | ||
25 | { | ||
26 | void *soc, *reg; | ||
27 | int div; | ||
28 | u32 sysfreq; | ||
29 | |||
30 | |||
31 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
32 | dt_fixup_mac_addresses(bd.bi_enetaddr); | ||
33 | dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); | ||
34 | |||
35 | /* Unfortunately, the specific model number is encoded in the | ||
36 | * soc node name in existing dts files -- once that is fixed, | ||
37 | * this can do a simple path lookup. | ||
38 | */ | ||
39 | soc = find_node_by_devtype(NULL, "soc"); | ||
40 | if (soc) { | ||
41 | setprop(soc, "bus-frequency", &bd.bi_ipbfreq, | ||
42 | sizeof(bd.bi_ipbfreq)); | ||
43 | |||
44 | if (!dt_xlate_reg(soc, 0, (void*)®, NULL)) | ||
45 | return; | ||
46 | div = in_8(reg + 0x204) & 0x0020 ? 8 : 4; | ||
47 | sysfreq = bd.bi_busfreq * div; | ||
48 | setprop(soc, "system-frequency", &sysfreq, sizeof(sysfreq)); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
53 | unsigned long r6, unsigned long r7) | ||
54 | { | ||
55 | CUBOOT_INIT(); | ||
56 | ft_init(_dtb_start, _dtb_end - _dtb_start, 32); | ||
57 | serial_console_init(); | ||
58 | platform_ops.fixups = platform_fixups; | ||
59 | } | ||
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c index 296025d8b295..a0505509abcc 100644 --- a/arch/powerpc/boot/cuboot-83xx.c +++ b/arch/powerpc/boot/cuboot-83xx.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include "ppcboot.h" | 18 | #include "ppcboot.h" |
19 | 19 | ||
20 | static bd_t bd; | 20 | static bd_t bd; |
21 | extern char _dtb_start[], _dtb_end[]; | ||
22 | 21 | ||
23 | static void platform_fixups(void) | 22 | static void platform_fixups(void) |
24 | { | 23 | { |
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c index 10f0f697c935..345dcbecef0f 100644 --- a/arch/powerpc/boot/cuboot-85xx.c +++ b/arch/powerpc/boot/cuboot-85xx.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include "ppcboot.h" | 18 | #include "ppcboot.h" |
19 | 19 | ||
20 | static bd_t bd; | 20 | static bd_t bd; |
21 | extern char _dtb_start[], _dtb_end[]; | ||
22 | 21 | ||
23 | static void platform_fixups(void) | 22 | static void platform_fixups(void) |
24 | { | 23 | { |
diff --git a/arch/powerpc/boot/cuboot-8xx.c b/arch/powerpc/boot/cuboot-8xx.c new file mode 100644 index 000000000000..88ed84015a8b --- /dev/null +++ b/arch/powerpc/boot/cuboot-8xx.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for 8xx | ||
3 | * | ||
4 | * Author: Scott Wood <scottwood@freescale.com> | ||
5 | * | ||
6 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include "ops.h" | ||
14 | #include "stdio.h" | ||
15 | #include "cuboot.h" | ||
16 | |||
17 | #define TARGET_8xx | ||
18 | #define TARGET_HAS_ETH1 | ||
19 | #include "ppcboot.h" | ||
20 | |||
21 | static bd_t bd; | ||
22 | |||
23 | static void platform_fixups(void) | ||
24 | { | ||
25 | void *node; | ||
26 | |||
27 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
28 | dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); | ||
29 | dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq); | ||
30 | |||
31 | node = finddevice("/soc/cpm"); | ||
32 | if (node) { | ||
33 | setprop(node, "clock-frequency", &bd.bi_busfreq, 4); | ||
34 | setprop(node, "fsl,brg-frequency", &bd.bi_busfreq, 4); | ||
35 | } | ||
36 | } | ||
37 | |||
38 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
39 | unsigned long r6, unsigned long r7) | ||
40 | { | ||
41 | CUBOOT_INIT(); | ||
42 | ft_init(_dtb_start, _dtb_end - _dtb_start, 32); | ||
43 | serial_console_init(); | ||
44 | platform_ops.fixups = platform_fixups; | ||
45 | } | ||
diff --git a/arch/powerpc/boot/cuboot-bamboo.c b/arch/powerpc/boot/cuboot-bamboo.c new file mode 100644 index 000000000000..900c7ff2b7e9 --- /dev/null +++ b/arch/powerpc/boot/cuboot-bamboo.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for Bamboo | ||
3 | * | ||
4 | * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
5 | * | ||
6 | * Copyright 2007 IBM Corporation | ||
7 | * | ||
8 | * Based on cuboot-ebony.c | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License version 2 as published | ||
12 | * by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include "ops.h" | ||
16 | #include "stdio.h" | ||
17 | #include "44x.h" | ||
18 | #include "cuboot.h" | ||
19 | |||
20 | #define TARGET_44x | ||
21 | #include "ppcboot.h" | ||
22 | |||
23 | static bd_t bd; | ||
24 | |||
25 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
26 | unsigned long r6, unsigned long r7) | ||
27 | { | ||
28 | CUBOOT_INIT(); | ||
29 | bamboo_init(&bd.bi_enetaddr, &bd.bi_enet1addr); | ||
30 | } | ||
diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c new file mode 100644 index 000000000000..8021fd4a43bc --- /dev/null +++ b/arch/powerpc/boot/cuboot-pq2.c | |||
@@ -0,0 +1,283 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for PowerQUICC II | ||
3 | * (a.k.a. 82xx with CPM, not the 8240 family of chips) | ||
4 | * | ||
5 | * Author: Scott Wood <scottwood@freescale.com> | ||
6 | * | ||
7 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include "ops.h" | ||
15 | #include "stdio.h" | ||
16 | #include "cuboot.h" | ||
17 | #include "io.h" | ||
18 | |||
19 | #define TARGET_CPM2 | ||
20 | #define TARGET_HAS_ETH1 | ||
21 | #include "ppcboot.h" | ||
22 | |||
23 | static bd_t bd; | ||
24 | |||
25 | struct cs_range { | ||
26 | u32 csnum; | ||
27 | u32 base; /* must be zero */ | ||
28 | u32 addr; | ||
29 | u32 size; | ||
30 | }; | ||
31 | |||
32 | struct pci_range { | ||
33 | u32 flags; | ||
34 | u32 pci_addr[2]; | ||
35 | u32 phys_addr; | ||
36 | u32 size[2]; | ||
37 | }; | ||
38 | |||
39 | struct cs_range cs_ranges_buf[MAX_PROP_LEN / sizeof(struct cs_range)]; | ||
40 | struct pci_range pci_ranges_buf[MAX_PROP_LEN / sizeof(struct pci_range)]; | ||
41 | |||
42 | /* Different versions of u-boot put the BCSR in different places, and | ||
43 | * some don't set up the PCI PIC at all, so we assume the device tree is | ||
44 | * sane and update the BRx registers appropriately. | ||
45 | * | ||
46 | * For any node defined as compatible with fsl,pq2-chipselect, | ||
47 | * #address/#size must be 2/1 for chipselect bus, 1/1 for parent bus, | ||
48 | * and ranges must be for whole chip selects. | ||
49 | */ | ||
50 | static void update_cs_ranges(void) | ||
51 | { | ||
52 | u32 ctrl_ph; | ||
53 | void *ctrl_node, *bus_node, *parent_node; | ||
54 | u32 *ctrl_addr; | ||
55 | unsigned long ctrl_size; | ||
56 | u32 naddr, nsize; | ||
57 | int len; | ||
58 | int i; | ||
59 | |||
60 | bus_node = finddevice("/chipselect"); | ||
61 | if (!bus_node || !dt_is_compatible(bus_node, "fsl,pq2-chipselect")) | ||
62 | return; | ||
63 | |||
64 | dt_get_reg_format(bus_node, &naddr, &nsize); | ||
65 | if (naddr != 2 || nsize != 1) | ||
66 | goto err; | ||
67 | |||
68 | parent_node = get_parent(bus_node); | ||
69 | if (!parent_node) | ||
70 | goto err; | ||
71 | |||
72 | dt_get_reg_format(parent_node, &naddr, &nsize); | ||
73 | if (naddr != 1 || nsize != 1) | ||
74 | goto err; | ||
75 | |||
76 | len = getprop(bus_node, "fsl,ctrl", &ctrl_ph, 4); | ||
77 | if (len != 4) | ||
78 | goto err; | ||
79 | |||
80 | ctrl_node = find_node_by_prop_value(NULL, "linux,phandle", | ||
81 | (char *)&ctrl_ph, 4); | ||
82 | if (!ctrl_node) | ||
83 | goto err; | ||
84 | |||
85 | if (!dt_is_compatible(ctrl_node, "fsl,pq2-chipselect-ctrl")) | ||
86 | goto err; | ||
87 | |||
88 | if (!dt_xlate_reg(ctrl_node, 0, (unsigned long *)&ctrl_addr, | ||
89 | &ctrl_size)) | ||
90 | goto err; | ||
91 | |||
92 | len = getprop(bus_node, "ranges", cs_ranges_buf, sizeof(cs_ranges_buf)); | ||
93 | |||
94 | for (i = 0; i < len / sizeof(struct cs_range); i++) { | ||
95 | u32 base, option; | ||
96 | int cs = cs_ranges_buf[i].csnum; | ||
97 | if (cs >= ctrl_size / 8) | ||
98 | goto err; | ||
99 | |||
100 | if (cs_ranges_buf[i].base != 0) | ||
101 | goto err; | ||
102 | |||
103 | base = in_be32(&ctrl_addr[cs * 2]); | ||
104 | |||
105 | /* If CS is already valid, use the existing flags. | ||
106 | * Otherwise, guess a sane default. | ||
107 | */ | ||
108 | if (base & 1) { | ||
109 | base &= 0x7fff; | ||
110 | option = in_be32(&ctrl_addr[cs * 2 + 1]) & 0x7fff; | ||
111 | } else { | ||
112 | base = 0x1801; | ||
113 | option = 0x10; | ||
114 | } | ||
115 | |||
116 | out_be32(&ctrl_addr[cs * 2], 0); | ||
117 | out_be32(&ctrl_addr[cs * 2 + 1], | ||
118 | option | ~(cs_ranges_buf[i].size - 1)); | ||
119 | out_be32(&ctrl_addr[cs * 2], base | cs_ranges_buf[i].addr); | ||
120 | } | ||
121 | |||
122 | return; | ||
123 | |||
124 | err: | ||
125 | printf("Bad /chipselect or fsl,pq2-chipselect-ctrl node\r\n"); | ||
126 | } | ||
127 | |||
128 | /* Older u-boots don't set PCI up properly. Update the hardware to match | ||
129 | * the device tree. The prefetch mem region and non-prefetch mem region | ||
130 | * must be contiguous in the host bus. As required by the PCI binding, | ||
131 | * PCI #addr/#size must be 3/2. The parent bus must be 1/1. Only | ||
132 | * 32-bit PCI is supported. All three region types (prefetchable mem, | ||
133 | * non-prefetchable mem, and I/O) must be present. | ||
134 | */ | ||
135 | static void fixup_pci(void) | ||
136 | { | ||
137 | struct pci_range *mem = NULL, *mmio = NULL, | ||
138 | *io = NULL, *mem_base = NULL; | ||
139 | u32 *pci_regs[3]; | ||
140 | u8 *soc_regs; | ||
141 | int i, len; | ||
142 | void *ctrl_node, *bus_node, *parent_node, *soc_node; | ||
143 | u32 naddr, nsize, bus_ph, mem_log2; | ||
144 | |||
145 | ctrl_node = finddevice("/soc/pci"); | ||
146 | if (!ctrl_node || !dt_is_compatible(ctrl_node, "fsl,pq2-pci")) | ||
147 | return; | ||
148 | |||
149 | soc_node = finddevice("/soc"); | ||
150 | if (!soc_node || !dt_is_compatible(soc_node, "fsl,pq2-soc")) | ||
151 | goto err; | ||
152 | |||
153 | for (i = 0; i < 3; i++) | ||
154 | if (!dt_xlate_reg(ctrl_node, i, | ||
155 | (unsigned long *)&pci_regs[i], NULL)) | ||
156 | goto err; | ||
157 | |||
158 | if (!dt_xlate_reg(soc_node, 0, (unsigned long *)&soc_regs, NULL)) | ||
159 | goto err; | ||
160 | |||
161 | len = getprop(ctrl_node, "fsl,bus", &bus_ph, 4); | ||
162 | if (len != 4) | ||
163 | goto err; | ||
164 | |||
165 | bus_node = find_node_by_prop_value(NULL, "linux,phandle", | ||
166 | (char *)&bus_ph, 4); | ||
167 | if (!bus_node) | ||
168 | goto err; | ||
169 | |||
170 | dt_get_reg_format(bus_node, &naddr, &nsize); | ||
171 | if (naddr != 3 || nsize != 2) | ||
172 | goto err; | ||
173 | |||
174 | parent_node = get_parent(bus_node); | ||
175 | if (!parent_node) | ||
176 | goto err; | ||
177 | |||
178 | dt_get_reg_format(parent_node, &naddr, &nsize); | ||
179 | if (naddr != 1 || nsize != 1) | ||
180 | goto err; | ||
181 | |||
182 | len = getprop(bus_node, "ranges", pci_ranges_buf, | ||
183 | sizeof(pci_ranges_buf)); | ||
184 | |||
185 | for (i = 0; i < len / sizeof(struct pci_range); i++) { | ||
186 | u32 flags = pci_ranges_buf[i].flags & 0x43000000; | ||
187 | |||
188 | if (flags == 0x42000000) | ||
189 | mem = &pci_ranges_buf[i]; | ||
190 | else if (flags == 0x02000000) | ||
191 | mmio = &pci_ranges_buf[i]; | ||
192 | else if (flags == 0x01000000) | ||
193 | io = &pci_ranges_buf[i]; | ||
194 | } | ||
195 | |||
196 | if (!mem || !mmio || !io) | ||
197 | goto err; | ||
198 | |||
199 | if (mem->phys_addr + mem->size[1] == mmio->phys_addr) | ||
200 | mem_base = mem; | ||
201 | else if (mmio->phys_addr + mmio->size[1] == mem->phys_addr) | ||
202 | mem_base = mmio; | ||
203 | else | ||
204 | goto err; | ||
205 | |||
206 | out_be32(&pci_regs[1][0], mem_base->phys_addr | 1); | ||
207 | out_be32(&pci_regs[2][0], ~(mem->size[1] + mmio->size[1] - 1)); | ||
208 | |||
209 | out_be32(&pci_regs[1][1], io->phys_addr | 1); | ||
210 | out_be32(&pci_regs[2][1], ~(io->size[1] - 1)); | ||
211 | |||
212 | out_le32(&pci_regs[0][0], mem->pci_addr[1] >> 12); | ||
213 | out_le32(&pci_regs[0][2], mem->phys_addr >> 12); | ||
214 | out_le32(&pci_regs[0][4], (~(mem->size[1] - 1) >> 12) | 0xa0000000); | ||
215 | |||
216 | out_le32(&pci_regs[0][6], mmio->pci_addr[1] >> 12); | ||
217 | out_le32(&pci_regs[0][8], mmio->phys_addr >> 12); | ||
218 | out_le32(&pci_regs[0][10], (~(mmio->size[1] - 1) >> 12) | 0x80000000); | ||
219 | |||
220 | out_le32(&pci_regs[0][12], io->pci_addr[1] >> 12); | ||
221 | out_le32(&pci_regs[0][14], io->phys_addr >> 12); | ||
222 | out_le32(&pci_regs[0][16], (~(io->size[1] - 1) >> 12) | 0xc0000000); | ||
223 | |||
224 | /* Inbound translation */ | ||
225 | out_le32(&pci_regs[0][58], 0); | ||
226 | out_le32(&pci_regs[0][60], 0); | ||
227 | |||
228 | mem_log2 = 1 << (__ilog2_u32(bd.bi_memsize - 1) + 1); | ||
229 | out_le32(&pci_regs[0][62], 0xa0000000 | ~((1 << (mem_log2 - 12)) - 1)); | ||
230 | |||
231 | /* If PCI is disabled, drive RST high to enable. */ | ||
232 | if (!(in_le32(&pci_regs[0][32]) & 1)) { | ||
233 | /* Tpvrh (Power valid to RST# high) 100 ms */ | ||
234 | udelay(100000); | ||
235 | |||
236 | out_le32(&pci_regs[0][32], 1); | ||
237 | |||
238 | /* Trhfa (RST# high to first cfg access) 2^25 clocks */ | ||
239 | udelay(1020000); | ||
240 | } | ||
241 | |||
242 | /* Enable bus master and memory access */ | ||
243 | out_le32(&pci_regs[0][64], 0x80000004); | ||
244 | out_le32(&pci_regs[0][65], in_le32(&pci_regs[0][65]) | 6); | ||
245 | |||
246 | /* Park the bus on PCI, and elevate PCI's arbitration priority, | ||
247 | * as required by section 9.6 of the user's manual. | ||
248 | */ | ||
249 | out_8(&soc_regs[0x10028], 3); | ||
250 | out_be32((u32 *)&soc_regs[0x1002c], 0x01236745); | ||
251 | |||
252 | return; | ||
253 | |||
254 | err: | ||
255 | printf("Bad PCI node\r\n"); | ||
256 | } | ||
257 | |||
258 | static void pq2_platform_fixups(void) | ||
259 | { | ||
260 | void *node; | ||
261 | |||
262 | dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); | ||
263 | dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); | ||
264 | dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); | ||
265 | |||
266 | node = finddevice("/soc/cpm"); | ||
267 | if (node) { | ||
268 | setprop(node, "clock-frequency", &bd.bi_cpmfreq, 4); | ||
269 | setprop(node, "fsl,brg-frequency", &bd.bi_brgfreq, 4); | ||
270 | } | ||
271 | |||
272 | update_cs_ranges(); | ||
273 | fixup_pci(); | ||
274 | } | ||
275 | |||
276 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
277 | unsigned long r6, unsigned long r7) | ||
278 | { | ||
279 | CUBOOT_INIT(); | ||
280 | ft_init(_dtb_start, _dtb_end - _dtb_start, 32); | ||
281 | serial_console_init(); | ||
282 | platform_ops.fixups = pq2_platform_fixups; | ||
283 | } | ||
diff --git a/arch/powerpc/boot/cuboot-sequoia.c b/arch/powerpc/boot/cuboot-sequoia.c new file mode 100644 index 000000000000..ec635e0bd4ec --- /dev/null +++ b/arch/powerpc/boot/cuboot-sequoia.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for Sequoia | ||
3 | * | ||
4 | * Valentine Barshak <vbarshak@ru.mvista.com> | ||
5 | * Copyright 2007 MontaVista Software, Inc | ||
6 | * | ||
7 | * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au> | ||
8 | * Copyright IBM Corporation, 2007 | ||
9 | * | ||
10 | * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
11 | * Copyright IBM Corporation, 2007 | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or | ||
14 | * modify it under the terms of the GNU General Public License | ||
15 | * as published by the Free Software Foundation; version 2 of the License | ||
16 | */ | ||
17 | |||
18 | #include <stdarg.h> | ||
19 | #include <stddef.h> | ||
20 | #include "types.h" | ||
21 | #include "elf.h" | ||
22 | #include "string.h" | ||
23 | #include "stdio.h" | ||
24 | #include "page.h" | ||
25 | #include "ops.h" | ||
26 | #include "dcr.h" | ||
27 | #include "4xx.h" | ||
28 | #include "44x.h" | ||
29 | #include "cuboot.h" | ||
30 | |||
31 | #define TARGET_4xx | ||
32 | #define TARGET_44x | ||
33 | #include "ppcboot.h" | ||
34 | |||
35 | static bd_t bd; | ||
36 | |||
37 | |||
38 | static void sequoia_fixups(void) | ||
39 | { | ||
40 | unsigned long sysclk = 33333333; | ||
41 | |||
42 | ibm440ep_fixup_clocks(sysclk, 11059200); | ||
43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | ||
44 | ibm4xx_denali_fixup_memsize(); | ||
45 | dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); | ||
46 | } | ||
47 | |||
48 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
49 | unsigned long r6, unsigned long r7) | ||
50 | { | ||
51 | CUBOOT_INIT(); | ||
52 | platform_ops.fixups = sequoia_fixups; | ||
53 | platform_ops.exit = ibm44x_dbcr_reset; | ||
54 | ft_init(_dtb_start, 0, 32); | ||
55 | serial_console_init(); | ||
56 | } | ||
diff --git a/arch/powerpc/boot/cuboot.c b/arch/powerpc/boot/cuboot.c index 65795468ad6f..7768b2306b7a 100644 --- a/arch/powerpc/boot/cuboot.c +++ b/arch/powerpc/boot/cuboot.c | |||
@@ -17,9 +17,6 @@ | |||
17 | 17 | ||
18 | #include "ppcboot.h" | 18 | #include "ppcboot.h" |
19 | 19 | ||
20 | extern char _end[]; | ||
21 | extern char _dtb_start[], _dtb_end[]; | ||
22 | |||
23 | void cuboot_init(unsigned long r4, unsigned long r5, | 20 | void cuboot_init(unsigned long r4, unsigned long r5, |
24 | unsigned long r6, unsigned long r7, | 21 | unsigned long r6, unsigned long r7, |
25 | unsigned long end_of_ram) | 22 | unsigned long end_of_ram) |
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h index 14b44aa96fea..83b88aa92888 100644 --- a/arch/powerpc/boot/dcr.h +++ b/arch/powerpc/boot/dcr.h | |||
@@ -121,4 +121,22 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2C | |||
121 | #define DCRN_CPC0_MIRQ1 0x0ed | 121 | #define DCRN_CPC0_MIRQ1 0x0ed |
122 | #define DCRN_CPC0_JTAGID 0x0ef | 122 | #define DCRN_CPC0_JTAGID 0x0ef |
123 | 123 | ||
124 | #define DCRN_MAL0_CFG 0x180 | ||
125 | #define MAL_RESET 0x80000000 | ||
126 | |||
127 | /* 440EP Clock/Power-on Reset regs */ | ||
128 | #define DCRN_CPR0_ADDR 0xc | ||
129 | #define DCRN_CPR0_DATA 0xd | ||
130 | #define CPR0_PLLD0 0x60 | ||
131 | #define CPR0_OPBD0 0xc0 | ||
132 | #define CPR0_PERD0 0xe0 | ||
133 | #define CPR0_PRIMBD0 0xa0 | ||
134 | #define CPR0_SCPID 0x120 | ||
135 | #define CPR0_PLLC0 0x40 | ||
136 | |||
137 | /* 405GP Clocking/Power Management/Chip Control regs */ | ||
138 | #define DCRN_CPC0_PLLMR 0xb0 | ||
139 | #define DCRN_405_CPC0_CR0 0xb1 | ||
140 | #define DCRN_405_CPC0_CR1 0xb2 | ||
141 | |||
124 | #endif /* _PPC_BOOT_DCR_H_ */ | 142 | #endif /* _PPC_BOOT_DCR_H_ */ |
diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c index c9951550ed2c..e5dfe4497313 100644 --- a/arch/powerpc/boot/devtree.c +++ b/arch/powerpc/boot/devtree.c | |||
@@ -74,6 +74,8 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus) | |||
74 | if (bus > 0) | 74 | if (bus > 0) |
75 | setprop_val(devp, "bus-frequency", bus); | 75 | setprop_val(devp, "bus-frequency", bus); |
76 | } | 76 | } |
77 | |||
78 | timebase_period_ns = 1000000000 / tb; | ||
77 | } | 79 | } |
78 | 80 | ||
79 | void dt_fixup_clock(const char *path, u32 freq) | 81 | void dt_fixup_clock(const char *path, u32 freq) |
@@ -86,34 +88,38 @@ void dt_fixup_clock(const char *path, u32 freq) | |||
86 | } | 88 | } |
87 | } | 89 | } |
88 | 90 | ||
91 | void dt_fixup_mac_address(u32 index, const u8 *addr) | ||
92 | { | ||
93 | void *devp = find_node_by_prop_value(NULL, "linux,network-index", | ||
94 | (void*)&index, sizeof(index)); | ||
95 | |||
96 | if (devp) { | ||
97 | printf("ENET%d: local-mac-address <-" | ||
98 | " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index, | ||
99 | addr[0], addr[1], addr[2], | ||
100 | addr[3], addr[4], addr[5]); | ||
101 | |||
102 | setprop(devp, "local-mac-address", addr, 6); | ||
103 | } | ||
104 | } | ||
105 | |||
89 | void __dt_fixup_mac_addresses(u32 startindex, ...) | 106 | void __dt_fixup_mac_addresses(u32 startindex, ...) |
90 | { | 107 | { |
91 | va_list ap; | 108 | va_list ap; |
92 | u32 index = startindex; | 109 | u32 index = startindex; |
93 | void *devp; | ||
94 | const u8 *addr; | 110 | const u8 *addr; |
95 | 111 | ||
96 | va_start(ap, startindex); | 112 | va_start(ap, startindex); |
97 | while ((addr = va_arg(ap, const u8 *))) { | ||
98 | devp = find_node_by_prop_value(NULL, "linux,network-index", | ||
99 | (void*)&index, sizeof(index)); | ||
100 | |||
101 | printf("ENET%d: local-mac-address <-" | ||
102 | " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index, | ||
103 | addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); | ||
104 | 113 | ||
105 | if (devp) | 114 | while ((addr = va_arg(ap, const u8 *))) |
106 | setprop(devp, "local-mac-address", addr, 6); | 115 | dt_fixup_mac_address(index++, addr); |
107 | 116 | ||
108 | index++; | ||
109 | } | ||
110 | va_end(ap); | 117 | va_end(ap); |
111 | } | 118 | } |
112 | 119 | ||
113 | #define MAX_ADDR_CELLS 4 | 120 | #define MAX_ADDR_CELLS 4 |
114 | #define MAX_RANGES 8 | ||
115 | 121 | ||
116 | static void get_reg_format(void *node, u32 *naddr, u32 *nsize) | 122 | void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize) |
117 | { | 123 | { |
118 | if (getprop(node, "#address-cells", naddr, 4) != 4) | 124 | if (getprop(node, "#address-cells", naddr, 4) != 4) |
119 | *naddr = 2; | 125 | *naddr = 2; |
@@ -207,7 +213,7 @@ static int find_range(u32 *reg, u32 *ranges, int nregaddr, | |||
207 | * In particular, PCI is not supported. Also, only the beginning of the | 213 | * In particular, PCI is not supported. Also, only the beginning of the |
208 | * reg block is tracked; size is ignored except in ranges. | 214 | * reg block is tracked; size is ignored except in ranges. |
209 | */ | 215 | */ |
210 | static u32 dt_xlate_buf[MAX_ADDR_CELLS * MAX_RANGES * 3]; | 216 | static u32 prop_buf[MAX_PROP_LEN / 4]; |
211 | 217 | ||
212 | static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, | 218 | static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, |
213 | unsigned long *size) | 219 | unsigned long *size) |
@@ -216,14 +222,14 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, | |||
216 | u32 this_addr[MAX_ADDR_CELLS]; | 222 | u32 this_addr[MAX_ADDR_CELLS]; |
217 | void *parent; | 223 | void *parent; |
218 | u64 ret_addr, ret_size; | 224 | u64 ret_addr, ret_size; |
219 | u32 naddr, nsize, prev_naddr; | 225 | u32 naddr, nsize, prev_naddr, prev_nsize; |
220 | int buflen, offset; | 226 | int buflen, offset; |
221 | 227 | ||
222 | parent = get_parent(node); | 228 | parent = get_parent(node); |
223 | if (!parent) | 229 | if (!parent) |
224 | return 0; | 230 | return 0; |
225 | 231 | ||
226 | get_reg_format(parent, &naddr, &nsize); | 232 | dt_get_reg_format(parent, &naddr, &nsize); |
227 | 233 | ||
228 | if (nsize > 2) | 234 | if (nsize > 2) |
229 | return 0; | 235 | return 0; |
@@ -231,41 +237,47 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr, | |||
231 | offset = (naddr + nsize) * res; | 237 | offset = (naddr + nsize) * res; |
232 | 238 | ||
233 | if (reglen < offset + naddr + nsize || | 239 | if (reglen < offset + naddr + nsize || |
234 | sizeof(dt_xlate_buf) < offset + naddr + nsize) | 240 | MAX_PROP_LEN < (offset + naddr + nsize) * 4) |
235 | return 0; | 241 | return 0; |
236 | 242 | ||
237 | copy_val(last_addr, dt_xlate_buf + offset, naddr); | 243 | copy_val(last_addr, prop_buf + offset, naddr); |
238 | 244 | ||
239 | ret_size = dt_xlate_buf[offset + naddr]; | 245 | ret_size = prop_buf[offset + naddr]; |
240 | if (nsize == 2) { | 246 | if (nsize == 2) { |
241 | ret_size <<= 32; | 247 | ret_size <<= 32; |
242 | ret_size |= dt_xlate_buf[offset + naddr + 1]; | 248 | ret_size |= prop_buf[offset + naddr + 1]; |
243 | } | 249 | } |
244 | 250 | ||
245 | while ((node = get_parent(node))) { | 251 | for (;;) { |
246 | prev_naddr = naddr; | 252 | prev_naddr = naddr; |
253 | prev_nsize = nsize; | ||
254 | node = parent; | ||
255 | |||
256 | parent = get_parent(node); | ||
257 | if (!parent) | ||
258 | break; | ||
247 | 259 | ||
248 | get_reg_format(node, &naddr, &nsize); | 260 | dt_get_reg_format(parent, &naddr, &nsize); |
249 | 261 | ||
250 | buflen = getprop(node, "ranges", dt_xlate_buf, | 262 | buflen = getprop(node, "ranges", prop_buf, |
251 | sizeof(dt_xlate_buf)); | 263 | sizeof(prop_buf)); |
252 | if (buflen < 0) | 264 | if (buflen == 0) |
253 | continue; | 265 | continue; |
254 | if (buflen > sizeof(dt_xlate_buf)) | 266 | if (buflen < 0 || buflen > sizeof(prop_buf)) |
255 | return 0; | 267 | return 0; |
256 | 268 | ||
257 | offset = find_range(last_addr, dt_xlate_buf, prev_naddr, | 269 | offset = find_range(last_addr, prop_buf, prev_naddr, |
258 | naddr, nsize, buflen / 4); | 270 | naddr, prev_nsize, buflen / 4); |
259 | 271 | ||
260 | if (offset < 0) | 272 | if (offset < 0) |
261 | return 0; | 273 | return 0; |
262 | 274 | ||
263 | copy_val(this_addr, dt_xlate_buf + offset, prev_naddr); | 275 | copy_val(this_addr, prop_buf + offset, prev_naddr); |
264 | 276 | ||
265 | if (!sub_reg(last_addr, this_addr)) | 277 | if (!sub_reg(last_addr, this_addr)) |
266 | return 0; | 278 | return 0; |
267 | 279 | ||
268 | copy_val(this_addr, dt_xlate_buf + offset + prev_naddr, naddr); | 280 | copy_val(this_addr, prop_buf + offset + prev_naddr, naddr); |
269 | 281 | ||
270 | if (!add_reg(last_addr, this_addr, naddr)) | 282 | if (!add_reg(last_addr, this_addr, naddr)) |
271 | return 0; | 283 | return 0; |
@@ -292,16 +304,35 @@ int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size) | |||
292 | { | 304 | { |
293 | int reglen; | 305 | int reglen; |
294 | 306 | ||
295 | reglen = getprop(node, "reg", dt_xlate_buf, sizeof(dt_xlate_buf)) / 4; | 307 | reglen = getprop(node, "reg", prop_buf, sizeof(prop_buf)) / 4; |
296 | return dt_xlate(node, res, reglen, addr, size); | 308 | return dt_xlate(node, res, reglen, addr, size); |
297 | } | 309 | } |
298 | 310 | ||
299 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) | 311 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) |
300 | { | 312 | { |
301 | 313 | ||
302 | if (buflen > sizeof(dt_xlate_buf)) | 314 | if (buflen > sizeof(prop_buf)) |
303 | return 0; | 315 | return 0; |
304 | 316 | ||
305 | memcpy(dt_xlate_buf, buf, buflen); | 317 | memcpy(prop_buf, buf, buflen); |
306 | return dt_xlate(node, 0, buflen / 4, xlated_addr, NULL); | 318 | return dt_xlate(node, 0, buflen / 4, xlated_addr, NULL); |
307 | } | 319 | } |
320 | |||
321 | int dt_is_compatible(void *node, const char *compat) | ||
322 | { | ||
323 | char *buf = (char *)prop_buf; | ||
324 | int len, pos; | ||
325 | |||
326 | len = getprop(node, "compatible", buf, MAX_PROP_LEN); | ||
327 | if (len < 0) | ||
328 | return 0; | ||
329 | |||
330 | for (pos = 0; pos < len; pos++) { | ||
331 | if (!strcmp(buf + pos, compat)) | ||
332 | return 1; | ||
333 | |||
334 | pos += strnlen(&buf[pos], len - pos); | ||
335 | } | ||
336 | |||
337 | return 0; | ||
338 | } | ||
diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts new file mode 100644 index 000000000000..a88ae3d218a5 --- /dev/null +++ b/arch/powerpc/boot/dts/bamboo.dts | |||
@@ -0,0 +1,244 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC Bamboo | ||
3 | * | ||
4 | * Copyright (c) 2006, 2007 IBM Corp. | ||
5 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
6 | * | ||
7 | * FIXME: Draft only! | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without | ||
11 | * any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | / { | ||
15 | #address-cells = <2>; | ||
16 | #size-cells = <1>; | ||
17 | model = "amcc,bamboo"; | ||
18 | compatible = "amcc,bamboo"; | ||
19 | dcr-parent = <&/cpus/PowerPC,440EP@0>; | ||
20 | |||
21 | cpus { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | |||
25 | PowerPC,440EP@0 { | ||
26 | device_type = "cpu"; | ||
27 | reg = <0>; | ||
28 | clock-frequency = <0>; /* Filled in by zImage */ | ||
29 | timebase-frequency = <0>; /* Filled in by zImage */ | ||
30 | i-cache-line-size = <20>; | ||
31 | d-cache-line-size = <20>; | ||
32 | i-cache-size = <8000>; | ||
33 | d-cache-size = <8000>; | ||
34 | dcr-controller; | ||
35 | dcr-access-method = "native"; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | memory { | ||
40 | device_type = "memory"; | ||
41 | reg = <0 0 0>; /* Filled in by zImage */ | ||
42 | }; | ||
43 | |||
44 | UIC0: interrupt-controller0 { | ||
45 | compatible = "ibm,uic-440ep","ibm,uic"; | ||
46 | interrupt-controller; | ||
47 | cell-index = <0>; | ||
48 | dcr-reg = <0c0 009>; | ||
49 | #address-cells = <0>; | ||
50 | #size-cells = <0>; | ||
51 | #interrupt-cells = <2>; | ||
52 | }; | ||
53 | |||
54 | UIC1: interrupt-controller1 { | ||
55 | compatible = "ibm,uic-440ep","ibm,uic"; | ||
56 | interrupt-controller; | ||
57 | cell-index = <1>; | ||
58 | dcr-reg = <0d0 009>; | ||
59 | #address-cells = <0>; | ||
60 | #size-cells = <0>; | ||
61 | #interrupt-cells = <2>; | ||
62 | interrupts = <1e 4 1f 4>; /* cascade */ | ||
63 | interrupt-parent = <&UIC0>; | ||
64 | }; | ||
65 | |||
66 | SDR0: sdr { | ||
67 | compatible = "ibm,sdr-440ep"; | ||
68 | dcr-reg = <00e 002>; | ||
69 | }; | ||
70 | |||
71 | CPR0: cpr { | ||
72 | compatible = "ibm,cpr-440ep"; | ||
73 | dcr-reg = <00c 002>; | ||
74 | }; | ||
75 | |||
76 | plb { | ||
77 | compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4"; | ||
78 | #address-cells = <2>; | ||
79 | #size-cells = <1>; | ||
80 | ranges; | ||
81 | clock-frequency = <0>; /* Filled in by zImage */ | ||
82 | |||
83 | SDRAM0: sdram { | ||
84 | compatible = "ibm,sdram-440ep", "ibm,sdram-405gp"; | ||
85 | dcr-reg = <010 2>; | ||
86 | }; | ||
87 | |||
88 | DMA0: dma { | ||
89 | compatible = "ibm,dma-440ep", "ibm,dma-440gp"; | ||
90 | dcr-reg = <100 027>; | ||
91 | }; | ||
92 | |||
93 | MAL0: mcmal { | ||
94 | compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal"; | ||
95 | dcr-reg = <180 62>; | ||
96 | num-tx-chans = <4>; | ||
97 | num-rx-chans = <2>; | ||
98 | interrupt-parent = <&MAL0>; | ||
99 | interrupts = <0 1 2 3 4>; | ||
100 | #interrupt-cells = <1>; | ||
101 | interrupt-map = </*TXEOB*/ 0 &UIC0 a 4 | ||
102 | /*RXEOB*/ 1 &UIC0 b 4 | ||
103 | /*SERR*/ 2 &UIC1 0 4 | ||
104 | /*TXDE*/ 3 &UIC1 1 4 | ||
105 | /*RXDE*/ 4 &UIC1 3 4>; | ||
106 | }; | ||
107 | |||
108 | POB0: opb { | ||
109 | compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb"; | ||
110 | #address-cells = <1>; | ||
111 | #size-cells = <1>; | ||
112 | /* Bamboo is oddball in the 44x world and doesn't use the ERPN | ||
113 | * bits. | ||
114 | */ | ||
115 | ranges = <00000000 0 00000000 80000000 | ||
116 | 80000000 0 80000000 80000000>; | ||
117 | interrupt-parent = <&UIC1>; | ||
118 | interrupts = <7 4>; | ||
119 | clock-frequency = <0>; /* Filled in by zImage */ | ||
120 | |||
121 | EBC0: ebc { | ||
122 | compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc"; | ||
123 | dcr-reg = <012 2>; | ||
124 | #address-cells = <2>; | ||
125 | #size-cells = <1>; | ||
126 | clock-frequency = <0>; /* Filled in by zImage */ | ||
127 | ranges; | ||
128 | interrupts = <5 1>; | ||
129 | interrupt-parent = <&UIC1>; | ||
130 | }; | ||
131 | |||
132 | UART0: serial@ef600300 { | ||
133 | device_type = "serial"; | ||
134 | compatible = "ns16550"; | ||
135 | reg = <ef600300 8>; | ||
136 | virtual-reg = <ef600300>; | ||
137 | clock-frequency = <0>; /* Filled in by zImage */ | ||
138 | current-speed = <1c200>; | ||
139 | interrupt-parent = <&UIC0>; | ||
140 | interrupts = <0 4>; | ||
141 | }; | ||
142 | |||
143 | UART1: serial@ef600400 { | ||
144 | device_type = "serial"; | ||
145 | compatible = "ns16550"; | ||
146 | reg = <ef600400 8>; | ||
147 | virtual-reg = <ef600400>; | ||
148 | clock-frequency = <0>; | ||
149 | current-speed = <0>; | ||
150 | interrupt-parent = <&UIC0>; | ||
151 | interrupts = <1 4>; | ||
152 | }; | ||
153 | |||
154 | UART2: serial@ef600500 { | ||
155 | device_type = "serial"; | ||
156 | compatible = "ns16550"; | ||
157 | reg = <ef600500 8>; | ||
158 | virtual-reg = <ef600500>; | ||
159 | clock-frequency = <0>; | ||
160 | current-speed = <0>; | ||
161 | interrupt-parent = <&UIC0>; | ||
162 | interrupts = <3 4>; | ||
163 | }; | ||
164 | |||
165 | UART3: serial@ef600600 { | ||
166 | device_type = "serial"; | ||
167 | compatible = "ns16550"; | ||
168 | reg = <ef600600 8>; | ||
169 | virtual-reg = <ef600600>; | ||
170 | clock-frequency = <0>; | ||
171 | current-speed = <0>; | ||
172 | interrupt-parent = <&UIC0>; | ||
173 | interrupts = <4 4>; | ||
174 | }; | ||
175 | |||
176 | IIC0: i2c@ef600700 { | ||
177 | device_type = "i2c"; | ||
178 | compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; | ||
179 | reg = <ef600700 14>; | ||
180 | interrupt-parent = <&UIC0>; | ||
181 | interrupts = <2 4>; | ||
182 | }; | ||
183 | |||
184 | IIC1: i2c@ef600800 { | ||
185 | device_type = "i2c"; | ||
186 | compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; | ||
187 | reg = <ef600800 14>; | ||
188 | interrupt-parent = <&UIC0>; | ||
189 | interrupts = <7 4>; | ||
190 | }; | ||
191 | |||
192 | ZMII0: emac-zmii@ef600d00 { | ||
193 | device_type = "zmii-interface"; | ||
194 | compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii"; | ||
195 | reg = <ef600d00 c>; | ||
196 | }; | ||
197 | |||
198 | EMAC0: ethernet@ef600e00 { | ||
199 | device_type = "network"; | ||
200 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | ||
201 | interrupt-parent = <&UIC1>; | ||
202 | interrupts = <1c 4 1d 4>; | ||
203 | reg = <ef600e00 70>; | ||
204 | local-mac-address = [000000000000]; | ||
205 | mal-device = <&MAL0>; | ||
206 | mal-tx-channel = <0 1>; | ||
207 | mal-rx-channel = <0>; | ||
208 | cell-index = <0>; | ||
209 | max-frame-size = <5dc>; | ||
210 | rx-fifo-size = <1000>; | ||
211 | tx-fifo-size = <800>; | ||
212 | phy-mode = "rmii"; | ||
213 | phy-map = <00000001>; | ||
214 | zmii-device = <&ZMII0>; | ||
215 | zmii-channel = <0>; | ||
216 | }; | ||
217 | |||
218 | EMAC1: ethernet@ef600f00 { | ||
219 | device_type = "network"; | ||
220 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | ||
221 | interrupt-parent = <&UIC1>; | ||
222 | interrupts = <1e 4 1f 4>; | ||
223 | reg = <ef600f00 70>; | ||
224 | local-mac-address = [000000000000]; | ||
225 | mal-device = <&MAL0>; | ||
226 | mal-tx-channel = <2 3>; | ||
227 | mal-rx-channel = <1>; | ||
228 | cell-index = <1>; | ||
229 | max-frame-size = <5dc>; | ||
230 | rx-fifo-size = <1000>; | ||
231 | tx-fifo-size = <800>; | ||
232 | phy-mode = "rmii"; | ||
233 | phy-map = <00000001>; | ||
234 | zmii-device = <&ZMII0>; | ||
235 | zmii-channel = <1>; | ||
236 | }; | ||
237 | }; | ||
238 | }; | ||
239 | |||
240 | chosen { | ||
241 | linux,stdout-path = "/plb/opb/serial@ef600300"; | ||
242 | bootargs = "console=ttyS0,115200"; | ||
243 | }; | ||
244 | }; | ||
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts index c5f99613fc7b..bc259972aaa0 100644 --- a/arch/powerpc/boot/dts/ebony.dts +++ b/arch/powerpc/boot/dts/ebony.dts | |||
@@ -9,10 +9,6 @@ | |||
9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
10 | * License version 2. This program is licensed "as is" without | 10 | * License version 2. This program is licensed "as is" without |
11 | * any warranty of any kind, whether express or implied. | 11 | * any warranty of any kind, whether express or implied. |
12 | * | ||
13 | * To build: | ||
14 | * dtc -I dts -O asm -o ebony.S -b 0 ebony.dts | ||
15 | * dtc -I dts -O dtb -o ebony.dtb -b 0 ebony.dts | ||
16 | */ | 12 | */ |
17 | 13 | ||
18 | / { | 14 | / { |
@@ -142,13 +138,16 @@ | |||
142 | interrupt-parent = <&UIC1>; | 138 | interrupt-parent = <&UIC1>; |
143 | 139 | ||
144 | small-flash@0,80000 { | 140 | small-flash@0,80000 { |
145 | device_type = "rom"; | 141 | compatible = "jedec-flash"; |
146 | compatible = "direct-mapped"; | ||
147 | probe-type = "JEDEC"; | ||
148 | bank-width = <1>; | 142 | bank-width = <1>; |
149 | partitions = <0 80000>; | ||
150 | partition-names = "OpenBIOS"; | ||
151 | reg = <0 80000 80000>; | 143 | reg = <0 80000 80000>; |
144 | #address-cells = <1>; | ||
145 | #size-cells = <1>; | ||
146 | partition@0 { | ||
147 | label = "OpenBIOS"; | ||
148 | reg = <0 80000>; | ||
149 | read-only; | ||
150 | }; | ||
152 | }; | 151 | }; |
153 | 152 | ||
154 | ds1743@1,0 { | 153 | ds1743@1,0 { |
@@ -158,14 +157,19 @@ | |||
158 | }; | 157 | }; |
159 | 158 | ||
160 | large-flash@2,0 { | 159 | large-flash@2,0 { |
161 | device_type = "rom"; | 160 | compatible = "jedec-flash"; |
162 | compatible = "direct-mapped"; | ||
163 | probe-type = "JEDEC"; | ||
164 | bank-width = <1>; | 161 | bank-width = <1>; |
165 | partitions = <0 380000 | ||
166 | 380000 80000>; | ||
167 | partition-names = "fs", "firmware"; | ||
168 | reg = <2 0 400000>; | 162 | reg = <2 0 400000>; |
163 | #address-cells = <1>; | ||
164 | #size-cells = <1>; | ||
165 | partition@0 { | ||
166 | label = "fs"; | ||
167 | reg = <0 380000>; | ||
168 | }; | ||
169 | partition@380000 { | ||
170 | label = "firmware"; | ||
171 | reg = <380000 80000>; | ||
172 | }; | ||
169 | }; | 173 | }; |
170 | 174 | ||
171 | ir@3,0 { | 175 | ir@3,0 { |
@@ -175,6 +179,7 @@ | |||
175 | fpga@7,0 { | 179 | fpga@7,0 { |
176 | compatible = "Ebony-FPGA"; | 180 | compatible = "Ebony-FPGA"; |
177 | reg = <7 0 10>; | 181 | reg = <7 0 10>; |
182 | virtual-reg = <e8300000>; | ||
178 | }; | 183 | }; |
179 | }; | 184 | }; |
180 | 185 | ||
diff --git a/arch/powerpc/boot/dts/holly.dts b/arch/powerpc/boot/dts/holly.dts index 80a4fab8ee37..b5d87895fe06 100644 --- a/arch/powerpc/boot/dts/holly.dts +++ b/arch/powerpc/boot/dts/holly.dts | |||
@@ -8,10 +8,6 @@ | |||
8 | * This file is licensed under the terms of the GNU General Public | 8 | * This file is licensed under the terms of the GNU General Public |
9 | * License version 2. This program is licensed "as is" without | 9 | * License version 2. This program is licensed "as is" without |
10 | * any warranty of any kind, whether express or implied. | 10 | * any warranty of any kind, whether express or implied. |
11 | * | ||
12 | * To build: | ||
13 | * dtc -I dts -O asm -o holly.S -b 0 holly.dts | ||
14 | * dtc -I dts -O dtb -o holly.dtb -b 0 holly.dts | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | / { | 13 | / { |
@@ -35,7 +31,6 @@ | |||
35 | timebase-frequency = <2faf080>; | 31 | timebase-frequency = <2faf080>; |
36 | clock-frequency = <23c34600>; | 32 | clock-frequency = <23c34600>; |
37 | bus-frequency = <bebc200>; | 33 | bus-frequency = <bebc200>; |
38 | 32-bit; | ||
39 | }; | 34 | }; |
40 | }; | 35 | }; |
41 | 36 | ||
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts index 122537419d9f..ec71ab819fee 100644 --- a/arch/powerpc/boot/dts/kuroboxHD.dts +++ b/arch/powerpc/boot/dts/kuroboxHD.dts | |||
@@ -15,9 +15,6 @@ | |||
15 | 15 | ||
16 | XXXX add flash parts, rtc, ?? | 16 | XXXX add flash parts, rtc, ?? |
17 | 17 | ||
18 | build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | ||
19 | |||
20 | |||
21 | */ | 18 | */ |
22 | 19 | ||
23 | / { | 20 | / { |
@@ -50,7 +47,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
50 | soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */ | 47 | soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */ |
51 | #address-cells = <1>; | 48 | #address-cells = <1>; |
52 | #size-cells = <1>; | 49 | #size-cells = <1>; |
53 | #interrupt-cells = <2>; | ||
54 | device_type = "soc"; | 50 | device_type = "soc"; |
55 | compatible = "mpc10x"; | 51 | compatible = "mpc10x"; |
56 | store-gathering = <0>; /* 0 == off, !0 == on */ | 52 | store-gathering = <0>; /* 0 == off, !0 == on */ |
@@ -72,7 +68,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
72 | 68 | ||
73 | rtc@32 { | 69 | rtc@32 { |
74 | device_type = "rtc"; | 70 | device_type = "rtc"; |
75 | compatible = "ricoh,rs5c372b"; | 71 | compatible = "ricoh,rs5c372a"; |
76 | reg = <32>; | 72 | reg = <32>; |
77 | }; | 73 | }; |
78 | }; | 74 | }; |
@@ -83,7 +79,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
83 | reg = <80004500 8>; | 79 | reg = <80004500 8>; |
84 | clock-frequency = <5d08d88>; | 80 | clock-frequency = <5d08d88>; |
85 | current-speed = <2580>; | 81 | current-speed = <2580>; |
86 | interrupts = <9 2>; | 82 | interrupts = <9 0>; |
87 | interrupt-parent = <&mpic>; | 83 | interrupt-parent = <&mpic>; |
88 | }; | 84 | }; |
89 | 85 | ||
@@ -104,7 +100,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
104 | compatible = "chrp,open-pic"; | 100 | compatible = "chrp,open-pic"; |
105 | interrupt-controller; | 101 | interrupt-controller; |
106 | reg = <80040000 40000>; | 102 | reg = <80040000 40000>; |
107 | built-in; | ||
108 | }; | 103 | }; |
109 | 104 | ||
110 | pci@fec00000 { | 105 | pci@fec00000 { |
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts index 579aa8b967d9..32ecd2319928 100644 --- a/arch/powerpc/boot/dts/kuroboxHG.dts +++ b/arch/powerpc/boot/dts/kuroboxHG.dts | |||
@@ -15,9 +15,6 @@ | |||
15 | 15 | ||
16 | XXXX add flash parts, rtc, ?? | 16 | XXXX add flash parts, rtc, ?? |
17 | 17 | ||
18 | build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | ||
19 | |||
20 | |||
21 | */ | 18 | */ |
22 | 19 | ||
23 | / { | 20 | / { |
@@ -50,7 +47,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
50 | soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */ | 47 | soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */ |
51 | #address-cells = <1>; | 48 | #address-cells = <1>; |
52 | #size-cells = <1>; | 49 | #size-cells = <1>; |
53 | #interrupt-cells = <2>; | ||
54 | device_type = "soc"; | 50 | device_type = "soc"; |
55 | compatible = "mpc10x"; | 51 | compatible = "mpc10x"; |
56 | store-gathering = <0>; /* 0 == off, !0 == on */ | 52 | store-gathering = <0>; /* 0 == off, !0 == on */ |
@@ -72,7 +68,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
72 | 68 | ||
73 | rtc@32 { | 69 | rtc@32 { |
74 | device_type = "rtc"; | 70 | device_type = "rtc"; |
75 | compatible = "ricoh,rs5c372b"; | 71 | compatible = "ricoh,rs5c372a"; |
76 | reg = <32>; | 72 | reg = <32>; |
77 | }; | 73 | }; |
78 | }; | 74 | }; |
@@ -83,7 +79,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
83 | reg = <80004500 8>; | 79 | reg = <80004500 8>; |
84 | clock-frequency = <7c044a8>; | 80 | clock-frequency = <7c044a8>; |
85 | current-speed = <2580>; | 81 | current-speed = <2580>; |
86 | interrupts = <9 2>; | 82 | interrupts = <9 0>; |
87 | interrupt-parent = <&mpic>; | 83 | interrupt-parent = <&mpic>; |
88 | }; | 84 | }; |
89 | 85 | ||
@@ -104,7 +100,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
104 | compatible = "chrp,open-pic"; | 100 | compatible = "chrp,open-pic"; |
105 | interrupt-controller; | 101 | interrupt-controller; |
106 | reg = <80040000 40000>; | 102 | reg = <80040000 40000>; |
107 | built-in; | ||
108 | }; | 103 | }; |
109 | 104 | ||
110 | pci@fec00000 { | 105 | pci@fec00000 { |
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index d29308fe4c24..324e1bd2aa60 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts | |||
@@ -37,7 +37,6 @@ | |||
37 | timebase-frequency = <0>; // from bootloader | 37 | timebase-frequency = <0>; // from bootloader |
38 | bus-frequency = <0>; // from bootloader | 38 | bus-frequency = <0>; // from bootloader |
39 | clock-frequency = <0>; // from bootloader | 39 | clock-frequency = <0>; // from bootloader |
40 | 32-bit; | ||
41 | }; | 40 | }; |
42 | }; | 41 | }; |
43 | 42 | ||
@@ -50,10 +49,9 @@ | |||
50 | model = "fsl,mpc5200"; | 49 | model = "fsl,mpc5200"; |
51 | compatible = "mpc5200"; | 50 | compatible = "mpc5200"; |
52 | revision = ""; // from bootloader | 51 | revision = ""; // from bootloader |
53 | #interrupt-cells = <3>; | ||
54 | device_type = "soc"; | 52 | device_type = "soc"; |
55 | ranges = <0 f0000000 f0010000>; | 53 | ranges = <0 f0000000 0000c000>; |
56 | reg = <f0000000 00010000>; | 54 | reg = <f0000000 00000100>; |
57 | bus-frequency = <0>; // from bootloader | 55 | bus-frequency = <0>; // from bootloader |
58 | system-frequency = <0>; // from bootloader | 56 | system-frequency = <0>; // from bootloader |
59 | 57 | ||
@@ -69,7 +67,6 @@ | |||
69 | device_type = "interrupt-controller"; | 67 | device_type = "interrupt-controller"; |
70 | compatible = "mpc5200-pic"; | 68 | compatible = "mpc5200-pic"; |
71 | reg = <500 80>; | 69 | reg = <500 80>; |
72 | built-in; | ||
73 | }; | 70 | }; |
74 | 71 | ||
75 | gpt@600 { // General Purpose Timer | 72 | gpt@600 { // General Purpose Timer |
@@ -185,27 +182,6 @@ | |||
185 | interrupt-parent = <&mpc5200_pic>; | 182 | interrupt-parent = <&mpc5200_pic>; |
186 | }; | 183 | }; |
187 | 184 | ||
188 | pci@0d00 { | ||
189 | #interrupt-cells = <1>; | ||
190 | #size-cells = <2>; | ||
191 | #address-cells = <3>; | ||
192 | device_type = "pci"; | ||
193 | compatible = "mpc5200-pci"; | ||
194 | reg = <d00 100>; | ||
195 | interrupt-map-mask = <f800 0 0 7>; | ||
196 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 | ||
197 | c000 0 0 2 &mpc5200_pic 0 0 3 | ||
198 | c000 0 0 3 &mpc5200_pic 0 0 3 | ||
199 | c000 0 0 4 &mpc5200_pic 0 0 3>; | ||
200 | clock-frequency = <0>; // From boot loader | ||
201 | interrupts = <2 8 0 2 9 0 2 a 0>; | ||
202 | interrupt-parent = <&mpc5200_pic>; | ||
203 | bus-range = <0 0>; | ||
204 | ranges = <42000000 0 80000000 80000000 0 20000000 | ||
205 | 02000000 0 a0000000 a0000000 0 10000000 | ||
206 | 01000000 0 00000000 b0000000 0 01000000>; | ||
207 | }; | ||
208 | |||
209 | spi@f00 { | 185 | spi@f00 { |
210 | device_type = "spi"; | 186 | device_type = "spi"; |
211 | compatible = "mpc5200-spi"; | 187 | compatible = "mpc5200-spi"; |
@@ -340,4 +316,25 @@ | |||
340 | reg = <8000 4000>; | 316 | reg = <8000 4000>; |
341 | }; | 317 | }; |
342 | }; | 318 | }; |
319 | |||
320 | pci@f0000d00 { | ||
321 | #interrupt-cells = <1>; | ||
322 | #size-cells = <2>; | ||
323 | #address-cells = <3>; | ||
324 | device_type = "pci"; | ||
325 | compatible = "mpc5200-pci"; | ||
326 | reg = <f0000d00 100>; | ||
327 | interrupt-map-mask = <f800 0 0 7>; | ||
328 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 | ||
329 | c000 0 0 2 &mpc5200_pic 0 0 3 | ||
330 | c000 0 0 3 &mpc5200_pic 0 0 3 | ||
331 | c000 0 0 4 &mpc5200_pic 0 0 3>; | ||
332 | clock-frequency = <0>; // From boot loader | ||
333 | interrupts = <2 8 0 2 9 0 2 a 0>; | ||
334 | interrupt-parent = <&mpc5200_pic>; | ||
335 | bus-range = <0 0>; | ||
336 | ranges = <42000000 0 80000000 80000000 0 20000000 | ||
337 | 02000000 0 a0000000 a0000000 0 10000000 | ||
338 | 01000000 0 00000000 b0000000 0 01000000>; | ||
339 | }; | ||
343 | }; | 340 | }; |
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index f242531f0451..3f74f73f70ad 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts | |||
@@ -37,7 +37,6 @@ | |||
37 | timebase-frequency = <0>; // from bootloader | 37 | timebase-frequency = <0>; // from bootloader |
38 | bus-frequency = <0>; // from bootloader | 38 | bus-frequency = <0>; // from bootloader |
39 | clock-frequency = <0>; // from bootloader | 39 | clock-frequency = <0>; // from bootloader |
40 | 32-bit; | ||
41 | }; | 40 | }; |
42 | }; | 41 | }; |
43 | 42 | ||
@@ -50,10 +49,9 @@ | |||
50 | model = "fsl,mpc5200b"; | 49 | model = "fsl,mpc5200b"; |
51 | compatible = "mpc5200"; | 50 | compatible = "mpc5200"; |
52 | revision = ""; // from bootloader | 51 | revision = ""; // from bootloader |
53 | #interrupt-cells = <3>; | ||
54 | device_type = "soc"; | 52 | device_type = "soc"; |
55 | ranges = <0 f0000000 f0010000>; | 53 | ranges = <0 f0000000 0000c000>; |
56 | reg = <f0000000 00010000>; | 54 | reg = <f0000000 00000100>; |
57 | bus-frequency = <0>; // from bootloader | 55 | bus-frequency = <0>; // from bootloader |
58 | system-frequency = <0>; // from bootloader | 56 | system-frequency = <0>; // from bootloader |
59 | 57 | ||
@@ -69,7 +67,6 @@ | |||
69 | device_type = "interrupt-controller"; | 67 | device_type = "interrupt-controller"; |
70 | compatible = "mpc5200b-pic\0mpc5200-pic"; | 68 | compatible = "mpc5200b-pic\0mpc5200-pic"; |
71 | reg = <500 80>; | 69 | reg = <500 80>; |
72 | built-in; | ||
73 | }; | 70 | }; |
74 | 71 | ||
75 | gpt@600 { // General Purpose Timer | 72 | gpt@600 { // General Purpose Timer |
@@ -185,32 +182,6 @@ | |||
185 | interrupt-parent = <&mpc5200_pic>; | 182 | interrupt-parent = <&mpc5200_pic>; |
186 | }; | 183 | }; |
187 | 184 | ||
188 | pci@0d00 { | ||
189 | #interrupt-cells = <1>; | ||
190 | #size-cells = <2>; | ||
191 | #address-cells = <3>; | ||
192 | device_type = "pci"; | ||
193 | compatible = "mpc5200b-pci\0mpc5200-pci"; | ||
194 | reg = <d00 100>; | ||
195 | interrupt-map-mask = <f800 0 0 7>; | ||
196 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot | ||
197 | c000 0 0 2 &mpc5200_pic 1 1 3 | ||
198 | c000 0 0 3 &mpc5200_pic 1 2 3 | ||
199 | c000 0 0 4 &mpc5200_pic 1 3 3 | ||
200 | |||
201 | c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot | ||
202 | c800 0 0 2 &mpc5200_pic 1 2 3 | ||
203 | c800 0 0 3 &mpc5200_pic 1 3 3 | ||
204 | c800 0 0 4 &mpc5200_pic 0 0 3>; | ||
205 | clock-frequency = <0>; // From boot loader | ||
206 | interrupts = <2 8 0 2 9 0 2 a 0>; | ||
207 | interrupt-parent = <&mpc5200_pic>; | ||
208 | bus-range = <0 0>; | ||
209 | ranges = <42000000 0 80000000 80000000 0 20000000 | ||
210 | 02000000 0 a0000000 a0000000 0 10000000 | ||
211 | 01000000 0 00000000 b0000000 0 01000000>; | ||
212 | }; | ||
213 | |||
214 | spi@f00 { | 185 | spi@f00 { |
215 | device_type = "spi"; | 186 | device_type = "spi"; |
216 | compatible = "mpc5200b-spi\0mpc5200-spi"; | 187 | compatible = "mpc5200b-spi\0mpc5200-spi"; |
@@ -345,4 +316,30 @@ | |||
345 | reg = <8000 4000>; | 316 | reg = <8000 4000>; |
346 | }; | 317 | }; |
347 | }; | 318 | }; |
319 | |||
320 | pci@f0000d00 { | ||
321 | #interrupt-cells = <1>; | ||
322 | #size-cells = <2>; | ||
323 | #address-cells = <3>; | ||
324 | device_type = "pci"; | ||
325 | compatible = "mpc5200b-pci\0mpc5200-pci"; | ||
326 | reg = <f0000d00 100>; | ||
327 | interrupt-map-mask = <f800 0 0 7>; | ||
328 | interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot | ||
329 | c000 0 0 2 &mpc5200_pic 1 1 3 | ||
330 | c000 0 0 3 &mpc5200_pic 1 2 3 | ||
331 | c000 0 0 4 &mpc5200_pic 1 3 3 | ||
332 | |||
333 | c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot | ||
334 | c800 0 0 2 &mpc5200_pic 1 2 3 | ||
335 | c800 0 0 3 &mpc5200_pic 1 3 3 | ||
336 | c800 0 0 4 &mpc5200_pic 0 0 3>; | ||
337 | clock-frequency = <0>; // From boot loader | ||
338 | interrupts = <2 8 0 2 9 0 2 a 0>; | ||
339 | interrupt-parent = <&mpc5200_pic>; | ||
340 | bus-range = <0 0>; | ||
341 | ranges = <42000000 0 80000000 80000000 0 20000000 | ||
342 | 02000000 0 a0000000 a0000000 0 10000000 | ||
343 | 01000000 0 00000000 b0000000 0 01000000>; | ||
344 | }; | ||
348 | }; | 345 | }; |
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts index b9158eb2797e..88cd37da13ef 100644 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts | |||
@@ -31,7 +31,6 @@ | |||
31 | timebase-frequency = <0>; // 33 MHz, from uboot | 31 | timebase-frequency = <0>; // 33 MHz, from uboot |
32 | clock-frequency = <0>; // From U-Boot | 32 | clock-frequency = <0>; // From U-Boot |
33 | bus-frequency = <0>; // From U-Boot | 33 | bus-frequency = <0>; // From U-Boot |
34 | 32-bit; | ||
35 | }; | 34 | }; |
36 | }; | 35 | }; |
37 | 36 | ||
@@ -44,7 +43,6 @@ | |||
44 | tsi108@c0000000 { | 43 | tsi108@c0000000 { |
45 | #address-cells = <1>; | 44 | #address-cells = <1>; |
46 | #size-cells = <1>; | 45 | #size-cells = <1>; |
47 | #interrupt-cells = <2>; | ||
48 | device_type = "tsi-bridge"; | 46 | device_type = "tsi-bridge"; |
49 | ranges = <00000000 c0000000 00010000>; | 47 | ranges = <00000000 c0000000 00010000>; |
50 | reg = <c0000000 00010000>; | 48 | reg = <c0000000 00010000>; |
@@ -128,7 +126,6 @@ | |||
128 | #address-cells = <0>; | 126 | #address-cells = <0>; |
129 | #interrupt-cells = <2>; | 127 | #interrupt-cells = <2>; |
130 | reg = <7400 400>; | 128 | reg = <7400 400>; |
131 | built-in; | ||
132 | compatible = "chrp,open-pic"; | 129 | compatible = "chrp,open-pic"; |
133 | device_type = "open-pic"; | 130 | device_type = "open-pic"; |
134 | big-endian; | 131 | big-endian; |
@@ -180,7 +177,6 @@ | |||
180 | device_type = "pic-router"; | 177 | device_type = "pic-router"; |
181 | #address-cells = <0>; | 178 | #address-cells = <0>; |
182 | #interrupt-cells = <2>; | 179 | #interrupt-cells = <2>; |
183 | built-in; | ||
184 | big-endian; | 180 | big-endian; |
185 | interrupts = <17 2>; | 181 | interrupts = <17 2>; |
186 | interrupt-parent = <&mpic>; | 182 | interrupt-parent = <&mpic>; |
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 1934b800278e..43130541799a 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts | |||
@@ -10,207 +10,204 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | / { | 12 | / { |
13 | model = "MPC8272ADS"; | 13 | model = "MPC8272ADS"; |
14 | compatible = "MPC8260ADS"; | 14 | compatible = "MPC8260ADS"; |
15 | #address-cells = <1>; | 15 | #address-cells = <1>; |
16 | #size-cells = <1>; | 16 | #size-cells = <1>; |
17 | 17 | ||
18 | cpus { | 18 | cpus { |
19 | #address-cells = <1>; | 19 | #address-cells = <1>; |
20 | #size-cells = <0>; | 20 | #size-cells = <0>; |
21 | 21 | ||
22 | PowerPC,8272@0 { | 22 | PowerPC,8272@0 { |
23 | device_type = "cpu"; | 23 | device_type = "cpu"; |
24 | reg = <0>; | 24 | reg = <0>; |
25 | d-cache-line-size = <20>; // 32 bytes | 25 | d-cache-line-size = <20>; // 32 bytes |
26 | i-cache-line-size = <20>; // 32 bytes | 26 | i-cache-line-size = <20>; // 32 bytes |
27 | d-cache-size = <4000>; // L1, 16K | 27 | d-cache-size = <4000>; // L1, 16K |
28 | i-cache-size = <4000>; // L1, 16K | 28 | i-cache-size = <4000>; // L1, 16K |
29 | timebase-frequency = <0>; | 29 | timebase-frequency = <0>; |
30 | bus-frequency = <0>; | 30 | bus-frequency = <0>; |
31 | clock-frequency = <0>; | 31 | clock-frequency = <0>; |
32 | 32-bit; | 32 | }; |
33 | }; | 33 | }; |
34 | }; | 34 | |
35 | 35 | pci_pic: interrupt-controller@f8200000 { | |
36 | pci_pic: interrupt-controller@f8200000 { | 36 | #address-cells = <0>; |
37 | #address-cells = <0>; | 37 | #interrupt-cells = <2>; |
38 | #interrupt-cells = <2>; | 38 | interrupt-controller; |
39 | interrupt-controller; | 39 | reg = <f8200000 f8200004>; |
40 | reg = <f8200000 f8200004>; | 40 | device_type = "pci-pic"; |
41 | built-in; | 41 | }; |
42 | device_type = "pci-pic"; | 42 | |
43 | }; | 43 | memory { |
44 | memory { | 44 | device_type = "memory"; |
45 | device_type = "memory"; | 45 | reg = <00000000 4000000 f4500000 00000020>; |
46 | reg = <00000000 4000000 f4500000 00000020>; | 46 | }; |
47 | }; | 47 | |
48 | 48 | chosen { | |
49 | chosen { | 49 | name = "chosen"; |
50 | name = "chosen"; | 50 | linux,platform = <0>; |
51 | linux,platform = <0>; | ||
52 | interrupt-controller = <&Cpm_pic>; | 51 | interrupt-controller = <&Cpm_pic>; |
53 | }; | 52 | }; |
54 | 53 | ||
55 | soc8272@f0000000 { | 54 | soc8272@f0000000 { |
56 | #address-cells = <1>; | 55 | #address-cells = <1>; |
57 | #size-cells = <1>; | 56 | #size-cells = <1>; |
58 | #interrupt-cells = <2>; | 57 | device_type = "soc"; |
59 | device_type = "soc"; | 58 | ranges = <00000000 f0000000 00053000>; |
60 | ranges = <00000000 f0000000 00053000>; | 59 | reg = <f0000000 10000>; |
61 | reg = <f0000000 10000>; | 60 | |
62 | 61 | mdio@0 { | |
63 | mdio@0 { | 62 | device_type = "mdio"; |
64 | device_type = "mdio"; | 63 | compatible = "fs_enet"; |
65 | compatible = "fs_enet"; | 64 | reg = <0 0>; |
66 | reg = <0 0>; | 65 | #address-cells = <1>; |
67 | #address-cells = <1>; | 66 | #size-cells = <0>; |
68 | #size-cells = <0>; | 67 | |
69 | phy0:ethernet-phy@0 { | 68 | phy0:ethernet-phy@0 { |
70 | interrupt-parent = <&Cpm_pic>; | 69 | interrupt-parent = <&Cpm_pic>; |
71 | interrupts = <17 4>; | 70 | interrupts = <17 4>; |
72 | reg = <0>; | 71 | reg = <0>; |
73 | bitbang = [ 12 12 13 02 02 01 ]; | 72 | bitbang = [ 12 12 13 02 02 01 ]; |
74 | device_type = "ethernet-phy"; | 73 | device_type = "ethernet-phy"; |
75 | }; | 74 | }; |
75 | |||
76 | phy1:ethernet-phy@1 { | 76 | phy1:ethernet-phy@1 { |
77 | interrupt-parent = <&Cpm_pic>; | 77 | interrupt-parent = <&Cpm_pic>; |
78 | interrupts = <17 4>; | 78 | interrupts = <17 4>; |
79 | bitbang = [ 12 12 13 02 02 01 ]; | 79 | bitbang = [ 12 12 13 02 02 01 ]; |
80 | reg = <3>; | 80 | reg = <3>; |
81 | device_type = "ethernet-phy"; | 81 | device_type = "ethernet-phy"; |
82 | }; | 82 | }; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | ethernet@24000 { | 85 | ethernet@24000 { |
86 | #address-cells = <1>; | 86 | #address-cells = <1>; |
87 | #size-cells = <0>; | 87 | #size-cells = <0>; |
88 | device_type = "network"; | 88 | device_type = "network"; |
89 | device-id = <1>; | 89 | device-id = <1>; |
90 | compatible = "fs_enet"; | 90 | compatible = "fs_enet"; |
91 | model = "FCC"; | 91 | model = "FCC"; |
92 | reg = <11300 20 8400 100 11380 30>; | 92 | reg = <11300 20 8400 100 11380 30>; |
93 | mac-address = [ 00 11 2F 99 43 54 ]; | 93 | mac-address = [ 00 11 2F 99 43 54 ]; |
94 | interrupts = <20 2>; | 94 | interrupts = <20 2>; |
95 | interrupt-parent = <&Cpm_pic>; | 95 | interrupt-parent = <&Cpm_pic>; |
96 | phy-handle = <&Phy0>; | 96 | phy-handle = <&Phy0>; |
97 | rx-clock = <13>; | 97 | rx-clock = <13>; |
98 | tx-clock = <12>; | 98 | tx-clock = <12>; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | ethernet@25000 { | 101 | ethernet@25000 { |
102 | device_type = "network"; | 102 | device_type = "network"; |
103 | device-id = <2>; | 103 | device-id = <2>; |
104 | compatible = "fs_enet"; | 104 | compatible = "fs_enet"; |
105 | model = "FCC"; | 105 | model = "FCC"; |
106 | reg = <11320 20 8500 100 113b0 30>; | 106 | reg = <11320 20 8500 100 113b0 30>; |
107 | mac-address = [ 00 11 2F 99 44 54 ]; | 107 | mac-address = [ 00 11 2F 99 44 54 ]; |
108 | interrupts = <21 2>; | 108 | interrupts = <21 2>; |
109 | interrupt-parent = <&Cpm_pic>; | 109 | interrupt-parent = <&Cpm_pic>; |
110 | phy-handle = <&Phy1>; | 110 | phy-handle = <&Phy1>; |
111 | rx-clock = <17>; | 111 | rx-clock = <17>; |
112 | tx-clock = <18>; | 112 | tx-clock = <18>; |
113 | }; | 113 | }; |
114 | 114 | ||
115 | cpm@f0000000 { | 115 | cpm@f0000000 { |
116 | #address-cells = <1>; | 116 | #address-cells = <1>; |
117 | #size-cells = <1>; | 117 | #size-cells = <1>; |
118 | #interrupt-cells = <2>; | 118 | device_type = "cpm"; |
119 | device_type = "cpm"; | 119 | model = "CPM2"; |
120 | model = "CPM2"; | 120 | ranges = <00000000 00000000 20000>; |
121 | ranges = <00000000 00000000 20000>; | 121 | reg = <0 20000>; |
122 | reg = <0 20000>; | 122 | command-proc = <119c0>; |
123 | command-proc = <119c0>; | 123 | brg-frequency = <17D7840>; |
124 | brg-frequency = <17D7840>; | 124 | cpm_clk = <BEBC200>; |
125 | cpm_clk = <BEBC200>; | 125 | |
126 | 126 | scc@11a00 { | |
127 | scc@11a00 { | 127 | device_type = "serial"; |
128 | device_type = "serial"; | 128 | compatible = "cpm_uart"; |
129 | compatible = "cpm_uart"; | 129 | model = "SCC"; |
130 | model = "SCC"; | 130 | device-id = <1>; |
131 | device-id = <1>; | 131 | reg = <11a00 20 8000 100>; |
132 | reg = <11a00 20 8000 100>; | 132 | current-speed = <1c200>; |
133 | current-speed = <1c200>; | 133 | interrupts = <28 2>; |
134 | interrupts = <28 2>; | ||
135 | interrupt-parent = <&Cpm_pic>; | 134 | interrupt-parent = <&Cpm_pic>; |
136 | clock-setup = <0 00ffffff>; | 135 | clock-setup = <0 00ffffff>; |
137 | rx-clock = <1>; | 136 | rx-clock = <1>; |
138 | tx-clock = <1>; | 137 | tx-clock = <1>; |
139 | }; | 138 | }; |
140 | 139 | ||
141 | scc@11a60 { | 140 | scc@11a60 { |
142 | device_type = "serial"; | 141 | device_type = "serial"; |
143 | compatible = "cpm_uart"; | 142 | compatible = "cpm_uart"; |
144 | model = "SCC"; | 143 | model = "SCC"; |
145 | device-id = <4>; | 144 | device-id = <4>; |
146 | reg = <11a60 20 8300 100>; | 145 | reg = <11a60 20 8300 100>; |
147 | current-speed = <1c200>; | 146 | current-speed = <1c200>; |
148 | interrupts = <2b 2>; | 147 | interrupts = <2b 2>; |
149 | interrupt-parent = <&Cpm_pic>; | 148 | interrupt-parent = <&Cpm_pic>; |
150 | clock-setup = <1b ffffff00>; | 149 | clock-setup = <1b ffffff00>; |
151 | rx-clock = <4>; | 150 | rx-clock = <4>; |
152 | tx-clock = <4>; | 151 | tx-clock = <4>; |
153 | }; | 152 | }; |
154 | 153 | }; | |
155 | }; | 154 | |
156 | cpm_pic:interrupt-controller@10c00 { | 155 | cpm_pic:interrupt-controller@10c00 { |
157 | #address-cells = <0>; | 156 | #address-cells = <0>; |
158 | #interrupt-cells = <2>; | 157 | #interrupt-cells = <2>; |
159 | interrupt-controller; | 158 | interrupt-controller; |
160 | reg = <10c00 80>; | 159 | reg = <10c00 80>; |
161 | built-in; | 160 | device_type = "cpm-pic"; |
162 | device_type = "cpm-pic"; | 161 | compatible = "CPM2"; |
163 | compatible = "CPM2"; | 162 | }; |
164 | }; | 163 | |
165 | pci@0500 { | 164 | pci@0500 { |
166 | #interrupt-cells = <1>; | 165 | #interrupt-cells = <1>; |
167 | #size-cells = <2>; | 166 | #size-cells = <2>; |
168 | #address-cells = <3>; | 167 | #address-cells = <3>; |
169 | compatible = "8272"; | 168 | compatible = "8272"; |
170 | device_type = "pci"; | 169 | device_type = "pci"; |
171 | reg = <10430 4dc>; | 170 | reg = <10430 4dc>; |
172 | clock-frequency = <3f940aa>; | 171 | clock-frequency = <3f940aa>; |
173 | interrupt-map-mask = <f800 0 0 7>; | 172 | interrupt-map-mask = <f800 0 0 7>; |
174 | interrupt-map = < | 173 | interrupt-map = < |
175 | 174 | /* IDSEL 0x16 */ | |
176 | /* IDSEL 0x16 */ | 175 | b000 0 0 1 f8200000 40 8 |
177 | b000 0 0 1 f8200000 40 8 | 176 | b000 0 0 2 f8200000 41 8 |
178 | b000 0 0 2 f8200000 41 8 | 177 | b000 0 0 3 f8200000 42 8 |
179 | b000 0 0 3 f8200000 42 8 | 178 | b000 0 0 4 f8200000 43 8 |
180 | b000 0 0 4 f8200000 43 8 | 179 | |
181 | 180 | /* IDSEL 0x17 */ | |
182 | /* IDSEL 0x17 */ | 181 | b800 0 0 1 f8200000 43 8 |
183 | b800 0 0 1 f8200000 43 8 | 182 | b800 0 0 2 f8200000 40 8 |
184 | b800 0 0 2 f8200000 40 8 | 183 | b800 0 0 3 f8200000 41 8 |
185 | b800 0 0 3 f8200000 41 8 | 184 | b800 0 0 4 f8200000 42 8 |
186 | b800 0 0 4 f8200000 42 8 | 185 | |
187 | 186 | /* IDSEL 0x18 */ | |
188 | /* IDSEL 0x18 */ | 187 | c000 0 0 1 f8200000 42 8 |
189 | c000 0 0 1 f8200000 42 8 | 188 | c000 0 0 2 f8200000 43 8 |
190 | c000 0 0 2 f8200000 43 8 | 189 | c000 0 0 3 f8200000 40 8 |
191 | c000 0 0 3 f8200000 40 8 | 190 | c000 0 0 4 f8200000 41 8>; |
192 | c000 0 0 4 f8200000 41 8>; | ||
193 | interrupt-parent = <&Cpm_pic>; | 191 | interrupt-parent = <&Cpm_pic>; |
194 | interrupts = <14 8>; | 192 | interrupts = <14 8>; |
195 | bus-range = <0 0>; | 193 | bus-range = <0 0>; |
196 | ranges = <02000000 0 80000000 80000000 0 40000000 | 194 | ranges = <02000000 0 80000000 80000000 0 40000000 |
197 | 01000000 0 00000000 f6000000 0 02000000>; | 195 | 01000000 0 00000000 f6000000 0 02000000>; |
198 | }; | 196 | }; |
199 | 197 | ||
200 | /* May need to remove if on a part without crypto engine */ | 198 | /* May need to remove if on a part without crypto engine */ |
201 | crypto@30000 { | 199 | crypto@30000 { |
202 | device_type = "crypto"; | 200 | device_type = "crypto"; |
203 | model = "SEC2"; | 201 | model = "SEC2"; |
204 | compatible = "talitos"; | 202 | compatible = "talitos"; |
205 | reg = <30000 10000>; | 203 | reg = <30000 10000>; |
206 | interrupts = <b 2>; | 204 | interrupts = <b 2>; |
207 | interrupt-parent = <&Cpm_pic>; | 205 | interrupt-parent = <&Cpm_pic>; |
208 | num-channels = <4>; | 206 | num-channels = <4>; |
209 | channel-fifo-len = <18>; | 207 | channel-fifo-len = <18>; |
210 | exec-units-mask = <0000007e>; | 208 | exec-units-mask = <0000007e>; |
211 | /* desc mask is for rev1.x, we need runtime fixup for >=2.x */ | 209 | /* desc mask is for rev1.x, we need runtime fixup for >=2.x */ |
212 | descriptor-types-mask = <01010ebf>; | 210 | descriptor-types-mask = <01010ebf>; |
213 | }; | 211 | }; |
214 | 212 | }; | |
215 | }; | ||
216 | }; | 213 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index c5adbe40364e..a8eadc8c4497 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts | |||
@@ -29,7 +29,6 @@ | |||
29 | timebase-frequency = <0>; // from bootloader | 29 | timebase-frequency = <0>; // from bootloader |
30 | bus-frequency = <0>; // from bootloader | 30 | bus-frequency = <0>; // from bootloader |
31 | clock-frequency = <0>; // from bootloader | 31 | clock-frequency = <0>; // from bootloader |
32 | 32-bit; | ||
33 | }; | 32 | }; |
34 | }; | 33 | }; |
35 | 34 | ||
@@ -41,7 +40,6 @@ | |||
41 | soc8313@e0000000 { | 40 | soc8313@e0000000 { |
42 | #address-cells = <1>; | 41 | #address-cells = <1>; |
43 | #size-cells = <1>; | 42 | #size-cells = <1>; |
44 | #interrupt-cells = <2>; | ||
45 | device_type = "soc"; | 43 | device_type = "soc"; |
46 | ranges = <0 e0000000 00100000>; | 44 | ranges = <0 e0000000 00100000>; |
47 | reg = <e0000000 00000200>; | 45 | reg = <e0000000 00000200>; |
@@ -152,36 +150,6 @@ | |||
152 | interrupt-parent = < &ipic >; | 150 | interrupt-parent = < &ipic >; |
153 | }; | 151 | }; |
154 | 152 | ||
155 | pci@8500 { | ||
156 | interrupt-map-mask = <f800 0 0 7>; | ||
157 | interrupt-map = < | ||
158 | |||
159 | /* IDSEL 0x0E -mini PCI */ | ||
160 | 7000 0 0 1 &ipic 12 8 | ||
161 | 7000 0 0 2 &ipic 12 8 | ||
162 | 7000 0 0 3 &ipic 12 8 | ||
163 | 7000 0 0 4 &ipic 12 8 | ||
164 | |||
165 | /* IDSEL 0x0F - PCI slot */ | ||
166 | 7800 0 0 1 &ipic 11 8 | ||
167 | 7800 0 0 2 &ipic 12 8 | ||
168 | 7800 0 0 3 &ipic 11 8 | ||
169 | 7800 0 0 4 &ipic 12 8>; | ||
170 | interrupt-parent = < &ipic >; | ||
171 | interrupts = <42 8>; | ||
172 | bus-range = <0 0>; | ||
173 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
174 | 42000000 0 80000000 80000000 0 10000000 | ||
175 | 01000000 0 00000000 e2000000 0 00100000>; | ||
176 | clock-frequency = <3f940aa>; | ||
177 | #interrupt-cells = <1>; | ||
178 | #size-cells = <2>; | ||
179 | #address-cells = <3>; | ||
180 | reg = <8500 100>; | ||
181 | compatible = "fsl,mpc8349-pci"; | ||
182 | device_type = "pci"; | ||
183 | }; | ||
184 | |||
185 | crypto@30000 { | 153 | crypto@30000 { |
186 | device_type = "crypto"; | 154 | device_type = "crypto"; |
187 | model = "SEC2"; | 155 | model = "SEC2"; |
@@ -207,8 +175,37 @@ | |||
207 | #address-cells = <0>; | 175 | #address-cells = <0>; |
208 | #interrupt-cells = <2>; | 176 | #interrupt-cells = <2>; |
209 | reg = <700 100>; | 177 | reg = <700 100>; |
210 | built-in; | ||
211 | device_type = "ipic"; | 178 | device_type = "ipic"; |
212 | }; | 179 | }; |
213 | }; | 180 | }; |
181 | |||
182 | pci@e0008500 { | ||
183 | interrupt-map-mask = <f800 0 0 7>; | ||
184 | interrupt-map = < | ||
185 | |||
186 | /* IDSEL 0x0E -mini PCI */ | ||
187 | 7000 0 0 1 &ipic 12 8 | ||
188 | 7000 0 0 2 &ipic 12 8 | ||
189 | 7000 0 0 3 &ipic 12 8 | ||
190 | 7000 0 0 4 &ipic 12 8 | ||
191 | |||
192 | /* IDSEL 0x0F - PCI slot */ | ||
193 | 7800 0 0 1 &ipic 11 8 | ||
194 | 7800 0 0 2 &ipic 12 8 | ||
195 | 7800 0 0 3 &ipic 11 8 | ||
196 | 7800 0 0 4 &ipic 12 8>; | ||
197 | interrupt-parent = < &ipic >; | ||
198 | interrupts = <42 8>; | ||
199 | bus-range = <0 0>; | ||
200 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
201 | 42000000 0 80000000 80000000 0 10000000 | ||
202 | 01000000 0 00000000 e2000000 0 00100000>; | ||
203 | clock-frequency = <3f940aa>; | ||
204 | #interrupt-cells = <1>; | ||
205 | #size-cells = <2>; | ||
206 | #address-cells = <3>; | ||
207 | reg = <e0008500 100>; | ||
208 | compatible = "fsl,mpc8349-pci"; | ||
209 | device_type = "pci"; | ||
210 | }; | ||
214 | }; | 211 | }; |
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index f158ed781ba8..fcd333c391ec 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts | |||
@@ -29,7 +29,6 @@ | |||
29 | timebase-frequency = <0>; | 29 | timebase-frequency = <0>; |
30 | bus-frequency = <0>; | 30 | bus-frequency = <0>; |
31 | clock-frequency = <0>; | 31 | clock-frequency = <0>; |
32 | 32-bit; | ||
33 | }; | 32 | }; |
34 | }; | 33 | }; |
35 | 34 | ||
@@ -46,7 +45,6 @@ | |||
46 | soc8323@e0000000 { | 45 | soc8323@e0000000 { |
47 | #address-cells = <1>; | 46 | #address-cells = <1>; |
48 | #size-cells = <1>; | 47 | #size-cells = <1>; |
49 | #interrupt-cells = <2>; | ||
50 | device_type = "soc"; | 48 | device_type = "soc"; |
51 | ranges = <0 e0000000 00100000>; | 49 | ranges = <0 e0000000 00100000>; |
52 | reg = <e0000000 00000200>; | 50 | reg = <e0000000 00000200>; |
@@ -99,71 +97,11 @@ | |||
99 | descriptor-types-mask = <0122003f>; | 97 | descriptor-types-mask = <0122003f>; |
100 | }; | 98 | }; |
101 | 99 | ||
102 | pci@8500 { | ||
103 | interrupt-map-mask = <f800 0 0 7>; | ||
104 | interrupt-map = < | ||
105 | /* IDSEL 0x11 AD17 */ | ||
106 | 8800 0 0 1 &ipic 14 8 | ||
107 | 8800 0 0 2 &ipic 15 8 | ||
108 | 8800 0 0 3 &ipic 16 8 | ||
109 | 8800 0 0 4 &ipic 17 8 | ||
110 | |||
111 | /* IDSEL 0x12 AD18 */ | ||
112 | 9000 0 0 1 &ipic 16 8 | ||
113 | 9000 0 0 2 &ipic 17 8 | ||
114 | 9000 0 0 3 &ipic 14 8 | ||
115 | 9000 0 0 4 &ipic 15 8 | ||
116 | |||
117 | /* IDSEL 0x13 AD19 */ | ||
118 | 9800 0 0 1 &ipic 17 8 | ||
119 | 9800 0 0 2 &ipic 14 8 | ||
120 | 9800 0 0 3 &ipic 15 8 | ||
121 | 9800 0 0 4 &ipic 16 8 | ||
122 | |||
123 | /* IDSEL 0x15 AD21*/ | ||
124 | a800 0 0 1 &ipic 14 8 | ||
125 | a800 0 0 2 &ipic 15 8 | ||
126 | a800 0 0 3 &ipic 16 8 | ||
127 | a800 0 0 4 &ipic 17 8 | ||
128 | |||
129 | /* IDSEL 0x16 AD22*/ | ||
130 | b000 0 0 1 &ipic 17 8 | ||
131 | b000 0 0 2 &ipic 14 8 | ||
132 | b000 0 0 3 &ipic 15 8 | ||
133 | b000 0 0 4 &ipic 16 8 | ||
134 | |||
135 | /* IDSEL 0x17 AD23*/ | ||
136 | b800 0 0 1 &ipic 16 8 | ||
137 | b800 0 0 2 &ipic 17 8 | ||
138 | b800 0 0 3 &ipic 14 8 | ||
139 | b800 0 0 4 &ipic 15 8 | ||
140 | |||
141 | /* IDSEL 0x18 AD24*/ | ||
142 | c000 0 0 1 &ipic 15 8 | ||
143 | c000 0 0 2 &ipic 16 8 | ||
144 | c000 0 0 3 &ipic 17 8 | ||
145 | c000 0 0 4 &ipic 14 8>; | ||
146 | interrupt-parent = < &ipic >; | ||
147 | interrupts = <42 8>; | ||
148 | bus-range = <0 0>; | ||
149 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
150 | 42000000 0 80000000 80000000 0 10000000 | ||
151 | 01000000 0 00000000 d0000000 0 00100000>; | ||
152 | clock-frequency = <0>; | ||
153 | #interrupt-cells = <1>; | ||
154 | #size-cells = <2>; | ||
155 | #address-cells = <3>; | ||
156 | reg = <8500 100>; | ||
157 | compatible = "fsl,mpc8349-pci"; | ||
158 | device_type = "pci"; | ||
159 | }; | ||
160 | |||
161 | ipic: pic@700 { | 100 | ipic: pic@700 { |
162 | interrupt-controller; | 101 | interrupt-controller; |
163 | #address-cells = <0>; | 102 | #address-cells = <0>; |
164 | #interrupt-cells = <2>; | 103 | #interrupt-cells = <2>; |
165 | reg = <700 100>; | 104 | reg = <700 100>; |
166 | built-in; | ||
167 | device_type = "ipic"; | 105 | device_type = "ipic"; |
168 | }; | 106 | }; |
169 | 107 | ||
@@ -333,10 +271,68 @@ | |||
333 | #address-cells = <0>; | 271 | #address-cells = <0>; |
334 | #interrupt-cells = <1>; | 272 | #interrupt-cells = <1>; |
335 | reg = <80 80>; | 273 | reg = <80 80>; |
336 | built-in; | ||
337 | big-endian; | 274 | big-endian; |
338 | interrupts = <20 8 21 8>; //high:32 low:33 | 275 | interrupts = <20 8 21 8>; //high:32 low:33 |
339 | interrupt-parent = < &ipic >; | 276 | interrupt-parent = < &ipic >; |
340 | }; | 277 | }; |
341 | }; | 278 | }; |
279 | |||
280 | pci@e0008500 { | ||
281 | interrupt-map-mask = <f800 0 0 7>; | ||
282 | interrupt-map = < | ||
283 | /* IDSEL 0x11 AD17 */ | ||
284 | 8800 0 0 1 &ipic 14 8 | ||
285 | 8800 0 0 2 &ipic 15 8 | ||
286 | 8800 0 0 3 &ipic 16 8 | ||
287 | 8800 0 0 4 &ipic 17 8 | ||
288 | |||
289 | /* IDSEL 0x12 AD18 */ | ||
290 | 9000 0 0 1 &ipic 16 8 | ||
291 | 9000 0 0 2 &ipic 17 8 | ||
292 | 9000 0 0 3 &ipic 14 8 | ||
293 | 9000 0 0 4 &ipic 15 8 | ||
294 | |||
295 | /* IDSEL 0x13 AD19 */ | ||
296 | 9800 0 0 1 &ipic 17 8 | ||
297 | 9800 0 0 2 &ipic 14 8 | ||
298 | 9800 0 0 3 &ipic 15 8 | ||
299 | 9800 0 0 4 &ipic 16 8 | ||
300 | |||
301 | /* IDSEL 0x15 AD21*/ | ||
302 | a800 0 0 1 &ipic 14 8 | ||
303 | a800 0 0 2 &ipic 15 8 | ||
304 | a800 0 0 3 &ipic 16 8 | ||
305 | a800 0 0 4 &ipic 17 8 | ||
306 | |||
307 | /* IDSEL 0x16 AD22*/ | ||
308 | b000 0 0 1 &ipic 17 8 | ||
309 | b000 0 0 2 &ipic 14 8 | ||
310 | b000 0 0 3 &ipic 15 8 | ||
311 | b000 0 0 4 &ipic 16 8 | ||
312 | |||
313 | /* IDSEL 0x17 AD23*/ | ||
314 | b800 0 0 1 &ipic 16 8 | ||
315 | b800 0 0 2 &ipic 17 8 | ||
316 | b800 0 0 3 &ipic 14 8 | ||
317 | b800 0 0 4 &ipic 15 8 | ||
318 | |||
319 | /* IDSEL 0x18 AD24*/ | ||
320 | c000 0 0 1 &ipic 15 8 | ||
321 | c000 0 0 2 &ipic 16 8 | ||
322 | c000 0 0 3 &ipic 17 8 | ||
323 | c000 0 0 4 &ipic 14 8>; | ||
324 | interrupt-parent = < &ipic >; | ||
325 | interrupts = <42 8>; | ||
326 | bus-range = <0 0>; | ||
327 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
328 | 42000000 0 80000000 80000000 0 10000000 | ||
329 | 01000000 0 00000000 d0000000 0 00100000>; | ||
330 | clock-frequency = <0>; | ||
331 | #interrupt-cells = <1>; | ||
332 | #size-cells = <2>; | ||
333 | #address-cells = <3>; | ||
334 | reg = <e0008500 100>; | ||
335 | compatible = "fsl,mpc8349-pci"; | ||
336 | device_type = "pci"; | ||
337 | }; | ||
342 | }; | 338 | }; |
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts index 7c4beff3e200..388c8a7012e1 100644 --- a/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts | |||
@@ -29,7 +29,6 @@ | |||
29 | timebase-frequency = <0>; | 29 | timebase-frequency = <0>; |
30 | bus-frequency = <0>; | 30 | bus-frequency = <0>; |
31 | clock-frequency = <0>; | 31 | clock-frequency = <0>; |
32 | 32-bit; | ||
33 | }; | 32 | }; |
34 | }; | 33 | }; |
35 | 34 | ||
@@ -41,7 +40,6 @@ | |||
41 | soc8323@e0000000 { | 40 | soc8323@e0000000 { |
42 | #address-cells = <1>; | 41 | #address-cells = <1>; |
43 | #size-cells = <1>; | 42 | #size-cells = <1>; |
44 | #interrupt-cells = <2>; | ||
45 | device_type = "soc"; | 43 | device_type = "soc"; |
46 | ranges = <0 e0000000 00100000>; | 44 | ranges = <0 e0000000 00100000>; |
47 | reg = <e0000000 00000200>; | 45 | reg = <e0000000 00000200>; |
@@ -94,45 +92,11 @@ | |||
94 | descriptor-types-mask = <0122003f>; | 92 | descriptor-types-mask = <0122003f>; |
95 | }; | 93 | }; |
96 | 94 | ||
97 | pci@8500 { | ||
98 | interrupt-map-mask = <f800 0 0 7>; | ||
99 | interrupt-map = < | ||
100 | /* IDSEL 0x10 AD16 (USB) */ | ||
101 | 8000 0 0 1 &pic 11 8 | ||
102 | |||
103 | /* IDSEL 0x11 AD17 (Mini1)*/ | ||
104 | 8800 0 0 1 &pic 12 8 | ||
105 | 8800 0 0 2 &pic 13 8 | ||
106 | 8800 0 0 3 &pic 14 8 | ||
107 | 8800 0 0 4 &pic 30 8 | ||
108 | |||
109 | /* IDSEL 0x12 AD18 (PCI/Mini2) */ | ||
110 | 9000 0 0 1 &pic 13 8 | ||
111 | 9000 0 0 2 &pic 14 8 | ||
112 | 9000 0 0 3 &pic 30 8 | ||
113 | 9000 0 0 4 &pic 11 8>; | ||
114 | |||
115 | interrupt-parent = <&pic>; | ||
116 | interrupts = <42 8>; | ||
117 | bus-range = <0 0>; | ||
118 | ranges = <42000000 0 80000000 80000000 0 10000000 | ||
119 | 02000000 0 90000000 90000000 0 10000000 | ||
120 | 01000000 0 d0000000 d0000000 0 04000000>; | ||
121 | clock-frequency = <0>; | ||
122 | #interrupt-cells = <1>; | ||
123 | #size-cells = <2>; | ||
124 | #address-cells = <3>; | ||
125 | reg = <8500 100>; | ||
126 | compatible = "fsl,mpc8349-pci"; | ||
127 | device_type = "pci"; | ||
128 | }; | ||
129 | |||
130 | pic:pic@700 { | 95 | pic:pic@700 { |
131 | interrupt-controller; | 96 | interrupt-controller; |
132 | #address-cells = <0>; | 97 | #address-cells = <0>; |
133 | #interrupt-cells = <2>; | 98 | #interrupt-cells = <2>; |
134 | reg = <700 100>; | 99 | reg = <700 100>; |
135 | built-in; | ||
136 | device_type = "ipic"; | 100 | device_type = "ipic"; |
137 | }; | 101 | }; |
138 | 102 | ||
@@ -211,7 +175,7 @@ | |||
211 | reg = <4c0 40>; | 175 | reg = <4c0 40>; |
212 | interrupts = <2>; | 176 | interrupts = <2>; |
213 | interrupt-parent = <&qeic>; | 177 | interrupt-parent = <&qeic>; |
214 | mode = "cpu"; | 178 | mode = "cpu-qe"; |
215 | }; | 179 | }; |
216 | 180 | ||
217 | spi@500 { | 181 | spi@500 { |
@@ -292,10 +256,42 @@ | |||
292 | #address-cells = <0>; | 256 | #address-cells = <0>; |
293 | #interrupt-cells = <1>; | 257 | #interrupt-cells = <1>; |
294 | reg = <80 80>; | 258 | reg = <80 80>; |
295 | built-in; | ||
296 | big-endian; | 259 | big-endian; |
297 | interrupts = <20 8 21 8>; //high:32 low:33 | 260 | interrupts = <20 8 21 8>; //high:32 low:33 |
298 | interrupt-parent = <&pic>; | 261 | interrupt-parent = <&pic>; |
299 | }; | 262 | }; |
300 | }; | 263 | }; |
264 | |||
265 | pci@e0008500 { | ||
266 | interrupt-map-mask = <f800 0 0 7>; | ||
267 | interrupt-map = < | ||
268 | /* IDSEL 0x10 AD16 (USB) */ | ||
269 | 8000 0 0 1 &pic 11 8 | ||
270 | |||
271 | /* IDSEL 0x11 AD17 (Mini1)*/ | ||
272 | 8800 0 0 1 &pic 12 8 | ||
273 | 8800 0 0 2 &pic 13 8 | ||
274 | 8800 0 0 3 &pic 14 8 | ||
275 | 8800 0 0 4 &pic 30 8 | ||
276 | |||
277 | /* IDSEL 0x12 AD18 (PCI/Mini2) */ | ||
278 | 9000 0 0 1 &pic 13 8 | ||
279 | 9000 0 0 2 &pic 14 8 | ||
280 | 9000 0 0 3 &pic 30 8 | ||
281 | 9000 0 0 4 &pic 11 8>; | ||
282 | |||
283 | interrupt-parent = <&pic>; | ||
284 | interrupts = <42 8>; | ||
285 | bus-range = <0 0>; | ||
286 | ranges = <42000000 0 80000000 80000000 0 10000000 | ||
287 | 02000000 0 90000000 90000000 0 10000000 | ||
288 | 01000000 0 d0000000 d0000000 0 04000000>; | ||
289 | clock-frequency = <0>; | ||
290 | #interrupt-cells = <1>; | ||
291 | #size-cells = <2>; | ||
292 | #address-cells = <3>; | ||
293 | reg = <e0008500 100>; | ||
294 | compatible = "fsl,mpc8349-pci"; | ||
295 | device_type = "pci"; | ||
296 | }; | ||
301 | }; | 297 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts index 44c065a6b5e7..3bc32029ca5b 100644 --- a/arch/powerpc/boot/dts/mpc8349emitx.dts +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts | |||
@@ -28,7 +28,6 @@ | |||
28 | timebase-frequency = <0>; // from bootloader | 28 | timebase-frequency = <0>; // from bootloader |
29 | bus-frequency = <0>; // from bootloader | 29 | bus-frequency = <0>; // from bootloader |
30 | clock-frequency = <0>; // from bootloader | 30 | clock-frequency = <0>; // from bootloader |
31 | 32-bit; | ||
32 | }; | 31 | }; |
33 | }; | 32 | }; |
34 | 33 | ||
@@ -40,7 +39,6 @@ | |||
40 | soc8349@e0000000 { | 39 | soc8349@e0000000 { |
41 | #address-cells = <1>; | 40 | #address-cells = <1>; |
42 | #size-cells = <1>; | 41 | #size-cells = <1>; |
43 | #interrupt-cells = <2>; | ||
44 | device_type = "soc"; | 42 | device_type = "soc"; |
45 | ranges = <0 e0000000 00100000>; | 43 | ranges = <0 e0000000 00100000>; |
46 | reg = <e0000000 00000200>; | 44 | reg = <e0000000 00000200>; |
@@ -142,6 +140,7 @@ | |||
142 | interrupts = <20 8 21 8 22 8>; | 140 | interrupts = <20 8 21 8 22 8>; |
143 | interrupt-parent = < &ipic >; | 141 | interrupt-parent = < &ipic >; |
144 | phy-handle = < &phy1c >; | 142 | phy-handle = < &phy1c >; |
143 | linux,network-index = <0>; | ||
145 | }; | 144 | }; |
146 | 145 | ||
147 | ethernet@25000 { | 146 | ethernet@25000 { |
@@ -161,6 +160,7 @@ | |||
161 | interrupts = <23 8 24 8 25 8>; | 160 | interrupts = <23 8 24 8 25 8>; |
162 | interrupt-parent = < &ipic >; | 161 | interrupt-parent = < &ipic >; |
163 | phy-handle = < &phy1f >; | 162 | phy-handle = < &phy1f >; |
163 | linux,network-index = <1>; | ||
164 | }; | 164 | }; |
165 | 165 | ||
166 | serial@4500 { | 166 | serial@4500 { |
@@ -181,52 +181,6 @@ | |||
181 | interrupt-parent = < &ipic >; | 181 | interrupt-parent = < &ipic >; |
182 | }; | 182 | }; |
183 | 183 | ||
184 | pci@8500 { | ||
185 | interrupt-map-mask = <f800 0 0 7>; | ||
186 | interrupt-map = < | ||
187 | /* IDSEL 0x10 - SATA */ | ||
188 | 8000 0 0 1 &ipic 16 8 /* SATA_INTA */ | ||
189 | >; | ||
190 | interrupt-parent = < &ipic >; | ||
191 | interrupts = <42 8>; | ||
192 | bus-range = <0 0>; | ||
193 | ranges = <42000000 0 80000000 80000000 0 10000000 | ||
194 | 02000000 0 90000000 90000000 0 10000000 | ||
195 | 01000000 0 00000000 e2000000 0 01000000>; | ||
196 | clock-frequency = <3f940aa>; | ||
197 | #interrupt-cells = <1>; | ||
198 | #size-cells = <2>; | ||
199 | #address-cells = <3>; | ||
200 | reg = <8500 100>; | ||
201 | compatible = "fsl,mpc8349-pci"; | ||
202 | device_type = "pci"; | ||
203 | }; | ||
204 | |||
205 | pci@8600 { | ||
206 | interrupt-map-mask = <f800 0 0 7>; | ||
207 | interrupt-map = < | ||
208 | /* IDSEL 0x0E - MiniPCI Slot */ | ||
209 | 7000 0 0 1 &ipic 15 8 /* PCI_INTA */ | ||
210 | |||
211 | /* IDSEL 0x0F - PCI Slot */ | ||
212 | 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ | ||
213 | 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ | ||
214 | >; | ||
215 | interrupt-parent = < &ipic >; | ||
216 | interrupts = <43 8>; | ||
217 | bus-range = <1 1>; | ||
218 | ranges = <42000000 0 a0000000 a0000000 0 10000000 | ||
219 | 02000000 0 b0000000 b0000000 0 10000000 | ||
220 | 01000000 0 00000000 e3000000 0 01000000>; | ||
221 | clock-frequency = <3f940aa>; | ||
222 | #interrupt-cells = <1>; | ||
223 | #size-cells = <2>; | ||
224 | #address-cells = <3>; | ||
225 | reg = <8600 100>; | ||
226 | compatible = "fsl,mpc8349-pci"; | ||
227 | device_type = "pci"; | ||
228 | }; | ||
229 | |||
230 | crypto@30000 { | 184 | crypto@30000 { |
231 | device_type = "crypto"; | 185 | device_type = "crypto"; |
232 | model = "SEC2"; | 186 | model = "SEC2"; |
@@ -245,8 +199,56 @@ | |||
245 | #address-cells = <0>; | 199 | #address-cells = <0>; |
246 | #interrupt-cells = <2>; | 200 | #interrupt-cells = <2>; |
247 | reg = <700 100>; | 201 | reg = <700 100>; |
248 | built-in; | ||
249 | device_type = "ipic"; | 202 | device_type = "ipic"; |
250 | }; | 203 | }; |
251 | }; | 204 | }; |
205 | |||
206 | pci@e0008500 { | ||
207 | interrupt-map-mask = <f800 0 0 7>; | ||
208 | interrupt-map = < | ||
209 | /* IDSEL 0x10 - SATA */ | ||
210 | 8000 0 0 1 &ipic 16 8 /* SATA_INTA */ | ||
211 | >; | ||
212 | interrupt-parent = < &ipic >; | ||
213 | interrupts = <42 8>; | ||
214 | bus-range = <0 0>; | ||
215 | ranges = <42000000 0 80000000 80000000 0 10000000 | ||
216 | 02000000 0 90000000 90000000 0 10000000 | ||
217 | 01000000 0 00000000 e2000000 0 01000000>; | ||
218 | clock-frequency = <3f940aa>; | ||
219 | #interrupt-cells = <1>; | ||
220 | #size-cells = <2>; | ||
221 | #address-cells = <3>; | ||
222 | reg = <e0008500 100>; | ||
223 | compatible = "fsl,mpc8349-pci"; | ||
224 | device_type = "pci"; | ||
225 | }; | ||
226 | |||
227 | pci@e0008600 { | ||
228 | interrupt-map-mask = <f800 0 0 7>; | ||
229 | interrupt-map = < | ||
230 | /* IDSEL 0x0E - MiniPCI Slot */ | ||
231 | 7000 0 0 1 &ipic 15 8 /* PCI_INTA */ | ||
232 | |||
233 | /* IDSEL 0x0F - PCI Slot */ | ||
234 | 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ | ||
235 | 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ | ||
236 | >; | ||
237 | interrupt-parent = < &ipic >; | ||
238 | interrupts = <43 8>; | ||
239 | bus-range = <0 0>; | ||
240 | ranges = <42000000 0 a0000000 a0000000 0 10000000 | ||
241 | 02000000 0 b0000000 b0000000 0 10000000 | ||
242 | 01000000 0 00000000 e3000000 0 01000000>; | ||
243 | clock-frequency = <3f940aa>; | ||
244 | #interrupt-cells = <1>; | ||
245 | #size-cells = <2>; | ||
246 | #address-cells = <3>; | ||
247 | reg = <e0008600 100>; | ||
248 | compatible = "fsl,mpc8349-pci"; | ||
249 | device_type = "pci"; | ||
250 | }; | ||
251 | |||
252 | |||
253 | |||
252 | }; | 254 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts index 0b8387141d88..36a27607f766 100644 --- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts +++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts | |||
@@ -28,7 +28,6 @@ | |||
28 | timebase-frequency = <0>; // from bootloader | 28 | timebase-frequency = <0>; // from bootloader |
29 | bus-frequency = <0>; // from bootloader | 29 | bus-frequency = <0>; // from bootloader |
30 | clock-frequency = <0>; // from bootloader | 30 | clock-frequency = <0>; // from bootloader |
31 | 32-bit; | ||
32 | }; | 31 | }; |
33 | }; | 32 | }; |
34 | 33 | ||
@@ -40,7 +39,6 @@ | |||
40 | soc8349@e0000000 { | 39 | soc8349@e0000000 { |
41 | #address-cells = <1>; | 40 | #address-cells = <1>; |
42 | #size-cells = <1>; | 41 | #size-cells = <1>; |
43 | #interrupt-cells = <2>; | ||
44 | device_type = "soc"; | 42 | device_type = "soc"; |
45 | ranges = <0 e0000000 00100000>; | 43 | ranges = <0 e0000000 00100000>; |
46 | reg = <e0000000 00000200>; | 44 | reg = <e0000000 00000200>; |
@@ -116,6 +114,7 @@ | |||
116 | interrupts = <20 8 21 8 22 8>; | 114 | interrupts = <20 8 21 8 22 8>; |
117 | interrupt-parent = < &ipic >; | 115 | interrupt-parent = < &ipic >; |
118 | phy-handle = < &phy1c >; | 116 | phy-handle = < &phy1c >; |
117 | linux,network-index = <0>; | ||
119 | }; | 118 | }; |
120 | 119 | ||
121 | serial@4500 { | 120 | serial@4500 { |
@@ -136,28 +135,6 @@ | |||
136 | interrupt-parent = < &ipic >; | 135 | interrupt-parent = < &ipic >; |
137 | }; | 136 | }; |
138 | 137 | ||
139 | pci@8600 { | ||
140 | interrupt-map-mask = <f800 0 0 7>; | ||
141 | interrupt-map = < | ||
142 | /* IDSEL 0x0F - PCI Slot */ | ||
143 | 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ | ||
144 | 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ | ||
145 | >; | ||
146 | interrupt-parent = < &ipic >; | ||
147 | interrupts = <43 8>; | ||
148 | bus-range = <1 1>; | ||
149 | ranges = <42000000 0 a0000000 a0000000 0 10000000 | ||
150 | 02000000 0 b0000000 b0000000 0 10000000 | ||
151 | 01000000 0 00000000 e3000000 0 01000000>; | ||
152 | clock-frequency = <3f940aa>; | ||
153 | #interrupt-cells = <1>; | ||
154 | #size-cells = <2>; | ||
155 | #address-cells = <3>; | ||
156 | reg = <8600 100>; | ||
157 | compatible = "fsl,mpc8349-pci"; | ||
158 | device_type = "pci"; | ||
159 | }; | ||
160 | |||
161 | crypto@30000 { | 138 | crypto@30000 { |
162 | device_type = "crypto"; | 139 | device_type = "crypto"; |
163 | model = "SEC2"; | 140 | model = "SEC2"; |
@@ -176,8 +153,29 @@ | |||
176 | #address-cells = <0>; | 153 | #address-cells = <0>; |
177 | #interrupt-cells = <2>; | 154 | #interrupt-cells = <2>; |
178 | reg = <700 100>; | 155 | reg = <700 100>; |
179 | built-in; | ||
180 | device_type = "ipic"; | 156 | device_type = "ipic"; |
181 | }; | 157 | }; |
182 | }; | 158 | }; |
159 | |||
160 | pci@e0008600 { | ||
161 | interrupt-map-mask = <f800 0 0 7>; | ||
162 | interrupt-map = < | ||
163 | /* IDSEL 0x0F - PCI Slot */ | ||
164 | 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ | ||
165 | 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ | ||
166 | >; | ||
167 | interrupt-parent = < &ipic >; | ||
168 | interrupts = <43 8>; | ||
169 | bus-range = <1 1>; | ||
170 | ranges = <42000000 0 a0000000 a0000000 0 10000000 | ||
171 | 02000000 0 b0000000 b0000000 0 10000000 | ||
172 | 01000000 0 00000000 e3000000 0 01000000>; | ||
173 | clock-frequency = <3f940aa>; | ||
174 | #interrupt-cells = <1>; | ||
175 | #size-cells = <2>; | ||
176 | #address-cells = <3>; | ||
177 | reg = <e0008600 100>; | ||
178 | compatible = "fsl,mpc8349-pci"; | ||
179 | device_type = "pci"; | ||
180 | }; | ||
183 | }; | 181 | }; |
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts index 481099756e44..c27e2fff5d58 100644 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts | |||
@@ -29,7 +29,6 @@ | |||
29 | timebase-frequency = <0>; // from bootloader | 29 | timebase-frequency = <0>; // from bootloader |
30 | bus-frequency = <0>; // from bootloader | 30 | bus-frequency = <0>; // from bootloader |
31 | clock-frequency = <0>; // from bootloader | 31 | clock-frequency = <0>; // from bootloader |
32 | 32-bit; | ||
33 | }; | 32 | }; |
34 | }; | 33 | }; |
35 | 34 | ||
@@ -46,7 +45,6 @@ | |||
46 | soc8349@e0000000 { | 45 | soc8349@e0000000 { |
47 | #address-cells = <1>; | 46 | #address-cells = <1>; |
48 | #size-cells = <1>; | 47 | #size-cells = <1>; |
49 | #interrupt-cells = <2>; | ||
50 | device_type = "soc"; | 48 | device_type = "soc"; |
51 | ranges = <0 e0000000 00100000>; | 49 | ranges = <0 e0000000 00100000>; |
52 | reg = <e0000000 00000200>; | 50 | reg = <e0000000 00000200>; |
@@ -146,6 +144,7 @@ | |||
146 | interrupts = <20 8 21 8 22 8>; | 144 | interrupts = <20 8 21 8 22 8>; |
147 | interrupt-parent = < &ipic >; | 145 | interrupt-parent = < &ipic >; |
148 | phy-handle = < &phy0 >; | 146 | phy-handle = < &phy0 >; |
147 | linux,network-index = <0>; | ||
149 | }; | 148 | }; |
150 | 149 | ||
151 | ethernet@25000 { | 150 | ethernet@25000 { |
@@ -165,6 +164,7 @@ | |||
165 | interrupts = <23 8 24 8 25 8>; | 164 | interrupts = <23 8 24 8 25 8>; |
166 | interrupt-parent = < &ipic >; | 165 | interrupt-parent = < &ipic >; |
167 | phy-handle = < &phy1 >; | 166 | phy-handle = < &phy1 >; |
167 | linux,network-index = <1>; | ||
168 | }; | 168 | }; |
169 | 169 | ||
170 | serial@4500 { | 170 | serial@4500 { |
@@ -185,126 +185,6 @@ | |||
185 | interrupt-parent = < &ipic >; | 185 | interrupt-parent = < &ipic >; |
186 | }; | 186 | }; |
187 | 187 | ||
188 | pci@8500 { | ||
189 | interrupt-map-mask = <f800 0 0 7>; | ||
190 | interrupt-map = < | ||
191 | |||
192 | /* IDSEL 0x11 */ | ||
193 | 8800 0 0 1 &ipic 14 8 | ||
194 | 8800 0 0 2 &ipic 15 8 | ||
195 | 8800 0 0 3 &ipic 16 8 | ||
196 | 8800 0 0 4 &ipic 17 8 | ||
197 | |||
198 | /* IDSEL 0x12 */ | ||
199 | 9000 0 0 1 &ipic 16 8 | ||
200 | 9000 0 0 2 &ipic 17 8 | ||
201 | 9000 0 0 3 &ipic 14 8 | ||
202 | 9000 0 0 4 &ipic 15 8 | ||
203 | |||
204 | /* IDSEL 0x13 */ | ||
205 | 9800 0 0 1 &ipic 17 8 | ||
206 | 9800 0 0 2 &ipic 14 8 | ||
207 | 9800 0 0 3 &ipic 15 8 | ||
208 | 9800 0 0 4 &ipic 16 8 | ||
209 | |||
210 | /* IDSEL 0x15 */ | ||
211 | a800 0 0 1 &ipic 14 8 | ||
212 | a800 0 0 2 &ipic 15 8 | ||
213 | a800 0 0 3 &ipic 16 8 | ||
214 | a800 0 0 4 &ipic 17 8 | ||
215 | |||
216 | /* IDSEL 0x16 */ | ||
217 | b000 0 0 1 &ipic 17 8 | ||
218 | b000 0 0 2 &ipic 14 8 | ||
219 | b000 0 0 3 &ipic 15 8 | ||
220 | b000 0 0 4 &ipic 16 8 | ||
221 | |||
222 | /* IDSEL 0x17 */ | ||
223 | b800 0 0 1 &ipic 16 8 | ||
224 | b800 0 0 2 &ipic 17 8 | ||
225 | b800 0 0 3 &ipic 14 8 | ||
226 | b800 0 0 4 &ipic 15 8 | ||
227 | |||
228 | /* IDSEL 0x18 */ | ||
229 | c000 0 0 1 &ipic 15 8 | ||
230 | c000 0 0 2 &ipic 16 8 | ||
231 | c000 0 0 3 &ipic 17 8 | ||
232 | c000 0 0 4 &ipic 14 8>; | ||
233 | interrupt-parent = < &ipic >; | ||
234 | interrupts = <42 8>; | ||
235 | bus-range = <0 0>; | ||
236 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
237 | 42000000 0 80000000 80000000 0 10000000 | ||
238 | 01000000 0 00000000 e2000000 0 00100000>; | ||
239 | clock-frequency = <3f940aa>; | ||
240 | #interrupt-cells = <1>; | ||
241 | #size-cells = <2>; | ||
242 | #address-cells = <3>; | ||
243 | reg = <8500 100>; | ||
244 | compatible = "fsl,mpc8349-pci"; | ||
245 | device_type = "pci"; | ||
246 | }; | ||
247 | |||
248 | pci@8600 { | ||
249 | interrupt-map-mask = <f800 0 0 7>; | ||
250 | interrupt-map = < | ||
251 | |||
252 | /* IDSEL 0x11 */ | ||
253 | 8800 0 0 1 &ipic 14 8 | ||
254 | 8800 0 0 2 &ipic 15 8 | ||
255 | 8800 0 0 3 &ipic 16 8 | ||
256 | 8800 0 0 4 &ipic 17 8 | ||
257 | |||
258 | /* IDSEL 0x12 */ | ||
259 | 9000 0 0 1 &ipic 16 8 | ||
260 | 9000 0 0 2 &ipic 17 8 | ||
261 | 9000 0 0 3 &ipic 14 8 | ||
262 | 9000 0 0 4 &ipic 15 8 | ||
263 | |||
264 | /* IDSEL 0x13 */ | ||
265 | 9800 0 0 1 &ipic 17 8 | ||
266 | 9800 0 0 2 &ipic 14 8 | ||
267 | 9800 0 0 3 &ipic 15 8 | ||
268 | 9800 0 0 4 &ipic 16 8 | ||
269 | |||
270 | /* IDSEL 0x15 */ | ||
271 | a800 0 0 1 &ipic 14 8 | ||
272 | a800 0 0 2 &ipic 15 8 | ||
273 | a800 0 0 3 &ipic 16 8 | ||
274 | a800 0 0 4 &ipic 17 8 | ||
275 | |||
276 | /* IDSEL 0x16 */ | ||
277 | b000 0 0 1 &ipic 17 8 | ||
278 | b000 0 0 2 &ipic 14 8 | ||
279 | b000 0 0 3 &ipic 15 8 | ||
280 | b000 0 0 4 &ipic 16 8 | ||
281 | |||
282 | /* IDSEL 0x17 */ | ||
283 | b800 0 0 1 &ipic 16 8 | ||
284 | b800 0 0 2 &ipic 17 8 | ||
285 | b800 0 0 3 &ipic 14 8 | ||
286 | b800 0 0 4 &ipic 15 8 | ||
287 | |||
288 | /* IDSEL 0x18 */ | ||
289 | c000 0 0 1 &ipic 15 8 | ||
290 | c000 0 0 2 &ipic 16 8 | ||
291 | c000 0 0 3 &ipic 17 8 | ||
292 | c000 0 0 4 &ipic 14 8>; | ||
293 | interrupt-parent = < &ipic >; | ||
294 | interrupts = <42 8>; | ||
295 | bus-range = <0 0>; | ||
296 | ranges = <02000000 0 b0000000 b0000000 0 10000000 | ||
297 | 42000000 0 a0000000 a0000000 0 10000000 | ||
298 | 01000000 0 00000000 e2100000 0 00100000>; | ||
299 | clock-frequency = <3f940aa>; | ||
300 | #interrupt-cells = <1>; | ||
301 | #size-cells = <2>; | ||
302 | #address-cells = <3>; | ||
303 | reg = <8600 100>; | ||
304 | compatible = "fsl,mpc8349-pci"; | ||
305 | device_type = "pci"; | ||
306 | }; | ||
307 | |||
308 | /* May need to remove if on a part without crypto engine */ | 188 | /* May need to remove if on a part without crypto engine */ |
309 | crypto@30000 { | 189 | crypto@30000 { |
310 | device_type = "crypto"; | 190 | device_type = "crypto"; |
@@ -332,8 +212,127 @@ | |||
332 | #address-cells = <0>; | 212 | #address-cells = <0>; |
333 | #interrupt-cells = <2>; | 213 | #interrupt-cells = <2>; |
334 | reg = <700 100>; | 214 | reg = <700 100>; |
335 | built-in; | ||
336 | device_type = "ipic"; | 215 | device_type = "ipic"; |
337 | }; | 216 | }; |
338 | }; | 217 | }; |
218 | |||
219 | pci@e0008500 { | ||
220 | interrupt-map-mask = <f800 0 0 7>; | ||
221 | interrupt-map = < | ||
222 | |||
223 | /* IDSEL 0x11 */ | ||
224 | 8800 0 0 1 &ipic 14 8 | ||
225 | 8800 0 0 2 &ipic 15 8 | ||
226 | 8800 0 0 3 &ipic 16 8 | ||
227 | 8800 0 0 4 &ipic 17 8 | ||
228 | |||
229 | /* IDSEL 0x12 */ | ||
230 | 9000 0 0 1 &ipic 16 8 | ||
231 | 9000 0 0 2 &ipic 17 8 | ||
232 | 9000 0 0 3 &ipic 14 8 | ||
233 | 9000 0 0 4 &ipic 15 8 | ||
234 | |||
235 | /* IDSEL 0x13 */ | ||
236 | 9800 0 0 1 &ipic 17 8 | ||
237 | 9800 0 0 2 &ipic 14 8 | ||
238 | 9800 0 0 3 &ipic 15 8 | ||
239 | 9800 0 0 4 &ipic 16 8 | ||
240 | |||
241 | /* IDSEL 0x15 */ | ||
242 | a800 0 0 1 &ipic 14 8 | ||
243 | a800 0 0 2 &ipic 15 8 | ||
244 | a800 0 0 3 &ipic 16 8 | ||
245 | a800 0 0 4 &ipic 17 8 | ||
246 | |||
247 | /* IDSEL 0x16 */ | ||
248 | b000 0 0 1 &ipic 17 8 | ||
249 | b000 0 0 2 &ipic 14 8 | ||
250 | b000 0 0 3 &ipic 15 8 | ||
251 | b000 0 0 4 &ipic 16 8 | ||
252 | |||
253 | /* IDSEL 0x17 */ | ||
254 | b800 0 0 1 &ipic 16 8 | ||
255 | b800 0 0 2 &ipic 17 8 | ||
256 | b800 0 0 3 &ipic 14 8 | ||
257 | b800 0 0 4 &ipic 15 8 | ||
258 | |||
259 | /* IDSEL 0x18 */ | ||
260 | c000 0 0 1 &ipic 15 8 | ||
261 | c000 0 0 2 &ipic 16 8 | ||
262 | c000 0 0 3 &ipic 17 8 | ||
263 | c000 0 0 4 &ipic 14 8>; | ||
264 | interrupt-parent = < &ipic >; | ||
265 | interrupts = <42 8>; | ||
266 | bus-range = <0 0>; | ||
267 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
268 | 42000000 0 80000000 80000000 0 10000000 | ||
269 | 01000000 0 00000000 e2000000 0 00100000>; | ||
270 | clock-frequency = <3f940aa>; | ||
271 | #interrupt-cells = <1>; | ||
272 | #size-cells = <2>; | ||
273 | #address-cells = <3>; | ||
274 | reg = <e0008500 100>; | ||
275 | compatible = "fsl,mpc8349-pci"; | ||
276 | device_type = "pci"; | ||
277 | }; | ||
278 | |||
279 | pci@e0008600 { | ||
280 | interrupt-map-mask = <f800 0 0 7>; | ||
281 | interrupt-map = < | ||
282 | |||
283 | /* IDSEL 0x11 */ | ||
284 | 8800 0 0 1 &ipic 14 8 | ||
285 | 8800 0 0 2 &ipic 15 8 | ||
286 | 8800 0 0 3 &ipic 16 8 | ||
287 | 8800 0 0 4 &ipic 17 8 | ||
288 | |||
289 | /* IDSEL 0x12 */ | ||
290 | 9000 0 0 1 &ipic 16 8 | ||
291 | 9000 0 0 2 &ipic 17 8 | ||
292 | 9000 0 0 3 &ipic 14 8 | ||
293 | 9000 0 0 4 &ipic 15 8 | ||
294 | |||
295 | /* IDSEL 0x13 */ | ||
296 | 9800 0 0 1 &ipic 17 8 | ||
297 | 9800 0 0 2 &ipic 14 8 | ||
298 | 9800 0 0 3 &ipic 15 8 | ||
299 | 9800 0 0 4 &ipic 16 8 | ||
300 | |||
301 | /* IDSEL 0x15 */ | ||
302 | a800 0 0 1 &ipic 14 8 | ||
303 | a800 0 0 2 &ipic 15 8 | ||
304 | a800 0 0 3 &ipic 16 8 | ||
305 | a800 0 0 4 &ipic 17 8 | ||
306 | |||
307 | /* IDSEL 0x16 */ | ||
308 | b000 0 0 1 &ipic 17 8 | ||
309 | b000 0 0 2 &ipic 14 8 | ||
310 | b000 0 0 3 &ipic 15 8 | ||
311 | b000 0 0 4 &ipic 16 8 | ||
312 | |||
313 | /* IDSEL 0x17 */ | ||
314 | b800 0 0 1 &ipic 16 8 | ||
315 | b800 0 0 2 &ipic 17 8 | ||
316 | b800 0 0 3 &ipic 14 8 | ||
317 | b800 0 0 4 &ipic 15 8 | ||
318 | |||
319 | /* IDSEL 0x18 */ | ||
320 | c000 0 0 1 &ipic 15 8 | ||
321 | c000 0 0 2 &ipic 16 8 | ||
322 | c000 0 0 3 &ipic 17 8 | ||
323 | c000 0 0 4 &ipic 14 8>; | ||
324 | interrupt-parent = < &ipic >; | ||
325 | interrupts = <42 8>; | ||
326 | bus-range = <0 0>; | ||
327 | ranges = <02000000 0 b0000000 b0000000 0 10000000 | ||
328 | 42000000 0 a0000000 a0000000 0 10000000 | ||
329 | 01000000 0 00000000 e2100000 0 00100000>; | ||
330 | clock-frequency = <3f940aa>; | ||
331 | #interrupt-cells = <1>; | ||
332 | #size-cells = <2>; | ||
333 | #address-cells = <3>; | ||
334 | reg = <e0008600 100>; | ||
335 | compatible = "fsl,mpc8349-pci"; | ||
336 | device_type = "pci"; | ||
337 | }; | ||
339 | }; | 338 | }; |
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index e3f7c1282068..fbd1573c348b 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts | |||
@@ -34,7 +34,6 @@ | |||
34 | timebase-frequency = <3EF1480>; | 34 | timebase-frequency = <3EF1480>; |
35 | bus-frequency = <FBC5200>; | 35 | bus-frequency = <FBC5200>; |
36 | clock-frequency = <1F78A400>; | 36 | clock-frequency = <1F78A400>; |
37 | 32-bit; | ||
38 | }; | 37 | }; |
39 | }; | 38 | }; |
40 | 39 | ||
@@ -51,7 +50,6 @@ | |||
51 | soc8360@e0000000 { | 50 | soc8360@e0000000 { |
52 | #address-cells = <1>; | 51 | #address-cells = <1>; |
53 | #size-cells = <1>; | 52 | #size-cells = <1>; |
54 | #interrupt-cells = <2>; | ||
55 | device_type = "soc"; | 53 | device_type = "soc"; |
56 | ranges = <0 e0000000 00100000>; | 54 | ranges = <0 e0000000 00100000>; |
57 | reg = <e0000000 00000200>; | 55 | reg = <e0000000 00000200>; |
@@ -113,72 +111,11 @@ | |||
113 | descriptor-types-mask = <01010ebf>; | 111 | descriptor-types-mask = <01010ebf>; |
114 | }; | 112 | }; |
115 | 113 | ||
116 | pci@8500 { | ||
117 | interrupt-map-mask = <f800 0 0 7>; | ||
118 | interrupt-map = < | ||
119 | |||
120 | /* IDSEL 0x11 AD17 */ | ||
121 | 8800 0 0 1 &ipic 14 8 | ||
122 | 8800 0 0 2 &ipic 15 8 | ||
123 | 8800 0 0 3 &ipic 16 8 | ||
124 | 8800 0 0 4 &ipic 17 8 | ||
125 | |||
126 | /* IDSEL 0x12 AD18 */ | ||
127 | 9000 0 0 1 &ipic 16 8 | ||
128 | 9000 0 0 2 &ipic 17 8 | ||
129 | 9000 0 0 3 &ipic 14 8 | ||
130 | 9000 0 0 4 &ipic 15 8 | ||
131 | |||
132 | /* IDSEL 0x13 AD19 */ | ||
133 | 9800 0 0 1 &ipic 17 8 | ||
134 | 9800 0 0 2 &ipic 14 8 | ||
135 | 9800 0 0 3 &ipic 15 8 | ||
136 | 9800 0 0 4 &ipic 16 8 | ||
137 | |||
138 | /* IDSEL 0x15 AD21*/ | ||
139 | a800 0 0 1 &ipic 14 8 | ||
140 | a800 0 0 2 &ipic 15 8 | ||
141 | a800 0 0 3 &ipic 16 8 | ||
142 | a800 0 0 4 &ipic 17 8 | ||
143 | |||
144 | /* IDSEL 0x16 AD22*/ | ||
145 | b000 0 0 1 &ipic 17 8 | ||
146 | b000 0 0 2 &ipic 14 8 | ||
147 | b000 0 0 3 &ipic 15 8 | ||
148 | b000 0 0 4 &ipic 16 8 | ||
149 | |||
150 | /* IDSEL 0x17 AD23*/ | ||
151 | b800 0 0 1 &ipic 16 8 | ||
152 | b800 0 0 2 &ipic 17 8 | ||
153 | b800 0 0 3 &ipic 14 8 | ||
154 | b800 0 0 4 &ipic 15 8 | ||
155 | |||
156 | /* IDSEL 0x18 AD24*/ | ||
157 | c000 0 0 1 &ipic 15 8 | ||
158 | c000 0 0 2 &ipic 16 8 | ||
159 | c000 0 0 3 &ipic 17 8 | ||
160 | c000 0 0 4 &ipic 14 8>; | ||
161 | interrupt-parent = < &ipic >; | ||
162 | interrupts = <42 8>; | ||
163 | bus-range = <0 0>; | ||
164 | ranges = <02000000 0 a0000000 a0000000 0 10000000 | ||
165 | 42000000 0 80000000 80000000 0 10000000 | ||
166 | 01000000 0 00000000 e2000000 0 00100000>; | ||
167 | clock-frequency = <3f940aa>; | ||
168 | #interrupt-cells = <1>; | ||
169 | #size-cells = <2>; | ||
170 | #address-cells = <3>; | ||
171 | reg = <8500 100>; | ||
172 | compatible = "fsl,mpc8349-pci"; | ||
173 | device_type = "pci"; | ||
174 | }; | ||
175 | |||
176 | ipic: pic@700 { | 114 | ipic: pic@700 { |
177 | interrupt-controller; | 115 | interrupt-controller; |
178 | #address-cells = <0>; | 116 | #address-cells = <0>; |
179 | #interrupt-cells = <2>; | 117 | #interrupt-cells = <2>; |
180 | reg = <700 100>; | 118 | reg = <700 100>; |
181 | built-in; | ||
182 | device_type = "ipic"; | 119 | device_type = "ipic"; |
183 | }; | 120 | }; |
184 | 121 | ||
@@ -364,11 +301,69 @@ | |||
364 | #address-cells = <0>; | 301 | #address-cells = <0>; |
365 | #interrupt-cells = <1>; | 302 | #interrupt-cells = <1>; |
366 | reg = <80 80>; | 303 | reg = <80 80>; |
367 | built-in; | ||
368 | big-endian; | 304 | big-endian; |
369 | interrupts = <20 8 21 8>; //high:32 low:33 | 305 | interrupts = <20 8 21 8>; //high:32 low:33 |
370 | interrupt-parent = < &ipic >; | 306 | interrupt-parent = < &ipic >; |
371 | }; | 307 | }; |
308 | }; | ||
372 | 309 | ||
310 | pci@e0008500 { | ||
311 | interrupt-map-mask = <f800 0 0 7>; | ||
312 | interrupt-map = < | ||
313 | |||
314 | /* IDSEL 0x11 AD17 */ | ||
315 | 8800 0 0 1 &ipic 14 8 | ||
316 | 8800 0 0 2 &ipic 15 8 | ||
317 | 8800 0 0 3 &ipic 16 8 | ||
318 | 8800 0 0 4 &ipic 17 8 | ||
319 | |||
320 | /* IDSEL 0x12 AD18 */ | ||
321 | 9000 0 0 1 &ipic 16 8 | ||
322 | 9000 0 0 2 &ipic 17 8 | ||
323 | 9000 0 0 3 &ipic 14 8 | ||
324 | 9000 0 0 4 &ipic 15 8 | ||
325 | |||
326 | /* IDSEL 0x13 AD19 */ | ||
327 | 9800 0 0 1 &ipic 17 8 | ||
328 | 9800 0 0 2 &ipic 14 8 | ||
329 | 9800 0 0 3 &ipic 15 8 | ||
330 | 9800 0 0 4 &ipic 16 8 | ||
331 | |||
332 | /* IDSEL 0x15 AD21*/ | ||
333 | a800 0 0 1 &ipic 14 8 | ||
334 | a800 0 0 2 &ipic 15 8 | ||
335 | a800 0 0 3 &ipic 16 8 | ||
336 | a800 0 0 4 &ipic 17 8 | ||
337 | |||
338 | /* IDSEL 0x16 AD22*/ | ||
339 | b000 0 0 1 &ipic 17 8 | ||
340 | b000 0 0 2 &ipic 14 8 | ||
341 | b000 0 0 3 &ipic 15 8 | ||
342 | b000 0 0 4 &ipic 16 8 | ||
343 | |||
344 | /* IDSEL 0x17 AD23*/ | ||
345 | b800 0 0 1 &ipic 16 8 | ||
346 | b800 0 0 2 &ipic 17 8 | ||
347 | b800 0 0 3 &ipic 14 8 | ||
348 | b800 0 0 4 &ipic 15 8 | ||
349 | |||
350 | /* IDSEL 0x18 AD24*/ | ||
351 | c000 0 0 1 &ipic 15 8 | ||
352 | c000 0 0 2 &ipic 16 8 | ||
353 | c000 0 0 3 &ipic 17 8 | ||
354 | c000 0 0 4 &ipic 14 8>; | ||
355 | interrupt-parent = < &ipic >; | ||
356 | interrupts = <42 8>; | ||
357 | bus-range = <0 0>; | ||
358 | ranges = <02000000 0 a0000000 a0000000 0 10000000 | ||
359 | 42000000 0 80000000 80000000 0 10000000 | ||
360 | 01000000 0 00000000 e2000000 0 00100000>; | ||
361 | clock-frequency = <3f940aa>; | ||
362 | #interrupt-cells = <1>; | ||
363 | #size-cells = <2>; | ||
364 | #address-cells = <3>; | ||
365 | reg = <e0008500 100>; | ||
366 | compatible = "fsl,mpc8349-pci"; | ||
367 | device_type = "pci"; | ||
373 | }; | 368 | }; |
374 | }; | 369 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts index fc8dff9f6201..6442a717ec3b 100644 --- a/arch/powerpc/boot/dts/mpc8540ads.dts +++ b/arch/powerpc/boot/dts/mpc8540ads.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; // 33 MHz, from uboot | 30 | timebase-frequency = <0>; // 33 MHz, from uboot |
31 | bus-frequency = <0>; // 166 MHz | 31 | bus-frequency = <0>; // 166 MHz |
32 | clock-frequency = <0>; // 825 MHz, from uboot | 32 | clock-frequency = <0>; // 825 MHz, from uboot |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -42,7 +41,6 @@ | |||
42 | soc8540@e0000000 { | 41 | soc8540@e0000000 { |
43 | #address-cells = <1>; | 42 | #address-cells = <1>; |
44 | #size-cells = <1>; | 43 | #size-cells = <1>; |
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | 44 | device_type = "soc"; |
47 | ranges = <0 e0000000 00100000>; | 45 | ranges = <0 e0000000 00100000>; |
48 | reg = <e0000000 00100000>; // CCSRBAR 1M | 46 | reg = <e0000000 00100000>; // CCSRBAR 1M |
@@ -173,105 +171,104 @@ | |||
173 | interrupts = <2a 2>; | 171 | interrupts = <2a 2>; |
174 | interrupt-parent = <&mpic>; | 172 | interrupt-parent = <&mpic>; |
175 | }; | 173 | }; |
176 | pci@8000 { | 174 | mpic: pic@40000 { |
177 | interrupt-map-mask = <f800 0 0 7>; | 175 | clock-frequency = <0>; |
178 | interrupt-map = < | 176 | interrupt-controller; |
177 | #address-cells = <0>; | ||
178 | #interrupt-cells = <2>; | ||
179 | reg = <40000 40000>; | ||
180 | compatible = "chrp,open-pic"; | ||
181 | device_type = "open-pic"; | ||
182 | big-endian; | ||
183 | }; | ||
184 | }; | ||
179 | 185 | ||
180 | /* IDSEL 0x02 */ | 186 | pci@e0008000 { |
181 | 1000 0 0 1 &mpic 1 1 | 187 | interrupt-map-mask = <f800 0 0 7>; |
182 | 1000 0 0 2 &mpic 2 1 | 188 | interrupt-map = < |
183 | 1000 0 0 3 &mpic 3 1 | ||
184 | 1000 0 0 4 &mpic 4 1 | ||
185 | 189 | ||
186 | /* IDSEL 0x03 */ | 190 | /* IDSEL 0x02 */ |
187 | 1800 0 0 1 &mpic 4 1 | 191 | 1000 0 0 1 &mpic 1 1 |
188 | 1800 0 0 2 &mpic 1 1 | 192 | 1000 0 0 2 &mpic 2 1 |
189 | 1800 0 0 3 &mpic 2 1 | 193 | 1000 0 0 3 &mpic 3 1 |
190 | 1800 0 0 4 &mpic 3 1 | 194 | 1000 0 0 4 &mpic 4 1 |
191 | 195 | ||
192 | /* IDSEL 0x04 */ | 196 | /* IDSEL 0x03 */ |
193 | 2000 0 0 1 &mpic 3 1 | 197 | 1800 0 0 1 &mpic 4 1 |
194 | 2000 0 0 2 &mpic 4 1 | 198 | 1800 0 0 2 &mpic 1 1 |
195 | 2000 0 0 3 &mpic 1 1 | 199 | 1800 0 0 3 &mpic 2 1 |
196 | 2000 0 0 4 &mpic 2 1 | 200 | 1800 0 0 4 &mpic 3 1 |
197 | 201 | ||
198 | /* IDSEL 0x05 */ | 202 | /* IDSEL 0x04 */ |
199 | 2800 0 0 1 &mpic 2 1 | 203 | 2000 0 0 1 &mpic 3 1 |
200 | 2800 0 0 2 &mpic 3 1 | 204 | 2000 0 0 2 &mpic 4 1 |
201 | 2800 0 0 3 &mpic 4 1 | 205 | 2000 0 0 3 &mpic 1 1 |
202 | 2800 0 0 4 &mpic 1 1 | 206 | 2000 0 0 4 &mpic 2 1 |
203 | 207 | ||
204 | /* IDSEL 0x0c */ | 208 | /* IDSEL 0x05 */ |
205 | 6000 0 0 1 &mpic 1 1 | 209 | 2800 0 0 1 &mpic 2 1 |
206 | 6000 0 0 2 &mpic 2 1 | 210 | 2800 0 0 2 &mpic 3 1 |
207 | 6000 0 0 3 &mpic 3 1 | 211 | 2800 0 0 3 &mpic 4 1 |
208 | 6000 0 0 4 &mpic 4 1 | 212 | 2800 0 0 4 &mpic 1 1 |
209 | 213 | ||
210 | /* IDSEL 0x0d */ | 214 | /* IDSEL 0x0c */ |
211 | 6800 0 0 1 &mpic 4 1 | 215 | 6000 0 0 1 &mpic 1 1 |
212 | 6800 0 0 2 &mpic 1 1 | 216 | 6000 0 0 2 &mpic 2 1 |
213 | 6800 0 0 3 &mpic 2 1 | 217 | 6000 0 0 3 &mpic 3 1 |
214 | 6800 0 0 4 &mpic 3 1 | 218 | 6000 0 0 4 &mpic 4 1 |
215 | 219 | ||
216 | /* IDSEL 0x0e */ | 220 | /* IDSEL 0x0d */ |
217 | 7000 0 0 1 &mpic 3 1 | 221 | 6800 0 0 1 &mpic 4 1 |
218 | 7000 0 0 2 &mpic 4 1 | 222 | 6800 0 0 2 &mpic 1 1 |
219 | 7000 0 0 3 &mpic 1 1 | 223 | 6800 0 0 3 &mpic 2 1 |
220 | 7000 0 0 4 &mpic 2 1 | 224 | 6800 0 0 4 &mpic 3 1 |
221 | 225 | ||
222 | /* IDSEL 0x0f */ | 226 | /* IDSEL 0x0e */ |
223 | 7800 0 0 1 &mpic 2 1 | 227 | 7000 0 0 1 &mpic 3 1 |
224 | 7800 0 0 2 &mpic 3 1 | 228 | 7000 0 0 2 &mpic 4 1 |
225 | 7800 0 0 3 &mpic 4 1 | 229 | 7000 0 0 3 &mpic 1 1 |
226 | 7800 0 0 4 &mpic 1 1 | 230 | 7000 0 0 4 &mpic 2 1 |
227 | 231 | ||
228 | /* IDSEL 0x12 */ | 232 | /* IDSEL 0x0f */ |
229 | 9000 0 0 1 &mpic 1 1 | 233 | 7800 0 0 1 &mpic 2 1 |
230 | 9000 0 0 2 &mpic 2 1 | 234 | 7800 0 0 2 &mpic 3 1 |
231 | 9000 0 0 3 &mpic 3 1 | 235 | 7800 0 0 3 &mpic 4 1 |
232 | 9000 0 0 4 &mpic 4 1 | 236 | 7800 0 0 4 &mpic 1 1 |
233 | 237 | ||
234 | /* IDSEL 0x13 */ | 238 | /* IDSEL 0x12 */ |
235 | 9800 0 0 1 &mpic 4 1 | 239 | 9000 0 0 1 &mpic 1 1 |
236 | 9800 0 0 2 &mpic 1 1 | 240 | 9000 0 0 2 &mpic 2 1 |
237 | 9800 0 0 3 &mpic 2 1 | 241 | 9000 0 0 3 &mpic 3 1 |
238 | 9800 0 0 4 &mpic 3 1 | 242 | 9000 0 0 4 &mpic 4 1 |
239 | 243 | ||
240 | /* IDSEL 0x14 */ | 244 | /* IDSEL 0x13 */ |
241 | a000 0 0 1 &mpic 3 1 | 245 | 9800 0 0 1 &mpic 4 1 |
242 | a000 0 0 2 &mpic 4 1 | 246 | 9800 0 0 2 &mpic 1 1 |
243 | a000 0 0 3 &mpic 1 1 | 247 | 9800 0 0 3 &mpic 2 1 |
244 | a000 0 0 4 &mpic 2 1 | 248 | 9800 0 0 4 &mpic 3 1 |
245 | 249 | ||
246 | /* IDSEL 0x15 */ | 250 | /* IDSEL 0x14 */ |
247 | a800 0 0 1 &mpic 2 1 | 251 | a000 0 0 1 &mpic 3 1 |
248 | a800 0 0 2 &mpic 3 1 | 252 | a000 0 0 2 &mpic 4 1 |
249 | a800 0 0 3 &mpic 4 1 | 253 | a000 0 0 3 &mpic 1 1 |
250 | a800 0 0 4 &mpic 1 1>; | 254 | a000 0 0 4 &mpic 2 1 |
251 | interrupt-parent = <&mpic>; | ||
252 | interrupts = <18 2>; | ||
253 | bus-range = <0 0>; | ||
254 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
255 | 01000000 0 00000000 e2000000 0 00100000>; | ||
256 | clock-frequency = <3f940aa>; | ||
257 | #interrupt-cells = <1>; | ||
258 | #size-cells = <2>; | ||
259 | #address-cells = <3>; | ||
260 | reg = <8000 1000>; | ||
261 | compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; | ||
262 | device_type = "pci"; | ||
263 | }; | ||
264 | 255 | ||
265 | mpic: pic@40000 { | 256 | /* IDSEL 0x15 */ |
266 | clock-frequency = <0>; | 257 | a800 0 0 1 &mpic 2 1 |
267 | interrupt-controller; | 258 | a800 0 0 2 &mpic 3 1 |
268 | #address-cells = <0>; | 259 | a800 0 0 3 &mpic 4 1 |
269 | #interrupt-cells = <2>; | 260 | a800 0 0 4 &mpic 1 1>; |
270 | reg = <40000 40000>; | 261 | interrupt-parent = <&mpic>; |
271 | built-in; | 262 | interrupts = <18 2>; |
272 | compatible = "chrp,open-pic"; | 263 | bus-range = <0 0>; |
273 | device_type = "open-pic"; | 264 | ranges = <02000000 0 80000000 80000000 0 20000000 |
274 | big-endian; | 265 | 01000000 0 00000000 e2000000 0 00100000>; |
275 | }; | 266 | clock-frequency = <3f940aa>; |
267 | #interrupt-cells = <1>; | ||
268 | #size-cells = <2>; | ||
269 | #address-cells = <3>; | ||
270 | reg = <e0008000 1000>; | ||
271 | compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; | ||
272 | device_type = "pci"; | ||
276 | }; | 273 | }; |
277 | }; | 274 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts index fb0b647f8c2a..6633e07d9f4d 100644 --- a/arch/powerpc/boot/dts/mpc8541cds.dts +++ b/arch/powerpc/boot/dts/mpc8541cds.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; // 33 MHz, from uboot | 30 | timebase-frequency = <0>; // 33 MHz, from uboot |
31 | bus-frequency = <0>; // 166 MHz | 31 | bus-frequency = <0>; // 166 MHz |
32 | clock-frequency = <0>; // 825 MHz, from uboot | 32 | clock-frequency = <0>; // 825 MHz, from uboot |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -42,10 +41,9 @@ | |||
42 | soc8541@e0000000 { | 41 | soc8541@e0000000 { |
43 | #address-cells = <1>; | 42 | #address-cells = <1>; |
44 | #size-cells = <1>; | 43 | #size-cells = <1>; |
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | 44 | device_type = "soc"; |
47 | ranges = <0 e0000000 00100000>; | 45 | ranges = <0 e0000000 00100000>; |
48 | reg = <e0000000 00100000>; // CCSRBAR 1M | 46 | reg = <e0000000 00001000>; // CCSRBAR 1M |
49 | bus-frequency = <0>; | 47 | bus-frequency = <0>; |
50 | 48 | ||
51 | memory-controller@2000 { | 49 | memory-controller@2000 { |
@@ -137,113 +135,109 @@ | |||
137 | interrupt-parent = <&mpic>; | 135 | interrupt-parent = <&mpic>; |
138 | }; | 136 | }; |
139 | 137 | ||
140 | pci1: pci@8000 { | ||
141 | interrupt-map-mask = <1f800 0 0 7>; | ||
142 | interrupt-map = < | ||
143 | |||
144 | /* IDSEL 0x10 */ | ||
145 | 08000 0 0 1 &mpic 0 1 | ||
146 | 08000 0 0 2 &mpic 1 1 | ||
147 | 08000 0 0 3 &mpic 2 1 | ||
148 | 08000 0 0 4 &mpic 3 1 | ||
149 | |||
150 | /* IDSEL 0x11 */ | ||
151 | 08800 0 0 1 &mpic 0 1 | ||
152 | 08800 0 0 2 &mpic 1 1 | ||
153 | 08800 0 0 3 &mpic 2 1 | ||
154 | 08800 0 0 4 &mpic 3 1 | ||
155 | |||
156 | /* IDSEL 0x12 (Slot 1) */ | ||
157 | 09000 0 0 1 &mpic 0 1 | ||
158 | 09000 0 0 2 &mpic 1 1 | ||
159 | 09000 0 0 3 &mpic 2 1 | ||
160 | 09000 0 0 4 &mpic 3 1 | ||
161 | |||
162 | /* IDSEL 0x13 (Slot 2) */ | ||
163 | 09800 0 0 1 &mpic 1 1 | ||
164 | 09800 0 0 2 &mpic 2 1 | ||
165 | 09800 0 0 3 &mpic 3 1 | ||
166 | 09800 0 0 4 &mpic 0 1 | ||
167 | |||
168 | /* IDSEL 0x14 (Slot 3) */ | ||
169 | 0a000 0 0 1 &mpic 2 1 | ||
170 | 0a000 0 0 2 &mpic 3 1 | ||
171 | 0a000 0 0 3 &mpic 0 1 | ||
172 | 0a000 0 0 4 &mpic 1 1 | ||
173 | |||
174 | /* IDSEL 0x15 (Slot 4) */ | ||
175 | 0a800 0 0 1 &mpic 3 1 | ||
176 | 0a800 0 0 2 &mpic 0 1 | ||
177 | 0a800 0 0 3 &mpic 1 1 | ||
178 | 0a800 0 0 4 &mpic 2 1 | ||
179 | |||
180 | /* Bus 1 (Tundra Bridge) */ | ||
181 | /* IDSEL 0x12 (ISA bridge) */ | ||
182 | 19000 0 0 1 &mpic 0 1 | ||
183 | 19000 0 0 2 &mpic 1 1 | ||
184 | 19000 0 0 3 &mpic 2 1 | ||
185 | 19000 0 0 4 &mpic 3 1>; | ||
186 | interrupt-parent = <&mpic>; | ||
187 | interrupts = <18 2>; | ||
188 | bus-range = <0 0>; | ||
189 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
190 | 01000000 0 00000000 e2000000 0 00100000>; | ||
191 | clock-frequency = <3f940aa>; | ||
192 | #interrupt-cells = <1>; | ||
193 | #size-cells = <2>; | ||
194 | #address-cells = <3>; | ||
195 | reg = <8000 1000>; | ||
196 | compatible = "fsl,mpc8540-pci"; | ||
197 | device_type = "pci"; | ||
198 | |||
199 | i8259@19000 { | ||
200 | clock-frequency = <0>; | ||
201 | interrupt-controller; | ||
202 | device_type = "interrupt-controller"; | ||
203 | reg = <19000 0 0 0 1>; | ||
204 | #address-cells = <0>; | ||
205 | #interrupt-cells = <2>; | ||
206 | built-in; | ||
207 | compatible = "chrp,iic"; | ||
208 | big-endian; | ||
209 | interrupts = <1>; | ||
210 | interrupt-parent = <&pci1>; | ||
211 | }; | ||
212 | }; | ||
213 | |||
214 | pci@9000 { | ||
215 | interrupt-map-mask = <f800 0 0 7>; | ||
216 | interrupt-map = < | ||
217 | |||
218 | /* IDSEL 0x15 */ | ||
219 | a800 0 0 1 &mpic b 1 | ||
220 | a800 0 0 2 &mpic b 1 | ||
221 | a800 0 0 3 &mpic b 1 | ||
222 | a800 0 0 4 &mpic b 1>; | ||
223 | interrupt-parent = <&mpic>; | ||
224 | interrupts = <19 2>; | ||
225 | bus-range = <0 0>; | ||
226 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
227 | 01000000 0 00000000 e3000000 0 00100000>; | ||
228 | clock-frequency = <3f940aa>; | ||
229 | #interrupt-cells = <1>; | ||
230 | #size-cells = <2>; | ||
231 | #address-cells = <3>; | ||
232 | reg = <9000 1000>; | ||
233 | compatible = "fsl,mpc8540-pci"; | ||
234 | device_type = "pci"; | ||
235 | }; | ||
236 | |||
237 | mpic: pic@40000 { | 138 | mpic: pic@40000 { |
238 | clock-frequency = <0>; | 139 | clock-frequency = <0>; |
239 | interrupt-controller; | 140 | interrupt-controller; |
240 | #address-cells = <0>; | 141 | #address-cells = <0>; |
241 | #interrupt-cells = <2>; | 142 | #interrupt-cells = <2>; |
242 | reg = <40000 40000>; | 143 | reg = <40000 40000>; |
243 | built-in; | ||
244 | compatible = "chrp,open-pic"; | 144 | compatible = "chrp,open-pic"; |
245 | device_type = "open-pic"; | 145 | device_type = "open-pic"; |
246 | big-endian; | 146 | big-endian; |
247 | }; | 147 | }; |
248 | }; | 148 | }; |
149 | |||
150 | pci1: pci@e0008000 { | ||
151 | interrupt-map-mask = <1f800 0 0 7>; | ||
152 | interrupt-map = < | ||
153 | |||
154 | /* IDSEL 0x10 */ | ||
155 | 08000 0 0 1 &mpic 0 1 | ||
156 | 08000 0 0 2 &mpic 1 1 | ||
157 | 08000 0 0 3 &mpic 2 1 | ||
158 | 08000 0 0 4 &mpic 3 1 | ||
159 | |||
160 | /* IDSEL 0x11 */ | ||
161 | 08800 0 0 1 &mpic 0 1 | ||
162 | 08800 0 0 2 &mpic 1 1 | ||
163 | 08800 0 0 3 &mpic 2 1 | ||
164 | 08800 0 0 4 &mpic 3 1 | ||
165 | |||
166 | /* IDSEL 0x12 (Slot 1) */ | ||
167 | 09000 0 0 1 &mpic 0 1 | ||
168 | 09000 0 0 2 &mpic 1 1 | ||
169 | 09000 0 0 3 &mpic 2 1 | ||
170 | 09000 0 0 4 &mpic 3 1 | ||
171 | |||
172 | /* IDSEL 0x13 (Slot 2) */ | ||
173 | 09800 0 0 1 &mpic 1 1 | ||
174 | 09800 0 0 2 &mpic 2 1 | ||
175 | 09800 0 0 3 &mpic 3 1 | ||
176 | 09800 0 0 4 &mpic 0 1 | ||
177 | |||
178 | /* IDSEL 0x14 (Slot 3) */ | ||
179 | 0a000 0 0 1 &mpic 2 1 | ||
180 | 0a000 0 0 2 &mpic 3 1 | ||
181 | 0a000 0 0 3 &mpic 0 1 | ||
182 | 0a000 0 0 4 &mpic 1 1 | ||
183 | |||
184 | /* IDSEL 0x15 (Slot 4) */ | ||
185 | 0a800 0 0 1 &mpic 3 1 | ||
186 | 0a800 0 0 2 &mpic 0 1 | ||
187 | 0a800 0 0 3 &mpic 1 1 | ||
188 | 0a800 0 0 4 &mpic 2 1 | ||
189 | |||
190 | /* Bus 1 (Tundra Bridge) */ | ||
191 | /* IDSEL 0x12 (ISA bridge) */ | ||
192 | 19000 0 0 1 &mpic 0 1 | ||
193 | 19000 0 0 2 &mpic 1 1 | ||
194 | 19000 0 0 3 &mpic 2 1 | ||
195 | 19000 0 0 4 &mpic 3 1>; | ||
196 | interrupt-parent = <&mpic>; | ||
197 | interrupts = <18 2>; | ||
198 | bus-range = <0 0>; | ||
199 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
200 | 01000000 0 00000000 e2000000 0 00100000>; | ||
201 | clock-frequency = <3f940aa>; | ||
202 | #interrupt-cells = <1>; | ||
203 | #size-cells = <2>; | ||
204 | #address-cells = <3>; | ||
205 | reg = <e0008000 1000>; | ||
206 | compatible = "fsl,mpc8540-pci"; | ||
207 | device_type = "pci"; | ||
208 | |||
209 | i8259@19000 { | ||
210 | interrupt-controller; | ||
211 | device_type = "interrupt-controller"; | ||
212 | reg = <19000 0 0 0 1>; | ||
213 | #address-cells = <0>; | ||
214 | #interrupt-cells = <2>; | ||
215 | compatible = "chrp,iic"; | ||
216 | interrupts = <1>; | ||
217 | interrupt-parent = <&pci1>; | ||
218 | }; | ||
219 | }; | ||
220 | |||
221 | pci@e0009000 { | ||
222 | interrupt-map-mask = <f800 0 0 7>; | ||
223 | interrupt-map = < | ||
224 | |||
225 | /* IDSEL 0x15 */ | ||
226 | a800 0 0 1 &mpic b 1 | ||
227 | a800 0 0 2 &mpic b 1 | ||
228 | a800 0 0 3 &mpic b 1 | ||
229 | a800 0 0 4 &mpic b 1>; | ||
230 | interrupt-parent = <&mpic>; | ||
231 | interrupts = <19 2>; | ||
232 | bus-range = <0 0>; | ||
233 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
234 | 01000000 0 00000000 e3000000 0 00100000>; | ||
235 | clock-frequency = <3f940aa>; | ||
236 | #interrupt-cells = <1>; | ||
237 | #size-cells = <2>; | ||
238 | #address-cells = <3>; | ||
239 | reg = <e0009000 1000>; | ||
240 | compatible = "fsl,mpc8540-pci"; | ||
241 | device_type = "pci"; | ||
242 | }; | ||
249 | }; | 243 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 3e79bf0a3159..3f9d15cf13e0 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; | 30 | timebase-frequency = <0>; |
31 | bus-frequency = <0>; | 31 | bus-frequency = <0>; |
32 | clock-frequency = <0>; | 32 | clock-frequency = <0>; |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -42,19 +41,9 @@ | |||
42 | soc8544@e0000000 { | 41 | soc8544@e0000000 { |
43 | #address-cells = <1>; | 42 | #address-cells = <1>; |
44 | #size-cells = <1>; | 43 | #size-cells = <1>; |
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | 44 | device_type = "soc"; |
47 | 45 | ||
48 | 46 | ranges = <00000000 e0000000 00100000>; | |
49 | ranges = <00001000 e0001000 000ff000 | ||
50 | 80000000 80000000 20000000 | ||
51 | a0000000 a0000000 10000000 | ||
52 | b0000000 b0000000 00100000 | ||
53 | c0000000 c0000000 20000000 | ||
54 | b0100000 b0100000 00100000 | ||
55 | e1000000 e1000000 00010000 | ||
56 | e1010000 e1010000 00010000 | ||
57 | e1020000 e1020000 00010000>; | ||
58 | reg = <e0000000 00001000>; // CCSRBAR 1M | 47 | reg = <e0000000 00001000>; // CCSRBAR 1M |
59 | bus-frequency = <0>; // Filled out by uboot. | 48 | bus-frequency = <0>; // Filled out by uboot. |
60 | 49 | ||
@@ -149,115 +138,173 @@ | |||
149 | interrupt-parent = <&mpic>; | 138 | interrupt-parent = <&mpic>; |
150 | }; | 139 | }; |
151 | 140 | ||
152 | pci@8000 { | 141 | global-utilities@e0000 { //global utilities block |
153 | compatible = "fsl,mpc8540-pci"; | 142 | compatible = "fsl,mpc8548-guts"; |
154 | device_type = "pci"; | 143 | reg = <e0000 1000>; |
155 | interrupt-map-mask = <f800 0 0 7>; | 144 | fsl,has-rstcr; |
156 | interrupt-map = < | 145 | }; |
157 | |||
158 | /* IDSEL 0x11 J17 Slot 1 */ | ||
159 | 8800 0 0 1 &mpic 2 1 | ||
160 | 8800 0 0 2 &mpic 3 1 | ||
161 | 8800 0 0 3 &mpic 4 1 | ||
162 | 8800 0 0 4 &mpic 1 1 | ||
163 | 146 | ||
164 | /* IDSEL 0x12 J16 Slot 2 */ | 147 | mpic: pic@40000 { |
148 | clock-frequency = <0>; | ||
149 | interrupt-controller; | ||
150 | #address-cells = <0>; | ||
151 | #interrupt-cells = <2>; | ||
152 | reg = <40000 40000>; | ||
153 | compatible = "chrp,open-pic"; | ||
154 | device_type = "open-pic"; | ||
155 | big-endian; | ||
156 | }; | ||
157 | }; | ||
165 | 158 | ||
166 | 9000 0 0 1 &mpic 3 1 | 159 | pci@e0008000 { |
167 | 9000 0 0 2 &mpic 4 1 | 160 | compatible = "fsl,mpc8540-pci"; |
168 | 9000 0 0 3 &mpic 2 1 | 161 | device_type = "pci"; |
169 | 9000 0 0 4 &mpic 1 1>; | 162 | interrupt-map-mask = <f800 0 0 7>; |
163 | interrupt-map = < | ||
164 | |||
165 | /* IDSEL 0x11 J17 Slot 1 */ | ||
166 | 8800 0 0 1 &mpic 2 1 | ||
167 | 8800 0 0 2 &mpic 3 1 | ||
168 | 8800 0 0 3 &mpic 4 1 | ||
169 | 8800 0 0 4 &mpic 1 1 | ||
170 | |||
171 | /* IDSEL 0x12 J16 Slot 2 */ | ||
172 | |||
173 | 9000 0 0 1 &mpic 3 1 | ||
174 | 9000 0 0 2 &mpic 4 1 | ||
175 | 9000 0 0 3 &mpic 2 1 | ||
176 | 9000 0 0 4 &mpic 1 1>; | ||
177 | |||
178 | interrupt-parent = <&mpic>; | ||
179 | interrupts = <18 2>; | ||
180 | bus-range = <0 ff>; | ||
181 | ranges = <02000000 0 c0000000 c0000000 0 20000000 | ||
182 | 01000000 0 00000000 e1000000 0 00010000>; | ||
183 | clock-frequency = <3f940aa>; | ||
184 | #interrupt-cells = <1>; | ||
185 | #size-cells = <2>; | ||
186 | #address-cells = <3>; | ||
187 | reg = <e0008000 1000>; | ||
188 | }; | ||
170 | 189 | ||
171 | interrupt-parent = <&mpic>; | 190 | pcie@e0009000 { |
172 | interrupts = <18 2>; | 191 | compatible = "fsl,mpc8548-pcie"; |
173 | bus-range = <0 ff>; | 192 | device_type = "pci"; |
174 | ranges = <02000000 0 c0000000 c0000000 0 20000000 | 193 | #interrupt-cells = <1>; |
175 | 01000000 0 00000000 e1000000 0 00010000>; | 194 | #size-cells = <2>; |
176 | clock-frequency = <3f940aa>; | 195 | #address-cells = <3>; |
177 | #interrupt-cells = <1>; | 196 | reg = <e0009000 1000>; |
197 | bus-range = <0 ff>; | ||
198 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
199 | 01000000 0 00000000 e1010000 0 00010000>; | ||
200 | clock-frequency = <1fca055>; | ||
201 | interrupt-parent = <&mpic>; | ||
202 | interrupts = <1a 2>; | ||
203 | interrupt-map-mask = <f800 0 0 7>; | ||
204 | interrupt-map = < | ||
205 | /* IDSEL 0x0 */ | ||
206 | 0000 0 0 1 &mpic 4 1 | ||
207 | 0000 0 0 2 &mpic 5 1 | ||
208 | 0000 0 0 3 &mpic 6 1 | ||
209 | 0000 0 0 4 &mpic 7 1 | ||
210 | >; | ||
211 | pcie@0 { | ||
212 | reg = <0 0 0 0 0>; | ||
178 | #size-cells = <2>; | 213 | #size-cells = <2>; |
179 | #address-cells = <3>; | 214 | #address-cells = <3>; |
180 | reg = <8000 1000>; | ||
181 | }; | ||
182 | |||
183 | pcie@9000 { | ||
184 | compatible = "fsl,mpc8548-pcie"; | ||
185 | device_type = "pci"; | 215 | device_type = "pci"; |
186 | #interrupt-cells = <1>; | 216 | ranges = <02000000 0 80000000 |
187 | #size-cells = <2>; | 217 | 02000000 0 80000000 |
188 | #address-cells = <3>; | 218 | 0 20000000 |
189 | reg = <9000 1000>; | 219 | |
190 | bus-range = <0 ff>; | 220 | 01000000 0 00000000 |
191 | ranges = <02000000 0 80000000 80000000 0 20000000 | 221 | 01000000 0 00000000 |
192 | 01000000 0 00000000 e1010000 0 00010000>; | 222 | 0 00010000>; |
193 | clock-frequency = <1fca055>; | ||
194 | interrupt-parent = <&mpic>; | ||
195 | interrupts = <1a 2>; | ||
196 | interrupt-map-mask = <f800 0 0 7>; | ||
197 | interrupt-map = < | ||
198 | /* IDSEL 0x0 */ | ||
199 | 0000 0 0 1 &mpic 4 1 | ||
200 | 0000 0 0 2 &mpic 5 1 | ||
201 | 0000 0 0 3 &mpic 6 1 | ||
202 | 0000 0 0 4 &mpic 7 1 | ||
203 | >; | ||
204 | }; | 223 | }; |
224 | }; | ||
205 | 225 | ||
206 | pcie@a000 { | 226 | pcie@e000a000 { |
207 | compatible = "fsl,mpc8548-pcie"; | 227 | compatible = "fsl,mpc8548-pcie"; |
208 | device_type = "pci"; | 228 | device_type = "pci"; |
209 | #interrupt-cells = <1>; | 229 | #interrupt-cells = <1>; |
230 | #size-cells = <2>; | ||
231 | #address-cells = <3>; | ||
232 | reg = <e000a000 1000>; | ||
233 | bus-range = <0 ff>; | ||
234 | ranges = <02000000 0 a0000000 a0000000 0 10000000 | ||
235 | 01000000 0 00000000 e1020000 0 00010000>; | ||
236 | clock-frequency = <1fca055>; | ||
237 | interrupt-parent = <&mpic>; | ||
238 | interrupts = <19 2>; | ||
239 | interrupt-map-mask = <f800 0 0 7>; | ||
240 | interrupt-map = < | ||
241 | /* IDSEL 0x0 */ | ||
242 | 0000 0 0 1 &mpic 0 1 | ||
243 | 0000 0 0 2 &mpic 1 1 | ||
244 | 0000 0 0 3 &mpic 2 1 | ||
245 | 0000 0 0 4 &mpic 3 1 | ||
246 | >; | ||
247 | pcie@0 { | ||
248 | reg = <0 0 0 0 0>; | ||
210 | #size-cells = <2>; | 249 | #size-cells = <2>; |
211 | #address-cells = <3>; | 250 | #address-cells = <3>; |
212 | reg = <a000 1000>; | 251 | device_type = "pci"; |
213 | bus-range = <0 ff>; | 252 | ranges = <02000000 0 a0000000 |
214 | ranges = <02000000 0 a0000000 a0000000 0 10000000 | 253 | 02000000 0 a0000000 |
215 | 01000000 0 00000000 e1020000 0 00010000>; | 254 | 0 10000000 |
216 | clock-frequency = <1fca055>; | 255 | |
217 | interrupt-parent = <&mpic>; | 256 | 01000000 0 00000000 |
218 | interrupts = <19 2>; | 257 | 01000000 0 00000000 |
219 | interrupt-map-mask = <f800 0 0 7>; | 258 | 0 00010000>; |
220 | interrupt-map = < | ||
221 | /* IDSEL 0x0 */ | ||
222 | 0000 0 0 1 &mpic 0 1 | ||
223 | 0000 0 0 2 &mpic 1 1 | ||
224 | 0000 0 0 3 &mpic 2 1 | ||
225 | 0000 0 0 4 &mpic 3 1 | ||
226 | >; | ||
227 | }; | 259 | }; |
260 | }; | ||
228 | 261 | ||
229 | pcie@b000 { | 262 | pcie@e000b000 { |
230 | compatible = "fsl,mpc8548-pcie"; | 263 | compatible = "fsl,mpc8548-pcie"; |
231 | device_type = "pci"; | 264 | device_type = "pci"; |
232 | #interrupt-cells = <1>; | 265 | #interrupt-cells = <1>; |
266 | #size-cells = <2>; | ||
267 | #address-cells = <3>; | ||
268 | reg = <e000b000 1000>; | ||
269 | bus-range = <0 ff>; | ||
270 | ranges = <02000000 0 b0000000 b0000000 0 00100000 | ||
271 | 01000000 0 00000000 b0100000 0 00100000>; | ||
272 | clock-frequency = <1fca055>; | ||
273 | interrupt-parent = <&mpic>; | ||
274 | interrupts = <1b 2>; | ||
275 | interrupt-map-mask = <fb00 0 0 0>; | ||
276 | interrupt-map = < | ||
277 | // IDSEL 0x1c USB | ||
278 | e000 0 0 0 &i8259 c 2 | ||
279 | e100 0 0 0 &i8259 9 2 | ||
280 | e200 0 0 0 &i8259 a 2 | ||
281 | e300 0 0 0 &i8259 b 2 | ||
282 | |||
283 | // IDSEL 0x1d Audio | ||
284 | e800 0 0 0 &i8259 6 2 | ||
285 | |||
286 | // IDSEL 0x1e Legacy | ||
287 | f000 0 0 0 &i8259 7 2 | ||
288 | f100 0 0 0 &i8259 7 2 | ||
289 | |||
290 | // IDSEL 0x1f IDE/SATA | ||
291 | f800 0 0 0 &i8259 e 2 | ||
292 | f900 0 0 0 &i8259 5 2 | ||
293 | >; | ||
294 | |||
295 | pcie@0 { | ||
296 | reg = <0 0 0 0 0>; | ||
233 | #size-cells = <2>; | 297 | #size-cells = <2>; |
234 | #address-cells = <3>; | 298 | #address-cells = <3>; |
235 | reg = <b000 1000>; | 299 | device_type = "pci"; |
236 | bus-range = <0 ff>; | 300 | ranges = <02000000 0 b0000000 |
237 | ranges = <02000000 0 b0000000 b0000000 0 00100000 | 301 | 02000000 0 b0000000 |
238 | 01000000 0 00000000 b0100000 0 00100000>; | 302 | 0 00100000 |
239 | clock-frequency = <1fca055>; | 303 | |
240 | interrupt-parent = <&mpic>; | 304 | 01000000 0 00000000 |
241 | interrupts = <1b 2>; | 305 | 01000000 0 00000000 |
242 | interrupt-map-mask = <fb00 0 0 0>; | 306 | 0 00100000>; |
243 | interrupt-map = < | 307 | |
244 | // IDSEL 0x1c USB | ||
245 | e000 0 0 0 &i8259 c 2 | ||
246 | e100 0 0 0 &i8259 9 2 | ||
247 | e200 0 0 0 &i8259 a 2 | ||
248 | e300 0 0 0 &i8259 b 2 | ||
249 | |||
250 | // IDSEL 0x1d Audio | ||
251 | e800 0 0 0 &i8259 6 2 | ||
252 | |||
253 | // IDSEL 0x1e Legacy | ||
254 | f000 0 0 0 &i8259 7 2 | ||
255 | f100 0 0 0 &i8259 7 2 | ||
256 | |||
257 | // IDSEL 0x1f IDE/SATA | ||
258 | f800 0 0 0 &i8259 e 2 | ||
259 | f900 0 0 0 &i8259 5 2 | ||
260 | >; | ||
261 | uli1575@0 { | 308 | uli1575@0 { |
262 | reg = <0 0 0 0 0>; | 309 | reg = <0 0 0 0 0>; |
263 | #size-cells = <2>; | 310 | #size-cells = <2>; |
@@ -265,95 +312,63 @@ | |||
265 | ranges = <02000000 0 b0000000 | 312 | ranges = <02000000 0 b0000000 |
266 | 02000000 0 b0000000 | 313 | 02000000 0 b0000000 |
267 | 0 00100000 | 314 | 0 00100000 |
315 | |||
268 | 01000000 0 00000000 | 316 | 01000000 0 00000000 |
269 | 01000000 0 00000000 | 317 | 01000000 0 00000000 |
270 | 0 00100000>; | 318 | 0 00100000>; |
271 | 319 | isa@1e { | |
272 | pci_bridge@0 { | 320 | device_type = "isa"; |
273 | reg = <0 0 0 0 0>; | 321 | #interrupt-cells = <2>; |
274 | #size-cells = <2>; | 322 | #size-cells = <1>; |
275 | #address-cells = <3>; | 323 | #address-cells = <2>; |
276 | ranges = <02000000 0 b0000000 | 324 | reg = <f000 0 0 0 0>; |
277 | 02000000 0 b0000000 | 325 | ranges = <1 0 |
278 | 0 00100000 | 326 | 01000000 0 0 |
279 | 01000000 0 00000000 | 327 | 00001000>; |
280 | 01000000 0 00000000 | 328 | interrupt-parent = <&i8259>; |
281 | 0 00100000>; | 329 | |
282 | 330 | i8259: interrupt-controller@20 { | |
283 | isa@1e { | 331 | reg = <1 20 2 |
284 | device_type = "isa"; | 332 | 1 a0 2 |
333 | 1 4d0 2>; | ||
334 | interrupt-controller; | ||
335 | device_type = "interrupt-controller"; | ||
336 | #address-cells = <0>; | ||
285 | #interrupt-cells = <2>; | 337 | #interrupt-cells = <2>; |
286 | #size-cells = <1>; | 338 | compatible = "chrp,iic"; |
287 | #address-cells = <2>; | 339 | interrupts = <9 2>; |
288 | reg = <f000 0 0 0 0>; | 340 | interrupt-parent = <&mpic>; |
289 | ranges = <1 0 | 341 | }; |
290 | 01000000 0 0 | 342 | |
291 | 00001000>; | 343 | i8042@60 { |
344 | #size-cells = <0>; | ||
345 | #address-cells = <1>; | ||
346 | reg = <1 60 1 1 64 1>; | ||
347 | interrupts = <1 3 c 3>; | ||
292 | interrupt-parent = <&i8259>; | 348 | interrupt-parent = <&i8259>; |
293 | 349 | ||
294 | i8259: interrupt-controller@20 { | 350 | keyboard@0 { |
295 | reg = <1 20 2 | 351 | reg = <0>; |
296 | 1 a0 2 | 352 | compatible = "pnpPNP,303"; |
297 | 1 4d0 2>; | ||
298 | clock-frequency = <0>; | ||
299 | interrupt-controller; | ||
300 | device_type = "interrupt-controller"; | ||
301 | #address-cells = <0>; | ||
302 | #interrupt-cells = <2>; | ||
303 | built-in; | ||
304 | compatible = "chrp,iic"; | ||
305 | interrupts = <9 2>; | ||
306 | interrupt-parent = <&mpic>; | ||
307 | }; | 353 | }; |
308 | 354 | ||
309 | i8042@60 { | 355 | mouse@1 { |
310 | #size-cells = <0>; | 356 | reg = <1>; |
311 | #address-cells = <1>; | 357 | compatible = "pnpPNP,f03"; |
312 | reg = <1 60 1 1 64 1>; | ||
313 | interrupts = <1 3 c 3>; | ||
314 | interrupt-parent = <&i8259>; | ||
315 | |||
316 | keyboard@0 { | ||
317 | reg = <0>; | ||
318 | compatible = "pnpPNP,303"; | ||
319 | }; | ||
320 | |||
321 | mouse@1 { | ||
322 | reg = <1>; | ||
323 | compatible = "pnpPNP,f03"; | ||
324 | }; | ||
325 | }; | 358 | }; |
359 | }; | ||
326 | 360 | ||
327 | rtc@70 { | 361 | rtc@70 { |
328 | compatible = "pnpPNP,b00"; | 362 | compatible = "pnpPNP,b00"; |
329 | reg = <1 70 2>; | 363 | reg = <1 70 2>; |
330 | }; | 364 | }; |
331 | 365 | ||
332 | gpio@400 { | 366 | gpio@400 { |
333 | reg = <1 400 80>; | 367 | reg = <1 400 80>; |
334 | }; | ||
335 | }; | 368 | }; |
336 | }; | 369 | }; |
337 | }; | 370 | }; |
338 | |||
339 | }; | 371 | }; |
340 | 372 | ||
341 | global-utilities@e0000 { //global utilities block | ||
342 | compatible = "fsl,mpc8548-guts"; | ||
343 | reg = <e0000 1000>; | ||
344 | fsl,has-rstcr; | ||
345 | }; | ||
346 | |||
347 | mpic: pic@40000 { | ||
348 | clock-frequency = <0>; | ||
349 | interrupt-controller; | ||
350 | #address-cells = <0>; | ||
351 | #interrupt-cells = <2>; | ||
352 | reg = <40000 40000>; | ||
353 | built-in; | ||
354 | compatible = "chrp,open-pic"; | ||
355 | device_type = "open-pic"; | ||
356 | big-endian; | ||
357 | }; | ||
358 | }; | 373 | }; |
359 | }; | 374 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index d215d21fff42..69ca5025d972 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; // 33 MHz, from uboot | 30 | timebase-frequency = <0>; // 33 MHz, from uboot |
31 | bus-frequency = <0>; // 166 MHz | 31 | bus-frequency = <0>; // 166 MHz |
32 | clock-frequency = <0>; // 825 MHz, from uboot | 32 | clock-frequency = <0>; // 825 MHz, from uboot |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -42,15 +41,8 @@ | |||
42 | soc8548@e0000000 { | 41 | soc8548@e0000000 { |
43 | #address-cells = <1>; | 42 | #address-cells = <1>; |
44 | #size-cells = <1>; | 43 | #size-cells = <1>; |
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | 44 | device_type = "soc"; |
47 | ranges = <00001000 e0001000 000ff000 | 45 | ranges = <00000000 e0000000 00100000>; |
48 | 80000000 80000000 10000000 | ||
49 | e2000000 e2000000 00800000 | ||
50 | 90000000 90000000 10000000 | ||
51 | e2800000 e2800000 00800000 | ||
52 | a0000000 a0000000 20000000 | ||
53 | e3000000 e3000000 01000000>; | ||
54 | reg = <e0000000 00001000>; // CCSRBAR | 46 | reg = <e0000000 00001000>; // CCSRBAR |
55 | bus-frequency = <0>; | 47 | bus-frequency = <0>; |
56 | 48 | ||
@@ -189,215 +181,225 @@ | |||
189 | fsl,has-rstcr; | 181 | fsl,has-rstcr; |
190 | }; | 182 | }; |
191 | 183 | ||
192 | pci@8000 { | 184 | mpic: pic@40000 { |
185 | clock-frequency = <0>; | ||
186 | interrupt-controller; | ||
187 | #address-cells = <0>; | ||
188 | #interrupt-cells = <2>; | ||
189 | reg = <40000 40000>; | ||
190 | compatible = "chrp,open-pic"; | ||
191 | device_type = "open-pic"; | ||
192 | big-endian; | ||
193 | }; | ||
194 | }; | ||
195 | |||
196 | pci@e0008000 { | ||
197 | interrupt-map-mask = <f800 0 0 7>; | ||
198 | interrupt-map = < | ||
199 | /* IDSEL 0x4 (PCIX Slot 2) */ | ||
200 | 02000 0 0 1 &mpic 0 1 | ||
201 | 02000 0 0 2 &mpic 1 1 | ||
202 | 02000 0 0 3 &mpic 2 1 | ||
203 | 02000 0 0 4 &mpic 3 1 | ||
204 | |||
205 | /* IDSEL 0x5 (PCIX Slot 3) */ | ||
206 | 02800 0 0 1 &mpic 1 1 | ||
207 | 02800 0 0 2 &mpic 2 1 | ||
208 | 02800 0 0 3 &mpic 3 1 | ||
209 | 02800 0 0 4 &mpic 0 1 | ||
210 | |||
211 | /* IDSEL 0x6 (PCIX Slot 4) */ | ||
212 | 03000 0 0 1 &mpic 2 1 | ||
213 | 03000 0 0 2 &mpic 3 1 | ||
214 | 03000 0 0 3 &mpic 0 1 | ||
215 | 03000 0 0 4 &mpic 1 1 | ||
216 | |||
217 | /* IDSEL 0x8 (PCIX Slot 5) */ | ||
218 | 04000 0 0 1 &mpic 0 1 | ||
219 | 04000 0 0 2 &mpic 1 1 | ||
220 | 04000 0 0 3 &mpic 2 1 | ||
221 | 04000 0 0 4 &mpic 3 1 | ||
222 | |||
223 | /* IDSEL 0xC (Tsi310 bridge) */ | ||
224 | 06000 0 0 1 &mpic 0 1 | ||
225 | 06000 0 0 2 &mpic 1 1 | ||
226 | 06000 0 0 3 &mpic 2 1 | ||
227 | 06000 0 0 4 &mpic 3 1 | ||
228 | |||
229 | /* IDSEL 0x14 (Slot 2) */ | ||
230 | 0a000 0 0 1 &mpic 0 1 | ||
231 | 0a000 0 0 2 &mpic 1 1 | ||
232 | 0a000 0 0 3 &mpic 2 1 | ||
233 | 0a000 0 0 4 &mpic 3 1 | ||
234 | |||
235 | /* IDSEL 0x15 (Slot 3) */ | ||
236 | 0a800 0 0 1 &mpic 1 1 | ||
237 | 0a800 0 0 2 &mpic 2 1 | ||
238 | 0a800 0 0 3 &mpic 3 1 | ||
239 | 0a800 0 0 4 &mpic 0 1 | ||
240 | |||
241 | /* IDSEL 0x16 (Slot 4) */ | ||
242 | 0b000 0 0 1 &mpic 2 1 | ||
243 | 0b000 0 0 2 &mpic 3 1 | ||
244 | 0b000 0 0 3 &mpic 0 1 | ||
245 | 0b000 0 0 4 &mpic 1 1 | ||
246 | |||
247 | /* IDSEL 0x18 (Slot 5) */ | ||
248 | 0c000 0 0 1 &mpic 0 1 | ||
249 | 0c000 0 0 2 &mpic 1 1 | ||
250 | 0c000 0 0 3 &mpic 2 1 | ||
251 | 0c000 0 0 4 &mpic 3 1 | ||
252 | |||
253 | /* IDSEL 0x1C (Tsi310 bridge PCI primary) */ | ||
254 | 0E000 0 0 1 &mpic 0 1 | ||
255 | 0E000 0 0 2 &mpic 1 1 | ||
256 | 0E000 0 0 3 &mpic 2 1 | ||
257 | 0E000 0 0 4 &mpic 3 1>; | ||
258 | |||
259 | interrupt-parent = <&mpic>; | ||
260 | interrupts = <18 2>; | ||
261 | bus-range = <0 0>; | ||
262 | ranges = <02000000 0 80000000 80000000 0 10000000 | ||
263 | 01000000 0 00000000 e2000000 0 00800000>; | ||
264 | clock-frequency = <3f940aa>; | ||
265 | #interrupt-cells = <1>; | ||
266 | #size-cells = <2>; | ||
267 | #address-cells = <3>; | ||
268 | reg = <e0008000 1000>; | ||
269 | compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; | ||
270 | device_type = "pci"; | ||
271 | |||
272 | pci_bridge@1c { | ||
193 | interrupt-map-mask = <f800 0 0 7>; | 273 | interrupt-map-mask = <f800 0 0 7>; |
194 | interrupt-map = < | 274 | interrupt-map = < |
195 | /* IDSEL 0x4 (PCIX Slot 2) */ | ||
196 | 02000 0 0 1 &mpic 0 1 | ||
197 | 02000 0 0 2 &mpic 1 1 | ||
198 | 02000 0 0 3 &mpic 2 1 | ||
199 | 02000 0 0 4 &mpic 3 1 | ||
200 | |||
201 | /* IDSEL 0x5 (PCIX Slot 3) */ | ||
202 | 02800 0 0 1 &mpic 1 1 | ||
203 | 02800 0 0 2 &mpic 2 1 | ||
204 | 02800 0 0 3 &mpic 3 1 | ||
205 | 02800 0 0 4 &mpic 0 1 | ||
206 | |||
207 | /* IDSEL 0x6 (PCIX Slot 4) */ | ||
208 | 03000 0 0 1 &mpic 2 1 | ||
209 | 03000 0 0 2 &mpic 3 1 | ||
210 | 03000 0 0 3 &mpic 0 1 | ||
211 | 03000 0 0 4 &mpic 1 1 | ||
212 | |||
213 | /* IDSEL 0x8 (PCIX Slot 5) */ | ||
214 | 04000 0 0 1 &mpic 0 1 | ||
215 | 04000 0 0 2 &mpic 1 1 | ||
216 | 04000 0 0 3 &mpic 2 1 | ||
217 | 04000 0 0 4 &mpic 3 1 | ||
218 | |||
219 | /* IDSEL 0xC (Tsi310 bridge) */ | ||
220 | 06000 0 0 1 &mpic 0 1 | ||
221 | 06000 0 0 2 &mpic 1 1 | ||
222 | 06000 0 0 3 &mpic 2 1 | ||
223 | 06000 0 0 4 &mpic 3 1 | ||
224 | |||
225 | /* IDSEL 0x14 (Slot 2) */ | ||
226 | 0a000 0 0 1 &mpic 0 1 | ||
227 | 0a000 0 0 2 &mpic 1 1 | ||
228 | 0a000 0 0 3 &mpic 2 1 | ||
229 | 0a000 0 0 4 &mpic 3 1 | ||
230 | |||
231 | /* IDSEL 0x15 (Slot 3) */ | ||
232 | 0a800 0 0 1 &mpic 1 1 | ||
233 | 0a800 0 0 2 &mpic 2 1 | ||
234 | 0a800 0 0 3 &mpic 3 1 | ||
235 | 0a800 0 0 4 &mpic 0 1 | ||
236 | |||
237 | /* IDSEL 0x16 (Slot 4) */ | ||
238 | 0b000 0 0 1 &mpic 2 1 | ||
239 | 0b000 0 0 2 &mpic 3 1 | ||
240 | 0b000 0 0 3 &mpic 0 1 | ||
241 | 0b000 0 0 4 &mpic 1 1 | ||
242 | |||
243 | /* IDSEL 0x18 (Slot 5) */ | ||
244 | 0c000 0 0 1 &mpic 0 1 | ||
245 | 0c000 0 0 2 &mpic 1 1 | ||
246 | 0c000 0 0 3 &mpic 2 1 | ||
247 | 0c000 0 0 4 &mpic 3 1 | ||
248 | |||
249 | /* IDSEL 0x1C (Tsi310 bridge PCI primary) */ | ||
250 | 0E000 0 0 1 &mpic 0 1 | ||
251 | 0E000 0 0 2 &mpic 1 1 | ||
252 | 0E000 0 0 3 &mpic 2 1 | ||
253 | 0E000 0 0 4 &mpic 3 1>; | ||
254 | 275 | ||
255 | interrupt-parent = <&mpic>; | 276 | /* IDSEL 0x00 (PrPMC Site) */ |
256 | interrupts = <18 2>; | 277 | 0000 0 0 1 &mpic 0 1 |
257 | bus-range = <0 0>; | 278 | 0000 0 0 2 &mpic 1 1 |
258 | ranges = <02000000 0 80000000 80000000 0 10000000 | 279 | 0000 0 0 3 &mpic 2 1 |
259 | 01000000 0 00000000 e2000000 0 00800000>; | 280 | 0000 0 0 4 &mpic 3 1 |
260 | clock-frequency = <3f940aa>; | 281 | |
282 | /* IDSEL 0x04 (VIA chip) */ | ||
283 | 2000 0 0 1 &mpic 0 1 | ||
284 | 2000 0 0 2 &mpic 1 1 | ||
285 | 2000 0 0 3 &mpic 2 1 | ||
286 | 2000 0 0 4 &mpic 3 1 | ||
287 | |||
288 | /* IDSEL 0x05 (8139) */ | ||
289 | 2800 0 0 1 &mpic 1 1 | ||
290 | |||
291 | /* IDSEL 0x06 (Slot 6) */ | ||
292 | 3000 0 0 1 &mpic 2 1 | ||
293 | 3000 0 0 2 &mpic 3 1 | ||
294 | 3000 0 0 3 &mpic 0 1 | ||
295 | 3000 0 0 4 &mpic 1 1 | ||
296 | |||
297 | /* IDESL 0x07 (Slot 7) */ | ||
298 | 3800 0 0 1 &mpic 3 1 | ||
299 | 3800 0 0 2 &mpic 0 1 | ||
300 | 3800 0 0 3 &mpic 1 1 | ||
301 | 3800 0 0 4 &mpic 2 1>; | ||
302 | |||
303 | reg = <e000 0 0 0 0>; | ||
261 | #interrupt-cells = <1>; | 304 | #interrupt-cells = <1>; |
262 | #size-cells = <2>; | 305 | #size-cells = <2>; |
263 | #address-cells = <3>; | 306 | #address-cells = <3>; |
264 | reg = <8000 1000>; | 307 | ranges = <02000000 0 80000000 |
265 | compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; | 308 | 02000000 0 80000000 |
266 | device_type = "pci"; | 309 | 0 20000000 |
310 | 01000000 0 00000000 | ||
311 | 01000000 0 00000000 | ||
312 | 0 00080000>; | ||
313 | clock-frequency = <1fca055>; | ||
267 | 314 | ||
268 | pci_bridge@1c { | 315 | isa@4 { |
269 | interrupt-map-mask = <f800 0 0 7>; | 316 | device_type = "isa"; |
270 | interrupt-map = < | 317 | #interrupt-cells = <2>; |
271 | 318 | #size-cells = <1>; | |
272 | /* IDSEL 0x00 (PrPMC Site) */ | 319 | #address-cells = <2>; |
273 | 0000 0 0 1 &mpic 0 1 | 320 | reg = <2000 0 0 0 0>; |
274 | 0000 0 0 2 &mpic 1 1 | 321 | ranges = <1 0 01000000 0 0 00001000>; |
275 | 0000 0 0 3 &mpic 2 1 | 322 | interrupt-parent = <&i8259>; |
276 | 0000 0 0 4 &mpic 3 1 | 323 | |
277 | 324 | i8259: interrupt-controller@20 { | |
278 | /* IDSEL 0x04 (VIA chip) */ | 325 | interrupt-controller; |
279 | 2000 0 0 1 &mpic 0 1 | 326 | device_type = "interrupt-controller"; |
280 | 2000 0 0 2 &mpic 1 1 | 327 | reg = <1 20 2 |
281 | 2000 0 0 3 &mpic 2 1 | 328 | 1 a0 2 |
282 | 2000 0 0 4 &mpic 3 1 | 329 | 1 4d0 2>; |
283 | 330 | #address-cells = <0>; | |
284 | /* IDSEL 0x05 (8139) */ | ||
285 | 2800 0 0 1 &mpic 1 1 | ||
286 | |||
287 | /* IDSEL 0x06 (Slot 6) */ | ||
288 | 3000 0 0 1 &mpic 2 1 | ||
289 | 3000 0 0 2 &mpic 3 1 | ||
290 | 3000 0 0 3 &mpic 0 1 | ||
291 | 3000 0 0 4 &mpic 1 1 | ||
292 | |||
293 | /* IDESL 0x07 (Slot 7) */ | ||
294 | 3800 0 0 1 &mpic 3 1 | ||
295 | 3800 0 0 2 &mpic 0 1 | ||
296 | 3800 0 0 3 &mpic 1 1 | ||
297 | 3800 0 0 4 &mpic 2 1>; | ||
298 | |||
299 | reg = <e000 0 0 0 0>; | ||
300 | #interrupt-cells = <1>; | ||
301 | #size-cells = <2>; | ||
302 | #address-cells = <3>; | ||
303 | ranges = <02000000 0 80000000 | ||
304 | 02000000 0 80000000 | ||
305 | 0 20000000 | ||
306 | 01000000 0 00000000 | ||
307 | 01000000 0 00000000 | ||
308 | 0 00080000>; | ||
309 | clock-frequency = <1fca055>; | ||
310 | |||
311 | isa@4 { | ||
312 | device_type = "isa"; | ||
313 | #interrupt-cells = <2>; | 331 | #interrupt-cells = <2>; |
314 | #size-cells = <1>; | 332 | compatible = "chrp,iic"; |
315 | #address-cells = <2>; | 333 | interrupts = <0 1>; |
316 | reg = <2000 0 0 0 0>; | 334 | interrupt-parent = <&mpic>; |
317 | ranges = <1 0 01000000 0 0 00001000>; | ||
318 | interrupt-parent = <&i8259>; | ||
319 | |||
320 | i8259: interrupt-controller@20 { | ||
321 | clock-frequency = <0>; | ||
322 | interrupt-controller; | ||
323 | device_type = "interrupt-controller"; | ||
324 | reg = <1 20 2 | ||
325 | 1 a0 2 | ||
326 | 1 4d0 2>; | ||
327 | #address-cells = <0>; | ||
328 | #interrupt-cells = <2>; | ||
329 | built-in; | ||
330 | compatible = "chrp,iic"; | ||
331 | interrupts = <0 1>; | ||
332 | interrupt-parent = <&mpic>; | ||
333 | }; | ||
334 | |||
335 | rtc@70 { | ||
336 | compatible = "pnpPNP,b00"; | ||
337 | reg = <1 70 2>; | ||
338 | }; | ||
339 | }; | 335 | }; |
340 | }; | ||
341 | }; | ||
342 | 336 | ||
343 | pci@9000 { | 337 | rtc@70 { |
344 | interrupt-map-mask = <f800 0 0 7>; | 338 | compatible = "pnpPNP,b00"; |
345 | interrupt-map = < | 339 | reg = <1 70 2>; |
346 | 340 | }; | |
347 | /* IDSEL 0x15 */ | 341 | }; |
348 | a800 0 0 1 &mpic b 1 | ||
349 | a800 0 0 2 &mpic 1 1 | ||
350 | a800 0 0 3 &mpic 2 1 | ||
351 | a800 0 0 4 &mpic 3 1>; | ||
352 | |||
353 | interrupt-parent = <&mpic>; | ||
354 | interrupts = <19 2>; | ||
355 | bus-range = <0 0>; | ||
356 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
357 | 01000000 0 00000000 e2800000 0 00800000>; | ||
358 | clock-frequency = <3f940aa>; | ||
359 | #interrupt-cells = <1>; | ||
360 | #size-cells = <2>; | ||
361 | #address-cells = <3>; | ||
362 | reg = <9000 1000>; | ||
363 | compatible = "fsl,mpc8540-pci"; | ||
364 | device_type = "pci"; | ||
365 | }; | 342 | }; |
366 | /* PCI Express */ | 343 | }; |
367 | pcie@a000 { | ||
368 | interrupt-map-mask = <f800 0 0 7>; | ||
369 | interrupt-map = < | ||
370 | 344 | ||
371 | /* IDSEL 0x0 (PEX) */ | 345 | pci@e0009000 { |
372 | 00000 0 0 1 &mpic 0 1 | 346 | interrupt-map-mask = <f800 0 0 7>; |
373 | 00000 0 0 2 &mpic 1 1 | 347 | interrupt-map = < |
374 | 00000 0 0 3 &mpic 2 1 | 348 | |
375 | 00000 0 0 4 &mpic 3 1>; | 349 | /* IDSEL 0x15 */ |
350 | a800 0 0 1 &mpic b 1 | ||
351 | a800 0 0 2 &mpic 1 1 | ||
352 | a800 0 0 3 &mpic 2 1 | ||
353 | a800 0 0 4 &mpic 3 1>; | ||
354 | |||
355 | interrupt-parent = <&mpic>; | ||
356 | interrupts = <19 2>; | ||
357 | bus-range = <0 0>; | ||
358 | ranges = <02000000 0 90000000 90000000 0 10000000 | ||
359 | 01000000 0 00000000 e2800000 0 00800000>; | ||
360 | clock-frequency = <3f940aa>; | ||
361 | #interrupt-cells = <1>; | ||
362 | #size-cells = <2>; | ||
363 | #address-cells = <3>; | ||
364 | reg = <e0009000 1000>; | ||
365 | compatible = "fsl,mpc8540-pci"; | ||
366 | device_type = "pci"; | ||
367 | }; | ||
376 | 368 | ||
377 | interrupt-parent = <&mpic>; | 369 | pcie@e000a000 { |
378 | interrupts = <1a 2>; | 370 | interrupt-map-mask = <f800 0 0 7>; |
379 | bus-range = <0 ff>; | 371 | interrupt-map = < |
380 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | 372 | |
381 | 01000000 0 00000000 e3000000 0 08000000>; | 373 | /* IDSEL 0x0 (PEX) */ |
382 | clock-frequency = <1fca055>; | 374 | 00000 0 0 1 &mpic 0 1 |
383 | #interrupt-cells = <1>; | 375 | 00000 0 0 2 &mpic 1 1 |
376 | 00000 0 0 3 &mpic 2 1 | ||
377 | 00000 0 0 4 &mpic 3 1>; | ||
378 | |||
379 | interrupt-parent = <&mpic>; | ||
380 | interrupts = <1a 2>; | ||
381 | bus-range = <0 ff>; | ||
382 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
383 | 01000000 0 00000000 e3000000 0 08000000>; | ||
384 | clock-frequency = <1fca055>; | ||
385 | #interrupt-cells = <1>; | ||
386 | #size-cells = <2>; | ||
387 | #address-cells = <3>; | ||
388 | reg = <e000a000 1000>; | ||
389 | compatible = "fsl,mpc8548-pcie"; | ||
390 | device_type = "pci"; | ||
391 | pcie@0 { | ||
392 | reg = <0 0 0 0 0>; | ||
384 | #size-cells = <2>; | 393 | #size-cells = <2>; |
385 | #address-cells = <3>; | 394 | #address-cells = <3>; |
386 | reg = <a000 1000>; | ||
387 | compatible = "fsl,mpc8548-pcie"; | ||
388 | device_type = "pci"; | 395 | device_type = "pci"; |
389 | }; | 396 | ranges = <02000000 0 a0000000 |
397 | 02000000 0 a0000000 | ||
398 | 0 20000000 | ||
390 | 399 | ||
391 | mpic: pic@40000 { | 400 | 01000000 0 00000000 |
392 | clock-frequency = <0>; | 401 | 01000000 0 00000000 |
393 | interrupt-controller; | 402 | 0 08000000>; |
394 | #address-cells = <0>; | ||
395 | #interrupt-cells = <2>; | ||
396 | reg = <40000 40000>; | ||
397 | built-in; | ||
398 | compatible = "chrp,open-pic"; | ||
399 | device_type = "open-pic"; | ||
400 | big-endian; | ||
401 | }; | 403 | }; |
402 | }; | 404 | }; |
403 | }; | 405 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts index c3c888252121..99199295147e 100644 --- a/arch/powerpc/boot/dts/mpc8555cds.dts +++ b/arch/powerpc/boot/dts/mpc8555cds.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; // 33 MHz, from uboot | 30 | timebase-frequency = <0>; // 33 MHz, from uboot |
31 | bus-frequency = <0>; // 166 MHz | 31 | bus-frequency = <0>; // 166 MHz |
32 | clock-frequency = <0>; // 825 MHz, from uboot | 32 | clock-frequency = <0>; // 825 MHz, from uboot |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -42,10 +41,9 @@ | |||
42 | soc8555@e0000000 { | 41 | soc8555@e0000000 { |
43 | #address-cells = <1>; | 42 | #address-cells = <1>; |
44 | #size-cells = <1>; | 43 | #size-cells = <1>; |
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | 44 | device_type = "soc"; |
47 | ranges = <0 e0000000 00100000>; | 45 | ranges = <0 e0000000 00100000>; |
48 | reg = <e0000000 00100000>; // CCSRBAR 1M | 46 | reg = <e0000000 00001000>; // CCSRBAR 1M |
49 | bus-frequency = <0>; | 47 | bus-frequency = <0>; |
50 | 48 | ||
51 | memory-controller@2000 { | 49 | memory-controller@2000 { |
@@ -137,113 +135,109 @@ | |||
137 | interrupt-parent = <&mpic>; | 135 | interrupt-parent = <&mpic>; |
138 | }; | 136 | }; |
139 | 137 | ||
140 | pci1: pci@8000 { | ||
141 | interrupt-map-mask = <1f800 0 0 7>; | ||
142 | interrupt-map = < | ||
143 | |||
144 | /* IDSEL 0x10 */ | ||
145 | 08000 0 0 1 &mpic 0 1 | ||
146 | 08000 0 0 2 &mpic 1 1 | ||
147 | 08000 0 0 3 &mpic 2 1 | ||
148 | 08000 0 0 4 &mpic 3 1 | ||
149 | |||
150 | /* IDSEL 0x11 */ | ||
151 | 08800 0 0 1 &mpic 0 1 | ||
152 | 08800 0 0 2 &mpic 1 1 | ||
153 | 08800 0 0 3 &mpic 2 1 | ||
154 | 08800 0 0 4 &mpic 3 1 | ||
155 | |||
156 | /* IDSEL 0x12 (Slot 1) */ | ||
157 | 09000 0 0 1 &mpic 0 1 | ||
158 | 09000 0 0 2 &mpic 1 1 | ||
159 | 09000 0 0 3 &mpic 2 1 | ||
160 | 09000 0 0 4 &mpic 3 1 | ||
161 | |||
162 | /* IDSEL 0x13 (Slot 2) */ | ||
163 | 09800 0 0 1 &mpic 1 1 | ||
164 | 09800 0 0 2 &mpic 2 1 | ||
165 | 09800 0 0 3 &mpic 3 1 | ||
166 | 09800 0 0 4 &mpic 0 1 | ||
167 | |||
168 | /* IDSEL 0x14 (Slot 3) */ | ||
169 | 0a000 0 0 1 &mpic 2 1 | ||
170 | 0a000 0 0 2 &mpic 3 1 | ||
171 | 0a000 0 0 3 &mpic 0 1 | ||
172 | 0a000 0 0 4 &mpic 1 1 | ||
173 | |||
174 | /* IDSEL 0x15 (Slot 4) */ | ||
175 | 0a800 0 0 1 &mpic 3 1 | ||
176 | 0a800 0 0 2 &mpic 0 1 | ||
177 | 0a800 0 0 3 &mpic 1 1 | ||
178 | 0a800 0 0 4 &mpic 2 1 | ||
179 | |||
180 | /* Bus 1 (Tundra Bridge) */ | ||
181 | /* IDSEL 0x12 (ISA bridge) */ | ||
182 | 19000 0 0 1 &mpic 0 1 | ||
183 | 19000 0 0 2 &mpic 1 1 | ||
184 | 19000 0 0 3 &mpic 2 1 | ||
185 | 19000 0 0 4 &mpic 3 1>; | ||
186 | interrupt-parent = <&mpic>; | ||
187 | interrupts = <18 2>; | ||
188 | bus-range = <0 0>; | ||
189 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
190 | 01000000 0 00000000 e2000000 0 00100000>; | ||
191 | clock-frequency = <3f940aa>; | ||
192 | #interrupt-cells = <1>; | ||
193 | #size-cells = <2>; | ||
194 | #address-cells = <3>; | ||
195 | reg = <8000 1000>; | ||
196 | compatible = "fsl,mpc8540-pci"; | ||
197 | device_type = "pci"; | ||
198 | |||
199 | i8259@19000 { | ||
200 | clock-frequency = <0>; | ||
201 | interrupt-controller; | ||
202 | device_type = "interrupt-controller"; | ||
203 | reg = <19000 0 0 0 1>; | ||
204 | #address-cells = <0>; | ||
205 | #interrupt-cells = <2>; | ||
206 | built-in; | ||
207 | compatible = "chrp,iic"; | ||
208 | big-endian; | ||
209 | interrupts = <1>; | ||
210 | interrupt-parent = <&pci1>; | ||
211 | }; | ||
212 | }; | ||
213 | |||
214 | pci@9000 { | ||
215 | interrupt-map-mask = <f800 0 0 7>; | ||
216 | interrupt-map = < | ||
217 | |||
218 | /* IDSEL 0x15 */ | ||
219 | a800 0 0 1 &mpic b 1 | ||
220 | a800 0 0 2 &mpic b 1 | ||
221 | a800 0 0 3 &mpic b 1 | ||
222 | a800 0 0 4 &mpic b 1>; | ||
223 | interrupt-parent = <&mpic>; | ||
224 | interrupts = <19 2>; | ||
225 | bus-range = <0 0>; | ||
226 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
227 | 01000000 0 00000000 e3000000 0 00100000>; | ||
228 | clock-frequency = <3f940aa>; | ||
229 | #interrupt-cells = <1>; | ||
230 | #size-cells = <2>; | ||
231 | #address-cells = <3>; | ||
232 | reg = <9000 1000>; | ||
233 | compatible = "fsl,mpc8540-pci"; | ||
234 | device_type = "pci"; | ||
235 | }; | ||
236 | |||
237 | mpic: pic@40000 { | 138 | mpic: pic@40000 { |
238 | clock-frequency = <0>; | 139 | clock-frequency = <0>; |
239 | interrupt-controller; | 140 | interrupt-controller; |
240 | #address-cells = <0>; | 141 | #address-cells = <0>; |
241 | #interrupt-cells = <2>; | 142 | #interrupt-cells = <2>; |
242 | reg = <40000 40000>; | 143 | reg = <40000 40000>; |
243 | built-in; | ||
244 | compatible = "chrp,open-pic"; | 144 | compatible = "chrp,open-pic"; |
245 | device_type = "open-pic"; | 145 | device_type = "open-pic"; |
246 | big-endian; | 146 | big-endian; |
247 | }; | 147 | }; |
248 | }; | 148 | }; |
149 | |||
150 | pci1: pci@e0008000 { | ||
151 | interrupt-map-mask = <1f800 0 0 7>; | ||
152 | interrupt-map = < | ||
153 | |||
154 | /* IDSEL 0x10 */ | ||
155 | 08000 0 0 1 &mpic 0 1 | ||
156 | 08000 0 0 2 &mpic 1 1 | ||
157 | 08000 0 0 3 &mpic 2 1 | ||
158 | 08000 0 0 4 &mpic 3 1 | ||
159 | |||
160 | /* IDSEL 0x11 */ | ||
161 | 08800 0 0 1 &mpic 0 1 | ||
162 | 08800 0 0 2 &mpic 1 1 | ||
163 | 08800 0 0 3 &mpic 2 1 | ||
164 | 08800 0 0 4 &mpic 3 1 | ||
165 | |||
166 | /* IDSEL 0x12 (Slot 1) */ | ||
167 | 09000 0 0 1 &mpic 0 1 | ||
168 | 09000 0 0 2 &mpic 1 1 | ||
169 | 09000 0 0 3 &mpic 2 1 | ||
170 | 09000 0 0 4 &mpic 3 1 | ||
171 | |||
172 | /* IDSEL 0x13 (Slot 2) */ | ||
173 | 09800 0 0 1 &mpic 1 1 | ||
174 | 09800 0 0 2 &mpic 2 1 | ||
175 | 09800 0 0 3 &mpic 3 1 | ||
176 | 09800 0 0 4 &mpic 0 1 | ||
177 | |||
178 | /* IDSEL 0x14 (Slot 3) */ | ||
179 | 0a000 0 0 1 &mpic 2 1 | ||
180 | 0a000 0 0 2 &mpic 3 1 | ||
181 | 0a000 0 0 3 &mpic 0 1 | ||
182 | 0a000 0 0 4 &mpic 1 1 | ||
183 | |||
184 | /* IDSEL 0x15 (Slot 4) */ | ||
185 | 0a800 0 0 1 &mpic 3 1 | ||
186 | 0a800 0 0 2 &mpic 0 1 | ||
187 | 0a800 0 0 3 &mpic 1 1 | ||
188 | 0a800 0 0 4 &mpic 2 1 | ||
189 | |||
190 | /* Bus 1 (Tundra Bridge) */ | ||
191 | /* IDSEL 0x12 (ISA bridge) */ | ||
192 | 19000 0 0 1 &mpic 0 1 | ||
193 | 19000 0 0 2 &mpic 1 1 | ||
194 | 19000 0 0 3 &mpic 2 1 | ||
195 | 19000 0 0 4 &mpic 3 1>; | ||
196 | interrupt-parent = <&mpic>; | ||
197 | interrupts = <18 2>; | ||
198 | bus-range = <0 0>; | ||
199 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
200 | 01000000 0 00000000 e2000000 0 00100000>; | ||
201 | clock-frequency = <3f940aa>; | ||
202 | #interrupt-cells = <1>; | ||
203 | #size-cells = <2>; | ||
204 | #address-cells = <3>; | ||
205 | reg = <e0008000 1000>; | ||
206 | compatible = "fsl,mpc8540-pci"; | ||
207 | device_type = "pci"; | ||
208 | |||
209 | i8259@19000 { | ||
210 | interrupt-controller; | ||
211 | device_type = "interrupt-controller"; | ||
212 | reg = <19000 0 0 0 1>; | ||
213 | #address-cells = <0>; | ||
214 | #interrupt-cells = <2>; | ||
215 | compatible = "chrp,iic"; | ||
216 | interrupts = <1>; | ||
217 | interrupt-parent = <&pci1>; | ||
218 | }; | ||
219 | }; | ||
220 | |||
221 | pci@e0009000 { | ||
222 | interrupt-map-mask = <f800 0 0 7>; | ||
223 | interrupt-map = < | ||
224 | |||
225 | /* IDSEL 0x15 */ | ||
226 | a800 0 0 1 &mpic b 1 | ||
227 | a800 0 0 2 &mpic b 1 | ||
228 | a800 0 0 3 &mpic b 1 | ||
229 | a800 0 0 4 &mpic b 1>; | ||
230 | interrupt-parent = <&mpic>; | ||
231 | interrupts = <19 2>; | ||
232 | bus-range = <0 0>; | ||
233 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
234 | 01000000 0 00000000 e3000000 0 00100000>; | ||
235 | clock-frequency = <3f940aa>; | ||
236 | #interrupt-cells = <1>; | ||
237 | #size-cells = <2>; | ||
238 | #address-cells = <3>; | ||
239 | reg = <e0009000 1000>; | ||
240 | compatible = "fsl,mpc8540-pci"; | ||
241 | device_type = "pci"; | ||
242 | }; | ||
249 | }; | 243 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts index 16dbe848cecf..5577ec1f312b 100644 --- a/arch/powerpc/boot/dts/mpc8560ads.dts +++ b/arch/powerpc/boot/dts/mpc8560ads.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <04ead9a0>; | 30 | timebase-frequency = <04ead9a0>; |
31 | bus-frequency = <13ab6680>; | 31 | bus-frequency = <13ab6680>; |
32 | clock-frequency = <312c8040>; | 32 | clock-frequency = <312c8040>; |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -42,7 +41,6 @@ | |||
42 | soc8560@e0000000 { | 41 | soc8560@e0000000 { |
43 | #address-cells = <1>; | 42 | #address-cells = <1>; |
44 | #size-cells = <1>; | 43 | #size-cells = <1>; |
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | 44 | device_type = "soc"; |
47 | ranges = <0 e0000000 00100000>; | 45 | ranges = <0 e0000000 00100000>; |
48 | reg = <e0000000 00000200>; | 46 | reg = <e0000000 00000200>; |
@@ -132,109 +130,17 @@ | |||
132 | phy-handle = <&phy1>; | 130 | phy-handle = <&phy1>; |
133 | }; | 131 | }; |
134 | 132 | ||
135 | pci@8000 { | ||
136 | #interrupt-cells = <1>; | ||
137 | #size-cells = <2>; | ||
138 | #address-cells = <3>; | ||
139 | compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; | ||
140 | device_type = "pci"; | ||
141 | reg = <8000 1000>; | ||
142 | clock-frequency = <3f940aa>; | ||
143 | interrupt-map-mask = <f800 0 0 7>; | ||
144 | interrupt-map = < | ||
145 | |||
146 | /* IDSEL 0x2 */ | ||
147 | 1000 0 0 1 &mpic 1 1 | ||
148 | 1000 0 0 2 &mpic 2 1 | ||
149 | 1000 0 0 3 &mpic 3 1 | ||
150 | 1000 0 0 4 &mpic 4 1 | ||
151 | |||
152 | /* IDSEL 0x3 */ | ||
153 | 1800 0 0 1 &mpic 4 1 | ||
154 | 1800 0 0 2 &mpic 1 1 | ||
155 | 1800 0 0 3 &mpic 2 1 | ||
156 | 1800 0 0 4 &mpic 3 1 | ||
157 | |||
158 | /* IDSEL 0x4 */ | ||
159 | 2000 0 0 1 &mpic 3 1 | ||
160 | 2000 0 0 2 &mpic 4 1 | ||
161 | 2000 0 0 3 &mpic 1 1 | ||
162 | 2000 0 0 4 &mpic 2 1 | ||
163 | |||
164 | /* IDSEL 0x5 */ | ||
165 | 2800 0 0 1 &mpic 2 1 | ||
166 | 2800 0 0 2 &mpic 3 1 | ||
167 | 2800 0 0 3 &mpic 4 1 | ||
168 | 2800 0 0 4 &mpic 1 1 | ||
169 | |||
170 | /* IDSEL 12 */ | ||
171 | 6000 0 0 1 &mpic 1 1 | ||
172 | 6000 0 0 2 &mpic 2 1 | ||
173 | 6000 0 0 3 &mpic 3 1 | ||
174 | 6000 0 0 4 &mpic 4 1 | ||
175 | |||
176 | /* IDSEL 13 */ | ||
177 | 6800 0 0 1 &mpic 4 1 | ||
178 | 6800 0 0 2 &mpic 1 1 | ||
179 | 6800 0 0 3 &mpic 2 1 | ||
180 | 6800 0 0 4 &mpic 3 1 | ||
181 | |||
182 | /* IDSEL 14*/ | ||
183 | 7000 0 0 1 &mpic 3 1 | ||
184 | 7000 0 0 2 &mpic 4 1 | ||
185 | 7000 0 0 3 &mpic 1 1 | ||
186 | 7000 0 0 4 &mpic 2 1 | ||
187 | |||
188 | /* IDSEL 15 */ | ||
189 | 7800 0 0 1 &mpic 2 1 | ||
190 | 7800 0 0 2 &mpic 3 1 | ||
191 | 7800 0 0 3 &mpic 4 1 | ||
192 | 7800 0 0 4 &mpic 1 1 | ||
193 | |||
194 | /* IDSEL 18 */ | ||
195 | 9000 0 0 1 &mpic 1 1 | ||
196 | 9000 0 0 2 &mpic 2 1 | ||
197 | 9000 0 0 3 &mpic 3 1 | ||
198 | 9000 0 0 4 &mpic 4 1 | ||
199 | |||
200 | /* IDSEL 19 */ | ||
201 | 9800 0 0 1 &mpic 4 1 | ||
202 | 9800 0 0 2 &mpic 1 1 | ||
203 | 9800 0 0 3 &mpic 2 1 | ||
204 | 9800 0 0 4 &mpic 3 1 | ||
205 | |||
206 | /* IDSEL 20 */ | ||
207 | a000 0 0 1 &mpic 3 1 | ||
208 | a000 0 0 2 &mpic 4 1 | ||
209 | a000 0 0 3 &mpic 1 1 | ||
210 | a000 0 0 4 &mpic 2 1 | ||
211 | |||
212 | /* IDSEL 21 */ | ||
213 | a800 0 0 1 &mpic 2 1 | ||
214 | a800 0 0 2 &mpic 3 1 | ||
215 | a800 0 0 3 &mpic 4 1 | ||
216 | a800 0 0 4 &mpic 1 1>; | ||
217 | |||
218 | interrupt-parent = <&mpic>; | ||
219 | interrupts = <18 2>; | ||
220 | bus-range = <0 0>; | ||
221 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
222 | 01000000 0 00000000 e2000000 0 01000000>; | ||
223 | }; | ||
224 | |||
225 | mpic: pic@40000 { | 133 | mpic: pic@40000 { |
226 | interrupt-controller; | 134 | interrupt-controller; |
227 | #address-cells = <0>; | 135 | #address-cells = <0>; |
228 | #interrupt-cells = <2>; | 136 | #interrupt-cells = <2>; |
229 | reg = <40000 40000>; | 137 | reg = <40000 40000>; |
230 | built-in; | ||
231 | device_type = "open-pic"; | 138 | device_type = "open-pic"; |
232 | }; | 139 | }; |
233 | 140 | ||
234 | cpm@e0000000 { | 141 | cpm@e0000000 { |
235 | #address-cells = <1>; | 142 | #address-cells = <1>; |
236 | #size-cells = <1>; | 143 | #size-cells = <1>; |
237 | #interrupt-cells = <2>; | ||
238 | device_type = "cpm"; | 144 | device_type = "cpm"; |
239 | model = "CPM2"; | 145 | model = "CPM2"; |
240 | ranges = <0 0 c0000>; | 146 | ranges = <0 0 c0000>; |
@@ -249,7 +155,6 @@ | |||
249 | interrupts = <2e 2>; | 155 | interrupts = <2e 2>; |
250 | interrupt-parent = <&mpic>; | 156 | interrupt-parent = <&mpic>; |
251 | reg = <90c00 80>; | 157 | reg = <90c00 80>; |
252 | built-in; | ||
253 | device_type = "cpm-pic"; | 158 | device_type = "cpm-pic"; |
254 | }; | 159 | }; |
255 | 160 | ||
@@ -324,4 +229,94 @@ | |||
324 | }; | 229 | }; |
325 | }; | 230 | }; |
326 | }; | 231 | }; |
232 | |||
233 | pci@e0008000 { | ||
234 | #interrupt-cells = <1>; | ||
235 | #size-cells = <2>; | ||
236 | #address-cells = <3>; | ||
237 | compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci"; | ||
238 | device_type = "pci"; | ||
239 | reg = <e0008000 1000>; | ||
240 | clock-frequency = <3f940aa>; | ||
241 | interrupt-map-mask = <f800 0 0 7>; | ||
242 | interrupt-map = < | ||
243 | |||
244 | /* IDSEL 0x2 */ | ||
245 | 1000 0 0 1 &mpic 1 1 | ||
246 | 1000 0 0 2 &mpic 2 1 | ||
247 | 1000 0 0 3 &mpic 3 1 | ||
248 | 1000 0 0 4 &mpic 4 1 | ||
249 | |||
250 | /* IDSEL 0x3 */ | ||
251 | 1800 0 0 1 &mpic 4 1 | ||
252 | 1800 0 0 2 &mpic 1 1 | ||
253 | 1800 0 0 3 &mpic 2 1 | ||
254 | 1800 0 0 4 &mpic 3 1 | ||
255 | |||
256 | /* IDSEL 0x4 */ | ||
257 | 2000 0 0 1 &mpic 3 1 | ||
258 | 2000 0 0 2 &mpic 4 1 | ||
259 | 2000 0 0 3 &mpic 1 1 | ||
260 | 2000 0 0 4 &mpic 2 1 | ||
261 | |||
262 | /* IDSEL 0x5 */ | ||
263 | 2800 0 0 1 &mpic 2 1 | ||
264 | 2800 0 0 2 &mpic 3 1 | ||
265 | 2800 0 0 3 &mpic 4 1 | ||
266 | 2800 0 0 4 &mpic 1 1 | ||
267 | |||
268 | /* IDSEL 12 */ | ||
269 | 6000 0 0 1 &mpic 1 1 | ||
270 | 6000 0 0 2 &mpic 2 1 | ||
271 | 6000 0 0 3 &mpic 3 1 | ||
272 | 6000 0 0 4 &mpic 4 1 | ||
273 | |||
274 | /* IDSEL 13 */ | ||
275 | 6800 0 0 1 &mpic 4 1 | ||
276 | 6800 0 0 2 &mpic 1 1 | ||
277 | 6800 0 0 3 &mpic 2 1 | ||
278 | 6800 0 0 4 &mpic 3 1 | ||
279 | |||
280 | /* IDSEL 14*/ | ||
281 | 7000 0 0 1 &mpic 3 1 | ||
282 | 7000 0 0 2 &mpic 4 1 | ||
283 | 7000 0 0 3 &mpic 1 1 | ||
284 | 7000 0 0 4 &mpic 2 1 | ||
285 | |||
286 | /* IDSEL 15 */ | ||
287 | 7800 0 0 1 &mpic 2 1 | ||
288 | 7800 0 0 2 &mpic 3 1 | ||
289 | 7800 0 0 3 &mpic 4 1 | ||
290 | 7800 0 0 4 &mpic 1 1 | ||
291 | |||
292 | /* IDSEL 18 */ | ||
293 | 9000 0 0 1 &mpic 1 1 | ||
294 | 9000 0 0 2 &mpic 2 1 | ||
295 | 9000 0 0 3 &mpic 3 1 | ||
296 | 9000 0 0 4 &mpic 4 1 | ||
297 | |||
298 | /* IDSEL 19 */ | ||
299 | 9800 0 0 1 &mpic 4 1 | ||
300 | 9800 0 0 2 &mpic 1 1 | ||
301 | 9800 0 0 3 &mpic 2 1 | ||
302 | 9800 0 0 4 &mpic 3 1 | ||
303 | |||
304 | /* IDSEL 20 */ | ||
305 | a000 0 0 1 &mpic 3 1 | ||
306 | a000 0 0 2 &mpic 4 1 | ||
307 | a000 0 0 3 &mpic 1 1 | ||
308 | a000 0 0 4 &mpic 2 1 | ||
309 | |||
310 | /* IDSEL 21 */ | ||
311 | a800 0 0 1 &mpic 2 1 | ||
312 | a800 0 0 2 &mpic 3 1 | ||
313 | a800 0 0 3 &mpic 4 1 | ||
314 | a800 0 0 4 &mpic 1 1>; | ||
315 | |||
316 | interrupt-parent = <&mpic>; | ||
317 | interrupts = <18 2>; | ||
318 | bus-range = <0 0>; | ||
319 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
320 | 01000000 0 00000000 e2000000 0 01000000>; | ||
321 | }; | ||
327 | }; | 322 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index b1dcfbe8c1f8..c472a4b488e9 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts | |||
@@ -34,7 +34,6 @@ | |||
34 | timebase-frequency = <0>; | 34 | timebase-frequency = <0>; |
35 | bus-frequency = <0>; | 35 | bus-frequency = <0>; |
36 | clock-frequency = <0>; | 36 | clock-frequency = <0>; |
37 | 32-bit; | ||
38 | }; | 37 | }; |
39 | }; | 38 | }; |
40 | 39 | ||
@@ -51,7 +50,6 @@ | |||
51 | soc8568@e0000000 { | 50 | soc8568@e0000000 { |
52 | #address-cells = <1>; | 51 | #address-cells = <1>; |
53 | #size-cells = <1>; | 52 | #size-cells = <1>; |
54 | #interrupt-cells = <2>; | ||
55 | device_type = "soc"; | 53 | device_type = "soc"; |
56 | ranges = <0 e0000000 00100000>; | 54 | ranges = <0 e0000000 00100000>; |
57 | reg = <e0000000 00100000>; | 55 | reg = <e0000000 00100000>; |
@@ -258,7 +256,6 @@ | |||
258 | #address-cells = <0>; | 256 | #address-cells = <0>; |
259 | #interrupt-cells = <2>; | 257 | #interrupt-cells = <2>; |
260 | reg = <40000 40000>; | 258 | reg = <40000 40000>; |
261 | built-in; | ||
262 | compatible = "chrp,open-pic"; | 259 | compatible = "chrp,open-pic"; |
263 | device_type = "open-pic"; | 260 | device_type = "open-pic"; |
264 | big-endian; | 261 | big-endian; |
@@ -449,7 +446,6 @@ | |||
449 | #address-cells = <0>; | 446 | #address-cells = <0>; |
450 | #interrupt-cells = <1>; | 447 | #interrupt-cells = <1>; |
451 | reg = <80 80>; | 448 | reg = <80 80>; |
452 | built-in; | ||
453 | big-endian; | 449 | big-endian; |
454 | interrupts = <2e 2 2e 2>; //high:30 low:30 | 450 | interrupts = <2e 2 2e 2>; //high:30 low:30 |
455 | interrupt-parent = <&mpic>; | 451 | interrupt-parent = <&mpic>; |
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts new file mode 100644 index 000000000000..d638deec7652 --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8572ds.dts | |||
@@ -0,0 +1,404 @@ | |||
1 | /* | ||
2 | * MPC8572 DS Device Tree Source | ||
3 | * | ||
4 | * Copyright 2007 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | / { | ||
13 | model = "fsl,MPC8572DS"; | ||
14 | compatible = "fsl,MPC8572DS"; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <1>; | ||
17 | |||
18 | cpus { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | |||
22 | PowerPC,8572@0 { | ||
23 | device_type = "cpu"; | ||
24 | reg = <0>; | ||
25 | d-cache-line-size = <20>; // 32 bytes | ||
26 | i-cache-line-size = <20>; // 32 bytes | ||
27 | d-cache-size = <8000>; // L1, 32K | ||
28 | i-cache-size = <8000>; // L1, 32K | ||
29 | timebase-frequency = <0>; | ||
30 | bus-frequency = <0>; | ||
31 | clock-frequency = <0>; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | memory { | ||
36 | device_type = "memory"; | ||
37 | reg = <00000000 00000000>; // Filled by U-Boot | ||
38 | }; | ||
39 | |||
40 | soc8572@ffe00000 { | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <1>; | ||
43 | device_type = "soc"; | ||
44 | ranges = <00000000 ffe00000 00100000>; | ||
45 | reg = <ffe00000 00001000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed | ||
46 | bus-frequency = <0>; // Filled out by uboot. | ||
47 | |||
48 | memory-controller@2000 { | ||
49 | compatible = "fsl,mpc8572-memory-controller"; | ||
50 | reg = <2000 1000>; | ||
51 | interrupt-parent = <&mpic>; | ||
52 | interrupts = <12 2>; | ||
53 | }; | ||
54 | |||
55 | memory-controller@6000 { | ||
56 | compatible = "fsl,mpc8572-memory-controller"; | ||
57 | reg = <6000 1000>; | ||
58 | interrupt-parent = <&mpic>; | ||
59 | interrupts = <12 2>; | ||
60 | }; | ||
61 | |||
62 | l2-cache-controller@20000 { | ||
63 | compatible = "fsl,mpc8572-l2-cache-controller"; | ||
64 | reg = <20000 1000>; | ||
65 | cache-line-size = <20>; // 32 bytes | ||
66 | cache-size = <80000>; // L2, 512K | ||
67 | interrupt-parent = <&mpic>; | ||
68 | interrupts = <10 2>; | ||
69 | }; | ||
70 | |||
71 | i2c@3000 { | ||
72 | device_type = "i2c"; | ||
73 | compatible = "fsl-i2c"; | ||
74 | reg = <3000 100>; | ||
75 | interrupts = <2b 2>; | ||
76 | interrupt-parent = <&mpic>; | ||
77 | dfsrr; | ||
78 | }; | ||
79 | |||
80 | i2c@3100 { | ||
81 | device_type = "i2c"; | ||
82 | compatible = "fsl-i2c"; | ||
83 | reg = <3100 100>; | ||
84 | interrupts = <2b 2>; | ||
85 | interrupt-parent = <&mpic>; | ||
86 | dfsrr; | ||
87 | }; | ||
88 | |||
89 | mdio@24520 { | ||
90 | #address-cells = <1>; | ||
91 | #size-cells = <0>; | ||
92 | device_type = "mdio"; | ||
93 | compatible = "gianfar"; | ||
94 | reg = <24520 20>; | ||
95 | phy0: ethernet-phy@0 { | ||
96 | interrupt-parent = <&mpic>; | ||
97 | interrupts = <a 1>; | ||
98 | reg = <0>; | ||
99 | }; | ||
100 | phy1: ethernet-phy@1 { | ||
101 | interrupt-parent = <&mpic>; | ||
102 | interrupts = <a 1>; | ||
103 | reg = <1>; | ||
104 | }; | ||
105 | phy2: ethernet-phy@2 { | ||
106 | interrupt-parent = <&mpic>; | ||
107 | interrupts = <a 1>; | ||
108 | reg = <2>; | ||
109 | }; | ||
110 | phy3: ethernet-phy@3 { | ||
111 | interrupt-parent = <&mpic>; | ||
112 | interrupts = <a 1>; | ||
113 | reg = <3>; | ||
114 | }; | ||
115 | }; | ||
116 | |||
117 | ethernet@24000 { | ||
118 | #address-cells = <1>; | ||
119 | #size-cells = <0>; | ||
120 | device_type = "network"; | ||
121 | model = "eTSEC"; | ||
122 | compatible = "gianfar"; | ||
123 | reg = <24000 1000>; | ||
124 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
125 | interrupts = <1d 2 1e 2 22 2>; | ||
126 | interrupt-parent = <&mpic>; | ||
127 | phy-handle = <&phy0>; | ||
128 | phy-connection-type = "rgmii-id"; | ||
129 | }; | ||
130 | |||
131 | ethernet@25000 { | ||
132 | #address-cells = <1>; | ||
133 | #size-cells = <0>; | ||
134 | device_type = "network"; | ||
135 | model = "eTSEC"; | ||
136 | compatible = "gianfar"; | ||
137 | reg = <25000 1000>; | ||
138 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
139 | interrupts = <23 2 24 2 28 2>; | ||
140 | interrupt-parent = <&mpic>; | ||
141 | phy-handle = <&phy1>; | ||
142 | phy-connection-type = "rgmii-id"; | ||
143 | }; | ||
144 | |||
145 | ethernet@26000 { | ||
146 | #address-cells = <1>; | ||
147 | #size-cells = <0>; | ||
148 | device_type = "network"; | ||
149 | model = "eTSEC"; | ||
150 | compatible = "gianfar"; | ||
151 | reg = <26000 1000>; | ||
152 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
153 | interrupts = <1f 2 20 2 21 2>; | ||
154 | interrupt-parent = <&mpic>; | ||
155 | phy-handle = <&phy2>; | ||
156 | phy-connection-type = "rgmii-id"; | ||
157 | }; | ||
158 | |||
159 | ethernet@27000 { | ||
160 | #address-cells = <1>; | ||
161 | #size-cells = <0>; | ||
162 | device_type = "network"; | ||
163 | model = "eTSEC"; | ||
164 | compatible = "gianfar"; | ||
165 | reg = <27000 1000>; | ||
166 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
167 | interrupts = <25 2 26 2 27 2>; | ||
168 | interrupt-parent = <&mpic>; | ||
169 | phy-handle = <&phy3>; | ||
170 | phy-connection-type = "rgmii-id"; | ||
171 | }; | ||
172 | |||
173 | serial@4500 { | ||
174 | device_type = "serial"; | ||
175 | compatible = "ns16550"; | ||
176 | reg = <4500 100>; | ||
177 | clock-frequency = <0>; | ||
178 | interrupts = <2a 2>; | ||
179 | interrupt-parent = <&mpic>; | ||
180 | }; | ||
181 | |||
182 | serial@4600 { | ||
183 | device_type = "serial"; | ||
184 | compatible = "ns16550"; | ||
185 | reg = <4600 100>; | ||
186 | clock-frequency = <0>; | ||
187 | interrupts = <2a 2>; | ||
188 | interrupt-parent = <&mpic>; | ||
189 | }; | ||
190 | |||
191 | global-utilities@e0000 { //global utilities block | ||
192 | compatible = "fsl,mpc8572-guts"; | ||
193 | reg = <e0000 1000>; | ||
194 | fsl,has-rstcr; | ||
195 | }; | ||
196 | |||
197 | mpic: pic@40000 { | ||
198 | clock-frequency = <0>; | ||
199 | interrupt-controller; | ||
200 | #address-cells = <0>; | ||
201 | #interrupt-cells = <2>; | ||
202 | reg = <40000 40000>; | ||
203 | compatible = "chrp,open-pic"; | ||
204 | device_type = "open-pic"; | ||
205 | big-endian; | ||
206 | }; | ||
207 | }; | ||
208 | |||
209 | pcie@ffe08000 { | ||
210 | compatible = "fsl,mpc8548-pcie"; | ||
211 | device_type = "pci"; | ||
212 | #interrupt-cells = <1>; | ||
213 | #size-cells = <2>; | ||
214 | #address-cells = <3>; | ||
215 | reg = <ffe08000 1000>; | ||
216 | bus-range = <0 ff>; | ||
217 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
218 | 01000000 0 00000000 ffc00000 0 00010000>; | ||
219 | clock-frequency = <1fca055>; | ||
220 | interrupt-parent = <&mpic>; | ||
221 | interrupts = <18 2>; | ||
222 | interrupt-map-mask = <fb00 0 0 0>; | ||
223 | interrupt-map = < | ||
224 | /* IDSEL 0x11 - PCI slot 1 */ | ||
225 | 8800 0 0 1 &mpic 2 1 | ||
226 | 8800 0 0 2 &mpic 3 1 | ||
227 | 8800 0 0 3 &mpic 4 1 | ||
228 | 8800 0 0 4 &mpic 1 1 | ||
229 | |||
230 | /* IDSEL 0x12 - PCI slot 2 */ | ||
231 | 9000 0 0 1 &mpic 3 1 | ||
232 | 9000 0 0 2 &mpic 4 1 | ||
233 | 9000 0 0 3 &mpic 1 1 | ||
234 | 9000 0 0 4 &mpic 2 1 | ||
235 | |||
236 | // IDSEL 0x1c USB | ||
237 | e000 0 0 0 &i8259 c 2 | ||
238 | e100 0 0 0 &i8259 9 2 | ||
239 | e200 0 0 0 &i8259 a 2 | ||
240 | e300 0 0 0 &i8259 b 2 | ||
241 | |||
242 | // IDSEL 0x1d Audio | ||
243 | e800 0 0 0 &i8259 6 2 | ||
244 | |||
245 | // IDSEL 0x1e Legacy | ||
246 | f000 0 0 0 &i8259 7 2 | ||
247 | f100 0 0 0 &i8259 7 2 | ||
248 | |||
249 | // IDSEL 0x1f IDE/SATA | ||
250 | f800 0 0 0 &i8259 e 2 | ||
251 | f900 0 0 0 &i8259 5 2 | ||
252 | |||
253 | >; | ||
254 | |||
255 | pcie@0 { | ||
256 | reg = <0 0 0 0 0>; | ||
257 | #size-cells = <2>; | ||
258 | #address-cells = <3>; | ||
259 | device_type = "pci"; | ||
260 | ranges = <02000000 0 80000000 | ||
261 | 02000000 0 80000000 | ||
262 | 0 20000000 | ||
263 | |||
264 | 01000000 0 00000000 | ||
265 | 01000000 0 00000000 | ||
266 | 0 00100000>; | ||
267 | uli1575@0 { | ||
268 | reg = <0 0 0 0 0>; | ||
269 | #size-cells = <2>; | ||
270 | #address-cells = <3>; | ||
271 | ranges = <02000000 0 80000000 | ||
272 | 02000000 0 80000000 | ||
273 | 0 20000000 | ||
274 | |||
275 | 01000000 0 00000000 | ||
276 | 01000000 0 00000000 | ||
277 | 0 00100000>; | ||
278 | isa@1e { | ||
279 | device_type = "isa"; | ||
280 | #interrupt-cells = <2>; | ||
281 | #size-cells = <1>; | ||
282 | #address-cells = <2>; | ||
283 | reg = <f000 0 0 0 0>; | ||
284 | ranges = <1 0 01000000 0 0 | ||
285 | 00001000>; | ||
286 | interrupt-parent = <&i8259>; | ||
287 | |||
288 | i8259: interrupt-controller@20 { | ||
289 | reg = <1 20 2 | ||
290 | 1 a0 2 | ||
291 | 1 4d0 2>; | ||
292 | interrupt-controller; | ||
293 | device_type = "interrupt-controller"; | ||
294 | #address-cells = <0>; | ||
295 | #interrupt-cells = <2>; | ||
296 | compatible = "chrp,iic"; | ||
297 | interrupts = <9 2>; | ||
298 | interrupt-parent = <&mpic>; | ||
299 | }; | ||
300 | |||
301 | i8042@60 { | ||
302 | #size-cells = <0>; | ||
303 | #address-cells = <1>; | ||
304 | reg = <1 60 1 1 64 1>; | ||
305 | interrupts = <1 3 c 3>; | ||
306 | interrupt-parent = | ||
307 | <&i8259>; | ||
308 | |||
309 | keyboard@0 { | ||
310 | reg = <0>; | ||
311 | compatible = "pnpPNP,303"; | ||
312 | }; | ||
313 | |||
314 | mouse@1 { | ||
315 | reg = <1>; | ||
316 | compatible = "pnpPNP,f03"; | ||
317 | }; | ||
318 | }; | ||
319 | |||
320 | rtc@70 { | ||
321 | compatible = "pnpPNP,b00"; | ||
322 | reg = <1 70 2>; | ||
323 | }; | ||
324 | |||
325 | gpio@400 { | ||
326 | reg = <1 400 80>; | ||
327 | }; | ||
328 | }; | ||
329 | }; | ||
330 | }; | ||
331 | |||
332 | }; | ||
333 | |||
334 | pcie@ffe09000 { | ||
335 | compatible = "fsl,mpc8548-pcie"; | ||
336 | device_type = "pci"; | ||
337 | #interrupt-cells = <1>; | ||
338 | #size-cells = <2>; | ||
339 | #address-cells = <3>; | ||
340 | reg = <ffe09000 1000>; | ||
341 | bus-range = <0 ff>; | ||
342 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
343 | 01000000 0 00000000 ffc10000 0 00010000>; | ||
344 | clock-frequency = <1fca055>; | ||
345 | interrupt-parent = <&mpic>; | ||
346 | interrupts = <1a 2>; | ||
347 | interrupt-map-mask = <f800 0 0 7>; | ||
348 | interrupt-map = < | ||
349 | /* IDSEL 0x0 */ | ||
350 | 0000 0 0 1 &mpic 4 1 | ||
351 | 0000 0 0 2 &mpic 5 1 | ||
352 | 0000 0 0 3 &mpic 6 1 | ||
353 | 0000 0 0 4 &mpic 7 1 | ||
354 | >; | ||
355 | pcie@0 { | ||
356 | reg = <0 0 0 0 0>; | ||
357 | #size-cells = <2>; | ||
358 | #address-cells = <3>; | ||
359 | device_type = "pci"; | ||
360 | ranges = <02000000 0 a0000000 | ||
361 | 02000000 0 a0000000 | ||
362 | 0 20000000 | ||
363 | |||
364 | 01000000 0 00000000 | ||
365 | 01000000 0 00000000 | ||
366 | 0 00100000>; | ||
367 | }; | ||
368 | }; | ||
369 | |||
370 | pcie@ffe0a000 { | ||
371 | compatible = "fsl,mpc8548-pcie"; | ||
372 | device_type = "pci"; | ||
373 | #interrupt-cells = <1>; | ||
374 | #size-cells = <2>; | ||
375 | #address-cells = <3>; | ||
376 | reg = <ffe0a000 1000>; | ||
377 | bus-range = <0 ff>; | ||
378 | ranges = <02000000 0 c0000000 c0000000 0 20000000 | ||
379 | 01000000 0 00000000 ffc20000 0 00010000>; | ||
380 | clock-frequency = <1fca055>; | ||
381 | interrupt-parent = <&mpic>; | ||
382 | interrupts = <1b 2>; | ||
383 | interrupt-map = < | ||
384 | /* IDSEL 0x0 */ | ||
385 | 0000 0 0 1 &mpic 0 1 | ||
386 | 0000 0 0 2 &mpic 1 1 | ||
387 | 0000 0 0 3 &mpic 2 1 | ||
388 | 0000 0 0 4 &mpic 3 1 | ||
389 | >; | ||
390 | pcie@0 { | ||
391 | reg = <0 0 0 0 0>; | ||
392 | #size-cells = <2>; | ||
393 | #address-cells = <3>; | ||
394 | device_type = "pci"; | ||
395 | ranges = <02000000 0 c0000000 | ||
396 | 02000000 0 c0000000 | ||
397 | 0 20000000 | ||
398 | |||
399 | 01000000 0 00000000 | ||
400 | 01000000 0 00000000 | ||
401 | 0 00100000>; | ||
402 | }; | ||
403 | }; | ||
404 | }; | ||
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index b0166e5c177e..f797662212ba 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; // 33 MHz, from uboot | 30 | timebase-frequency = <0>; // 33 MHz, from uboot |
31 | bus-frequency = <0>; // From uboot | 31 | bus-frequency = <0>; // From uboot |
32 | clock-frequency = <0>; // From uboot | 32 | clock-frequency = <0>; // From uboot |
33 | 32-bit; | ||
34 | }; | 33 | }; |
35 | PowerPC,8641@1 { | 34 | PowerPC,8641@1 { |
36 | device_type = "cpu"; | 35 | device_type = "cpu"; |
@@ -42,7 +41,6 @@ | |||
42 | timebase-frequency = <0>; // 33 MHz, from uboot | 41 | timebase-frequency = <0>; // 33 MHz, from uboot |
43 | bus-frequency = <0>; // From uboot | 42 | bus-frequency = <0>; // From uboot |
44 | clock-frequency = <0>; // From uboot | 43 | clock-frequency = <0>; // From uboot |
45 | 32-bit; | ||
46 | }; | 44 | }; |
47 | }; | 45 | }; |
48 | 46 | ||
@@ -54,13 +52,8 @@ | |||
54 | soc8641@f8000000 { | 52 | soc8641@f8000000 { |
55 | #address-cells = <1>; | 53 | #address-cells = <1>; |
56 | #size-cells = <1>; | 54 | #size-cells = <1>; |
57 | #interrupt-cells = <2>; | ||
58 | device_type = "soc"; | 55 | device_type = "soc"; |
59 | ranges = <00001000 f8001000 000ff000 | 56 | ranges = <00000000 f8000000 00100000>; |
60 | 80000000 80000000 20000000 | ||
61 | e2000000 e2000000 00100000 | ||
62 | a0000000 a0000000 20000000 | ||
63 | e3000000 e3000000 00100000>; | ||
64 | reg = <f8000000 00001000>; // CCSRBAR | 57 | reg = <f8000000 00001000>; // CCSRBAR |
65 | bus-frequency = <0>; | 58 | bus-frequency = <0>; |
66 | 59 | ||
@@ -211,50 +204,75 @@ | |||
211 | interrupt-parent = <&mpic>; | 204 | interrupt-parent = <&mpic>; |
212 | }; | 205 | }; |
213 | 206 | ||
214 | pcie@8000 { | 207 | mpic: pic@40000 { |
215 | compatible = "fsl,mpc8641-pcie"; | 208 | clock-frequency = <0>; |
216 | device_type = "pci"; | 209 | interrupt-controller; |
217 | #interrupt-cells = <1>; | 210 | #address-cells = <0>; |
218 | #size-cells = <2>; | 211 | #interrupt-cells = <2>; |
219 | #address-cells = <3>; | 212 | reg = <40000 40000>; |
220 | reg = <8000 1000>; | 213 | compatible = "chrp,open-pic"; |
221 | bus-range = <0 ff>; | 214 | device_type = "open-pic"; |
222 | ranges = <02000000 0 80000000 80000000 0 20000000 | 215 | big-endian; |
223 | 01000000 0 00000000 e2000000 0 00100000>; | 216 | }; |
224 | clock-frequency = <1fca055>; | 217 | }; |
225 | interrupt-parent = <&mpic>; | ||
226 | interrupts = <18 2>; | ||
227 | interrupt-map-mask = <fb00 0 0 0>; | ||
228 | interrupt-map = < | ||
229 | /* IDSEL 0x11 */ | ||
230 | 8800 0 0 1 &i8259 9 2 | ||
231 | 8800 0 0 2 &i8259 a 2 | ||
232 | 8800 0 0 3 &i8259 b 2 | ||
233 | 8800 0 0 4 &i8259 c 2 | ||
234 | 218 | ||
235 | /* IDSEL 0x12 */ | 219 | pcie@f8008000 { |
236 | 9000 0 0 1 &i8259 a 2 | 220 | compatible = "fsl,mpc8641-pcie"; |
237 | 9000 0 0 2 &i8259 b 2 | 221 | device_type = "pci"; |
238 | 9000 0 0 3 &i8259 c 2 | 222 | #interrupt-cells = <1>; |
239 | 9000 0 0 4 &i8259 9 2 | 223 | #size-cells = <2>; |
224 | #address-cells = <3>; | ||
225 | reg = <f8008000 1000>; | ||
226 | bus-range = <0 ff>; | ||
227 | ranges = <02000000 0 80000000 80000000 0 20000000 | ||
228 | 01000000 0 00000000 e2000000 0 00100000>; | ||
229 | clock-frequency = <1fca055>; | ||
230 | interrupt-parent = <&mpic>; | ||
231 | interrupts = <18 2>; | ||
232 | interrupt-map-mask = <fb00 0 0 0>; | ||
233 | interrupt-map = < | ||
234 | /* IDSEL 0x11 */ | ||
235 | 8800 0 0 1 &i8259 9 2 | ||
236 | 8800 0 0 2 &i8259 a 2 | ||
237 | 8800 0 0 3 &i8259 b 2 | ||
238 | 8800 0 0 4 &i8259 c 2 | ||
240 | 239 | ||
241 | // IDSEL 0x1c USB | 240 | /* IDSEL 0x12 */ |
242 | e000 0 0 0 &i8259 c 2 | 241 | 9000 0 0 1 &i8259 a 2 |
243 | e100 0 0 0 &i8259 9 2 | 242 | 9000 0 0 2 &i8259 b 2 |
244 | e200 0 0 0 &i8259 a 2 | 243 | 9000 0 0 3 &i8259 c 2 |
245 | e300 0 0 0 &i8259 b 2 | 244 | 9000 0 0 4 &i8259 9 2 |
246 | 245 | ||
247 | // IDSEL 0x1d Audio | 246 | // IDSEL 0x1c USB |
248 | e800 0 0 0 &i8259 6 2 | 247 | e000 0 0 0 &i8259 c 2 |
248 | e100 0 0 0 &i8259 9 2 | ||
249 | e200 0 0 0 &i8259 a 2 | ||
250 | e300 0 0 0 &i8259 b 2 | ||
249 | 251 | ||
250 | // IDSEL 0x1e Legacy | 252 | // IDSEL 0x1d Audio |
251 | f000 0 0 0 &i8259 7 2 | 253 | e800 0 0 0 &i8259 6 2 |
252 | f100 0 0 0 &i8259 7 2 | ||
253 | 254 | ||
254 | // IDSEL 0x1f IDE/SATA | 255 | // IDSEL 0x1e Legacy |
255 | f800 0 0 0 &i8259 e 2 | 256 | f000 0 0 0 &i8259 7 2 |
256 | f900 0 0 0 &i8259 5 2 | 257 | f100 0 0 0 &i8259 7 2 |
257 | >; | 258 | |
259 | // IDSEL 0x1f IDE/SATA | ||
260 | f800 0 0 0 &i8259 e 2 | ||
261 | f900 0 0 0 &i8259 5 2 | ||
262 | >; | ||
263 | |||
264 | pcie@0 { | ||
265 | reg = <0 0 0 0 0>; | ||
266 | #size-cells = <2>; | ||
267 | #address-cells = <3>; | ||
268 | device_type = "pci"; | ||
269 | ranges = <02000000 0 80000000 | ||
270 | 02000000 0 80000000 | ||
271 | 0 20000000 | ||
272 | |||
273 | 01000000 0 00000000 | ||
274 | 01000000 0 00000000 | ||
275 | 0 00100000>; | ||
258 | uli1575@0 { | 276 | uli1575@0 { |
259 | reg = <0 0 0 0 0>; | 277 | reg = <0 0 0 0 0>; |
260 | #size-cells = <2>; | 278 | #size-cells = <2>; |
@@ -265,111 +283,96 @@ | |||
265 | 01000000 0 00000000 | 283 | 01000000 0 00000000 |
266 | 01000000 0 00000000 | 284 | 01000000 0 00000000 |
267 | 0 00100000>; | 285 | 0 00100000>; |
286 | isa@1e { | ||
287 | device_type = "isa"; | ||
288 | #interrupt-cells = <2>; | ||
289 | #size-cells = <1>; | ||
290 | #address-cells = <2>; | ||
291 | reg = <f000 0 0 0 0>; | ||
292 | ranges = <1 0 01000000 0 0 | ||
293 | 00001000>; | ||
294 | interrupt-parent = <&i8259>; | ||
268 | 295 | ||
269 | pci_bridge@0 { | 296 | i8259: interrupt-controller@20 { |
270 | reg = <0 0 0 0 0>; | 297 | reg = <1 20 2 |
271 | #size-cells = <2>; | 298 | 1 a0 2 |
272 | #address-cells = <3>; | 299 | 1 4d0 2>; |
273 | ranges = <02000000 0 80000000 | 300 | interrupt-controller; |
274 | 02000000 0 80000000 | 301 | device_type = "interrupt-controller"; |
275 | 0 20000000 | 302 | #address-cells = <0>; |
276 | 01000000 0 00000000 | ||
277 | 01000000 0 00000000 | ||
278 | 0 00100000>; | ||
279 | |||
280 | isa@1e { | ||
281 | device_type = "isa"; | ||
282 | #interrupt-cells = <2>; | 303 | #interrupt-cells = <2>; |
283 | #size-cells = <1>; | 304 | compatible = "chrp,iic"; |
284 | #address-cells = <2>; | 305 | interrupts = <9 2>; |
285 | reg = <f000 0 0 0 0>; | 306 | interrupt-parent = <&mpic>; |
286 | ranges = <1 0 01000000 0 0 | 307 | }; |
287 | 00001000>; | ||
288 | interrupt-parent = <&i8259>; | ||
289 | |||
290 | i8259: interrupt-controller@20 { | ||
291 | reg = <1 20 2 | ||
292 | 1 a0 2 | ||
293 | 1 4d0 2>; | ||
294 | clock-frequency = <0>; | ||
295 | interrupt-controller; | ||
296 | device_type = "interrupt-controller"; | ||
297 | #address-cells = <0>; | ||
298 | #interrupt-cells = <2>; | ||
299 | built-in; | ||
300 | compatible = "chrp,iic"; | ||
301 | interrupts = <9 2>; | ||
302 | interrupt-parent = | ||
303 | <&mpic>; | ||
304 | }; | ||
305 | |||
306 | i8042@60 { | ||
307 | #size-cells = <0>; | ||
308 | #address-cells = <1>; | ||
309 | reg = <1 60 1 1 64 1>; | ||
310 | interrupts = <1 3 c 3>; | ||
311 | interrupt-parent = | ||
312 | <&i8259>; | ||
313 | 308 | ||
314 | keyboard@0 { | 309 | i8042@60 { |
315 | reg = <0>; | 310 | #size-cells = <0>; |
316 | compatible = "pnpPNP,303"; | 311 | #address-cells = <1>; |
317 | }; | 312 | reg = <1 60 1 1 64 1>; |
313 | interrupts = <1 3 c 3>; | ||
314 | interrupt-parent = | ||
315 | <&i8259>; | ||
318 | 316 | ||
319 | mouse@1 { | 317 | keyboard@0 { |
320 | reg = <1>; | 318 | reg = <0>; |
321 | compatible = "pnpPNP,f03"; | 319 | compatible = "pnpPNP,303"; |
322 | }; | ||
323 | }; | 320 | }; |
324 | 321 | ||
325 | rtc@70 { | 322 | mouse@1 { |
326 | compatible = | 323 | reg = <1>; |
327 | "pnpPNP,b00"; | 324 | compatible = "pnpPNP,f03"; |
328 | reg = <1 70 2>; | ||
329 | }; | 325 | }; |
326 | }; | ||
330 | 327 | ||
331 | gpio@400 { | 328 | rtc@70 { |
332 | reg = <1 400 80>; | 329 | compatible = |
333 | }; | 330 | "pnpPNP,b00"; |
331 | reg = <1 70 2>; | ||
332 | }; | ||
333 | |||
334 | gpio@400 { | ||
335 | reg = <1 400 80>; | ||
334 | }; | 336 | }; |
335 | }; | 337 | }; |
336 | }; | 338 | }; |
337 | |||
338 | }; | 339 | }; |
339 | 340 | ||
340 | pcie@9000 { | 341 | }; |
341 | compatible = "fsl,mpc8641-pcie"; | 342 | |
342 | device_type = "pci"; | 343 | pcie@f8009000 { |
343 | #interrupt-cells = <1>; | 344 | compatible = "fsl,mpc8641-pcie"; |
345 | device_type = "pci"; | ||
346 | #interrupt-cells = <1>; | ||
347 | #size-cells = <2>; | ||
348 | #address-cells = <3>; | ||
349 | reg = <f8009000 1000>; | ||
350 | bus-range = <0 ff>; | ||
351 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
352 | 01000000 0 00000000 e3000000 0 00100000>; | ||
353 | clock-frequency = <1fca055>; | ||
354 | interrupt-parent = <&mpic>; | ||
355 | interrupts = <19 2>; | ||
356 | interrupt-map-mask = <f800 0 0 7>; | ||
357 | interrupt-map = < | ||
358 | /* IDSEL 0x0 */ | ||
359 | 0000 0 0 1 &mpic 4 1 | ||
360 | 0000 0 0 2 &mpic 5 1 | ||
361 | 0000 0 0 3 &mpic 6 1 | ||
362 | 0000 0 0 4 &mpic 7 1 | ||
363 | >; | ||
364 | pcie@0 { | ||
365 | reg = <0 0 0 0 0>; | ||
344 | #size-cells = <2>; | 366 | #size-cells = <2>; |
345 | #address-cells = <3>; | 367 | #address-cells = <3>; |
346 | reg = <9000 1000>; | 368 | device_type = "pci"; |
347 | bus-range = <0 ff>; | 369 | ranges = <02000000 0 a0000000 |
348 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | 370 | 02000000 0 a0000000 |
349 | 01000000 0 00000000 e3000000 0 00100000>; | 371 | 0 20000000 |
350 | clock-frequency = <1fca055>; | ||
351 | interrupt-parent = <&mpic>; | ||
352 | interrupts = <19 2>; | ||
353 | interrupt-map-mask = <f800 0 0 7>; | ||
354 | interrupt-map = < | ||
355 | /* IDSEL 0x0 */ | ||
356 | 0000 0 0 1 &mpic 4 1 | ||
357 | 0000 0 0 2 &mpic 5 1 | ||
358 | 0000 0 0 3 &mpic 6 1 | ||
359 | 0000 0 0 4 &mpic 7 1 | ||
360 | >; | ||
361 | }; | ||
362 | 372 | ||
363 | mpic: pic@40000 { | 373 | 01000000 0 00000000 |
364 | clock-frequency = <0>; | 374 | 01000000 0 00000000 |
365 | interrupt-controller; | 375 | 0 00100000>; |
366 | #address-cells = <0>; | ||
367 | #interrupt-cells = <2>; | ||
368 | reg = <40000 40000>; | ||
369 | built-in; | ||
370 | compatible = "chrp,open-pic"; | ||
371 | device_type = "open-pic"; | ||
372 | big-endian; | ||
373 | }; | 376 | }; |
374 | }; | 377 | }; |
375 | }; | 378 | }; |
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts index e5e7726ddb03..90f2293ed3cd 100644 --- a/arch/powerpc/boot/dts/mpc866ads.dts +++ b/arch/powerpc/boot/dts/mpc866ads.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; | 30 | timebase-frequency = <0>; |
31 | bus-frequency = <0>; | 31 | bus-frequency = <0>; |
32 | clock-frequency = <0>; | 32 | clock-frequency = <0>; |
33 | 32-bit; | ||
34 | interrupts = <f 2>; // decrementer interrupt | 33 | interrupts = <f 2>; // decrementer interrupt |
35 | interrupt-parent = <&Mpc8xx_pic>; | 34 | interrupt-parent = <&Mpc8xx_pic>; |
36 | }; | 35 | }; |
@@ -44,7 +43,6 @@ | |||
44 | soc866@ff000000 { | 43 | soc866@ff000000 { |
45 | #address-cells = <1>; | 44 | #address-cells = <1>; |
46 | #size-cells = <1>; | 45 | #size-cells = <1>; |
47 | #interrupt-cells = <2>; | ||
48 | device_type = "soc"; | 46 | device_type = "soc"; |
49 | ranges = <0 ff000000 00100000>; | 47 | ranges = <0 ff000000 00100000>; |
50 | reg = <ff000000 00000200>; | 48 | reg = <ff000000 00000200>; |
@@ -78,7 +76,6 @@ | |||
78 | #address-cells = <0>; | 76 | #address-cells = <0>; |
79 | #interrupt-cells = <2>; | 77 | #interrupt-cells = <2>; |
80 | reg = <0 24>; | 78 | reg = <0 24>; |
81 | built-in; | ||
82 | device_type = "mpc8xx-pic"; | 79 | device_type = "mpc8xx-pic"; |
83 | compatible = "CPM"; | 80 | compatible = "CPM"; |
84 | }; | 81 | }; |
@@ -86,7 +83,6 @@ | |||
86 | cpm@ff000000 { | 83 | cpm@ff000000 { |
87 | #address-cells = <1>; | 84 | #address-cells = <1>; |
88 | #size-cells = <1>; | 85 | #size-cells = <1>; |
89 | #interrupt-cells = <2>; | ||
90 | device_type = "cpm"; | 86 | device_type = "cpm"; |
91 | model = "CPM"; | 87 | model = "CPM"; |
92 | ranges = <0 0 4000>; | 88 | ranges = <0 0 4000>; |
@@ -103,7 +99,6 @@ | |||
103 | interrupts = <5 2 0 2>; | 99 | interrupts = <5 2 0 2>; |
104 | interrupt-parent = <&Mpc8xx_pic>; | 100 | interrupt-parent = <&Mpc8xx_pic>; |
105 | reg = <930 20>; | 101 | reg = <930 20>; |
106 | built-in; | ||
107 | device_type = "cpm-pic"; | 102 | device_type = "cpm-pic"; |
108 | compatible = "CPM"; | 103 | compatible = "CPM"; |
109 | }; | 104 | }; |
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts index dc7ab9c80611..e9aa9d00da24 100644 --- a/arch/powerpc/boot/dts/mpc885ads.dts +++ b/arch/powerpc/boot/dts/mpc885ads.dts | |||
@@ -30,7 +30,6 @@ | |||
30 | timebase-frequency = <0>; | 30 | timebase-frequency = <0>; |
31 | bus-frequency = <0>; | 31 | bus-frequency = <0>; |
32 | clock-frequency = <0>; | 32 | clock-frequency = <0>; |
33 | 32-bit; | ||
34 | interrupts = <f 2>; // decrementer interrupt | 33 | interrupts = <f 2>; // decrementer interrupt |
35 | interrupt-parent = <&Mpc8xx_pic>; | 34 | interrupt-parent = <&Mpc8xx_pic>; |
36 | }; | 35 | }; |
@@ -44,7 +43,6 @@ | |||
44 | soc885@ff000000 { | 43 | soc885@ff000000 { |
45 | #address-cells = <1>; | 44 | #address-cells = <1>; |
46 | #size-cells = <1>; | 45 | #size-cells = <1>; |
47 | #interrupt-cells = <2>; | ||
48 | device_type = "soc"; | 46 | device_type = "soc"; |
49 | ranges = <0 ff000000 00100000>; | 47 | ranges = <0 ff000000 00100000>; |
50 | reg = <ff000000 00000200>; | 48 | reg = <ff000000 00000200>; |
@@ -98,7 +96,6 @@ | |||
98 | #address-cells = <0>; | 96 | #address-cells = <0>; |
99 | #interrupt-cells = <2>; | 97 | #interrupt-cells = <2>; |
100 | reg = <0 24>; | 98 | reg = <0 24>; |
101 | built-in; | ||
102 | device_type = "mpc8xx-pic"; | 99 | device_type = "mpc8xx-pic"; |
103 | compatible = "CPM"; | 100 | compatible = "CPM"; |
104 | }; | 101 | }; |
@@ -117,7 +114,6 @@ | |||
117 | cpm@ff000000 { | 114 | cpm@ff000000 { |
118 | #address-cells = <1>; | 115 | #address-cells = <1>; |
119 | #size-cells = <1>; | 116 | #size-cells = <1>; |
120 | #interrupt-cells = <2>; | ||
121 | device_type = "cpm"; | 117 | device_type = "cpm"; |
122 | model = "CPM"; | 118 | model = "CPM"; |
123 | ranges = <0 0 4000>; | 119 | ranges = <0 0 4000>; |
@@ -134,7 +130,6 @@ | |||
134 | interrupts = <5 2 0 2>; | 130 | interrupts = <5 2 0 2>; |
135 | interrupt-parent = <&Mpc8xx_pic>; | 131 | interrupt-parent = <&Mpc8xx_pic>; |
136 | reg = <930 20>; | 132 | reg = <930 20>; |
137 | built-in; | ||
138 | device_type = "cpm-pic"; | 133 | device_type = "cpm-pic"; |
139 | compatible = "CPM"; | 134 | compatible = "CPM"; |
140 | }; | 135 | }; |
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts index 5300b50cdc2f..297dfa53fe9e 100644 --- a/arch/powerpc/boot/dts/prpmc2800.dts +++ b/arch/powerpc/boot/dts/prpmc2800.dts | |||
@@ -9,10 +9,6 @@ | |||
9 | * | 9 | * |
10 | * Property values that are labeled as "Default" will be updated by bootwrapper | 10 | * Property values that are labeled as "Default" will be updated by bootwrapper |
11 | * if it can determine the exact PrPMC type. | 11 | * if it can determine the exact PrPMC type. |
12 | * | ||
13 | * To build: | ||
14 | * dtc -I dts -O asm -o prpmc2800.S -b 0 prpmc2800.dts | ||
15 | * dtc -I dts -O dtb -o prpmc2800.dtb -b 0 prpmc2800.dts | ||
16 | */ | 12 | */ |
17 | 13 | ||
18 | / { | 14 | / { |
@@ -47,7 +43,6 @@ | |||
47 | mv64x60@f1000000 { /* Marvell Discovery */ | 43 | mv64x60@f1000000 { /* Marvell Discovery */ |
48 | #address-cells = <1>; | 44 | #address-cells = <1>; |
49 | #size-cells = <1>; | 45 | #size-cells = <1>; |
50 | #interrupt-cells = <1>; | ||
51 | model = "mv64360"; /* Default */ | 46 | model = "mv64360"; /* Default */ |
52 | compatible = "marvell,mv64x60"; | 47 | compatible = "marvell,mv64x60"; |
53 | clock-frequency = <7f28155>; /* 133.333333 MHz */ | 48 | clock-frequency = <7f28155>; /* 133.333333 MHz */ |
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts new file mode 100644 index 000000000000..36be75b04de1 --- /dev/null +++ b/arch/powerpc/boot/dts/sequoia.dts | |||
@@ -0,0 +1,302 @@ | |||
1 | /* | ||
2 | * Device Tree Source for AMCC Sequoia | ||
3 | * | ||
4 | * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
5 | * Copyright (c) 2006, 2007 IBM Corp. | ||
6 | * | ||
7 | * FIXME: Draft only! | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without | ||
11 | * any warranty of any kind, whether express or implied. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | / { | ||
16 | #address-cells = <2>; | ||
17 | #size-cells = <1>; | ||
18 | model = "amcc,sequoia"; | ||
19 | compatible = "amcc,sequoia"; | ||
20 | dcr-parent = <&/cpus/PowerPC,440EPx@0>; | ||
21 | |||
22 | cpus { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <0>; | ||
25 | |||
26 | PowerPC,440EPx@0 { | ||
27 | device_type = "cpu"; | ||
28 | reg = <0>; | ||
29 | clock-frequency = <0>; /* Filled in by zImage */ | ||
30 | timebase-frequency = <0>; /* Filled in by zImage */ | ||
31 | i-cache-line-size = <20>; | ||
32 | d-cache-line-size = <20>; | ||
33 | i-cache-size = <8000>; | ||
34 | d-cache-size = <8000>; | ||
35 | dcr-controller; | ||
36 | dcr-access-method = "native"; | ||
37 | }; | ||
38 | }; | ||
39 | |||
40 | memory { | ||
41 | device_type = "memory"; | ||
42 | reg = <0 0 0>; /* Filled in by zImage */ | ||
43 | }; | ||
44 | |||
45 | UIC0: interrupt-controller0 { | ||
46 | compatible = "ibm,uic-440epx","ibm,uic"; | ||
47 | interrupt-controller; | ||
48 | cell-index = <0>; | ||
49 | dcr-reg = <0c0 009>; | ||
50 | #address-cells = <0>; | ||
51 | #size-cells = <0>; | ||
52 | #interrupt-cells = <2>; | ||
53 | }; | ||
54 | |||
55 | UIC1: interrupt-controller1 { | ||
56 | compatible = "ibm,uic-440epx","ibm,uic"; | ||
57 | interrupt-controller; | ||
58 | cell-index = <1>; | ||
59 | dcr-reg = <0d0 009>; | ||
60 | #address-cells = <0>; | ||
61 | #size-cells = <0>; | ||
62 | #interrupt-cells = <2>; | ||
63 | interrupts = <1e 4 1f 4>; /* cascade */ | ||
64 | interrupt-parent = <&UIC0>; | ||
65 | }; | ||
66 | |||
67 | UIC2: interrupt-controller2 { | ||
68 | compatible = "ibm,uic-440epx","ibm,uic"; | ||
69 | interrupt-controller; | ||
70 | cell-index = <2>; | ||
71 | dcr-reg = <0e0 009>; | ||
72 | #address-cells = <0>; | ||
73 | #size-cells = <0>; | ||
74 | #interrupt-cells = <2>; | ||
75 | interrupts = <1c 4 1d 4>; /* cascade */ | ||
76 | interrupt-parent = <&UIC0>; | ||
77 | }; | ||
78 | |||
79 | SDR0: sdr { | ||
80 | compatible = "ibm,sdr-440epx", "ibm,sdr-440ep"; | ||
81 | dcr-reg = <00e 002>; | ||
82 | }; | ||
83 | |||
84 | CPR0: cpr { | ||
85 | compatible = "ibm,cpr-440epx", "ibm,cpr-440ep"; | ||
86 | dcr-reg = <00c 002>; | ||
87 | }; | ||
88 | |||
89 | plb { | ||
90 | compatible = "ibm,plb-440epx", "ibm,plb4"; | ||
91 | #address-cells = <2>; | ||
92 | #size-cells = <1>; | ||
93 | ranges; | ||
94 | clock-frequency = <0>; /* Filled in by zImage */ | ||
95 | |||
96 | SDRAM0: sdram { | ||
97 | device_type = "memory-controller"; | ||
98 | compatible = "ibm,sdram-440epx", "ibm,sdram-44x-ddr2denali"; | ||
99 | dcr-reg = <010 2>; | ||
100 | }; | ||
101 | |||
102 | DMA0: dma { | ||
103 | compatible = "ibm,dma-440epx", "ibm,dma-4xx"; | ||
104 | dcr-reg = <100 027>; | ||
105 | }; | ||
106 | |||
107 | MAL0: mcmal { | ||
108 | compatible = "ibm,mcmal-440epx", "ibm,mcmal2"; | ||
109 | dcr-reg = <180 62>; | ||
110 | num-tx-chans = <2>; | ||
111 | num-rx-chans = <2>; | ||
112 | interrupt-parent = <&MAL0>; | ||
113 | interrupts = <0 1 2 3 4>; | ||
114 | #interrupt-cells = <1>; | ||
115 | #address-cells = <0>; | ||
116 | #size-cells = <0>; | ||
117 | interrupt-map = </*TXEOB*/ 0 &UIC0 a 4 | ||
118 | /*RXEOB*/ 1 &UIC0 b 4 | ||
119 | /*SERR*/ 2 &UIC1 0 4 | ||
120 | /*TXDE*/ 3 &UIC1 1 4 | ||
121 | /*RXDE*/ 4 &UIC1 2 4>; | ||
122 | interrupt-map-mask = <ffffffff>; | ||
123 | }; | ||
124 | |||
125 | POB0: opb { | ||
126 | compatible = "ibm,opb-440epx", "ibm,opb"; | ||
127 | #address-cells = <1>; | ||
128 | #size-cells = <1>; | ||
129 | ranges = <00000000 1 00000000 80000000 | ||
130 | 80000000 1 80000000 80000000>; | ||
131 | interrupt-parent = <&UIC1>; | ||
132 | interrupts = <7 4>; | ||
133 | clock-frequency = <0>; /* Filled in by zImage */ | ||
134 | |||
135 | EBC0: ebc { | ||
136 | compatible = "ibm,ebc-440epx", "ibm,ebc"; | ||
137 | dcr-reg = <012 2>; | ||
138 | #address-cells = <2>; | ||
139 | #size-cells = <1>; | ||
140 | clock-frequency = <0>; /* Filled in by zImage */ | ||
141 | interrupts = <5 1>; | ||
142 | interrupt-parent = <&UIC1>; | ||
143 | |||
144 | nor_flash@0,0 { | ||
145 | compatible = "amd,s29gl256n", "cfi-flash"; | ||
146 | bank-width = <2>; | ||
147 | reg = <0 000000 4000000>; | ||
148 | #address-cells = <1>; | ||
149 | #size-cells = <1>; | ||
150 | partition@0 { | ||
151 | label = "Kernel"; | ||
152 | reg = <0 180000>; | ||
153 | }; | ||
154 | partition@180000 { | ||
155 | label = "ramdisk"; | ||
156 | reg = <180000 200000>; | ||
157 | }; | ||
158 | partition@380000 { | ||
159 | label = "file system"; | ||
160 | reg = <380000 3aa0000>; | ||
161 | }; | ||
162 | partition@3e20000 { | ||
163 | label = "kozio"; | ||
164 | reg = <3e20000 140000>; | ||
165 | }; | ||
166 | partition@3f60000 { | ||
167 | label = "env"; | ||
168 | reg = <3f60000 40000>; | ||
169 | }; | ||
170 | partition@3fa0000 { | ||
171 | label = "u-boot"; | ||
172 | reg = <3fa0000 60000>; | ||
173 | }; | ||
174 | }; | ||
175 | |||
176 | }; | ||
177 | |||
178 | UART0: serial@ef600300 { | ||
179 | device_type = "serial"; | ||
180 | compatible = "ns16550"; | ||
181 | reg = <ef600300 8>; | ||
182 | virtual-reg = <ef600300>; | ||
183 | clock-frequency = <0>; /* Filled in by zImage */ | ||
184 | current-speed = <1c200>; | ||
185 | interrupt-parent = <&UIC0>; | ||
186 | interrupts = <0 4>; | ||
187 | }; | ||
188 | |||
189 | UART1: serial@ef600400 { | ||
190 | device_type = "serial"; | ||
191 | compatible = "ns16550"; | ||
192 | reg = <ef600400 8>; | ||
193 | virtual-reg = <ef600400>; | ||
194 | clock-frequency = <0>; | ||
195 | current-speed = <0>; | ||
196 | interrupt-parent = <&UIC0>; | ||
197 | interrupts = <1 4>; | ||
198 | }; | ||
199 | |||
200 | UART2: serial@ef600500 { | ||
201 | device_type = "serial"; | ||
202 | compatible = "ns16550"; | ||
203 | reg = <ef600500 8>; | ||
204 | virtual-reg = <ef600500>; | ||
205 | clock-frequency = <0>; | ||
206 | current-speed = <0>; | ||
207 | interrupt-parent = <&UIC1>; | ||
208 | interrupts = <3 4>; | ||
209 | }; | ||
210 | |||
211 | UART3: serial@ef600600 { | ||
212 | device_type = "serial"; | ||
213 | compatible = "ns16550"; | ||
214 | reg = <ef600600 8>; | ||
215 | virtual-reg = <ef600600>; | ||
216 | clock-frequency = <0>; | ||
217 | current-speed = <0>; | ||
218 | interrupt-parent = <&UIC1>; | ||
219 | interrupts = <4 4>; | ||
220 | }; | ||
221 | |||
222 | IIC0: i2c@ef600700 { | ||
223 | device_type = "i2c"; | ||
224 | compatible = "ibm,iic-440epx", "ibm,iic"; | ||
225 | reg = <ef600700 14>; | ||
226 | interrupt-parent = <&UIC0>; | ||
227 | interrupts = <2 4>; | ||
228 | }; | ||
229 | |||
230 | IIC1: i2c@ef600800 { | ||
231 | device_type = "i2c"; | ||
232 | compatible = "ibm,iic-440epx", "ibm,iic"; | ||
233 | reg = <ef600800 14>; | ||
234 | interrupt-parent = <&UIC0>; | ||
235 | interrupts = <7 4>; | ||
236 | }; | ||
237 | |||
238 | ZMII0: emac-zmii@ef600d00 { | ||
239 | device_type = "zmii-interface"; | ||
240 | compatible = "ibm,zmii-440epx", "ibm,zmii"; | ||
241 | reg = <ef600d00 c>; | ||
242 | }; | ||
243 | |||
244 | EMAC0: ethernet@ef600e00 { | ||
245 | linux,network-index = <0>; | ||
246 | device_type = "network"; | ||
247 | compatible = "ibm,emac-440epx", "ibm,emac4"; | ||
248 | interrupt-parent = <&EMAC0>; | ||
249 | interrupts = <0 1>; | ||
250 | #interrupt-cells = <1>; | ||
251 | #address-cells = <0>; | ||
252 | #size-cells = <0>; | ||
253 | interrupt-map = </*Status*/ 0 &UIC0 18 4 | ||
254 | /*Wake*/ 1 &UIC1 1d 4>; | ||
255 | reg = <ef600e00 70>; | ||
256 | local-mac-address = [000000000000]; | ||
257 | mal-device = <&MAL0>; | ||
258 | mal-tx-channel = <0>; | ||
259 | mal-rx-channel = <0>; | ||
260 | cell-index = <0>; | ||
261 | max-frame-size = <5dc>; | ||
262 | rx-fifo-size = <1000>; | ||
263 | tx-fifo-size = <800>; | ||
264 | phy-mode = "rmii"; | ||
265 | phy-map = <00000000>; | ||
266 | zmii-device = <&ZMII0>; | ||
267 | zmii-channel = <0>; | ||
268 | }; | ||
269 | |||
270 | EMAC1: ethernet@ef600f00 { | ||
271 | linux,network-index = <1>; | ||
272 | device_type = "network"; | ||
273 | compatible = "ibm,emac-440epx", "ibm,emac4"; | ||
274 | interrupt-parent = <&EMAC1>; | ||
275 | interrupts = <0 1>; | ||
276 | #interrupt-cells = <1>; | ||
277 | #address-cells = <0>; | ||
278 | #size-cells = <0>; | ||
279 | interrupt-map = </*Status*/ 0 &UIC0 19 4 | ||
280 | /*Wake*/ 1 &UIC1 1f 4>; | ||
281 | reg = <ef600f00 70>; | ||
282 | local-mac-address = [000000000000]; | ||
283 | mal-device = <&MAL0>; | ||
284 | mal-tx-channel = <1>; | ||
285 | mal-rx-channel = <1>; | ||
286 | cell-index = <1>; | ||
287 | max-frame-size = <5dc>; | ||
288 | rx-fifo-size = <1000>; | ||
289 | tx-fifo-size = <800>; | ||
290 | phy-mode = "rmii"; | ||
291 | phy-map = <00000000>; | ||
292 | zmii-device = <&ZMII0>; | ||
293 | zmii-channel = <1>; | ||
294 | }; | ||
295 | }; | ||
296 | }; | ||
297 | |||
298 | chosen { | ||
299 | linux,stdout-path = "/plb/opb/serial@ef600300"; | ||
300 | bootargs = "console=ttyS0,115200"; | ||
301 | }; | ||
302 | }; | ||
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts new file mode 100644 index 000000000000..ec54f4e04ad6 --- /dev/null +++ b/arch/powerpc/boot/dts/walnut.dts | |||
@@ -0,0 +1,190 @@ | |||
1 | /* | ||
2 | * Device Tree Source for IBM Walnut | ||
3 | * | ||
4 | * Copyright 2007 IBM Corp. | ||
5 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without | ||
9 | * any warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | / { | ||
13 | #address-cells = <1>; | ||
14 | #size-cells = <1>; | ||
15 | model = "ibm,walnut"; | ||
16 | compatible = "ibm,walnut"; | ||
17 | dcr-parent = <&/cpus/PowerPC,405GP@0>; | ||
18 | |||
19 | cpus { | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | |||
23 | PowerPC,405GP@0 { | ||
24 | device_type = "cpu"; | ||
25 | reg = <0>; | ||
26 | clock-frequency = <bebc200>; /* Filled in by zImage */ | ||
27 | timebase-frequency = <0>; /* Filled in by zImage */ | ||
28 | i-cache-line-size = <20>; | ||
29 | d-cache-line-size = <20>; | ||
30 | i-cache-size = <4000>; | ||
31 | d-cache-size = <4000>; | ||
32 | dcr-controller; | ||
33 | dcr-access-method = "native"; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | memory { | ||
38 | device_type = "memory"; | ||
39 | reg = <0 0>; /* Filled in by zImage */ | ||
40 | }; | ||
41 | |||
42 | UIC0: interrupt-controller { | ||
43 | compatible = "ibm,uic"; | ||
44 | interrupt-controller; | ||
45 | cell-index = <0>; | ||
46 | dcr-reg = <0c0 9>; | ||
47 | #address-cells = <0>; | ||
48 | #size-cells = <0>; | ||
49 | #interrupt-cells = <2>; | ||
50 | }; | ||
51 | |||
52 | plb { | ||
53 | compatible = "ibm,plb3"; | ||
54 | #address-cells = <1>; | ||
55 | #size-cells = <1>; | ||
56 | ranges; | ||
57 | clock-frequency = <0>; /* Filled in by zImage */ | ||
58 | |||
59 | SDRAM0: memory-controller { | ||
60 | compatible = "ibm,sdram-405gp"; | ||
61 | dcr-reg = <010 2>; | ||
62 | }; | ||
63 | |||
64 | MAL: mcmal { | ||
65 | compatible = "ibm,mcmal-405gp", "ibm,mcmal"; | ||
66 | dcr-reg = <180 62>; | ||
67 | num-tx-chans = <2>; | ||
68 | num-rx-chans = <1>; | ||
69 | interrupt-parent = <&UIC0>; | ||
70 | interrupts = <a 4 b 4 c 4 d 4 e 4>; | ||
71 | }; | ||
72 | |||
73 | POB0: opb { | ||
74 | compatible = "ibm,opb-405gp", "ibm,opb"; | ||
75 | #address-cells = <1>; | ||
76 | #size-cells = <1>; | ||
77 | ranges = <ef600000 ef600000 a00000>; | ||
78 | dcr-reg = <0a0 5>; | ||
79 | clock-frequency = <0>; /* Filled in by zImage */ | ||
80 | |||
81 | UART0: serial@ef600300 { | ||
82 | device_type = "serial"; | ||
83 | compatible = "ns16550"; | ||
84 | reg = <ef600300 8>; | ||
85 | virtual-reg = <ef600300>; | ||
86 | clock-frequency = <0>; /* Filled in by zImage */ | ||
87 | current-speed = <2580>; | ||
88 | interrupt-parent = <&UIC0>; | ||
89 | interrupts = <0 4>; | ||
90 | }; | ||
91 | |||
92 | UART1: serial@ef600400 { | ||
93 | device_type = "serial"; | ||
94 | compatible = "ns16550"; | ||
95 | reg = <ef600400 8>; | ||
96 | virtual-reg = <ef600400>; | ||
97 | clock-frequency = <0>; /* Filled in by zImage */ | ||
98 | current-speed = <2580>; | ||
99 | interrupt-parent = <&UIC0>; | ||
100 | interrupts = <1 4>; | ||
101 | }; | ||
102 | |||
103 | IIC: i2c@ef600500 { | ||
104 | compatible = "ibm,iic-405gp", "ibm,iic"; | ||
105 | reg = <ef600500 11>; | ||
106 | interrupt-parent = <&UIC0>; | ||
107 | interrupts = <2 4>; | ||
108 | }; | ||
109 | |||
110 | GPIO: gpio@ef600700 { | ||
111 | compatible = "ibm,gpio-405gp"; | ||
112 | reg = <ef600700 20>; | ||
113 | }; | ||
114 | |||
115 | EMAC: ethernet@ef600800 { | ||
116 | linux,network-index = <0>; | ||
117 | device_type = "network"; | ||
118 | compatible = "ibm,emac-405gp", "ibm,emac"; | ||
119 | interrupt-parent = <&UIC0>; | ||
120 | interrupts = <9 4 f 4>; | ||
121 | reg = <ef600800 70>; | ||
122 | mal-device = <&MAL>; | ||
123 | mal-tx-channel = <0 1>; | ||
124 | mal-rx-channel = <0>; | ||
125 | cell-index = <0>; | ||
126 | max-frame-size = <5dc>; | ||
127 | rx-fifo-size = <1000>; | ||
128 | tx-fifo-size = <800>; | ||
129 | phy-mode = "rmii"; | ||
130 | phy-map = <00000001>; | ||
131 | }; | ||
132 | |||
133 | }; | ||
134 | |||
135 | EBC0: ebc { | ||
136 | compatible = "ibm,ebc-405gp", "ibm,ebc"; | ||
137 | dcr-reg = <012 2>; | ||
138 | #address-cells = <2>; | ||
139 | #size-cells = <1>; | ||
140 | /* The ranges property is supplied by the bootwrapper | ||
141 | * and is based on the firmware's configuration of the | ||
142 | * EBC bridge | ||
143 | */ | ||
144 | clock-frequency = <0>; /* Filled in by zImage */ | ||
145 | |||
146 | sram@0,0 { | ||
147 | reg = <0 0 80000>; | ||
148 | }; | ||
149 | |||
150 | flash@0,80000 { | ||
151 | compatible = "jedec-flash"; | ||
152 | bank-width = <1>; | ||
153 | reg = <0 80000 80000>; | ||
154 | #address-cells = <1>; | ||
155 | #size-cells = <1>; | ||
156 | partition@0 { | ||
157 | label = "OpenBIOS"; | ||
158 | reg = <0 80000>; | ||
159 | read-only; | ||
160 | }; | ||
161 | }; | ||
162 | |||
163 | ds1743@1,0 { | ||
164 | /* NVRAM and RTC */ | ||
165 | compatible = "ds1743"; | ||
166 | reg = <1 0 2000>; | ||
167 | }; | ||
168 | |||
169 | keyboard@2,0 { | ||
170 | compatible = "intel,82C42PC"; | ||
171 | reg = <2 0 2>; | ||
172 | }; | ||
173 | |||
174 | ir@3,0 { | ||
175 | compatible = "ti,TIR2000PAG"; | ||
176 | reg = <3 0 10>; | ||
177 | }; | ||
178 | |||
179 | fpga@7,0 { | ||
180 | compatible = "Walnut-FPGA"; | ||
181 | reg = <7 0 10>; | ||
182 | virtual-reg = <f0300005>; | ||
183 | }; | ||
184 | }; | ||
185 | }; | ||
186 | |||
187 | chosen { | ||
188 | linux,stdout-path = "/plb/opb/serial@ef600300"; | ||
189 | }; | ||
190 | }; | ||
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c index 75daedafd0a4..86c0f5df0a86 100644 --- a/arch/powerpc/boot/ebony.c +++ b/arch/powerpc/boot/ebony.c | |||
@@ -24,12 +24,11 @@ | |||
24 | #include "page.h" | 24 | #include "page.h" |
25 | #include "ops.h" | 25 | #include "ops.h" |
26 | #include "reg.h" | 26 | #include "reg.h" |
27 | #include "io.h" | ||
27 | #include "dcr.h" | 28 | #include "dcr.h" |
29 | #include "4xx.h" | ||
28 | #include "44x.h" | 30 | #include "44x.h" |
29 | 31 | ||
30 | extern char _dtb_start[]; | ||
31 | extern char _dtb_end[]; | ||
32 | |||
33 | static u8 *ebony_mac0, *ebony_mac1; | 32 | static u8 *ebony_mac0, *ebony_mac1; |
34 | 33 | ||
35 | /* Calculate 440GP clocks */ | 34 | /* Calculate 440GP clocks */ |
@@ -92,15 +91,53 @@ void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) | |||
92 | dt_fixup_clock("/plb/opb/serial@40000300", uart1); | 91 | dt_fixup_clock("/plb/opb/serial@40000300", uart1); |
93 | } | 92 | } |
94 | 93 | ||
94 | #define EBONY_FPGA_PATH "/plb/opb/ebc/fpga" | ||
95 | #define EBONY_FPGA_FLASH_SEL 0x01 | ||
96 | #define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash" | ||
97 | |||
98 | static void ebony_flashsel_fixup(void) | ||
99 | { | ||
100 | void *devp; | ||
101 | u32 reg[3] = {0x0, 0x0, 0x80000}; | ||
102 | u8 *fpga; | ||
103 | u8 fpga_reg0 = 0x0; | ||
104 | |||
105 | devp = finddevice(EBONY_FPGA_PATH); | ||
106 | if (!devp) | ||
107 | fatal("Couldn't locate FPGA node %s\n\r", EBONY_FPGA_PATH); | ||
108 | |||
109 | if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) | ||
110 | fatal("%s has missing or invalid virtual-reg property\n\r", | ||
111 | EBONY_FPGA_PATH); | ||
112 | |||
113 | fpga_reg0 = in_8(fpga); | ||
114 | |||
115 | devp = finddevice(EBONY_SMALL_FLASH_PATH); | ||
116 | if (!devp) | ||
117 | fatal("Couldn't locate small flash node %s\n\r", | ||
118 | EBONY_SMALL_FLASH_PATH); | ||
119 | |||
120 | if (getprop(devp, "reg", reg, sizeof(reg)) != sizeof(reg)) | ||
121 | fatal("%s has reg property of unexpected size\n\r", | ||
122 | EBONY_SMALL_FLASH_PATH); | ||
123 | |||
124 | /* Invert address bit 14 (IBM-endian) if FLASH_SEL fpga bit is set */ | ||
125 | if (fpga_reg0 & EBONY_FPGA_FLASH_SEL) | ||
126 | reg[1] ^= 0x80000; | ||
127 | |||
128 | setprop(devp, "reg", reg, sizeof(reg)); | ||
129 | } | ||
130 | |||
95 | static void ebony_fixups(void) | 131 | static void ebony_fixups(void) |
96 | { | 132 | { |
97 | // FIXME: sysclk should be derived by reading the FPGA registers | 133 | // FIXME: sysclk should be derived by reading the FPGA registers |
98 | unsigned long sysclk = 33000000; | 134 | unsigned long sysclk = 33000000; |
99 | 135 | ||
100 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); | 136 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); |
101 | ibm44x_fixup_memsize(); | 137 | ibm4xx_fixup_memsize(); |
102 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); | 138 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); |
103 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 139 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
140 | ebony_flashsel_fixup(); | ||
104 | } | 141 | } |
105 | 142 | ||
106 | void ebony_init(void *mac0, void *mac1) | 143 | void ebony_init(void *mac0, void *mac1) |
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index 13761bf160c4..cf30675c6116 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c | |||
@@ -354,16 +354,21 @@ static void ft_put_bin(struct ft_cxt *cxt, const void *data, unsigned int sz) | |||
354 | cxt->p += sza; | 354 | cxt->p += sza; |
355 | } | 355 | } |
356 | 356 | ||
357 | int ft_begin_node(struct ft_cxt *cxt, const char *name) | 357 | char *ft_begin_node(struct ft_cxt *cxt, const char *name) |
358 | { | 358 | { |
359 | unsigned long nlen = strlen(name) + 1; | 359 | unsigned long nlen = strlen(name) + 1; |
360 | unsigned long len = 8 + _ALIGN(nlen, 4); | 360 | unsigned long len = 8 + _ALIGN(nlen, 4); |
361 | char *ret; | ||
361 | 362 | ||
362 | if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len)) | 363 | if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len)) |
363 | return -1; | 364 | return NULL; |
365 | |||
366 | ret = cxt->p; | ||
367 | |||
364 | ft_put_word(cxt, OF_DT_BEGIN_NODE); | 368 | ft_put_word(cxt, OF_DT_BEGIN_NODE); |
365 | ft_put_bin(cxt, name, strlen(name) + 1); | 369 | ft_put_bin(cxt, name, strlen(name) + 1); |
366 | return 0; | 370 | |
371 | return ret; | ||
367 | } | 372 | } |
368 | 373 | ||
369 | void ft_end_node(struct ft_cxt *cxt) | 374 | void ft_end_node(struct ft_cxt *cxt) |
@@ -625,25 +630,17 @@ void ft_end_tree(struct ft_cxt *cxt) | |||
625 | bph->dt_strings_size = cpu_to_be32(ssize); | 630 | bph->dt_strings_size = cpu_to_be32(ssize); |
626 | } | 631 | } |
627 | 632 | ||
628 | void *ft_find_device(struct ft_cxt *cxt, const char *srch_path) | 633 | void *ft_find_device(struct ft_cxt *cxt, const void *top, const char *srch_path) |
629 | { | ||
630 | char *node; | ||
631 | |||
632 | /* require absolute path */ | ||
633 | if (srch_path[0] != '/') | ||
634 | return NULL; | ||
635 | node = ft_find_descendent(cxt, ft_root_node(cxt), srch_path); | ||
636 | return ft_get_phandle(cxt, node); | ||
637 | } | ||
638 | |||
639 | void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, | ||
640 | const char *srch_path) | ||
641 | { | 634 | { |
642 | char *node; | 635 | char *node; |
643 | 636 | ||
644 | node = ft_node_ph2node(cxt, top); | 637 | if (top) { |
645 | if (node == NULL) | 638 | node = ft_node_ph2node(cxt, top); |
646 | return NULL; | 639 | if (node == NULL) |
640 | return NULL; | ||
641 | } else { | ||
642 | node = ft_root_node(cxt); | ||
643 | } | ||
647 | 644 | ||
648 | node = ft_find_descendent(cxt, node, srch_path); | 645 | node = ft_find_descendent(cxt, node, srch_path); |
649 | return ft_get_phandle(cxt, node); | 646 | return ft_get_phandle(cxt, node); |
@@ -945,7 +942,7 @@ int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname) | |||
945 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name) | 942 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name) |
946 | { | 943 | { |
947 | struct ft_atom atom; | 944 | struct ft_atom atom; |
948 | char *p, *next; | 945 | char *p, *next, *ret; |
949 | int depth = 0; | 946 | int depth = 0; |
950 | 947 | ||
951 | if (parent) { | 948 | if (parent) { |
@@ -970,11 +967,70 @@ void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name) | |||
970 | break; | 967 | break; |
971 | /* end of node, insert here */ | 968 | /* end of node, insert here */ |
972 | cxt->p = p; | 969 | cxt->p = p; |
973 | ft_begin_node(cxt, name); | 970 | ret = ft_begin_node(cxt, name); |
974 | ft_end_node(cxt); | 971 | ft_end_node(cxt); |
975 | return p; | 972 | return ft_get_phandle(cxt, ret); |
976 | } | 973 | } |
977 | p = next; | 974 | p = next; |
978 | } | 975 | } |
979 | return NULL; | 976 | return NULL; |
980 | } | 977 | } |
978 | |||
979 | /* Returns the start of the path within the provided buffer, or NULL on | ||
980 | * error. | ||
981 | */ | ||
982 | char *ft_get_path(struct ft_cxt *cxt, const void *phandle, | ||
983 | char *buf, int len) | ||
984 | { | ||
985 | const char *path_comp[FT_MAX_DEPTH]; | ||
986 | struct ft_atom atom; | ||
987 | char *p, *next, *pos; | ||
988 | int depth = 0, i; | ||
989 | void *node; | ||
990 | |||
991 | node = ft_node_ph2node(cxt, phandle); | ||
992 | if (node == NULL) | ||
993 | return NULL; | ||
994 | |||
995 | p = ft_root_node(cxt); | ||
996 | |||
997 | while ((next = ft_next(cxt, p, &atom)) != NULL) { | ||
998 | switch (atom.tag) { | ||
999 | case OF_DT_BEGIN_NODE: | ||
1000 | path_comp[depth++] = atom.name; | ||
1001 | if (p == node) | ||
1002 | goto found; | ||
1003 | |||
1004 | break; | ||
1005 | |||
1006 | case OF_DT_END_NODE: | ||
1007 | if (--depth == 0) | ||
1008 | return NULL; | ||
1009 | } | ||
1010 | |||
1011 | p = next; | ||
1012 | } | ||
1013 | |||
1014 | found: | ||
1015 | pos = buf; | ||
1016 | for (i = 1; i < depth; i++) { | ||
1017 | int this_len; | ||
1018 | |||
1019 | if (len <= 1) | ||
1020 | return NULL; | ||
1021 | |||
1022 | *pos++ = '/'; | ||
1023 | len--; | ||
1024 | |||
1025 | strncpy(pos, path_comp[i], len); | ||
1026 | |||
1027 | if (pos[len - 1] != 0) | ||
1028 | return NULL; | ||
1029 | |||
1030 | this_len = strlen(pos); | ||
1031 | len -= this_len; | ||
1032 | pos += this_len; | ||
1033 | } | ||
1034 | |||
1035 | return buf; | ||
1036 | } | ||
diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h index cb26325d72db..b0957a2d967f 100644 --- a/arch/powerpc/boot/flatdevtree.h +++ b/arch/powerpc/boot/flatdevtree.h | |||
@@ -76,7 +76,7 @@ struct ft_cxt { | |||
76 | unsigned int nodes_used; | 76 | unsigned int nodes_used; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | int ft_begin_node(struct ft_cxt *cxt, const char *name); | 79 | char *ft_begin_node(struct ft_cxt *cxt, const char *name); |
80 | void ft_end_node(struct ft_cxt *cxt); | 80 | void ft_end_node(struct ft_cxt *cxt); |
81 | 81 | ||
82 | void ft_begin_tree(struct ft_cxt *cxt); | 82 | void ft_begin_tree(struct ft_cxt *cxt); |
@@ -96,9 +96,8 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size); | |||
96 | 96 | ||
97 | void ft_dump_blob(const void *bphp); | 97 | void ft_dump_blob(const void *bphp); |
98 | void ft_merge_blob(struct ft_cxt *cxt, void *blob); | 98 | void ft_merge_blob(struct ft_cxt *cxt, void *blob); |
99 | void *ft_find_device(struct ft_cxt *cxt, const char *srch_path); | 99 | void *ft_find_device(struct ft_cxt *cxt, const void *top, |
100 | void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, | 100 | const char *srch_path); |
101 | const char *srch_path); | ||
102 | void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path); | 101 | void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path); |
103 | int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, | 102 | int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, |
104 | void *buf, const unsigned int buflen); | 103 | void *buf, const unsigned int buflen); |
@@ -109,5 +108,6 @@ void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev, | |||
109 | const char *propname, const char *propval, | 108 | const char *propname, const char *propval, |
110 | int proplen); | 109 | int proplen); |
111 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name); | 110 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name); |
111 | char *ft_get_path(struct ft_cxt *cxt, const void *phandle, char *buf, int len); | ||
112 | 112 | ||
113 | #endif /* FLATDEVTREE_H */ | 113 | #endif /* FLATDEVTREE_H */ |
diff --git a/arch/powerpc/boot/flatdevtree_env.h b/arch/powerpc/boot/flatdevtree_env.h index 83bc1c718836..ad0420da8921 100644 --- a/arch/powerpc/boot/flatdevtree_env.h +++ b/arch/powerpc/boot/flatdevtree_env.h | |||
@@ -24,24 +24,4 @@ | |||
24 | #define be64_to_cpu(x) (x) | 24 | #define be64_to_cpu(x) (x) |
25 | #define cpu_to_be64(x) (x) | 25 | #define cpu_to_be64(x) (x) |
26 | 26 | ||
27 | static inline int strncmp(const char *cs, const char *ct, size_t count) | ||
28 | { | ||
29 | signed char __res = 0; | ||
30 | |||
31 | while (count) { | ||
32 | if ((__res = *cs - *ct++) != 0 || !*cs++) | ||
33 | break; | ||
34 | count--; | ||
35 | } | ||
36 | return __res; | ||
37 | } | ||
38 | |||
39 | static inline char *strchr(const char *s, int c) | ||
40 | { | ||
41 | for (; *s != (char)c; ++s) | ||
42 | if (*s == '\0') | ||
43 | return NULL; | ||
44 | return (char *)s; | ||
45 | } | ||
46 | |||
47 | #endif /* _PPC_BOOT_FLATDEVTREE_ENV_H_ */ | 27 | #endif /* _PPC_BOOT_FLATDEVTREE_ENV_H_ */ |
diff --git a/arch/powerpc/boot/flatdevtree_misc.c b/arch/powerpc/boot/flatdevtree_misc.c index 4341e6558c1a..b3670096fa71 100644 --- a/arch/powerpc/boot/flatdevtree_misc.c +++ b/arch/powerpc/boot/flatdevtree_misc.c | |||
@@ -18,7 +18,7 @@ static struct ft_cxt cxt; | |||
18 | 18 | ||
19 | static void *fdtm_finddevice(const char *name) | 19 | static void *fdtm_finddevice(const char *name) |
20 | { | 20 | { |
21 | return ft_find_device(&cxt, name); | 21 | return ft_find_device(&cxt, NULL, name); |
22 | } | 22 | } |
23 | 23 | ||
24 | static int fdtm_getprop(const void *phandle, const char *propname, | 24 | static int fdtm_getprop(const void *phandle, const char *propname, |
@@ -58,6 +58,11 @@ static unsigned long fdtm_finalize(void) | |||
58 | return (unsigned long)cxt.bph; | 58 | return (unsigned long)cxt.bph; |
59 | } | 59 | } |
60 | 60 | ||
61 | static char *fdtm_get_path(const void *phandle, char *buf, int len) | ||
62 | { | ||
63 | return ft_get_path(&cxt, phandle, buf, len); | ||
64 | } | ||
65 | |||
61 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device) | 66 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device) |
62 | { | 67 | { |
63 | dt_ops.finddevice = fdtm_finddevice; | 68 | dt_ops.finddevice = fdtm_finddevice; |
@@ -67,6 +72,7 @@ int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device) | |||
67 | dt_ops.create_node = fdtm_create_node; | 72 | dt_ops.create_node = fdtm_create_node; |
68 | dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value; | 73 | dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value; |
69 | dt_ops.finalize = fdtm_finalize; | 74 | dt_ops.finalize = fdtm_finalize; |
75 | dt_ops.get_path = fdtm_get_path; | ||
70 | 76 | ||
71 | return ft_open(&cxt, dt_blob, max_size, max_find_device, | 77 | return ft_open(&cxt, dt_blob, max_size, max_find_device, |
72 | platform_ops.realloc); | 78 | platform_ops.realloc); |
diff --git a/arch/powerpc/boot/gunzip_util.c b/arch/powerpc/boot/gunzip_util.c index df8ab07e9ff4..ef2aed0f63ca 100644 --- a/arch/powerpc/boot/gunzip_util.c +++ b/arch/powerpc/boot/gunzip_util.c | |||
@@ -78,6 +78,7 @@ void gunzip_start(struct gunzip_state *state, void *src, int srclen) | |||
78 | fatal("inflateInit2 returned %d\n\r", r); | 78 | fatal("inflateInit2 returned %d\n\r", r); |
79 | } | 79 | } |
80 | 80 | ||
81 | state->s.total_in = hdrlen; | ||
81 | state->s.next_in = src + hdrlen; | 82 | state->s.next_in = src + hdrlen; |
82 | state->s.avail_in = srclen - hdrlen; | 83 | state->s.avail_in = srclen - hdrlen; |
83 | } | 84 | } |
@@ -193,13 +194,10 @@ int gunzip_finish(struct gunzip_state *state, void *dst, int dstlen) | |||
193 | { | 194 | { |
194 | int len; | 195 | int len; |
195 | 196 | ||
197 | len = gunzip_partial(state, dst, dstlen); | ||
198 | |||
196 | if (state->s.workspace) { | 199 | if (state->s.workspace) { |
197 | len = gunzip_partial(state, dst, dstlen); | ||
198 | zlib_inflateEnd(&state->s); | 200 | zlib_inflateEnd(&state->s); |
199 | } else { | ||
200 | /* uncompressed image */ | ||
201 | len = min(state->s.avail_in, (unsigned)dstlen); | ||
202 | memcpy(dst, state->s.next_in, len); | ||
203 | } | 201 | } |
204 | 202 | ||
205 | return len; | 203 | return len; |
diff --git a/arch/powerpc/boot/holly.c b/arch/powerpc/boot/holly.c index 7d6539f5e22c..199e783aea4d 100644 --- a/arch/powerpc/boot/holly.c +++ b/arch/powerpc/boot/holly.c | |||
@@ -21,11 +21,6 @@ | |||
21 | #include "ops.h" | 21 | #include "ops.h" |
22 | #include "io.h" | 22 | #include "io.h" |
23 | 23 | ||
24 | extern char _start[]; | ||
25 | extern char _end[]; | ||
26 | extern char _dtb_start[]; | ||
27 | extern char _dtb_end[]; | ||
28 | |||
29 | BSS_STACK(4096); | 24 | BSS_STACK(4096); |
30 | 25 | ||
31 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) | 26 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) |
diff --git a/arch/powerpc/boot/io.h b/arch/powerpc/boot/io.h index 32974ed49e02..ccaedaec50d5 100644 --- a/arch/powerpc/boot/io.h +++ b/arch/powerpc/boot/io.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef _IO_H | 1 | #ifndef _IO_H |
2 | #define __IO_H | 2 | #define __IO_H |
3 | |||
4 | #include "types.h" | ||
5 | |||
3 | /* | 6 | /* |
4 | * Low-level I/O routines. | 7 | * Low-level I/O routines. |
5 | * | 8 | * |
@@ -20,6 +23,37 @@ static inline void out_8(volatile unsigned char *addr, int val) | |||
20 | : "=m" (*addr) : "r" (val)); | 23 | : "=m" (*addr) : "r" (val)); |
21 | } | 24 | } |
22 | 25 | ||
26 | static inline unsigned in_le16(const volatile u16 *addr) | ||
27 | { | ||
28 | unsigned ret; | ||
29 | |||
30 | __asm__ __volatile__("lhbrx %0,0,%1; twi 0,%0,0; isync" | ||
31 | : "=r" (ret) : "r" (addr), "m" (*addr)); | ||
32 | |||
33 | return ret; | ||
34 | } | ||
35 | |||
36 | static inline unsigned in_be16(const volatile u16 *addr) | ||
37 | { | ||
38 | unsigned ret; | ||
39 | |||
40 | __asm__ __volatile__("lhz%U1%X1 %0,%1; twi 0,%0,0; isync" | ||
41 | : "=r" (ret) : "m" (*addr)); | ||
42 | return ret; | ||
43 | } | ||
44 | |||
45 | static inline void out_le16(volatile u16 *addr, int val) | ||
46 | { | ||
47 | __asm__ __volatile__("sthbrx %1,0,%2; sync" : "=m" (*addr) | ||
48 | : "r" (val), "r" (addr)); | ||
49 | } | ||
50 | |||
51 | static inline void out_be16(volatile u16 *addr, int val) | ||
52 | { | ||
53 | __asm__ __volatile__("sth%U0%X0 %1,%0; sync" | ||
54 | : "=m" (*addr) : "r" (val)); | ||
55 | } | ||
56 | |||
23 | static inline unsigned in_le32(const volatile unsigned *addr) | 57 | static inline unsigned in_le32(const volatile unsigned *addr) |
24 | { | 58 | { |
25 | unsigned ret; | 59 | unsigned ret; |
@@ -50,4 +84,19 @@ static inline void out_be32(volatile unsigned *addr, int val) | |||
50 | : "=m" (*addr) : "r" (val)); | 84 | : "=m" (*addr) : "r" (val)); |
51 | } | 85 | } |
52 | 86 | ||
87 | static inline void sync(void) | ||
88 | { | ||
89 | asm volatile("sync" : : : "memory"); | ||
90 | } | ||
91 | |||
92 | static inline void eieio(void) | ||
93 | { | ||
94 | asm volatile("eieio" : : : "memory"); | ||
95 | } | ||
96 | |||
97 | static inline void barrier(void) | ||
98 | { | ||
99 | asm volatile("" : : : "memory"); | ||
100 | } | ||
101 | |||
53 | #endif /* _IO_H */ | 102 | #endif /* _IO_H */ |
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 416dc3857bfe..1b496b37eca0 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -19,16 +19,6 @@ | |||
19 | #include "flatdevtree.h" | 19 | #include "flatdevtree.h" |
20 | #include "reg.h" | 20 | #include "reg.h" |
21 | 21 | ||
22 | extern char _start[]; | ||
23 | extern char __bss_start[]; | ||
24 | extern char _end[]; | ||
25 | extern char _vmlinux_start[]; | ||
26 | extern char _vmlinux_end[]; | ||
27 | extern char _initrd_start[]; | ||
28 | extern char _initrd_end[]; | ||
29 | extern char _dtb_start[]; | ||
30 | extern char _dtb_end[]; | ||
31 | |||
32 | static struct gunzip_state gzstate; | 22 | static struct gunzip_state gzstate; |
33 | 23 | ||
34 | struct addr_range { | 24 | struct addr_range { |
diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c new file mode 100644 index 000000000000..1074626e6a37 --- /dev/null +++ b/arch/powerpc/boot/mpc52xx-psc.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * MPC5200 PSC serial console support. | ||
3 | * | ||
4 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
5 | * | ||
6 | * Copyright (c) 2007 Secret Lab Technologies Ltd. | ||
7 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
8 | * | ||
9 | * It is assumed that the firmware (or the platform file) has already set | ||
10 | * up the port. | ||
11 | */ | ||
12 | |||
13 | #include "types.h" | ||
14 | #include "io.h" | ||
15 | #include "ops.h" | ||
16 | |||
17 | /* Programmable Serial Controller (PSC) status register bits */ | ||
18 | #define MPC52xx_PSC_SR 0x04 | ||
19 | #define MPC52xx_PSC_SR_RXRDY 0x0100 | ||
20 | #define MPC52xx_PSC_SR_RXFULL 0x0200 | ||
21 | #define MPC52xx_PSC_SR_TXRDY 0x0400 | ||
22 | #define MPC52xx_PSC_SR_TXEMP 0x0800 | ||
23 | |||
24 | #define MPC52xx_PSC_BUFFER 0x0C | ||
25 | |||
26 | static void *psc; | ||
27 | |||
28 | static int psc_open(void) | ||
29 | { | ||
30 | /* Assume the firmware has already configured the PSC into | ||
31 | * uart mode */ | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static void psc_putc(unsigned char c) | ||
36 | { | ||
37 | while (!(in_be16(psc + MPC52xx_PSC_SR) & MPC52xx_PSC_SR_TXRDY)) ; | ||
38 | out_8(psc + MPC52xx_PSC_BUFFER, c); | ||
39 | } | ||
40 | |||
41 | static unsigned char psc_tstc(void) | ||
42 | { | ||
43 | return (in_be16(psc + MPC52xx_PSC_SR) & MPC52xx_PSC_SR_RXRDY) != 0; | ||
44 | } | ||
45 | |||
46 | static unsigned char psc_getc(void) | ||
47 | { | ||
48 | while (!(in_be16(psc + MPC52xx_PSC_SR) & MPC52xx_PSC_SR_RXRDY)) ; | ||
49 | return in_8(psc + MPC52xx_PSC_BUFFER); | ||
50 | } | ||
51 | |||
52 | int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp) | ||
53 | { | ||
54 | int n; | ||
55 | |||
56 | /* Get the base address of the psc registers */ | ||
57 | n = getprop(devp, "virtual-reg", &psc, sizeof(psc)); | ||
58 | if (n != sizeof(psc)) { | ||
59 | if (!dt_xlate_reg(devp, 0, (void *)&psc, NULL)) | ||
60 | return -1; | ||
61 | } | ||
62 | |||
63 | scdp->open = psc_open; | ||
64 | scdp->putc = psc_putc; | ||
65 | scdp->getc = psc_getc; | ||
66 | scdp->tstc = psc_tstc; | ||
67 | |||
68 | return 0; | ||
69 | } | ||
diff --git a/arch/powerpc/boot/mpsc.c b/arch/powerpc/boot/mpsc.c index f1c0e965e5ce..802ea53790d8 100644 --- a/arch/powerpc/boot/mpsc.c +++ b/arch/powerpc/boot/mpsc.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include "io.h" | 17 | #include "io.h" |
18 | #include "ops.h" | 18 | #include "ops.h" |
19 | 19 | ||
20 | extern void udelay(long delay); | ||
21 | 20 | ||
22 | #define MPSC_CHR_1 0x000c | 21 | #define MPSC_CHR_1 0x000c |
23 | 22 | ||
diff --git a/arch/powerpc/boot/mv64x60_i2c.c b/arch/powerpc/boot/mv64x60_i2c.c index 435fe8528680..d085377be3bc 100644 --- a/arch/powerpc/boot/mv64x60_i2c.c +++ b/arch/powerpc/boot/mv64x60_i2c.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include "ops.h" | 21 | #include "ops.h" |
22 | #include "mv64x60.h" | 22 | #include "mv64x60.h" |
23 | 23 | ||
24 | extern void udelay(long); | ||
25 | |||
26 | /* Register defines */ | 24 | /* Register defines */ |
27 | #define MV64x60_I2C_REG_SLAVE_ADDR 0x00 | 25 | #define MV64x60_I2C_REG_SLAVE_ADDR 0x00 |
28 | #define MV64x60_I2C_REG_DATA 0x04 | 26 | #define MV64x60_I2C_REG_DATA 0x04 |
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c index 385e08b83b7e..61d9899aa0d0 100644 --- a/arch/powerpc/boot/of.c +++ b/arch/powerpc/boot/of.c | |||
@@ -17,8 +17,6 @@ | |||
17 | 17 | ||
18 | #include "of.h" | 18 | #include "of.h" |
19 | 19 | ||
20 | extern char _end[]; | ||
21 | |||
22 | /* Value picked to match that used by yaboot */ | 20 | /* Value picked to match that used by yaboot */ |
23 | #define PROG_START 0x01400000 /* only used on 64-bit systems */ | 21 | #define PROG_START 0x01400000 /* only used on 64-bit systems */ |
24 | #define RAM_END (512<<20) /* Fixme: use OF */ | 22 | #define RAM_END (512<<20) /* Fixme: use OF */ |
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 86077066cd7c..e948e57abef8 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h | |||
@@ -47,6 +47,7 @@ struct dt_ops { | |||
47 | const char *propname, | 47 | const char *propname, |
48 | const char *propval, int proplen); | 48 | const char *propval, int proplen); |
49 | unsigned long (*finalize)(void); | 49 | unsigned long (*finalize)(void); |
50 | char *(*get_path)(const void *phandle, char *buf, int len); | ||
50 | }; | 51 | }; |
51 | extern struct dt_ops dt_ops; | 52 | extern struct dt_ops dt_ops; |
52 | 53 | ||
@@ -82,11 +83,15 @@ int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); | |||
82 | int serial_console_init(void); | 83 | int serial_console_init(void); |
83 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); | 84 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); |
84 | int mpsc_console_init(void *devp, struct serial_console_data *scdp); | 85 | int mpsc_console_init(void *devp, struct serial_console_data *scdp); |
86 | int cpm_console_init(void *devp, struct serial_console_data *scdp); | ||
87 | int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp); | ||
85 | void *simple_alloc_init(char *base, unsigned long heap_size, | 88 | void *simple_alloc_init(char *base, unsigned long heap_size, |
86 | unsigned long granularity, unsigned long max_allocs); | 89 | unsigned long granularity, unsigned long max_allocs); |
87 | extern void flush_cache(void *, unsigned long); | 90 | extern void flush_cache(void *, unsigned long); |
88 | int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size); | 91 | int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size); |
89 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr); | 92 | int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr); |
93 | int dt_is_compatible(void *node, const char *compat); | ||
94 | void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize); | ||
90 | 95 | ||
91 | static inline void *finddevice(const char *name) | 96 | static inline void *finddevice(const char *name) |
92 | { | 97 | { |
@@ -156,6 +161,7 @@ static inline void *find_node_by_devtype(const void *prev, | |||
156 | void dt_fixup_memory(u64 start, u64 size); | 161 | void dt_fixup_memory(u64 start, u64 size); |
157 | void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); | 162 | void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); |
158 | void dt_fixup_clock(const char *path, u32 freq); | 163 | void dt_fixup_clock(const char *path, u32 freq); |
164 | void dt_fixup_mac_address(u32 index, const u8 *addr); | ||
159 | void __dt_fixup_mac_addresses(u32 startindex, ...); | 165 | void __dt_fixup_mac_addresses(u32 startindex, ...); |
160 | #define dt_fixup_mac_addresses(...) \ | 166 | #define dt_fixup_mac_addresses(...) \ |
161 | __dt_fixup_mac_addresses(0, __VA_ARGS__, NULL) | 167 | __dt_fixup_mac_addresses(0, __VA_ARGS__, NULL) |
@@ -167,6 +173,14 @@ static inline void *find_node_by_linuxphandle(const u32 linuxphandle) | |||
167 | (char *)&linuxphandle, sizeof(u32)); | 173 | (char *)&linuxphandle, sizeof(u32)); |
168 | } | 174 | } |
169 | 175 | ||
176 | static inline char *get_path(const void *phandle, char *buf, int len) | ||
177 | { | ||
178 | if (dt_ops.get_path) | ||
179 | return dt_ops.get_path(phandle, buf, len); | ||
180 | |||
181 | return NULL; | ||
182 | } | ||
183 | |||
170 | static inline void *malloc(unsigned long size) | 184 | static inline void *malloc(unsigned long size) |
171 | { | 185 | { |
172 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; | 186 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; |
@@ -191,4 +205,25 @@ static inline void exit(void) | |||
191 | static char _bss_stack[size]; \ | 205 | static char _bss_stack[size]; \ |
192 | void *_platform_stack_top = _bss_stack + sizeof(_bss_stack); | 206 | void *_platform_stack_top = _bss_stack + sizeof(_bss_stack); |
193 | 207 | ||
208 | extern unsigned long timebase_period_ns; | ||
209 | void udelay(long delay); | ||
210 | |||
211 | extern char _start[]; | ||
212 | extern char __bss_start[]; | ||
213 | extern char _end[]; | ||
214 | extern char _vmlinux_start[]; | ||
215 | extern char _vmlinux_end[]; | ||
216 | extern char _initrd_start[]; | ||
217 | extern char _initrd_end[]; | ||
218 | extern char _dtb_start[]; | ||
219 | extern char _dtb_end[]; | ||
220 | |||
221 | static inline __attribute__((const)) | ||
222 | int __ilog2_u32(u32 n) | ||
223 | { | ||
224 | int bit; | ||
225 | asm ("cntlzw %0,%1" : "=r" (bit) : "r" (n)); | ||
226 | return 31 - bit; | ||
227 | } | ||
228 | |||
194 | #endif /* _PPC_BOOT_OPS_H_ */ | 229 | #endif /* _PPC_BOOT_OPS_H_ */ |
diff --git a/arch/powerpc/boot/planetcore.c b/arch/powerpc/boot/planetcore.c new file mode 100644 index 000000000000..0d8558a475bb --- /dev/null +++ b/arch/powerpc/boot/planetcore.c | |||
@@ -0,0 +1,166 @@ | |||
1 | /* | ||
2 | * PlanetCore configuration data support functions | ||
3 | * | ||
4 | * Author: Scott Wood <scottwood@freescale.com> | ||
5 | * | ||
6 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include "stdio.h" | ||
14 | #include "stdlib.h" | ||
15 | #include "ops.h" | ||
16 | #include "planetcore.h" | ||
17 | #include "io.h" | ||
18 | |||
19 | /* PlanetCore passes information to the OS in the form of | ||
20 | * a table of key=value strings, separated by newlines. | ||
21 | * | ||
22 | * The list is terminated by an empty string (i.e. two | ||
23 | * consecutive newlines). | ||
24 | * | ||
25 | * To make it easier to parse, we first convert all the | ||
26 | * newlines into null bytes. | ||
27 | */ | ||
28 | |||
29 | void planetcore_prepare_table(char *table) | ||
30 | { | ||
31 | do { | ||
32 | if (*table == '\n') | ||
33 | *table = 0; | ||
34 | |||
35 | table++; | ||
36 | } while (*(table - 1) || *table != '\n'); | ||
37 | |||
38 | *table = 0; | ||
39 | } | ||
40 | |||
41 | const char *planetcore_get_key(const char *table, const char *key) | ||
42 | { | ||
43 | int keylen = strlen(key); | ||
44 | |||
45 | do { | ||
46 | if (!strncmp(table, key, keylen) && table[keylen] == '=') | ||
47 | return table + keylen + 1; | ||
48 | |||
49 | table += strlen(table) + 1; | ||
50 | } while (strlen(table) != 0); | ||
51 | |||
52 | return NULL; | ||
53 | } | ||
54 | |||
55 | int planetcore_get_decimal(const char *table, const char *key, u64 *val) | ||
56 | { | ||
57 | const char *str = planetcore_get_key(table, key); | ||
58 | if (!str) | ||
59 | return 0; | ||
60 | |||
61 | *val = strtoull(str, NULL, 10); | ||
62 | return 1; | ||
63 | } | ||
64 | |||
65 | int planetcore_get_hex(const char *table, const char *key, u64 *val) | ||
66 | { | ||
67 | const char *str = planetcore_get_key(table, key); | ||
68 | if (!str) | ||
69 | return 0; | ||
70 | |||
71 | *val = strtoull(str, NULL, 16); | ||
72 | return 1; | ||
73 | } | ||
74 | |||
75 | static u64 mac_table[4] = { | ||
76 | 0x000000000000, | ||
77 | 0x000000800000, | ||
78 | 0x000000400000, | ||
79 | 0x000000c00000, | ||
80 | }; | ||
81 | |||
82 | void planetcore_set_mac_addrs(const char *table) | ||
83 | { | ||
84 | u8 addr[4][6]; | ||
85 | u64 int_addr; | ||
86 | u32 i; | ||
87 | int j; | ||
88 | |||
89 | if (!planetcore_get_hex(table, PLANETCORE_KEY_MAC_ADDR, &int_addr)) | ||
90 | return; | ||
91 | |||
92 | for (i = 0; i < 4; i++) { | ||
93 | u64 this_dev_addr = (int_addr & ~0x000000c00000) | | ||
94 | mac_table[i]; | ||
95 | |||
96 | for (j = 5; j >= 0; j--) { | ||
97 | addr[i][j] = this_dev_addr & 0xff; | ||
98 | this_dev_addr >>= 8; | ||
99 | } | ||
100 | |||
101 | dt_fixup_mac_address(i, addr[i]); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | static char prop_buf[MAX_PROP_LEN]; | ||
106 | |||
107 | void planetcore_set_stdout_path(const char *table) | ||
108 | { | ||
109 | char *path; | ||
110 | const char *label; | ||
111 | void *node, *chosen; | ||
112 | |||
113 | label = planetcore_get_key(table, PLANETCORE_KEY_SERIAL_PORT); | ||
114 | if (!label) | ||
115 | return; | ||
116 | |||
117 | node = find_node_by_prop_value_str(NULL, "linux,planetcore-label", | ||
118 | label); | ||
119 | if (!node) | ||
120 | return; | ||
121 | |||
122 | path = get_path(node, prop_buf, MAX_PROP_LEN); | ||
123 | if (!path) | ||
124 | return; | ||
125 | |||
126 | chosen = finddevice("/chosen"); | ||
127 | if (!chosen) | ||
128 | chosen = create_node(NULL, "chosen"); | ||
129 | if (!chosen) | ||
130 | return; | ||
131 | |||
132 | setprop_str(chosen, "linux,stdout-path", path); | ||
133 | } | ||
134 | |||
135 | void planetcore_set_serial_speed(const char *table) | ||
136 | { | ||
137 | void *chosen, *stdout; | ||
138 | u64 baud; | ||
139 | u32 baud32; | ||
140 | int len; | ||
141 | |||
142 | chosen = finddevice("/chosen"); | ||
143 | if (!chosen) | ||
144 | return; | ||
145 | |||
146 | len = getprop(chosen, "linux,stdout-path", prop_buf, MAX_PROP_LEN); | ||
147 | if (len <= 0) | ||
148 | return; | ||
149 | |||
150 | stdout = finddevice(prop_buf); | ||
151 | if (!stdout) { | ||
152 | printf("planetcore_set_serial_speed: " | ||
153 | "Bad /chosen/linux,stdout-path.\r\n"); | ||
154 | |||
155 | return; | ||
156 | } | ||
157 | |||
158 | if (!planetcore_get_decimal(table, PLANETCORE_KEY_SERIAL_BAUD, | ||
159 | &baud)) { | ||
160 | printf("planetcore_set_serial_speed: No SB tag.\r\n"); | ||
161 | return; | ||
162 | } | ||
163 | |||
164 | baud32 = baud; | ||
165 | setprop(stdout, "current-speed", &baud32, 4); | ||
166 | } | ||
diff --git a/arch/powerpc/boot/planetcore.h b/arch/powerpc/boot/planetcore.h new file mode 100644 index 000000000000..0d4094f1771c --- /dev/null +++ b/arch/powerpc/boot/planetcore.h | |||
@@ -0,0 +1,49 @@ | |||
1 | #ifndef _PPC_BOOT_PLANETCORE_H_ | ||
2 | #define _PPC_BOOT_PLANETCORE_H_ | ||
3 | |||
4 | #include "types.h" | ||
5 | |||
6 | #define PLANETCORE_KEY_BOARD_TYPE "BO" | ||
7 | #define PLANETCORE_KEY_BOARD_REV "BR" | ||
8 | #define PLANETCORE_KEY_MB_RAM "D1" | ||
9 | #define PLANETCORE_KEY_MAC_ADDR "EA" | ||
10 | #define PLANETCORE_KEY_FLASH_SPEED "FS" | ||
11 | #define PLANETCORE_KEY_IP_ADDR "IP" | ||
12 | #define PLANETCORE_KEY_KB_NVRAM "NV" | ||
13 | #define PLANETCORE_KEY_PROCESSOR "PR" | ||
14 | #define PLANETCORE_KEY_PROC_VARIANT "PV" | ||
15 | #define PLANETCORE_KEY_SERIAL_BAUD "SB" | ||
16 | #define PLANETCORE_KEY_SERIAL_PORT "SP" | ||
17 | #define PLANETCORE_KEY_SWITCH "SW" | ||
18 | #define PLANETCORE_KEY_TEMP_OFFSET "TC" | ||
19 | #define PLANETCORE_KEY_TARGET_IP "TIP" | ||
20 | #define PLANETCORE_KEY_CRYSTAL_HZ "XT" | ||
21 | |||
22 | /* Prepare the table for processing, by turning all newlines | ||
23 | * into NULL bytes. | ||
24 | */ | ||
25 | void planetcore_prepare_table(char *table); | ||
26 | |||
27 | /* Return the value associated with a given key in text, | ||
28 | * decimal, or hex format. | ||
29 | * | ||
30 | * Returns zero/NULL on failure, non-zero on success. | ||
31 | */ | ||
32 | const char *planetcore_get_key(const char *table, const char *key); | ||
33 | int planetcore_get_decimal(const char *table, const char *key, u64 *val); | ||
34 | int planetcore_get_hex(const char *table, const char *key, u64 *val); | ||
35 | |||
36 | /* Updates the device tree local-mac-address properties based | ||
37 | * on the EA tag. | ||
38 | */ | ||
39 | void planetcore_set_mac_addrs(const char *table); | ||
40 | |||
41 | /* Sets the linux,stdout-path in the /chosen node. This requires the | ||
42 | * linux,planetcore-label property in each serial node. | ||
43 | */ | ||
44 | void planetcore_set_stdout_path(const char *table); | ||
45 | |||
46 | /* Sets the current-speed property in the serial node. */ | ||
47 | void planetcore_set_serial_speed(const char *table); | ||
48 | |||
49 | #endif | ||
diff --git a/arch/powerpc/boot/ppcboot.h b/arch/powerpc/boot/ppcboot.h index 5290ff2c2b2b..6ae6f9063952 100644 --- a/arch/powerpc/boot/ppcboot.h +++ b/arch/powerpc/boot/ppcboot.h | |||
@@ -78,17 +78,18 @@ typedef struct bd_info { | |||
78 | hymod_conf_t bi_hymod_conf; /* hymod configuration information */ | 78 | hymod_conf_t bi_hymod_conf; /* hymod configuration information */ |
79 | #endif | 79 | #endif |
80 | #if defined(TARGET_EVB64260) || defined(TARGET_405EP) || defined(TARGET_44x) || \ | 80 | #if defined(TARGET_EVB64260) || defined(TARGET_405EP) || defined(TARGET_44x) || \ |
81 | defined(TARGET_85xx) || defined(TARGET_83xx) | 81 | defined(TARGET_85xx) || defined(TARGET_83xx) || defined(TARGET_HAS_ETH1) |
82 | /* second onboard ethernet port */ | 82 | /* second onboard ethernet port */ |
83 | unsigned char bi_enet1addr[6]; | 83 | unsigned char bi_enet1addr[6]; |
84 | #define HAVE_ENET1ADDR | 84 | #define HAVE_ENET1ADDR |
85 | #endif | 85 | #endif |
86 | #if defined(TARGET_EVB64260) || defined(TARGET_440GX) || defined(TARGET_85xx) | 86 | #if defined(TARGET_EVB64260) || defined(TARGET_440GX) || \ |
87 | defined(TARGET_85xx) || defined(TARGET_HAS_ETH2) | ||
87 | /* third onboard ethernet ports */ | 88 | /* third onboard ethernet ports */ |
88 | unsigned char bi_enet2addr[6]; | 89 | unsigned char bi_enet2addr[6]; |
89 | #define HAVE_ENET2ADDR | 90 | #define HAVE_ENET2ADDR |
90 | #endif | 91 | #endif |
91 | #if defined(TARGET_440GX) | 92 | #if defined(TARGET_440GX) || defined(TARGET_HAS_ETH3) |
92 | /* fourth onboard ethernet ports */ | 93 | /* fourth onboard ethernet ports */ |
93 | unsigned char bi_enet3addr[6]; | 94 | unsigned char bi_enet3addr[6]; |
94 | #define HAVE_ENET3ADDR | 95 | #define HAVE_ENET3ADDR |
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c index f428bac10d4a..9614e1db9dae 100644 --- a/arch/powerpc/boot/prpmc2800.c +++ b/arch/powerpc/boot/prpmc2800.c | |||
@@ -21,12 +21,6 @@ | |||
21 | #include "gunzip_util.h" | 21 | #include "gunzip_util.h" |
22 | #include "mv64x60.h" | 22 | #include "mv64x60.h" |
23 | 23 | ||
24 | extern char _end[]; | ||
25 | extern char _vmlinux_start[], _vmlinux_end[]; | ||
26 | extern char _dtb_start[], _dtb_end[]; | ||
27 | |||
28 | extern void udelay(long delay); | ||
29 | |||
30 | #define KB 1024U | 24 | #define KB 1024U |
31 | #define MB (KB*KB) | 25 | #define MB (KB*KB) |
32 | #define GB (KB*MB) | 26 | #define GB (KB*MB) |
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index 893d59339c26..d6661151b494 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c | |||
@@ -120,10 +120,6 @@ void ps3_copy_vectors(void) | |||
120 | 120 | ||
121 | void platform_init(void) | 121 | void platform_init(void) |
122 | { | 122 | { |
123 | extern char _end[]; | ||
124 | extern char _dtb_start[]; | ||
125 | extern char _initrd_start[]; | ||
126 | extern char _initrd_end[]; | ||
127 | const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ | 123 | const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ |
128 | void *chosen; | 124 | void *chosen; |
129 | unsigned long ft_addr; | 125 | unsigned long ft_addr; |
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c index eaa0d3ae3518..95e08e4ddcd2 100644 --- a/arch/powerpc/boot/serial.c +++ b/arch/powerpc/boot/serial.c | |||
@@ -19,8 +19,6 @@ | |||
19 | #include "io.h" | 19 | #include "io.h" |
20 | #include "ops.h" | 20 | #include "ops.h" |
21 | 21 | ||
22 | extern void udelay(long delay); | ||
23 | |||
24 | static int serial_open(void) | 22 | static int serial_open(void) |
25 | { | 23 | { |
26 | struct serial_console_data *scdp = console_ops.data; | 24 | struct serial_console_data *scdp = console_ops.data; |
@@ -114,29 +112,34 @@ int serial_console_init(void) | |||
114 | { | 112 | { |
115 | void *devp; | 113 | void *devp; |
116 | int rc = -1; | 114 | int rc = -1; |
117 | char compat[MAX_PROP_LEN]; | ||
118 | 115 | ||
119 | devp = serial_get_stdout_devp(); | 116 | devp = serial_get_stdout_devp(); |
120 | if (devp == NULL) | 117 | if (devp == NULL) |
121 | goto err_out; | 118 | goto err_out; |
122 | 119 | ||
123 | if (getprop(devp, "compatible", compat, sizeof(compat)) < 0) | 120 | if (dt_is_compatible(devp, "ns16550")) |
124 | goto err_out; | ||
125 | |||
126 | if (!strcmp(compat, "ns16550")) | ||
127 | rc = ns16550_console_init(devp, &serial_cd); | 121 | rc = ns16550_console_init(devp, &serial_cd); |
128 | else if (!strcmp(compat, "marvell,mpsc")) | 122 | else if (dt_is_compatible(devp, "marvell,mpsc")) |
129 | rc = mpsc_console_init(devp, &serial_cd); | 123 | rc = mpsc_console_init(devp, &serial_cd); |
124 | else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") || | ||
125 | dt_is_compatible(devp, "fsl,cpm1-smc-uart") || | ||
126 | dt_is_compatible(devp, "fsl,cpm2-scc-uart") || | ||
127 | dt_is_compatible(devp, "fsl,cpm2-smc-uart")) | ||
128 | rc = cpm_console_init(devp, &serial_cd); | ||
129 | else if (dt_is_compatible(devp, "mpc5200-psc-uart")) | ||
130 | rc = mpc5200_psc_console_init(devp, &serial_cd); | ||
130 | 131 | ||
131 | /* Add other serial console driver calls here */ | 132 | /* Add other serial console driver calls here */ |
132 | 133 | ||
133 | if (!rc) { | 134 | if (!rc) { |
134 | console_ops.open = serial_open; | 135 | console_ops.open = serial_open; |
135 | console_ops.write = serial_write; | 136 | console_ops.write = serial_write; |
136 | console_ops.edit_cmdline = serial_edit_cmdline; | ||
137 | console_ops.close = serial_close; | 137 | console_ops.close = serial_close; |
138 | console_ops.data = &serial_cd; | 138 | console_ops.data = &serial_cd; |
139 | 139 | ||
140 | if (serial_cd.getc) | ||
141 | console_ops.edit_cmdline = serial_edit_cmdline; | ||
142 | |||
140 | return 0; | 143 | return 0; |
141 | } | 144 | } |
142 | err_out: | 145 | err_out: |
diff --git a/arch/powerpc/boot/stdlib.c b/arch/powerpc/boot/stdlib.c new file mode 100644 index 000000000000..e00d58c29eea --- /dev/null +++ b/arch/powerpc/boot/stdlib.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * stdlib functions | ||
3 | * | ||
4 | * Author: Scott Wood <scottwood@freescale.com> | ||
5 | * | ||
6 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include "stdlib.h" | ||
14 | |||
15 | /* Not currently supported: leading whitespace, sign, 0x prefix, zero base */ | ||
16 | unsigned long long int strtoull(const char *ptr, char **end, int base) | ||
17 | { | ||
18 | unsigned long long ret = 0; | ||
19 | |||
20 | if (base > 36) | ||
21 | goto out; | ||
22 | |||
23 | while (*ptr) { | ||
24 | int digit; | ||
25 | |||
26 | if (*ptr >= '0' && *ptr <= '9' && *ptr < '0' + base) | ||
27 | digit = *ptr - '0'; | ||
28 | else if (*ptr >= 'A' && *ptr < 'A' + base - 10) | ||
29 | digit = *ptr - 'A' + 10; | ||
30 | else if (*ptr >= 'a' && *ptr < 'a' + base - 10) | ||
31 | digit = *ptr - 'a' + 10; | ||
32 | else | ||
33 | break; | ||
34 | |||
35 | ret *= base; | ||
36 | ret += digit; | ||
37 | ptr++; | ||
38 | } | ||
39 | |||
40 | out: | ||
41 | if (end) | ||
42 | *end = (char *)ptr; | ||
43 | |||
44 | return ret; | ||
45 | } | ||
diff --git a/arch/powerpc/boot/stdlib.h b/arch/powerpc/boot/stdlib.h new file mode 100644 index 000000000000..1bf01ac73aba --- /dev/null +++ b/arch/powerpc/boot/stdlib.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _PPC_BOOT_STDLIB_H_ | ||
2 | #define _PPC_BOOT_STDLIB_H_ | ||
3 | |||
4 | unsigned long long int strtoull(const char *ptr, char **end, int base); | ||
5 | |||
6 | #endif | ||
diff --git a/arch/powerpc/boot/string.S b/arch/powerpc/boot/string.S index ac3d43b6a324..2627558bcb71 100644 --- a/arch/powerpc/boot/string.S +++ b/arch/powerpc/boot/string.S | |||
@@ -49,6 +49,17 @@ strcat: | |||
49 | bne 1b | 49 | bne 1b |
50 | blr | 50 | blr |
51 | 51 | ||
52 | .globl strchr | ||
53 | strchr: | ||
54 | addi r3,r3,-1 | ||
55 | 1: lbzu r0,1(r3) | ||
56 | cmpw 0,r0,r4 | ||
57 | beqlr | ||
58 | cmpwi 0,r0,0 | ||
59 | bne 1b | ||
60 | li r3,0 | ||
61 | blr | ||
62 | |||
52 | .globl strcmp | 63 | .globl strcmp |
53 | strcmp: | 64 | strcmp: |
54 | addi r5,r3,-1 | 65 | addi r5,r3,-1 |
@@ -61,6 +72,19 @@ strcmp: | |||
61 | beq 1b | 72 | beq 1b |
62 | blr | 73 | blr |
63 | 74 | ||
75 | .globl strncmp | ||
76 | strncmp: | ||
77 | mtctr r5 | ||
78 | addi r5,r3,-1 | ||
79 | addi r4,r4,-1 | ||
80 | 1: lbzu r3,1(r5) | ||
81 | cmpwi 1,r3,0 | ||
82 | lbzu r0,1(r4) | ||
83 | subf. r3,r0,r3 | ||
84 | beqlr 1 | ||
85 | bdnzt eq,1b | ||
86 | blr | ||
87 | |||
64 | .globl strlen | 88 | .globl strlen |
65 | strlen: | 89 | strlen: |
66 | addi r4,r3,-1 | 90 | addi r4,r3,-1 |
diff --git a/arch/powerpc/boot/string.h b/arch/powerpc/boot/string.h index 9fdff1cc0d70..4650030d1040 100644 --- a/arch/powerpc/boot/string.h +++ b/arch/powerpc/boot/string.h | |||
@@ -5,7 +5,9 @@ | |||
5 | extern char *strcpy(char *dest, const char *src); | 5 | extern char *strcpy(char *dest, const char *src); |
6 | extern char *strncpy(char *dest, const char *src, size_t n); | 6 | extern char *strncpy(char *dest, const char *src, size_t n); |
7 | extern char *strcat(char *dest, const char *src); | 7 | extern char *strcat(char *dest, const char *src); |
8 | extern char *strchr(const char *s, int c); | ||
8 | extern int strcmp(const char *s1, const char *s2); | 9 | extern int strcmp(const char *s1, const char *s2); |
10 | extern int strncmp(const char *s1, const char *s2, size_t n); | ||
9 | extern size_t strlen(const char *s); | 11 | extern size_t strlen(const char *s); |
10 | extern size_t strnlen(const char *s, size_t count); | 12 | extern size_t strnlen(const char *s, size_t count); |
11 | 13 | ||
diff --git a/arch/powerpc/boot/treeboot-bamboo.c b/arch/powerpc/boot/treeboot-bamboo.c new file mode 100644 index 000000000000..9eee48fc7114 --- /dev/null +++ b/arch/powerpc/boot/treeboot-bamboo.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright IBM Corporation, 2007 | ||
3 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
4 | * | ||
5 | * Based on ebony wrapper: | ||
6 | * Copyright 2007 David Gibson, IBM Corporation. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; version 2 of the License | ||
11 | */ | ||
12 | #include "ops.h" | ||
13 | #include "stdio.h" | ||
14 | #include "44x.h" | ||
15 | #include "stdlib.h" | ||
16 | |||
17 | BSS_STACK(4096); | ||
18 | |||
19 | #define PIBS_MAC0 0xfffc0400 | ||
20 | #define PIBS_MAC1 0xfffc0500 | ||
21 | char pibs_mac0[6]; | ||
22 | char pibs_mac1[6]; | ||
23 | |||
24 | static void read_pibs_mac(void) | ||
25 | { | ||
26 | unsigned long long mac64; | ||
27 | |||
28 | mac64 = strtoull((char *)PIBS_MAC0, 0, 16); | ||
29 | memcpy(&pibs_mac0, (char *)&mac64+2, 6); | ||
30 | |||
31 | mac64 = strtoull((char *)PIBS_MAC1, 0, 16); | ||
32 | memcpy(&pibs_mac1, (char *)&mac64+2, 6); | ||
33 | } | ||
34 | |||
35 | void platform_init(void) | ||
36 | { | ||
37 | unsigned long end_of_ram = 0x8000000; | ||
38 | unsigned long avail_ram = end_of_ram - (unsigned long)_end; | ||
39 | |||
40 | simple_alloc_init(_end, avail_ram, 32, 64); | ||
41 | read_pibs_mac(); | ||
42 | bamboo_init((u8 *)&pibs_mac0, (u8 *)&pibs_mac1); | ||
43 | } | ||
diff --git a/arch/powerpc/boot/treeboot-ebony.c b/arch/powerpc/boot/treeboot-ebony.c index 8436a9c55192..21cc4834a384 100644 --- a/arch/powerpc/boot/treeboot-ebony.c +++ b/arch/powerpc/boot/treeboot-ebony.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include "stdio.h" | 16 | #include "stdio.h" |
17 | #include "44x.h" | 17 | #include "44x.h" |
18 | 18 | ||
19 | extern char _end[]; | ||
20 | |||
21 | BSS_STACK(4096); | 19 | BSS_STACK(4096); |
22 | 20 | ||
23 | #define OPENBIOS_MAC_BASE 0xfffffe0c | 21 | #define OPENBIOS_MAC_BASE 0xfffffe0c |
diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c new file mode 100644 index 000000000000..3adf2d08a230 --- /dev/null +++ b/arch/powerpc/boot/treeboot-walnut.c | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * Old U-boot compatibility for Walnut | ||
3 | * | ||
4 | * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
5 | * | ||
6 | * Copyright 2007 IBM Corporation | ||
7 | * Based on cuboot-83xx.c, which is: | ||
8 | * Copyright (c) 2007 Freescale Semiconductor, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License version 2 as published | ||
12 | * by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include "ops.h" | ||
16 | #include "stdio.h" | ||
17 | #include "dcr.h" | ||
18 | #include "4xx.h" | ||
19 | #include "io.h" | ||
20 | |||
21 | BSS_STACK(4096); | ||
22 | |||
23 | void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) | ||
24 | { | ||
25 | u32 pllmr = mfdcr(DCRN_CPC0_PLLMR); | ||
26 | u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0); | ||
27 | u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1); | ||
28 | u32 cpu, plb, opb, ebc, tb, uart0, uart1, m; | ||
29 | u32 fwdv, fbdv, cbdv, opdv, epdv, udiv; | ||
30 | |||
31 | fwdv = (8 - ((pllmr & 0xe0000000) >> 29)); | ||
32 | fbdv = (pllmr & 0x1e000000) >> 25; | ||
33 | cbdv = ((pllmr & 0x00060000) >> 17) + 1; | ||
34 | opdv = ((pllmr & 0x00018000) >> 15) + 1; | ||
35 | epdv = ((pllmr & 0x00001800) >> 13) + 2; | ||
36 | udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1; | ||
37 | |||
38 | m = fwdv * fbdv * cbdv; | ||
39 | |||
40 | cpu = sysclk * m / fwdv; | ||
41 | plb = cpu / cbdv; | ||
42 | opb = plb / opdv; | ||
43 | ebc = plb / epdv; | ||
44 | |||
45 | if (cpc0_cr0 & 0x80) { | ||
46 | /* uart0 uses the external clock */ | ||
47 | uart0 = ser_clk; | ||
48 | } else { | ||
49 | uart0 = cpu / udiv; | ||
50 | } | ||
51 | |||
52 | if (cpc0_cr0 & 0x40) { | ||
53 | /* uart1 uses the external clock */ | ||
54 | uart1 = ser_clk; | ||
55 | } else { | ||
56 | uart1 = cpu / udiv; | ||
57 | } | ||
58 | |||
59 | /* setup the timebase clock to tick at the cpu frequency */ | ||
60 | cpc0_cr1 = cpc0_cr1 & ~ 0x00800000; | ||
61 | mtdcr(DCRN_CPC0_CR1, cpc0_cr1); | ||
62 | tb = cpu; | ||
63 | |||
64 | dt_fixup_cpu_clocks(cpu, tb, 0); | ||
65 | dt_fixup_clock("/plb", plb); | ||
66 | dt_fixup_clock("/plb/opb", opb); | ||
67 | dt_fixup_clock("/plb/ebc", ebc); | ||
68 | dt_fixup_clock("/plb/opb/serial@ef600300", uart0); | ||
69 | dt_fixup_clock("/plb/opb/serial@ef600400", uart1); | ||
70 | } | ||
71 | |||
72 | static void walnut_flashsel_fixup(void) | ||
73 | { | ||
74 | void *devp, *sram; | ||
75 | u32 reg_flash[3] = {0x0, 0x0, 0x80000}; | ||
76 | u32 reg_sram[3] = {0x0, 0x0, 0x80000}; | ||
77 | u8 *fpga; | ||
78 | u8 fpga_brds1 = 0x0; | ||
79 | |||
80 | devp = finddevice("/plb/ebc/fpga"); | ||
81 | if (!devp) | ||
82 | fatal("Couldn't locate FPGA node\n\r"); | ||
83 | |||
84 | if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) | ||
85 | fatal("no virtual-reg property\n\r"); | ||
86 | |||
87 | fpga_brds1 = in_8(fpga); | ||
88 | |||
89 | devp = finddevice("/plb/ebc/flash"); | ||
90 | if (!devp) | ||
91 | fatal("Couldn't locate flash node\n\r"); | ||
92 | |||
93 | if (getprop(devp, "reg", reg_flash, sizeof(reg_flash)) != sizeof(reg_flash)) | ||
94 | fatal("flash reg property has unexpected size\n\r"); | ||
95 | |||
96 | sram = finddevice("/plb/ebc/sram"); | ||
97 | if (!sram) | ||
98 | fatal("Couldn't locate sram node\n\r"); | ||
99 | |||
100 | if (getprop(sram, "reg", reg_sram, sizeof(reg_sram)) != sizeof(reg_sram)) | ||
101 | fatal("sram reg property has unexpected size\n\r"); | ||
102 | |||
103 | if (fpga_brds1 & 0x1) { | ||
104 | reg_flash[1] ^= 0x80000; | ||
105 | reg_sram[1] ^= 0x80000; | ||
106 | } | ||
107 | |||
108 | setprop(devp, "reg", reg_flash, sizeof(reg_flash)); | ||
109 | setprop(sram, "reg", reg_sram, sizeof(reg_sram)); | ||
110 | } | ||
111 | |||
112 | static void walnut_fixups(void) | ||
113 | { | ||
114 | ibm4xx_fixup_memsize(); | ||
115 | ibm405gp_fixup_clocks(33330000, 0xa8c000); | ||
116 | ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); | ||
117 | ibm4xx_fixup_ebc_ranges("/plb/ebc"); | ||
118 | walnut_flashsel_fixup(); | ||
119 | } | ||
120 | |||
121 | void platform_init(void) | ||
122 | { | ||
123 | unsigned long end_of_ram = 0x2000000; | ||
124 | unsigned long avail_ram = end_of_ram - (unsigned long) _end; | ||
125 | |||
126 | simple_alloc_init(_end, avail_ram, 32, 32); | ||
127 | platform_ops.fixups = walnut_fixups; | ||
128 | platform_ops.exit = ibm40x_dbcr_reset; | ||
129 | ft_init(_dtb_start, _dtb_end - _dtb_start, 32); | ||
130 | serial_console_init(); | ||
131 | } | ||
diff --git a/arch/powerpc/configs/bamboo_defconfig b/arch/powerpc/configs/bamboo_defconfig new file mode 100644 index 000000000000..b592dec4640f --- /dev/null +++ b/arch/powerpc/configs/bamboo_defconfig | |||
@@ -0,0 +1,775 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23-rc1 | ||
4 | # Fri Aug 3 10:46:53 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | CONFIG_44x=y | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | CONFIG_4xx=y | ||
19 | CONFIG_BOOKE=y | ||
20 | CONFIG_PTE_64BIT=y | ||
21 | CONFIG_PHYS_64BIT=y | ||
22 | # CONFIG_PPC_MM_SLICES is not set | ||
23 | CONFIG_NOT_COHERENT_CACHE=y | ||
24 | CONFIG_PPC32=y | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_HARDIRQS=y | ||
28 | CONFIG_IRQ_PER_CPU=y | ||
29 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
30 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
31 | CONFIG_GENERIC_HWEIGHT=y | ||
32 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
33 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
34 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
35 | CONFIG_PPC=y | ||
36 | CONFIG_EARLY_PRINTK=y | ||
37 | CONFIG_GENERIC_NVRAM=y | ||
38 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
39 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
40 | CONFIG_PPC_OF=y | ||
41 | CONFIG_OF=y | ||
42 | CONFIG_PPC_UDBG_16550=y | ||
43 | # CONFIG_GENERIC_TBSYNC is not set | ||
44 | CONFIG_AUDIT_ARCH=y | ||
45 | CONFIG_GENERIC_BUG=y | ||
46 | # CONFIG_DEFAULT_UIMAGE is not set | ||
47 | CONFIG_PPC_DCR_NATIVE=y | ||
48 | # CONFIG_PPC_DCR_MMIO is not set | ||
49 | CONFIG_PPC_DCR=y | ||
50 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
51 | |||
52 | # | ||
53 | # General setup | ||
54 | # | ||
55 | CONFIG_EXPERIMENTAL=y | ||
56 | CONFIG_BROKEN_ON_SMP=y | ||
57 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
58 | CONFIG_LOCALVERSION="" | ||
59 | CONFIG_LOCALVERSION_AUTO=y | ||
60 | CONFIG_SWAP=y | ||
61 | CONFIG_SYSVIPC=y | ||
62 | CONFIG_SYSVIPC_SYSCTL=y | ||
63 | CONFIG_POSIX_MQUEUE=y | ||
64 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
65 | # CONFIG_TASKSTATS is not set | ||
66 | # CONFIG_USER_NS is not set | ||
67 | # CONFIG_AUDIT is not set | ||
68 | # CONFIG_IKCONFIG is not set | ||
69 | CONFIG_LOG_BUF_SHIFT=14 | ||
70 | CONFIG_SYSFS_DEPRECATED=y | ||
71 | # CONFIG_RELAY is not set | ||
72 | CONFIG_BLK_DEV_INITRD=y | ||
73 | CONFIG_INITRAMFS_SOURCE="" | ||
74 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
75 | CONFIG_SYSCTL=y | ||
76 | CONFIG_EMBEDDED=y | ||
77 | CONFIG_SYSCTL_SYSCALL=y | ||
78 | CONFIG_KALLSYMS=y | ||
79 | # CONFIG_KALLSYMS_ALL is not set | ||
80 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
81 | CONFIG_HOTPLUG=y | ||
82 | CONFIG_PRINTK=y | ||
83 | CONFIG_BUG=y | ||
84 | CONFIG_ELF_CORE=y | ||
85 | CONFIG_BASE_FULL=y | ||
86 | CONFIG_FUTEX=y | ||
87 | CONFIG_ANON_INODES=y | ||
88 | CONFIG_EPOLL=y | ||
89 | CONFIG_SIGNALFD=y | ||
90 | CONFIG_TIMERFD=y | ||
91 | CONFIG_EVENTFD=y | ||
92 | CONFIG_SHMEM=y | ||
93 | CONFIG_VM_EVENT_COUNTERS=y | ||
94 | CONFIG_SLAB=y | ||
95 | # CONFIG_SLUB is not set | ||
96 | # CONFIG_SLOB is not set | ||
97 | CONFIG_RT_MUTEXES=y | ||
98 | # CONFIG_TINY_SHMEM is not set | ||
99 | CONFIG_BASE_SMALL=0 | ||
100 | CONFIG_MODULES=y | ||
101 | CONFIG_MODULE_UNLOAD=y | ||
102 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
103 | # CONFIG_MODVERSIONS is not set | ||
104 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
105 | CONFIG_KMOD=y | ||
106 | CONFIG_BLOCK=y | ||
107 | CONFIG_LBD=y | ||
108 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
109 | # CONFIG_LSF is not set | ||
110 | # CONFIG_BLK_DEV_BSG is not set | ||
111 | |||
112 | # | ||
113 | # IO Schedulers | ||
114 | # | ||
115 | CONFIG_IOSCHED_NOOP=y | ||
116 | CONFIG_IOSCHED_AS=y | ||
117 | CONFIG_IOSCHED_DEADLINE=y | ||
118 | CONFIG_IOSCHED_CFQ=y | ||
119 | CONFIG_DEFAULT_AS=y | ||
120 | # CONFIG_DEFAULT_DEADLINE is not set | ||
121 | # CONFIG_DEFAULT_CFQ is not set | ||
122 | # CONFIG_DEFAULT_NOOP is not set | ||
123 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
124 | |||
125 | # | ||
126 | # Platform support | ||
127 | # | ||
128 | # CONFIG_PPC_MPC52xx is not set | ||
129 | # CONFIG_PPC_MPC5200 is not set | ||
130 | # CONFIG_PPC_CELL is not set | ||
131 | # CONFIG_PPC_CELL_NATIVE is not set | ||
132 | # CONFIG_PQ2ADS is not set | ||
133 | CONFIG_BAMBOO=y | ||
134 | # CONFIG_EBONY is not set | ||
135 | CONFIG_440EP=y | ||
136 | CONFIG_IBM440EP_ERR42=y | ||
137 | # CONFIG_MPIC is not set | ||
138 | # CONFIG_MPIC_WEIRD is not set | ||
139 | # CONFIG_PPC_I8259 is not set | ||
140 | # CONFIG_PPC_RTAS is not set | ||
141 | # CONFIG_MMIO_NVRAM is not set | ||
142 | # CONFIG_PPC_MPC106 is not set | ||
143 | # CONFIG_PPC_970_NAP is not set | ||
144 | # CONFIG_PPC_INDIRECT_IO is not set | ||
145 | # CONFIG_GENERIC_IOMAP is not set | ||
146 | # CONFIG_CPU_FREQ is not set | ||
147 | # CONFIG_CPM2 is not set | ||
148 | |||
149 | # | ||
150 | # Kernel options | ||
151 | # | ||
152 | # CONFIG_HIGHMEM is not set | ||
153 | # CONFIG_HZ_100 is not set | ||
154 | CONFIG_HZ_250=y | ||
155 | # CONFIG_HZ_300 is not set | ||
156 | # CONFIG_HZ_1000 is not set | ||
157 | CONFIG_HZ=250 | ||
158 | CONFIG_PREEMPT_NONE=y | ||
159 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
160 | # CONFIG_PREEMPT is not set | ||
161 | CONFIG_BINFMT_ELF=y | ||
162 | # CONFIG_BINFMT_MISC is not set | ||
163 | # CONFIG_MATH_EMULATION is not set | ||
164 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
165 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
166 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
167 | CONFIG_SELECT_MEMORY_MODEL=y | ||
168 | CONFIG_FLATMEM_MANUAL=y | ||
169 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
170 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
171 | CONFIG_FLATMEM=y | ||
172 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
173 | # CONFIG_SPARSEMEM_STATIC is not set | ||
174 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
175 | CONFIG_RESOURCES_64BIT=y | ||
176 | CONFIG_ZONE_DMA_FLAG=1 | ||
177 | CONFIG_BOUNCE=y | ||
178 | CONFIG_VIRT_TO_BUS=y | ||
179 | CONFIG_PROC_DEVICETREE=y | ||
180 | CONFIG_CMDLINE_BOOL=y | ||
181 | CONFIG_CMDLINE="" | ||
182 | CONFIG_SECCOMP=y | ||
183 | CONFIG_WANT_DEVICE_TREE=y | ||
184 | CONFIG_DEVICE_TREE="bamboo.dts" | ||
185 | CONFIG_ISA_DMA_API=y | ||
186 | |||
187 | # | ||
188 | # Bus options | ||
189 | # | ||
190 | CONFIG_ZONE_DMA=y | ||
191 | CONFIG_PPC_INDIRECT_PCI=y | ||
192 | CONFIG_PCI=y | ||
193 | CONFIG_PCI_DOMAINS=y | ||
194 | CONFIG_PCI_SYSCALL=y | ||
195 | # CONFIG_PCIEPORTBUS is not set | ||
196 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
197 | # CONFIG_PCI_MSI is not set | ||
198 | # CONFIG_PCI_DEBUG is not set | ||
199 | |||
200 | # | ||
201 | # PCCARD (PCMCIA/CardBus) support | ||
202 | # | ||
203 | # CONFIG_PCCARD is not set | ||
204 | # CONFIG_HOTPLUG_PCI is not set | ||
205 | |||
206 | # | ||
207 | # Advanced setup | ||
208 | # | ||
209 | # CONFIG_ADVANCED_OPTIONS is not set | ||
210 | |||
211 | # | ||
212 | # Default settings for advanced configuration options are used | ||
213 | # | ||
214 | CONFIG_HIGHMEM_START=0xfe000000 | ||
215 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
216 | CONFIG_KERNEL_START=0xc0000000 | ||
217 | CONFIG_TASK_SIZE=0x80000000 | ||
218 | CONFIG_CONSISTENT_START=0xff100000 | ||
219 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
220 | CONFIG_BOOT_LOAD=0x01000000 | ||
221 | |||
222 | # | ||
223 | # Networking | ||
224 | # | ||
225 | CONFIG_NET=y | ||
226 | |||
227 | # | ||
228 | # Networking options | ||
229 | # | ||
230 | CONFIG_PACKET=y | ||
231 | # CONFIG_PACKET_MMAP is not set | ||
232 | CONFIG_UNIX=y | ||
233 | # CONFIG_NET_KEY is not set | ||
234 | CONFIG_INET=y | ||
235 | # CONFIG_IP_MULTICAST is not set | ||
236 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
237 | CONFIG_IP_FIB_HASH=y | ||
238 | CONFIG_IP_PNP=y | ||
239 | CONFIG_IP_PNP_DHCP=y | ||
240 | CONFIG_IP_PNP_BOOTP=y | ||
241 | # CONFIG_IP_PNP_RARP is not set | ||
242 | # CONFIG_NET_IPIP is not set | ||
243 | # CONFIG_NET_IPGRE is not set | ||
244 | # CONFIG_ARPD is not set | ||
245 | # CONFIG_SYN_COOKIES is not set | ||
246 | # CONFIG_INET_AH is not set | ||
247 | # CONFIG_INET_ESP is not set | ||
248 | # CONFIG_INET_IPCOMP is not set | ||
249 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
250 | # CONFIG_INET_TUNNEL is not set | ||
251 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
252 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
253 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
254 | CONFIG_INET_DIAG=y | ||
255 | CONFIG_INET_TCP_DIAG=y | ||
256 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
257 | CONFIG_TCP_CONG_CUBIC=y | ||
258 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
259 | # CONFIG_TCP_MD5SIG is not set | ||
260 | # CONFIG_IPV6 is not set | ||
261 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
262 | # CONFIG_INET6_TUNNEL is not set | ||
263 | # CONFIG_NETWORK_SECMARK is not set | ||
264 | # CONFIG_NETFILTER is not set | ||
265 | # CONFIG_IP_DCCP is not set | ||
266 | # CONFIG_IP_SCTP is not set | ||
267 | # CONFIG_TIPC is not set | ||
268 | # CONFIG_ATM is not set | ||
269 | # CONFIG_BRIDGE is not set | ||
270 | # CONFIG_VLAN_8021Q is not set | ||
271 | # CONFIG_DECNET is not set | ||
272 | # CONFIG_LLC2 is not set | ||
273 | # CONFIG_IPX is not set | ||
274 | # CONFIG_ATALK is not set | ||
275 | # CONFIG_X25 is not set | ||
276 | # CONFIG_LAPB is not set | ||
277 | # CONFIG_ECONET is not set | ||
278 | # CONFIG_WAN_ROUTER is not set | ||
279 | |||
280 | # | ||
281 | # QoS and/or fair queueing | ||
282 | # | ||
283 | # CONFIG_NET_SCHED is not set | ||
284 | |||
285 | # | ||
286 | # Network testing | ||
287 | # | ||
288 | # CONFIG_NET_PKTGEN is not set | ||
289 | # CONFIG_HAMRADIO is not set | ||
290 | # CONFIG_IRDA is not set | ||
291 | # CONFIG_BT is not set | ||
292 | # CONFIG_AF_RXRPC is not set | ||
293 | |||
294 | # | ||
295 | # Wireless | ||
296 | # | ||
297 | # CONFIG_CFG80211 is not set | ||
298 | # CONFIG_WIRELESS_EXT is not set | ||
299 | # CONFIG_MAC80211 is not set | ||
300 | # CONFIG_IEEE80211 is not set | ||
301 | # CONFIG_RFKILL is not set | ||
302 | # CONFIG_NET_9P is not set | ||
303 | |||
304 | # | ||
305 | # Device Drivers | ||
306 | # | ||
307 | |||
308 | # | ||
309 | # Generic Driver Options | ||
310 | # | ||
311 | CONFIG_STANDALONE=y | ||
312 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
313 | CONFIG_FW_LOADER=y | ||
314 | # CONFIG_DEBUG_DRIVER is not set | ||
315 | # CONFIG_DEBUG_DEVRES is not set | ||
316 | # CONFIG_SYS_HYPERVISOR is not set | ||
317 | CONFIG_CONNECTOR=y | ||
318 | CONFIG_PROC_EVENTS=y | ||
319 | # CONFIG_MTD is not set | ||
320 | CONFIG_OF_DEVICE=y | ||
321 | # CONFIG_PARPORT is not set | ||
322 | CONFIG_BLK_DEV=y | ||
323 | # CONFIG_BLK_DEV_FD is not set | ||
324 | # CONFIG_BLK_CPQ_DA is not set | ||
325 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
326 | # CONFIG_BLK_DEV_DAC960 is not set | ||
327 | # CONFIG_BLK_DEV_UMEM is not set | ||
328 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
329 | # CONFIG_BLK_DEV_LOOP is not set | ||
330 | # CONFIG_BLK_DEV_NBD is not set | ||
331 | # CONFIG_BLK_DEV_SX8 is not set | ||
332 | CONFIG_BLK_DEV_RAM=y | ||
333 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
334 | CONFIG_BLK_DEV_RAM_SIZE=35000 | ||
335 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
336 | # CONFIG_CDROM_PKTCDVD is not set | ||
337 | # CONFIG_ATA_OVER_ETH is not set | ||
338 | # CONFIG_XILINX_SYSACE is not set | ||
339 | CONFIG_MISC_DEVICES=y | ||
340 | # CONFIG_PHANTOM is not set | ||
341 | # CONFIG_EEPROM_93CX6 is not set | ||
342 | # CONFIG_SGI_IOC4 is not set | ||
343 | # CONFIG_TIFM_CORE is not set | ||
344 | # CONFIG_IDE is not set | ||
345 | |||
346 | # | ||
347 | # SCSI device support | ||
348 | # | ||
349 | # CONFIG_RAID_ATTRS is not set | ||
350 | # CONFIG_SCSI is not set | ||
351 | # CONFIG_SCSI_DMA is not set | ||
352 | # CONFIG_SCSI_NETLINK is not set | ||
353 | # CONFIG_ATA is not set | ||
354 | # CONFIG_MD is not set | ||
355 | |||
356 | # | ||
357 | # Fusion MPT device support | ||
358 | # | ||
359 | # CONFIG_FUSION is not set | ||
360 | |||
361 | # | ||
362 | # IEEE 1394 (FireWire) support | ||
363 | # | ||
364 | # CONFIG_FIREWIRE is not set | ||
365 | # CONFIG_IEEE1394 is not set | ||
366 | # CONFIG_I2O is not set | ||
367 | CONFIG_MACINTOSH_DRIVERS=y | ||
368 | # CONFIG_MAC_EMUMOUSEBTN is not set | ||
369 | # CONFIG_WINDFARM is not set | ||
370 | CONFIG_NETDEVICES=y | ||
371 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
372 | # CONFIG_DUMMY is not set | ||
373 | # CONFIG_BONDING is not set | ||
374 | # CONFIG_MACVLAN is not set | ||
375 | # CONFIG_EQUALIZER is not set | ||
376 | # CONFIG_TUN is not set | ||
377 | # CONFIG_ARCNET is not set | ||
378 | # CONFIG_NET_ETHERNET is not set | ||
379 | CONFIG_NETDEV_1000=y | ||
380 | # CONFIG_ACENIC is not set | ||
381 | # CONFIG_DL2K is not set | ||
382 | # CONFIG_E1000 is not set | ||
383 | # CONFIG_NS83820 is not set | ||
384 | # CONFIG_HAMACHI is not set | ||
385 | # CONFIG_YELLOWFIN is not set | ||
386 | # CONFIG_R8169 is not set | ||
387 | # CONFIG_SIS190 is not set | ||
388 | # CONFIG_SKGE is not set | ||
389 | # CONFIG_SKY2 is not set | ||
390 | # CONFIG_VIA_VELOCITY is not set | ||
391 | # CONFIG_TIGON3 is not set | ||
392 | # CONFIG_BNX2 is not set | ||
393 | # CONFIG_QLA3XXX is not set | ||
394 | # CONFIG_ATL1 is not set | ||
395 | CONFIG_NETDEV_10000=y | ||
396 | # CONFIG_CHELSIO_T1 is not set | ||
397 | # CONFIG_CHELSIO_T3 is not set | ||
398 | # CONFIG_IXGB is not set | ||
399 | # CONFIG_S2IO is not set | ||
400 | # CONFIG_MYRI10GE is not set | ||
401 | # CONFIG_NETXEN_NIC is not set | ||
402 | # CONFIG_MLX4_CORE is not set | ||
403 | # CONFIG_TR is not set | ||
404 | |||
405 | # | ||
406 | # Wireless LAN | ||
407 | # | ||
408 | # CONFIG_WLAN_PRE80211 is not set | ||
409 | # CONFIG_WLAN_80211 is not set | ||
410 | # CONFIG_WAN is not set | ||
411 | # CONFIG_FDDI is not set | ||
412 | # CONFIG_HIPPI is not set | ||
413 | # CONFIG_PPP is not set | ||
414 | # CONFIG_SLIP is not set | ||
415 | # CONFIG_SHAPER is not set | ||
416 | # CONFIG_NETCONSOLE is not set | ||
417 | # CONFIG_NETPOLL is not set | ||
418 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
419 | # CONFIG_ISDN is not set | ||
420 | # CONFIG_PHONE is not set | ||
421 | |||
422 | # | ||
423 | # Input device support | ||
424 | # | ||
425 | # CONFIG_INPUT is not set | ||
426 | |||
427 | # | ||
428 | # Hardware I/O ports | ||
429 | # | ||
430 | # CONFIG_SERIO is not set | ||
431 | # CONFIG_GAMEPORT is not set | ||
432 | |||
433 | # | ||
434 | # Character devices | ||
435 | # | ||
436 | # CONFIG_VT is not set | ||
437 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
438 | |||
439 | # | ||
440 | # Serial drivers | ||
441 | # | ||
442 | CONFIG_SERIAL_8250=y | ||
443 | CONFIG_SERIAL_8250_CONSOLE=y | ||
444 | # CONFIG_SERIAL_8250_PCI is not set | ||
445 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
446 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
447 | CONFIG_SERIAL_8250_EXTENDED=y | ||
448 | # CONFIG_SERIAL_8250_MANY_PORTS is not set | ||
449 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
450 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
451 | # CONFIG_SERIAL_8250_RSA is not set | ||
452 | |||
453 | # | ||
454 | # Non-8250 serial port support | ||
455 | # | ||
456 | # CONFIG_SERIAL_UARTLITE is not set | ||
457 | CONFIG_SERIAL_CORE=y | ||
458 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
459 | # CONFIG_SERIAL_JSM is not set | ||
460 | CONFIG_SERIAL_OF_PLATFORM=y | ||
461 | CONFIG_UNIX98_PTYS=y | ||
462 | CONFIG_LEGACY_PTYS=y | ||
463 | CONFIG_LEGACY_PTY_COUNT=256 | ||
464 | # CONFIG_IPMI_HANDLER is not set | ||
465 | # CONFIG_WATCHDOG is not set | ||
466 | # CONFIG_HW_RANDOM is not set | ||
467 | # CONFIG_NVRAM is not set | ||
468 | # CONFIG_GEN_RTC is not set | ||
469 | # CONFIG_R3964 is not set | ||
470 | # CONFIG_APPLICOM is not set | ||
471 | # CONFIG_AGP is not set | ||
472 | # CONFIG_DRM is not set | ||
473 | # CONFIG_RAW_DRIVER is not set | ||
474 | # CONFIG_TCG_TPM is not set | ||
475 | CONFIG_DEVPORT=y | ||
476 | # CONFIG_I2C is not set | ||
477 | |||
478 | # | ||
479 | # SPI support | ||
480 | # | ||
481 | # CONFIG_SPI is not set | ||
482 | # CONFIG_SPI_MASTER is not set | ||
483 | # CONFIG_W1 is not set | ||
484 | # CONFIG_POWER_SUPPLY is not set | ||
485 | # CONFIG_HWMON is not set | ||
486 | |||
487 | # | ||
488 | # Multifunction device drivers | ||
489 | # | ||
490 | # CONFIG_MFD_SM501 is not set | ||
491 | |||
492 | # | ||
493 | # Multimedia devices | ||
494 | # | ||
495 | # CONFIG_VIDEO_DEV is not set | ||
496 | # CONFIG_DVB_CORE is not set | ||
497 | CONFIG_DAB=y | ||
498 | |||
499 | # | ||
500 | # Graphics support | ||
501 | # | ||
502 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
503 | |||
504 | # | ||
505 | # Display device support | ||
506 | # | ||
507 | # CONFIG_DISPLAY_SUPPORT is not set | ||
508 | # CONFIG_VGASTATE is not set | ||
509 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
510 | # CONFIG_FB is not set | ||
511 | # CONFIG_FB_IBM_GXT4500 is not set | ||
512 | |||
513 | # | ||
514 | # Sound | ||
515 | # | ||
516 | # CONFIG_SOUND is not set | ||
517 | CONFIG_USB_SUPPORT=y | ||
518 | CONFIG_USB_ARCH_HAS_HCD=y | ||
519 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
520 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
521 | # CONFIG_USB is not set | ||
522 | |||
523 | # | ||
524 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
525 | # | ||
526 | |||
527 | # | ||
528 | # USB Gadget Support | ||
529 | # | ||
530 | # CONFIG_USB_GADGET is not set | ||
531 | # CONFIG_MMC is not set | ||
532 | # CONFIG_NEW_LEDS is not set | ||
533 | # CONFIG_INFINIBAND is not set | ||
534 | # CONFIG_EDAC is not set | ||
535 | # CONFIG_RTC_CLASS is not set | ||
536 | |||
537 | # | ||
538 | # DMA Engine support | ||
539 | # | ||
540 | # CONFIG_DMA_ENGINE is not set | ||
541 | |||
542 | # | ||
543 | # DMA Clients | ||
544 | # | ||
545 | |||
546 | # | ||
547 | # DMA Devices | ||
548 | # | ||
549 | |||
550 | # | ||
551 | # Userspace I/O | ||
552 | # | ||
553 | # CONFIG_UIO is not set | ||
554 | |||
555 | # | ||
556 | # File systems | ||
557 | # | ||
558 | CONFIG_EXT2_FS=y | ||
559 | # CONFIG_EXT2_FS_XATTR is not set | ||
560 | # CONFIG_EXT2_FS_XIP is not set | ||
561 | # CONFIG_EXT3_FS is not set | ||
562 | # CONFIG_EXT4DEV_FS is not set | ||
563 | # CONFIG_REISERFS_FS is not set | ||
564 | # CONFIG_JFS_FS is not set | ||
565 | # CONFIG_FS_POSIX_ACL is not set | ||
566 | # CONFIG_XFS_FS is not set | ||
567 | # CONFIG_GFS2_FS is not set | ||
568 | # CONFIG_OCFS2_FS is not set | ||
569 | # CONFIG_MINIX_FS is not set | ||
570 | # CONFIG_ROMFS_FS is not set | ||
571 | CONFIG_INOTIFY=y | ||
572 | CONFIG_INOTIFY_USER=y | ||
573 | # CONFIG_QUOTA is not set | ||
574 | CONFIG_DNOTIFY=y | ||
575 | # CONFIG_AUTOFS_FS is not set | ||
576 | # CONFIG_AUTOFS4_FS is not set | ||
577 | # CONFIG_FUSE_FS is not set | ||
578 | |||
579 | # | ||
580 | # CD-ROM/DVD Filesystems | ||
581 | # | ||
582 | # CONFIG_ISO9660_FS is not set | ||
583 | # CONFIG_UDF_FS is not set | ||
584 | |||
585 | # | ||
586 | # DOS/FAT/NT Filesystems | ||
587 | # | ||
588 | # CONFIG_MSDOS_FS is not set | ||
589 | # CONFIG_VFAT_FS is not set | ||
590 | # CONFIG_NTFS_FS is not set | ||
591 | |||
592 | # | ||
593 | # Pseudo filesystems | ||
594 | # | ||
595 | CONFIG_PROC_FS=y | ||
596 | CONFIG_PROC_KCORE=y | ||
597 | CONFIG_PROC_SYSCTL=y | ||
598 | CONFIG_SYSFS=y | ||
599 | CONFIG_TMPFS=y | ||
600 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
601 | # CONFIG_HUGETLB_PAGE is not set | ||
602 | CONFIG_RAMFS=y | ||
603 | # CONFIG_CONFIGFS_FS is not set | ||
604 | |||
605 | # | ||
606 | # Miscellaneous filesystems | ||
607 | # | ||
608 | # CONFIG_ADFS_FS is not set | ||
609 | # CONFIG_AFFS_FS is not set | ||
610 | # CONFIG_HFS_FS is not set | ||
611 | # CONFIG_HFSPLUS_FS is not set | ||
612 | # CONFIG_BEFS_FS is not set | ||
613 | # CONFIG_BFS_FS is not set | ||
614 | # CONFIG_EFS_FS is not set | ||
615 | CONFIG_CRAMFS=y | ||
616 | # CONFIG_VXFS_FS is not set | ||
617 | # CONFIG_HPFS_FS is not set | ||
618 | # CONFIG_QNX4FS_FS is not set | ||
619 | # CONFIG_SYSV_FS is not set | ||
620 | # CONFIG_UFS_FS is not set | ||
621 | |||
622 | # | ||
623 | # Network File Systems | ||
624 | # | ||
625 | CONFIG_NFS_FS=y | ||
626 | CONFIG_NFS_V3=y | ||
627 | # CONFIG_NFS_V3_ACL is not set | ||
628 | # CONFIG_NFS_V4 is not set | ||
629 | # CONFIG_NFS_DIRECTIO is not set | ||
630 | # CONFIG_NFSD is not set | ||
631 | CONFIG_ROOT_NFS=y | ||
632 | CONFIG_LOCKD=y | ||
633 | CONFIG_LOCKD_V4=y | ||
634 | CONFIG_NFS_COMMON=y | ||
635 | CONFIG_SUNRPC=y | ||
636 | # CONFIG_SUNRPC_BIND34 is not set | ||
637 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
638 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
639 | # CONFIG_SMB_FS is not set | ||
640 | # CONFIG_CIFS is not set | ||
641 | # CONFIG_NCP_FS is not set | ||
642 | # CONFIG_CODA_FS is not set | ||
643 | # CONFIG_AFS_FS is not set | ||
644 | |||
645 | # | ||
646 | # Partition Types | ||
647 | # | ||
648 | # CONFIG_PARTITION_ADVANCED is not set | ||
649 | CONFIG_MSDOS_PARTITION=y | ||
650 | |||
651 | # | ||
652 | # Native Language Support | ||
653 | # | ||
654 | # CONFIG_NLS is not set | ||
655 | |||
656 | # | ||
657 | # Distributed Lock Manager | ||
658 | # | ||
659 | # CONFIG_DLM is not set | ||
660 | # CONFIG_UCC_SLOW is not set | ||
661 | |||
662 | # | ||
663 | # Library routines | ||
664 | # | ||
665 | CONFIG_BITREVERSE=y | ||
666 | # CONFIG_CRC_CCITT is not set | ||
667 | # CONFIG_CRC16 is not set | ||
668 | # CONFIG_CRC_ITU_T is not set | ||
669 | CONFIG_CRC32=y | ||
670 | # CONFIG_CRC7 is not set | ||
671 | # CONFIG_LIBCRC32C is not set | ||
672 | CONFIG_ZLIB_INFLATE=y | ||
673 | CONFIG_PLIST=y | ||
674 | CONFIG_HAS_IOMEM=y | ||
675 | CONFIG_HAS_IOPORT=y | ||
676 | CONFIG_HAS_DMA=y | ||
677 | |||
678 | # | ||
679 | # Instrumentation Support | ||
680 | # | ||
681 | # CONFIG_PROFILING is not set | ||
682 | |||
683 | # | ||
684 | # Kernel hacking | ||
685 | # | ||
686 | # CONFIG_PRINTK_TIME is not set | ||
687 | CONFIG_ENABLE_MUST_CHECK=y | ||
688 | CONFIG_MAGIC_SYSRQ=y | ||
689 | # CONFIG_UNUSED_SYMBOLS is not set | ||
690 | # CONFIG_DEBUG_FS is not set | ||
691 | # CONFIG_HEADERS_CHECK is not set | ||
692 | CONFIG_DEBUG_KERNEL=y | ||
693 | # CONFIG_DEBUG_SHIRQ is not set | ||
694 | CONFIG_DETECT_SOFTLOCKUP=y | ||
695 | CONFIG_SCHED_DEBUG=y | ||
696 | # CONFIG_SCHEDSTATS is not set | ||
697 | # CONFIG_TIMER_STATS is not set | ||
698 | # CONFIG_DEBUG_SLAB is not set | ||
699 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
700 | # CONFIG_RT_MUTEX_TESTER is not set | ||
701 | # CONFIG_DEBUG_SPINLOCK is not set | ||
702 | # CONFIG_DEBUG_MUTEXES is not set | ||
703 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
704 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
705 | # CONFIG_DEBUG_KOBJECT is not set | ||
706 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
707 | # CONFIG_DEBUG_INFO is not set | ||
708 | # CONFIG_DEBUG_VM is not set | ||
709 | # CONFIG_DEBUG_LIST is not set | ||
710 | CONFIG_FORCED_INLINING=y | ||
711 | # CONFIG_RCU_TORTURE_TEST is not set | ||
712 | # CONFIG_FAULT_INJECTION is not set | ||
713 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
714 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
715 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
716 | CONFIG_DEBUGGER=y | ||
717 | # CONFIG_KGDB is not set | ||
718 | # CONFIG_XMON is not set | ||
719 | # CONFIG_BDI_SWITCH is not set | ||
720 | CONFIG_PPC_EARLY_DEBUG=y | ||
721 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | ||
722 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
723 | # CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set | ||
724 | # CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set | ||
725 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
726 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
727 | # CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set | ||
728 | # CONFIG_PPC_EARLY_DEBUG_BEAT is not set | ||
729 | CONFIG_PPC_EARLY_DEBUG_44x=y | ||
730 | CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300 | ||
731 | CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0 | ||
732 | |||
733 | # | ||
734 | # Security options | ||
735 | # | ||
736 | # CONFIG_KEYS is not set | ||
737 | # CONFIG_SECURITY is not set | ||
738 | CONFIG_CRYPTO=y | ||
739 | CONFIG_CRYPTO_ALGAPI=y | ||
740 | CONFIG_CRYPTO_BLKCIPHER=y | ||
741 | CONFIG_CRYPTO_MANAGER=y | ||
742 | # CONFIG_CRYPTO_HMAC is not set | ||
743 | # CONFIG_CRYPTO_XCBC is not set | ||
744 | # CONFIG_CRYPTO_NULL is not set | ||
745 | # CONFIG_CRYPTO_MD4 is not set | ||
746 | CONFIG_CRYPTO_MD5=y | ||
747 | # CONFIG_CRYPTO_SHA1 is not set | ||
748 | # CONFIG_CRYPTO_SHA256 is not set | ||
749 | # CONFIG_CRYPTO_SHA512 is not set | ||
750 | # CONFIG_CRYPTO_WP512 is not set | ||
751 | # CONFIG_CRYPTO_TGR192 is not set | ||
752 | # CONFIG_CRYPTO_GF128MUL is not set | ||
753 | CONFIG_CRYPTO_ECB=y | ||
754 | CONFIG_CRYPTO_CBC=y | ||
755 | CONFIG_CRYPTO_PCBC=y | ||
756 | # CONFIG_CRYPTO_LRW is not set | ||
757 | # CONFIG_CRYPTO_CRYPTD is not set | ||
758 | CONFIG_CRYPTO_DES=y | ||
759 | # CONFIG_CRYPTO_FCRYPT is not set | ||
760 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
761 | # CONFIG_CRYPTO_TWOFISH is not set | ||
762 | # CONFIG_CRYPTO_SERPENT is not set | ||
763 | # CONFIG_CRYPTO_AES is not set | ||
764 | # CONFIG_CRYPTO_CAST5 is not set | ||
765 | # CONFIG_CRYPTO_CAST6 is not set | ||
766 | # CONFIG_CRYPTO_TEA is not set | ||
767 | # CONFIG_CRYPTO_ARC4 is not set | ||
768 | # CONFIG_CRYPTO_KHAZAD is not set | ||
769 | # CONFIG_CRYPTO_ANUBIS is not set | ||
770 | # CONFIG_CRYPTO_DEFLATE is not set | ||
771 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
772 | # CONFIG_CRYPTO_CRC32C is not set | ||
773 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
774 | # CONFIG_CRYPTO_TEST is not set | ||
775 | CONFIG_CRYPTO_HW=y | ||
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig index ebb8167608b8..3a50467b1f75 100644 --- a/arch/powerpc/configs/ebony_defconfig +++ b/arch/powerpc/configs/ebony_defconfig | |||
@@ -313,7 +313,80 @@ CONFIG_FW_LOADER=y | |||
313 | # CONFIG_SYS_HYPERVISOR is not set | 313 | # CONFIG_SYS_HYPERVISOR is not set |
314 | CONFIG_CONNECTOR=y | 314 | CONFIG_CONNECTOR=y |
315 | CONFIG_PROC_EVENTS=y | 315 | CONFIG_PROC_EVENTS=y |
316 | # CONFIG_MTD is not set | 316 | CONFIG_MTD=y |
317 | # CONFIG_MTD_DEBUG is not set | ||
318 | # CONFIG_MTD_CONCAT is not set | ||
319 | CONFIG_MTD_PARTITIONS=y | ||
320 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
321 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
322 | |||
323 | # | ||
324 | # User Modules And Translation Layers | ||
325 | # | ||
326 | CONFIG_MTD_CHAR=y | ||
327 | CONFIG_MTD_BLKDEVS=y | ||
328 | CONFIG_MTD_BLOCK=y | ||
329 | # CONFIG_FTL is not set | ||
330 | # CONFIG_NFTL is not set | ||
331 | # CONFIG_INFTL is not set | ||
332 | # CONFIG_RFD_FTL is not set | ||
333 | # CONFIG_SSFDC is not set | ||
334 | |||
335 | # | ||
336 | # RAM/ROM/Flash chip drivers | ||
337 | # | ||
338 | CONFIG_MTD_CFI=y | ||
339 | CONFIG_MTD_JEDECPROBE=y | ||
340 | CONFIG_MTD_GEN_PROBE=y | ||
341 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
342 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
343 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
344 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
345 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
346 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
347 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
348 | CONFIG_MTD_CFI_I1=y | ||
349 | CONFIG_MTD_CFI_I2=y | ||
350 | # CONFIG_MTD_CFI_I4 is not set | ||
351 | # CONFIG_MTD_CFI_I8 is not set | ||
352 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
353 | CONFIG_MTD_CFI_AMDSTD=y | ||
354 | # CONFIG_MTD_CFI_STAA is not set | ||
355 | CONFIG_MTD_CFI_UTIL=y | ||
356 | # CONFIG_MTD_RAM is not set | ||
357 | # CONFIG_MTD_ROM is not set | ||
358 | # CONFIG_MTD_ABSENT is not set | ||
359 | |||
360 | # | ||
361 | # Mapping drivers for chip access | ||
362 | # | ||
363 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
364 | # CONFIG_MTD_PHYSMAP is not set | ||
365 | CONFIG_MTD_PHYSMAP_OF=y | ||
366 | # CONFIG_MTD_PLATRAM is not set | ||
367 | |||
368 | # | ||
369 | # Self-contained MTD device drivers | ||
370 | # | ||
371 | # CONFIG_MTD_PMC551 is not set | ||
372 | # CONFIG_MTD_SLRAM is not set | ||
373 | # CONFIG_MTD_PHRAM is not set | ||
374 | # CONFIG_MTD_MTDRAM is not set | ||
375 | # CONFIG_MTD_BLOCK2MTD is not set | ||
376 | |||
377 | # | ||
378 | # Disk-On-Chip Device Drivers | ||
379 | # | ||
380 | # CONFIG_MTD_DOC2000 is not set | ||
381 | # CONFIG_MTD_DOC2001 is not set | ||
382 | # CONFIG_MTD_DOC2001PLUS is not set | ||
383 | # CONFIG_MTD_NAND is not set | ||
384 | # CONFIG_MTD_ONENAND is not set | ||
385 | |||
386 | # | ||
387 | # UBI - Unsorted block images | ||
388 | # | ||
389 | # CONFIG_MTD_UBI is not set | ||
317 | CONFIG_OF_DEVICE=y | 390 | CONFIG_OF_DEVICE=y |
318 | # CONFIG_PARPORT is not set | 391 | # CONFIG_PARPORT is not set |
319 | CONFIG_BLK_DEV=y | 392 | CONFIG_BLK_DEV=y |
@@ -607,6 +680,15 @@ CONFIG_RAMFS=y | |||
607 | # CONFIG_BEFS_FS is not set | 680 | # CONFIG_BEFS_FS is not set |
608 | # CONFIG_BFS_FS is not set | 681 | # CONFIG_BFS_FS is not set |
609 | # CONFIG_EFS_FS is not set | 682 | # CONFIG_EFS_FS is not set |
683 | CONFIG_JFFS2_FS=y | ||
684 | CONFIG_JFFS2_FS_DEBUG=0 | ||
685 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
686 | # CONFIG_JFFS2_SUMMARY is not set | ||
687 | # CONFIG_JFFS2_FS_XATTR is not set | ||
688 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
689 | CONFIG_JFFS2_ZLIB=y | ||
690 | CONFIG_JFFS2_RTIME=y | ||
691 | # CONFIG_JFFS2_RUBIN is not set | ||
610 | CONFIG_CRAMFS=y | 692 | CONFIG_CRAMFS=y |
611 | # CONFIG_VXFS_FS is not set | 693 | # CONFIG_VXFS_FS is not set |
612 | # CONFIG_HPFS_FS is not set | 694 | # CONFIG_HPFS_FS is not set |
@@ -665,6 +747,7 @@ CONFIG_CRC32=y | |||
665 | # CONFIG_CRC7 is not set | 747 | # CONFIG_CRC7 is not set |
666 | # CONFIG_LIBCRC32C is not set | 748 | # CONFIG_LIBCRC32C is not set |
667 | CONFIG_ZLIB_INFLATE=y | 749 | CONFIG_ZLIB_INFLATE=y |
750 | CONFIG_ZLIB_DEFLATE=y | ||
668 | CONFIG_PLIST=y | 751 | CONFIG_PLIST=y |
669 | CONFIG_HAS_IOMEM=y | 752 | CONFIG_HAS_IOMEM=y |
670 | CONFIG_HAS_IOPORT=y | 753 | CONFIG_HAS_IOPORT=y |
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig index 86582aefab93..150221f6f723 100644 --- a/arch/powerpc/configs/mpc8544_ds_defconfig +++ b/arch/powerpc/configs/mpc8544_ds_defconfig | |||
@@ -136,7 +136,7 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
136 | # CONFIG_MPC8560_ADS is not set | 136 | # CONFIG_MPC8560_ADS is not set |
137 | # CONFIG_MPC85xx_CDS is not set | 137 | # CONFIG_MPC85xx_CDS is not set |
138 | # CONFIG_MPC85xx_MDS is not set | 138 | # CONFIG_MPC85xx_MDS is not set |
139 | CONFIG_MPC8544_DS=y | 139 | CONFIG_MPC85xx_DS=y |
140 | CONFIG_MPC85xx=y | 140 | CONFIG_MPC85xx=y |
141 | CONFIG_MPIC=y | 141 | CONFIG_MPIC=y |
142 | # CONFIG_MPIC_WEIRD is not set | 142 | # CONFIG_MPIC_WEIRD is not set |
diff --git a/arch/powerpc/configs/mpc8572_ds_defconfig b/arch/powerpc/configs/mpc8572_ds_defconfig new file mode 100644 index 000000000000..7f1a3e987138 --- /dev/null +++ b/arch/powerpc/configs/mpc8572_ds_defconfig | |||
@@ -0,0 +1,1496 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23-rc4 | ||
4 | # Tue Sep 11 01:19:35 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | CONFIG_PPC_85xx=y | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_85xx=y | ||
18 | CONFIG_E500=y | ||
19 | CONFIG_BOOKE=y | ||
20 | CONFIG_FSL_BOOKE=y | ||
21 | # CONFIG_PHYS_64BIT is not set | ||
22 | CONFIG_SPE=y | ||
23 | # CONFIG_PPC_MM_SLICES is not set | ||
24 | CONFIG_PPC32=y | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_HARDIRQS=y | ||
28 | CONFIG_IRQ_PER_CPU=y | ||
29 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
30 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
31 | CONFIG_GENERIC_HWEIGHT=y | ||
32 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
33 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
34 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
35 | CONFIG_PPC=y | ||
36 | CONFIG_EARLY_PRINTK=y | ||
37 | CONFIG_GENERIC_NVRAM=y | ||
38 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
39 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
40 | CONFIG_PPC_OF=y | ||
41 | CONFIG_OF=y | ||
42 | CONFIG_PPC_UDBG_16550=y | ||
43 | # CONFIG_GENERIC_TBSYNC is not set | ||
44 | CONFIG_AUDIT_ARCH=y | ||
45 | CONFIG_GENERIC_BUG=y | ||
46 | CONFIG_DEFAULT_UIMAGE=y | ||
47 | # CONFIG_PPC_DCR_NATIVE is not set | ||
48 | # CONFIG_PPC_DCR_MMIO is not set | ||
49 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
50 | |||
51 | # | ||
52 | # General setup | ||
53 | # | ||
54 | CONFIG_EXPERIMENTAL=y | ||
55 | CONFIG_BROKEN_ON_SMP=y | ||
56 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
57 | CONFIG_LOCALVERSION="" | ||
58 | CONFIG_LOCALVERSION_AUTO=y | ||
59 | CONFIG_SWAP=y | ||
60 | CONFIG_SYSVIPC=y | ||
61 | CONFIG_SYSVIPC_SYSCTL=y | ||
62 | CONFIG_POSIX_MQUEUE=y | ||
63 | CONFIG_BSD_PROCESS_ACCT=y | ||
64 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
65 | # CONFIG_TASKSTATS is not set | ||
66 | # CONFIG_USER_NS is not set | ||
67 | CONFIG_AUDIT=y | ||
68 | # CONFIG_AUDITSYSCALL is not set | ||
69 | CONFIG_IKCONFIG=y | ||
70 | CONFIG_IKCONFIG_PROC=y | ||
71 | CONFIG_LOG_BUF_SHIFT=14 | ||
72 | CONFIG_SYSFS_DEPRECATED=y | ||
73 | # CONFIG_RELAY is not set | ||
74 | CONFIG_BLK_DEV_INITRD=y | ||
75 | CONFIG_INITRAMFS_SOURCE="" | ||
76 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
77 | CONFIG_SYSCTL=y | ||
78 | CONFIG_EMBEDDED=y | ||
79 | CONFIG_SYSCTL_SYSCALL=y | ||
80 | CONFIG_KALLSYMS=y | ||
81 | CONFIG_KALLSYMS_ALL=y | ||
82 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
83 | CONFIG_HOTPLUG=y | ||
84 | CONFIG_PRINTK=y | ||
85 | CONFIG_BUG=y | ||
86 | CONFIG_ELF_CORE=y | ||
87 | CONFIG_BASE_FULL=y | ||
88 | CONFIG_FUTEX=y | ||
89 | CONFIG_ANON_INODES=y | ||
90 | CONFIG_EPOLL=y | ||
91 | CONFIG_SIGNALFD=y | ||
92 | CONFIG_TIMERFD=y | ||
93 | CONFIG_EVENTFD=y | ||
94 | CONFIG_SHMEM=y | ||
95 | CONFIG_VM_EVENT_COUNTERS=y | ||
96 | CONFIG_SLAB=y | ||
97 | # CONFIG_SLUB is not set | ||
98 | # CONFIG_SLOB is not set | ||
99 | CONFIG_RT_MUTEXES=y | ||
100 | # CONFIG_TINY_SHMEM is not set | ||
101 | CONFIG_BASE_SMALL=0 | ||
102 | CONFIG_MODULES=y | ||
103 | CONFIG_MODULE_UNLOAD=y | ||
104 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
105 | CONFIG_MODVERSIONS=y | ||
106 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
107 | CONFIG_KMOD=y | ||
108 | CONFIG_BLOCK=y | ||
109 | CONFIG_LBD=y | ||
110 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
111 | # CONFIG_LSF is not set | ||
112 | # CONFIG_BLK_DEV_BSG is not set | ||
113 | |||
114 | # | ||
115 | # IO Schedulers | ||
116 | # | ||
117 | CONFIG_IOSCHED_NOOP=y | ||
118 | CONFIG_IOSCHED_AS=y | ||
119 | CONFIG_IOSCHED_DEADLINE=y | ||
120 | CONFIG_IOSCHED_CFQ=y | ||
121 | # CONFIG_DEFAULT_AS is not set | ||
122 | # CONFIG_DEFAULT_DEADLINE is not set | ||
123 | CONFIG_DEFAULT_CFQ=y | ||
124 | # CONFIG_DEFAULT_NOOP is not set | ||
125 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
126 | |||
127 | # | ||
128 | # Platform support | ||
129 | # | ||
130 | # CONFIG_PPC_MPC52xx is not set | ||
131 | # CONFIG_PPC_MPC5200 is not set | ||
132 | # CONFIG_PPC_CELL is not set | ||
133 | # CONFIG_PPC_CELL_NATIVE is not set | ||
134 | # CONFIG_PQ2ADS is not set | ||
135 | # CONFIG_MPC8540_ADS is not set | ||
136 | # CONFIG_MPC8560_ADS is not set | ||
137 | # CONFIG_MPC85xx_CDS is not set | ||
138 | # CONFIG_MPC85xx_MDS is not set | ||
139 | CONFIG_MPC85xx_DS=y | ||
140 | CONFIG_MPC85xx=y | ||
141 | CONFIG_MPIC=y | ||
142 | # CONFIG_MPIC_WEIRD is not set | ||
143 | CONFIG_PPC_I8259=y | ||
144 | # CONFIG_PPC_RTAS is not set | ||
145 | # CONFIG_MMIO_NVRAM is not set | ||
146 | # CONFIG_PPC_MPC106 is not set | ||
147 | # CONFIG_PPC_970_NAP is not set | ||
148 | # CONFIG_PPC_INDIRECT_IO is not set | ||
149 | # CONFIG_GENERIC_IOMAP is not set | ||
150 | # CONFIG_CPU_FREQ is not set | ||
151 | # CONFIG_CPM2 is not set | ||
152 | CONFIG_FSL_ULI1575=y | ||
153 | |||
154 | # | ||
155 | # Kernel options | ||
156 | # | ||
157 | CONFIG_HIGHMEM=y | ||
158 | # CONFIG_HZ_100 is not set | ||
159 | CONFIG_HZ_250=y | ||
160 | # CONFIG_HZ_300 is not set | ||
161 | # CONFIG_HZ_1000 is not set | ||
162 | CONFIG_HZ=250 | ||
163 | CONFIG_PREEMPT_NONE=y | ||
164 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
165 | # CONFIG_PREEMPT is not set | ||
166 | CONFIG_BINFMT_ELF=y | ||
167 | CONFIG_BINFMT_MISC=m | ||
168 | CONFIG_MATH_EMULATION=y | ||
169 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
170 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
171 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
172 | CONFIG_SELECT_MEMORY_MODEL=y | ||
173 | CONFIG_FLATMEM_MANUAL=y | ||
174 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
175 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
176 | CONFIG_FLATMEM=y | ||
177 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
178 | # CONFIG_SPARSEMEM_STATIC is not set | ||
179 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
180 | # CONFIG_RESOURCES_64BIT is not set | ||
181 | CONFIG_ZONE_DMA_FLAG=1 | ||
182 | CONFIG_BOUNCE=y | ||
183 | CONFIG_VIRT_TO_BUS=y | ||
184 | CONFIG_PROC_DEVICETREE=y | ||
185 | # CONFIG_CMDLINE_BOOL is not set | ||
186 | # CONFIG_PM is not set | ||
187 | CONFIG_SECCOMP=y | ||
188 | CONFIG_WANT_DEVICE_TREE=y | ||
189 | CONFIG_DEVICE_TREE="" | ||
190 | CONFIG_ISA_DMA_API=y | ||
191 | |||
192 | # | ||
193 | # Bus options | ||
194 | # | ||
195 | CONFIG_ZONE_DMA=y | ||
196 | CONFIG_PPC_INDIRECT_PCI=y | ||
197 | CONFIG_FSL_SOC=y | ||
198 | CONFIG_FSL_PCI=y | ||
199 | CONFIG_PCI=y | ||
200 | CONFIG_PCI_DOMAINS=y | ||
201 | CONFIG_PCI_SYSCALL=y | ||
202 | # CONFIG_PCIEPORTBUS is not set | ||
203 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
204 | # CONFIG_PCI_MSI is not set | ||
205 | # CONFIG_PCI_DEBUG is not set | ||
206 | |||
207 | # | ||
208 | # PCCARD (PCMCIA/CardBus) support | ||
209 | # | ||
210 | # CONFIG_PCCARD is not set | ||
211 | # CONFIG_HOTPLUG_PCI is not set | ||
212 | |||
213 | # | ||
214 | # Advanced setup | ||
215 | # | ||
216 | # CONFIG_ADVANCED_OPTIONS is not set | ||
217 | |||
218 | # | ||
219 | # Default settings for advanced configuration options are used | ||
220 | # | ||
221 | CONFIG_HIGHMEM_START=0xfe000000 | ||
222 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
223 | CONFIG_KERNEL_START=0xc0000000 | ||
224 | CONFIG_TASK_SIZE=0x80000000 | ||
225 | CONFIG_BOOT_LOAD=0x00800000 | ||
226 | |||
227 | # | ||
228 | # Networking | ||
229 | # | ||
230 | CONFIG_NET=y | ||
231 | |||
232 | # | ||
233 | # Networking options | ||
234 | # | ||
235 | CONFIG_PACKET=y | ||
236 | # CONFIG_PACKET_MMAP is not set | ||
237 | CONFIG_UNIX=y | ||
238 | CONFIG_XFRM=y | ||
239 | CONFIG_XFRM_USER=y | ||
240 | # CONFIG_XFRM_SUB_POLICY is not set | ||
241 | # CONFIG_XFRM_MIGRATE is not set | ||
242 | CONFIG_NET_KEY=m | ||
243 | # CONFIG_NET_KEY_MIGRATE is not set | ||
244 | CONFIG_INET=y | ||
245 | CONFIG_IP_MULTICAST=y | ||
246 | CONFIG_IP_ADVANCED_ROUTER=y | ||
247 | CONFIG_ASK_IP_FIB_HASH=y | ||
248 | # CONFIG_IP_FIB_TRIE is not set | ||
249 | CONFIG_IP_FIB_HASH=y | ||
250 | CONFIG_IP_MULTIPLE_TABLES=y | ||
251 | CONFIG_IP_ROUTE_MULTIPATH=y | ||
252 | CONFIG_IP_ROUTE_VERBOSE=y | ||
253 | CONFIG_IP_PNP=y | ||
254 | CONFIG_IP_PNP_DHCP=y | ||
255 | CONFIG_IP_PNP_BOOTP=y | ||
256 | CONFIG_IP_PNP_RARP=y | ||
257 | CONFIG_NET_IPIP=y | ||
258 | CONFIG_NET_IPGRE=y | ||
259 | CONFIG_NET_IPGRE_BROADCAST=y | ||
260 | CONFIG_IP_MROUTE=y | ||
261 | CONFIG_IP_PIMSM_V1=y | ||
262 | CONFIG_IP_PIMSM_V2=y | ||
263 | CONFIG_ARPD=y | ||
264 | # CONFIG_SYN_COOKIES is not set | ||
265 | # CONFIG_INET_AH is not set | ||
266 | # CONFIG_INET_ESP is not set | ||
267 | # CONFIG_INET_IPCOMP is not set | ||
268 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
269 | CONFIG_INET_TUNNEL=y | ||
270 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
271 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
272 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
273 | CONFIG_INET_DIAG=y | ||
274 | CONFIG_INET_TCP_DIAG=y | ||
275 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
276 | CONFIG_TCP_CONG_CUBIC=y | ||
277 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
278 | # CONFIG_TCP_MD5SIG is not set | ||
279 | CONFIG_IPV6=y | ||
280 | # CONFIG_IPV6_PRIVACY is not set | ||
281 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
282 | # CONFIG_IPV6_OPTIMISTIC_DAD is not set | ||
283 | # CONFIG_INET6_AH is not set | ||
284 | # CONFIG_INET6_ESP is not set | ||
285 | # CONFIG_INET6_IPCOMP is not set | ||
286 | # CONFIG_IPV6_MIP6 is not set | ||
287 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
288 | # CONFIG_INET6_TUNNEL is not set | ||
289 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | ||
290 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | ||
291 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
292 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | ||
293 | CONFIG_IPV6_SIT=y | ||
294 | # CONFIG_IPV6_TUNNEL is not set | ||
295 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | ||
296 | # CONFIG_NETWORK_SECMARK is not set | ||
297 | # CONFIG_NETFILTER is not set | ||
298 | # CONFIG_IP_DCCP is not set | ||
299 | CONFIG_IP_SCTP=m | ||
300 | # CONFIG_SCTP_DBG_MSG is not set | ||
301 | # CONFIG_SCTP_DBG_OBJCNT is not set | ||
302 | # CONFIG_SCTP_HMAC_NONE is not set | ||
303 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
304 | CONFIG_SCTP_HMAC_MD5=y | ||
305 | # CONFIG_TIPC is not set | ||
306 | # CONFIG_ATM is not set | ||
307 | # CONFIG_BRIDGE is not set | ||
308 | # CONFIG_VLAN_8021Q is not set | ||
309 | # CONFIG_DECNET is not set | ||
310 | # CONFIG_LLC2 is not set | ||
311 | # CONFIG_IPX is not set | ||
312 | # CONFIG_ATALK is not set | ||
313 | # CONFIG_X25 is not set | ||
314 | # CONFIG_LAPB is not set | ||
315 | # CONFIG_ECONET is not set | ||
316 | # CONFIG_WAN_ROUTER is not set | ||
317 | |||
318 | # | ||
319 | # QoS and/or fair queueing | ||
320 | # | ||
321 | # CONFIG_NET_SCHED is not set | ||
322 | |||
323 | # | ||
324 | # Network testing | ||
325 | # | ||
326 | # CONFIG_NET_PKTGEN is not set | ||
327 | # CONFIG_HAMRADIO is not set | ||
328 | # CONFIG_IRDA is not set | ||
329 | # CONFIG_BT is not set | ||
330 | # CONFIG_AF_RXRPC is not set | ||
331 | CONFIG_FIB_RULES=y | ||
332 | |||
333 | # | ||
334 | # Wireless | ||
335 | # | ||
336 | # CONFIG_CFG80211 is not set | ||
337 | # CONFIG_WIRELESS_EXT is not set | ||
338 | # CONFIG_MAC80211 is not set | ||
339 | # CONFIG_IEEE80211 is not set | ||
340 | # CONFIG_RFKILL is not set | ||
341 | # CONFIG_NET_9P is not set | ||
342 | |||
343 | # | ||
344 | # Device Drivers | ||
345 | # | ||
346 | |||
347 | # | ||
348 | # Generic Driver Options | ||
349 | # | ||
350 | CONFIG_STANDALONE=y | ||
351 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
352 | CONFIG_FW_LOADER=y | ||
353 | # CONFIG_DEBUG_DRIVER is not set | ||
354 | # CONFIG_DEBUG_DEVRES is not set | ||
355 | # CONFIG_SYS_HYPERVISOR is not set | ||
356 | # CONFIG_CONNECTOR is not set | ||
357 | # CONFIG_MTD is not set | ||
358 | CONFIG_OF_DEVICE=y | ||
359 | # CONFIG_PARPORT is not set | ||
360 | CONFIG_BLK_DEV=y | ||
361 | # CONFIG_BLK_DEV_FD is not set | ||
362 | # CONFIG_BLK_CPQ_DA is not set | ||
363 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
364 | # CONFIG_BLK_DEV_DAC960 is not set | ||
365 | # CONFIG_BLK_DEV_UMEM is not set | ||
366 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
367 | CONFIG_BLK_DEV_LOOP=y | ||
368 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
369 | CONFIG_BLK_DEV_NBD=y | ||
370 | # CONFIG_BLK_DEV_SX8 is not set | ||
371 | # CONFIG_BLK_DEV_UB is not set | ||
372 | CONFIG_BLK_DEV_RAM=y | ||
373 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
374 | CONFIG_BLK_DEV_RAM_SIZE=131072 | ||
375 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
376 | # CONFIG_CDROM_PKTCDVD is not set | ||
377 | # CONFIG_ATA_OVER_ETH is not set | ||
378 | CONFIG_MISC_DEVICES=y | ||
379 | # CONFIG_PHANTOM is not set | ||
380 | # CONFIG_EEPROM_93CX6 is not set | ||
381 | # CONFIG_SGI_IOC4 is not set | ||
382 | # CONFIG_TIFM_CORE is not set | ||
383 | # CONFIG_IDE is not set | ||
384 | |||
385 | # | ||
386 | # SCSI device support | ||
387 | # | ||
388 | # CONFIG_RAID_ATTRS is not set | ||
389 | CONFIG_SCSI=y | ||
390 | CONFIG_SCSI_DMA=y | ||
391 | # CONFIG_SCSI_TGT is not set | ||
392 | # CONFIG_SCSI_NETLINK is not set | ||
393 | CONFIG_SCSI_PROC_FS=y | ||
394 | |||
395 | # | ||
396 | # SCSI support type (disk, tape, CD-ROM) | ||
397 | # | ||
398 | CONFIG_BLK_DEV_SD=y | ||
399 | CONFIG_CHR_DEV_ST=y | ||
400 | # CONFIG_CHR_DEV_OSST is not set | ||
401 | CONFIG_BLK_DEV_SR=y | ||
402 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
403 | CONFIG_CHR_DEV_SG=y | ||
404 | # CONFIG_CHR_DEV_SCH is not set | ||
405 | |||
406 | # | ||
407 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
408 | # | ||
409 | CONFIG_SCSI_MULTI_LUN=y | ||
410 | # CONFIG_SCSI_CONSTANTS is not set | ||
411 | CONFIG_SCSI_LOGGING=y | ||
412 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
413 | CONFIG_SCSI_WAIT_SCAN=m | ||
414 | |||
415 | # | ||
416 | # SCSI Transports | ||
417 | # | ||
418 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
419 | # CONFIG_SCSI_FC_ATTRS is not set | ||
420 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
421 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
422 | CONFIG_SCSI_LOWLEVEL=y | ||
423 | # CONFIG_ISCSI_TCP is not set | ||
424 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
425 | # CONFIG_SCSI_3W_9XXX is not set | ||
426 | # CONFIG_SCSI_ACARD is not set | ||
427 | # CONFIG_SCSI_AACRAID is not set | ||
428 | # CONFIG_SCSI_AIC7XXX is not set | ||
429 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
430 | # CONFIG_SCSI_AIC79XX is not set | ||
431 | # CONFIG_SCSI_AIC94XX is not set | ||
432 | # CONFIG_SCSI_DPT_I2O is not set | ||
433 | # CONFIG_SCSI_ARCMSR is not set | ||
434 | # CONFIG_MEGARAID_NEWGEN is not set | ||
435 | # CONFIG_MEGARAID_LEGACY is not set | ||
436 | # CONFIG_MEGARAID_SAS is not set | ||
437 | # CONFIG_SCSI_HPTIOP is not set | ||
438 | # CONFIG_SCSI_BUSLOGIC is not set | ||
439 | # CONFIG_SCSI_DMX3191D is not set | ||
440 | # CONFIG_SCSI_EATA is not set | ||
441 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
442 | # CONFIG_SCSI_GDTH is not set | ||
443 | # CONFIG_SCSI_IPS is not set | ||
444 | # CONFIG_SCSI_INITIO is not set | ||
445 | # CONFIG_SCSI_INIA100 is not set | ||
446 | # CONFIG_SCSI_STEX is not set | ||
447 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
448 | # CONFIG_SCSI_IPR is not set | ||
449 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
450 | # CONFIG_SCSI_QLA_FC is not set | ||
451 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
452 | # CONFIG_SCSI_LPFC is not set | ||
453 | # CONFIG_SCSI_DC395x is not set | ||
454 | # CONFIG_SCSI_DC390T is not set | ||
455 | # CONFIG_SCSI_NSP32 is not set | ||
456 | # CONFIG_SCSI_DEBUG is not set | ||
457 | # CONFIG_SCSI_SRP is not set | ||
458 | CONFIG_ATA=y | ||
459 | # CONFIG_ATA_NONSTANDARD is not set | ||
460 | CONFIG_SATA_AHCI=y | ||
461 | # CONFIG_SATA_SVW is not set | ||
462 | # CONFIG_ATA_PIIX is not set | ||
463 | # CONFIG_SATA_MV is not set | ||
464 | # CONFIG_SATA_NV is not set | ||
465 | # CONFIG_PDC_ADMA is not set | ||
466 | # CONFIG_SATA_QSTOR is not set | ||
467 | # CONFIG_SATA_PROMISE is not set | ||
468 | # CONFIG_SATA_SX4 is not set | ||
469 | # CONFIG_SATA_SIL is not set | ||
470 | # CONFIG_SATA_SIL24 is not set | ||
471 | # CONFIG_SATA_SIS is not set | ||
472 | # CONFIG_SATA_ULI is not set | ||
473 | # CONFIG_SATA_VIA is not set | ||
474 | # CONFIG_SATA_VITESSE is not set | ||
475 | # CONFIG_SATA_INIC162X is not set | ||
476 | CONFIG_PATA_ALI=y | ||
477 | # CONFIG_PATA_AMD is not set | ||
478 | # CONFIG_PATA_ARTOP is not set | ||
479 | # CONFIG_PATA_ATIIXP is not set | ||
480 | # CONFIG_PATA_CMD640_PCI is not set | ||
481 | # CONFIG_PATA_CMD64X is not set | ||
482 | # CONFIG_PATA_CS5520 is not set | ||
483 | # CONFIG_PATA_CS5530 is not set | ||
484 | # CONFIG_PATA_CYPRESS is not set | ||
485 | # CONFIG_PATA_EFAR is not set | ||
486 | # CONFIG_ATA_GENERIC is not set | ||
487 | # CONFIG_PATA_HPT366 is not set | ||
488 | # CONFIG_PATA_HPT37X is not set | ||
489 | # CONFIG_PATA_HPT3X2N is not set | ||
490 | # CONFIG_PATA_HPT3X3 is not set | ||
491 | # CONFIG_PATA_IT821X is not set | ||
492 | # CONFIG_PATA_IT8213 is not set | ||
493 | # CONFIG_PATA_JMICRON is not set | ||
494 | # CONFIG_PATA_TRIFLEX is not set | ||
495 | # CONFIG_PATA_MARVELL is not set | ||
496 | # CONFIG_PATA_MPIIX is not set | ||
497 | # CONFIG_PATA_OLDPIIX is not set | ||
498 | # CONFIG_PATA_NETCELL is not set | ||
499 | # CONFIG_PATA_NS87410 is not set | ||
500 | # CONFIG_PATA_OPTI is not set | ||
501 | # CONFIG_PATA_OPTIDMA is not set | ||
502 | # CONFIG_PATA_PDC_OLD is not set | ||
503 | # CONFIG_PATA_RADISYS is not set | ||
504 | # CONFIG_PATA_RZ1000 is not set | ||
505 | # CONFIG_PATA_SC1200 is not set | ||
506 | # CONFIG_PATA_SERVERWORKS is not set | ||
507 | # CONFIG_PATA_PDC2027X is not set | ||
508 | # CONFIG_PATA_SIL680 is not set | ||
509 | # CONFIG_PATA_SIS is not set | ||
510 | # CONFIG_PATA_VIA is not set | ||
511 | # CONFIG_PATA_WINBOND is not set | ||
512 | # CONFIG_PATA_PLATFORM is not set | ||
513 | # CONFIG_MD is not set | ||
514 | |||
515 | # | ||
516 | # Fusion MPT device support | ||
517 | # | ||
518 | # CONFIG_FUSION is not set | ||
519 | # CONFIG_FUSION_SPI is not set | ||
520 | # CONFIG_FUSION_FC is not set | ||
521 | # CONFIG_FUSION_SAS is not set | ||
522 | |||
523 | # | ||
524 | # IEEE 1394 (FireWire) support | ||
525 | # | ||
526 | # CONFIG_FIREWIRE is not set | ||
527 | # CONFIG_IEEE1394 is not set | ||
528 | # CONFIG_I2O is not set | ||
529 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
530 | CONFIG_NETDEVICES=y | ||
531 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
532 | CONFIG_DUMMY=y | ||
533 | # CONFIG_BONDING is not set | ||
534 | # CONFIG_MACVLAN is not set | ||
535 | # CONFIG_EQUALIZER is not set | ||
536 | # CONFIG_TUN is not set | ||
537 | # CONFIG_ARCNET is not set | ||
538 | CONFIG_PHYLIB=y | ||
539 | |||
540 | # | ||
541 | # MII PHY device drivers | ||
542 | # | ||
543 | # CONFIG_MARVELL_PHY is not set | ||
544 | # CONFIG_DAVICOM_PHY is not set | ||
545 | # CONFIG_QSEMI_PHY is not set | ||
546 | # CONFIG_LXT_PHY is not set | ||
547 | # CONFIG_CICADA_PHY is not set | ||
548 | CONFIG_VITESSE_PHY=y | ||
549 | # CONFIG_SMSC_PHY is not set | ||
550 | # CONFIG_BROADCOM_PHY is not set | ||
551 | # CONFIG_ICPLUS_PHY is not set | ||
552 | # CONFIG_FIXED_PHY is not set | ||
553 | CONFIG_NET_ETHERNET=y | ||
554 | CONFIG_MII=y | ||
555 | # CONFIG_HAPPYMEAL is not set | ||
556 | # CONFIG_SUNGEM is not set | ||
557 | # CONFIG_CASSINI is not set | ||
558 | # CONFIG_NET_VENDOR_3COM is not set | ||
559 | # CONFIG_NET_TULIP is not set | ||
560 | # CONFIG_HP100 is not set | ||
561 | # CONFIG_NET_PCI is not set | ||
562 | CONFIG_NETDEV_1000=y | ||
563 | # CONFIG_ACENIC is not set | ||
564 | # CONFIG_DL2K is not set | ||
565 | # CONFIG_E1000 is not set | ||
566 | # CONFIG_NS83820 is not set | ||
567 | # CONFIG_HAMACHI is not set | ||
568 | # CONFIG_YELLOWFIN is not set | ||
569 | # CONFIG_R8169 is not set | ||
570 | # CONFIG_SIS190 is not set | ||
571 | # CONFIG_SKGE is not set | ||
572 | # CONFIG_SKY2 is not set | ||
573 | # CONFIG_VIA_VELOCITY is not set | ||
574 | # CONFIG_TIGON3 is not set | ||
575 | # CONFIG_BNX2 is not set | ||
576 | CONFIG_GIANFAR=y | ||
577 | CONFIG_GFAR_NAPI=y | ||
578 | # CONFIG_QLA3XXX is not set | ||
579 | # CONFIG_ATL1 is not set | ||
580 | CONFIG_NETDEV_10000=y | ||
581 | # CONFIG_CHELSIO_T1 is not set | ||
582 | # CONFIG_CHELSIO_T3 is not set | ||
583 | # CONFIG_IXGB is not set | ||
584 | # CONFIG_S2IO is not set | ||
585 | # CONFIG_MYRI10GE is not set | ||
586 | # CONFIG_NETXEN_NIC is not set | ||
587 | # CONFIG_MLX4_CORE is not set | ||
588 | # CONFIG_TR is not set | ||
589 | |||
590 | # | ||
591 | # Wireless LAN | ||
592 | # | ||
593 | # CONFIG_WLAN_PRE80211 is not set | ||
594 | # CONFIG_WLAN_80211 is not set | ||
595 | |||
596 | # | ||
597 | # USB Network Adapters | ||
598 | # | ||
599 | # CONFIG_USB_CATC is not set | ||
600 | # CONFIG_USB_KAWETH is not set | ||
601 | # CONFIG_USB_PEGASUS is not set | ||
602 | # CONFIG_USB_RTL8150 is not set | ||
603 | # CONFIG_USB_USBNET_MII is not set | ||
604 | # CONFIG_USB_USBNET is not set | ||
605 | # CONFIG_WAN is not set | ||
606 | # CONFIG_FDDI is not set | ||
607 | # CONFIG_HIPPI is not set | ||
608 | # CONFIG_PPP is not set | ||
609 | # CONFIG_SLIP is not set | ||
610 | # CONFIG_NET_FC is not set | ||
611 | # CONFIG_SHAPER is not set | ||
612 | # CONFIG_NETCONSOLE is not set | ||
613 | # CONFIG_NETPOLL is not set | ||
614 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
615 | # CONFIG_ISDN is not set | ||
616 | # CONFIG_PHONE is not set | ||
617 | |||
618 | # | ||
619 | # Input device support | ||
620 | # | ||
621 | CONFIG_INPUT=y | ||
622 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
623 | # CONFIG_INPUT_POLLDEV is not set | ||
624 | |||
625 | # | ||
626 | # Userland interfaces | ||
627 | # | ||
628 | # CONFIG_INPUT_MOUSEDEV is not set | ||
629 | # CONFIG_INPUT_JOYDEV is not set | ||
630 | # CONFIG_INPUT_TSDEV is not set | ||
631 | # CONFIG_INPUT_EVDEV is not set | ||
632 | # CONFIG_INPUT_EVBUG is not set | ||
633 | |||
634 | # | ||
635 | # Input Device Drivers | ||
636 | # | ||
637 | # CONFIG_INPUT_KEYBOARD is not set | ||
638 | # CONFIG_INPUT_MOUSE is not set | ||
639 | # CONFIG_INPUT_JOYSTICK is not set | ||
640 | # CONFIG_INPUT_TABLET is not set | ||
641 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
642 | # CONFIG_INPUT_MISC is not set | ||
643 | |||
644 | # | ||
645 | # Hardware I/O ports | ||
646 | # | ||
647 | CONFIG_SERIO=y | ||
648 | CONFIG_SERIO_I8042=y | ||
649 | CONFIG_SERIO_SERPORT=y | ||
650 | # CONFIG_SERIO_PCIPS2 is not set | ||
651 | CONFIG_SERIO_LIBPS2=y | ||
652 | # CONFIG_SERIO_RAW is not set | ||
653 | # CONFIG_GAMEPORT is not set | ||
654 | |||
655 | # | ||
656 | # Character devices | ||
657 | # | ||
658 | CONFIG_VT=y | ||
659 | CONFIG_VT_CONSOLE=y | ||
660 | CONFIG_HW_CONSOLE=y | ||
661 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
662 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
663 | |||
664 | # | ||
665 | # Serial drivers | ||
666 | # | ||
667 | CONFIG_SERIAL_8250=y | ||
668 | CONFIG_SERIAL_8250_CONSOLE=y | ||
669 | CONFIG_SERIAL_8250_PCI=y | ||
670 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
671 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
672 | CONFIG_SERIAL_8250_EXTENDED=y | ||
673 | CONFIG_SERIAL_8250_MANY_PORTS=y | ||
674 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
675 | CONFIG_SERIAL_8250_DETECT_IRQ=y | ||
676 | CONFIG_SERIAL_8250_RSA=y | ||
677 | |||
678 | # | ||
679 | # Non-8250 serial port support | ||
680 | # | ||
681 | # CONFIG_SERIAL_UARTLITE is not set | ||
682 | CONFIG_SERIAL_CORE=y | ||
683 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
684 | # CONFIG_SERIAL_JSM is not set | ||
685 | # CONFIG_SERIAL_OF_PLATFORM is not set | ||
686 | CONFIG_UNIX98_PTYS=y | ||
687 | CONFIG_LEGACY_PTYS=y | ||
688 | CONFIG_LEGACY_PTY_COUNT=256 | ||
689 | # CONFIG_IPMI_HANDLER is not set | ||
690 | # CONFIG_WATCHDOG is not set | ||
691 | # CONFIG_HW_RANDOM is not set | ||
692 | CONFIG_NVRAM=y | ||
693 | CONFIG_GEN_RTC=y | ||
694 | CONFIG_GEN_RTC_X=y | ||
695 | # CONFIG_R3964 is not set | ||
696 | # CONFIG_APPLICOM is not set | ||
697 | # CONFIG_AGP is not set | ||
698 | # CONFIG_DRM is not set | ||
699 | # CONFIG_RAW_DRIVER is not set | ||
700 | # CONFIG_TCG_TPM is not set | ||
701 | CONFIG_DEVPORT=y | ||
702 | CONFIG_I2C=y | ||
703 | CONFIG_I2C_BOARDINFO=y | ||
704 | # CONFIG_I2C_CHARDEV is not set | ||
705 | |||
706 | # | ||
707 | # I2C Algorithms | ||
708 | # | ||
709 | # CONFIG_I2C_ALGOBIT is not set | ||
710 | # CONFIG_I2C_ALGOPCF is not set | ||
711 | # CONFIG_I2C_ALGOPCA is not set | ||
712 | |||
713 | # | ||
714 | # I2C Hardware Bus support | ||
715 | # | ||
716 | # CONFIG_I2C_ALI1535 is not set | ||
717 | # CONFIG_I2C_ALI1563 is not set | ||
718 | # CONFIG_I2C_ALI15X3 is not set | ||
719 | # CONFIG_I2C_AMD756 is not set | ||
720 | # CONFIG_I2C_AMD8111 is not set | ||
721 | # CONFIG_I2C_I801 is not set | ||
722 | # CONFIG_I2C_I810 is not set | ||
723 | # CONFIG_I2C_PIIX4 is not set | ||
724 | CONFIG_I2C_MPC=y | ||
725 | # CONFIG_I2C_NFORCE2 is not set | ||
726 | # CONFIG_I2C_OCORES is not set | ||
727 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
728 | # CONFIG_I2C_PROSAVAGE is not set | ||
729 | # CONFIG_I2C_SAVAGE4 is not set | ||
730 | # CONFIG_I2C_SIMTEC is not set | ||
731 | # CONFIG_I2C_SIS5595 is not set | ||
732 | # CONFIG_I2C_SIS630 is not set | ||
733 | # CONFIG_I2C_SIS96X is not set | ||
734 | # CONFIG_I2C_TAOS_EVM is not set | ||
735 | # CONFIG_I2C_STUB is not set | ||
736 | # CONFIG_I2C_TINY_USB is not set | ||
737 | # CONFIG_I2C_VIA is not set | ||
738 | # CONFIG_I2C_VIAPRO is not set | ||
739 | # CONFIG_I2C_VOODOO3 is not set | ||
740 | |||
741 | # | ||
742 | # Miscellaneous I2C Chip support | ||
743 | # | ||
744 | # CONFIG_SENSORS_DS1337 is not set | ||
745 | # CONFIG_SENSORS_DS1374 is not set | ||
746 | # CONFIG_DS1682 is not set | ||
747 | CONFIG_SENSORS_EEPROM=y | ||
748 | # CONFIG_SENSORS_PCF8574 is not set | ||
749 | # CONFIG_SENSORS_PCA9539 is not set | ||
750 | # CONFIG_SENSORS_PCF8591 is not set | ||
751 | # CONFIG_SENSORS_M41T00 is not set | ||
752 | # CONFIG_SENSORS_MAX6875 is not set | ||
753 | # CONFIG_SENSORS_TSL2550 is not set | ||
754 | # CONFIG_I2C_DEBUG_CORE is not set | ||
755 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
756 | # CONFIG_I2C_DEBUG_BUS is not set | ||
757 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
758 | |||
759 | # | ||
760 | # SPI support | ||
761 | # | ||
762 | # CONFIG_SPI is not set | ||
763 | # CONFIG_SPI_MASTER is not set | ||
764 | # CONFIG_W1 is not set | ||
765 | # CONFIG_POWER_SUPPLY is not set | ||
766 | # CONFIG_HWMON is not set | ||
767 | |||
768 | # | ||
769 | # Multifunction device drivers | ||
770 | # | ||
771 | # CONFIG_MFD_SM501 is not set | ||
772 | |||
773 | # | ||
774 | # Multimedia devices | ||
775 | # | ||
776 | # CONFIG_VIDEO_DEV is not set | ||
777 | CONFIG_DVB_CORE=m | ||
778 | # CONFIG_DVB_CORE_ATTACH is not set | ||
779 | CONFIG_DVB_CAPTURE_DRIVERS=y | ||
780 | |||
781 | # | ||
782 | # Supported SAA7146 based PCI Adapters | ||
783 | # | ||
784 | |||
785 | # | ||
786 | # Supported USB Adapters | ||
787 | # | ||
788 | # CONFIG_DVB_USB is not set | ||
789 | # CONFIG_DVB_TTUSB_BUDGET is not set | ||
790 | # CONFIG_DVB_TTUSB_DEC is not set | ||
791 | # CONFIG_DVB_CINERGYT2 is not set | ||
792 | |||
793 | # | ||
794 | # Supported FlexCopII (B2C2) Adapters | ||
795 | # | ||
796 | # CONFIG_DVB_B2C2_FLEXCOP is not set | ||
797 | |||
798 | # | ||
799 | # Supported BT878 Adapters | ||
800 | # | ||
801 | |||
802 | # | ||
803 | # Supported Pluto2 Adapters | ||
804 | # | ||
805 | # CONFIG_DVB_PLUTO2 is not set | ||
806 | |||
807 | # | ||
808 | # Supported DVB Frontends | ||
809 | # | ||
810 | |||
811 | # | ||
812 | # Customise DVB Frontends | ||
813 | # | ||
814 | # CONFIG_DVB_FE_CUSTOMISE is not set | ||
815 | |||
816 | # | ||
817 | # DVB-S (satellite) frontends | ||
818 | # | ||
819 | # CONFIG_DVB_STV0299 is not set | ||
820 | # CONFIG_DVB_CX24110 is not set | ||
821 | # CONFIG_DVB_CX24123 is not set | ||
822 | # CONFIG_DVB_TDA8083 is not set | ||
823 | # CONFIG_DVB_MT312 is not set | ||
824 | # CONFIG_DVB_VES1X93 is not set | ||
825 | # CONFIG_DVB_S5H1420 is not set | ||
826 | # CONFIG_DVB_TDA10086 is not set | ||
827 | |||
828 | # | ||
829 | # DVB-T (terrestrial) frontends | ||
830 | # | ||
831 | # CONFIG_DVB_SP8870 is not set | ||
832 | # CONFIG_DVB_SP887X is not set | ||
833 | # CONFIG_DVB_CX22700 is not set | ||
834 | # CONFIG_DVB_CX22702 is not set | ||
835 | # CONFIG_DVB_L64781 is not set | ||
836 | # CONFIG_DVB_TDA1004X is not set | ||
837 | # CONFIG_DVB_NXT6000 is not set | ||
838 | # CONFIG_DVB_MT352 is not set | ||
839 | # CONFIG_DVB_ZL10353 is not set | ||
840 | # CONFIG_DVB_DIB3000MB is not set | ||
841 | # CONFIG_DVB_DIB3000MC is not set | ||
842 | # CONFIG_DVB_DIB7000M is not set | ||
843 | # CONFIG_DVB_DIB7000P is not set | ||
844 | |||
845 | # | ||
846 | # DVB-C (cable) frontends | ||
847 | # | ||
848 | # CONFIG_DVB_VES1820 is not set | ||
849 | # CONFIG_DVB_TDA10021 is not set | ||
850 | # CONFIG_DVB_TDA10023 is not set | ||
851 | # CONFIG_DVB_STV0297 is not set | ||
852 | |||
853 | # | ||
854 | # ATSC (North American/Korean Terrestrial/Cable DTV) frontends | ||
855 | # | ||
856 | # CONFIG_DVB_NXT200X is not set | ||
857 | # CONFIG_DVB_OR51211 is not set | ||
858 | # CONFIG_DVB_OR51132 is not set | ||
859 | # CONFIG_DVB_BCM3510 is not set | ||
860 | # CONFIG_DVB_LGDT330X is not set | ||
861 | |||
862 | # | ||
863 | # Tuners/PLL support | ||
864 | # | ||
865 | # CONFIG_DVB_PLL is not set | ||
866 | # CONFIG_DVB_TDA826X is not set | ||
867 | # CONFIG_DVB_TDA827X is not set | ||
868 | # CONFIG_DVB_TUNER_QT1010 is not set | ||
869 | # CONFIG_DVB_TUNER_MT2060 is not set | ||
870 | |||
871 | # | ||
872 | # Miscellaneous devices | ||
873 | # | ||
874 | # CONFIG_DVB_LNBP21 is not set | ||
875 | # CONFIG_DVB_ISL6421 is not set | ||
876 | # CONFIG_DVB_TUA6100 is not set | ||
877 | CONFIG_DAB=y | ||
878 | # CONFIG_USB_DABUSB is not set | ||
879 | |||
880 | # | ||
881 | # Graphics support | ||
882 | # | ||
883 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
884 | |||
885 | # | ||
886 | # Display device support | ||
887 | # | ||
888 | # CONFIG_DISPLAY_SUPPORT is not set | ||
889 | # CONFIG_VGASTATE is not set | ||
890 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
891 | # CONFIG_FB is not set | ||
892 | # CONFIG_FB_IBM_GXT4500 is not set | ||
893 | |||
894 | # | ||
895 | # Console display driver support | ||
896 | # | ||
897 | CONFIG_VGA_CONSOLE=y | ||
898 | # CONFIG_VGACON_SOFT_SCROLLBACK is not set | ||
899 | CONFIG_DUMMY_CONSOLE=y | ||
900 | |||
901 | # | ||
902 | # Sound | ||
903 | # | ||
904 | CONFIG_SOUND=y | ||
905 | |||
906 | # | ||
907 | # Advanced Linux Sound Architecture | ||
908 | # | ||
909 | CONFIG_SND=y | ||
910 | CONFIG_SND_TIMER=y | ||
911 | CONFIG_SND_PCM=y | ||
912 | # CONFIG_SND_SEQUENCER is not set | ||
913 | # CONFIG_SND_MIXER_OSS is not set | ||
914 | # CONFIG_SND_PCM_OSS is not set | ||
915 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
916 | CONFIG_SND_SUPPORT_OLD_API=y | ||
917 | CONFIG_SND_VERBOSE_PROCFS=y | ||
918 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
919 | # CONFIG_SND_DEBUG is not set | ||
920 | |||
921 | # | ||
922 | # Generic devices | ||
923 | # | ||
924 | CONFIG_SND_AC97_CODEC=y | ||
925 | # CONFIG_SND_DUMMY is not set | ||
926 | # CONFIG_SND_MTPAV is not set | ||
927 | # CONFIG_SND_SERIAL_U16550 is not set | ||
928 | # CONFIG_SND_MPU401 is not set | ||
929 | |||
930 | # | ||
931 | # PCI devices | ||
932 | # | ||
933 | # CONFIG_SND_AD1889 is not set | ||
934 | # CONFIG_SND_ALS300 is not set | ||
935 | # CONFIG_SND_ALS4000 is not set | ||
936 | # CONFIG_SND_ALI5451 is not set | ||
937 | # CONFIG_SND_ATIIXP is not set | ||
938 | # CONFIG_SND_ATIIXP_MODEM is not set | ||
939 | # CONFIG_SND_AU8810 is not set | ||
940 | # CONFIG_SND_AU8820 is not set | ||
941 | # CONFIG_SND_AU8830 is not set | ||
942 | # CONFIG_SND_AZT3328 is not set | ||
943 | # CONFIG_SND_BT87X is not set | ||
944 | # CONFIG_SND_CA0106 is not set | ||
945 | # CONFIG_SND_CMIPCI is not set | ||
946 | # CONFIG_SND_CS4281 is not set | ||
947 | # CONFIG_SND_CS46XX is not set | ||
948 | # CONFIG_SND_CS5530 is not set | ||
949 | # CONFIG_SND_DARLA20 is not set | ||
950 | # CONFIG_SND_GINA20 is not set | ||
951 | # CONFIG_SND_LAYLA20 is not set | ||
952 | # CONFIG_SND_DARLA24 is not set | ||
953 | # CONFIG_SND_GINA24 is not set | ||
954 | # CONFIG_SND_LAYLA24 is not set | ||
955 | # CONFIG_SND_MONA is not set | ||
956 | # CONFIG_SND_MIA is not set | ||
957 | # CONFIG_SND_ECHO3G is not set | ||
958 | # CONFIG_SND_INDIGO is not set | ||
959 | # CONFIG_SND_INDIGOIO is not set | ||
960 | # CONFIG_SND_INDIGODJ is not set | ||
961 | # CONFIG_SND_EMU10K1 is not set | ||
962 | # CONFIG_SND_EMU10K1X is not set | ||
963 | # CONFIG_SND_ENS1370 is not set | ||
964 | # CONFIG_SND_ENS1371 is not set | ||
965 | # CONFIG_SND_ES1938 is not set | ||
966 | # CONFIG_SND_ES1968 is not set | ||
967 | # CONFIG_SND_FM801 is not set | ||
968 | # CONFIG_SND_HDA_INTEL is not set | ||
969 | # CONFIG_SND_HDSP is not set | ||
970 | # CONFIG_SND_HDSPM is not set | ||
971 | # CONFIG_SND_ICE1712 is not set | ||
972 | # CONFIG_SND_ICE1724 is not set | ||
973 | CONFIG_SND_INTEL8X0=y | ||
974 | # CONFIG_SND_INTEL8X0M is not set | ||
975 | # CONFIG_SND_KORG1212 is not set | ||
976 | # CONFIG_SND_MAESTRO3 is not set | ||
977 | # CONFIG_SND_MIXART is not set | ||
978 | # CONFIG_SND_NM256 is not set | ||
979 | # CONFIG_SND_PCXHR is not set | ||
980 | # CONFIG_SND_RIPTIDE is not set | ||
981 | # CONFIG_SND_RME32 is not set | ||
982 | # CONFIG_SND_RME96 is not set | ||
983 | # CONFIG_SND_RME9652 is not set | ||
984 | # CONFIG_SND_SONICVIBES is not set | ||
985 | # CONFIG_SND_TRIDENT is not set | ||
986 | # CONFIG_SND_VIA82XX is not set | ||
987 | # CONFIG_SND_VIA82XX_MODEM is not set | ||
988 | # CONFIG_SND_VX222 is not set | ||
989 | # CONFIG_SND_YMFPCI is not set | ||
990 | # CONFIG_SND_AC97_POWER_SAVE is not set | ||
991 | |||
992 | # | ||
993 | # ALSA PowerMac devices | ||
994 | # | ||
995 | |||
996 | # | ||
997 | # ALSA PowerPC devices | ||
998 | # | ||
999 | |||
1000 | # | ||
1001 | # USB devices | ||
1002 | # | ||
1003 | # CONFIG_SND_USB_AUDIO is not set | ||
1004 | # CONFIG_SND_USB_USX2Y is not set | ||
1005 | # CONFIG_SND_USB_CAIAQ is not set | ||
1006 | |||
1007 | # | ||
1008 | # System on Chip audio support | ||
1009 | # | ||
1010 | # CONFIG_SND_SOC is not set | ||
1011 | |||
1012 | # | ||
1013 | # SoC Audio support for SuperH | ||
1014 | # | ||
1015 | |||
1016 | # | ||
1017 | # Open Sound System | ||
1018 | # | ||
1019 | # CONFIG_SOUND_PRIME is not set | ||
1020 | CONFIG_AC97_BUS=y | ||
1021 | CONFIG_HID_SUPPORT=y | ||
1022 | CONFIG_HID=y | ||
1023 | # CONFIG_HID_DEBUG is not set | ||
1024 | |||
1025 | # | ||
1026 | # USB Input Devices | ||
1027 | # | ||
1028 | CONFIG_USB_HID=y | ||
1029 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1030 | # CONFIG_HID_FF is not set | ||
1031 | # CONFIG_USB_HIDDEV is not set | ||
1032 | CONFIG_USB_SUPPORT=y | ||
1033 | CONFIG_USB_ARCH_HAS_HCD=y | ||
1034 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
1035 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
1036 | CONFIG_USB=y | ||
1037 | # CONFIG_USB_DEBUG is not set | ||
1038 | |||
1039 | # | ||
1040 | # Miscellaneous USB options | ||
1041 | # | ||
1042 | CONFIG_USB_DEVICEFS=y | ||
1043 | CONFIG_USB_DEVICE_CLASS=y | ||
1044 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
1045 | # CONFIG_USB_OTG is not set | ||
1046 | |||
1047 | # | ||
1048 | # USB Host Controller Drivers | ||
1049 | # | ||
1050 | CONFIG_USB_EHCI_HCD=y | ||
1051 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
1052 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
1053 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
1054 | # CONFIG_USB_ISP116X_HCD is not set | ||
1055 | CONFIG_USB_OHCI_HCD=y | ||
1056 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
1057 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
1058 | CONFIG_USB_OHCI_HCD_PPC_OF_LE=y | ||
1059 | CONFIG_USB_OHCI_HCD_PCI=y | ||
1060 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
1061 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
1062 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
1063 | # CONFIG_USB_UHCI_HCD is not set | ||
1064 | # CONFIG_USB_SL811_HCD is not set | ||
1065 | # CONFIG_USB_R8A66597_HCD is not set | ||
1066 | |||
1067 | # | ||
1068 | # USB Device Class drivers | ||
1069 | # | ||
1070 | # CONFIG_USB_ACM is not set | ||
1071 | # CONFIG_USB_PRINTER is not set | ||
1072 | |||
1073 | # | ||
1074 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
1075 | # | ||
1076 | |||
1077 | # | ||
1078 | # may also be needed; see USB_STORAGE Help for more information | ||
1079 | # | ||
1080 | CONFIG_USB_STORAGE=y | ||
1081 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1082 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
1083 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
1084 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1085 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1086 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1087 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1088 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1089 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
1090 | # CONFIG_USB_STORAGE_KARMA is not set | ||
1091 | # CONFIG_USB_LIBUSUAL is not set | ||
1092 | |||
1093 | # | ||
1094 | # USB Imaging devices | ||
1095 | # | ||
1096 | # CONFIG_USB_MDC800 is not set | ||
1097 | # CONFIG_USB_MICROTEK is not set | ||
1098 | CONFIG_USB_MON=y | ||
1099 | |||
1100 | # | ||
1101 | # USB port drivers | ||
1102 | # | ||
1103 | |||
1104 | # | ||
1105 | # USB Serial Converter support | ||
1106 | # | ||
1107 | # CONFIG_USB_SERIAL is not set | ||
1108 | |||
1109 | # | ||
1110 | # USB Miscellaneous drivers | ||
1111 | # | ||
1112 | # CONFIG_USB_EMI62 is not set | ||
1113 | # CONFIG_USB_EMI26 is not set | ||
1114 | # CONFIG_USB_ADUTUX is not set | ||
1115 | # CONFIG_USB_AUERSWALD is not set | ||
1116 | # CONFIG_USB_RIO500 is not set | ||
1117 | # CONFIG_USB_LEGOTOWER is not set | ||
1118 | # CONFIG_USB_LCD is not set | ||
1119 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1120 | # CONFIG_USB_LED is not set | ||
1121 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1122 | # CONFIG_USB_CYTHERM is not set | ||
1123 | # CONFIG_USB_PHIDGET is not set | ||
1124 | # CONFIG_USB_IDMOUSE is not set | ||
1125 | # CONFIG_USB_FTDI_ELAN is not set | ||
1126 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1127 | # CONFIG_USB_SISUSBVGA is not set | ||
1128 | # CONFIG_USB_LD is not set | ||
1129 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1130 | # CONFIG_USB_IOWARRIOR is not set | ||
1131 | # CONFIG_USB_TEST is not set | ||
1132 | |||
1133 | # | ||
1134 | # USB DSL modem support | ||
1135 | # | ||
1136 | |||
1137 | # | ||
1138 | # USB Gadget Support | ||
1139 | # | ||
1140 | # CONFIG_USB_GADGET is not set | ||
1141 | # CONFIG_MMC is not set | ||
1142 | # CONFIG_NEW_LEDS is not set | ||
1143 | # CONFIG_INFINIBAND is not set | ||
1144 | # CONFIG_EDAC is not set | ||
1145 | CONFIG_RTC_LIB=y | ||
1146 | CONFIG_RTC_CLASS=y | ||
1147 | CONFIG_RTC_HCTOSYS=y | ||
1148 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1149 | # CONFIG_RTC_DEBUG is not set | ||
1150 | |||
1151 | # | ||
1152 | # RTC interfaces | ||
1153 | # | ||
1154 | CONFIG_RTC_INTF_SYSFS=y | ||
1155 | CONFIG_RTC_INTF_PROC=y | ||
1156 | CONFIG_RTC_INTF_DEV=y | ||
1157 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
1158 | # CONFIG_RTC_DRV_TEST is not set | ||
1159 | |||
1160 | # | ||
1161 | # I2C RTC drivers | ||
1162 | # | ||
1163 | # CONFIG_RTC_DRV_DS1307 is not set | ||
1164 | # CONFIG_RTC_DRV_DS1672 is not set | ||
1165 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
1166 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
1167 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
1168 | # CONFIG_RTC_DRV_X1205 is not set | ||
1169 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
1170 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
1171 | # CONFIG_RTC_DRV_M41T80 is not set | ||
1172 | |||
1173 | # | ||
1174 | # SPI RTC drivers | ||
1175 | # | ||
1176 | |||
1177 | # | ||
1178 | # Platform RTC drivers | ||
1179 | # | ||
1180 | CONFIG_RTC_DRV_CMOS=y | ||
1181 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1182 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1183 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1184 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1185 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1186 | # CONFIG_RTC_DRV_V3020 is not set | ||
1187 | |||
1188 | # | ||
1189 | # on-CPU RTC drivers | ||
1190 | # | ||
1191 | |||
1192 | # | ||
1193 | # DMA Engine support | ||
1194 | # | ||
1195 | # CONFIG_DMA_ENGINE is not set | ||
1196 | |||
1197 | # | ||
1198 | # DMA Clients | ||
1199 | # | ||
1200 | |||
1201 | # | ||
1202 | # DMA Devices | ||
1203 | # | ||
1204 | |||
1205 | # | ||
1206 | # Userspace I/O | ||
1207 | # | ||
1208 | # CONFIG_UIO is not set | ||
1209 | |||
1210 | # | ||
1211 | # File systems | ||
1212 | # | ||
1213 | CONFIG_EXT2_FS=y | ||
1214 | # CONFIG_EXT2_FS_XATTR is not set | ||
1215 | # CONFIG_EXT2_FS_XIP is not set | ||
1216 | CONFIG_EXT3_FS=y | ||
1217 | CONFIG_EXT3_FS_XATTR=y | ||
1218 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
1219 | # CONFIG_EXT3_FS_SECURITY is not set | ||
1220 | # CONFIG_EXT4DEV_FS is not set | ||
1221 | CONFIG_JBD=y | ||
1222 | # CONFIG_JBD_DEBUG is not set | ||
1223 | CONFIG_FS_MBCACHE=y | ||
1224 | # CONFIG_REISERFS_FS is not set | ||
1225 | # CONFIG_JFS_FS is not set | ||
1226 | # CONFIG_FS_POSIX_ACL is not set | ||
1227 | # CONFIG_XFS_FS is not set | ||
1228 | # CONFIG_GFS2_FS is not set | ||
1229 | # CONFIG_OCFS2_FS is not set | ||
1230 | # CONFIG_MINIX_FS is not set | ||
1231 | # CONFIG_ROMFS_FS is not set | ||
1232 | CONFIG_INOTIFY=y | ||
1233 | CONFIG_INOTIFY_USER=y | ||
1234 | # CONFIG_QUOTA is not set | ||
1235 | CONFIG_DNOTIFY=y | ||
1236 | # CONFIG_AUTOFS_FS is not set | ||
1237 | # CONFIG_AUTOFS4_FS is not set | ||
1238 | # CONFIG_FUSE_FS is not set | ||
1239 | |||
1240 | # | ||
1241 | # CD-ROM/DVD Filesystems | ||
1242 | # | ||
1243 | CONFIG_ISO9660_FS=m | ||
1244 | CONFIG_JOLIET=y | ||
1245 | CONFIG_ZISOFS=y | ||
1246 | CONFIG_UDF_FS=m | ||
1247 | CONFIG_UDF_NLS=y | ||
1248 | |||
1249 | # | ||
1250 | # DOS/FAT/NT Filesystems | ||
1251 | # | ||
1252 | CONFIG_FAT_FS=y | ||
1253 | CONFIG_MSDOS_FS=m | ||
1254 | CONFIG_VFAT_FS=y | ||
1255 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1256 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1257 | CONFIG_NTFS_FS=y | ||
1258 | # CONFIG_NTFS_DEBUG is not set | ||
1259 | # CONFIG_NTFS_RW is not set | ||
1260 | |||
1261 | # | ||
1262 | # Pseudo filesystems | ||
1263 | # | ||
1264 | CONFIG_PROC_FS=y | ||
1265 | CONFIG_PROC_KCORE=y | ||
1266 | CONFIG_PROC_SYSCTL=y | ||
1267 | CONFIG_SYSFS=y | ||
1268 | CONFIG_TMPFS=y | ||
1269 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1270 | # CONFIG_HUGETLB_PAGE is not set | ||
1271 | CONFIG_RAMFS=y | ||
1272 | # CONFIG_CONFIGFS_FS is not set | ||
1273 | |||
1274 | # | ||
1275 | # Miscellaneous filesystems | ||
1276 | # | ||
1277 | CONFIG_ADFS_FS=m | ||
1278 | # CONFIG_ADFS_FS_RW is not set | ||
1279 | CONFIG_AFFS_FS=m | ||
1280 | CONFIG_HFS_FS=m | ||
1281 | CONFIG_HFSPLUS_FS=m | ||
1282 | CONFIG_BEFS_FS=m | ||
1283 | # CONFIG_BEFS_DEBUG is not set | ||
1284 | CONFIG_BFS_FS=m | ||
1285 | CONFIG_EFS_FS=m | ||
1286 | CONFIG_CRAMFS=y | ||
1287 | CONFIG_VXFS_FS=m | ||
1288 | CONFIG_HPFS_FS=m | ||
1289 | CONFIG_QNX4FS_FS=m | ||
1290 | CONFIG_SYSV_FS=m | ||
1291 | CONFIG_UFS_FS=m | ||
1292 | # CONFIG_UFS_FS_WRITE is not set | ||
1293 | # CONFIG_UFS_DEBUG is not set | ||
1294 | |||
1295 | # | ||
1296 | # Network File Systems | ||
1297 | # | ||
1298 | CONFIG_NFS_FS=y | ||
1299 | CONFIG_NFS_V3=y | ||
1300 | # CONFIG_NFS_V3_ACL is not set | ||
1301 | CONFIG_NFS_V4=y | ||
1302 | # CONFIG_NFS_DIRECTIO is not set | ||
1303 | CONFIG_NFSD=y | ||
1304 | # CONFIG_NFSD_V3 is not set | ||
1305 | CONFIG_NFSD_TCP=y | ||
1306 | CONFIG_ROOT_NFS=y | ||
1307 | CONFIG_LOCKD=y | ||
1308 | CONFIG_LOCKD_V4=y | ||
1309 | CONFIG_EXPORTFS=y | ||
1310 | CONFIG_NFS_COMMON=y | ||
1311 | CONFIG_SUNRPC=y | ||
1312 | CONFIG_SUNRPC_GSS=y | ||
1313 | # CONFIG_SUNRPC_BIND34 is not set | ||
1314 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1315 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1316 | # CONFIG_SMB_FS is not set | ||
1317 | # CONFIG_CIFS is not set | ||
1318 | # CONFIG_NCP_FS is not set | ||
1319 | # CONFIG_CODA_FS is not set | ||
1320 | # CONFIG_AFS_FS is not set | ||
1321 | |||
1322 | # | ||
1323 | # Partition Types | ||
1324 | # | ||
1325 | CONFIG_PARTITION_ADVANCED=y | ||
1326 | # CONFIG_ACORN_PARTITION is not set | ||
1327 | # CONFIG_OSF_PARTITION is not set | ||
1328 | # CONFIG_AMIGA_PARTITION is not set | ||
1329 | # CONFIG_ATARI_PARTITION is not set | ||
1330 | CONFIG_MAC_PARTITION=y | ||
1331 | CONFIG_MSDOS_PARTITION=y | ||
1332 | # CONFIG_BSD_DISKLABEL is not set | ||
1333 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1334 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1335 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1336 | # CONFIG_LDM_PARTITION is not set | ||
1337 | # CONFIG_SGI_PARTITION is not set | ||
1338 | # CONFIG_ULTRIX_PARTITION is not set | ||
1339 | # CONFIG_SUN_PARTITION is not set | ||
1340 | # CONFIG_KARMA_PARTITION is not set | ||
1341 | # CONFIG_EFI_PARTITION is not set | ||
1342 | # CONFIG_SYSV68_PARTITION is not set | ||
1343 | |||
1344 | # | ||
1345 | # Native Language Support | ||
1346 | # | ||
1347 | CONFIG_NLS=y | ||
1348 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1349 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1350 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1351 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1352 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1353 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1354 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1355 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1356 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1357 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1358 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1359 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1360 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1361 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1362 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1363 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1364 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1365 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1366 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1367 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1368 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1369 | # CONFIG_NLS_ISO8859_8 is not set | ||
1370 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1371 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1372 | # CONFIG_NLS_ASCII is not set | ||
1373 | # CONFIG_NLS_ISO8859_1 is not set | ||
1374 | # CONFIG_NLS_ISO8859_2 is not set | ||
1375 | # CONFIG_NLS_ISO8859_3 is not set | ||
1376 | # CONFIG_NLS_ISO8859_4 is not set | ||
1377 | # CONFIG_NLS_ISO8859_5 is not set | ||
1378 | # CONFIG_NLS_ISO8859_6 is not set | ||
1379 | # CONFIG_NLS_ISO8859_7 is not set | ||
1380 | # CONFIG_NLS_ISO8859_9 is not set | ||
1381 | # CONFIG_NLS_ISO8859_13 is not set | ||
1382 | # CONFIG_NLS_ISO8859_14 is not set | ||
1383 | # CONFIG_NLS_ISO8859_15 is not set | ||
1384 | # CONFIG_NLS_KOI8_R is not set | ||
1385 | # CONFIG_NLS_KOI8_U is not set | ||
1386 | CONFIG_NLS_UTF8=m | ||
1387 | |||
1388 | # | ||
1389 | # Distributed Lock Manager | ||
1390 | # | ||
1391 | # CONFIG_DLM is not set | ||
1392 | # CONFIG_UCC_SLOW is not set | ||
1393 | |||
1394 | # | ||
1395 | # Library routines | ||
1396 | # | ||
1397 | CONFIG_BITREVERSE=y | ||
1398 | # CONFIG_CRC_CCITT is not set | ||
1399 | # CONFIG_CRC16 is not set | ||
1400 | # CONFIG_CRC_ITU_T is not set | ||
1401 | CONFIG_CRC32=y | ||
1402 | # CONFIG_CRC7 is not set | ||
1403 | CONFIG_LIBCRC32C=m | ||
1404 | CONFIG_ZLIB_INFLATE=y | ||
1405 | CONFIG_PLIST=y | ||
1406 | CONFIG_HAS_IOMEM=y | ||
1407 | CONFIG_HAS_IOPORT=y | ||
1408 | CONFIG_HAS_DMA=y | ||
1409 | |||
1410 | # | ||
1411 | # Instrumentation Support | ||
1412 | # | ||
1413 | # CONFIG_PROFILING is not set | ||
1414 | |||
1415 | # | ||
1416 | # Kernel hacking | ||
1417 | # | ||
1418 | # CONFIG_PRINTK_TIME is not set | ||
1419 | CONFIG_ENABLE_MUST_CHECK=y | ||
1420 | # CONFIG_MAGIC_SYSRQ is not set | ||
1421 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1422 | # CONFIG_DEBUG_FS is not set | ||
1423 | # CONFIG_HEADERS_CHECK is not set | ||
1424 | CONFIG_DEBUG_KERNEL=y | ||
1425 | # CONFIG_DEBUG_SHIRQ is not set | ||
1426 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1427 | CONFIG_SCHED_DEBUG=y | ||
1428 | # CONFIG_SCHEDSTATS is not set | ||
1429 | # CONFIG_TIMER_STATS is not set | ||
1430 | # CONFIG_DEBUG_SLAB is not set | ||
1431 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1432 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1433 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1434 | # CONFIG_DEBUG_MUTEXES is not set | ||
1435 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1436 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1437 | # CONFIG_DEBUG_KOBJECT is not set | ||
1438 | # CONFIG_DEBUG_HIGHMEM is not set | ||
1439 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1440 | CONFIG_DEBUG_INFO=y | ||
1441 | # CONFIG_DEBUG_VM is not set | ||
1442 | # CONFIG_DEBUG_LIST is not set | ||
1443 | CONFIG_FORCED_INLINING=y | ||
1444 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1445 | # CONFIG_FAULT_INJECTION is not set | ||
1446 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1447 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1448 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
1449 | # CONFIG_DEBUGGER is not set | ||
1450 | # CONFIG_BDI_SWITCH is not set | ||
1451 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1452 | |||
1453 | # | ||
1454 | # Security options | ||
1455 | # | ||
1456 | # CONFIG_KEYS is not set | ||
1457 | # CONFIG_SECURITY is not set | ||
1458 | CONFIG_CRYPTO=y | ||
1459 | CONFIG_CRYPTO_ALGAPI=y | ||
1460 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1461 | CONFIG_CRYPTO_HASH=y | ||
1462 | CONFIG_CRYPTO_MANAGER=y | ||
1463 | CONFIG_CRYPTO_HMAC=y | ||
1464 | # CONFIG_CRYPTO_XCBC is not set | ||
1465 | # CONFIG_CRYPTO_NULL is not set | ||
1466 | # CONFIG_CRYPTO_MD4 is not set | ||
1467 | CONFIG_CRYPTO_MD5=y | ||
1468 | # CONFIG_CRYPTO_SHA1 is not set | ||
1469 | # CONFIG_CRYPTO_SHA256 is not set | ||
1470 | # CONFIG_CRYPTO_SHA512 is not set | ||
1471 | # CONFIG_CRYPTO_WP512 is not set | ||
1472 | # CONFIG_CRYPTO_TGR192 is not set | ||
1473 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1474 | # CONFIG_CRYPTO_ECB is not set | ||
1475 | CONFIG_CRYPTO_CBC=y | ||
1476 | CONFIG_CRYPTO_PCBC=m | ||
1477 | # CONFIG_CRYPTO_LRW is not set | ||
1478 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1479 | CONFIG_CRYPTO_DES=y | ||
1480 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1481 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1482 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1483 | # CONFIG_CRYPTO_SERPENT is not set | ||
1484 | # CONFIG_CRYPTO_AES is not set | ||
1485 | # CONFIG_CRYPTO_CAST5 is not set | ||
1486 | # CONFIG_CRYPTO_CAST6 is not set | ||
1487 | # CONFIG_CRYPTO_TEA is not set | ||
1488 | # CONFIG_CRYPTO_ARC4 is not set | ||
1489 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1490 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1491 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1492 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1493 | # CONFIG_CRYPTO_CRC32C is not set | ||
1494 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1495 | # CONFIG_CRYPTO_TEST is not set | ||
1496 | CONFIG_CRYPTO_HW=y | ||
diff --git a/arch/powerpc/configs/sequoia_defconfig b/arch/powerpc/configs/sequoia_defconfig new file mode 100644 index 000000000000..bc7f5089a894 --- /dev/null +++ b/arch/powerpc/configs/sequoia_defconfig | |||
@@ -0,0 +1,861 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23-rc6 | ||
4 | # Fri Sep 14 13:20:06 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | # CONFIG_40x is not set | ||
15 | CONFIG_44x=y | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_PPC_FPU=y | ||
18 | CONFIG_4xx=y | ||
19 | CONFIG_BOOKE=y | ||
20 | CONFIG_PTE_64BIT=y | ||
21 | CONFIG_PHYS_64BIT=y | ||
22 | # CONFIG_PPC_MM_SLICES is not set | ||
23 | CONFIG_NOT_COHERENT_CACHE=y | ||
24 | CONFIG_PPC32=y | ||
25 | CONFIG_PPC_MERGE=y | ||
26 | CONFIG_MMU=y | ||
27 | CONFIG_GENERIC_HARDIRQS=y | ||
28 | CONFIG_IRQ_PER_CPU=y | ||
29 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
30 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
31 | CONFIG_GENERIC_HWEIGHT=y | ||
32 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
33 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
34 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
35 | CONFIG_PPC=y | ||
36 | CONFIG_EARLY_PRINTK=y | ||
37 | CONFIG_GENERIC_NVRAM=y | ||
38 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
39 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
40 | CONFIG_PPC_OF=y | ||
41 | CONFIG_OF=y | ||
42 | CONFIG_PPC_UDBG_16550=y | ||
43 | # CONFIG_GENERIC_TBSYNC is not set | ||
44 | CONFIG_AUDIT_ARCH=y | ||
45 | CONFIG_GENERIC_BUG=y | ||
46 | # CONFIG_DEFAULT_UIMAGE is not set | ||
47 | CONFIG_PPC_DCR_NATIVE=y | ||
48 | # CONFIG_PPC_DCR_MMIO is not set | ||
49 | CONFIG_PPC_DCR=y | ||
50 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
51 | |||
52 | # | ||
53 | # General setup | ||
54 | # | ||
55 | CONFIG_EXPERIMENTAL=y | ||
56 | CONFIG_BROKEN_ON_SMP=y | ||
57 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
58 | CONFIG_LOCALVERSION="" | ||
59 | CONFIG_LOCALVERSION_AUTO=y | ||
60 | CONFIG_SWAP=y | ||
61 | CONFIG_SYSVIPC=y | ||
62 | CONFIG_SYSVIPC_SYSCTL=y | ||
63 | CONFIG_POSIX_MQUEUE=y | ||
64 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
65 | # CONFIG_TASKSTATS is not set | ||
66 | # CONFIG_USER_NS is not set | ||
67 | # CONFIG_AUDIT is not set | ||
68 | # CONFIG_IKCONFIG is not set | ||
69 | CONFIG_LOG_BUF_SHIFT=14 | ||
70 | CONFIG_SYSFS_DEPRECATED=y | ||
71 | # CONFIG_RELAY is not set | ||
72 | CONFIG_BLK_DEV_INITRD=y | ||
73 | CONFIG_INITRAMFS_SOURCE="" | ||
74 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
75 | CONFIG_SYSCTL=y | ||
76 | CONFIG_EMBEDDED=y | ||
77 | CONFIG_SYSCTL_SYSCALL=y | ||
78 | CONFIG_KALLSYMS=y | ||
79 | # CONFIG_KALLSYMS_ALL is not set | ||
80 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
81 | CONFIG_HOTPLUG=y | ||
82 | CONFIG_PRINTK=y | ||
83 | CONFIG_BUG=y | ||
84 | CONFIG_ELF_CORE=y | ||
85 | CONFIG_BASE_FULL=y | ||
86 | CONFIG_FUTEX=y | ||
87 | CONFIG_ANON_INODES=y | ||
88 | CONFIG_EPOLL=y | ||
89 | CONFIG_SIGNALFD=y | ||
90 | CONFIG_TIMERFD=y | ||
91 | CONFIG_EVENTFD=y | ||
92 | CONFIG_SHMEM=y | ||
93 | CONFIG_VM_EVENT_COUNTERS=y | ||
94 | CONFIG_SLAB=y | ||
95 | # CONFIG_SLUB is not set | ||
96 | # CONFIG_SLOB is not set | ||
97 | CONFIG_RT_MUTEXES=y | ||
98 | # CONFIG_TINY_SHMEM is not set | ||
99 | CONFIG_BASE_SMALL=0 | ||
100 | CONFIG_MODULES=y | ||
101 | CONFIG_MODULE_UNLOAD=y | ||
102 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
103 | # CONFIG_MODVERSIONS is not set | ||
104 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
105 | CONFIG_KMOD=y | ||
106 | CONFIG_BLOCK=y | ||
107 | CONFIG_LBD=y | ||
108 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
109 | # CONFIG_LSF is not set | ||
110 | # CONFIG_BLK_DEV_BSG is not set | ||
111 | |||
112 | # | ||
113 | # IO Schedulers | ||
114 | # | ||
115 | CONFIG_IOSCHED_NOOP=y | ||
116 | CONFIG_IOSCHED_AS=y | ||
117 | CONFIG_IOSCHED_DEADLINE=y | ||
118 | CONFIG_IOSCHED_CFQ=y | ||
119 | CONFIG_DEFAULT_AS=y | ||
120 | # CONFIG_DEFAULT_DEADLINE is not set | ||
121 | # CONFIG_DEFAULT_CFQ is not set | ||
122 | # CONFIG_DEFAULT_NOOP is not set | ||
123 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
124 | |||
125 | # | ||
126 | # Platform support | ||
127 | # | ||
128 | # CONFIG_PPC_MPC52xx is not set | ||
129 | # CONFIG_PPC_MPC5200 is not set | ||
130 | # CONFIG_PPC_CELL is not set | ||
131 | # CONFIG_PPC_CELL_NATIVE is not set | ||
132 | # CONFIG_PQ2ADS is not set | ||
133 | # CONFIG_BAMBOO is not set | ||
134 | # CONFIG_EBONY is not set | ||
135 | CONFIG_SEQUOIA=y | ||
136 | CONFIG_440EPX=y | ||
137 | CONFIG_440A=y | ||
138 | # CONFIG_MPIC is not set | ||
139 | # CONFIG_MPIC_WEIRD is not set | ||
140 | # CONFIG_PPC_I8259 is not set | ||
141 | # CONFIG_PPC_RTAS is not set | ||
142 | # CONFIG_MMIO_NVRAM is not set | ||
143 | # CONFIG_PPC_MPC106 is not set | ||
144 | # CONFIG_PPC_970_NAP is not set | ||
145 | # CONFIG_PPC_INDIRECT_IO is not set | ||
146 | # CONFIG_GENERIC_IOMAP is not set | ||
147 | # CONFIG_CPU_FREQ is not set | ||
148 | # CONFIG_CPM2 is not set | ||
149 | # CONFIG_FSL_ULI1575 is not set | ||
150 | |||
151 | # | ||
152 | # Kernel options | ||
153 | # | ||
154 | # CONFIG_HIGHMEM is not set | ||
155 | # CONFIG_HZ_100 is not set | ||
156 | CONFIG_HZ_250=y | ||
157 | # CONFIG_HZ_300 is not set | ||
158 | # CONFIG_HZ_1000 is not set | ||
159 | CONFIG_HZ=250 | ||
160 | CONFIG_PREEMPT_NONE=y | ||
161 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
162 | # CONFIG_PREEMPT is not set | ||
163 | CONFIG_BINFMT_ELF=y | ||
164 | # CONFIG_BINFMT_MISC is not set | ||
165 | # CONFIG_MATH_EMULATION is not set | ||
166 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
167 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
168 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
169 | CONFIG_SELECT_MEMORY_MODEL=y | ||
170 | CONFIG_FLATMEM_MANUAL=y | ||
171 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
172 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
173 | CONFIG_FLATMEM=y | ||
174 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
175 | # CONFIG_SPARSEMEM_STATIC is not set | ||
176 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
177 | CONFIG_RESOURCES_64BIT=y | ||
178 | CONFIG_ZONE_DMA_FLAG=1 | ||
179 | CONFIG_BOUNCE=y | ||
180 | CONFIG_VIRT_TO_BUS=y | ||
181 | CONFIG_PROC_DEVICETREE=y | ||
182 | CONFIG_CMDLINE_BOOL=y | ||
183 | CONFIG_CMDLINE="" | ||
184 | CONFIG_SECCOMP=y | ||
185 | CONFIG_WANT_DEVICE_TREE=y | ||
186 | CONFIG_DEVICE_TREE="sequoia.dts" | ||
187 | CONFIG_ISA_DMA_API=y | ||
188 | |||
189 | # | ||
190 | # Bus options | ||
191 | # | ||
192 | CONFIG_ZONE_DMA=y | ||
193 | CONFIG_PPC_INDIRECT_PCI=y | ||
194 | CONFIG_PCI=y | ||
195 | CONFIG_PCI_DOMAINS=y | ||
196 | CONFIG_PCI_SYSCALL=y | ||
197 | # CONFIG_PCIEPORTBUS is not set | ||
198 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
199 | # CONFIG_PCI_MSI is not set | ||
200 | # CONFIG_PCI_DEBUG is not set | ||
201 | |||
202 | # | ||
203 | # PCCARD (PCMCIA/CardBus) support | ||
204 | # | ||
205 | # CONFIG_PCCARD is not set | ||
206 | # CONFIG_HOTPLUG_PCI is not set | ||
207 | |||
208 | # | ||
209 | # Advanced setup | ||
210 | # | ||
211 | # CONFIG_ADVANCED_OPTIONS is not set | ||
212 | |||
213 | # | ||
214 | # Default settings for advanced configuration options are used | ||
215 | # | ||
216 | CONFIG_HIGHMEM_START=0xfe000000 | ||
217 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
218 | CONFIG_KERNEL_START=0xc0000000 | ||
219 | CONFIG_TASK_SIZE=0x80000000 | ||
220 | CONFIG_CONSISTENT_START=0xff100000 | ||
221 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
222 | CONFIG_BOOT_LOAD=0x01000000 | ||
223 | |||
224 | # | ||
225 | # Networking | ||
226 | # | ||
227 | CONFIG_NET=y | ||
228 | |||
229 | # | ||
230 | # Networking options | ||
231 | # | ||
232 | CONFIG_PACKET=y | ||
233 | # CONFIG_PACKET_MMAP is not set | ||
234 | CONFIG_UNIX=y | ||
235 | # CONFIG_NET_KEY is not set | ||
236 | CONFIG_INET=y | ||
237 | # CONFIG_IP_MULTICAST is not set | ||
238 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
239 | CONFIG_IP_FIB_HASH=y | ||
240 | CONFIG_IP_PNP=y | ||
241 | CONFIG_IP_PNP_DHCP=y | ||
242 | CONFIG_IP_PNP_BOOTP=y | ||
243 | # CONFIG_IP_PNP_RARP is not set | ||
244 | # CONFIG_NET_IPIP is not set | ||
245 | # CONFIG_NET_IPGRE is not set | ||
246 | # CONFIG_ARPD is not set | ||
247 | # CONFIG_SYN_COOKIES is not set | ||
248 | # CONFIG_INET_AH is not set | ||
249 | # CONFIG_INET_ESP is not set | ||
250 | # CONFIG_INET_IPCOMP is not set | ||
251 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
252 | # CONFIG_INET_TUNNEL is not set | ||
253 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
254 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
255 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
256 | CONFIG_INET_DIAG=y | ||
257 | CONFIG_INET_TCP_DIAG=y | ||
258 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
259 | CONFIG_TCP_CONG_CUBIC=y | ||
260 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
261 | # CONFIG_TCP_MD5SIG is not set | ||
262 | # CONFIG_IPV6 is not set | ||
263 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
264 | # CONFIG_INET6_TUNNEL is not set | ||
265 | # CONFIG_NETWORK_SECMARK is not set | ||
266 | # CONFIG_NETFILTER is not set | ||
267 | # CONFIG_IP_DCCP is not set | ||
268 | # CONFIG_IP_SCTP is not set | ||
269 | # CONFIG_TIPC is not set | ||
270 | # CONFIG_ATM is not set | ||
271 | # CONFIG_BRIDGE is not set | ||
272 | # CONFIG_VLAN_8021Q is not set | ||
273 | # CONFIG_DECNET is not set | ||
274 | # CONFIG_LLC2 is not set | ||
275 | # CONFIG_IPX is not set | ||
276 | # CONFIG_ATALK is not set | ||
277 | # CONFIG_X25 is not set | ||
278 | # CONFIG_LAPB is not set | ||
279 | # CONFIG_ECONET is not set | ||
280 | # CONFIG_WAN_ROUTER is not set | ||
281 | |||
282 | # | ||
283 | # QoS and/or fair queueing | ||
284 | # | ||
285 | # CONFIG_NET_SCHED is not set | ||
286 | |||
287 | # | ||
288 | # Network testing | ||
289 | # | ||
290 | # CONFIG_NET_PKTGEN is not set | ||
291 | # CONFIG_HAMRADIO is not set | ||
292 | # CONFIG_IRDA is not set | ||
293 | # CONFIG_BT is not set | ||
294 | # CONFIG_AF_RXRPC is not set | ||
295 | |||
296 | # | ||
297 | # Wireless | ||
298 | # | ||
299 | # CONFIG_CFG80211 is not set | ||
300 | # CONFIG_WIRELESS_EXT is not set | ||
301 | # CONFIG_MAC80211 is not set | ||
302 | # CONFIG_IEEE80211 is not set | ||
303 | # CONFIG_RFKILL is not set | ||
304 | # CONFIG_NET_9P is not set | ||
305 | |||
306 | # | ||
307 | # Device Drivers | ||
308 | # | ||
309 | |||
310 | # | ||
311 | # Generic Driver Options | ||
312 | # | ||
313 | CONFIG_STANDALONE=y | ||
314 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
315 | CONFIG_FW_LOADER=y | ||
316 | # CONFIG_DEBUG_DRIVER is not set | ||
317 | # CONFIG_DEBUG_DEVRES is not set | ||
318 | # CONFIG_SYS_HYPERVISOR is not set | ||
319 | CONFIG_CONNECTOR=y | ||
320 | CONFIG_PROC_EVENTS=y | ||
321 | CONFIG_MTD=y | ||
322 | # CONFIG_MTD_DEBUG is not set | ||
323 | # CONFIG_MTD_CONCAT is not set | ||
324 | CONFIG_MTD_PARTITIONS=y | ||
325 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
326 | CONFIG_MTD_CMDLINE_PARTS=y | ||
327 | |||
328 | # | ||
329 | # User Modules And Translation Layers | ||
330 | # | ||
331 | CONFIG_MTD_CHAR=y | ||
332 | # CONFIG_MTD_BLKDEVS is not set | ||
333 | # CONFIG_MTD_BLOCK is not set | ||
334 | # CONFIG_MTD_BLOCK_RO is not set | ||
335 | # CONFIG_FTL is not set | ||
336 | # CONFIG_NFTL is not set | ||
337 | # CONFIG_INFTL is not set | ||
338 | # CONFIG_RFD_FTL is not set | ||
339 | # CONFIG_SSFDC is not set | ||
340 | |||
341 | # | ||
342 | # RAM/ROM/Flash chip drivers | ||
343 | # | ||
344 | CONFIG_MTD_CFI=y | ||
345 | CONFIG_MTD_JEDECPROBE=y | ||
346 | CONFIG_MTD_GEN_PROBE=y | ||
347 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
348 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
349 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
350 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
351 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
352 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
353 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
354 | CONFIG_MTD_CFI_I1=y | ||
355 | CONFIG_MTD_CFI_I2=y | ||
356 | # CONFIG_MTD_CFI_I4 is not set | ||
357 | # CONFIG_MTD_CFI_I8 is not set | ||
358 | CONFIG_MTD_CFI_INTELEXT=y | ||
359 | CONFIG_MTD_CFI_AMDSTD=y | ||
360 | # CONFIG_MTD_CFI_STAA is not set | ||
361 | CONFIG_MTD_CFI_UTIL=y | ||
362 | # CONFIG_MTD_RAM is not set | ||
363 | # CONFIG_MTD_ROM is not set | ||
364 | # CONFIG_MTD_ABSENT is not set | ||
365 | |||
366 | # | ||
367 | # Mapping drivers for chip access | ||
368 | # | ||
369 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
370 | # CONFIG_MTD_PHYSMAP is not set | ||
371 | CONFIG_MTD_PHYSMAP_OF=y | ||
372 | # CONFIG_MTD_PLATRAM is not set | ||
373 | |||
374 | # | ||
375 | # Self-contained MTD device drivers | ||
376 | # | ||
377 | # CONFIG_MTD_PMC551 is not set | ||
378 | # CONFIG_MTD_SLRAM is not set | ||
379 | # CONFIG_MTD_PHRAM is not set | ||
380 | # CONFIG_MTD_MTDRAM is not set | ||
381 | # CONFIG_MTD_BLOCK2MTD is not set | ||
382 | |||
383 | # | ||
384 | # Disk-On-Chip Device Drivers | ||
385 | # | ||
386 | # CONFIG_MTD_DOC2000 is not set | ||
387 | # CONFIG_MTD_DOC2001 is not set | ||
388 | # CONFIG_MTD_DOC2001PLUS is not set | ||
389 | # CONFIG_MTD_NAND is not set | ||
390 | # CONFIG_MTD_ONENAND is not set | ||
391 | |||
392 | # | ||
393 | # UBI - Unsorted block images | ||
394 | # | ||
395 | # CONFIG_MTD_UBI is not set | ||
396 | CONFIG_OF_DEVICE=y | ||
397 | # CONFIG_PARPORT is not set | ||
398 | CONFIG_BLK_DEV=y | ||
399 | # CONFIG_BLK_DEV_FD is not set | ||
400 | # CONFIG_BLK_CPQ_DA is not set | ||
401 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
402 | # CONFIG_BLK_DEV_DAC960 is not set | ||
403 | # CONFIG_BLK_DEV_UMEM is not set | ||
404 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
405 | # CONFIG_BLK_DEV_LOOP is not set | ||
406 | # CONFIG_BLK_DEV_NBD is not set | ||
407 | # CONFIG_BLK_DEV_SX8 is not set | ||
408 | CONFIG_BLK_DEV_RAM=y | ||
409 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
410 | CONFIG_BLK_DEV_RAM_SIZE=35000 | ||
411 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
412 | # CONFIG_CDROM_PKTCDVD is not set | ||
413 | # CONFIG_ATA_OVER_ETH is not set | ||
414 | # CONFIG_XILINX_SYSACE is not set | ||
415 | CONFIG_MISC_DEVICES=y | ||
416 | # CONFIG_PHANTOM is not set | ||
417 | # CONFIG_EEPROM_93CX6 is not set | ||
418 | # CONFIG_SGI_IOC4 is not set | ||
419 | # CONFIG_TIFM_CORE is not set | ||
420 | # CONFIG_IDE is not set | ||
421 | |||
422 | # | ||
423 | # SCSI device support | ||
424 | # | ||
425 | # CONFIG_RAID_ATTRS is not set | ||
426 | # CONFIG_SCSI is not set | ||
427 | # CONFIG_SCSI_DMA is not set | ||
428 | # CONFIG_SCSI_NETLINK is not set | ||
429 | # CONFIG_ATA is not set | ||
430 | # CONFIG_MD is not set | ||
431 | |||
432 | # | ||
433 | # Fusion MPT device support | ||
434 | # | ||
435 | # CONFIG_FUSION is not set | ||
436 | |||
437 | # | ||
438 | # IEEE 1394 (FireWire) support | ||
439 | # | ||
440 | # CONFIG_FIREWIRE is not set | ||
441 | # CONFIG_IEEE1394 is not set | ||
442 | # CONFIG_I2O is not set | ||
443 | CONFIG_MACINTOSH_DRIVERS=y | ||
444 | # CONFIG_MAC_EMUMOUSEBTN is not set | ||
445 | # CONFIG_WINDFARM is not set | ||
446 | CONFIG_NETDEVICES=y | ||
447 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
448 | # CONFIG_DUMMY is not set | ||
449 | # CONFIG_BONDING is not set | ||
450 | # CONFIG_MACVLAN is not set | ||
451 | # CONFIG_EQUALIZER is not set | ||
452 | # CONFIG_TUN is not set | ||
453 | # CONFIG_ARCNET is not set | ||
454 | # CONFIG_NET_ETHERNET is not set | ||
455 | CONFIG_NETDEV_1000=y | ||
456 | # CONFIG_ACENIC is not set | ||
457 | # CONFIG_DL2K is not set | ||
458 | # CONFIG_E1000 is not set | ||
459 | # CONFIG_NS83820 is not set | ||
460 | # CONFIG_HAMACHI is not set | ||
461 | # CONFIG_YELLOWFIN is not set | ||
462 | # CONFIG_R8169 is not set | ||
463 | # CONFIG_SIS190 is not set | ||
464 | # CONFIG_SKGE is not set | ||
465 | # CONFIG_SKY2 is not set | ||
466 | # CONFIG_VIA_VELOCITY is not set | ||
467 | # CONFIG_TIGON3 is not set | ||
468 | # CONFIG_BNX2 is not set | ||
469 | # CONFIG_QLA3XXX is not set | ||
470 | # CONFIG_ATL1 is not set | ||
471 | CONFIG_NETDEV_10000=y | ||
472 | # CONFIG_CHELSIO_T1 is not set | ||
473 | # CONFIG_CHELSIO_T3 is not set | ||
474 | # CONFIG_IXGB is not set | ||
475 | # CONFIG_S2IO is not set | ||
476 | # CONFIG_MYRI10GE is not set | ||
477 | # CONFIG_NETXEN_NIC is not set | ||
478 | # CONFIG_MLX4_CORE is not set | ||
479 | # CONFIG_TR is not set | ||
480 | |||
481 | # | ||
482 | # Wireless LAN | ||
483 | # | ||
484 | # CONFIG_WLAN_PRE80211 is not set | ||
485 | # CONFIG_WLAN_80211 is not set | ||
486 | # CONFIG_WAN is not set | ||
487 | # CONFIG_FDDI is not set | ||
488 | # CONFIG_HIPPI is not set | ||
489 | # CONFIG_PPP is not set | ||
490 | # CONFIG_SLIP is not set | ||
491 | # CONFIG_SHAPER is not set | ||
492 | # CONFIG_NETCONSOLE is not set | ||
493 | # CONFIG_NETPOLL is not set | ||
494 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
495 | # CONFIG_ISDN is not set | ||
496 | # CONFIG_PHONE is not set | ||
497 | |||
498 | # | ||
499 | # Input device support | ||
500 | # | ||
501 | # CONFIG_INPUT is not set | ||
502 | |||
503 | # | ||
504 | # Hardware I/O ports | ||
505 | # | ||
506 | # CONFIG_SERIO is not set | ||
507 | # CONFIG_GAMEPORT is not set | ||
508 | |||
509 | # | ||
510 | # Character devices | ||
511 | # | ||
512 | # CONFIG_VT is not set | ||
513 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
514 | |||
515 | # | ||
516 | # Serial drivers | ||
517 | # | ||
518 | CONFIG_SERIAL_8250=y | ||
519 | CONFIG_SERIAL_8250_CONSOLE=y | ||
520 | # CONFIG_SERIAL_8250_PCI is not set | ||
521 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
522 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
523 | CONFIG_SERIAL_8250_EXTENDED=y | ||
524 | # CONFIG_SERIAL_8250_MANY_PORTS is not set | ||
525 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
526 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
527 | # CONFIG_SERIAL_8250_RSA is not set | ||
528 | |||
529 | # | ||
530 | # Non-8250 serial port support | ||
531 | # | ||
532 | # CONFIG_SERIAL_UARTLITE is not set | ||
533 | CONFIG_SERIAL_CORE=y | ||
534 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
535 | # CONFIG_SERIAL_JSM is not set | ||
536 | CONFIG_SERIAL_OF_PLATFORM=y | ||
537 | CONFIG_UNIX98_PTYS=y | ||
538 | CONFIG_LEGACY_PTYS=y | ||
539 | CONFIG_LEGACY_PTY_COUNT=256 | ||
540 | # CONFIG_IPMI_HANDLER is not set | ||
541 | # CONFIG_WATCHDOG is not set | ||
542 | # CONFIG_HW_RANDOM is not set | ||
543 | # CONFIG_NVRAM is not set | ||
544 | # CONFIG_GEN_RTC is not set | ||
545 | # CONFIG_R3964 is not set | ||
546 | # CONFIG_APPLICOM is not set | ||
547 | # CONFIG_AGP is not set | ||
548 | # CONFIG_DRM is not set | ||
549 | # CONFIG_RAW_DRIVER is not set | ||
550 | # CONFIG_TCG_TPM is not set | ||
551 | CONFIG_DEVPORT=y | ||
552 | # CONFIG_I2C is not set | ||
553 | |||
554 | # | ||
555 | # SPI support | ||
556 | # | ||
557 | # CONFIG_SPI is not set | ||
558 | # CONFIG_SPI_MASTER is not set | ||
559 | # CONFIG_W1 is not set | ||
560 | # CONFIG_POWER_SUPPLY is not set | ||
561 | # CONFIG_HWMON is not set | ||
562 | |||
563 | # | ||
564 | # Multifunction device drivers | ||
565 | # | ||
566 | # CONFIG_MFD_SM501 is not set | ||
567 | |||
568 | # | ||
569 | # Multimedia devices | ||
570 | # | ||
571 | # CONFIG_VIDEO_DEV is not set | ||
572 | # CONFIG_DVB_CORE is not set | ||
573 | CONFIG_DAB=y | ||
574 | |||
575 | # | ||
576 | # Graphics support | ||
577 | # | ||
578 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
579 | |||
580 | # | ||
581 | # Display device support | ||
582 | # | ||
583 | # CONFIG_DISPLAY_SUPPORT is not set | ||
584 | # CONFIG_VGASTATE is not set | ||
585 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
586 | # CONFIG_FB is not set | ||
587 | # CONFIG_FB_IBM_GXT4500 is not set | ||
588 | |||
589 | # | ||
590 | # Sound | ||
591 | # | ||
592 | # CONFIG_SOUND is not set | ||
593 | CONFIG_USB_SUPPORT=y | ||
594 | CONFIG_USB_ARCH_HAS_HCD=y | ||
595 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
596 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
597 | # CONFIG_USB is not set | ||
598 | |||
599 | # | ||
600 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
601 | # | ||
602 | |||
603 | # | ||
604 | # USB Gadget Support | ||
605 | # | ||
606 | # CONFIG_USB_GADGET is not set | ||
607 | # CONFIG_MMC is not set | ||
608 | # CONFIG_NEW_LEDS is not set | ||
609 | # CONFIG_INFINIBAND is not set | ||
610 | # CONFIG_EDAC is not set | ||
611 | # CONFIG_RTC_CLASS is not set | ||
612 | |||
613 | # | ||
614 | # DMA Engine support | ||
615 | # | ||
616 | # CONFIG_DMA_ENGINE is not set | ||
617 | |||
618 | # | ||
619 | # DMA Clients | ||
620 | # | ||
621 | |||
622 | # | ||
623 | # DMA Devices | ||
624 | # | ||
625 | |||
626 | # | ||
627 | # Userspace I/O | ||
628 | # | ||
629 | # CONFIG_UIO is not set | ||
630 | |||
631 | # | ||
632 | # File systems | ||
633 | # | ||
634 | CONFIG_EXT2_FS=y | ||
635 | # CONFIG_EXT2_FS_XATTR is not set | ||
636 | # CONFIG_EXT2_FS_XIP is not set | ||
637 | # CONFIG_EXT3_FS is not set | ||
638 | # CONFIG_EXT4DEV_FS is not set | ||
639 | # CONFIG_REISERFS_FS is not set | ||
640 | # CONFIG_JFS_FS is not set | ||
641 | # CONFIG_FS_POSIX_ACL is not set | ||
642 | # CONFIG_XFS_FS is not set | ||
643 | # CONFIG_GFS2_FS is not set | ||
644 | # CONFIG_OCFS2_FS is not set | ||
645 | # CONFIG_MINIX_FS is not set | ||
646 | # CONFIG_ROMFS_FS is not set | ||
647 | CONFIG_INOTIFY=y | ||
648 | CONFIG_INOTIFY_USER=y | ||
649 | # CONFIG_QUOTA is not set | ||
650 | CONFIG_DNOTIFY=y | ||
651 | # CONFIG_AUTOFS_FS is not set | ||
652 | # CONFIG_AUTOFS4_FS is not set | ||
653 | # CONFIG_FUSE_FS is not set | ||
654 | |||
655 | # | ||
656 | # CD-ROM/DVD Filesystems | ||
657 | # | ||
658 | # CONFIG_ISO9660_FS is not set | ||
659 | # CONFIG_UDF_FS is not set | ||
660 | |||
661 | # | ||
662 | # DOS/FAT/NT Filesystems | ||
663 | # | ||
664 | # CONFIG_MSDOS_FS is not set | ||
665 | # CONFIG_VFAT_FS is not set | ||
666 | # CONFIG_NTFS_FS is not set | ||
667 | |||
668 | # | ||
669 | # Pseudo filesystems | ||
670 | # | ||
671 | CONFIG_PROC_FS=y | ||
672 | CONFIG_PROC_KCORE=y | ||
673 | CONFIG_PROC_SYSCTL=y | ||
674 | CONFIG_SYSFS=y | ||
675 | CONFIG_TMPFS=y | ||
676 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
677 | # CONFIG_HUGETLB_PAGE is not set | ||
678 | CONFIG_RAMFS=y | ||
679 | # CONFIG_CONFIGFS_FS is not set | ||
680 | |||
681 | # | ||
682 | # Miscellaneous filesystems | ||
683 | # | ||
684 | # CONFIG_ADFS_FS is not set | ||
685 | # CONFIG_AFFS_FS is not set | ||
686 | # CONFIG_HFS_FS is not set | ||
687 | # CONFIG_HFSPLUS_FS is not set | ||
688 | # CONFIG_BEFS_FS is not set | ||
689 | # CONFIG_BFS_FS is not set | ||
690 | # CONFIG_EFS_FS is not set | ||
691 | CONFIG_JFFS2_FS=y | ||
692 | CONFIG_JFFS2_FS_DEBUG=0 | ||
693 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
694 | # CONFIG_JFFS2_SUMMARY is not set | ||
695 | # CONFIG_JFFS2_FS_XATTR is not set | ||
696 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
697 | CONFIG_JFFS2_ZLIB=y | ||
698 | CONFIG_JFFS2_RTIME=y | ||
699 | # CONFIG_JFFS2_RUBIN is not set | ||
700 | CONFIG_CRAMFS=y | ||
701 | # CONFIG_VXFS_FS is not set | ||
702 | # CONFIG_HPFS_FS is not set | ||
703 | # CONFIG_QNX4FS_FS is not set | ||
704 | # CONFIG_SYSV_FS is not set | ||
705 | # CONFIG_UFS_FS is not set | ||
706 | |||
707 | # | ||
708 | # Network File Systems | ||
709 | # | ||
710 | CONFIG_NFS_FS=y | ||
711 | CONFIG_NFS_V3=y | ||
712 | # CONFIG_NFS_V3_ACL is not set | ||
713 | # CONFIG_NFS_V4 is not set | ||
714 | # CONFIG_NFS_DIRECTIO is not set | ||
715 | # CONFIG_NFSD is not set | ||
716 | CONFIG_ROOT_NFS=y | ||
717 | CONFIG_LOCKD=y | ||
718 | CONFIG_LOCKD_V4=y | ||
719 | CONFIG_NFS_COMMON=y | ||
720 | CONFIG_SUNRPC=y | ||
721 | # CONFIG_SUNRPC_BIND34 is not set | ||
722 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
723 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
724 | # CONFIG_SMB_FS is not set | ||
725 | # CONFIG_CIFS is not set | ||
726 | # CONFIG_NCP_FS is not set | ||
727 | # CONFIG_CODA_FS is not set | ||
728 | # CONFIG_AFS_FS is not set | ||
729 | |||
730 | # | ||
731 | # Partition Types | ||
732 | # | ||
733 | # CONFIG_PARTITION_ADVANCED is not set | ||
734 | CONFIG_MSDOS_PARTITION=y | ||
735 | |||
736 | # | ||
737 | # Native Language Support | ||
738 | # | ||
739 | # CONFIG_NLS is not set | ||
740 | |||
741 | # | ||
742 | # Distributed Lock Manager | ||
743 | # | ||
744 | # CONFIG_DLM is not set | ||
745 | # CONFIG_UCC_SLOW is not set | ||
746 | |||
747 | # | ||
748 | # Library routines | ||
749 | # | ||
750 | CONFIG_BITREVERSE=y | ||
751 | # CONFIG_CRC_CCITT is not set | ||
752 | # CONFIG_CRC16 is not set | ||
753 | # CONFIG_CRC_ITU_T is not set | ||
754 | CONFIG_CRC32=y | ||
755 | # CONFIG_CRC7 is not set | ||
756 | # CONFIG_LIBCRC32C is not set | ||
757 | CONFIG_ZLIB_INFLATE=y | ||
758 | CONFIG_ZLIB_DEFLATE=y | ||
759 | CONFIG_PLIST=y | ||
760 | CONFIG_HAS_IOMEM=y | ||
761 | CONFIG_HAS_IOPORT=y | ||
762 | CONFIG_HAS_DMA=y | ||
763 | |||
764 | # | ||
765 | # Instrumentation Support | ||
766 | # | ||
767 | # CONFIG_PROFILING is not set | ||
768 | |||
769 | # | ||
770 | # Kernel hacking | ||
771 | # | ||
772 | # CONFIG_PRINTK_TIME is not set | ||
773 | CONFIG_ENABLE_MUST_CHECK=y | ||
774 | CONFIG_MAGIC_SYSRQ=y | ||
775 | # CONFIG_UNUSED_SYMBOLS is not set | ||
776 | # CONFIG_DEBUG_FS is not set | ||
777 | # CONFIG_HEADERS_CHECK is not set | ||
778 | CONFIG_DEBUG_KERNEL=y | ||
779 | # CONFIG_DEBUG_SHIRQ is not set | ||
780 | CONFIG_DETECT_SOFTLOCKUP=y | ||
781 | CONFIG_SCHED_DEBUG=y | ||
782 | # CONFIG_SCHEDSTATS is not set | ||
783 | # CONFIG_TIMER_STATS is not set | ||
784 | # CONFIG_DEBUG_SLAB is not set | ||
785 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
786 | # CONFIG_RT_MUTEX_TESTER is not set | ||
787 | # CONFIG_DEBUG_SPINLOCK is not set | ||
788 | # CONFIG_DEBUG_MUTEXES is not set | ||
789 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
790 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
791 | # CONFIG_DEBUG_KOBJECT is not set | ||
792 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
793 | # CONFIG_DEBUG_INFO is not set | ||
794 | # CONFIG_DEBUG_VM is not set | ||
795 | # CONFIG_DEBUG_LIST is not set | ||
796 | CONFIG_FORCED_INLINING=y | ||
797 | # CONFIG_RCU_TORTURE_TEST is not set | ||
798 | # CONFIG_FAULT_INJECTION is not set | ||
799 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
800 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
801 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
802 | CONFIG_DEBUGGER=y | ||
803 | # CONFIG_KGDB is not set | ||
804 | # CONFIG_XMON is not set | ||
805 | # CONFIG_BDI_SWITCH is not set | ||
806 | CONFIG_PPC_EARLY_DEBUG=y | ||
807 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | ||
808 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
809 | # CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set | ||
810 | # CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set | ||
811 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
812 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
813 | # CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set | ||
814 | # CONFIG_PPC_EARLY_DEBUG_BEAT is not set | ||
815 | CONFIG_PPC_EARLY_DEBUG_44x=y | ||
816 | CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300 | ||
817 | CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1 | ||
818 | |||
819 | # | ||
820 | # Security options | ||
821 | # | ||
822 | # CONFIG_KEYS is not set | ||
823 | # CONFIG_SECURITY is not set | ||
824 | CONFIG_CRYPTO=y | ||
825 | CONFIG_CRYPTO_ALGAPI=y | ||
826 | CONFIG_CRYPTO_BLKCIPHER=y | ||
827 | CONFIG_CRYPTO_MANAGER=y | ||
828 | # CONFIG_CRYPTO_HMAC is not set | ||
829 | # CONFIG_CRYPTO_XCBC is not set | ||
830 | # CONFIG_CRYPTO_NULL is not set | ||
831 | # CONFIG_CRYPTO_MD4 is not set | ||
832 | CONFIG_CRYPTO_MD5=y | ||
833 | # CONFIG_CRYPTO_SHA1 is not set | ||
834 | # CONFIG_CRYPTO_SHA256 is not set | ||
835 | # CONFIG_CRYPTO_SHA512 is not set | ||
836 | # CONFIG_CRYPTO_WP512 is not set | ||
837 | # CONFIG_CRYPTO_TGR192 is not set | ||
838 | # CONFIG_CRYPTO_GF128MUL is not set | ||
839 | CONFIG_CRYPTO_ECB=y | ||
840 | CONFIG_CRYPTO_CBC=y | ||
841 | CONFIG_CRYPTO_PCBC=y | ||
842 | # CONFIG_CRYPTO_LRW is not set | ||
843 | # CONFIG_CRYPTO_CRYPTD is not set | ||
844 | CONFIG_CRYPTO_DES=y | ||
845 | # CONFIG_CRYPTO_FCRYPT is not set | ||
846 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
847 | # CONFIG_CRYPTO_TWOFISH is not set | ||
848 | # CONFIG_CRYPTO_SERPENT is not set | ||
849 | # CONFIG_CRYPTO_AES is not set | ||
850 | # CONFIG_CRYPTO_CAST5 is not set | ||
851 | # CONFIG_CRYPTO_CAST6 is not set | ||
852 | # CONFIG_CRYPTO_TEA is not set | ||
853 | # CONFIG_CRYPTO_ARC4 is not set | ||
854 | # CONFIG_CRYPTO_KHAZAD is not set | ||
855 | # CONFIG_CRYPTO_ANUBIS is not set | ||
856 | # CONFIG_CRYPTO_DEFLATE is not set | ||
857 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
858 | # CONFIG_CRYPTO_CRC32C is not set | ||
859 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
860 | # CONFIG_CRYPTO_TEST is not set | ||
861 | CONFIG_CRYPTO_HW=y | ||
diff --git a/arch/powerpc/configs/walnut_defconfig b/arch/powerpc/configs/walnut_defconfig new file mode 100644 index 000000000000..766bf840c18d --- /dev/null +++ b/arch/powerpc/configs/walnut_defconfig | |||
@@ -0,0 +1,773 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23-rc4 | ||
4 | # Wed Sep 5 12:06:37 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | # CONFIG_PPC_8xx is not set | ||
14 | CONFIG_40x=y | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_4xx=y | ||
18 | # CONFIG_PPC_MM_SLICES is not set | ||
19 | CONFIG_NOT_COHERENT_CACHE=y | ||
20 | CONFIG_PPC32=y | ||
21 | CONFIG_PPC_MERGE=y | ||
22 | CONFIG_MMU=y | ||
23 | CONFIG_GENERIC_HARDIRQS=y | ||
24 | CONFIG_IRQ_PER_CPU=y | ||
25 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
26 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
27 | CONFIG_GENERIC_HWEIGHT=y | ||
28 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
29 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
30 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
31 | CONFIG_PPC=y | ||
32 | CONFIG_EARLY_PRINTK=y | ||
33 | CONFIG_GENERIC_NVRAM=y | ||
34 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
35 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
36 | CONFIG_PPC_OF=y | ||
37 | CONFIG_OF=y | ||
38 | # CONFIG_PPC_UDBG_16550 is not set | ||
39 | # CONFIG_GENERIC_TBSYNC is not set | ||
40 | CONFIG_AUDIT_ARCH=y | ||
41 | CONFIG_GENERIC_BUG=y | ||
42 | # CONFIG_DEFAULT_UIMAGE is not set | ||
43 | CONFIG_PPC_DCR_NATIVE=y | ||
44 | # CONFIG_PPC_DCR_MMIO is not set | ||
45 | CONFIG_PPC_DCR=y | ||
46 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
47 | |||
48 | # | ||
49 | # General setup | ||
50 | # | ||
51 | CONFIG_EXPERIMENTAL=y | ||
52 | CONFIG_BROKEN_ON_SMP=y | ||
53 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
54 | CONFIG_LOCALVERSION="" | ||
55 | CONFIG_LOCALVERSION_AUTO=y | ||
56 | CONFIG_SWAP=y | ||
57 | CONFIG_SYSVIPC=y | ||
58 | CONFIG_SYSVIPC_SYSCTL=y | ||
59 | CONFIG_POSIX_MQUEUE=y | ||
60 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
61 | # CONFIG_TASKSTATS is not set | ||
62 | # CONFIG_USER_NS is not set | ||
63 | # CONFIG_AUDIT is not set | ||
64 | # CONFIG_IKCONFIG is not set | ||
65 | CONFIG_LOG_BUF_SHIFT=14 | ||
66 | CONFIG_SYSFS_DEPRECATED=y | ||
67 | # CONFIG_RELAY is not set | ||
68 | CONFIG_BLK_DEV_INITRD=y | ||
69 | CONFIG_INITRAMFS_SOURCE="" | ||
70 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
71 | CONFIG_SYSCTL=y | ||
72 | CONFIG_EMBEDDED=y | ||
73 | CONFIG_SYSCTL_SYSCALL=y | ||
74 | CONFIG_KALLSYMS=y | ||
75 | CONFIG_KALLSYMS_ALL=y | ||
76 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
77 | CONFIG_HOTPLUG=y | ||
78 | CONFIG_PRINTK=y | ||
79 | CONFIG_BUG=y | ||
80 | CONFIG_ELF_CORE=y | ||
81 | CONFIG_BASE_FULL=y | ||
82 | CONFIG_FUTEX=y | ||
83 | CONFIG_ANON_INODES=y | ||
84 | CONFIG_EPOLL=y | ||
85 | CONFIG_SIGNALFD=y | ||
86 | CONFIG_TIMERFD=y | ||
87 | CONFIG_EVENTFD=y | ||
88 | CONFIG_SHMEM=y | ||
89 | CONFIG_VM_EVENT_COUNTERS=y | ||
90 | CONFIG_SLAB=y | ||
91 | # CONFIG_SLUB is not set | ||
92 | # CONFIG_SLOB is not set | ||
93 | CONFIG_RT_MUTEXES=y | ||
94 | # CONFIG_TINY_SHMEM is not set | ||
95 | CONFIG_BASE_SMALL=0 | ||
96 | CONFIG_MODULES=y | ||
97 | CONFIG_MODULE_UNLOAD=y | ||
98 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
99 | # CONFIG_MODVERSIONS is not set | ||
100 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
101 | CONFIG_KMOD=y | ||
102 | CONFIG_BLOCK=y | ||
103 | CONFIG_LBD=y | ||
104 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
105 | # CONFIG_LSF is not set | ||
106 | # CONFIG_BLK_DEV_BSG is not set | ||
107 | |||
108 | # | ||
109 | # IO Schedulers | ||
110 | # | ||
111 | CONFIG_IOSCHED_NOOP=y | ||
112 | CONFIG_IOSCHED_AS=y | ||
113 | CONFIG_IOSCHED_DEADLINE=y | ||
114 | CONFIG_IOSCHED_CFQ=y | ||
115 | CONFIG_DEFAULT_AS=y | ||
116 | # CONFIG_DEFAULT_DEADLINE is not set | ||
117 | # CONFIG_DEFAULT_CFQ is not set | ||
118 | # CONFIG_DEFAULT_NOOP is not set | ||
119 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
120 | |||
121 | # | ||
122 | # Platform support | ||
123 | # | ||
124 | # CONFIG_PPC_MPC52xx is not set | ||
125 | # CONFIG_PPC_MPC5200 is not set | ||
126 | # CONFIG_PPC_CELL is not set | ||
127 | # CONFIG_PPC_CELL_NATIVE is not set | ||
128 | # CONFIG_PQ2ADS is not set | ||
129 | CONFIG_WALNUT=y | ||
130 | CONFIG_405GP=y | ||
131 | CONFIG_IBM405_ERR77=y | ||
132 | CONFIG_IBM405_ERR51=y | ||
133 | # CONFIG_MPIC is not set | ||
134 | # CONFIG_MPIC_WEIRD is not set | ||
135 | # CONFIG_PPC_I8259 is not set | ||
136 | # CONFIG_PPC_RTAS is not set | ||
137 | # CONFIG_MMIO_NVRAM is not set | ||
138 | # CONFIG_PPC_MPC106 is not set | ||
139 | # CONFIG_PPC_970_NAP is not set | ||
140 | # CONFIG_PPC_INDIRECT_IO is not set | ||
141 | # CONFIG_GENERIC_IOMAP is not set | ||
142 | # CONFIG_CPU_FREQ is not set | ||
143 | # CONFIG_CPM2 is not set | ||
144 | # CONFIG_FSL_ULI1575 is not set | ||
145 | |||
146 | # | ||
147 | # Kernel options | ||
148 | # | ||
149 | # CONFIG_HIGHMEM is not set | ||
150 | # CONFIG_HZ_100 is not set | ||
151 | CONFIG_HZ_250=y | ||
152 | # CONFIG_HZ_300 is not set | ||
153 | # CONFIG_HZ_1000 is not set | ||
154 | CONFIG_HZ=250 | ||
155 | CONFIG_PREEMPT_NONE=y | ||
156 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
157 | # CONFIG_PREEMPT is not set | ||
158 | CONFIG_BINFMT_ELF=y | ||
159 | # CONFIG_BINFMT_MISC is not set | ||
160 | # CONFIG_MATH_EMULATION is not set | ||
161 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
162 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
163 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
164 | CONFIG_SELECT_MEMORY_MODEL=y | ||
165 | CONFIG_FLATMEM_MANUAL=y | ||
166 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
167 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
168 | CONFIG_FLATMEM=y | ||
169 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
170 | # CONFIG_SPARSEMEM_STATIC is not set | ||
171 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
172 | CONFIG_RESOURCES_64BIT=y | ||
173 | CONFIG_ZONE_DMA_FLAG=1 | ||
174 | CONFIG_BOUNCE=y | ||
175 | CONFIG_VIRT_TO_BUS=y | ||
176 | CONFIG_PROC_DEVICETREE=y | ||
177 | # CONFIG_CMDLINE_BOOL is not set | ||
178 | # CONFIG_PM is not set | ||
179 | CONFIG_SECCOMP=y | ||
180 | CONFIG_WANT_DEVICE_TREE=y | ||
181 | CONFIG_DEVICE_TREE="walnut.dts" | ||
182 | CONFIG_ISA_DMA_API=y | ||
183 | |||
184 | # | ||
185 | # Bus options | ||
186 | # | ||
187 | CONFIG_ZONE_DMA=y | ||
188 | # CONFIG_PCI is not set | ||
189 | # CONFIG_PCI_DOMAINS is not set | ||
190 | # CONFIG_PCI_SYSCALL is not set | ||
191 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
192 | |||
193 | # | ||
194 | # PCCARD (PCMCIA/CardBus) support | ||
195 | # | ||
196 | # CONFIG_PCCARD is not set | ||
197 | |||
198 | # | ||
199 | # Advanced setup | ||
200 | # | ||
201 | # CONFIG_ADVANCED_OPTIONS is not set | ||
202 | |||
203 | # | ||
204 | # Default settings for advanced configuration options are used | ||
205 | # | ||
206 | CONFIG_HIGHMEM_START=0xfe000000 | ||
207 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
208 | CONFIG_KERNEL_START=0xc0000000 | ||
209 | CONFIG_TASK_SIZE=0x80000000 | ||
210 | CONFIG_CONSISTENT_START=0xff100000 | ||
211 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
212 | CONFIG_BOOT_LOAD=0x00400000 | ||
213 | |||
214 | # | ||
215 | # Networking | ||
216 | # | ||
217 | CONFIG_NET=y | ||
218 | |||
219 | # | ||
220 | # Networking options | ||
221 | # | ||
222 | CONFIG_PACKET=y | ||
223 | # CONFIG_PACKET_MMAP is not set | ||
224 | CONFIG_UNIX=y | ||
225 | # CONFIG_NET_KEY is not set | ||
226 | CONFIG_INET=y | ||
227 | # CONFIG_IP_MULTICAST is not set | ||
228 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
229 | CONFIG_IP_FIB_HASH=y | ||
230 | CONFIG_IP_PNP=y | ||
231 | CONFIG_IP_PNP_DHCP=y | ||
232 | CONFIG_IP_PNP_BOOTP=y | ||
233 | # CONFIG_IP_PNP_RARP is not set | ||
234 | # CONFIG_NET_IPIP is not set | ||
235 | # CONFIG_NET_IPGRE is not set | ||
236 | # CONFIG_ARPD is not set | ||
237 | # CONFIG_SYN_COOKIES is not set | ||
238 | # CONFIG_INET_AH is not set | ||
239 | # CONFIG_INET_ESP is not set | ||
240 | # CONFIG_INET_IPCOMP is not set | ||
241 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
242 | # CONFIG_INET_TUNNEL is not set | ||
243 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
244 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
245 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
246 | CONFIG_INET_DIAG=y | ||
247 | CONFIG_INET_TCP_DIAG=y | ||
248 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
249 | CONFIG_TCP_CONG_CUBIC=y | ||
250 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
251 | # CONFIG_TCP_MD5SIG is not set | ||
252 | # CONFIG_IPV6 is not set | ||
253 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
254 | # CONFIG_INET6_TUNNEL is not set | ||
255 | # CONFIG_NETWORK_SECMARK is not set | ||
256 | # CONFIG_NETFILTER is not set | ||
257 | # CONFIG_IP_DCCP is not set | ||
258 | # CONFIG_IP_SCTP is not set | ||
259 | # CONFIG_TIPC is not set | ||
260 | # CONFIG_ATM is not set | ||
261 | # CONFIG_BRIDGE is not set | ||
262 | # CONFIG_VLAN_8021Q is not set | ||
263 | # CONFIG_DECNET is not set | ||
264 | # CONFIG_LLC2 is not set | ||
265 | # CONFIG_IPX is not set | ||
266 | # CONFIG_ATALK is not set | ||
267 | # CONFIG_X25 is not set | ||
268 | # CONFIG_LAPB is not set | ||
269 | # CONFIG_ECONET is not set | ||
270 | # CONFIG_WAN_ROUTER is not set | ||
271 | |||
272 | # | ||
273 | # QoS and/or fair queueing | ||
274 | # | ||
275 | # CONFIG_NET_SCHED is not set | ||
276 | |||
277 | # | ||
278 | # Network testing | ||
279 | # | ||
280 | # CONFIG_NET_PKTGEN is not set | ||
281 | # CONFIG_HAMRADIO is not set | ||
282 | # CONFIG_IRDA is not set | ||
283 | # CONFIG_BT is not set | ||
284 | # CONFIG_AF_RXRPC is not set | ||
285 | |||
286 | # | ||
287 | # Wireless | ||
288 | # | ||
289 | # CONFIG_CFG80211 is not set | ||
290 | # CONFIG_WIRELESS_EXT is not set | ||
291 | # CONFIG_MAC80211 is not set | ||
292 | # CONFIG_IEEE80211 is not set | ||
293 | # CONFIG_RFKILL is not set | ||
294 | # CONFIG_NET_9P is not set | ||
295 | |||
296 | # | ||
297 | # Device Drivers | ||
298 | # | ||
299 | |||
300 | # | ||
301 | # Generic Driver Options | ||
302 | # | ||
303 | CONFIG_STANDALONE=y | ||
304 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
305 | CONFIG_FW_LOADER=y | ||
306 | # CONFIG_DEBUG_DRIVER is not set | ||
307 | # CONFIG_DEBUG_DEVRES is not set | ||
308 | # CONFIG_SYS_HYPERVISOR is not set | ||
309 | CONFIG_CONNECTOR=y | ||
310 | CONFIG_PROC_EVENTS=y | ||
311 | CONFIG_MTD=y | ||
312 | # CONFIG_MTD_DEBUG is not set | ||
313 | # CONFIG_MTD_CONCAT is not set | ||
314 | CONFIG_MTD_PARTITIONS=y | ||
315 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
316 | CONFIG_MTD_CMDLINE_PARTS=y | ||
317 | |||
318 | # | ||
319 | # User Modules And Translation Layers | ||
320 | # | ||
321 | CONFIG_MTD_CHAR=y | ||
322 | CONFIG_MTD_BLKDEVS=m | ||
323 | CONFIG_MTD_BLOCK=m | ||
324 | # CONFIG_MTD_BLOCK_RO is not set | ||
325 | # CONFIG_FTL is not set | ||
326 | # CONFIG_NFTL is not set | ||
327 | # CONFIG_INFTL is not set | ||
328 | # CONFIG_RFD_FTL is not set | ||
329 | # CONFIG_SSFDC is not set | ||
330 | |||
331 | # | ||
332 | # RAM/ROM/Flash chip drivers | ||
333 | # | ||
334 | CONFIG_MTD_CFI=y | ||
335 | CONFIG_MTD_JEDECPROBE=y | ||
336 | CONFIG_MTD_GEN_PROBE=y | ||
337 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
338 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
339 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
340 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
341 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
342 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
343 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
344 | CONFIG_MTD_CFI_I1=y | ||
345 | CONFIG_MTD_CFI_I2=y | ||
346 | # CONFIG_MTD_CFI_I4 is not set | ||
347 | # CONFIG_MTD_CFI_I8 is not set | ||
348 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
349 | CONFIG_MTD_CFI_AMDSTD=y | ||
350 | # CONFIG_MTD_CFI_STAA is not set | ||
351 | CONFIG_MTD_CFI_UTIL=y | ||
352 | # CONFIG_MTD_RAM is not set | ||
353 | # CONFIG_MTD_ROM is not set | ||
354 | # CONFIG_MTD_ABSENT is not set | ||
355 | |||
356 | # | ||
357 | # Mapping drivers for chip access | ||
358 | # | ||
359 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
360 | # CONFIG_MTD_PHYSMAP is not set | ||
361 | CONFIG_MTD_PHYSMAP_OF=y | ||
362 | # CONFIG_MTD_WALNUT is not set | ||
363 | # CONFIG_MTD_PLATRAM is not set | ||
364 | |||
365 | # | ||
366 | # Self-contained MTD device drivers | ||
367 | # | ||
368 | # CONFIG_MTD_SLRAM is not set | ||
369 | # CONFIG_MTD_PHRAM is not set | ||
370 | # CONFIG_MTD_MTDRAM is not set | ||
371 | # CONFIG_MTD_BLOCK2MTD is not set | ||
372 | |||
373 | # | ||
374 | # Disk-On-Chip Device Drivers | ||
375 | # | ||
376 | # CONFIG_MTD_DOC2000 is not set | ||
377 | # CONFIG_MTD_DOC2001 is not set | ||
378 | # CONFIG_MTD_DOC2001PLUS is not set | ||
379 | # CONFIG_MTD_NAND is not set | ||
380 | # CONFIG_MTD_ONENAND is not set | ||
381 | |||
382 | # | ||
383 | # UBI - Unsorted block images | ||
384 | # | ||
385 | # CONFIG_MTD_UBI is not set | ||
386 | CONFIG_OF_DEVICE=y | ||
387 | # CONFIG_PARPORT is not set | ||
388 | CONFIG_BLK_DEV=y | ||
389 | # CONFIG_BLK_DEV_FD is not set | ||
390 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
391 | # CONFIG_BLK_DEV_LOOP is not set | ||
392 | # CONFIG_BLK_DEV_NBD is not set | ||
393 | CONFIG_BLK_DEV_RAM=y | ||
394 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
395 | CONFIG_BLK_DEV_RAM_SIZE=35000 | ||
396 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
397 | # CONFIG_CDROM_PKTCDVD is not set | ||
398 | # CONFIG_ATA_OVER_ETH is not set | ||
399 | # CONFIG_XILINX_SYSACE is not set | ||
400 | CONFIG_MISC_DEVICES=y | ||
401 | # CONFIG_EEPROM_93CX6 is not set | ||
402 | # CONFIG_IDE is not set | ||
403 | |||
404 | # | ||
405 | # SCSI device support | ||
406 | # | ||
407 | # CONFIG_RAID_ATTRS is not set | ||
408 | # CONFIG_SCSI is not set | ||
409 | # CONFIG_SCSI_DMA is not set | ||
410 | # CONFIG_SCSI_NETLINK is not set | ||
411 | # CONFIG_ATA is not set | ||
412 | # CONFIG_MD is not set | ||
413 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
414 | CONFIG_NETDEVICES=y | ||
415 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
416 | # CONFIG_DUMMY is not set | ||
417 | # CONFIG_BONDING is not set | ||
418 | # CONFIG_MACVLAN is not set | ||
419 | # CONFIG_EQUALIZER is not set | ||
420 | # CONFIG_TUN is not set | ||
421 | # CONFIG_NET_ETHERNET is not set | ||
422 | CONFIG_NETDEV_1000=y | ||
423 | CONFIG_NETDEV_10000=y | ||
424 | |||
425 | # | ||
426 | # Wireless LAN | ||
427 | # | ||
428 | # CONFIG_WLAN_PRE80211 is not set | ||
429 | # CONFIG_WLAN_80211 is not set | ||
430 | # CONFIG_WAN is not set | ||
431 | # CONFIG_PPP is not set | ||
432 | # CONFIG_SLIP is not set | ||
433 | # CONFIG_SHAPER is not set | ||
434 | # CONFIG_NETCONSOLE is not set | ||
435 | # CONFIG_NETPOLL is not set | ||
436 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
437 | # CONFIG_ISDN is not set | ||
438 | # CONFIG_PHONE is not set | ||
439 | |||
440 | # | ||
441 | # Input device support | ||
442 | # | ||
443 | # CONFIG_INPUT is not set | ||
444 | |||
445 | # | ||
446 | # Hardware I/O ports | ||
447 | # | ||
448 | # CONFIG_SERIO is not set | ||
449 | # CONFIG_GAMEPORT is not set | ||
450 | |||
451 | # | ||
452 | # Character devices | ||
453 | # | ||
454 | # CONFIG_VT is not set | ||
455 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
456 | |||
457 | # | ||
458 | # Serial drivers | ||
459 | # | ||
460 | CONFIG_SERIAL_8250=y | ||
461 | CONFIG_SERIAL_8250_CONSOLE=y | ||
462 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
463 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
464 | CONFIG_SERIAL_8250_EXTENDED=y | ||
465 | # CONFIG_SERIAL_8250_MANY_PORTS is not set | ||
466 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
467 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
468 | # CONFIG_SERIAL_8250_RSA is not set | ||
469 | |||
470 | # | ||
471 | # Non-8250 serial port support | ||
472 | # | ||
473 | # CONFIG_SERIAL_UARTLITE is not set | ||
474 | CONFIG_SERIAL_CORE=y | ||
475 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
476 | CONFIG_SERIAL_OF_PLATFORM=y | ||
477 | CONFIG_UNIX98_PTYS=y | ||
478 | CONFIG_LEGACY_PTYS=y | ||
479 | CONFIG_LEGACY_PTY_COUNT=256 | ||
480 | # CONFIG_IPMI_HANDLER is not set | ||
481 | # CONFIG_WATCHDOG is not set | ||
482 | # CONFIG_HW_RANDOM is not set | ||
483 | # CONFIG_NVRAM is not set | ||
484 | # CONFIG_GEN_RTC is not set | ||
485 | # CONFIG_R3964 is not set | ||
486 | # CONFIG_RAW_DRIVER is not set | ||
487 | # CONFIG_TCG_TPM is not set | ||
488 | # CONFIG_I2C is not set | ||
489 | |||
490 | # | ||
491 | # SPI support | ||
492 | # | ||
493 | # CONFIG_SPI is not set | ||
494 | # CONFIG_SPI_MASTER is not set | ||
495 | # CONFIG_W1 is not set | ||
496 | # CONFIG_POWER_SUPPLY is not set | ||
497 | # CONFIG_HWMON is not set | ||
498 | |||
499 | # | ||
500 | # Multifunction device drivers | ||
501 | # | ||
502 | # CONFIG_MFD_SM501 is not set | ||
503 | |||
504 | # | ||
505 | # Multimedia devices | ||
506 | # | ||
507 | # CONFIG_VIDEO_DEV is not set | ||
508 | # CONFIG_DVB_CORE is not set | ||
509 | # CONFIG_DAB is not set | ||
510 | |||
511 | # | ||
512 | # Graphics support | ||
513 | # | ||
514 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
515 | |||
516 | # | ||
517 | # Display device support | ||
518 | # | ||
519 | # CONFIG_DISPLAY_SUPPORT is not set | ||
520 | # CONFIG_VGASTATE is not set | ||
521 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
522 | # CONFIG_FB is not set | ||
523 | # CONFIG_FB_IBM_GXT4500 is not set | ||
524 | |||
525 | # | ||
526 | # Sound | ||
527 | # | ||
528 | # CONFIG_SOUND is not set | ||
529 | CONFIG_USB_SUPPORT=y | ||
530 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
531 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
532 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
533 | |||
534 | # | ||
535 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
536 | # | ||
537 | |||
538 | # | ||
539 | # USB Gadget Support | ||
540 | # | ||
541 | # CONFIG_USB_GADGET is not set | ||
542 | # CONFIG_MMC is not set | ||
543 | # CONFIG_NEW_LEDS is not set | ||
544 | # CONFIG_EDAC is not set | ||
545 | # CONFIG_RTC_CLASS is not set | ||
546 | |||
547 | # | ||
548 | # DMA Engine support | ||
549 | # | ||
550 | # CONFIG_DMA_ENGINE is not set | ||
551 | |||
552 | # | ||
553 | # DMA Clients | ||
554 | # | ||
555 | |||
556 | # | ||
557 | # DMA Devices | ||
558 | # | ||
559 | |||
560 | # | ||
561 | # Userspace I/O | ||
562 | # | ||
563 | # CONFIG_UIO is not set | ||
564 | |||
565 | # | ||
566 | # File systems | ||
567 | # | ||
568 | CONFIG_EXT2_FS=y | ||
569 | # CONFIG_EXT2_FS_XATTR is not set | ||
570 | # CONFIG_EXT2_FS_XIP is not set | ||
571 | # CONFIG_EXT3_FS is not set | ||
572 | # CONFIG_EXT4DEV_FS is not set | ||
573 | # CONFIG_REISERFS_FS is not set | ||
574 | # CONFIG_JFS_FS is not set | ||
575 | # CONFIG_FS_POSIX_ACL is not set | ||
576 | # CONFIG_XFS_FS is not set | ||
577 | # CONFIG_GFS2_FS is not set | ||
578 | # CONFIG_OCFS2_FS is not set | ||
579 | # CONFIG_MINIX_FS is not set | ||
580 | # CONFIG_ROMFS_FS is not set | ||
581 | CONFIG_INOTIFY=y | ||
582 | CONFIG_INOTIFY_USER=y | ||
583 | # CONFIG_QUOTA is not set | ||
584 | CONFIG_DNOTIFY=y | ||
585 | # CONFIG_AUTOFS_FS is not set | ||
586 | # CONFIG_AUTOFS4_FS is not set | ||
587 | # CONFIG_FUSE_FS is not set | ||
588 | |||
589 | # | ||
590 | # CD-ROM/DVD Filesystems | ||
591 | # | ||
592 | # CONFIG_ISO9660_FS is not set | ||
593 | # CONFIG_UDF_FS is not set | ||
594 | |||
595 | # | ||
596 | # DOS/FAT/NT Filesystems | ||
597 | # | ||
598 | # CONFIG_MSDOS_FS is not set | ||
599 | # CONFIG_VFAT_FS is not set | ||
600 | # CONFIG_NTFS_FS is not set | ||
601 | |||
602 | # | ||
603 | # Pseudo filesystems | ||
604 | # | ||
605 | CONFIG_PROC_FS=y | ||
606 | CONFIG_PROC_KCORE=y | ||
607 | CONFIG_PROC_SYSCTL=y | ||
608 | CONFIG_SYSFS=y | ||
609 | CONFIG_TMPFS=y | ||
610 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
611 | # CONFIG_HUGETLB_PAGE is not set | ||
612 | CONFIG_RAMFS=y | ||
613 | # CONFIG_CONFIGFS_FS is not set | ||
614 | |||
615 | # | ||
616 | # Miscellaneous filesystems | ||
617 | # | ||
618 | # CONFIG_ADFS_FS is not set | ||
619 | # CONFIG_AFFS_FS is not set | ||
620 | # CONFIG_HFS_FS is not set | ||
621 | # CONFIG_HFSPLUS_FS is not set | ||
622 | # CONFIG_BEFS_FS is not set | ||
623 | # CONFIG_BFS_FS is not set | ||
624 | # CONFIG_EFS_FS is not set | ||
625 | # CONFIG_JFFS2_FS is not set | ||
626 | CONFIG_CRAMFS=y | ||
627 | # CONFIG_VXFS_FS is not set | ||
628 | # CONFIG_HPFS_FS is not set | ||
629 | # CONFIG_QNX4FS_FS is not set | ||
630 | # CONFIG_SYSV_FS is not set | ||
631 | # CONFIG_UFS_FS is not set | ||
632 | |||
633 | # | ||
634 | # Network File Systems | ||
635 | # | ||
636 | CONFIG_NFS_FS=y | ||
637 | CONFIG_NFS_V3=y | ||
638 | # CONFIG_NFS_V3_ACL is not set | ||
639 | # CONFIG_NFS_V4 is not set | ||
640 | # CONFIG_NFS_DIRECTIO is not set | ||
641 | # CONFIG_NFSD is not set | ||
642 | CONFIG_ROOT_NFS=y | ||
643 | CONFIG_LOCKD=y | ||
644 | CONFIG_LOCKD_V4=y | ||
645 | CONFIG_NFS_COMMON=y | ||
646 | CONFIG_SUNRPC=y | ||
647 | # CONFIG_SUNRPC_BIND34 is not set | ||
648 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
649 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
650 | # CONFIG_SMB_FS is not set | ||
651 | # CONFIG_CIFS is not set | ||
652 | # CONFIG_NCP_FS is not set | ||
653 | # CONFIG_CODA_FS is not set | ||
654 | # CONFIG_AFS_FS is not set | ||
655 | |||
656 | # | ||
657 | # Partition Types | ||
658 | # | ||
659 | # CONFIG_PARTITION_ADVANCED is not set | ||
660 | CONFIG_MSDOS_PARTITION=y | ||
661 | |||
662 | # | ||
663 | # Native Language Support | ||
664 | # | ||
665 | # CONFIG_NLS is not set | ||
666 | |||
667 | # | ||
668 | # Distributed Lock Manager | ||
669 | # | ||
670 | # CONFIG_DLM is not set | ||
671 | # CONFIG_UCC_SLOW is not set | ||
672 | |||
673 | # | ||
674 | # Library routines | ||
675 | # | ||
676 | CONFIG_BITREVERSE=y | ||
677 | # CONFIG_CRC_CCITT is not set | ||
678 | # CONFIG_CRC16 is not set | ||
679 | # CONFIG_CRC_ITU_T is not set | ||
680 | CONFIG_CRC32=y | ||
681 | # CONFIG_CRC7 is not set | ||
682 | # CONFIG_LIBCRC32C is not set | ||
683 | CONFIG_ZLIB_INFLATE=y | ||
684 | CONFIG_PLIST=y | ||
685 | CONFIG_HAS_IOMEM=y | ||
686 | CONFIG_HAS_IOPORT=y | ||
687 | CONFIG_HAS_DMA=y | ||
688 | |||
689 | # | ||
690 | # Instrumentation Support | ||
691 | # | ||
692 | # CONFIG_PROFILING is not set | ||
693 | |||
694 | # | ||
695 | # Kernel hacking | ||
696 | # | ||
697 | # CONFIG_PRINTK_TIME is not set | ||
698 | CONFIG_ENABLE_MUST_CHECK=y | ||
699 | CONFIG_MAGIC_SYSRQ=y | ||
700 | # CONFIG_UNUSED_SYMBOLS is not set | ||
701 | # CONFIG_DEBUG_FS is not set | ||
702 | # CONFIG_HEADERS_CHECK is not set | ||
703 | CONFIG_DEBUG_KERNEL=y | ||
704 | # CONFIG_DEBUG_SHIRQ is not set | ||
705 | CONFIG_DETECT_SOFTLOCKUP=y | ||
706 | CONFIG_SCHED_DEBUG=y | ||
707 | # CONFIG_SCHEDSTATS is not set | ||
708 | # CONFIG_TIMER_STATS is not set | ||
709 | # CONFIG_DEBUG_SLAB is not set | ||
710 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
711 | # CONFIG_RT_MUTEX_TESTER is not set | ||
712 | # CONFIG_DEBUG_SPINLOCK is not set | ||
713 | # CONFIG_DEBUG_MUTEXES is not set | ||
714 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
715 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
716 | # CONFIG_DEBUG_KOBJECT is not set | ||
717 | CONFIG_DEBUG_BUGVERBOSE=y | ||
718 | # CONFIG_DEBUG_INFO is not set | ||
719 | # CONFIG_DEBUG_VM is not set | ||
720 | # CONFIG_DEBUG_LIST is not set | ||
721 | CONFIG_FORCED_INLINING=y | ||
722 | # CONFIG_RCU_TORTURE_TEST is not set | ||
723 | # CONFIG_FAULT_INJECTION is not set | ||
724 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
725 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
726 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
727 | # CONFIG_DEBUGGER is not set | ||
728 | # CONFIG_BDI_SWITCH is not set | ||
729 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
730 | |||
731 | # | ||
732 | # Security options | ||
733 | # | ||
734 | # CONFIG_KEYS is not set | ||
735 | # CONFIG_SECURITY is not set | ||
736 | CONFIG_CRYPTO=y | ||
737 | CONFIG_CRYPTO_ALGAPI=y | ||
738 | CONFIG_CRYPTO_BLKCIPHER=y | ||
739 | CONFIG_CRYPTO_MANAGER=y | ||
740 | # CONFIG_CRYPTO_HMAC is not set | ||
741 | # CONFIG_CRYPTO_XCBC is not set | ||
742 | # CONFIG_CRYPTO_NULL is not set | ||
743 | # CONFIG_CRYPTO_MD4 is not set | ||
744 | CONFIG_CRYPTO_MD5=y | ||
745 | # CONFIG_CRYPTO_SHA1 is not set | ||
746 | # CONFIG_CRYPTO_SHA256 is not set | ||
747 | # CONFIG_CRYPTO_SHA512 is not set | ||
748 | # CONFIG_CRYPTO_WP512 is not set | ||
749 | # CONFIG_CRYPTO_TGR192 is not set | ||
750 | # CONFIG_CRYPTO_GF128MUL is not set | ||
751 | CONFIG_CRYPTO_ECB=y | ||
752 | CONFIG_CRYPTO_CBC=y | ||
753 | CONFIG_CRYPTO_PCBC=y | ||
754 | # CONFIG_CRYPTO_LRW is not set | ||
755 | # CONFIG_CRYPTO_CRYPTD is not set | ||
756 | CONFIG_CRYPTO_DES=y | ||
757 | # CONFIG_CRYPTO_FCRYPT is not set | ||
758 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
759 | # CONFIG_CRYPTO_TWOFISH is not set | ||
760 | # CONFIG_CRYPTO_SERPENT is not set | ||
761 | # CONFIG_CRYPTO_AES is not set | ||
762 | # CONFIG_CRYPTO_CAST5 is not set | ||
763 | # CONFIG_CRYPTO_CAST6 is not set | ||
764 | # CONFIG_CRYPTO_TEA is not set | ||
765 | # CONFIG_CRYPTO_ARC4 is not set | ||
766 | # CONFIG_CRYPTO_KHAZAD is not set | ||
767 | # CONFIG_CRYPTO_ANUBIS is not set | ||
768 | # CONFIG_CRYPTO_DEFLATE is not set | ||
769 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
770 | # CONFIG_CRYPTO_CRC32C is not set | ||
771 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
772 | # CONFIG_CRYPTO_TEST is not set | ||
773 | CONFIG_CRYPTO_HW=y | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index b0cb2e662c25..fb33a7e71941 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -24,6 +24,7 @@ obj-$(CONFIG_PPC64) += vdso64/ | |||
24 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o | 24 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o |
25 | obj-$(CONFIG_PPC_970_NAP) += idle_power4.o | 25 | obj-$(CONFIG_PPC_970_NAP) += idle_power4.o |
26 | obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o | 26 | obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o |
27 | obj-$(CONFIG_PPC_CLOCK) += clock.o | ||
27 | procfs-$(CONFIG_PPC64) := proc_ppc64.o | 28 | procfs-$(CONFIG_PPC64) := proc_ppc64.o |
28 | obj-$(CONFIG_PROC_FS) += $(procfs-y) | 29 | obj-$(CONFIG_PROC_FS) += $(procfs-y) |
29 | rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o | 30 | rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o |
@@ -37,25 +38,26 @@ obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o | |||
37 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 38 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
38 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o | 39 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o |
39 | obj-$(CONFIG_TAU) += tau_6xx.o | 40 | obj-$(CONFIG_TAU) += tau_6xx.o |
40 | obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o | 41 | obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o \ |
41 | obj32-$(CONFIG_HIBERNATION) += swsusp_32.o | 42 | swsusp_$(CONFIG_WORD_SIZE).o |
42 | obj64-$(CONFIG_HIBERNATION) += swsusp_64.o swsusp_asm64.o | 43 | obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o |
43 | obj32-$(CONFIG_MODULES) += module_32.o | 44 | obj-$(CONFIG_MODULES) += module_$(CONFIG_WORD_SIZE).o |
44 | 45 | ||
45 | ifeq ($(CONFIG_PPC_MERGE),y) | 46 | ifeq ($(CONFIG_PPC_MERGE),y) |
46 | 47 | ||
47 | extra-$(CONFIG_PPC_STD_MMU) := head_32.o | 48 | extra-$(CONFIG_PPC_STD_MMU) := head_32.o |
48 | extra-$(CONFIG_PPC64) := head_64.o | 49 | extra-$(CONFIG_PPC64) := head_64.o |
49 | extra-$(CONFIG_40x) := head_4xx.o | 50 | extra-$(CONFIG_40x) := head_40x.o |
50 | extra-$(CONFIG_44x) := head_44x.o | 51 | extra-$(CONFIG_44x) := head_44x.o |
51 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | 52 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
52 | extra-$(CONFIG_8xx) := head_8xx.o | 53 | extra-$(CONFIG_8xx) := head_8xx.o |
53 | extra-y += vmlinux.lds | 54 | extra-y += vmlinux.lds |
54 | 55 | ||
55 | obj-y += time.o prom.o traps.o setup-common.o \ | 56 | obj-y += time.o prom.o traps.o setup-common.o \ |
56 | udbg.o misc.o io.o | 57 | udbg.o misc.o io.o \ |
57 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o | 58 | misc_$(CONFIG_WORD_SIZE).o |
58 | obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o | 59 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o |
60 | obj-$(CONFIG_PPC64) += dma_64.o iommu.o | ||
59 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o | 61 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o |
60 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 62 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
61 | obj-$(CONFIG_BOOTX_TEXT) += btext.o | 63 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
@@ -63,16 +65,12 @@ obj-$(CONFIG_SMP) += smp.o | |||
63 | obj-$(CONFIG_KPROBES) += kprobes.o | 65 | obj-$(CONFIG_KPROBES) += kprobes.o |
64 | obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o | 66 | obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o |
65 | 67 | ||
66 | module-$(CONFIG_PPC64) += module_64.o | 68 | pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o |
67 | obj-$(CONFIG_MODULES) += $(module-y) | 69 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ |
68 | 70 | pci-common.o | |
69 | pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o isa-bridge.o | ||
70 | pci32-$(CONFIG_PPC32) := pci_32.o | ||
71 | obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) pci-common.o | ||
72 | obj-$(CONFIG_PCI_MSI) += msi.o | 71 | obj-$(CONFIG_PCI_MSI) += msi.o |
73 | kexec-$(CONFIG_PPC64) := machine_kexec_64.o | 72 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ |
74 | kexec-$(CONFIG_PPC32) := machine_kexec_32.o | 73 | machine_kexec_$(CONFIG_WORD_SIZE).o |
75 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) | ||
76 | obj-$(CONFIG_AUDIT) += audit.o | 74 | obj-$(CONFIG_AUDIT) += audit.o |
77 | obj64-$(CONFIG_AUDIT) += compat_audit.o | 75 | obj64-$(CONFIG_AUDIT) += compat_audit.o |
78 | 76 | ||
@@ -80,20 +78,12 @@ ifneq ($(CONFIG_PPC_INDIRECT_IO),y) | |||
80 | obj-y += iomap.o | 78 | obj-y += iomap.o |
81 | endif | 79 | endif |
82 | 80 | ||
83 | ifeq ($(CONFIG_PPC_ISERIES),y) | ||
84 | CFLAGS_lparmap.s += -g0 | ||
85 | extra-y += lparmap.s | ||
86 | $(obj)/head_64.o: $(obj)/lparmap.s | ||
87 | AFLAGS_head_64.o += -I$(obj) | ||
88 | endif | ||
89 | |||
90 | else | 81 | else |
91 | # stuff used from here for ARCH=ppc | 82 | # stuff used from here for ARCH=ppc |
92 | smpobj-$(CONFIG_SMP) += smp.o | 83 | smpobj-$(CONFIG_SMP) += smp.o |
93 | 84 | ||
94 | endif | 85 | endif |
95 | 86 | ||
96 | obj-$(CONFIG_PPC32) += $(obj32-y) | ||
97 | obj-$(CONFIG_PPC64) += $(obj64-y) | 87 | obj-$(CONFIG_PPC64) += $(obj64-y) |
98 | 88 | ||
99 | extra-$(CONFIG_PPC_FPU) += fpu.o | 89 | extra-$(CONFIG_PPC_FPU) += fpu.o |
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 5c9ff7f5c44e..e06f75daeba3 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c | |||
@@ -38,7 +38,7 @@ struct aligninfo { | |||
38 | /* Bits in the flags field */ | 38 | /* Bits in the flags field */ |
39 | #define LD 0 /* load */ | 39 | #define LD 0 /* load */ |
40 | #define ST 1 /* store */ | 40 | #define ST 1 /* store */ |
41 | #define SE 2 /* sign-extend value */ | 41 | #define SE 2 /* sign-extend value, or FP ld/st as word */ |
42 | #define F 4 /* to/from fp regs */ | 42 | #define F 4 /* to/from fp regs */ |
43 | #define U 8 /* update index register */ | 43 | #define U 8 /* update index register */ |
44 | #define M 0x10 /* multiple load/store */ | 44 | #define M 0x10 /* multiple load/store */ |
@@ -46,6 +46,8 @@ struct aligninfo { | |||
46 | #define S 0x40 /* single-precision fp or... */ | 46 | #define S 0x40 /* single-precision fp or... */ |
47 | #define SX 0x40 /* ... byte count in XER */ | 47 | #define SX 0x40 /* ... byte count in XER */ |
48 | #define HARD 0x80 /* string, stwcx. */ | 48 | #define HARD 0x80 /* string, stwcx. */ |
49 | #define E4 0x40 /* SPE endianness is word */ | ||
50 | #define E8 0x80 /* SPE endianness is double word */ | ||
49 | 51 | ||
50 | /* DSISR bits reported for a DCBZ instruction: */ | 52 | /* DSISR bits reported for a DCBZ instruction: */ |
51 | #define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */ | 53 | #define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */ |
@@ -87,9 +89,9 @@ static struct aligninfo aligninfo[128] = { | |||
87 | { 8, LD+F+U }, /* 00 1 1001: lfdu */ | 89 | { 8, LD+F+U }, /* 00 1 1001: lfdu */ |
88 | { 4, ST+F+S+U }, /* 00 1 1010: stfsu */ | 90 | { 4, ST+F+S+U }, /* 00 1 1010: stfsu */ |
89 | { 8, ST+F+U }, /* 00 1 1011: stfdu */ | 91 | { 8, ST+F+U }, /* 00 1 1011: stfdu */ |
90 | INVALID, /* 00 1 1100 */ | 92 | { 16, LD+F }, /* 00 1 1100: lfdp */ |
91 | INVALID, /* 00 1 1101 */ | 93 | INVALID, /* 00 1 1101 */ |
92 | INVALID, /* 00 1 1110 */ | 94 | { 16, ST+F }, /* 00 1 1110: stfdp */ |
93 | INVALID, /* 00 1 1111 */ | 95 | INVALID, /* 00 1 1111 */ |
94 | { 8, LD }, /* 01 0 0000: ldx */ | 96 | { 8, LD }, /* 01 0 0000: ldx */ |
95 | INVALID, /* 01 0 0001 */ | 97 | INVALID, /* 01 0 0001 */ |
@@ -167,10 +169,10 @@ static struct aligninfo aligninfo[128] = { | |||
167 | { 8, LD+F }, /* 11 0 1001: lfdx */ | 169 | { 8, LD+F }, /* 11 0 1001: lfdx */ |
168 | { 4, ST+F+S }, /* 11 0 1010: stfsx */ | 170 | { 4, ST+F+S }, /* 11 0 1010: stfsx */ |
169 | { 8, ST+F }, /* 11 0 1011: stfdx */ | 171 | { 8, ST+F }, /* 11 0 1011: stfdx */ |
170 | INVALID, /* 11 0 1100 */ | 172 | { 16, LD+F }, /* 11 0 1100: lfdpx */ |
171 | { 8, LD+M }, /* 11 0 1101: lmd */ | 173 | { 4, LD+F+SE }, /* 11 0 1101: lfiwax */ |
172 | INVALID, /* 11 0 1110 */ | 174 | { 16, ST+F }, /* 11 0 1110: stfdpx */ |
173 | { 8, ST+M }, /* 11 0 1111: stmd */ | 175 | { 4, ST+F }, /* 11 0 1111: stfiwx */ |
174 | { 4, LD+U }, /* 11 1 0000: lwzux */ | 176 | { 4, LD+U }, /* 11 1 0000: lwzux */ |
175 | INVALID, /* 11 1 0001 */ | 177 | INVALID, /* 11 1 0001 */ |
176 | { 4, ST+U }, /* 11 1 0010: stwux */ | 178 | { 4, ST+U }, /* 11 1 0010: stwux */ |
@@ -356,6 +358,284 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr, | |||
356 | return 1; | 358 | return 1; |
357 | } | 359 | } |
358 | 360 | ||
361 | /* | ||
362 | * Emulate floating-point pair loads and stores. | ||
363 | * Only POWER6 has these instructions, and it does true little-endian, | ||
364 | * so we don't need the address swizzling. | ||
365 | */ | ||
366 | static int emulate_fp_pair(struct pt_regs *regs, unsigned char __user *addr, | ||
367 | unsigned int reg, unsigned int flags) | ||
368 | { | ||
369 | char *ptr = (char *) ¤t->thread.fpr[reg]; | ||
370 | int i, ret; | ||
371 | |||
372 | if (!(flags & F)) | ||
373 | return 0; | ||
374 | if (reg & 1) | ||
375 | return 0; /* invalid form: FRS/FRT must be even */ | ||
376 | if (!(flags & SW)) { | ||
377 | /* not byte-swapped - easy */ | ||
378 | if (!(flags & ST)) | ||
379 | ret = __copy_from_user(ptr, addr, 16); | ||
380 | else | ||
381 | ret = __copy_to_user(addr, ptr, 16); | ||
382 | } else { | ||
383 | /* each FPR value is byte-swapped separately */ | ||
384 | ret = 0; | ||
385 | for (i = 0; i < 16; ++i) { | ||
386 | if (!(flags & ST)) | ||
387 | ret |= __get_user(ptr[i^7], addr + i); | ||
388 | else | ||
389 | ret |= __put_user(ptr[i^7], addr + i); | ||
390 | } | ||
391 | } | ||
392 | if (ret) | ||
393 | return -EFAULT; | ||
394 | return 1; /* exception handled and fixed up */ | ||
395 | } | ||
396 | |||
397 | #ifdef CONFIG_SPE | ||
398 | |||
399 | static struct aligninfo spe_aligninfo[32] = { | ||
400 | { 8, LD+E8 }, /* 0 00 00: evldd[x] */ | ||
401 | { 8, LD+E4 }, /* 0 00 01: evldw[x] */ | ||
402 | { 8, LD }, /* 0 00 10: evldh[x] */ | ||
403 | INVALID, /* 0 00 11 */ | ||
404 | { 2, LD }, /* 0 01 00: evlhhesplat[x] */ | ||
405 | INVALID, /* 0 01 01 */ | ||
406 | { 2, LD }, /* 0 01 10: evlhhousplat[x] */ | ||
407 | { 2, LD+SE }, /* 0 01 11: evlhhossplat[x] */ | ||
408 | { 4, LD }, /* 0 10 00: evlwhe[x] */ | ||
409 | INVALID, /* 0 10 01 */ | ||
410 | { 4, LD }, /* 0 10 10: evlwhou[x] */ | ||
411 | { 4, LD+SE }, /* 0 10 11: evlwhos[x] */ | ||
412 | { 4, LD+E4 }, /* 0 11 00: evlwwsplat[x] */ | ||
413 | INVALID, /* 0 11 01 */ | ||
414 | { 4, LD }, /* 0 11 10: evlwhsplat[x] */ | ||
415 | INVALID, /* 0 11 11 */ | ||
416 | |||
417 | { 8, ST+E8 }, /* 1 00 00: evstdd[x] */ | ||
418 | { 8, ST+E4 }, /* 1 00 01: evstdw[x] */ | ||
419 | { 8, ST }, /* 1 00 10: evstdh[x] */ | ||
420 | INVALID, /* 1 00 11 */ | ||
421 | INVALID, /* 1 01 00 */ | ||
422 | INVALID, /* 1 01 01 */ | ||
423 | INVALID, /* 1 01 10 */ | ||
424 | INVALID, /* 1 01 11 */ | ||
425 | { 4, ST }, /* 1 10 00: evstwhe[x] */ | ||
426 | INVALID, /* 1 10 01 */ | ||
427 | { 4, ST }, /* 1 10 10: evstwho[x] */ | ||
428 | INVALID, /* 1 10 11 */ | ||
429 | { 4, ST+E4 }, /* 1 11 00: evstwwe[x] */ | ||
430 | INVALID, /* 1 11 01 */ | ||
431 | { 4, ST+E4 }, /* 1 11 10: evstwwo[x] */ | ||
432 | INVALID, /* 1 11 11 */ | ||
433 | }; | ||
434 | |||
435 | #define EVLDD 0x00 | ||
436 | #define EVLDW 0x01 | ||
437 | #define EVLDH 0x02 | ||
438 | #define EVLHHESPLAT 0x04 | ||
439 | #define EVLHHOUSPLAT 0x06 | ||
440 | #define EVLHHOSSPLAT 0x07 | ||
441 | #define EVLWHE 0x08 | ||
442 | #define EVLWHOU 0x0A | ||
443 | #define EVLWHOS 0x0B | ||
444 | #define EVLWWSPLAT 0x0C | ||
445 | #define EVLWHSPLAT 0x0E | ||
446 | #define EVSTDD 0x10 | ||
447 | #define EVSTDW 0x11 | ||
448 | #define EVSTDH 0x12 | ||
449 | #define EVSTWHE 0x18 | ||
450 | #define EVSTWHO 0x1A | ||
451 | #define EVSTWWE 0x1C | ||
452 | #define EVSTWWO 0x1E | ||
453 | |||
454 | /* | ||
455 | * Emulate SPE loads and stores. | ||
456 | * Only Book-E has these instructions, and it does true little-endian, | ||
457 | * so we don't need the address swizzling. | ||
458 | */ | ||
459 | static int emulate_spe(struct pt_regs *regs, unsigned int reg, | ||
460 | unsigned int instr) | ||
461 | { | ||
462 | int t, ret; | ||
463 | union { | ||
464 | u64 ll; | ||
465 | u32 w[2]; | ||
466 | u16 h[4]; | ||
467 | u8 v[8]; | ||
468 | } data, temp; | ||
469 | unsigned char __user *p, *addr; | ||
470 | unsigned long *evr = ¤t->thread.evr[reg]; | ||
471 | unsigned int nb, flags; | ||
472 | |||
473 | instr = (instr >> 1) & 0x1f; | ||
474 | |||
475 | /* DAR has the operand effective address */ | ||
476 | addr = (unsigned char __user *)regs->dar; | ||
477 | |||
478 | nb = spe_aligninfo[instr].len; | ||
479 | flags = spe_aligninfo[instr].flags; | ||
480 | |||
481 | /* Verify the address of the operand */ | ||
482 | if (unlikely(user_mode(regs) && | ||
483 | !access_ok((flags & ST ? VERIFY_WRITE : VERIFY_READ), | ||
484 | addr, nb))) | ||
485 | return -EFAULT; | ||
486 | |||
487 | /* userland only */ | ||
488 | if (unlikely(!user_mode(regs))) | ||
489 | return 0; | ||
490 | |||
491 | flush_spe_to_thread(current); | ||
492 | |||
493 | /* If we are loading, get the data from user space, else | ||
494 | * get it from register values | ||
495 | */ | ||
496 | if (flags & ST) { | ||
497 | data.ll = 0; | ||
498 | switch (instr) { | ||
499 | case EVSTDD: | ||
500 | case EVSTDW: | ||
501 | case EVSTDH: | ||
502 | data.w[0] = *evr; | ||
503 | data.w[1] = regs->gpr[reg]; | ||
504 | break; | ||
505 | case EVSTWHE: | ||
506 | data.h[2] = *evr >> 16; | ||
507 | data.h[3] = regs->gpr[reg] >> 16; | ||
508 | break; | ||
509 | case EVSTWHO: | ||
510 | data.h[2] = *evr & 0xffff; | ||
511 | data.h[3] = regs->gpr[reg] & 0xffff; | ||
512 | break; | ||
513 | case EVSTWWE: | ||
514 | data.w[1] = *evr; | ||
515 | break; | ||
516 | case EVSTWWO: | ||
517 | data.w[1] = regs->gpr[reg]; | ||
518 | break; | ||
519 | default: | ||
520 | return -EINVAL; | ||
521 | } | ||
522 | } else { | ||
523 | temp.ll = data.ll = 0; | ||
524 | ret = 0; | ||
525 | p = addr; | ||
526 | |||
527 | switch (nb) { | ||
528 | case 8: | ||
529 | ret |= __get_user_inatomic(temp.v[0], p++); | ||
530 | ret |= __get_user_inatomic(temp.v[1], p++); | ||
531 | ret |= __get_user_inatomic(temp.v[2], p++); | ||
532 | ret |= __get_user_inatomic(temp.v[3], p++); | ||
533 | case 4: | ||
534 | ret |= __get_user_inatomic(temp.v[4], p++); | ||
535 | ret |= __get_user_inatomic(temp.v[5], p++); | ||
536 | case 2: | ||
537 | ret |= __get_user_inatomic(temp.v[6], p++); | ||
538 | ret |= __get_user_inatomic(temp.v[7], p++); | ||
539 | if (unlikely(ret)) | ||
540 | return -EFAULT; | ||
541 | } | ||
542 | |||
543 | switch (instr) { | ||
544 | case EVLDD: | ||
545 | case EVLDW: | ||
546 | case EVLDH: | ||
547 | data.ll = temp.ll; | ||
548 | break; | ||
549 | case EVLHHESPLAT: | ||
550 | data.h[0] = temp.h[3]; | ||
551 | data.h[2] = temp.h[3]; | ||
552 | break; | ||
553 | case EVLHHOUSPLAT: | ||
554 | case EVLHHOSSPLAT: | ||
555 | data.h[1] = temp.h[3]; | ||
556 | data.h[3] = temp.h[3]; | ||
557 | break; | ||
558 | case EVLWHE: | ||
559 | data.h[0] = temp.h[2]; | ||
560 | data.h[2] = temp.h[3]; | ||
561 | break; | ||
562 | case EVLWHOU: | ||
563 | case EVLWHOS: | ||
564 | data.h[1] = temp.h[2]; | ||
565 | data.h[3] = temp.h[3]; | ||
566 | break; | ||
567 | case EVLWWSPLAT: | ||
568 | data.w[0] = temp.w[1]; | ||
569 | data.w[1] = temp.w[1]; | ||
570 | break; | ||
571 | case EVLWHSPLAT: | ||
572 | data.h[0] = temp.h[2]; | ||
573 | data.h[1] = temp.h[2]; | ||
574 | data.h[2] = temp.h[3]; | ||
575 | data.h[3] = temp.h[3]; | ||
576 | break; | ||
577 | default: | ||
578 | return -EINVAL; | ||
579 | } | ||
580 | } | ||
581 | |||
582 | if (flags & SW) { | ||
583 | switch (flags & 0xf0) { | ||
584 | case E8: | ||
585 | SWAP(data.v[0], data.v[7]); | ||
586 | SWAP(data.v[1], data.v[6]); | ||
587 | SWAP(data.v[2], data.v[5]); | ||
588 | SWAP(data.v[3], data.v[4]); | ||
589 | break; | ||
590 | case E4: | ||
591 | |||
592 | SWAP(data.v[0], data.v[3]); | ||
593 | SWAP(data.v[1], data.v[2]); | ||
594 | SWAP(data.v[4], data.v[7]); | ||
595 | SWAP(data.v[5], data.v[6]); | ||
596 | break; | ||
597 | /* Its half word endian */ | ||
598 | default: | ||
599 | SWAP(data.v[0], data.v[1]); | ||
600 | SWAP(data.v[2], data.v[3]); | ||
601 | SWAP(data.v[4], data.v[5]); | ||
602 | SWAP(data.v[6], data.v[7]); | ||
603 | break; | ||
604 | } | ||
605 | } | ||
606 | |||
607 | if (flags & SE) { | ||
608 | data.w[0] = (s16)data.h[1]; | ||
609 | data.w[1] = (s16)data.h[3]; | ||
610 | } | ||
611 | |||
612 | /* Store result to memory or update registers */ | ||
613 | if (flags & ST) { | ||
614 | ret = 0; | ||
615 | p = addr; | ||
616 | switch (nb) { | ||
617 | case 8: | ||
618 | ret |= __put_user_inatomic(data.v[0], p++); | ||
619 | ret |= __put_user_inatomic(data.v[1], p++); | ||
620 | ret |= __put_user_inatomic(data.v[2], p++); | ||
621 | ret |= __put_user_inatomic(data.v[3], p++); | ||
622 | case 4: | ||
623 | ret |= __put_user_inatomic(data.v[4], p++); | ||
624 | ret |= __put_user_inatomic(data.v[5], p++); | ||
625 | case 2: | ||
626 | ret |= __put_user_inatomic(data.v[6], p++); | ||
627 | ret |= __put_user_inatomic(data.v[7], p++); | ||
628 | } | ||
629 | if (unlikely(ret)) | ||
630 | return -EFAULT; | ||
631 | } else { | ||
632 | *evr = data.w[0]; | ||
633 | regs->gpr[reg] = data.w[1]; | ||
634 | } | ||
635 | |||
636 | return 1; | ||
637 | } | ||
638 | #endif /* CONFIG_SPE */ | ||
359 | 639 | ||
360 | /* | 640 | /* |
361 | * Called on alignment exception. Attempts to fixup | 641 | * Called on alignment exception. Attempts to fixup |
@@ -414,6 +694,12 @@ int fix_alignment(struct pt_regs *regs) | |||
414 | /* extract the operation and registers from the dsisr */ | 694 | /* extract the operation and registers from the dsisr */ |
415 | reg = (dsisr >> 5) & 0x1f; /* source/dest register */ | 695 | reg = (dsisr >> 5) & 0x1f; /* source/dest register */ |
416 | areg = dsisr & 0x1f; /* register to update */ | 696 | areg = dsisr & 0x1f; /* register to update */ |
697 | |||
698 | #ifdef CONFIG_SPE | ||
699 | if ((instr >> 26) == 0x4) | ||
700 | return emulate_spe(regs, reg, instr); | ||
701 | #endif | ||
702 | |||
417 | instr = (dsisr >> 10) & 0x7f; | 703 | instr = (dsisr >> 10) & 0x7f; |
418 | instr |= (dsisr >> 13) & 0x60; | 704 | instr |= (dsisr >> 13) & 0x60; |
419 | 705 | ||
@@ -471,6 +757,10 @@ int fix_alignment(struct pt_regs *regs) | |||
471 | flush_fp_to_thread(current); | 757 | flush_fp_to_thread(current); |
472 | } | 758 | } |
473 | 759 | ||
760 | /* Special case for 16-byte FP loads and stores */ | ||
761 | if (nb == 16) | ||
762 | return emulate_fp_pair(regs, addr, reg, flags); | ||
763 | |||
474 | /* If we are loading, get the data from user space, else | 764 | /* If we are loading, get the data from user space, else |
475 | * get it from register values | 765 | * get it from register values |
476 | */ | 766 | */ |
@@ -531,7 +821,8 @@ int fix_alignment(struct pt_regs *regs) | |||
531 | * or floating point single precision conversion | 821 | * or floating point single precision conversion |
532 | */ | 822 | */ |
533 | switch (flags & ~(U|SW)) { | 823 | switch (flags & ~(U|SW)) { |
534 | case LD+SE: /* sign extend */ | 824 | case LD+SE: /* sign extending integer loads */ |
825 | case LD+F+SE: /* sign extend for lfiwax */ | ||
535 | if ( nb == 2 ) | 826 | if ( nb == 2 ) |
536 | data.ll = data.x16.low16; | 827 | data.ll = data.x16.low16; |
537 | else /* nb must be 4 */ | 828 | else /* nb must be 4 */ |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 2cb1d9487796..0ae5d57b9368 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -312,5 +312,17 @@ int main(void) | |||
312 | #ifdef CONFIG_BUG | 312 | #ifdef CONFIG_BUG |
313 | DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); | 313 | DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); |
314 | #endif | 314 | #endif |
315 | |||
316 | #ifdef CONFIG_PPC_ISERIES | ||
317 | /* the assembler miscalculates the VSID values */ | ||
318 | DEFINE(PAGE_OFFSET_ESID, GET_ESID(PAGE_OFFSET)); | ||
319 | DEFINE(PAGE_OFFSET_VSID, KERNEL_VSID(PAGE_OFFSET)); | ||
320 | DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START)); | ||
321 | DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START)); | ||
322 | #endif | ||
323 | |||
324 | #ifdef CONFIG_PPC64 | ||
325 | DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE); | ||
326 | #endif | ||
315 | return 0; | 327 | return 0; |
316 | } | 328 | } |
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index e7b684689e04..3ef51fb6f107 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <asm/sections.h> | 11 | #include <asm/sections.h> |
12 | #include <asm/prom.h> | 12 | #include <asm/prom.h> |
13 | #include <asm/btext.h> | 13 | #include <asm/btext.h> |
14 | #include <asm/prom.h> | ||
15 | #include <asm/page.h> | 14 | #include <asm/page.h> |
16 | #include <asm/mmu.h> | 15 | #include <asm/mmu.h> |
17 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
diff --git a/arch/powerpc/kernel/clock.c b/arch/powerpc/kernel/clock.c new file mode 100644 index 000000000000..ce668f545758 --- /dev/null +++ b/arch/powerpc/kernel/clock.c | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * Dummy clk implementations for powerpc. | ||
3 | * These need to be overridden in platform code. | ||
4 | */ | ||
5 | |||
6 | #include <linux/clk.h> | ||
7 | #include <linux/err.h> | ||
8 | #include <linux/errno.h> | ||
9 | #include <linux/module.h> | ||
10 | #include <asm/clk_interface.h> | ||
11 | |||
12 | struct clk_interface clk_functions; | ||
13 | |||
14 | struct clk *clk_get(struct device *dev, const char *id) | ||
15 | { | ||
16 | if (clk_functions.clk_get) | ||
17 | return clk_functions.clk_get(dev, id); | ||
18 | return ERR_PTR(-ENOSYS); | ||
19 | } | ||
20 | EXPORT_SYMBOL(clk_get); | ||
21 | |||
22 | void clk_put(struct clk *clk) | ||
23 | { | ||
24 | if (clk_functions.clk_put) | ||
25 | clk_functions.clk_put(clk); | ||
26 | } | ||
27 | EXPORT_SYMBOL(clk_put); | ||
28 | |||
29 | int clk_enable(struct clk *clk) | ||
30 | { | ||
31 | if (clk_functions.clk_enable) | ||
32 | return clk_functions.clk_enable(clk); | ||
33 | return -ENOSYS; | ||
34 | } | ||
35 | EXPORT_SYMBOL(clk_enable); | ||
36 | |||
37 | void clk_disable(struct clk *clk) | ||
38 | { | ||
39 | if (clk_functions.clk_disable) | ||
40 | clk_functions.clk_disable(clk); | ||
41 | } | ||
42 | EXPORT_SYMBOL(clk_disable); | ||
43 | |||
44 | unsigned long clk_get_rate(struct clk *clk) | ||
45 | { | ||
46 | if (clk_functions.clk_get_rate) | ||
47 | return clk_functions.clk_get_rate(clk); | ||
48 | return 0; | ||
49 | } | ||
50 | EXPORT_SYMBOL(clk_get_rate); | ||
51 | |||
52 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
53 | { | ||
54 | if (clk_functions.clk_round_rate) | ||
55 | return clk_functions.clk_round_rate(clk, rate); | ||
56 | return -ENOSYS; | ||
57 | } | ||
58 | EXPORT_SYMBOL(clk_round_rate); | ||
59 | |||
60 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
61 | { | ||
62 | if (clk_functions.clk_set_rate) | ||
63 | return clk_functions.clk_set_rate(clk, rate); | ||
64 | return -ENOSYS; | ||
65 | } | ||
66 | EXPORT_SYMBOL(clk_set_rate); | ||
67 | |||
68 | struct clk *clk_get_parent(struct clk *clk) | ||
69 | { | ||
70 | if (clk_functions.clk_get_parent) | ||
71 | return clk_functions.clk_get_parent(clk); | ||
72 | return ERR_PTR(-ENOSYS); | ||
73 | } | ||
74 | EXPORT_SYMBOL(clk_get_parent); | ||
75 | |||
76 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
77 | { | ||
78 | if (clk_functions.clk_set_parent) | ||
79 | return clk_functions.clk_set_parent(clk, parent); | ||
80 | return -ENOSYS; | ||
81 | } | ||
82 | EXPORT_SYMBOL(clk_set_parent); | ||
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index b1f8000952f3..8eb8087383eb 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -68,15 +68,6 @@ extern void __restore_cpu_ppc970(void); | |||
68 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ | 68 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
69 | PPC_FEATURE_BOOKE) | 69 | PPC_FEATURE_BOOKE) |
70 | 70 | ||
71 | /* We only set the spe features if the kernel was compiled with | ||
72 | * spe support | ||
73 | */ | ||
74 | #ifdef CONFIG_SPE | ||
75 | #define PPC_FEATURE_SPE_COMP PPC_FEATURE_HAS_SPE | ||
76 | #else | ||
77 | #define PPC_FEATURE_SPE_COMP 0 | ||
78 | #endif | ||
79 | |||
80 | static struct cpu_spec cpu_specs[] = { | 71 | static struct cpu_spec cpu_specs[] = { |
81 | #ifdef CONFIG_PPC64 | 72 | #ifdef CONFIG_PPC64 |
82 | { /* Power3 */ | 73 | { /* Power3 */ |
@@ -1132,6 +1123,24 @@ static struct cpu_spec cpu_specs[] = { | |||
1132 | .dcache_bsize = 32, | 1123 | .dcache_bsize = 32, |
1133 | .platform = "ppc440", | 1124 | .platform = "ppc440", |
1134 | }, | 1125 | }, |
1126 | { /* 440EPX */ | ||
1127 | .pvr_mask = 0xf0000ffb, | ||
1128 | .pvr_value = 0x200008D0, | ||
1129 | .cpu_name = "440EPX", | ||
1130 | .cpu_features = CPU_FTRS_44X, | ||
1131 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, | ||
1132 | .icache_bsize = 32, | ||
1133 | .dcache_bsize = 32, | ||
1134 | }, | ||
1135 | { /* 440GRX */ | ||
1136 | .pvr_mask = 0xf0000ffb, | ||
1137 | .pvr_value = 0x200008D8, | ||
1138 | .cpu_name = "440GRX", | ||
1139 | .cpu_features = CPU_FTRS_44X, | ||
1140 | .cpu_user_features = COMMON_USER_BOOKE, | ||
1141 | .icache_bsize = 32, | ||
1142 | .dcache_bsize = 32, | ||
1143 | }, | ||
1135 | { /* 440GP Rev. B */ | 1144 | { /* 440GP Rev. B */ |
1136 | .pvr_mask = 0xf0000fff, | 1145 | .pvr_mask = 0xf0000fff, |
1137 | .pvr_value = 0x40000440, | 1146 | .pvr_value = 0x40000440, |
@@ -1243,8 +1252,8 @@ static struct cpu_spec cpu_specs[] = { | |||
1243 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | 1252 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
1244 | .cpu_features = CPU_FTRS_E200, | 1253 | .cpu_features = CPU_FTRS_E200, |
1245 | .cpu_user_features = COMMON_USER_BOOKE | | 1254 | .cpu_user_features = COMMON_USER_BOOKE | |
1246 | PPC_FEATURE_SPE_COMP | | 1255 | PPC_FEATURE_HAS_SPE_COMP | |
1247 | PPC_FEATURE_HAS_EFP_SINGLE | | 1256 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | |
1248 | PPC_FEATURE_UNIFIED_CACHE, | 1257 | PPC_FEATURE_UNIFIED_CACHE, |
1249 | .dcache_bsize = 32, | 1258 | .dcache_bsize = 32, |
1250 | .platform = "ppc5554", | 1259 | .platform = "ppc5554", |
@@ -1256,8 +1265,8 @@ static struct cpu_spec cpu_specs[] = { | |||
1256 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | 1265 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
1257 | .cpu_features = CPU_FTRS_E500, | 1266 | .cpu_features = CPU_FTRS_E500, |
1258 | .cpu_user_features = COMMON_USER_BOOKE | | 1267 | .cpu_user_features = COMMON_USER_BOOKE | |
1259 | PPC_FEATURE_SPE_COMP | | 1268 | PPC_FEATURE_HAS_SPE_COMP | |
1260 | PPC_FEATURE_HAS_EFP_SINGLE, | 1269 | PPC_FEATURE_HAS_EFP_SINGLE_COMP, |
1261 | .icache_bsize = 32, | 1270 | .icache_bsize = 32, |
1262 | .dcache_bsize = 32, | 1271 | .dcache_bsize = 32, |
1263 | .num_pmcs = 4, | 1272 | .num_pmcs = 4, |
@@ -1272,9 +1281,9 @@ static struct cpu_spec cpu_specs[] = { | |||
1272 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ | 1281 | /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ |
1273 | .cpu_features = CPU_FTRS_E500_2, | 1282 | .cpu_features = CPU_FTRS_E500_2, |
1274 | .cpu_user_features = COMMON_USER_BOOKE | | 1283 | .cpu_user_features = COMMON_USER_BOOKE | |
1275 | PPC_FEATURE_SPE_COMP | | 1284 | PPC_FEATURE_HAS_SPE_COMP | |
1276 | PPC_FEATURE_HAS_EFP_SINGLE | | 1285 | PPC_FEATURE_HAS_EFP_SINGLE_COMP | |
1277 | PPC_FEATURE_HAS_EFP_DOUBLE, | 1286 | PPC_FEATURE_HAS_EFP_DOUBLE_COMP, |
1278 | .icache_bsize = 32, | 1287 | .icache_bsize = 32, |
1279 | .dcache_bsize = 32, | 1288 | .dcache_bsize = 32, |
1280 | .num_pmcs = 4, | 1289 | .num_pmcs = 4, |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 37658ea417fa..77c749a13378 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/irq.h> | ||
28 | 27 | ||
29 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
30 | #include <asm/machdep.h> | 29 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 2f6f5a7bc69e..29ff77c468ac 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #define DBG(fmt...) | 25 | #define DBG(fmt...) |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | void reserve_kdump_trampoline(void) | 28 | void __init reserve_kdump_trampoline(void) |
29 | { | 29 | { |
30 | lmb_reserve(0, KDUMP_RESERVE_LIMIT); | 30 | lmb_reserve(0, KDUMP_RESERVE_LIMIT); |
31 | } | 31 | } |
@@ -54,8 +54,10 @@ void __init setup_kdump_trampoline(void) | |||
54 | create_trampoline(i); | 54 | create_trampoline(i); |
55 | } | 55 | } |
56 | 56 | ||
57 | #ifdef CONFIG_PPC_PSERIES | ||
57 | create_trampoline(__pa(system_reset_fwnmi) - PHYSICAL_START); | 58 | create_trampoline(__pa(system_reset_fwnmi) - PHYSICAL_START); |
58 | create_trampoline(__pa(machine_check_fwnmi) - PHYSICAL_START); | 59 | create_trampoline(__pa(machine_check_fwnmi) - PHYSICAL_START); |
60 | #endif /* CONFIG_PPC_PSERIES */ | ||
59 | 61 | ||
60 | DBG(" <- setup_kdump_trampoline()\n"); | 62 | DBG(" <- setup_kdump_trampoline()\n"); |
61 | } | 63 | } |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 4074c0b31453..21d889e63e87 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -504,9 +504,11 @@ BEGIN_FTR_SECTION | |||
504 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 504 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
505 | #endif /* CONFIG_ALTIVEC */ | 505 | #endif /* CONFIG_ALTIVEC */ |
506 | #ifdef CONFIG_SPE | 506 | #ifdef CONFIG_SPE |
507 | BEGIN_FTR_SECTION | ||
507 | oris r0,r0,MSR_SPE@h /* Disable SPE */ | 508 | oris r0,r0,MSR_SPE@h /* Disable SPE */ |
508 | mfspr r12,SPRN_SPEFSCR /* save spefscr register value */ | 509 | mfspr r12,SPRN_SPEFSCR /* save spefscr register value */ |
509 | stw r12,THREAD+THREAD_SPEFSCR(r2) | 510 | stw r12,THREAD+THREAD_SPEFSCR(r2) |
511 | END_FTR_SECTION_IFSET(CPU_FTR_SPE) | ||
510 | #endif /* CONFIG_SPE */ | 512 | #endif /* CONFIG_SPE */ |
511 | and. r0,r0,r11 /* FP or altivec or SPE enabled? */ | 513 | and. r0,r0,r11 /* FP or altivec or SPE enabled? */ |
512 | beq+ 1f | 514 | beq+ 1f |
@@ -542,8 +544,10 @@ BEGIN_FTR_SECTION | |||
542 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 544 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
543 | #endif /* CONFIG_ALTIVEC */ | 545 | #endif /* CONFIG_ALTIVEC */ |
544 | #ifdef CONFIG_SPE | 546 | #ifdef CONFIG_SPE |
547 | BEGIN_FTR_SECTION | ||
545 | lwz r0,THREAD+THREAD_SPEFSCR(r2) | 548 | lwz r0,THREAD+THREAD_SPEFSCR(r2) |
546 | mtspr SPRN_SPEFSCR,r0 /* restore SPEFSCR reg */ | 549 | mtspr SPRN_SPEFSCR,r0 /* restore SPEFSCR reg */ |
550 | END_FTR_SECTION_IFSET(CPU_FTR_SPE) | ||
547 | #endif /* CONFIG_SPE */ | 551 | #endif /* CONFIG_SPE */ |
548 | 552 | ||
549 | lwz r0,_CCR(r1) | 553 | lwz r0,_CCR(r1) |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 952eba6701f4..fbbd3f6f0064 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -385,15 +385,15 @@ BEGIN_FTR_SECTION | |||
385 | oris r0,r6,(SLB_ESID_V)@h | 385 | oris r0,r6,(SLB_ESID_V)@h |
386 | ori r0,r0,(SLB_NUM_BOLTED-1)@l | 386 | ori r0,r0,(SLB_NUM_BOLTED-1)@l |
387 | 387 | ||
388 | /* Update the last bolted SLB */ | 388 | /* Update the last bolted SLB. No write barriers are needed |
389 | * here, provided we only update the current CPU's SLB shadow | ||
390 | * buffer. | ||
391 | */ | ||
389 | ld r9,PACA_SLBSHADOWPTR(r13) | 392 | ld r9,PACA_SLBSHADOWPTR(r13) |
390 | li r12,0 | 393 | li r12,0 |
391 | std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ | 394 | std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */ |
392 | eieio | ||
393 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ | 395 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ |
394 | eieio | ||
395 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ | 396 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ |
396 | eieio | ||
397 | 397 | ||
398 | slbie r6 | 398 | slbie r6 |
399 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ | 399 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 7d73a13450b0..c86c626cf156 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -48,20 +48,17 @@ | |||
48 | mtspr SPRN_DBAT##n##L,RB; \ | 48 | mtspr SPRN_DBAT##n##L,RB; \ |
49 | 1: | 49 | 1: |
50 | 50 | ||
51 | .text | 51 | .section .text.head, "ax" |
52 | .stabs "arch/powerpc/kernel/",N_SO,0,0,0f | 52 | .stabs "arch/powerpc/kernel/",N_SO,0,0,0f |
53 | .stabs "head_32.S",N_SO,0,0,0f | 53 | .stabs "head_32.S",N_SO,0,0,0f |
54 | 0: | 54 | 0: |
55 | .globl _stext | 55 | _ENTRY(_stext); |
56 | _stext: | ||
57 | 56 | ||
58 | /* | 57 | /* |
59 | * _start is defined this way because the XCOFF loader in the OpenFirmware | 58 | * _start is defined this way because the XCOFF loader in the OpenFirmware |
60 | * on the powermac expects the entry point to be a procedure descriptor. | 59 | * on the powermac expects the entry point to be a procedure descriptor. |
61 | */ | 60 | */ |
62 | .text | 61 | _ENTRY(_start); |
63 | .globl _start | ||
64 | _start: | ||
65 | /* | 62 | /* |
66 | * These are here for legacy reasons, the kernel used to | 63 | * These are here for legacy reasons, the kernel used to |
67 | * need to look like a coff function entry for the pmac | 64 | * need to look like a coff function entry for the pmac |
@@ -475,10 +472,10 @@ InstructionTLBMiss: | |||
475 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ | 472 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ |
476 | lwz r2,PGDIR(r2) | 473 | lwz r2,PGDIR(r2) |
477 | blt+ 112f | 474 | blt+ 112f |
475 | mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ | ||
476 | rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ | ||
478 | lis r2,swapper_pg_dir@ha /* if kernel address, use */ | 477 | lis r2,swapper_pg_dir@ha /* if kernel address, use */ |
479 | addi r2,r2,swapper_pg_dir@l /* kernel page table */ | 478 | addi r2,r2,swapper_pg_dir@l /* kernel page table */ |
480 | mfspr r1,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ | ||
481 | rlwinm r1,r1,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ | ||
482 | 112: tophys(r2,r2) | 479 | 112: tophys(r2,r2) |
483 | rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ | 480 | rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ |
484 | lwz r2,0(r2) /* get pmd entry */ | 481 | lwz r2,0(r2) /* get pmd entry */ |
@@ -549,10 +546,10 @@ DataLoadTLBMiss: | |||
549 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ | 546 | li r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */ |
550 | lwz r2,PGDIR(r2) | 547 | lwz r2,PGDIR(r2) |
551 | blt+ 112f | 548 | blt+ 112f |
549 | mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ | ||
550 | rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ | ||
552 | lis r2,swapper_pg_dir@ha /* if kernel address, use */ | 551 | lis r2,swapper_pg_dir@ha /* if kernel address, use */ |
553 | addi r2,r2,swapper_pg_dir@l /* kernel page table */ | 552 | addi r2,r2,swapper_pg_dir@l /* kernel page table */ |
554 | mfspr r1,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ | ||
555 | rlwinm r1,r1,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ | ||
556 | 112: tophys(r2,r2) | 553 | 112: tophys(r2,r2) |
557 | rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ | 554 | rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ |
558 | lwz r2,0(r2) /* get pmd entry */ | 555 | lwz r2,0(r2) /* get pmd entry */ |
@@ -621,10 +618,10 @@ DataStoreTLBMiss: | |||
621 | li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */ | 618 | li r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */ |
622 | lwz r2,PGDIR(r2) | 619 | lwz r2,PGDIR(r2) |
623 | blt+ 112f | 620 | blt+ 112f |
621 | mfspr r2,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ | ||
622 | rlwimi r1,r2,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ | ||
624 | lis r2,swapper_pg_dir@ha /* if kernel address, use */ | 623 | lis r2,swapper_pg_dir@ha /* if kernel address, use */ |
625 | addi r2,r2,swapper_pg_dir@l /* kernel page table */ | 624 | addi r2,r2,swapper_pg_dir@l /* kernel page table */ |
626 | mfspr r1,SPRN_SRR1 /* and MSR_PR bit from SRR1 */ | ||
627 | rlwinm r1,r1,32-12,29,29 /* shift MSR_PR to _PAGE_USER posn */ | ||
628 | 112: tophys(r2,r2) | 625 | 112: tophys(r2,r2) |
629 | rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ | 626 | rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ |
630 | lwz r2,0(r2) /* get pmd entry */ | 627 | lwz r2,0(r2) /* get pmd entry */ |
@@ -841,7 +838,7 @@ relocate_kernel: | |||
841 | * r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset | 838 | * r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset |
842 | * on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5. | 839 | * on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5. |
843 | */ | 840 | */ |
844 | _GLOBAL(copy_and_flush) | 841 | _ENTRY(copy_and_flush) |
845 | addi r5,r5,-4 | 842 | addi r5,r5,-4 |
846 | addi r6,r6,-4 | 843 | addi r6,r6,-4 |
847 | 4: li r0,L1_CACHE_BYTES/4 | 844 | 4: li r0,L1_CACHE_BYTES/4 |
@@ -954,9 +951,9 @@ __secondary_start: | |||
954 | * included in CONFIG_6xx | 951 | * included in CONFIG_6xx |
955 | */ | 952 | */ |
956 | #if !defined(CONFIG_6xx) | 953 | #if !defined(CONFIG_6xx) |
957 | _GLOBAL(__save_cpu_setup) | 954 | _ENTRY(__save_cpu_setup) |
958 | blr | 955 | blr |
959 | _GLOBAL(__restore_cpu_setup) | 956 | _ENTRY(__restore_cpu_setup) |
960 | blr | 957 | blr |
961 | #endif /* !defined(CONFIG_6xx) */ | 958 | #endif /* !defined(CONFIG_6xx) */ |
962 | 959 | ||
@@ -1080,7 +1077,7 @@ start_here: | |||
1080 | /* | 1077 | /* |
1081 | * Set up the segment registers for a new context. | 1078 | * Set up the segment registers for a new context. |
1082 | */ | 1079 | */ |
1083 | _GLOBAL(set_context) | 1080 | _ENTRY(set_context) |
1084 | mulli r3,r3,897 /* multiply context by skew factor */ | 1081 | mulli r3,r3,897 /* multiply context by skew factor */ |
1085 | rlwinm r3,r3,4,8,27 /* VSID = (context & 0xfffff) << 4 */ | 1082 | rlwinm r3,r3,4,8,27 /* VSID = (context & 0xfffff) << 4 */ |
1086 | addis r3,r3,0x6000 /* Set Ks, Ku bits */ | 1083 | addis r3,r3,0x6000 /* Set Ks, Ku bits */ |
@@ -1300,14 +1297,6 @@ empty_zero_page: | |||
1300 | swapper_pg_dir: | 1297 | swapper_pg_dir: |
1301 | .space 4096 | 1298 | .space 4096 |
1302 | 1299 | ||
1303 | /* | ||
1304 | * This space gets a copy of optional info passed to us by the bootstrap | ||
1305 | * Used to pass parameters into the kernel like root=/dev/sda1, etc. | ||
1306 | */ | ||
1307 | .globl cmd_line | ||
1308 | cmd_line: | ||
1309 | .space 512 | ||
1310 | |||
1311 | .globl intercept_table | 1300 | .globl intercept_table |
1312 | intercept_table: | 1301 | intercept_table: |
1313 | .long 0, 0, i0x200, i0x300, i0x400, 0, i0x600, i0x700 | 1302 | .long 0, 0, i0x200, i0x300, i0x400, 0, i0x600, i0x700 |
diff --git a/arch/powerpc/kernel/head_4xx.S b/arch/powerpc/kernel/head_40x.S index adc7f8097cd4..e312824bdd98 100644 --- a/arch/powerpc/kernel/head_4xx.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/page.h> | 35 | #include <asm/page.h> |
36 | #include <asm/mmu.h> | 36 | #include <asm/mmu.h> |
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/ibm4xx.h> | ||
39 | #include <asm/cputable.h> | 38 | #include <asm/cputable.h> |
40 | #include <asm/thread_info.h> | 39 | #include <asm/thread_info.h> |
41 | #include <asm/ppc_asm.h> | 40 | #include <asm/ppc_asm.h> |
@@ -53,9 +52,9 @@ | |||
53 | * | 52 | * |
54 | * This is all going to change RSN when we add bi_recs....... -- Dan | 53 | * This is all going to change RSN when we add bi_recs....... -- Dan |
55 | */ | 54 | */ |
56 | .text | 55 | .section .text.head, "ax" |
57 | _GLOBAL(_stext) | 56 | _ENTRY(_stext); |
58 | _GLOBAL(_start) | 57 | _ENTRY(_start); |
59 | 58 | ||
60 | /* Save parameters we are passed. | 59 | /* Save parameters we are passed. |
61 | */ | 60 | */ |
@@ -90,9 +89,9 @@ turn_on_mmu: | |||
90 | */ | 89 | */ |
91 | . = 0xc0 | 90 | . = 0xc0 |
92 | crit_save: | 91 | crit_save: |
93 | _GLOBAL(crit_r10) | 92 | _ENTRY(crit_r10) |
94 | .space 4 | 93 | .space 4 |
95 | _GLOBAL(crit_r11) | 94 | _ENTRY(crit_r11) |
96 | .space 4 | 95 | .space 4 |
97 | 96 | ||
98 | /* | 97 | /* |
@@ -772,7 +771,7 @@ finish_tlb_load: | |||
772 | */ | 771 | */ |
773 | lwz r9, tlb_4xx_index@l(0) | 772 | lwz r9, tlb_4xx_index@l(0) |
774 | addi r9, r9, 1 | 773 | addi r9, r9, 1 |
775 | andi. r9, r9, (PPC4XX_TLB_SIZE-1) | 774 | andi. r9, r9, (PPC40X_TLB_SIZE-1) |
776 | stw r9, tlb_4xx_index@l(0) | 775 | stw r9, tlb_4xx_index@l(0) |
777 | 776 | ||
778 | 6: | 777 | 6: |
@@ -815,7 +814,7 @@ finish_tlb_load: | |||
815 | * The PowerPC 4xx family of processors do not have an FPU, so this just | 814 | * The PowerPC 4xx family of processors do not have an FPU, so this just |
816 | * returns. | 815 | * returns. |
817 | */ | 816 | */ |
818 | _GLOBAL(giveup_fpu) | 817 | _ENTRY(giveup_fpu) |
819 | blr | 818 | blr |
820 | 819 | ||
821 | /* This is where the main kernel code starts. | 820 | /* This is where the main kernel code starts. |
@@ -1007,13 +1006,6 @@ critical_stack_top: | |||
1007 | .globl exception_stack_top | 1006 | .globl exception_stack_top |
1008 | exception_stack_top: | 1007 | exception_stack_top: |
1009 | 1008 | ||
1010 | /* This space gets a copy of optional info passed to us by the bootstrap | ||
1011 | * which is used to pass parameters into the kernel like root=/dev/sda1, etc. | ||
1012 | */ | ||
1013 | .globl cmd_line | ||
1014 | cmd_line: | ||
1015 | .space 512 | ||
1016 | |||
1017 | /* Room for two PTE pointers, usually the kernel and current user pointers | 1009 | /* Room for two PTE pointers, usually the kernel and current user pointers |
1018 | * to their respective root page table. | 1010 | * to their respective root page table. |
1019 | */ | 1011 | */ |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 88695963f587..c6a510bdefd4 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -50,9 +50,9 @@ | |||
50 | * r7 - End of kernel command line string | 50 | * r7 - End of kernel command line string |
51 | * | 51 | * |
52 | */ | 52 | */ |
53 | .text | 53 | .section .text.head, "ax" |
54 | _GLOBAL(_stext) | 54 | _ENTRY(_stext); |
55 | _GLOBAL(_start) | 55 | _ENTRY(_start); |
56 | /* | 56 | /* |
57 | * Reserve a word at a fixed location to store the address | 57 | * Reserve a word at a fixed location to store the address |
58 | * of abatron_pteptrs | 58 | * of abatron_pteptrs |
@@ -217,7 +217,7 @@ skpinv: addi r4,r4,1 /* Increment */ | |||
217 | lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */ | 217 | lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */ |
218 | mtspr SPRN_IVPR,r4 | 218 | mtspr SPRN_IVPR,r4 |
219 | 219 | ||
220 | #ifdef CONFIG_440EP | 220 | #if defined(CONFIG_440EP) || defined(CONFIG_440EPX) |
221 | /* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */ | 221 | /* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */ |
222 | mfspr r2,SPRN_CCR0 | 222 | mfspr r2,SPRN_CCR0 |
223 | lis r3,0xffef | 223 | lis r3,0xffef |
@@ -744,14 +744,6 @@ exception_stack_bottom: | |||
744 | exception_stack_top: | 744 | exception_stack_top: |
745 | 745 | ||
746 | /* | 746 | /* |
747 | * This space gets a copy of optional info passed to us by the bootstrap | ||
748 | * which is used to pass parameters into the kernel like root=/dev/sda1, etc. | ||
749 | */ | ||
750 | .globl cmd_line | ||
751 | cmd_line: | ||
752 | .space 512 | ||
753 | |||
754 | /* | ||
755 | * Room for two PTE pointers, usually the kernel and current user pointers | 747 | * Room for two PTE pointers, usually the kernel and current user pointers |
756 | * to their respective root page table. | 748 | * to their respective root page table. |
757 | */ | 749 | */ |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 171800002ede..22ac245bd59a 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <asm/iseries/lpar_map.h> | 34 | #include <asm/iseries/lpar_map.h> |
35 | #include <asm/thread_info.h> | 35 | #include <asm/thread_info.h> |
36 | #include <asm/firmware.h> | 36 | #include <asm/firmware.h> |
37 | #include <asm/page_64.h> | ||
38 | #include <asm/exception.h> | ||
37 | 39 | ||
38 | #define DO_SOFT_DISABLE | 40 | #define DO_SOFT_DISABLE |
39 | 41 | ||
@@ -144,344 +146,9 @@ exception_marker: | |||
144 | .text | 146 | .text |
145 | 147 | ||
146 | /* | 148 | /* |
147 | * The following macros define the code that appears as | ||
148 | * the prologue to each of the exception handlers. They | ||
149 | * are split into two parts to allow a single kernel binary | ||
150 | * to be used for pSeries and iSeries. | ||
151 | * LOL. One day... - paulus | ||
152 | */ | ||
153 | |||
154 | /* | ||
155 | * We make as much of the exception code common between native | ||
156 | * exception handlers (including pSeries LPAR) and iSeries LPAR | ||
157 | * implementations as possible. | ||
158 | */ | ||
159 | |||
160 | /* | ||
161 | * This is the start of the interrupt handlers for pSeries | 149 | * This is the start of the interrupt handlers for pSeries |
162 | * This code runs with relocation off. | 150 | * This code runs with relocation off. |
163 | */ | 151 | */ |
164 | #define EX_R9 0 | ||
165 | #define EX_R10 8 | ||
166 | #define EX_R11 16 | ||
167 | #define EX_R12 24 | ||
168 | #define EX_R13 32 | ||
169 | #define EX_SRR0 40 | ||
170 | #define EX_DAR 48 | ||
171 | #define EX_DSISR 56 | ||
172 | #define EX_CCR 60 | ||
173 | #define EX_R3 64 | ||
174 | #define EX_LR 72 | ||
175 | |||
176 | /* | ||
177 | * We're short on space and time in the exception prolog, so we can't | ||
178 | * use the normal SET_REG_IMMEDIATE macro. Normally we just need the | ||
179 | * low halfword of the address, but for Kdump we need the whole low | ||
180 | * word. | ||
181 | */ | ||
182 | #ifdef CONFIG_CRASH_DUMP | ||
183 | #define LOAD_HANDLER(reg, label) \ | ||
184 | oris reg,reg,(label)@h; /* virt addr of handler ... */ \ | ||
185 | ori reg,reg,(label)@l; /* .. and the rest */ | ||
186 | #else | ||
187 | #define LOAD_HANDLER(reg, label) \ | ||
188 | ori reg,reg,(label)@l; /* virt addr of handler ... */ | ||
189 | #endif | ||
190 | |||
191 | /* | ||
192 | * Equal to EXCEPTION_PROLOG_PSERIES, except that it forces 64bit mode. | ||
193 | * The firmware calls the registered system_reset_fwnmi and | ||
194 | * machine_check_fwnmi handlers in 32bit mode if the cpu happens to run | ||
195 | * a 32bit application at the time of the event. | ||
196 | * This firmware bug is present on POWER4 and JS20. | ||
197 | */ | ||
198 | #define EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(area, label) \ | ||
199 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
200 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
201 | std r10,area+EX_R10(r13); \ | ||
202 | std r11,area+EX_R11(r13); \ | ||
203 | std r12,area+EX_R12(r13); \ | ||
204 | mfspr r9,SPRN_SPRG1; \ | ||
205 | std r9,area+EX_R13(r13); \ | ||
206 | mfcr r9; \ | ||
207 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
208 | mfmsr r10; \ | ||
209 | /* force 64bit mode */ \ | ||
210 | li r11,5; /* MSR_SF_LG|MSR_ISF_LG */ \ | ||
211 | rldimi r10,r11,61,0; /* insert into top 3 bits */ \ | ||
212 | /* done 64bit mode */ \ | ||
213 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
214 | LOAD_HANDLER(r12,label) \ | ||
215 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
216 | mtspr SPRN_SRR0,r12; \ | ||
217 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
218 | mtspr SPRN_SRR1,r10; \ | ||
219 | rfid; \ | ||
220 | b . /* prevent speculative execution */ | ||
221 | |||
222 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | ||
223 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
224 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
225 | std r10,area+EX_R10(r13); \ | ||
226 | std r11,area+EX_R11(r13); \ | ||
227 | std r12,area+EX_R12(r13); \ | ||
228 | mfspr r9,SPRN_SPRG1; \ | ||
229 | std r9,area+EX_R13(r13); \ | ||
230 | mfcr r9; \ | ||
231 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
232 | mfmsr r10; \ | ||
233 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
234 | LOAD_HANDLER(r12,label) \ | ||
235 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
236 | mtspr SPRN_SRR0,r12; \ | ||
237 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
238 | mtspr SPRN_SRR1,r10; \ | ||
239 | rfid; \ | ||
240 | b . /* prevent speculative execution */ | ||
241 | |||
242 | /* | ||
243 | * This is the start of the interrupt handlers for iSeries | ||
244 | * This code runs with relocation on. | ||
245 | */ | ||
246 | #define EXCEPTION_PROLOG_ISERIES_1(area) \ | ||
247 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
248 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
249 | std r10,area+EX_R10(r13); \ | ||
250 | std r11,area+EX_R11(r13); \ | ||
251 | std r12,area+EX_R12(r13); \ | ||
252 | mfspr r9,SPRN_SPRG1; \ | ||
253 | std r9,area+EX_R13(r13); \ | ||
254 | mfcr r9 | ||
255 | |||
256 | #define EXCEPTION_PROLOG_ISERIES_2 \ | ||
257 | mfmsr r10; \ | ||
258 | ld r12,PACALPPACAPTR(r13); \ | ||
259 | ld r11,LPPACASRR0(r12); \ | ||
260 | ld r12,LPPACASRR1(r12); \ | ||
261 | ori r10,r10,MSR_RI; \ | ||
262 | mtmsrd r10,1 | ||
263 | |||
264 | /* | ||
265 | * The common exception prolog is used for all except a few exceptions | ||
266 | * such as a segment miss on a kernel address. We have to be prepared | ||
267 | * to take another exception from the point where we first touch the | ||
268 | * kernel stack onwards. | ||
269 | * | ||
270 | * On entry r13 points to the paca, r9-r13 are saved in the paca, | ||
271 | * r9 contains the saved CR, r11 and r12 contain the saved SRR0 and | ||
272 | * SRR1, and relocation is on. | ||
273 | */ | ||
274 | #define EXCEPTION_PROLOG_COMMON(n, area) \ | ||
275 | andi. r10,r12,MSR_PR; /* See if coming from user */ \ | ||
276 | mr r10,r1; /* Save r1 */ \ | ||
277 | subi r1,r1,INT_FRAME_SIZE; /* alloc frame on kernel stack */ \ | ||
278 | beq- 1f; \ | ||
279 | ld r1,PACAKSAVE(r13); /* kernel stack to use */ \ | ||
280 | 1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ | ||
281 | bge- cr1,2f; /* abort if it is */ \ | ||
282 | b 3f; \ | ||
283 | 2: li r1,(n); /* will be reloaded later */ \ | ||
284 | sth r1,PACA_TRAP_SAVE(r13); \ | ||
285 | b bad_stack; \ | ||
286 | 3: std r9,_CCR(r1); /* save CR in stackframe */ \ | ||
287 | std r11,_NIP(r1); /* save SRR0 in stackframe */ \ | ||
288 | std r12,_MSR(r1); /* save SRR1 in stackframe */ \ | ||
289 | std r10,0(r1); /* make stack chain pointer */ \ | ||
290 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | ||
291 | std r10,GPR1(r1); /* save r1 in stackframe */ \ | ||
292 | ACCOUNT_CPU_USER_ENTRY(r9, r10); \ | ||
293 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | ||
294 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | ||
295 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | ||
296 | ld r9,area+EX_R9(r13); /* move r9, r10 to stackframe */ \ | ||
297 | ld r10,area+EX_R10(r13); \ | ||
298 | std r9,GPR9(r1); \ | ||
299 | std r10,GPR10(r1); \ | ||
300 | ld r9,area+EX_R11(r13); /* move r11 - r13 to stackframe */ \ | ||
301 | ld r10,area+EX_R12(r13); \ | ||
302 | ld r11,area+EX_R13(r13); \ | ||
303 | std r9,GPR11(r1); \ | ||
304 | std r10,GPR12(r1); \ | ||
305 | std r11,GPR13(r1); \ | ||
306 | ld r2,PACATOC(r13); /* get kernel TOC into r2 */ \ | ||
307 | mflr r9; /* save LR in stackframe */ \ | ||
308 | std r9,_LINK(r1); \ | ||
309 | mfctr r10; /* save CTR in stackframe */ \ | ||
310 | std r10,_CTR(r1); \ | ||
311 | lbz r10,PACASOFTIRQEN(r13); \ | ||
312 | mfspr r11,SPRN_XER; /* save XER in stackframe */ \ | ||
313 | std r10,SOFTE(r1); \ | ||
314 | std r11,_XER(r1); \ | ||
315 | li r9,(n)+1; \ | ||
316 | std r9,_TRAP(r1); /* set trap number */ \ | ||
317 | li r10,0; \ | ||
318 | ld r11,exception_marker@toc(r2); \ | ||
319 | std r10,RESULT(r1); /* clear regs->result */ \ | ||
320 | std r11,STACK_FRAME_OVERHEAD-16(r1); /* mark the frame */ | ||
321 | |||
322 | /* | ||
323 | * Exception vectors. | ||
324 | */ | ||
325 | #define STD_EXCEPTION_PSERIES(n, label) \ | ||
326 | . = n; \ | ||
327 | .globl label##_pSeries; \ | ||
328 | label##_pSeries: \ | ||
329 | HMT_MEDIUM; \ | ||
330 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
331 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | ||
332 | |||
333 | #define HSTD_EXCEPTION_PSERIES(n, label) \ | ||
334 | . = n; \ | ||
335 | .globl label##_pSeries; \ | ||
336 | label##_pSeries: \ | ||
337 | HMT_MEDIUM; \ | ||
338 | mtspr SPRN_SPRG1,r20; /* save r20 */ \ | ||
339 | mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ | ||
340 | mtspr SPRN_SRR0,r20; \ | ||
341 | mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ | ||
342 | mtspr SPRN_SRR1,r20; \ | ||
343 | mfspr r20,SPRN_SPRG1; /* restore r20 */ \ | ||
344 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
345 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | ||
346 | |||
347 | |||
348 | #define MASKABLE_EXCEPTION_PSERIES(n, label) \ | ||
349 | . = n; \ | ||
350 | .globl label##_pSeries; \ | ||
351 | label##_pSeries: \ | ||
352 | HMT_MEDIUM; \ | ||
353 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
354 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
355 | std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ | ||
356 | std r10,PACA_EXGEN+EX_R10(r13); \ | ||
357 | lbz r10,PACASOFTIRQEN(r13); \ | ||
358 | mfcr r9; \ | ||
359 | cmpwi r10,0; \ | ||
360 | beq masked_interrupt; \ | ||
361 | mfspr r10,SPRN_SPRG1; \ | ||
362 | std r10,PACA_EXGEN+EX_R13(r13); \ | ||
363 | std r11,PACA_EXGEN+EX_R11(r13); \ | ||
364 | std r12,PACA_EXGEN+EX_R12(r13); \ | ||
365 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
366 | mfmsr r10; \ | ||
367 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
368 | LOAD_HANDLER(r12,label##_common) \ | ||
369 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
370 | mtspr SPRN_SRR0,r12; \ | ||
371 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
372 | mtspr SPRN_SRR1,r10; \ | ||
373 | rfid; \ | ||
374 | b . /* prevent speculative execution */ | ||
375 | |||
376 | #define STD_EXCEPTION_ISERIES(n, label, area) \ | ||
377 | .globl label##_iSeries; \ | ||
378 | label##_iSeries: \ | ||
379 | HMT_MEDIUM; \ | ||
380 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
381 | EXCEPTION_PROLOG_ISERIES_1(area); \ | ||
382 | EXCEPTION_PROLOG_ISERIES_2; \ | ||
383 | b label##_common | ||
384 | |||
385 | #define MASKABLE_EXCEPTION_ISERIES(n, label) \ | ||
386 | .globl label##_iSeries; \ | ||
387 | label##_iSeries: \ | ||
388 | HMT_MEDIUM; \ | ||
389 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
390 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \ | ||
391 | lbz r10,PACASOFTIRQEN(r13); \ | ||
392 | cmpwi 0,r10,0; \ | ||
393 | beq- label##_iSeries_masked; \ | ||
394 | EXCEPTION_PROLOG_ISERIES_2; \ | ||
395 | b label##_common; \ | ||
396 | |||
397 | #ifdef CONFIG_PPC_ISERIES | ||
398 | #define DISABLE_INTS \ | ||
399 | li r11,0; \ | ||
400 | stb r11,PACASOFTIRQEN(r13); \ | ||
401 | BEGIN_FW_FTR_SECTION; \ | ||
402 | stb r11,PACAHARDIRQEN(r13); \ | ||
403 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES); \ | ||
404 | BEGIN_FW_FTR_SECTION; \ | ||
405 | mfmsr r10; \ | ||
406 | ori r10,r10,MSR_EE; \ | ||
407 | mtmsrd r10,1; \ | ||
408 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
409 | |||
410 | #else | ||
411 | #define DISABLE_INTS \ | ||
412 | li r11,0; \ | ||
413 | stb r11,PACASOFTIRQEN(r13); \ | ||
414 | stb r11,PACAHARDIRQEN(r13) | ||
415 | |||
416 | #endif /* CONFIG_PPC_ISERIES */ | ||
417 | |||
418 | #define ENABLE_INTS \ | ||
419 | ld r12,_MSR(r1); \ | ||
420 | mfmsr r11; \ | ||
421 | rlwimi r11,r12,0,MSR_EE; \ | ||
422 | mtmsrd r11,1 | ||
423 | |||
424 | #define STD_EXCEPTION_COMMON(trap, label, hdlr) \ | ||
425 | .align 7; \ | ||
426 | .globl label##_common; \ | ||
427 | label##_common: \ | ||
428 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
429 | DISABLE_INTS; \ | ||
430 | bl .save_nvgprs; \ | ||
431 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
432 | bl hdlr; \ | ||
433 | b .ret_from_except | ||
434 | |||
435 | /* | ||
436 | * Like STD_EXCEPTION_COMMON, but for exceptions that can occur | ||
437 | * in the idle task and therefore need the special idle handling. | ||
438 | */ | ||
439 | #define STD_EXCEPTION_COMMON_IDLE(trap, label, hdlr) \ | ||
440 | .align 7; \ | ||
441 | .globl label##_common; \ | ||
442 | label##_common: \ | ||
443 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
444 | FINISH_NAP; \ | ||
445 | DISABLE_INTS; \ | ||
446 | bl .save_nvgprs; \ | ||
447 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
448 | bl hdlr; \ | ||
449 | b .ret_from_except | ||
450 | |||
451 | #define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr) \ | ||
452 | .align 7; \ | ||
453 | .globl label##_common; \ | ||
454 | label##_common: \ | ||
455 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
456 | FINISH_NAP; \ | ||
457 | DISABLE_INTS; \ | ||
458 | bl .ppc64_runlatch_on; \ | ||
459 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
460 | bl hdlr; \ | ||
461 | b .ret_from_except_lite | ||
462 | |||
463 | /* | ||
464 | * When the idle code in power4_idle puts the CPU into NAP mode, | ||
465 | * it has to do so in a loop, and relies on the external interrupt | ||
466 | * and decrementer interrupt entry code to get it out of the loop. | ||
467 | * It sets the _TLF_NAPPING bit in current_thread_info()->local_flags | ||
468 | * to signal that it is in the loop and needs help to get out. | ||
469 | */ | ||
470 | #ifdef CONFIG_PPC_970_NAP | ||
471 | #define FINISH_NAP \ | ||
472 | BEGIN_FTR_SECTION \ | ||
473 | clrrdi r11,r1,THREAD_SHIFT; \ | ||
474 | ld r9,TI_LOCAL_FLAGS(r11); \ | ||
475 | andi. r10,r9,_TLF_NAPPING; \ | ||
476 | bnel power4_fixup_nap; \ | ||
477 | END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) | ||
478 | #else | ||
479 | #define FINISH_NAP | ||
480 | #endif | ||
481 | |||
482 | /* | ||
483 | * Start of pSeries system interrupt routines | ||
484 | */ | ||
485 | . = 0x100 | 152 | . = 0x100 |
486 | .globl __start_interrupts | 153 | .globl __start_interrupts |
487 | __start_interrupts: | 154 | __start_interrupts: |
@@ -674,6 +341,7 @@ slb_miss_user_pseries: | |||
674 | b . /* prevent spec. execution */ | 341 | b . /* prevent spec. execution */ |
675 | #endif /* __DISABLED__ */ | 342 | #endif /* __DISABLED__ */ |
676 | 343 | ||
344 | #ifdef CONFIG_PPC_PSERIES | ||
677 | /* | 345 | /* |
678 | * Vectors for the FWNMI option. Share common code. | 346 | * Vectors for the FWNMI option. Share common code. |
679 | */ | 347 | */ |
@@ -691,191 +359,7 @@ machine_check_fwnmi: | |||
691 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 359 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
692 | EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common) | 360 | EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common) |
693 | 361 | ||
694 | #ifdef CONFIG_PPC_ISERIES | 362 | #endif /* CONFIG_PPC_PSERIES */ |
695 | /*** ISeries-LPAR interrupt handlers ***/ | ||
696 | |||
697 | STD_EXCEPTION_ISERIES(0x200, machine_check, PACA_EXMC) | ||
698 | |||
699 | .globl data_access_iSeries | ||
700 | data_access_iSeries: | ||
701 | mtspr SPRN_SPRG1,r13 | ||
702 | BEGIN_FTR_SECTION | ||
703 | mtspr SPRN_SPRG2,r12 | ||
704 | mfspr r13,SPRN_DAR | ||
705 | mfspr r12,SPRN_DSISR | ||
706 | srdi r13,r13,60 | ||
707 | rlwimi r13,r12,16,0x20 | ||
708 | mfcr r12 | ||
709 | cmpwi r13,0x2c | ||
710 | beq .do_stab_bolted_iSeries | ||
711 | mtcrf 0x80,r12 | ||
712 | mfspr r12,SPRN_SPRG2 | ||
713 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | ||
714 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN) | ||
715 | EXCEPTION_PROLOG_ISERIES_2 | ||
716 | b data_access_common | ||
717 | |||
718 | .do_stab_bolted_iSeries: | ||
719 | mtcrf 0x80,r12 | ||
720 | mfspr r12,SPRN_SPRG2 | ||
721 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB) | ||
722 | EXCEPTION_PROLOG_ISERIES_2 | ||
723 | b .do_stab_bolted | ||
724 | |||
725 | .globl data_access_slb_iSeries | ||
726 | data_access_slb_iSeries: | ||
727 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
728 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
729 | std r3,PACA_EXSLB+EX_R3(r13) | ||
730 | mfspr r3,SPRN_DAR | ||
731 | std r9,PACA_EXSLB+EX_R9(r13) | ||
732 | mfcr r9 | ||
733 | #ifdef __DISABLED__ | ||
734 | cmpdi r3,0 | ||
735 | bge slb_miss_user_iseries | ||
736 | #endif | ||
737 | std r10,PACA_EXSLB+EX_R10(r13) | ||
738 | std r11,PACA_EXSLB+EX_R11(r13) | ||
739 | std r12,PACA_EXSLB+EX_R12(r13) | ||
740 | mfspr r10,SPRN_SPRG1 | ||
741 | std r10,PACA_EXSLB+EX_R13(r13) | ||
742 | ld r12,PACALPPACAPTR(r13) | ||
743 | ld r12,LPPACASRR1(r12) | ||
744 | b .slb_miss_realmode | ||
745 | |||
746 | STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN) | ||
747 | |||
748 | .globl instruction_access_slb_iSeries | ||
749 | instruction_access_slb_iSeries: | ||
750 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
751 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
752 | std r3,PACA_EXSLB+EX_R3(r13) | ||
753 | ld r3,PACALPPACAPTR(r13) | ||
754 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ | ||
755 | std r9,PACA_EXSLB+EX_R9(r13) | ||
756 | mfcr r9 | ||
757 | #ifdef __DISABLED__ | ||
758 | cmpdi r3,0 | ||
759 | bge .slb_miss_user_iseries | ||
760 | #endif | ||
761 | std r10,PACA_EXSLB+EX_R10(r13) | ||
762 | std r11,PACA_EXSLB+EX_R11(r13) | ||
763 | std r12,PACA_EXSLB+EX_R12(r13) | ||
764 | mfspr r10,SPRN_SPRG1 | ||
765 | std r10,PACA_EXSLB+EX_R13(r13) | ||
766 | ld r12,PACALPPACAPTR(r13) | ||
767 | ld r12,LPPACASRR1(r12) | ||
768 | b .slb_miss_realmode | ||
769 | |||
770 | #ifdef __DISABLED__ | ||
771 | slb_miss_user_iseries: | ||
772 | std r10,PACA_EXGEN+EX_R10(r13) | ||
773 | std r11,PACA_EXGEN+EX_R11(r13) | ||
774 | std r12,PACA_EXGEN+EX_R12(r13) | ||
775 | mfspr r10,SPRG1 | ||
776 | ld r11,PACA_EXSLB+EX_R9(r13) | ||
777 | ld r12,PACA_EXSLB+EX_R3(r13) | ||
778 | std r10,PACA_EXGEN+EX_R13(r13) | ||
779 | std r11,PACA_EXGEN+EX_R9(r13) | ||
780 | std r12,PACA_EXGEN+EX_R3(r13) | ||
781 | EXCEPTION_PROLOG_ISERIES_2 | ||
782 | b slb_miss_user_common | ||
783 | #endif | ||
784 | |||
785 | MASKABLE_EXCEPTION_ISERIES(0x500, hardware_interrupt) | ||
786 | STD_EXCEPTION_ISERIES(0x600, alignment, PACA_EXGEN) | ||
787 | STD_EXCEPTION_ISERIES(0x700, program_check, PACA_EXGEN) | ||
788 | STD_EXCEPTION_ISERIES(0x800, fp_unavailable, PACA_EXGEN) | ||
789 | MASKABLE_EXCEPTION_ISERIES(0x900, decrementer) | ||
790 | STD_EXCEPTION_ISERIES(0xa00, trap_0a, PACA_EXGEN) | ||
791 | STD_EXCEPTION_ISERIES(0xb00, trap_0b, PACA_EXGEN) | ||
792 | |||
793 | .globl system_call_iSeries | ||
794 | system_call_iSeries: | ||
795 | mr r9,r13 | ||
796 | mfspr r13,SPRN_SPRG3 | ||
797 | EXCEPTION_PROLOG_ISERIES_2 | ||
798 | b system_call_common | ||
799 | |||
800 | STD_EXCEPTION_ISERIES( 0xd00, single_step, PACA_EXGEN) | ||
801 | STD_EXCEPTION_ISERIES( 0xe00, trap_0e, PACA_EXGEN) | ||
802 | STD_EXCEPTION_ISERIES( 0xf00, performance_monitor, PACA_EXGEN) | ||
803 | |||
804 | .globl system_reset_iSeries | ||
805 | system_reset_iSeries: | ||
806 | mfspr r13,SPRN_SPRG3 /* Get paca address */ | ||
807 | mfmsr r24 | ||
808 | ori r24,r24,MSR_RI | ||
809 | mtmsrd r24 /* RI on */ | ||
810 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | ||
811 | cmpwi 0,r24,0 /* Are we processor 0? */ | ||
812 | bne 1f | ||
813 | b .__start_initialization_iSeries /* Start up the first processor */ | ||
814 | 1: mfspr r4,SPRN_CTRLF | ||
815 | li r5,CTRL_RUNLATCH /* Turn off the run light */ | ||
816 | andc r4,r4,r5 | ||
817 | mtspr SPRN_CTRLT,r4 | ||
818 | |||
819 | 1: | ||
820 | HMT_LOW | ||
821 | #ifdef CONFIG_SMP | ||
822 | lbz r23,PACAPROCSTART(r13) /* Test if this processor | ||
823 | * should start */ | ||
824 | sync | ||
825 | LOAD_REG_IMMEDIATE(r3,current_set) | ||
826 | sldi r28,r24,3 /* get current_set[cpu#] */ | ||
827 | ldx r3,r3,r28 | ||
828 | addi r1,r3,THREAD_SIZE | ||
829 | subi r1,r1,STACK_FRAME_OVERHEAD | ||
830 | |||
831 | cmpwi 0,r23,0 | ||
832 | beq iSeries_secondary_smp_loop /* Loop until told to go */ | ||
833 | bne __secondary_start /* Loop until told to go */ | ||
834 | iSeries_secondary_smp_loop: | ||
835 | /* Let the Hypervisor know we are alive */ | ||
836 | /* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */ | ||
837 | lis r3,0x8002 | ||
838 | rldicr r3,r3,32,15 /* r0 = (r3 << 32) & 0xffff000000000000 */ | ||
839 | #else /* CONFIG_SMP */ | ||
840 | /* Yield the processor. This is required for non-SMP kernels | ||
841 | which are running on multi-threaded machines. */ | ||
842 | lis r3,0x8000 | ||
843 | rldicr r3,r3,32,15 /* r3 = (r3 << 32) & 0xffff000000000000 */ | ||
844 | addi r3,r3,18 /* r3 = 0x8000000000000012 which is "yield" */ | ||
845 | li r4,0 /* "yield timed" */ | ||
846 | li r5,-1 /* "yield forever" */ | ||
847 | #endif /* CONFIG_SMP */ | ||
848 | li r0,-1 /* r0=-1 indicates a Hypervisor call */ | ||
849 | sc /* Invoke the hypervisor via a system call */ | ||
850 | mfspr r13,SPRN_SPRG3 /* Put r13 back ???? */ | ||
851 | b 1b /* If SMP not configured, secondaries | ||
852 | * loop forever */ | ||
853 | |||
854 | decrementer_iSeries_masked: | ||
855 | /* We may not have a valid TOC pointer in here. */ | ||
856 | li r11,1 | ||
857 | ld r12,PACALPPACAPTR(r13) | ||
858 | stb r11,LPPACADECRINT(r12) | ||
859 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) | ||
860 | lwz r12,0(r12) | ||
861 | mtspr SPRN_DEC,r12 | ||
862 | /* fall through */ | ||
863 | |||
864 | hardware_interrupt_iSeries_masked: | ||
865 | mtcrf 0x80,r9 /* Restore regs */ | ||
866 | ld r12,PACALPPACAPTR(r13) | ||
867 | ld r11,LPPACASRR0(r12) | ||
868 | ld r12,LPPACASRR1(r12) | ||
869 | mtspr SPRN_SRR0,r11 | ||
870 | mtspr SPRN_SRR1,r12 | ||
871 | ld r9,PACA_EXGEN+EX_R9(r13) | ||
872 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
873 | ld r11,PACA_EXGEN+EX_R11(r13) | ||
874 | ld r12,PACA_EXGEN+EX_R12(r13) | ||
875 | ld r13,PACA_EXGEN+EX_R13(r13) | ||
876 | rfid | ||
877 | b . /* prevent speculative execution */ | ||
878 | #endif /* CONFIG_PPC_ISERIES */ | ||
879 | 363 | ||
880 | /*** Common interrupt handlers ***/ | 364 | /*** Common interrupt handlers ***/ |
881 | 365 | ||
@@ -1175,7 +659,9 @@ hardware_interrupt_common: | |||
1175 | FINISH_NAP | 659 | FINISH_NAP |
1176 | hardware_interrupt_entry: | 660 | hardware_interrupt_entry: |
1177 | DISABLE_INTS | 661 | DISABLE_INTS |
662 | BEGIN_FTR_SECTION | ||
1178 | bl .ppc64_runlatch_on | 663 | bl .ppc64_runlatch_on |
664 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
1179 | addi r3,r1,STACK_FRAME_OVERHEAD | 665 | addi r3,r1,STACK_FRAME_OVERHEAD |
1180 | bl .do_IRQ | 666 | bl .do_IRQ |
1181 | b .ret_from_except_lite | 667 | b .ret_from_except_lite |
@@ -1519,8 +1005,8 @@ _GLOBAL(do_stab_bolted) | |||
1519 | * Space for CPU0's segment table. | 1005 | * Space for CPU0's segment table. |
1520 | * | 1006 | * |
1521 | * On iSeries, the hypervisor must fill in at least one entry before | 1007 | * On iSeries, the hypervisor must fill in at least one entry before |
1522 | * we get control (with relocate on). The address is give to the hv | 1008 | * we get control (with relocate on). The address is given to the hv |
1523 | * as a page number (see xLparMap in lpardata.c), so this must be at a | 1009 | * as a page number (see xLparMap below), so this must be at a |
1524 | * fixed address (the linker can't compute (u64)&initial_stab >> | 1010 | * fixed address (the linker can't compute (u64)&initial_stab >> |
1525 | * PAGE_SHIFT). | 1011 | * PAGE_SHIFT). |
1526 | */ | 1012 | */ |
@@ -1529,6 +1015,7 @@ _GLOBAL(do_stab_bolted) | |||
1529 | initial_stab: | 1015 | initial_stab: |
1530 | .space 4096 | 1016 | .space 4096 |
1531 | 1017 | ||
1018 | #ifdef CONFIG_PPC_PSERIES | ||
1532 | /* | 1019 | /* |
1533 | * Data area reserved for FWNMI option. | 1020 | * Data area reserved for FWNMI option. |
1534 | * This address (0x7000) is fixed by the RPA. | 1021 | * This address (0x7000) is fixed by the RPA. |
@@ -1536,21 +1023,34 @@ initial_stab: | |||
1536 | .= 0x7000 | 1023 | .= 0x7000 |
1537 | .globl fwnmi_data_area | 1024 | .globl fwnmi_data_area |
1538 | fwnmi_data_area: | 1025 | fwnmi_data_area: |
1026 | #endif /* CONFIG_PPC_PSERIES */ | ||
1539 | 1027 | ||
1540 | /* iSeries does not use the FWNMI stuff, so it is safe to put | 1028 | /* iSeries does not use the FWNMI stuff, so it is safe to put |
1541 | * this here, even if we later allow kernels that will boot on | 1029 | * this here, even if we later allow kernels that will boot on |
1542 | * both pSeries and iSeries */ | 1030 | * both pSeries and iSeries */ |
1543 | #ifdef CONFIG_PPC_ISERIES | 1031 | #ifdef CONFIG_PPC_ISERIES |
1544 | . = LPARMAP_PHYS | 1032 | . = LPARMAP_PHYS |
1545 | #include "lparmap.s" | 1033 | .globl xLparMap |
1546 | /* | 1034 | xLparMap: |
1547 | * This ".text" is here for old compilers that generate a trailing | 1035 | .quad HvEsidsToMap /* xNumberEsids */ |
1548 | * .note section when compiling .c files to .s | 1036 | .quad HvRangesToMap /* xNumberRanges */ |
1549 | */ | 1037 | .quad STAB0_PAGE /* xSegmentTableOffs */ |
1550 | .text | 1038 | .zero 40 /* xRsvd */ |
1039 | /* xEsids (HvEsidsToMap entries of 2 quads) */ | ||
1040 | .quad PAGE_OFFSET_ESID /* xKernelEsid */ | ||
1041 | .quad PAGE_OFFSET_VSID /* xKernelVsid */ | ||
1042 | .quad VMALLOC_START_ESID /* xKernelEsid */ | ||
1043 | .quad VMALLOC_START_VSID /* xKernelVsid */ | ||
1044 | /* xRanges (HvRangesToMap entries of 3 quads) */ | ||
1045 | .quad HvPagesToMap /* xPages */ | ||
1046 | .quad 0 /* xOffset */ | ||
1047 | .quad PAGE_OFFSET_VSID << (SID_SHIFT - HW_PAGE_SHIFT) /* xVPN */ | ||
1048 | |||
1551 | #endif /* CONFIG_PPC_ISERIES */ | 1049 | #endif /* CONFIG_PPC_ISERIES */ |
1552 | 1050 | ||
1051 | #ifdef CONFIG_PPC_PSERIES | ||
1553 | . = 0x8000 | 1052 | . = 0x8000 |
1053 | #endif /* CONFIG_PPC_PSERIES */ | ||
1554 | 1054 | ||
1555 | /* | 1055 | /* |
1556 | * On pSeries and most other platforms, secondary processors spin | 1056 | * On pSeries and most other platforms, secondary processors spin |
@@ -1611,39 +1111,6 @@ _GLOBAL(generic_secondary_smp_init) | |||
1611 | b __secondary_start | 1111 | b __secondary_start |
1612 | #endif | 1112 | #endif |
1613 | 1113 | ||
1614 | #ifdef CONFIG_PPC_ISERIES | ||
1615 | _INIT_STATIC(__start_initialization_iSeries) | ||
1616 | /* Clear out the BSS */ | ||
1617 | LOAD_REG_IMMEDIATE(r11,__bss_stop) | ||
1618 | LOAD_REG_IMMEDIATE(r8,__bss_start) | ||
1619 | sub r11,r11,r8 /* bss size */ | ||
1620 | addi r11,r11,7 /* round up to an even double word */ | ||
1621 | rldicl. r11,r11,61,3 /* shift right by 3 */ | ||
1622 | beq 4f | ||
1623 | addi r8,r8,-8 | ||
1624 | li r0,0 | ||
1625 | mtctr r11 /* zero this many doublewords */ | ||
1626 | 3: stdu r0,8(r8) | ||
1627 | bdnz 3b | ||
1628 | 4: | ||
1629 | LOAD_REG_IMMEDIATE(r1,init_thread_union) | ||
1630 | addi r1,r1,THREAD_SIZE | ||
1631 | li r0,0 | ||
1632 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | ||
1633 | |||
1634 | LOAD_REG_IMMEDIATE(r2,__toc_start) | ||
1635 | addi r2,r2,0x4000 | ||
1636 | addi r2,r2,0x4000 | ||
1637 | |||
1638 | bl .iSeries_early_setup | ||
1639 | bl .early_setup | ||
1640 | |||
1641 | /* relocation is on at this point */ | ||
1642 | |||
1643 | b .start_here_common | ||
1644 | #endif /* CONFIG_PPC_ISERIES */ | ||
1645 | |||
1646 | |||
1647 | _STATIC(__mmu_off) | 1114 | _STATIC(__mmu_off) |
1648 | mfmsr r3 | 1115 | mfmsr r3 |
1649 | andi. r0,r3,MSR_IR|MSR_DR | 1116 | andi. r0,r3,MSR_IR|MSR_DR |
@@ -1891,6 +1358,7 @@ _GLOBAL(pmac_secondary_start) | |||
1891 | * r13 = paca virtual address | 1358 | * r13 = paca virtual address |
1892 | * SPRG3 = paca virtual address | 1359 | * SPRG3 = paca virtual address |
1893 | */ | 1360 | */ |
1361 | .globl __secondary_start | ||
1894 | __secondary_start: | 1362 | __secondary_start: |
1895 | /* Set thread priority to MEDIUM */ | 1363 | /* Set thread priority to MEDIUM */ |
1896 | HMT_MEDIUM | 1364 | HMT_MEDIUM |
@@ -2021,7 +1489,7 @@ _INIT_STATIC(start_here_multiplatform) | |||
2021 | b . /* prevent speculative execution */ | 1489 | b . /* prevent speculative execution */ |
2022 | 1490 | ||
2023 | /* This is where all platforms converge execution */ | 1491 | /* This is where all platforms converge execution */ |
2024 | _INIT_STATIC(start_here_common) | 1492 | _INIT_GLOBAL(start_here_common) |
2025 | /* relocation is on at this point */ | 1493 | /* relocation is on at this point */ |
2026 | 1494 | ||
2027 | /* The following code sets up the SP and TOC now that we are */ | 1495 | /* The following code sets up the SP and TOC now that we are */ |
@@ -2078,12 +1546,4 @@ empty_zero_page: | |||
2078 | 1546 | ||
2079 | .globl swapper_pg_dir | 1547 | .globl swapper_pg_dir |
2080 | swapper_pg_dir: | 1548 | swapper_pg_dir: |
2081 | .space PAGE_SIZE | 1549 | .space PGD_TABLE_SIZE |
2082 | |||
2083 | /* | ||
2084 | * This space gets a copy of optional info passed to us by the bootstrap | ||
2085 | * Used to pass parameters into the kernel like root=/dev/sda1, etc. | ||
2086 | */ | ||
2087 | .globl cmd_line | ||
2088 | cmd_line: | ||
2089 | .space COMMAND_LINE_SIZE | ||
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 901be47a02a9..96cea8e753c4 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -38,12 +38,9 @@ | |||
38 | #else | 38 | #else |
39 | #define DO_8xx_CPU6(val, reg) | 39 | #define DO_8xx_CPU6(val, reg) |
40 | #endif | 40 | #endif |
41 | .text | 41 | .section .text.head, "ax" |
42 | .globl _stext | 42 | _ENTRY(_stext); |
43 | _stext: | 43 | _ENTRY(_start); |
44 | .text | ||
45 | .globl _start | ||
46 | _start: | ||
47 | 44 | ||
48 | /* MPC8xx | 45 | /* MPC8xx |
49 | * This port was done on an MBX board with an 860. Right now I only | 46 | * This port was done on an MBX board with an 860. Right now I only |
@@ -835,14 +832,6 @@ empty_zero_page: | |||
835 | swapper_pg_dir: | 832 | swapper_pg_dir: |
836 | .space 4096 | 833 | .space 4096 |
837 | 834 | ||
838 | /* | ||
839 | * This space gets a copy of optional info passed to us by the bootstrap | ||
840 | * Used to pass parameters into the kernel like root=/dev/sda1, etc. | ||
841 | */ | ||
842 | .globl cmd_line | ||
843 | cmd_line: | ||
844 | .space 512 | ||
845 | |||
846 | /* Room for two PTE table poiners, usually the kernel and current user | 835 | /* Room for two PTE table poiners, usually the kernel and current user |
847 | * pointer to their respective root page table (pgdir). | 836 | * pointer to their respective root page table (pgdir). |
848 | */ | 837 | */ |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 1f155d399d57..bfc38703a8ac 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -52,9 +52,9 @@ | |||
52 | * r7 - End of kernel command line string | 52 | * r7 - End of kernel command line string |
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | .text | 55 | .section .text.head, "ax" |
56 | _GLOBAL(_stext) | 56 | _ENTRY(_stext); |
57 | _GLOBAL(_start) | 57 | _ENTRY(_start); |
58 | /* | 58 | /* |
59 | * Reserve a word at a fixed location to store the address | 59 | * Reserve a word at a fixed location to store the address |
60 | * of abatron_pteptrs | 60 | * of abatron_pteptrs |
@@ -1050,14 +1050,6 @@ exception_stack_bottom: | |||
1050 | exception_stack_top: | 1050 | exception_stack_top: |
1051 | 1051 | ||
1052 | /* | 1052 | /* |
1053 | * This space gets a copy of optional info passed to us by the bootstrap | ||
1054 | * which is used to pass parameters into the kernel like root=/dev/sda1, etc. | ||
1055 | */ | ||
1056 | .globl cmd_line | ||
1057 | cmd_line: | ||
1058 | .space 512 | ||
1059 | |||
1060 | /* | ||
1061 | * Room for two PTE pointers, usually the kernel and current user pointers | 1053 | * Room for two PTE pointers, usually the kernel and current user pointers |
1062 | * to their respective root page table. | 1054 | * to their respective root page table. |
1063 | */ | 1055 | */ |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index d6a38cd5018e..53bf64623bd8 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -371,7 +371,8 @@ static int ibmebus_match_path(struct device *dev, void *data) | |||
371 | 371 | ||
372 | static char *ibmebus_chomp(const char *in, size_t count) | 372 | static char *ibmebus_chomp(const char *in, size_t count) |
373 | { | 373 | { |
374 | char *out = (char*)kmalloc(count + 1, GFP_KERNEL); | 374 | char *out = kmalloc(count + 1, GFP_KERNEL); |
375 | |||
375 | if (!out) | 376 | if (!out) |
376 | return NULL; | 377 | return NULL; |
377 | 378 | ||
@@ -396,10 +397,10 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
396 | return -ENOMEM; | 397 | return -ENOMEM; |
397 | 398 | ||
398 | if (bus_find_device(&ibmebus_bus_type, NULL, path, | 399 | if (bus_find_device(&ibmebus_bus_type, NULL, path, |
399 | ibmebus_match_path)) { | 400 | ibmebus_match_path)) { |
400 | printk(KERN_WARNING "%s: %s has already been probed\n", | 401 | printk(KERN_WARNING "%s: %s has already been probed\n", |
401 | __FUNCTION__, path); | 402 | __FUNCTION__, path); |
402 | rc = -EINVAL; | 403 | rc = -EEXIST; |
403 | goto out; | 404 | goto out; |
404 | } | 405 | } |
405 | 406 | ||
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 2a5cf8680370..1577434f4088 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -119,8 +119,8 @@ EXPORT_SYMBOL(ioport_unmap); | |||
119 | 119 | ||
120 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | 120 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) |
121 | { | 121 | { |
122 | unsigned long start = pci_resource_start(dev, bar); | 122 | resource_size_t start = pci_resource_start(dev, bar); |
123 | unsigned long len = pci_resource_len(dev, bar); | 123 | resource_size_t len = pci_resource_len(dev, bar); |
124 | unsigned long flags = pci_resource_flags(dev, bar); | 124 | unsigned long flags = pci_resource_flags(dev, bar); |
125 | 125 | ||
126 | if (!len) | 126 | if (!len) |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index c08ceca6277d..e4ec6eee81a8 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/init.h> | ||
34 | #include <linux/bitops.h> | 33 | #include <linux/bitops.h> |
35 | #include <asm/io.h> | 34 | #include <asm/io.h> |
36 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 24bea97c736c..151b13119208 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/mutex.h> | 52 | #include <linux/mutex.h> |
53 | #include <linux/bootmem.h> | 53 | #include <linux/bootmem.h> |
54 | #include <linux/pci.h> | 54 | #include <linux/pci.h> |
55 | #include <linux/debugfs.h> | ||
55 | 56 | ||
56 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
57 | #include <asm/system.h> | 58 | #include <asm/system.h> |
@@ -272,7 +273,7 @@ void do_IRQ(struct pt_regs *regs) | |||
272 | struct thread_info *curtp, *irqtp; | 273 | struct thread_info *curtp, *irqtp; |
273 | #endif | 274 | #endif |
274 | 275 | ||
275 | irq_enter(); | 276 | irq_enter(); |
276 | 277 | ||
277 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 278 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
278 | /* Debugging check for stack overflow: is there less than 2KB free? */ | 279 | /* Debugging check for stack overflow: is there less than 2KB free? */ |
@@ -321,7 +322,7 @@ void do_IRQ(struct pt_regs *regs) | |||
321 | /* That's not SMP safe ... but who cares ? */ | 322 | /* That's not SMP safe ... but who cares ? */ |
322 | ppc_spurious_interrupts++; | 323 | ppc_spurious_interrupts++; |
323 | 324 | ||
324 | irq_exit(); | 325 | irq_exit(); |
325 | set_irq_regs(old_regs); | 326 | set_irq_regs(old_regs); |
326 | 327 | ||
327 | #ifdef CONFIG_PPC_ISERIES | 328 | #ifdef CONFIG_PPC_ISERIES |
@@ -418,10 +419,16 @@ irq_hw_number_t virq_to_hw(unsigned int virq) | |||
418 | } | 419 | } |
419 | EXPORT_SYMBOL_GPL(virq_to_hw); | 420 | EXPORT_SYMBOL_GPL(virq_to_hw); |
420 | 421 | ||
421 | __init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, | 422 | static int default_irq_host_match(struct irq_host *h, struct device_node *np) |
422 | unsigned int revmap_arg, | 423 | { |
423 | struct irq_host_ops *ops, | 424 | return h->of_node != NULL && h->of_node == np; |
424 | irq_hw_number_t inval_irq) | 425 | } |
426 | |||
427 | struct irq_host *irq_alloc_host(struct device_node *of_node, | ||
428 | unsigned int revmap_type, | ||
429 | unsigned int revmap_arg, | ||
430 | struct irq_host_ops *ops, | ||
431 | irq_hw_number_t inval_irq) | ||
425 | { | 432 | { |
426 | struct irq_host *host; | 433 | struct irq_host *host; |
427 | unsigned int size = sizeof(struct irq_host); | 434 | unsigned int size = sizeof(struct irq_host); |
@@ -432,13 +439,7 @@ __init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, | |||
432 | /* Allocate structure and revmap table if using linear mapping */ | 439 | /* Allocate structure and revmap table if using linear mapping */ |
433 | if (revmap_type == IRQ_HOST_MAP_LINEAR) | 440 | if (revmap_type == IRQ_HOST_MAP_LINEAR) |
434 | size += revmap_arg * sizeof(unsigned int); | 441 | size += revmap_arg * sizeof(unsigned int); |
435 | if (mem_init_done) | 442 | host = zalloc_maybe_bootmem(size, GFP_KERNEL); |
436 | host = kzalloc(size, GFP_KERNEL); | ||
437 | else { | ||
438 | host = alloc_bootmem(size); | ||
439 | if (host) | ||
440 | memset(host, 0, size); | ||
441 | } | ||
442 | if (host == NULL) | 443 | if (host == NULL) |
443 | return NULL; | 444 | return NULL; |
444 | 445 | ||
@@ -446,6 +447,10 @@ __init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, | |||
446 | host->revmap_type = revmap_type; | 447 | host->revmap_type = revmap_type; |
447 | host->inval_irq = inval_irq; | 448 | host->inval_irq = inval_irq; |
448 | host->ops = ops; | 449 | host->ops = ops; |
450 | host->of_node = of_node; | ||
451 | |||
452 | if (host->ops->match == NULL) | ||
453 | host->ops->match = default_irq_host_match; | ||
449 | 454 | ||
450 | spin_lock_irqsave(&irq_big_lock, flags); | 455 | spin_lock_irqsave(&irq_big_lock, flags); |
451 | 456 | ||
@@ -477,7 +482,7 @@ __init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, | |||
477 | host->inval_irq = 0; | 482 | host->inval_irq = 0; |
478 | /* setup us as the host for all legacy interrupts */ | 483 | /* setup us as the host for all legacy interrupts */ |
479 | for (i = 1; i < NUM_ISA_INTERRUPTS; i++) { | 484 | for (i = 1; i < NUM_ISA_INTERRUPTS; i++) { |
480 | irq_map[i].hwirq = 0; | 485 | irq_map[i].hwirq = i; |
481 | smp_wmb(); | 486 | smp_wmb(); |
482 | irq_map[i].host = host; | 487 | irq_map[i].host = host; |
483 | smp_wmb(); | 488 | smp_wmb(); |
@@ -521,7 +526,7 @@ struct irq_host *irq_find_host(struct device_node *node) | |||
521 | */ | 526 | */ |
522 | spin_lock_irqsave(&irq_big_lock, flags); | 527 | spin_lock_irqsave(&irq_big_lock, flags); |
523 | list_for_each_entry(h, &irq_hosts, link) | 528 | list_for_each_entry(h, &irq_hosts, link) |
524 | if (h->ops->match == NULL || h->ops->match(h, node)) { | 529 | if (h->ops->match(h, node)) { |
525 | found = h; | 530 | found = h; |
526 | break; | 531 | break; |
527 | } | 532 | } |
@@ -996,6 +1001,68 @@ static int irq_late_init(void) | |||
996 | } | 1001 | } |
997 | arch_initcall(irq_late_init); | 1002 | arch_initcall(irq_late_init); |
998 | 1003 | ||
1004 | #ifdef CONFIG_VIRQ_DEBUG | ||
1005 | static int virq_debug_show(struct seq_file *m, void *private) | ||
1006 | { | ||
1007 | unsigned long flags; | ||
1008 | irq_desc_t *desc; | ||
1009 | const char *p; | ||
1010 | char none[] = "none"; | ||
1011 | int i; | ||
1012 | |||
1013 | seq_printf(m, "%-5s %-7s %-15s %s\n", "virq", "hwirq", | ||
1014 | "chip name", "host name"); | ||
1015 | |||
1016 | for (i = 1; i < NR_IRQS; i++) { | ||
1017 | desc = get_irq_desc(i); | ||
1018 | spin_lock_irqsave(&desc->lock, flags); | ||
1019 | |||
1020 | if (desc->action && desc->action->handler) { | ||
1021 | seq_printf(m, "%5d ", i); | ||
1022 | seq_printf(m, "0x%05lx ", virq_to_hw(i)); | ||
1023 | |||
1024 | if (desc->chip && desc->chip->typename) | ||
1025 | p = desc->chip->typename; | ||
1026 | else | ||
1027 | p = none; | ||
1028 | seq_printf(m, "%-15s ", p); | ||
1029 | |||
1030 | if (irq_map[i].host && irq_map[i].host->of_node) | ||
1031 | p = irq_map[i].host->of_node->full_name; | ||
1032 | else | ||
1033 | p = none; | ||
1034 | seq_printf(m, "%s\n", p); | ||
1035 | } | ||
1036 | |||
1037 | spin_unlock_irqrestore(&desc->lock, flags); | ||
1038 | } | ||
1039 | |||
1040 | return 0; | ||
1041 | } | ||
1042 | |||
1043 | static int virq_debug_open(struct inode *inode, struct file *file) | ||
1044 | { | ||
1045 | return single_open(file, virq_debug_show, inode->i_private); | ||
1046 | } | ||
1047 | |||
1048 | static const struct file_operations virq_debug_fops = { | ||
1049 | .open = virq_debug_open, | ||
1050 | .read = seq_read, | ||
1051 | .llseek = seq_lseek, | ||
1052 | .release = single_release, | ||
1053 | }; | ||
1054 | |||
1055 | static int __init irq_debugfs_init(void) | ||
1056 | { | ||
1057 | if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root, | ||
1058 | NULL, &virq_debug_fops)) | ||
1059 | return -ENOMEM; | ||
1060 | |||
1061 | return 0; | ||
1062 | } | ||
1063 | __initcall(irq_debugfs_init); | ||
1064 | #endif /* CONFIG_VIRQ_DEBUG */ | ||
1065 | |||
999 | #endif /* CONFIG_PPC_MERGE */ | 1066 | #endif /* CONFIG_PPC_MERGE */ |
1000 | 1067 | ||
1001 | #ifdef CONFIG_PPC64 | 1068 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 6444eaa30a2f..ff781b2eddec 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -77,7 +77,7 @@ static int iseries_lparcfg_data(struct seq_file *m, void *v) | |||
77 | int processors, max_processors; | 77 | int processors, max_processors; |
78 | unsigned long purr = get_purr(); | 78 | unsigned long purr = get_purr(); |
79 | 79 | ||
80 | shared = (int)(get_lppaca()->shared_proc); | 80 | shared = (int)(local_paca->lppaca_ptr->shared_proc); |
81 | 81 | ||
82 | seq_printf(m, "system_active_processors=%d\n", | 82 | seq_printf(m, "system_active_processors=%d\n", |
83 | (int)HvLpConfig_getSystemPhysicalProcessors()); | 83 | (int)HvLpConfig_getSystemPhysicalProcessors()); |
diff --git a/arch/powerpc/kernel/lparmap.c b/arch/powerpc/kernel/lparmap.c deleted file mode 100644 index af11285ffbd1..000000000000 --- a/arch/powerpc/kernel/lparmap.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005 Stephen Rothwell IBM Corp. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #include <asm/mmu.h> | ||
10 | #include <asm/pgtable.h> | ||
11 | #include <asm/iseries/lpar_map.h> | ||
12 | |||
13 | /* The # is to stop gcc trying to make .text nonexecutable */ | ||
14 | const struct LparMap __attribute__((__section__(".text #"))) xLparMap = { | ||
15 | .xNumberEsids = HvEsidsToMap, | ||
16 | .xNumberRanges = HvRangesToMap, | ||
17 | .xSegmentTableOffs = STAB0_PAGE, | ||
18 | |||
19 | .xEsids = { | ||
20 | { .xKernelEsid = GET_ESID(PAGE_OFFSET), | ||
21 | .xKernelVsid = KERNEL_VSID(PAGE_OFFSET), }, | ||
22 | { .xKernelEsid = GET_ESID(VMALLOC_START), | ||
23 | .xKernelVsid = KERNEL_VSID(VMALLOC_START), }, | ||
24 | }, | ||
25 | |||
26 | .xRanges = { | ||
27 | { .xPages = HvPagesToMap, | ||
28 | .xOffset = 0, | ||
29 | .xVPN = KERNEL_VSID(PAGE_OFFSET) << (SID_SHIFT - HW_PAGE_SHIFT), | ||
30 | }, | ||
31 | }, | ||
32 | }; | ||
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index f9676f52c6d8..0ed31f220482 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c | |||
@@ -34,21 +34,10 @@ | |||
34 | 34 | ||
35 | #undef DEBUG_NVRAM | 35 | #undef DEBUG_NVRAM |
36 | 36 | ||
37 | static int nvram_scan_partitions(void); | ||
38 | static int nvram_setup_partition(void); | ||
39 | static int nvram_create_os_partition(void); | ||
40 | static int nvram_remove_os_partition(void); | ||
41 | |||
42 | static struct nvram_partition * nvram_part; | 37 | static struct nvram_partition * nvram_part; |
43 | static long nvram_error_log_index = -1; | 38 | static long nvram_error_log_index = -1; |
44 | static long nvram_error_log_size = 0; | 39 | static long nvram_error_log_size = 0; |
45 | 40 | ||
46 | int no_logging = 1; /* Until we initialize everything, | ||
47 | * make sure we don't try logging | ||
48 | * anything */ | ||
49 | |||
50 | extern volatile int error_log_cnt; | ||
51 | |||
52 | struct err_log_info { | 41 | struct err_log_info { |
53 | int error_type; | 42 | int error_type; |
54 | unsigned int seq_num; | 43 | unsigned int seq_num; |
@@ -636,16 +625,13 @@ void __exit nvram_cleanup(void) | |||
636 | * sequence #: The unique sequence # for each event. (until it wraps) | 625 | * sequence #: The unique sequence # for each event. (until it wraps) |
637 | * error log: The error log from event_scan | 626 | * error log: The error log from event_scan |
638 | */ | 627 | */ |
639 | int nvram_write_error_log(char * buff, int length, unsigned int err_type) | 628 | int nvram_write_error_log(char * buff, int length, |
629 | unsigned int err_type, unsigned int error_log_cnt) | ||
640 | { | 630 | { |
641 | int rc; | 631 | int rc; |
642 | loff_t tmp_index; | 632 | loff_t tmp_index; |
643 | struct err_log_info info; | 633 | struct err_log_info info; |
644 | 634 | ||
645 | if (no_logging) { | ||
646 | return -EPERM; | ||
647 | } | ||
648 | |||
649 | if (nvram_error_log_index == -1) { | 635 | if (nvram_error_log_index == -1) { |
650 | return -ESPIPE; | 636 | return -ESPIPE; |
651 | } | 637 | } |
@@ -678,7 +664,8 @@ int nvram_write_error_log(char * buff, int length, unsigned int err_type) | |||
678 | * | 664 | * |
679 | * Reads nvram for error log for at most 'length' | 665 | * Reads nvram for error log for at most 'length' |
680 | */ | 666 | */ |
681 | int nvram_read_error_log(char * buff, int length, unsigned int * err_type) | 667 | int nvram_read_error_log(char * buff, int length, |
668 | unsigned int * err_type, unsigned int * error_log_cnt) | ||
682 | { | 669 | { |
683 | int rc; | 670 | int rc; |
684 | loff_t tmp_index; | 671 | loff_t tmp_index; |
@@ -704,7 +691,7 @@ int nvram_read_error_log(char * buff, int length, unsigned int * err_type) | |||
704 | return rc; | 691 | return rc; |
705 | } | 692 | } |
706 | 693 | ||
707 | error_log_cnt = info.seq_num; | 694 | *error_log_cnt = info.seq_num; |
708 | *err_type = info.error_type; | 695 | *err_type = info.error_type; |
709 | 696 | ||
710 | return 0; | 697 | return 0; |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 083cfbdbe0b2..2ae3b6f778a3 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -65,14 +65,11 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose) | |||
65 | spin_unlock(&hose_spinlock); | 65 | spin_unlock(&hose_spinlock); |
66 | } | 66 | } |
67 | 67 | ||
68 | __init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev) | 68 | struct pci_controller * pcibios_alloc_controller(struct device_node *dev) |
69 | { | 69 | { |
70 | struct pci_controller *phb; | 70 | struct pci_controller *phb; |
71 | 71 | ||
72 | if (mem_init_done) | 72 | phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL); |
73 | phb = kmalloc(sizeof(struct pci_controller), GFP_KERNEL); | ||
74 | else | ||
75 | phb = alloc_bootmem(sizeof (struct pci_controller)); | ||
76 | if (phb == NULL) | 73 | if (phb == NULL) |
77 | return NULL; | 74 | return NULL; |
78 | pci_setup_pci_controller(phb); | 75 | pci_setup_pci_controller(phb); |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 04a3109ae3c6..0e2bee46304c 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -1457,8 +1457,8 @@ null_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
1457 | 1457 | ||
1458 | static struct pci_ops null_pci_ops = | 1458 | static struct pci_ops null_pci_ops = |
1459 | { | 1459 | { |
1460 | null_read_config, | 1460 | .read = null_read_config, |
1461 | null_write_config | 1461 | .write = null_write_config, |
1462 | }; | 1462 | }; |
1463 | 1463 | ||
1464 | /* | 1464 | /* |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 291ffbc360c9..9f63bdcb0bdf 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -588,7 +588,7 @@ int pci_proc_domain(struct pci_bus *bus) | |||
588 | return 0; | 588 | return 0; |
589 | else { | 589 | else { |
590 | struct pci_controller *hose = pci_bus_to_host(bus); | 590 | struct pci_controller *hose = pci_bus_to_host(bus); |
591 | return hose->buid; | 591 | return hose->buid != 0; |
592 | } | 592 | } |
593 | } | 593 | } |
594 | 594 | ||
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index d7d36df9c053..b4839038613d 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c | |||
@@ -23,8 +23,6 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/bootmem.h> | ||
28 | 26 | ||
29 | #include <asm/io.h> | 27 | #include <asm/io.h> |
30 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
@@ -45,10 +43,7 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data) | |||
45 | const u32 *regs; | 43 | const u32 *regs; |
46 | struct pci_dn *pdn; | 44 | struct pci_dn *pdn; |
47 | 45 | ||
48 | if (mem_init_done) | 46 | pdn = alloc_maybe_bootmem(sizeof(*pdn), GFP_KERNEL); |
49 | pdn = kmalloc(sizeof(*pdn), GFP_KERNEL); | ||
50 | else | ||
51 | pdn = alloc_bootmem(sizeof(*pdn)); | ||
52 | if (pdn == NULL) | 47 | if (pdn == NULL) |
53 | return NULL; | 48 | return NULL; |
54 | memset(pdn, 0, sizeof(*pdn)); | 49 | memset(pdn, 0, sizeof(*pdn)); |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index a20f1951a5ce..c6b1aa3efbb9 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -12,12 +12,12 @@ | |||
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/ide.h> | ||
16 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
17 | 16 | ||
18 | #include <asm/page.h> | 17 | #include <asm/page.h> |
19 | #include <asm/semaphore.h> | 18 | #include <asm/semaphore.h> |
20 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
20 | #include <asm/cacheflush.h> | ||
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/atomic.h> | 23 | #include <asm/atomic.h> |
@@ -95,10 +95,6 @@ EXPORT_SYMBOL(__strnlen_user); | |||
95 | EXPORT_SYMBOL(copy_4K_page); | 95 | EXPORT_SYMBOL(copy_4K_page); |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | #if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)) | ||
99 | EXPORT_SYMBOL(ppc_ide_md); | ||
100 | #endif | ||
101 | |||
102 | #if defined(CONFIG_PCI) && defined(CONFIG_PPC32) | 98 | #if defined(CONFIG_PCI) && defined(CONFIG_PPC32) |
103 | EXPORT_SYMBOL(isa_io_base); | 99 | EXPORT_SYMBOL(isa_io_base); |
104 | EXPORT_SYMBOL(isa_mem_base); | 100 | EXPORT_SYMBOL(isa_mem_base); |
@@ -180,7 +176,7 @@ EXPORT_SYMBOL(cacheable_memcpy); | |||
180 | EXPORT_SYMBOL(cpm_install_handler); | 176 | EXPORT_SYMBOL(cpm_install_handler); |
181 | EXPORT_SYMBOL(cpm_free_handler); | 177 | EXPORT_SYMBOL(cpm_free_handler); |
182 | #endif /* CONFIG_8xx */ | 178 | #endif /* CONFIG_8xx */ |
183 | #if defined(CONFIG_8xx) || defined(CONFIG_40x) | 179 | #if defined(CONFIG_8xx) |
184 | EXPORT_SYMBOL(__res); | 180 | EXPORT_SYMBOL(__res); |
185 | #endif | 181 | #endif |
186 | 182 | ||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8a1b001d0b11..15998b57767c 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -354,6 +354,14 @@ static void show_instructions(struct pt_regs *regs) | |||
354 | if (!(i % 8)) | 354 | if (!(i % 8)) |
355 | printk("\n"); | 355 | printk("\n"); |
356 | 356 | ||
357 | #if !defined(CONFIG_BOOKE) | ||
358 | /* If executing with the IMMU off, adjust pc rather | ||
359 | * than print XXXXXXXX. | ||
360 | */ | ||
361 | if (!(regs->msr & MSR_IR)) | ||
362 | pc = (unsigned long)phys_to_virt(pc); | ||
363 | #endif | ||
364 | |||
357 | /* We use __get_user here *only* to avoid an OOPS on a | 365 | /* We use __get_user here *only* to avoid an OOPS on a |
358 | * bad address because the pc *should* only be a | 366 | * bad address because the pc *should* only be a |
359 | * kernel address. | 367 | * kernel address. |
@@ -676,9 +684,13 @@ int set_fpexc_mode(struct task_struct *tsk, unsigned int val) | |||
676 | * mode (asyn, precise, disabled) for 'Classic' FP. */ | 684 | * mode (asyn, precise, disabled) for 'Classic' FP. */ |
677 | if (val & PR_FP_EXC_SW_ENABLE) { | 685 | if (val & PR_FP_EXC_SW_ENABLE) { |
678 | #ifdef CONFIG_SPE | 686 | #ifdef CONFIG_SPE |
679 | tsk->thread.fpexc_mode = val & | 687 | if (cpu_has_feature(CPU_FTR_SPE)) { |
680 | (PR_FP_EXC_SW_ENABLE | PR_FP_ALL_EXCEPT); | 688 | tsk->thread.fpexc_mode = val & |
681 | return 0; | 689 | (PR_FP_EXC_SW_ENABLE | PR_FP_ALL_EXCEPT); |
690 | return 0; | ||
691 | } else { | ||
692 | return -EINVAL; | ||
693 | } | ||
682 | #else | 694 | #else |
683 | return -EINVAL; | 695 | return -EINVAL; |
684 | #endif | 696 | #endif |
@@ -704,7 +716,10 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr) | |||
704 | 716 | ||
705 | if (tsk->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) | 717 | if (tsk->thread.fpexc_mode & PR_FP_EXC_SW_ENABLE) |
706 | #ifdef CONFIG_SPE | 718 | #ifdef CONFIG_SPE |
707 | val = tsk->thread.fpexc_mode; | 719 | if (cpu_has_feature(CPU_FTR_SPE)) |
720 | val = tsk->thread.fpexc_mode; | ||
721 | else | ||
722 | return -EINVAL; | ||
708 | #else | 723 | #else |
709 | return -EINVAL; | 724 | return -EINVAL; |
710 | #endif | 725 | #endif |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index a38197b12d3e..172dcc3849a0 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <asm/pSeries_reconfig.h> | 52 | #include <asm/pSeries_reconfig.h> |
53 | #include <asm/pci-bridge.h> | 53 | #include <asm/pci-bridge.h> |
54 | #include <asm/kexec.h> | 54 | #include <asm/kexec.h> |
55 | #include <asm/system.h> | ||
56 | 55 | ||
57 | #ifdef DEBUG | 56 | #ifdef DEBUG |
58 | #define DBG(fmt...) printk(KERN_ERR fmt) | 57 | #define DBG(fmt...) printk(KERN_ERR fmt) |
@@ -431,9 +430,11 @@ static int __init early_parse_mem(char *p) | |||
431 | } | 430 | } |
432 | early_param("mem", early_parse_mem); | 431 | early_param("mem", early_parse_mem); |
433 | 432 | ||
434 | /* | 433 | /** |
435 | * The device tree may be allocated below our memory limit, or inside the | 434 | * move_device_tree - move tree to an unused area, if needed. |
436 | * crash kernel region for kdump. If so, move it out now. | 435 | * |
436 | * The device tree may be allocated beyond our memory limit, or inside the | ||
437 | * crash kernel region for kdump. If so, move it out of the way. | ||
437 | */ | 438 | */ |
438 | static void move_device_tree(void) | 439 | static void move_device_tree(void) |
439 | { | 440 | { |
@@ -780,13 +781,13 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
780 | #endif | 781 | #endif |
781 | 782 | ||
782 | #ifdef CONFIG_KEXEC | 783 | #ifdef CONFIG_KEXEC |
783 | lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); | 784 | lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); |
784 | if (lprop) | 785 | if (lprop) |
785 | crashk_res.start = *lprop; | 786 | crashk_res.start = *lprop; |
786 | 787 | ||
787 | lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-size", NULL); | 788 | lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-size", NULL); |
788 | if (lprop) | 789 | if (lprop) |
789 | crashk_res.end = crashk_res.start + *lprop - 1; | 790 | crashk_res.end = crashk_res.start + *lprop - 1; |
790 | #endif | 791 | #endif |
791 | 792 | ||
792 | early_init_dt_check_for_initrd(node); | 793 | early_init_dt_check_for_initrd(node); |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a1d582e38627..1db10f70ae69 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1199,7 +1199,7 @@ static void __init prom_initialize_tce_table(void) | |||
1199 | if ((type[0] == 0) || (strstr(type, RELOC("pci")) == NULL)) | 1199 | if ((type[0] == 0) || (strstr(type, RELOC("pci")) == NULL)) |
1200 | continue; | 1200 | continue; |
1201 | 1201 | ||
1202 | /* Keep the old logic in tack to avoid regression. */ | 1202 | /* Keep the old logic intact to avoid regression. */ |
1203 | if (compatible[0] != 0) { | 1203 | if (compatible[0] != 0) { |
1204 | if ((strstr(compatible, RELOC("python")) == NULL) && | 1204 | if ((strstr(compatible, RELOC("python")) == NULL) && |
1205 | (strstr(compatible, RELOC("Speedwagon")) == NULL) && | 1205 | (strstr(compatible, RELOC("Speedwagon")) == NULL) && |
@@ -2046,6 +2046,7 @@ static void __init fixup_device_tree_maple(void) | |||
2046 | /* | 2046 | /* |
2047 | * Pegasos and BriQ lacks the "ranges" property in the isa node | 2047 | * Pegasos and BriQ lacks the "ranges" property in the isa node |
2048 | * Pegasos needs decimal IRQ 14/15, not hexadecimal | 2048 | * Pegasos needs decimal IRQ 14/15, not hexadecimal |
2049 | * Pegasos has the IDE configured in legacy mode, but advertised as native | ||
2049 | */ | 2050 | */ |
2050 | static void __init fixup_device_tree_chrp(void) | 2051 | static void __init fixup_device_tree_chrp(void) |
2051 | { | 2052 | { |
@@ -2083,9 +2084,13 @@ static void __init fixup_device_tree_chrp(void) | |||
2083 | prom_printf("Fixing up IDE interrupt on Pegasos...\n"); | 2084 | prom_printf("Fixing up IDE interrupt on Pegasos...\n"); |
2084 | prop[0] = 14; | 2085 | prop[0] = 14; |
2085 | prop[1] = 0x0; | 2086 | prop[1] = 0x0; |
2086 | prop[2] = 15; | 2087 | prom_setprop(ph, name, "interrupts", prop, 2*sizeof(u32)); |
2087 | prop[3] = 0x0; | 2088 | prom_printf("Fixing up IDE class-code on Pegasos...\n"); |
2088 | prom_setprop(ph, name, "interrupts", prop, 4*sizeof(u32)); | 2089 | rc = prom_getprop(ph, "class-code", prop, sizeof(u32)); |
2090 | if (rc == sizeof(u32)) { | ||
2091 | prop[0] &= ~0x5; | ||
2092 | prom_setprop(ph, name, "class-code", prop, sizeof(u32)); | ||
2093 | } | ||
2089 | } | 2094 | } |
2090 | } | 2095 | } |
2091 | #else | 2096 | #else |
@@ -2226,7 +2231,7 @@ static void __init fixup_device_tree(void) | |||
2226 | 2231 | ||
2227 | static void __init prom_find_boot_cpu(void) | 2232 | static void __init prom_find_boot_cpu(void) |
2228 | { | 2233 | { |
2229 | struct prom_t *_prom = &RELOC(prom); | 2234 | struct prom_t *_prom = &RELOC(prom); |
2230 | u32 getprop_rval; | 2235 | u32 getprop_rval; |
2231 | ihandle prom_cpu; | 2236 | ihandle prom_cpu; |
2232 | phandle cpu_pkg; | 2237 | phandle cpu_pkg; |
@@ -2246,7 +2251,7 @@ static void __init prom_find_boot_cpu(void) | |||
2246 | static void __init prom_check_initrd(unsigned long r3, unsigned long r4) | 2251 | static void __init prom_check_initrd(unsigned long r3, unsigned long r4) |
2247 | { | 2252 | { |
2248 | #ifdef CONFIG_BLK_DEV_INITRD | 2253 | #ifdef CONFIG_BLK_DEV_INITRD |
2249 | struct prom_t *_prom = &RELOC(prom); | 2254 | struct prom_t *_prom = &RELOC(prom); |
2250 | 2255 | ||
2251 | if (r3 && r4 && r4 != 0xdeadbeef) { | 2256 | if (r3 && r4 && r4 != 0xdeadbeef) { |
2252 | unsigned long val; | 2257 | unsigned long val; |
@@ -2279,7 +2284,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2279 | unsigned long pp, | 2284 | unsigned long pp, |
2280 | unsigned long r6, unsigned long r7) | 2285 | unsigned long r6, unsigned long r7) |
2281 | { | 2286 | { |
2282 | struct prom_t *_prom; | 2287 | struct prom_t *_prom; |
2283 | unsigned long hdr; | 2288 | unsigned long hdr; |
2284 | unsigned long offset = reloc_offset(); | 2289 | unsigned long offset = reloc_offset(); |
2285 | 2290 | ||
@@ -2338,8 +2343,8 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2338 | /* | 2343 | /* |
2339 | * Copy the CPU hold code | 2344 | * Copy the CPU hold code |
2340 | */ | 2345 | */ |
2341 | if (RELOC(of_platform) != PLATFORM_POWERMAC) | 2346 | if (RELOC(of_platform) != PLATFORM_POWERMAC) |
2342 | copy_and_flush(0, KERNELBASE + offset, 0x100, 0); | 2347 | copy_and_flush(0, KERNELBASE + offset, 0x100, 0); |
2343 | 2348 | ||
2344 | /* | 2349 | /* |
2345 | * Do early parsing of command line | 2350 | * Do early parsing of command line |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 8a177bd9eab4..cf7732cdd6c7 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -331,6 +331,7 @@ static long arch_ptrace_old(struct task_struct *child, long request, long addr, | |||
331 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; | 331 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; |
332 | unsigned long __user *tmp = (unsigned long __user *)addr; | 332 | unsigned long __user *tmp = (unsigned long __user *)addr; |
333 | 333 | ||
334 | CHECK_FULL_REGS(child->thread.regs); | ||
334 | for (i = 0; i < 32; i++) { | 335 | for (i = 0; i < 32; i++) { |
335 | ret = put_user(*reg, tmp); | 336 | ret = put_user(*reg, tmp); |
336 | if (ret) | 337 | if (ret) |
@@ -346,6 +347,7 @@ static long arch_ptrace_old(struct task_struct *child, long request, long addr, | |||
346 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; | 347 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; |
347 | unsigned long __user *tmp = (unsigned long __user *)addr; | 348 | unsigned long __user *tmp = (unsigned long __user *)addr; |
348 | 349 | ||
350 | CHECK_FULL_REGS(child->thread.regs); | ||
349 | for (i = 0; i < 32; i++) { | 351 | for (i = 0; i < 32; i++) { |
350 | ret = get_user(*reg, tmp); | 352 | ret = get_user(*reg, tmp); |
351 | if (ret) | 353 | if (ret) |
@@ -517,6 +519,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
517 | ret = -EIO; | 519 | ret = -EIO; |
518 | break; | 520 | break; |
519 | } | 521 | } |
522 | CHECK_FULL_REGS(child->thread.regs); | ||
520 | ret = 0; | 523 | ret = 0; |
521 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { | 524 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { |
522 | ret |= __put_user(ptrace_get_reg(child, ui), | 525 | ret |= __put_user(ptrace_get_reg(child, ui), |
@@ -537,6 +540,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
537 | ret = -EIO; | 540 | ret = -EIO; |
538 | break; | 541 | break; |
539 | } | 542 | } |
543 | CHECK_FULL_REGS(child->thread.regs); | ||
540 | ret = 0; | 544 | ret = 0; |
541 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { | 545 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { |
542 | ret = __get_user(tmp, (unsigned long __user *) data); | 546 | ret = __get_user(tmp, (unsigned long __user *) data); |
@@ -576,8 +580,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
576 | #ifdef CONFIG_SPE | 580 | #ifdef CONFIG_SPE |
577 | case PTRACE_GETEVRREGS: | 581 | case PTRACE_GETEVRREGS: |
578 | /* Get the child spe register state. */ | 582 | /* Get the child spe register state. */ |
579 | if (child->thread.regs->msr & MSR_SPE) | 583 | flush_spe_to_thread(child); |
580 | giveup_spe(child); | ||
581 | ret = get_evrregs((unsigned long __user *)data, child); | 584 | ret = get_evrregs((unsigned long __user *)data, child); |
582 | break; | 585 | break; |
583 | 586 | ||
@@ -585,8 +588,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
585 | /* Set the child spe register state. */ | 588 | /* Set the child spe register state. */ |
586 | /* this is to clear the MSR_SPE bit to force a reload | 589 | /* this is to clear the MSR_SPE bit to force a reload |
587 | * of register state from memory */ | 590 | * of register state from memory */ |
588 | if (child->thread.regs->msr & MSR_SPE) | 591 | flush_spe_to_thread(child); |
589 | giveup_spe(child); | ||
590 | ret = set_evrregs(child, (unsigned long __user *)data); | 592 | ret = set_evrregs(child, (unsigned long __user *)data); |
591 | break; | 593 | break; |
592 | #endif | 594 | #endif |
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 9e6baeac0fb1..fea6206ff90f 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
@@ -53,6 +53,7 @@ static long compat_ptrace_old(struct task_struct *child, long request, | |||
53 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; | 53 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; |
54 | unsigned int __user *tmp = (unsigned int __user *)addr; | 54 | unsigned int __user *tmp = (unsigned int __user *)addr; |
55 | 55 | ||
56 | CHECK_FULL_REGS(child->thread.regs); | ||
56 | for (i = 0; i < 32; i++) { | 57 | for (i = 0; i < 32; i++) { |
57 | ret = put_user(*reg, tmp); | 58 | ret = put_user(*reg, tmp); |
58 | if (ret) | 59 | if (ret) |
@@ -68,6 +69,7 @@ static long compat_ptrace_old(struct task_struct *child, long request, | |||
68 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; | 69 | unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; |
69 | unsigned int __user *tmp = (unsigned int __user *)addr; | 70 | unsigned int __user *tmp = (unsigned int __user *)addr; |
70 | 71 | ||
72 | CHECK_FULL_REGS(child->thread.regs); | ||
71 | for (i = 0; i < 32; i++) { | 73 | for (i = 0; i < 32; i++) { |
72 | ret = get_user(*reg, tmp); | 74 | ret = get_user(*reg, tmp); |
73 | if (ret) | 75 | if (ret) |
@@ -164,6 +166,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr, | |||
164 | if ((addr & 3) || (index > PT_FPSCR32)) | 166 | if ((addr & 3) || (index > PT_FPSCR32)) |
165 | break; | 167 | break; |
166 | 168 | ||
169 | CHECK_FULL_REGS(child->thread.regs); | ||
167 | if (index < PT_FPR0) { | 170 | if (index < PT_FPR0) { |
168 | tmp = ptrace_get_reg(child, index); | 171 | tmp = ptrace_get_reg(child, index); |
169 | } else { | 172 | } else { |
@@ -210,6 +213,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr, | |||
210 | if ((addr & 3) || numReg > PT_FPSCR) | 213 | if ((addr & 3) || numReg > PT_FPSCR) |
211 | break; | 214 | break; |
212 | 215 | ||
216 | CHECK_FULL_REGS(child->thread.regs); | ||
213 | if (numReg >= PT_FPR0) { | 217 | if (numReg >= PT_FPR0) { |
214 | flush_fp_to_thread(child); | 218 | flush_fp_to_thread(child); |
215 | tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0]; | 219 | tmp = ((unsigned long int *)child->thread.fpr)[numReg - PT_FPR0]; |
@@ -270,6 +274,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr, | |||
270 | if ((addr & 3) || (index > PT_FPSCR32)) | 274 | if ((addr & 3) || (index > PT_FPSCR32)) |
271 | break; | 275 | break; |
272 | 276 | ||
277 | CHECK_FULL_REGS(child->thread.regs); | ||
273 | if (index < PT_FPR0) { | 278 | if (index < PT_FPR0) { |
274 | ret = ptrace_put_reg(child, index, data); | 279 | ret = ptrace_put_reg(child, index, data); |
275 | } else { | 280 | } else { |
@@ -307,6 +312,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr, | |||
307 | */ | 312 | */ |
308 | if ((addr & 3) || (numReg > PT_FPSCR)) | 313 | if ((addr & 3) || (numReg > PT_FPSCR)) |
309 | break; | 314 | break; |
315 | CHECK_FULL_REGS(child->thread.regs); | ||
310 | if (numReg < PT_FPR0) { | 316 | if (numReg < PT_FPR0) { |
311 | unsigned long freg = ptrace_get_reg(child, numReg); | 317 | unsigned long freg = ptrace_get_reg(child, numReg); |
312 | if (index % 2) | 318 | if (index % 2) |
@@ -342,6 +348,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr, | |||
342 | ret = -EIO; | 348 | ret = -EIO; |
343 | break; | 349 | break; |
344 | } | 350 | } |
351 | CHECK_FULL_REGS(child->thread.regs); | ||
345 | ret = 0; | 352 | ret = 0; |
346 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { | 353 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { |
347 | ret |= __put_user(ptrace_get_reg(child, ui), | 354 | ret |= __put_user(ptrace_get_reg(child, ui), |
@@ -359,6 +366,7 @@ long compat_sys_ptrace(int request, int pid, unsigned long addr, | |||
359 | ret = -EIO; | 366 | ret = -EIO; |
360 | break; | 367 | break; |
361 | } | 368 | } |
369 | CHECK_FULL_REGS(child->thread.regs); | ||
362 | ret = 0; | 370 | ret = 0; |
363 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { | 371 | for (ui = 0; ui < PT_REGS_COUNT; ui ++) { |
364 | ret = __get_user(tmp, (unsigned int __user *) data); | 372 | ret = __get_user(tmp, (unsigned int __user *) data); |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index a5de6211b97a..21f14e57d1f3 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -171,8 +171,8 @@ static int rtas_pci_write_config(struct pci_bus *bus, | |||
171 | } | 171 | } |
172 | 172 | ||
173 | struct pci_ops rtas_pci_ops = { | 173 | struct pci_ops rtas_pci_ops = { |
174 | rtas_pci_read_config, | 174 | .read = rtas_pci_read_config, |
175 | rtas_pci_write_config | 175 | .write = rtas_pci_write_config, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | int is_python(struct device_node *dev) | 178 | int is_python(struct device_node *dev) |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 50ef38cffdbf..36c90ba2d312 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -76,6 +76,8 @@ EXPORT_SYMBOL(machine_id); | |||
76 | 76 | ||
77 | unsigned long klimit = (unsigned long) _end; | 77 | unsigned long klimit = (unsigned long) _end; |
78 | 78 | ||
79 | char cmd_line[COMMAND_LINE_SIZE]; | ||
80 | |||
79 | /* | 81 | /* |
80 | * This still seems to be needed... -- paulus | 82 | * This still seems to be needed... -- paulus |
81 | */ | 83 | */ |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 7ec6ba56d83d..7474502dace5 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -10,7 +10,9 @@ | |||
10 | #include <linux/reboot.h> | 10 | #include <linux/reboot.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/initrd.h> | 12 | #include <linux/initrd.h> |
13 | #if defined(CONFIG_IDE) || defined(CONFIG_IDE_MODULE) | ||
13 | #include <linux/ide.h> | 14 | #include <linux/ide.h> |
15 | #endif | ||
14 | #include <linux/tty.h> | 16 | #include <linux/tty.h> |
15 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
16 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
@@ -18,13 +20,11 @@ | |||
18 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
19 | #include <linux/console.h> | 21 | #include <linux/console.h> |
20 | 22 | ||
21 | #include <asm/residual.h> | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
26 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
27 | #include <asm/amigappc.h> | ||
28 | #include <asm/smp.h> | 28 | #include <asm/smp.h> |
29 | #include <asm/elf.h> | 29 | #include <asm/elf.h> |
30 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
@@ -51,7 +51,10 @@ | |||
51 | 51 | ||
52 | extern void bootx_init(unsigned long r4, unsigned long phys); | 52 | extern void bootx_init(unsigned long r4, unsigned long phys); |
53 | 53 | ||
54 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) | ||
54 | struct ide_machdep_calls ppc_ide_md; | 55 | struct ide_machdep_calls ppc_ide_md; |
56 | EXPORT_SYMBOL(ppc_ide_md); | ||
57 | #endif | ||
55 | 58 | ||
56 | int boot_cpuid; | 59 | int boot_cpuid; |
57 | EXPORT_SYMBOL_GPL(boot_cpuid); | 60 | EXPORT_SYMBOL_GPL(boot_cpuid); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 6018178708a5..3089eaed3256 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -181,9 +181,9 @@ void __init early_setup(unsigned long dt_ptr) | |||
181 | DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr); | 181 | DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr); |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * Do early initializations using the flattened device | 184 | * Do early initialization using the flattened device |
185 | * tree, like retreiving the physical memory map or | 185 | * tree, such as retrieving the physical memory map or |
186 | * calculating/retreiving the hash table size | 186 | * calculating/retrieving the hash table size. |
187 | */ | 187 | */ |
188 | early_init_devtree(__va(dt_ptr)); | 188 | early_init_devtree(__va(dt_ptr)); |
189 | 189 | ||
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 1ea43160f543..b24dcbaeecaa 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -152,11 +152,6 @@ static void stop_this_cpu(void *dummy) | |||
152 | ; | 152 | ; |
153 | } | 153 | } |
154 | 154 | ||
155 | void smp_send_stop(void) | ||
156 | { | ||
157 | smp_call_function(stop_this_cpu, NULL, 1, 0); | ||
158 | } | ||
159 | |||
160 | /* | 155 | /* |
161 | * Structure and data for smp_call_function(). This is designed to minimise | 156 | * Structure and data for smp_call_function(). This is designed to minimise |
162 | * static memory requirements. It also looks cleaner. | 157 | * static memory requirements. It also looks cleaner. |
@@ -198,9 +193,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic, | |||
198 | int cpu; | 193 | int cpu; |
199 | u64 timeout; | 194 | u64 timeout; |
200 | 195 | ||
201 | /* Can deadlock when called with interrupts disabled */ | ||
202 | WARN_ON(irqs_disabled()); | ||
203 | |||
204 | if (unlikely(smp_ops == NULL)) | 196 | if (unlikely(smp_ops == NULL)) |
205 | return ret; | 197 | return ret; |
206 | 198 | ||
@@ -270,10 +262,19 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic, | |||
270 | return ret; | 262 | return ret; |
271 | } | 263 | } |
272 | 264 | ||
265 | static int __smp_call_function(void (*func)(void *info), void *info, | ||
266 | int nonatomic, int wait) | ||
267 | { | ||
268 | return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map); | ||
269 | } | ||
270 | |||
273 | int smp_call_function(void (*func) (void *info), void *info, int nonatomic, | 271 | int smp_call_function(void (*func) (void *info), void *info, int nonatomic, |
274 | int wait) | 272 | int wait) |
275 | { | 273 | { |
276 | return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map); | 274 | /* Can deadlock when called with interrupts disabled */ |
275 | WARN_ON(irqs_disabled()); | ||
276 | |||
277 | return __smp_call_function(func, info, nonatomic, wait); | ||
277 | } | 278 | } |
278 | EXPORT_SYMBOL(smp_call_function); | 279 | EXPORT_SYMBOL(smp_call_function); |
279 | 280 | ||
@@ -283,6 +284,9 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int | |||
283 | cpumask_t map = CPU_MASK_NONE; | 284 | cpumask_t map = CPU_MASK_NONE; |
284 | int ret = 0; | 285 | int ret = 0; |
285 | 286 | ||
287 | /* Can deadlock when called with interrupts disabled */ | ||
288 | WARN_ON(irqs_disabled()); | ||
289 | |||
286 | if (!cpu_online(cpu)) | 290 | if (!cpu_online(cpu)) |
287 | return -EINVAL; | 291 | return -EINVAL; |
288 | 292 | ||
@@ -299,6 +303,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int | |||
299 | } | 303 | } |
300 | EXPORT_SYMBOL(smp_call_function_single); | 304 | EXPORT_SYMBOL(smp_call_function_single); |
301 | 305 | ||
306 | void smp_send_stop(void) | ||
307 | { | ||
308 | __smp_call_function(stop_this_cpu, NULL, 1, 0); | ||
309 | } | ||
310 | |||
302 | void smp_call_function_interrupt(void) | 311 | void smp_call_function_interrupt(void) |
303 | { | 312 | { |
304 | void (*func) (void *info); | 313 | void (*func) (void *info); |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 55d29ed4b7a0..25d9a96484dd 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -197,6 +197,36 @@ SYSFS_PMCSETUP(pa6t_pmc3, SPRN_PA6T_PMC3); | |||
197 | SYSFS_PMCSETUP(pa6t_pmc4, SPRN_PA6T_PMC4); | 197 | SYSFS_PMCSETUP(pa6t_pmc4, SPRN_PA6T_PMC4); |
198 | SYSFS_PMCSETUP(pa6t_pmc5, SPRN_PA6T_PMC5); | 198 | SYSFS_PMCSETUP(pa6t_pmc5, SPRN_PA6T_PMC5); |
199 | 199 | ||
200 | #ifdef CONFIG_DEBUG_KERNEL | ||
201 | SYSFS_PMCSETUP(hid0, SPRN_HID0); | ||
202 | SYSFS_PMCSETUP(hid1, SPRN_HID1); | ||
203 | SYSFS_PMCSETUP(hid4, SPRN_HID4); | ||
204 | SYSFS_PMCSETUP(hid5, SPRN_HID5); | ||
205 | SYSFS_PMCSETUP(ima0, SPRN_PA6T_IMA0); | ||
206 | SYSFS_PMCSETUP(ima1, SPRN_PA6T_IMA1); | ||
207 | SYSFS_PMCSETUP(ima2, SPRN_PA6T_IMA2); | ||
208 | SYSFS_PMCSETUP(ima3, SPRN_PA6T_IMA3); | ||
209 | SYSFS_PMCSETUP(ima4, SPRN_PA6T_IMA4); | ||
210 | SYSFS_PMCSETUP(ima5, SPRN_PA6T_IMA5); | ||
211 | SYSFS_PMCSETUP(ima6, SPRN_PA6T_IMA6); | ||
212 | SYSFS_PMCSETUP(ima7, SPRN_PA6T_IMA7); | ||
213 | SYSFS_PMCSETUP(ima8, SPRN_PA6T_IMA8); | ||
214 | SYSFS_PMCSETUP(ima9, SPRN_PA6T_IMA9); | ||
215 | SYSFS_PMCSETUP(imaat, SPRN_PA6T_IMAAT); | ||
216 | SYSFS_PMCSETUP(btcr, SPRN_PA6T_BTCR); | ||
217 | SYSFS_PMCSETUP(pccr, SPRN_PA6T_PCCR); | ||
218 | SYSFS_PMCSETUP(rpccr, SPRN_PA6T_RPCCR); | ||
219 | SYSFS_PMCSETUP(der, SPRN_PA6T_DER); | ||
220 | SYSFS_PMCSETUP(mer, SPRN_PA6T_MER); | ||
221 | SYSFS_PMCSETUP(ber, SPRN_PA6T_BER); | ||
222 | SYSFS_PMCSETUP(ier, SPRN_PA6T_IER); | ||
223 | SYSFS_PMCSETUP(sier, SPRN_PA6T_SIER); | ||
224 | SYSFS_PMCSETUP(siar, SPRN_PA6T_SIAR); | ||
225 | SYSFS_PMCSETUP(tsr0, SPRN_PA6T_TSR0); | ||
226 | SYSFS_PMCSETUP(tsr1, SPRN_PA6T_TSR1); | ||
227 | SYSFS_PMCSETUP(tsr2, SPRN_PA6T_TSR2); | ||
228 | SYSFS_PMCSETUP(tsr3, SPRN_PA6T_TSR3); | ||
229 | #endif /* CONFIG_DEBUG_KERNEL */ | ||
200 | 230 | ||
201 | static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); | 231 | static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); |
202 | static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); | 232 | static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); |
@@ -228,6 +258,36 @@ static struct sysdev_attribute pa6t_attrs[] = { | |||
228 | _SYSDEV_ATTR(pmc3, 0600, show_pa6t_pmc3, store_pa6t_pmc3), | 258 | _SYSDEV_ATTR(pmc3, 0600, show_pa6t_pmc3, store_pa6t_pmc3), |
229 | _SYSDEV_ATTR(pmc4, 0600, show_pa6t_pmc4, store_pa6t_pmc4), | 259 | _SYSDEV_ATTR(pmc4, 0600, show_pa6t_pmc4, store_pa6t_pmc4), |
230 | _SYSDEV_ATTR(pmc5, 0600, show_pa6t_pmc5, store_pa6t_pmc5), | 260 | _SYSDEV_ATTR(pmc5, 0600, show_pa6t_pmc5, store_pa6t_pmc5), |
261 | #ifdef CONFIG_DEBUG_KERNEL | ||
262 | _SYSDEV_ATTR(hid0, 0600, show_hid0, store_hid0), | ||
263 | _SYSDEV_ATTR(hid1, 0600, show_hid1, store_hid1), | ||
264 | _SYSDEV_ATTR(hid4, 0600, show_hid4, store_hid4), | ||
265 | _SYSDEV_ATTR(hid5, 0600, show_hid5, store_hid5), | ||
266 | _SYSDEV_ATTR(ima0, 0600, show_ima0, store_ima0), | ||
267 | _SYSDEV_ATTR(ima1, 0600, show_ima1, store_ima1), | ||
268 | _SYSDEV_ATTR(ima2, 0600, show_ima2, store_ima2), | ||
269 | _SYSDEV_ATTR(ima3, 0600, show_ima3, store_ima3), | ||
270 | _SYSDEV_ATTR(ima4, 0600, show_ima4, store_ima4), | ||
271 | _SYSDEV_ATTR(ima5, 0600, show_ima5, store_ima5), | ||
272 | _SYSDEV_ATTR(ima6, 0600, show_ima6, store_ima6), | ||
273 | _SYSDEV_ATTR(ima7, 0600, show_ima7, store_ima7), | ||
274 | _SYSDEV_ATTR(ima8, 0600, show_ima8, store_ima8), | ||
275 | _SYSDEV_ATTR(ima9, 0600, show_ima9, store_ima9), | ||
276 | _SYSDEV_ATTR(imaat, 0600, show_imaat, store_imaat), | ||
277 | _SYSDEV_ATTR(btcr, 0600, show_btcr, store_btcr), | ||
278 | _SYSDEV_ATTR(pccr, 0600, show_pccr, store_pccr), | ||
279 | _SYSDEV_ATTR(rpccr, 0600, show_rpccr, store_rpccr), | ||
280 | _SYSDEV_ATTR(der, 0600, show_der, store_der), | ||
281 | _SYSDEV_ATTR(mer, 0600, show_mer, store_mer), | ||
282 | _SYSDEV_ATTR(ber, 0600, show_ber, store_ber), | ||
283 | _SYSDEV_ATTR(ier, 0600, show_ier, store_ier), | ||
284 | _SYSDEV_ATTR(sier, 0600, show_sier, store_sier), | ||
285 | _SYSDEV_ATTR(siar, 0600, show_siar, store_siar), | ||
286 | _SYSDEV_ATTR(tsr0, 0600, show_tsr0, store_tsr0), | ||
287 | _SYSDEV_ATTR(tsr1, 0600, show_tsr1, store_tsr1), | ||
288 | _SYSDEV_ATTR(tsr2, 0600, show_tsr2, store_tsr2), | ||
289 | _SYSDEV_ATTR(tsr3, 0600, show_tsr3, store_tsr3), | ||
290 | #endif /* CONFIG_DEBUG_KERNEL */ | ||
231 | }; | 291 | }; |
232 | 292 | ||
233 | 293 | ||
@@ -380,12 +440,14 @@ int cpu_add_sysdev_attr_group(struct attribute_group *attrs) | |||
380 | { | 440 | { |
381 | int cpu; | 441 | int cpu; |
382 | struct sys_device *sysdev; | 442 | struct sys_device *sysdev; |
443 | int ret; | ||
383 | 444 | ||
384 | mutex_lock(&cpu_mutex); | 445 | mutex_lock(&cpu_mutex); |
385 | 446 | ||
386 | for_each_possible_cpu(cpu) { | 447 | for_each_possible_cpu(cpu) { |
387 | sysdev = get_cpu_sysdev(cpu); | 448 | sysdev = get_cpu_sysdev(cpu); |
388 | sysfs_create_group(&sysdev->kobj, attrs); | 449 | ret = sysfs_create_group(&sysdev->kobj, attrs); |
450 | WARN_ON(ret != 0); | ||
389 | } | 451 | } |
390 | 452 | ||
391 | mutex_unlock(&cpu_mutex); | 453 | mutex_unlock(&cpu_mutex); |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c627cf86d1e3..e71a0d8c597a 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -65,24 +65,45 @@ | |||
65 | #include <asm/div64.h> | 65 | #include <asm/div64.h> |
66 | #include <asm/smp.h> | 66 | #include <asm/smp.h> |
67 | #include <asm/vdso_datapage.h> | 67 | #include <asm/vdso_datapage.h> |
68 | #ifdef CONFIG_PPC64 | ||
69 | #include <asm/firmware.h> | 68 | #include <asm/firmware.h> |
70 | #endif | ||
71 | #ifdef CONFIG_PPC_ISERIES | 69 | #ifdef CONFIG_PPC_ISERIES |
72 | #include <asm/iseries/it_lp_queue.h> | 70 | #include <asm/iseries/it_lp_queue.h> |
73 | #include <asm/iseries/hv_call_xm.h> | 71 | #include <asm/iseries/hv_call_xm.h> |
74 | #endif | 72 | #endif |
75 | #include <asm/smp.h> | ||
76 | 73 | ||
77 | /* keep track of when we need to update the rtc */ | 74 | /* powerpc clocksource/clockevent code */ |
78 | time_t last_rtc_update; | 75 | |
76 | #include <linux/clocksource.h> | ||
77 | |||
78 | static cycle_t rtc_read(void); | ||
79 | static struct clocksource clocksource_rtc = { | ||
80 | .name = "rtc", | ||
81 | .rating = 400, | ||
82 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
83 | .mask = CLOCKSOURCE_MASK(64), | ||
84 | .shift = 22, | ||
85 | .mult = 0, /* To be filled in */ | ||
86 | .read = rtc_read, | ||
87 | }; | ||
88 | |||
89 | static cycle_t timebase_read(void); | ||
90 | static struct clocksource clocksource_timebase = { | ||
91 | .name = "timebase", | ||
92 | .rating = 400, | ||
93 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
94 | .mask = CLOCKSOURCE_MASK(64), | ||
95 | .shift = 22, | ||
96 | .mult = 0, /* To be filled in */ | ||
97 | .read = timebase_read, | ||
98 | }; | ||
99 | |||
79 | #ifdef CONFIG_PPC_ISERIES | 100 | #ifdef CONFIG_PPC_ISERIES |
80 | static unsigned long __initdata iSeries_recal_titan; | 101 | static unsigned long __initdata iSeries_recal_titan; |
81 | static signed long __initdata iSeries_recal_tb; | 102 | static signed long __initdata iSeries_recal_tb; |
82 | #endif | ||
83 | 103 | ||
84 | /* The decrementer counts down by 128 every 128ns on a 601. */ | 104 | /* Forward declaration is only needed for iSereis compiles */ |
85 | #define DECREMENTER_COUNT_601 (1000000000 / HZ) | 105 | void __init clocksource_init(void); |
106 | #endif | ||
86 | 107 | ||
87 | #define XSEC_PER_SEC (1024*1024) | 108 | #define XSEC_PER_SEC (1024*1024) |
88 | 109 | ||
@@ -349,98 +370,6 @@ void udelay(unsigned long usecs) | |||
349 | } | 370 | } |
350 | EXPORT_SYMBOL(udelay); | 371 | EXPORT_SYMBOL(udelay); |
351 | 372 | ||
352 | static __inline__ void timer_check_rtc(void) | ||
353 | { | ||
354 | /* | ||
355 | * update the rtc when needed, this should be performed on the | ||
356 | * right fraction of a second. Half or full second ? | ||
357 | * Full second works on mk48t59 clocks, others need testing. | ||
358 | * Note that this update is basically only used through | ||
359 | * the adjtimex system calls. Setting the HW clock in | ||
360 | * any other way is a /dev/rtc and userland business. | ||
361 | * This is still wrong by -0.5/+1.5 jiffies because of the | ||
362 | * timer interrupt resolution and possible delay, but here we | ||
363 | * hit a quantization limit which can only be solved by higher | ||
364 | * resolution timers and decoupling time management from timer | ||
365 | * interrupts. This is also wrong on the clocks | ||
366 | * which require being written at the half second boundary. | ||
367 | * We should have an rtc call that only sets the minutes and | ||
368 | * seconds like on Intel to avoid problems with non UTC clocks. | ||
369 | */ | ||
370 | if (ppc_md.set_rtc_time && ntp_synced() && | ||
371 | xtime.tv_sec - last_rtc_update >= 659 && | ||
372 | abs((xtime.tv_nsec/1000) - (1000000-1000000/HZ)) < 500000/HZ) { | ||
373 | struct rtc_time tm; | ||
374 | to_tm(xtime.tv_sec + 1 + timezone_offset, &tm); | ||
375 | tm.tm_year -= 1900; | ||
376 | tm.tm_mon -= 1; | ||
377 | if (ppc_md.set_rtc_time(&tm) == 0) | ||
378 | last_rtc_update = xtime.tv_sec + 1; | ||
379 | else | ||
380 | /* Try again one minute later */ | ||
381 | last_rtc_update += 60; | ||
382 | } | ||
383 | } | ||
384 | |||
385 | /* | ||
386 | * This version of gettimeofday has microsecond resolution. | ||
387 | */ | ||
388 | static inline void __do_gettimeofday(struct timeval *tv) | ||
389 | { | ||
390 | unsigned long sec, usec; | ||
391 | u64 tb_ticks, xsec; | ||
392 | struct gettimeofday_vars *temp_varp; | ||
393 | u64 temp_tb_to_xs, temp_stamp_xsec; | ||
394 | |||
395 | /* | ||
396 | * These calculations are faster (gets rid of divides) | ||
397 | * if done in units of 1/2^20 rather than microseconds. | ||
398 | * The conversion to microseconds at the end is done | ||
399 | * without a divide (and in fact, without a multiply) | ||
400 | */ | ||
401 | temp_varp = do_gtod.varp; | ||
402 | |||
403 | /* Sampling the time base must be done after loading | ||
404 | * do_gtod.varp in order to avoid racing with update_gtod. | ||
405 | */ | ||
406 | data_barrier(temp_varp); | ||
407 | tb_ticks = get_tb() - temp_varp->tb_orig_stamp; | ||
408 | temp_tb_to_xs = temp_varp->tb_to_xs; | ||
409 | temp_stamp_xsec = temp_varp->stamp_xsec; | ||
410 | xsec = temp_stamp_xsec + mulhdu(tb_ticks, temp_tb_to_xs); | ||
411 | sec = xsec / XSEC_PER_SEC; | ||
412 | usec = (unsigned long)xsec & (XSEC_PER_SEC - 1); | ||
413 | usec = SCALE_XSEC(usec, 1000000); | ||
414 | |||
415 | tv->tv_sec = sec; | ||
416 | tv->tv_usec = usec; | ||
417 | } | ||
418 | |||
419 | void do_gettimeofday(struct timeval *tv) | ||
420 | { | ||
421 | if (__USE_RTC()) { | ||
422 | /* do this the old way */ | ||
423 | unsigned long flags, seq; | ||
424 | unsigned int sec, nsec, usec; | ||
425 | |||
426 | do { | ||
427 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | ||
428 | sec = xtime.tv_sec; | ||
429 | nsec = xtime.tv_nsec + tb_ticks_since(tb_last_jiffy); | ||
430 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | ||
431 | usec = nsec / 1000; | ||
432 | while (usec >= 1000000) { | ||
433 | usec -= 1000000; | ||
434 | ++sec; | ||
435 | } | ||
436 | tv->tv_sec = sec; | ||
437 | tv->tv_usec = usec; | ||
438 | return; | ||
439 | } | ||
440 | __do_gettimeofday(tv); | ||
441 | } | ||
442 | |||
443 | EXPORT_SYMBOL(do_gettimeofday); | ||
444 | 373 | ||
445 | /* | 374 | /* |
446 | * There are two copies of tb_to_xs and stamp_xsec so that no | 375 | * There are two copies of tb_to_xs and stamp_xsec so that no |
@@ -486,56 +415,6 @@ static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec, | |||
486 | ++(vdso_data->tb_update_count); | 415 | ++(vdso_data->tb_update_count); |
487 | } | 416 | } |
488 | 417 | ||
489 | /* | ||
490 | * When the timebase - tb_orig_stamp gets too big, we do a manipulation | ||
491 | * between tb_orig_stamp and stamp_xsec. The goal here is to keep the | ||
492 | * difference tb - tb_orig_stamp small enough to always fit inside a | ||
493 | * 32 bits number. This is a requirement of our fast 32 bits userland | ||
494 | * implementation in the vdso. If we "miss" a call to this function | ||
495 | * (interrupt latency, CPU locked in a spinlock, ...) and we end up | ||
496 | * with a too big difference, then the vdso will fallback to calling | ||
497 | * the syscall | ||
498 | */ | ||
499 | static __inline__ void timer_recalc_offset(u64 cur_tb) | ||
500 | { | ||
501 | unsigned long offset; | ||
502 | u64 new_stamp_xsec; | ||
503 | u64 tlen, t2x; | ||
504 | u64 tb, xsec_old, xsec_new; | ||
505 | struct gettimeofday_vars *varp; | ||
506 | |||
507 | if (__USE_RTC()) | ||
508 | return; | ||
509 | tlen = current_tick_length(); | ||
510 | offset = cur_tb - do_gtod.varp->tb_orig_stamp; | ||
511 | if (tlen == last_tick_len && offset < 0x80000000u) | ||
512 | return; | ||
513 | if (tlen != last_tick_len) { | ||
514 | t2x = mulhdu(tlen << TICKLEN_SHIFT, ticklen_to_xs); | ||
515 | last_tick_len = tlen; | ||
516 | } else | ||
517 | t2x = do_gtod.varp->tb_to_xs; | ||
518 | new_stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC; | ||
519 | do_div(new_stamp_xsec, 1000000000); | ||
520 | new_stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC; | ||
521 | |||
522 | ++vdso_data->tb_update_count; | ||
523 | smp_mb(); | ||
524 | |||
525 | /* | ||
526 | * Make sure time doesn't go backwards for userspace gettimeofday. | ||
527 | */ | ||
528 | tb = get_tb(); | ||
529 | varp = do_gtod.varp; | ||
530 | xsec_old = mulhdu(tb - varp->tb_orig_stamp, varp->tb_to_xs) | ||
531 | + varp->stamp_xsec; | ||
532 | xsec_new = mulhdu(tb - cur_tb, t2x) + new_stamp_xsec; | ||
533 | if (xsec_new < xsec_old) | ||
534 | new_stamp_xsec += xsec_old - xsec_new; | ||
535 | |||
536 | update_gtod(cur_tb, new_stamp_xsec, t2x); | ||
537 | } | ||
538 | |||
539 | #ifdef CONFIG_SMP | 418 | #ifdef CONFIG_SMP |
540 | unsigned long profile_pc(struct pt_regs *regs) | 419 | unsigned long profile_pc(struct pt_regs *regs) |
541 | { | 420 | { |
@@ -607,6 +486,8 @@ static int __init iSeries_tb_recal(void) | |||
607 | iSeries_recal_titan = titan; | 486 | iSeries_recal_titan = titan; |
608 | iSeries_recal_tb = tb; | 487 | iSeries_recal_tb = tb; |
609 | 488 | ||
489 | /* Called here as now we know accurate values for the timebase */ | ||
490 | clocksource_init(); | ||
610 | return 0; | 491 | return 0; |
611 | } | 492 | } |
612 | late_initcall(iSeries_tb_recal); | 493 | late_initcall(iSeries_tb_recal); |
@@ -689,8 +570,6 @@ void timer_interrupt(struct pt_regs * regs) | |||
689 | if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) { | 570 | if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) { |
690 | tb_last_jiffy = tb_next_jiffy; | 571 | tb_last_jiffy = tb_next_jiffy; |
691 | do_timer(1); | 572 | do_timer(1); |
692 | timer_recalc_offset(tb_last_jiffy); | ||
693 | timer_check_rtc(); | ||
694 | } | 573 | } |
695 | write_sequnlock(&xtime_lock); | 574 | write_sequnlock(&xtime_lock); |
696 | } | 575 | } |
@@ -762,71 +641,6 @@ unsigned long long sched_clock(void) | |||
762 | return mulhdu(get_tb() - boot_tb, tb_to_ns_scale) << tb_to_ns_shift; | 641 | return mulhdu(get_tb() - boot_tb, tb_to_ns_scale) << tb_to_ns_shift; |
763 | } | 642 | } |
764 | 643 | ||
765 | int do_settimeofday(struct timespec *tv) | ||
766 | { | ||
767 | time_t wtm_sec, new_sec = tv->tv_sec; | ||
768 | long wtm_nsec, new_nsec = tv->tv_nsec; | ||
769 | unsigned long flags; | ||
770 | u64 new_xsec; | ||
771 | unsigned long tb_delta; | ||
772 | |||
773 | if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) | ||
774 | return -EINVAL; | ||
775 | |||
776 | write_seqlock_irqsave(&xtime_lock, flags); | ||
777 | |||
778 | /* | ||
779 | * Updating the RTC is not the job of this code. If the time is | ||
780 | * stepped under NTP, the RTC will be updated after STA_UNSYNC | ||
781 | * is cleared. Tools like clock/hwclock either copy the RTC | ||
782 | * to the system time, in which case there is no point in writing | ||
783 | * to the RTC again, or write to the RTC but then they don't call | ||
784 | * settimeofday to perform this operation. | ||
785 | */ | ||
786 | |||
787 | /* Make userspace gettimeofday spin until we're done. */ | ||
788 | ++vdso_data->tb_update_count; | ||
789 | smp_mb(); | ||
790 | |||
791 | /* | ||
792 | * Subtract off the number of nanoseconds since the | ||
793 | * beginning of the last tick. | ||
794 | */ | ||
795 | tb_delta = tb_ticks_since(tb_last_jiffy); | ||
796 | tb_delta = mulhdu(tb_delta, do_gtod.varp->tb_to_xs); /* in xsec */ | ||
797 | new_nsec -= SCALE_XSEC(tb_delta, 1000000000); | ||
798 | |||
799 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - new_sec); | ||
800 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - new_nsec); | ||
801 | |||
802 | set_normalized_timespec(&xtime, new_sec, new_nsec); | ||
803 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); | ||
804 | |||
805 | /* In case of a large backwards jump in time with NTP, we want the | ||
806 | * clock to be updated as soon as the PLL is again in lock. | ||
807 | */ | ||
808 | last_rtc_update = new_sec - 658; | ||
809 | |||
810 | ntp_clear(); | ||
811 | |||
812 | new_xsec = xtime.tv_nsec; | ||
813 | if (new_xsec != 0) { | ||
814 | new_xsec *= XSEC_PER_SEC; | ||
815 | do_div(new_xsec, NSEC_PER_SEC); | ||
816 | } | ||
817 | new_xsec += (u64)xtime.tv_sec * XSEC_PER_SEC; | ||
818 | update_gtod(tb_last_jiffy, new_xsec, do_gtod.varp->tb_to_xs); | ||
819 | |||
820 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; | ||
821 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; | ||
822 | |||
823 | write_sequnlock_irqrestore(&xtime_lock, flags); | ||
824 | clock_was_set(); | ||
825 | return 0; | ||
826 | } | ||
827 | |||
828 | EXPORT_SYMBOL(do_settimeofday); | ||
829 | |||
830 | static int __init get_freq(char *name, int cells, unsigned long *val) | 644 | static int __init get_freq(char *name, int cells, unsigned long *val) |
831 | { | 645 | { |
832 | struct device_node *cpu; | 646 | struct device_node *cpu; |
@@ -869,7 +683,7 @@ void __init generic_calibrate_decr(void) | |||
869 | "(not found)\n"); | 683 | "(not found)\n"); |
870 | } | 684 | } |
871 | 685 | ||
872 | #ifdef CONFIG_BOOKE | 686 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
873 | /* Set the time base to zero */ | 687 | /* Set the time base to zero */ |
874 | mtspr(SPRN_TBWL, 0); | 688 | mtspr(SPRN_TBWL, 0); |
875 | mtspr(SPRN_TBWU, 0); | 689 | mtspr(SPRN_TBWU, 0); |
@@ -882,12 +696,35 @@ void __init generic_calibrate_decr(void) | |||
882 | #endif | 696 | #endif |
883 | } | 697 | } |
884 | 698 | ||
885 | unsigned long get_boot_time(void) | 699 | int update_persistent_clock(struct timespec now) |
700 | { | ||
701 | struct rtc_time tm; | ||
702 | |||
703 | if (!ppc_md.set_rtc_time) | ||
704 | return 0; | ||
705 | |||
706 | to_tm(now.tv_sec + 1 + timezone_offset, &tm); | ||
707 | tm.tm_year -= 1900; | ||
708 | tm.tm_mon -= 1; | ||
709 | |||
710 | return ppc_md.set_rtc_time(&tm); | ||
711 | } | ||
712 | |||
713 | unsigned long read_persistent_clock(void) | ||
886 | { | 714 | { |
887 | struct rtc_time tm; | 715 | struct rtc_time tm; |
716 | static int first = 1; | ||
888 | 717 | ||
889 | if (ppc_md.get_boot_time) | 718 | /* XXX this is a litle fragile but will work okay in the short term */ |
890 | return ppc_md.get_boot_time(); | 719 | if (first) { |
720 | first = 0; | ||
721 | if (ppc_md.time_init) | ||
722 | timezone_offset = ppc_md.time_init(); | ||
723 | |||
724 | /* get_boot_time() isn't guaranteed to be safe to call late */ | ||
725 | if (ppc_md.get_boot_time) | ||
726 | return ppc_md.get_boot_time() -timezone_offset; | ||
727 | } | ||
891 | if (!ppc_md.get_rtc_time) | 728 | if (!ppc_md.get_rtc_time) |
892 | return 0; | 729 | return 0; |
893 | ppc_md.get_rtc_time(&tm); | 730 | ppc_md.get_rtc_time(&tm); |
@@ -895,18 +732,77 @@ unsigned long get_boot_time(void) | |||
895 | tm.tm_hour, tm.tm_min, tm.tm_sec); | 732 | tm.tm_hour, tm.tm_min, tm.tm_sec); |
896 | } | 733 | } |
897 | 734 | ||
735 | /* clocksource code */ | ||
736 | static cycle_t rtc_read(void) | ||
737 | { | ||
738 | return (cycle_t)get_rtc(); | ||
739 | } | ||
740 | |||
741 | static cycle_t timebase_read(void) | ||
742 | { | ||
743 | return (cycle_t)get_tb(); | ||
744 | } | ||
745 | |||
746 | void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) | ||
747 | { | ||
748 | u64 t2x, stamp_xsec; | ||
749 | |||
750 | if (clock != &clocksource_timebase) | ||
751 | return; | ||
752 | |||
753 | /* Make userspace gettimeofday spin until we're done. */ | ||
754 | ++vdso_data->tb_update_count; | ||
755 | smp_mb(); | ||
756 | |||
757 | /* XXX this assumes clock->shift == 22 */ | ||
758 | /* 4611686018 ~= 2^(20+64-22) / 1e9 */ | ||
759 | t2x = (u64) clock->mult * 4611686018ULL; | ||
760 | stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC; | ||
761 | do_div(stamp_xsec, 1000000000); | ||
762 | stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC; | ||
763 | update_gtod(clock->cycle_last, stamp_xsec, t2x); | ||
764 | } | ||
765 | |||
766 | void update_vsyscall_tz(void) | ||
767 | { | ||
768 | /* Make userspace gettimeofday spin until we're done. */ | ||
769 | ++vdso_data->tb_update_count; | ||
770 | smp_mb(); | ||
771 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; | ||
772 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; | ||
773 | smp_mb(); | ||
774 | ++vdso_data->tb_update_count; | ||
775 | } | ||
776 | |||
777 | void __init clocksource_init(void) | ||
778 | { | ||
779 | struct clocksource *clock; | ||
780 | |||
781 | if (__USE_RTC()) | ||
782 | clock = &clocksource_rtc; | ||
783 | else | ||
784 | clock = &clocksource_timebase; | ||
785 | |||
786 | clock->mult = clocksource_hz2mult(tb_ticks_per_sec, clock->shift); | ||
787 | |||
788 | if (clocksource_register(clock)) { | ||
789 | printk(KERN_ERR "clocksource: %s is already registered\n", | ||
790 | clock->name); | ||
791 | return; | ||
792 | } | ||
793 | |||
794 | printk(KERN_INFO "clocksource: %s mult[%x] shift[%d] registered\n", | ||
795 | clock->name, clock->mult, clock->shift); | ||
796 | } | ||
797 | |||
898 | /* This function is only called on the boot processor */ | 798 | /* This function is only called on the boot processor */ |
899 | void __init time_init(void) | 799 | void __init time_init(void) |
900 | { | 800 | { |
901 | unsigned long flags; | 801 | unsigned long flags; |
902 | unsigned long tm = 0; | ||
903 | struct div_result res; | 802 | struct div_result res; |
904 | u64 scale, x; | 803 | u64 scale, x; |
905 | unsigned shift; | 804 | unsigned shift; |
906 | 805 | ||
907 | if (ppc_md.time_init != NULL) | ||
908 | timezone_offset = ppc_md.time_init(); | ||
909 | |||
910 | if (__USE_RTC()) { | 806 | if (__USE_RTC()) { |
911 | /* 601 processor: dec counts down by 128 every 128ns */ | 807 | /* 601 processor: dec counts down by 128 every 128ns */ |
912 | ppc_tb_freq = 1000000000; | 808 | ppc_tb_freq = 1000000000; |
@@ -981,19 +877,14 @@ void __init time_init(void) | |||
981 | /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */ | 877 | /* Save the current timebase to pretty up CONFIG_PRINTK_TIME */ |
982 | boot_tb = get_tb_or_rtc(); | 878 | boot_tb = get_tb_or_rtc(); |
983 | 879 | ||
984 | tm = get_boot_time(); | ||
985 | |||
986 | write_seqlock_irqsave(&xtime_lock, flags); | 880 | write_seqlock_irqsave(&xtime_lock, flags); |
987 | 881 | ||
988 | /* If platform provided a timezone (pmac), we correct the time */ | 882 | /* If platform provided a timezone (pmac), we correct the time */ |
989 | if (timezone_offset) { | 883 | if (timezone_offset) { |
990 | sys_tz.tz_minuteswest = -timezone_offset / 60; | 884 | sys_tz.tz_minuteswest = -timezone_offset / 60; |
991 | sys_tz.tz_dsttime = 0; | 885 | sys_tz.tz_dsttime = 0; |
992 | tm -= timezone_offset; | ||
993 | } | 886 | } |
994 | 887 | ||
995 | xtime.tv_sec = tm; | ||
996 | xtime.tv_nsec = 0; | ||
997 | do_gtod.varp = &do_gtod.vars[0]; | 888 | do_gtod.varp = &do_gtod.vars[0]; |
998 | do_gtod.var_idx = 0; | 889 | do_gtod.var_idx = 0; |
999 | do_gtod.varp->tb_orig_stamp = tb_last_jiffy; | 890 | do_gtod.varp->tb_orig_stamp = tb_last_jiffy; |
@@ -1011,11 +902,12 @@ void __init time_init(void) | |||
1011 | 902 | ||
1012 | time_freq = 0; | 903 | time_freq = 0; |
1013 | 904 | ||
1014 | last_rtc_update = xtime.tv_sec; | ||
1015 | set_normalized_timespec(&wall_to_monotonic, | ||
1016 | -xtime.tv_sec, -xtime.tv_nsec); | ||
1017 | write_sequnlock_irqrestore(&xtime_lock, flags); | 905 | write_sequnlock_irqrestore(&xtime_lock, flags); |
1018 | 906 | ||
907 | /* Register the clocksource, if we're not running on iSeries */ | ||
908 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
909 | clocksource_init(); | ||
910 | |||
1019 | /* Not exact, but the timer interrupt takes care of this */ | 911 | /* Not exact, but the timer interrupt takes care of this */ |
1020 | set_dec(tb_ticks_per_jiffy); | 912 | set_dec(tb_ticks_per_jiffy); |
1021 | } | 913 | } |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index d8502e377518..5a49eabd492e 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -324,47 +324,10 @@ static inline int check_io_access(struct pt_regs *regs) | |||
324 | #define clear_single_step(regs) ((regs)->msr &= ~MSR_SE) | 324 | #define clear_single_step(regs) ((regs)->msr &= ~MSR_SE) |
325 | #endif | 325 | #endif |
326 | 326 | ||
327 | /* | 327 | static int generic_machine_check_exception(struct pt_regs *regs) |
328 | * This is "fall-back" implementation for configurations | ||
329 | * which don't provide platform-specific machine check info | ||
330 | */ | ||
331 | void __attribute__ ((weak)) | ||
332 | platform_machine_check(struct pt_regs *regs) | ||
333 | { | 328 | { |
334 | } | ||
335 | |||
336 | void machine_check_exception(struct pt_regs *regs) | ||
337 | { | ||
338 | int recover = 0; | ||
339 | unsigned long reason = get_mc_reason(regs); | 329 | unsigned long reason = get_mc_reason(regs); |
340 | 330 | ||
341 | /* See if any machine dependent calls */ | ||
342 | if (ppc_md.machine_check_exception) | ||
343 | recover = ppc_md.machine_check_exception(regs); | ||
344 | |||
345 | if (recover) | ||
346 | return; | ||
347 | |||
348 | if (user_mode(regs)) { | ||
349 | regs->msr |= MSR_RI; | ||
350 | _exception(SIGBUS, regs, BUS_ADRERR, regs->nip); | ||
351 | return; | ||
352 | } | ||
353 | |||
354 | #if defined(CONFIG_8xx) && defined(CONFIG_PCI) | ||
355 | /* the qspan pci read routines can cause machine checks -- Cort */ | ||
356 | bad_page_fault(regs, regs->dar, SIGBUS); | ||
357 | return; | ||
358 | #endif | ||
359 | |||
360 | if (debugger_fault_handler(regs)) { | ||
361 | regs->msr |= MSR_RI; | ||
362 | return; | ||
363 | } | ||
364 | |||
365 | if (check_io_access(regs)) | ||
366 | return; | ||
367 | |||
368 | #if defined(CONFIG_4xx) && !defined(CONFIG_440A) | 331 | #if defined(CONFIG_4xx) && !defined(CONFIG_440A) |
369 | if (reason & ESR_IMCP) { | 332 | if (reason & ESR_IMCP) { |
370 | printk("Instruction"); | 333 | printk("Instruction"); |
@@ -480,11 +443,41 @@ void machine_check_exception(struct pt_regs *regs) | |||
480 | } | 443 | } |
481 | #endif /* CONFIG_4xx */ | 444 | #endif /* CONFIG_4xx */ |
482 | 445 | ||
483 | /* | 446 | return 0; |
484 | * Optional platform-provided routine to print out | 447 | } |
485 | * additional info, e.g. bus error registers. | 448 | |
486 | */ | 449 | void machine_check_exception(struct pt_regs *regs) |
487 | platform_machine_check(regs); | 450 | { |
451 | int recover = 0; | ||
452 | |||
453 | /* See if any machine dependent calls */ | ||
454 | if (ppc_md.machine_check_exception) | ||
455 | recover = ppc_md.machine_check_exception(regs); | ||
456 | else | ||
457 | recover = generic_machine_check_exception(regs); | ||
458 | |||
459 | if (recover) | ||
460 | return; | ||
461 | |||
462 | if (user_mode(regs)) { | ||
463 | regs->msr |= MSR_RI; | ||
464 | _exception(SIGBUS, regs, BUS_ADRERR, regs->nip); | ||
465 | return; | ||
466 | } | ||
467 | |||
468 | #if defined(CONFIG_8xx) && defined(CONFIG_PCI) | ||
469 | /* the qspan pci read routines can cause machine checks -- Cort */ | ||
470 | bad_page_fault(regs, regs->dar, SIGBUS); | ||
471 | return; | ||
472 | #endif | ||
473 | |||
474 | if (debugger_fault_handler(regs)) { | ||
475 | regs->msr |= MSR_RI; | ||
476 | return; | ||
477 | } | ||
478 | |||
479 | if (check_io_access(regs)) | ||
480 | return; | ||
488 | 481 | ||
489 | if (debugger_fault_handler(regs)) | 482 | if (debugger_fault_handler(regs)) |
490 | return; | 483 | return; |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 7afab5bcd61a..833a3d0bcfa7 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -206,11 +206,22 @@ static void udbg_44x_as1_putc(char c) | |||
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
209 | static int udbg_44x_as1_getc(void) | ||
210 | { | ||
211 | if (udbg_comport) { | ||
212 | while ((as1_readb(&udbg_comport->lsr) & LSR_DR) == 0) | ||
213 | ; /* wait for char */ | ||
214 | return as1_readb(&udbg_comport->rbr); | ||
215 | } | ||
216 | return -1; | ||
217 | } | ||
218 | |||
209 | void __init udbg_init_44x_as1(void) | 219 | void __init udbg_init_44x_as1(void) |
210 | { | 220 | { |
211 | udbg_comport = | 221 | udbg_comport = |
212 | (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR; | 222 | (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR; |
213 | 223 | ||
214 | udbg_putc = udbg_44x_as1_putc; | 224 | udbg_putc = udbg_44x_as1_putc; |
225 | udbg_getc = udbg_44x_as1_getc; | ||
215 | } | 226 | } |
216 | #endif /* CONFIG_PPC_EARLY_DEBUG_44x */ | 227 | #endif /* CONFIG_PPC_EARLY_DEBUG_44x */ |
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile index 3726358faae8..c3d57bd01a88 100644 --- a/arch/powerpc/kernel/vdso32/Makefile +++ b/arch/powerpc/kernel/vdso32/Makefile | |||
@@ -9,11 +9,11 @@ ifeq ($(CONFIG_PPC32),y) | |||
9 | CROSS32CC := $(CC) | 9 | CROSS32CC := $(CC) |
10 | endif | 10 | endif |
11 | 11 | ||
12 | targets := $(obj-vdso32) vdso32.so | 12 | targets := $(obj-vdso32) vdso32.so vdso32.so.dbg |
13 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) | 13 | obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) |
14 | 14 | ||
15 | 15 | ||
16 | EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin | 16 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
17 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ | 17 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ |
18 | $(call ld-option, -Wl$(comma)--hash-style=sysv) | 18 | $(call ld-option, -Wl$(comma)--hash-style=sysv) |
19 | EXTRA_AFLAGS := -D__VDSO32__ -s | 19 | EXTRA_AFLAGS := -D__VDSO32__ -s |
@@ -26,9 +26,14 @@ CPPFLAGS_vdso32.lds += -P -C -Upowerpc | |||
26 | $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so | 26 | $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so |
27 | 27 | ||
28 | # link rule for the .so file, .lds has to be first | 28 | # link rule for the .so file, .lds has to be first |
29 | $(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) | 29 | $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) |
30 | $(call if_changed,vdso32ld) | 30 | $(call if_changed,vdso32ld) |
31 | 31 | ||
32 | # strip rule for the .so file | ||
33 | $(obj)/%.so: OBJCOPYFLAGS := -S | ||
34 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | ||
35 | $(call if_changed,objcopy) | ||
36 | |||
32 | # assembly rules for the .S files | 37 | # assembly rules for the .S files |
33 | $(obj-vdso32): %.o: %.S | 38 | $(obj-vdso32): %.o: %.S |
34 | $(call if_changed_dep,vdso32as) | 39 | $(call if_changed_dep,vdso32as) |
@@ -39,3 +44,12 @@ quiet_cmd_vdso32ld = VDSO32L $@ | |||
39 | quiet_cmd_vdso32as = VDSO32A $@ | 44 | quiet_cmd_vdso32as = VDSO32A $@ |
40 | cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< | 45 | cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< |
41 | 46 | ||
47 | # install commands for the unstripped file | ||
48 | quiet_cmd_vdso_install = INSTALL $@ | ||
49 | cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ | ||
50 | |||
51 | vdso32.so: $(obj)/vdso32.so.dbg | ||
52 | @mkdir -p $(MODLIB)/vdso | ||
53 | $(call cmd,vdso_install) | ||
54 | |||
55 | vdso_install: vdso32.so | ||
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile index 43af9b2a6f3b..fa7f1b8f3e50 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile | |||
@@ -4,10 +4,10 @@ obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o | |||
4 | 4 | ||
5 | # Build rules | 5 | # Build rules |
6 | 6 | ||
7 | targets := $(obj-vdso64) vdso64.so | 7 | targets := $(obj-vdso64) vdso64.so vdso64.so.dbg |
8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) | 8 | obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) |
9 | 9 | ||
10 | EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin | 10 | EXTRA_CFLAGS := -shared -fno-common -fno-builtin |
11 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ | 11 | EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ |
12 | $(call ld-option, -Wl$(comma)--hash-style=sysv) | 12 | $(call ld-option, -Wl$(comma)--hash-style=sysv) |
13 | EXTRA_AFLAGS := -D__VDSO64__ -s | 13 | EXTRA_AFLAGS := -D__VDSO64__ -s |
@@ -20,9 +20,14 @@ CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) | |||
20 | $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so | 20 | $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so |
21 | 21 | ||
22 | # link rule for the .so file, .lds has to be first | 22 | # link rule for the .so file, .lds has to be first |
23 | $(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) | 23 | $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) |
24 | $(call if_changed,vdso64ld) | 24 | $(call if_changed,vdso64ld) |
25 | 25 | ||
26 | # strip rule for the .so file | ||
27 | $(obj)/%.so: OBJCOPYFLAGS := -S | ||
28 | $(obj)/%.so: $(obj)/%.so.dbg FORCE | ||
29 | $(call if_changed,objcopy) | ||
30 | |||
26 | # assembly rules for the .S files | 31 | # assembly rules for the .S files |
27 | $(obj-vdso64): %.o: %.S | 32 | $(obj-vdso64): %.o: %.S |
28 | $(call if_changed_dep,vdso64as) | 33 | $(call if_changed_dep,vdso64as) |
@@ -33,4 +38,12 @@ quiet_cmd_vdso64ld = VDSO64L $@ | |||
33 | quiet_cmd_vdso64as = VDSO64A $@ | 38 | quiet_cmd_vdso64as = VDSO64A $@ |
34 | cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< | 39 | cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< |
35 | 40 | ||
41 | # install commands for the unstripped file | ||
42 | quiet_cmd_vdso_install = INSTALL $@ | ||
43 | cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ | ||
44 | |||
45 | vdso64.so: $(obj)/vdso64.so.dbg | ||
46 | @mkdir -p $(MODLIB)/vdso | ||
47 | $(call cmd,vdso_install) | ||
36 | 48 | ||
49 | vdso_install: vdso64.so | ||
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 62c1bc12ea39..1d7b272b3737 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -39,6 +39,8 @@ | |||
39 | 39 | ||
40 | extern struct kset devices_subsys; /* needed for vio_find_name() */ | 40 | extern struct kset devices_subsys; /* needed for vio_find_name() */ |
41 | 41 | ||
42 | static struct bus_type vio_bus_type; | ||
43 | |||
42 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ | 44 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ |
43 | .name = vio_bus_device.dev.bus_id, | 45 | .name = vio_bus_device.dev.bus_id, |
44 | .type = "", | 46 | .type = "", |
@@ -64,6 +66,12 @@ static void __init iommu_vio_init(void) | |||
64 | printk("Virtual Bus VETH TCE table failed.\n"); | 66 | printk("Virtual Bus VETH TCE table failed.\n"); |
65 | if (!iommu_init_table(&vio_iommu_table, -1)) | 67 | if (!iommu_init_table(&vio_iommu_table, -1)) |
66 | printk("Virtual Bus VIO TCE table failed.\n"); | 68 | printk("Virtual Bus VIO TCE table failed.\n"); |
69 | vio_bus_device.dev.archdata.dma_ops = &dma_iommu_ops; | ||
70 | vio_bus_device.dev.archdata.dma_data = &vio_iommu_table; | ||
71 | } | ||
72 | #else | ||
73 | static void __init iommu_vio_init(void) | ||
74 | { | ||
67 | } | 75 | } |
68 | #endif | 76 | #endif |
69 | 77 | ||
@@ -282,14 +290,8 @@ static int __init vio_bus_init(void) | |||
282 | int err; | 290 | int err; |
283 | struct device_node *node_vroot; | 291 | struct device_node *node_vroot; |
284 | 292 | ||
285 | #ifdef CONFIG_PPC_ISERIES | 293 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
286 | if (firmware_has_feature(FW_FEATURE_ISERIES)) { | ||
287 | iommu_vio_init(); | 294 | iommu_vio_init(); |
288 | vio_bus_device.dev.archdata.dma_ops = &dma_iommu_ops; | ||
289 | vio_bus_device.dev.archdata.dma_data = &vio_iommu_table; | ||
290 | iSeries_vio_dev = &vio_bus_device.dev; | ||
291 | } | ||
292 | #endif /* CONFIG_PPC_ISERIES */ | ||
293 | 295 | ||
294 | err = bus_register(&vio_bus_type); | 296 | err = bus_register(&vio_bus_type); |
295 | if (err) { | 297 | if (err) { |
@@ -317,11 +319,8 @@ static int __init vio_bus_init(void) | |||
317 | * the device tree. Drivers will associate with them later. | 319 | * the device tree. Drivers will associate with them later. |
318 | */ | 320 | */ |
319 | for (of_node = node_vroot->child; of_node != NULL; | 321 | for (of_node = node_vroot->child; of_node != NULL; |
320 | of_node = of_node->sibling) { | 322 | of_node = of_node->sibling) |
321 | printk(KERN_DEBUG "%s: processing %p\n", | ||
322 | __FUNCTION__, of_node); | ||
323 | vio_register_device_node(of_node); | 323 | vio_register_device_node(of_node); |
324 | } | ||
325 | of_node_put(node_vroot); | 324 | of_node_put(node_vroot); |
326 | } | 325 | } |
327 | 326 | ||
@@ -391,7 +390,7 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp, | |||
391 | return 0; | 390 | return 0; |
392 | } | 391 | } |
393 | 392 | ||
394 | struct bus_type vio_bus_type = { | 393 | static struct bus_type vio_bus_type = { |
395 | .name = "vio", | 394 | .name = "vio", |
396 | .dev_attrs = vio_dev_attrs, | 395 | .dev_attrs = vio_dev_attrs, |
397 | .uevent = vio_hotplug, | 396 | .uevent = vio_hotplug, |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 0c458556399f..823a8cbd60b5 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -34,6 +34,8 @@ SECTIONS | |||
34 | 34 | ||
35 | /* Text and gots */ | 35 | /* Text and gots */ |
36 | .text : { | 36 | .text : { |
37 | ALIGN_FUNCTION(); | ||
38 | *(.text.head) | ||
37 | _text = .; | 39 | _text = .; |
38 | TEXT_TEXT | 40 | TEXT_TEXT |
39 | SCHED_TEXT | 41 | SCHED_TEXT |
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 0a486d4b2547..65d492e316a6 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile | |||
@@ -7,11 +7,12 @@ EXTRA_CFLAGS += -mno-minimal-toc | |||
7 | endif | 7 | endif |
8 | 8 | ||
9 | ifeq ($(CONFIG_PPC_MERGE),y) | 9 | ifeq ($(CONFIG_PPC_MERGE),y) |
10 | obj-y := string.o | 10 | obj-y := string.o alloc.o \ |
11 | obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o | 11 | checksum_$(CONFIG_WORD_SIZE).o |
12 | obj-$(CONFIG_PPC32) += div64.o copy_32.o | ||
12 | endif | 13 | endif |
13 | 14 | ||
14 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ | 15 | obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \ |
15 | memcpy_64.o usercopy_64.o mem_64.o string.o | 16 | memcpy_64.o usercopy_64.o mem_64.o string.o |
16 | obj-$(CONFIG_QUICC_ENGINE) += rheap.o | 17 | obj-$(CONFIG_QUICC_ENGINE) += rheap.o |
17 | obj-$(CONFIG_XMON) += sstep.o | 18 | obj-$(CONFIG_XMON) += sstep.o |
diff --git a/arch/powerpc/lib/alloc.c b/arch/powerpc/lib/alloc.c new file mode 100644 index 000000000000..f53e09c7dac7 --- /dev/null +++ b/arch/powerpc/lib/alloc.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <linux/types.h> | ||
2 | #include <linux/init.h> | ||
3 | #include <linux/slab.h> | ||
4 | #include <linux/bootmem.h> | ||
5 | #include <linux/string.h> | ||
6 | |||
7 | #include <asm/system.h> | ||
8 | |||
9 | void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask) | ||
10 | { | ||
11 | if (mem_init_done) | ||
12 | return kmalloc(size, mask); | ||
13 | else | ||
14 | return alloc_bootmem(size); | ||
15 | } | ||
16 | |||
17 | void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask) | ||
18 | { | ||
19 | void *p; | ||
20 | |||
21 | if (mem_init_done) | ||
22 | p = kzalloc(size, mask); | ||
23 | else { | ||
24 | p = alloc_bootmem(size); | ||
25 | if (p) | ||
26 | memset(p, 0, size); | ||
27 | } | ||
28 | return p; | ||
29 | } | ||
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/40x_mmu.c index 7ff2609b64d1..e067df836be2 100644 --- a/arch/powerpc/mm/4xx_mmu.c +++ b/arch/powerpc/mm/40x_mmu.c | |||
@@ -108,7 +108,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
108 | pmd_t *pmdp; | 108 | pmd_t *pmdp; |
109 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 109 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
110 | 110 | ||
111 | pmdp = pmd_offset(pgd_offset_k(v), v); | 111 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); |
112 | pmd_val(*pmdp++) = val; | 112 | pmd_val(*pmdp++) = val; |
113 | pmd_val(*pmdp++) = val; | 113 | pmd_val(*pmdp++) = val; |
114 | pmd_val(*pmdp++) = val; | 114 | pmd_val(*pmdp++) = val; |
@@ -123,7 +123,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
123 | pmd_t *pmdp; | 123 | pmd_t *pmdp; |
124 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 124 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
125 | 125 | ||
126 | pmdp = pmd_offset(pgd_offset_k(v), v); | 126 | pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v); |
127 | pmd_val(*pmdp) = val; | 127 | pmd_val(*pmdp) = val; |
128 | 128 | ||
129 | v += LARGE_PAGE_SIZE_4M; | 129 | v += LARGE_PAGE_SIZE_4M; |
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index 7e4d27ad3dee..20629ae95c50 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile | |||
@@ -6,14 +6,17 @@ ifeq ($(CONFIG_PPC64),y) | |||
6 | EXTRA_CFLAGS += -mno-minimal-toc | 6 | EXTRA_CFLAGS += -mno-minimal-toc |
7 | endif | 7 | endif |
8 | 8 | ||
9 | obj-y := fault.o mem.o lmb.o | 9 | obj-y := fault.o mem.o lmb.o \ |
10 | obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o | 10 | init_$(CONFIG_WORD_SIZE).o \ |
11 | pgtable_$(CONFIG_WORD_SIZE).o \ | ||
12 | mmu_context_$(CONFIG_WORD_SIZE).o | ||
11 | hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o | 13 | hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o |
12 | obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \ | 14 | obj-$(CONFIG_PPC64) += hash_utils_64.o \ |
13 | hash_utils_64.o hash_low_64.o tlb_64.o \ | ||
14 | slb_low.o slb.o stab.o mmap.o $(hash-y) | 15 | slb_low.o slb.o stab.o mmap.o $(hash-y) |
15 | obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o tlb_32.o | 16 | obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o |
16 | obj-$(CONFIG_40x) += 4xx_mmu.o | 17 | obj-$(CONFIG_PPC_STD_MMU) += hash_low_$(CONFIG_WORD_SIZE).o \ |
18 | tlb_$(CONFIG_WORD_SIZE).o | ||
19 | obj-$(CONFIG_40x) += 40x_mmu.o | ||
17 | obj-$(CONFIG_44x) += 44x_mmu.o | 20 | obj-$(CONFIG_44x) += 44x_mmu.o |
18 | obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o | 21 | obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o |
19 | obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o | 22 | obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index a47151e806ca..d525f2eba313 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <asm/tlb.h> | 49 | #include <asm/tlb.h> |
50 | #include <asm/cacheflush.h> | 50 | #include <asm/cacheflush.h> |
51 | #include <asm/cputable.h> | 51 | #include <asm/cputable.h> |
52 | #include <asm/abs_addr.h> | ||
53 | #include <asm/sections.h> | 52 | #include <asm/sections.h> |
54 | #include <asm/spu.h> | 53 | #include <asm/spu.h> |
55 | 54 | ||
@@ -602,13 +601,7 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr) | |||
602 | { | 601 | { |
603 | if (mm->context.user_psize == MMU_PAGE_4K) | 602 | if (mm->context.user_psize == MMU_PAGE_4K) |
604 | return; | 603 | return; |
605 | #ifdef CONFIG_PPC_MM_SLICES | ||
606 | slice_set_user_psize(mm, MMU_PAGE_4K); | 604 | slice_set_user_psize(mm, MMU_PAGE_4K); |
607 | #else /* CONFIG_PPC_MM_SLICES */ | ||
608 | mm->context.user_psize = MMU_PAGE_4K; | ||
609 | mm->context.sllp = SLB_VSID_USER | mmu_psize_defs[MMU_PAGE_4K].sllp; | ||
610 | #endif /* CONFIG_PPC_MM_SLICES */ | ||
611 | |||
612 | #ifdef CONFIG_SPU_BASE | 605 | #ifdef CONFIG_SPU_BASE |
613 | spu_flush_all_slbs(mm); | 606 | spu_flush_all_slbs(mm); |
614 | #endif | 607 | #endif |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 4835f73af304..ba5f12a60467 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -22,11 +22,8 @@ | |||
22 | #include <asm/mmu_context.h> | 22 | #include <asm/mmu_context.h> |
23 | #include <asm/machdep.h> | 23 | #include <asm/machdep.h> |
24 | #include <asm/cputable.h> | 24 | #include <asm/cputable.h> |
25 | #include <asm/tlb.h> | ||
26 | #include <asm/spu.h> | 25 | #include <asm/spu.h> |
27 | 26 | ||
28 | #include <linux/sysctl.h> | ||
29 | |||
30 | #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) | 27 | #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) |
31 | #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) | 28 | #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) |
32 | 29 | ||
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index e1f5ded851f6..27c234fb5118 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/machdep.h> | 41 | #include <asm/machdep.h> |
42 | #include <asm/btext.h> | 42 | #include <asm/btext.h> |
43 | #include <asm/tlb.h> | 43 | #include <asm/tlb.h> |
44 | #include <asm/prom.h> | ||
45 | #include <asm/lmb.h> | 44 | #include <asm/lmb.h> |
46 | #include <asm/sections.h> | 45 | #include <asm/sections.h> |
47 | 46 | ||
@@ -256,3 +255,40 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
256 | } | 255 | } |
257 | } | 256 | } |
258 | #endif | 257 | #endif |
258 | |||
259 | #ifdef CONFIG_PROC_KCORE | ||
260 | static struct kcore_list kcore_vmem; | ||
261 | |||
262 | static int __init setup_kcore(void) | ||
263 | { | ||
264 | int i; | ||
265 | |||
266 | for (i = 0; i < lmb.memory.cnt; i++) { | ||
267 | unsigned long base; | ||
268 | unsigned long size; | ||
269 | struct kcore_list *kcore_mem; | ||
270 | |||
271 | base = lmb.memory.region[i].base; | ||
272 | size = lmb.memory.region[i].size; | ||
273 | |||
274 | kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC); | ||
275 | if (!kcore_mem) | ||
276 | panic("%s: kmalloc failed\n", __FUNCTION__); | ||
277 | |||
278 | /* must stay under 32 bits */ | ||
279 | if ( 0xfffffffful - (unsigned long)__va(base) < size) { | ||
280 | size = 0xfffffffful - (unsigned long)(__va(base)); | ||
281 | printk(KERN_DEBUG "setup_kcore: restrict size=%lx\n", | ||
282 | size); | ||
283 | } | ||
284 | |||
285 | kclist_add(kcore_mem, __va(base), size); | ||
286 | } | ||
287 | |||
288 | kclist_add(&kcore_vmem, (void *)VMALLOC_START, | ||
289 | VMALLOC_END-VMALLOC_START); | ||
290 | |||
291 | return 0; | ||
292 | } | ||
293 | module_init(setup_kcore); | ||
294 | #endif | ||
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 9f27bb56a61d..fa90f6561b9f 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -113,6 +113,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
113 | } | 113 | } |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #ifdef CONFIG_PROC_KCORE | ||
116 | static struct kcore_list kcore_vmem; | 117 | static struct kcore_list kcore_vmem; |
117 | 118 | ||
118 | static int __init setup_kcore(void) | 119 | static int __init setup_kcore(void) |
@@ -139,6 +140,7 @@ static int __init setup_kcore(void) | |||
139 | return 0; | 140 | return 0; |
140 | } | 141 | } |
141 | module_init(setup_kcore); | 142 | module_init(setup_kcore); |
143 | #endif | ||
142 | 144 | ||
143 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) | 145 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) |
144 | { | 146 | { |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index f0e7eedb1ba3..32dcfc9b0082 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
43 | #include <asm/btext.h> | 43 | #include <asm/btext.h> |
44 | #include <asm/tlb.h> | 44 | #include <asm/tlb.h> |
45 | #include <asm/prom.h> | ||
46 | #include <asm/lmb.h> | 45 | #include <asm/lmb.h> |
47 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
48 | #include <asm/vdso.h> | 47 | #include <asm/vdso.h> |
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c index 7a78cdc0515a..1db38ba1f544 100644 --- a/arch/powerpc/mm/mmu_context_64.c +++ b/arch/powerpc/mm/mmu_context_64.c | |||
@@ -28,7 +28,6 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
28 | { | 28 | { |
29 | int index; | 29 | int index; |
30 | int err; | 30 | int err; |
31 | int new_context = (mm->context.id == 0); | ||
32 | 31 | ||
33 | again: | 32 | again: |
34 | if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) | 33 | if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) |
@@ -50,19 +49,13 @@ again: | |||
50 | return -ENOMEM; | 49 | return -ENOMEM; |
51 | } | 50 | } |
52 | 51 | ||
53 | mm->context.id = index; | ||
54 | #ifdef CONFIG_PPC_MM_SLICES | ||
55 | /* The old code would re-promote on fork, we don't do that | 52 | /* The old code would re-promote on fork, we don't do that |
56 | * when using slices as it could cause problem promoting slices | 53 | * when using slices as it could cause problem promoting slices |
57 | * that have been forced down to 4K | 54 | * that have been forced down to 4K |
58 | */ | 55 | */ |
59 | if (new_context) | 56 | if (slice_mm_new_context(mm)) |
60 | slice_set_user_psize(mm, mmu_virtual_psize); | 57 | slice_set_user_psize(mm, mmu_virtual_psize); |
61 | #else | 58 | mm->context.id = index; |
62 | mm->context.user_psize = mmu_virtual_psize; | ||
63 | mm->context.sllp = SLB_VSID_USER | | ||
64 | mmu_psize_defs[mmu_virtual_psize].sllp; | ||
65 | #endif | ||
66 | 59 | ||
67 | return 0; | 60 | return 0; |
68 | } | 61 | } |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 3dfd10db931a..60fd52cd270f 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -228,5 +228,7 @@ void iounmap(volatile void __iomem *token) | |||
228 | EXPORT_SYMBOL(ioremap); | 228 | EXPORT_SYMBOL(ioremap); |
229 | EXPORT_SYMBOL(ioremap_flags); | 229 | EXPORT_SYMBOL(ioremap_flags); |
230 | EXPORT_SYMBOL(__ioremap); | 230 | EXPORT_SYMBOL(__ioremap); |
231 | EXPORT_SYMBOL(__ioremap_at); | ||
231 | EXPORT_SYMBOL(iounmap); | 232 | EXPORT_SYMBOL(iounmap); |
232 | EXPORT_SYMBOL(__iounmap); | 233 | EXPORT_SYMBOL(__iounmap); |
234 | EXPORT_SYMBOL(__iounmap_at); | ||
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index ff1811ac6c81..4bee1cfa9dea 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -59,14 +59,12 @@ static inline void slb_shadow_update(unsigned long ea, | |||
59 | { | 59 | { |
60 | /* | 60 | /* |
61 | * Clear the ESID first so the entry is not valid while we are | 61 | * Clear the ESID first so the entry is not valid while we are |
62 | * updating it. | 62 | * updating it. No write barriers are needed here, provided |
63 | * we only update the current CPU's SLB shadow buffer. | ||
63 | */ | 64 | */ |
64 | get_slb_shadow()->save_area[entry].esid = 0; | 65 | get_slb_shadow()->save_area[entry].esid = 0; |
65 | smp_wmb(); | ||
66 | get_slb_shadow()->save_area[entry].vsid = mk_vsid_data(ea, flags); | 66 | get_slb_shadow()->save_area[entry].vsid = mk_vsid_data(ea, flags); |
67 | smp_wmb(); | ||
68 | get_slb_shadow()->save_area[entry].esid = mk_esid_data(ea, entry); | 67 | get_slb_shadow()->save_area[entry].esid = mk_esid_data(ea, entry); |
69 | smp_wmb(); | ||
70 | } | 68 | } |
71 | 69 | ||
72 | static inline void slb_shadow_clear(unsigned long entry) | 70 | static inline void slb_shadow_clear(unsigned long entry) |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index d5fd3909d13a..319826ef1645 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -551,6 +551,7 @@ EXPORT_SYMBOL_GPL(get_slice_psize); | |||
551 | * | 551 | * |
552 | * This is also called in init_new_context() to change back the user | 552 | * This is also called in init_new_context() to change back the user |
553 | * psize from whatever the parent context had it set to | 553 | * psize from whatever the parent context had it set to |
554 | * N.B. This may be called before mm->context.id has been set. | ||
554 | * | 555 | * |
555 | * This function will only change the content of the {low,high)_slice_psize | 556 | * This function will only change the content of the {low,high)_slice_psize |
556 | * masks, it will not flush SLBs as this shall be handled lazily by the | 557 | * masks, it will not flush SLBs as this shall be handled lazily by the |
diff --git a/arch/powerpc/platforms/4xx/Kconfig b/arch/powerpc/platforms/40x/Kconfig index ded357c17414..c3dce3b3d524 100644 --- a/arch/powerpc/platforms/4xx/Kconfig +++ b/arch/powerpc/platforms/40x/Kconfig | |||
@@ -1,16 +1,3 @@ | |||
1 | config 4xx | ||
2 | bool | ||
3 | depends on 40x || 44x | ||
4 | default y | ||
5 | |||
6 | config BOOKE | ||
7 | bool | ||
8 | depends on 44x | ||
9 | default y | ||
10 | |||
11 | menu "AMCC 40x options" | ||
12 | depends on 40x | ||
13 | |||
14 | #config BUBINGA | 1 | #config BUBINGA |
15 | # bool "Bubinga" | 2 | # bool "Bubinga" |
16 | # depends on 40x | 3 | # depends on 40x |
@@ -66,13 +53,13 @@ menu "AMCC 40x options" | |||
66 | # help | 53 | # help |
67 | # This option enables support for the IBM PPC405GPr evaluation board. | 54 | # This option enables support for the IBM PPC405GPr evaluation board. |
68 | 55 | ||
69 | #config WALNUT | 56 | config WALNUT |
70 | # bool "Walnut" | 57 | bool "Walnut" |
71 | # depends on 40x | 58 | depends on 40x |
72 | # default y | 59 | default y |
73 | # select 405GP | 60 | select 405GP |
74 | # help | 61 | help |
75 | # This option enables support for the IBM PPC405GP evaluation board. | 62 | This option enables support for the IBM PPC405GP evaluation board. |
76 | 63 | ||
77 | #config XILINX_ML300 | 64 | #config XILINX_ML300 |
78 | # bool "Xilinx-ML300" | 65 | # bool "Xilinx-ML300" |
@@ -82,8 +69,6 @@ menu "AMCC 40x options" | |||
82 | # help | 69 | # help |
83 | # This option enables support for the Xilinx ML300 evaluation board. | 70 | # This option enables support for the Xilinx ML300 evaluation board. |
84 | 71 | ||
85 | endmenu | ||
86 | |||
87 | # 40x specific CPU modules, selected based on the board above. | 72 | # 40x specific CPU modules, selected based on the board above. |
88 | config NP405H | 73 | config NP405H |
89 | bool | 74 | bool |
@@ -126,68 +111,6 @@ config IBM405_ERR77 | |||
126 | config IBM405_ERR51 | 111 | config IBM405_ERR51 |
127 | bool | 112 | bool |
128 | 113 | ||
129 | menu "AMCC 44x options" | ||
130 | depends on 44x | ||
131 | |||
132 | #config BAMBOO | ||
133 | # bool "Bamboo" | ||
134 | # depends on 44x | ||
135 | # default n | ||
136 | # select 440EP | ||
137 | # help | ||
138 | # This option enables support for the IBM PPC440EP evaluation board. | ||
139 | |||
140 | config EBONY | ||
141 | bool "Ebony" | ||
142 | depends on 44x | ||
143 | default y | ||
144 | select 440GP | ||
145 | help | ||
146 | This option enables support for the IBM PPC440GP evaluation board. | ||
147 | |||
148 | #config LUAN | ||
149 | # bool "Luan" | ||
150 | # depends on 44x | ||
151 | # default n | ||
152 | # select 440SP | ||
153 | # help | ||
154 | # This option enables support for the IBM PPC440SP evaluation board. | ||
155 | |||
156 | #config OCOTEA | ||
157 | # bool "Ocotea" | ||
158 | # depends on 44x | ||
159 | # default n | ||
160 | # select 440GX | ||
161 | # help | ||
162 | # This option enables support for the IBM PPC440GX evaluation board. | ||
163 | |||
164 | endmenu | ||
165 | |||
166 | # 44x specific CPU modules, selected based on the board above. | ||
167 | config 440EP | ||
168 | bool | ||
169 | select PPC_FPU | ||
170 | select IBM440EP_ERR42 | ||
171 | |||
172 | config 440GP | ||
173 | bool | ||
174 | select IBM_NEW_EMAC_ZMII | ||
175 | |||
176 | config 440GX | ||
177 | bool | ||
178 | |||
179 | config 440SP | ||
180 | bool | ||
181 | |||
182 | config 440A | ||
183 | bool | ||
184 | depends on 440GX | ||
185 | default y | ||
186 | |||
187 | # 44x errata/workaround config symbols, selected by the CPU models above | ||
188 | config IBM440EP_ERR42 | ||
189 | bool | ||
190 | |||
191 | #config XILINX_OCP | 114 | #config XILINX_OCP |
192 | # bool | 115 | # bool |
193 | # depends on XILINX_ML300 | 116 | # depends on XILINX_ML300 |
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile new file mode 100644 index 000000000000..e6c0bbd063a4 --- /dev/null +++ b/arch/powerpc/platforms/40x/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_WALNUT) += walnut.o | |||
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c new file mode 100644 index 000000000000..c17fdf23b492 --- /dev/null +++ b/arch/powerpc/platforms/40x/walnut.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * Architecture- / platform-specific boot-time initialization code for | ||
3 | * IBM PowerPC 4xx based boards. Adapted from original | ||
4 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | ||
5 | * <dan@net4x.com>. | ||
6 | * | ||
7 | * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> | ||
8 | * | ||
9 | * Rewritten and ported to the merged powerpc tree: | ||
10 | * Copyright 2007 IBM Corporation | ||
11 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
12 | * | ||
13 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
14 | * the terms of the GNU General Public License version 2. This program | ||
15 | * is licensed "as is" without any warranty of any kind, whether express | ||
16 | * or implied. | ||
17 | */ | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <asm/machdep.h> | ||
21 | #include <asm/prom.h> | ||
22 | #include <asm/udbg.h> | ||
23 | #include <asm/time.h> | ||
24 | #include <asm/uic.h> | ||
25 | #include <asm/of_platform.h> | ||
26 | |||
27 | static struct of_device_id walnut_of_bus[] = { | ||
28 | { .compatible = "ibm,plb3", }, | ||
29 | { .compatible = "ibm,opb", }, | ||
30 | { .compatible = "ibm,ebc", }, | ||
31 | {}, | ||
32 | }; | ||
33 | |||
34 | static int __init walnut_device_probe(void) | ||
35 | { | ||
36 | if (!machine_is(walnut)) | ||
37 | return 0; | ||
38 | |||
39 | /* FIXME: do bus probe here */ | ||
40 | of_platform_bus_probe(NULL, walnut_of_bus, NULL); | ||
41 | |||
42 | return 0; | ||
43 | } | ||
44 | device_initcall(walnut_device_probe); | ||
45 | |||
46 | static int __init walnut_probe(void) | ||
47 | { | ||
48 | unsigned long root = of_get_flat_dt_root(); | ||
49 | |||
50 | if (!of_flat_dt_is_compatible(root, "ibm,walnut")) | ||
51 | return 0; | ||
52 | |||
53 | return 1; | ||
54 | } | ||
55 | |||
56 | static void __init walnut_setup_arch(void) | ||
57 | { | ||
58 | } | ||
59 | |||
60 | define_machine(walnut) { | ||
61 | .name = "Walnut", | ||
62 | .probe = walnut_probe, | ||
63 | .setup_arch = walnut_setup_arch, | ||
64 | .progress = udbg_progress, | ||
65 | .init_IRQ = uic_init_tree, | ||
66 | .get_irq = uic_get_irq, | ||
67 | .calibrate_decr = generic_calibrate_decr, | ||
68 | }; | ||
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 1b3e008fd148..f28acdcbd6c9 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig | |||
@@ -1,10 +1,10 @@ | |||
1 | #config BAMBOO | 1 | config BAMBOO |
2 | # bool "Bamboo" | 2 | bool "Bamboo" |
3 | # depends on 44x | 3 | depends on 44x |
4 | # default n | 4 | default n |
5 | # select 440EP | 5 | select 440EP |
6 | # help | 6 | help |
7 | # This option enables support for the IBM PPC440EP evaluation board. | 7 | This option enables support for the IBM PPC440EP evaluation board. |
8 | 8 | ||
9 | config EBONY | 9 | config EBONY |
10 | bool "Ebony" | 10 | bool "Ebony" |
@@ -14,6 +14,14 @@ config EBONY | |||
14 | help | 14 | help |
15 | This option enables support for the IBM PPC440GP evaluation board. | 15 | This option enables support for the IBM PPC440GP evaluation board. |
16 | 16 | ||
17 | config SEQUOIA | ||
18 | bool "Sequoia" | ||
19 | depends on 44x | ||
20 | default n | ||
21 | select 440EPX | ||
22 | help | ||
23 | This option enables support for the AMCC PPC440EPX evaluation board. | ||
24 | |||
17 | #config LUAN | 25 | #config LUAN |
18 | # bool "Luan" | 26 | # bool "Luan" |
19 | # depends on 44x | 27 | # depends on 44x |
@@ -35,6 +43,14 @@ config 440EP | |||
35 | bool | 43 | bool |
36 | select PPC_FPU | 44 | select PPC_FPU |
37 | select IBM440EP_ERR42 | 45 | select IBM440EP_ERR42 |
46 | # select IBM_NEW_EMAC_ZMII | ||
47 | |||
48 | config 440EPX | ||
49 | bool | ||
50 | select PPC_FPU | ||
51 | # Disabled until the new EMAC Driver is merged. | ||
52 | # select IBM_NEW_EMAC_EMAC4 | ||
53 | # select IBM_NEW_EMAC_ZMII | ||
38 | 54 | ||
39 | config 440GP | 55 | config 440GP |
40 | bool | 56 | bool |
@@ -49,7 +65,7 @@ config 440SP | |||
49 | 65 | ||
50 | config 440A | 66 | config 440A |
51 | bool | 67 | bool |
52 | depends on 440GX | 68 | depends on 440GX || 440EPX |
53 | default y | 69 | default y |
54 | 70 | ||
55 | # 44x errata/workaround config symbols, selected by the CPU models above | 71 | # 44x errata/workaround config symbols, selected by the CPU models above |
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile index 41d0a18a0e44..10ce6740cc7d 100644 --- a/arch/powerpc/platforms/44x/Makefile +++ b/arch/powerpc/platforms/44x/Makefile | |||
@@ -1,2 +1,4 @@ | |||
1 | obj-$(CONFIG_44x) := misc_44x.o | 1 | obj-$(CONFIG_44x) := misc_44x.o |
2 | obj-$(CONFIG_EBONY) += ebony.o | 2 | obj-$(CONFIG_EBONY) += ebony.o |
3 | obj-$(CONFIG_BAMBOO) += bamboo.o | ||
4 | obj-$(CONFIG_SEQUOIA) += sequoia.o | ||
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c new file mode 100644 index 000000000000..9bc45dea078f --- /dev/null +++ b/arch/powerpc/platforms/44x/bamboo.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * Bamboo board specific routines | ||
3 | * | ||
4 | * Wade Farnsworth <wfarnsworth@mvista.com> | ||
5 | * Copyright 2004 MontaVista Software Inc. | ||
6 | * | ||
7 | * Rewritten and ported to the merged powerpc tree: | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <asm/machdep.h> | ||
18 | #include <asm/prom.h> | ||
19 | #include <asm/udbg.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/uic.h> | ||
22 | #include <asm/of_platform.h> | ||
23 | #include "44x.h" | ||
24 | |||
25 | static struct of_device_id bamboo_of_bus[] = { | ||
26 | { .compatible = "ibm,plb4", }, | ||
27 | { .compatible = "ibm,opb", }, | ||
28 | { .compatible = "ibm,ebc", }, | ||
29 | {}, | ||
30 | }; | ||
31 | |||
32 | static int __init bamboo_device_probe(void) | ||
33 | { | ||
34 | if (!machine_is(bamboo)) | ||
35 | return 0; | ||
36 | |||
37 | of_platform_bus_probe(NULL, bamboo_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | device_initcall(bamboo_device_probe); | ||
42 | |||
43 | static int __init bamboo_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "amcc,bamboo")) | ||
48 | return 0; | ||
49 | |||
50 | return 1; | ||
51 | } | ||
52 | |||
53 | static void __init bamboo_setup_arch(void) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | define_machine(bamboo) { | ||
58 | .name = "Bamboo", | ||
59 | .probe = bamboo_probe, | ||
60 | .setup_arch = bamboo_setup_arch, | ||
61 | .progress = udbg_progress, | ||
62 | .init_IRQ = uic_init_tree, | ||
63 | .get_irq = uic_get_irq, | ||
64 | .restart = ppc44x_reset_system, | ||
65 | .calibrate_decr = generic_calibrate_decr, | ||
66 | }; | ||
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c new file mode 100644 index 000000000000..7d0d9d567d25 --- /dev/null +++ b/arch/powerpc/platforms/44x/sequoia.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * Sequoia board specific routines | ||
3 | * | ||
4 | * Valentine Barshak <vbarshak@ru.mvista.com> | ||
5 | * Copyright 2007 MontaVista Software Inc. | ||
6 | * | ||
7 | * Based on the Bamboo code by | ||
8 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | ||
9 | * Copyright 2007 IBM Corporation | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <asm/machdep.h> | ||
18 | #include <asm/prom.h> | ||
19 | #include <asm/udbg.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/uic.h> | ||
22 | #include <asm/of_platform.h> | ||
23 | #include "44x.h" | ||
24 | |||
25 | static struct of_device_id sequoia_of_bus[] = { | ||
26 | { .compatible = "ibm,plb4", }, | ||
27 | { .compatible = "ibm,opb", }, | ||
28 | { .compatible = "ibm,ebc", }, | ||
29 | {}, | ||
30 | }; | ||
31 | |||
32 | static int __init sequoia_device_probe(void) | ||
33 | { | ||
34 | if (!machine_is(sequoia)) | ||
35 | return 0; | ||
36 | |||
37 | of_platform_bus_probe(NULL, sequoia_of_bus, NULL); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | device_initcall(sequoia_device_probe); | ||
42 | |||
43 | static int __init sequoia_probe(void) | ||
44 | { | ||
45 | unsigned long root = of_get_flat_dt_root(); | ||
46 | |||
47 | if (!of_flat_dt_is_compatible(root, "amcc,sequoia")) | ||
48 | return 0; | ||
49 | |||
50 | return 1; | ||
51 | } | ||
52 | |||
53 | static void __init sequoia_setup_arch(void) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | define_machine(sequoia) { | ||
58 | .name = "Sequoia", | ||
59 | .probe = sequoia_probe, | ||
60 | .setup_arch = sequoia_setup_arch, | ||
61 | .progress = udbg_progress, | ||
62 | .init_IRQ = uic_init_tree, | ||
63 | .get_irq = uic_get_irq, | ||
64 | .restart = ppc44x_reset_system, | ||
65 | .calibrate_decr = generic_calibrate_decr, | ||
66 | }; | ||
diff --git a/arch/powerpc/platforms/4xx/Makefile b/arch/powerpc/platforms/4xx/Makefile deleted file mode 100644 index 79ff6b1e887c..000000000000 --- a/arch/powerpc/platforms/4xx/Makefile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | # empty makefile so make clean works \ No newline at end of file | ||
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index 3ffaa066c2c8..2938d4927b83 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config PPC_MPC52xx | 1 | config PPC_MPC52xx |
2 | bool | 2 | bool |
3 | select FSL_SOC | 3 | select FSL_SOC |
4 | select PPC_CLOCK | ||
4 | default n | 5 | default n |
5 | 6 | ||
6 | config PPC_MPC5200 | 7 | config PPC_MPC5200 |
@@ -30,6 +31,7 @@ config PPC_EFIKA | |||
30 | config PPC_LITE5200 | 31 | config PPC_LITE5200 |
31 | bool "Freescale Lite5200 Eval Board" | 32 | bool "Freescale Lite5200 Eval Board" |
32 | depends on PPC_MULTIPLATFORM && PPC32 | 33 | depends on PPC_MULTIPLATFORM && PPC32 |
34 | select WANT_DEVICE_TREE | ||
33 | select PPC_MPC5200 | 35 | select PPC_MPC5200 |
34 | default n | 36 | default n |
35 | 37 | ||
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile index b91e39c84d46..307dbc178091 100644 --- a/arch/powerpc/platforms/52xx/Makefile +++ b/arch/powerpc/platforms/52xx/Makefile | |||
@@ -10,3 +10,6 @@ obj-$(CONFIG_PPC_EFIKA) += efika.o | |||
10 | obj-$(CONFIG_PPC_LITE5200) += lite5200.o | 10 | obj-$(CONFIG_PPC_LITE5200) += lite5200.o |
11 | 11 | ||
12 | obj-$(CONFIG_PM) += mpc52xx_sleep.o mpc52xx_pm.o | 12 | obj-$(CONFIG_PM) += mpc52xx_sleep.o mpc52xx_pm.o |
13 | ifeq ($(CONFIG_PPC_LITE5200),y) | ||
14 | obj-$(CONFIG_PM) += lite5200_sleep.o lite5200_pm.o | ||
15 | endif | ||
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 4be6e7a17b66..4263158b3274 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
@@ -78,8 +78,8 @@ static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, | |||
78 | } | 78 | } |
79 | 79 | ||
80 | static struct pci_ops rtas_pci_ops = { | 80 | static struct pci_ops rtas_pci_ops = { |
81 | rtas_read_config, | 81 | .read = rtas_read_config, |
82 | rtas_write_config | 82 | .write = rtas_write_config, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | 85 | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 5c46e898fd45..e11d27f9c4f0 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 36 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 37 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | ||
39 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
40 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
41 | #include <asm/udbg.h> | 40 | #include <asm/udbg.h> |
@@ -86,7 +85,6 @@ error: | |||
86 | } | 85 | } |
87 | 86 | ||
88 | #ifdef CONFIG_PM | 87 | #ifdef CONFIG_PM |
89 | static u32 descr_a; | ||
90 | static void lite5200_suspend_prepare(void __iomem *mbar) | 88 | static void lite5200_suspend_prepare(void __iomem *mbar) |
91 | { | 89 | { |
92 | u8 pin = 1; /* GPIO_WKUP_1 (GPIO_PSC2_4) */ | 90 | u8 pin = 1; /* GPIO_WKUP_1 (GPIO_PSC2_4) */ |
@@ -97,34 +95,30 @@ static void lite5200_suspend_prepare(void __iomem *mbar) | |||
97 | * power down usb port | 95 | * power down usb port |
98 | * this needs to be called before of-ohci suspend code | 96 | * this needs to be called before of-ohci suspend code |
99 | */ | 97 | */ |
100 | descr_a = in_be32(mbar + 0x1048); | 98 | |
101 | out_be32(mbar + 0x1048, (descr_a & ~0x200) | 0x100); | 99 | /* set ports to "power switched" and "powered at the same time" |
100 | * USB Rh descriptor A: NPS = 0, PSM = 0 */ | ||
101 | out_be32(mbar + 0x1048, in_be32(mbar + 0x1048) & ~0x300); | ||
102 | /* USB Rh status: LPS = 1 - turn off power */ | ||
103 | out_be32(mbar + 0x1050, 0x00000001); | ||
102 | } | 104 | } |
103 | 105 | ||
104 | static void lite5200_resume_finish(void __iomem *mbar) | 106 | static void lite5200_resume_finish(void __iomem *mbar) |
105 | { | 107 | { |
106 | out_be32(mbar + 0x1048, descr_a); | 108 | /* USB Rh status: LPSC = 1 - turn on power */ |
109 | out_be32(mbar + 0x1050, 0x00010000); | ||
107 | } | 110 | } |
108 | #endif | 111 | #endif |
109 | 112 | ||
110 | static void __init lite5200_setup_arch(void) | 113 | static void __init lite5200_setup_arch(void) |
111 | { | 114 | { |
115 | #ifdef CONFIG_PCI | ||
112 | struct device_node *np; | 116 | struct device_node *np; |
117 | #endif | ||
113 | 118 | ||
114 | if (ppc_md.progress) | 119 | if (ppc_md.progress) |
115 | ppc_md.progress("lite5200_setup_arch()", 0); | 120 | ppc_md.progress("lite5200_setup_arch()", 0); |
116 | 121 | ||
117 | np = of_find_node_by_type(NULL, "cpu"); | ||
118 | if (np) { | ||
119 | const unsigned int *fp = | ||
120 | of_get_property(np, "clock-frequency", NULL); | ||
121 | if (fp != 0) | ||
122 | loops_per_jiffy = *fp / HZ; | ||
123 | else | ||
124 | loops_per_jiffy = 50000000 / HZ; | ||
125 | of_node_put(np); | ||
126 | } | ||
127 | |||
128 | /* CPU & Port mux setup */ | 122 | /* CPU & Port mux setup */ |
129 | mpc52xx_setup_cpu(); /* Generic */ | 123 | mpc52xx_setup_cpu(); /* Generic */ |
130 | lite5200_setup_cpu(); /* Platorm specific */ | 124 | lite5200_setup_cpu(); /* Platorm specific */ |
@@ -132,7 +126,7 @@ static void __init lite5200_setup_arch(void) | |||
132 | #ifdef CONFIG_PM | 126 | #ifdef CONFIG_PM |
133 | mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare; | 127 | mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare; |
134 | mpc52xx_suspend.board_resume_finish = lite5200_resume_finish; | 128 | mpc52xx_suspend.board_resume_finish = lite5200_resume_finish; |
135 | mpc52xx_pm_init(); | 129 | lite5200_pm_init(); |
136 | #endif | 130 | #endif |
137 | 131 | ||
138 | #ifdef CONFIG_PCI | 132 | #ifdef CONFIG_PCI |
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c new file mode 100644 index 000000000000..f26afcd41757 --- /dev/null +++ b/arch/powerpc/platforms/52xx/lite5200_pm.c | |||
@@ -0,0 +1,213 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/pm.h> | ||
3 | #include <asm/io.h> | ||
4 | #include <asm/time.h> | ||
5 | #include <asm/mpc52xx.h> | ||
6 | #include "mpc52xx_pic.h" | ||
7 | |||
8 | /* defined in lite5200_sleep.S and only used here */ | ||
9 | extern void lite5200_low_power(void __iomem *sram, void __iomem *mbar); | ||
10 | |||
11 | static struct mpc52xx_cdm __iomem *cdm; | ||
12 | static struct mpc52xx_intr __iomem *pic; | ||
13 | static struct mpc52xx_sdma __iomem *bes; | ||
14 | static struct mpc52xx_xlb __iomem *xlb; | ||
15 | static struct mpc52xx_gpio __iomem *gps; | ||
16 | static struct mpc52xx_gpio_wkup __iomem *gpw; | ||
17 | static void __iomem *sram; | ||
18 | static const int sram_size = 0x4000; /* 16 kBytes */ | ||
19 | static void __iomem *mbar; | ||
20 | |||
21 | static int lite5200_pm_valid(suspend_state_t state) | ||
22 | { | ||
23 | switch (state) { | ||
24 | case PM_SUSPEND_STANDBY: | ||
25 | case PM_SUSPEND_MEM: | ||
26 | return 1; | ||
27 | default: | ||
28 | return 0; | ||
29 | } | ||
30 | } | ||
31 | |||
32 | static int lite5200_pm_prepare(suspend_state_t state) | ||
33 | { | ||
34 | /* deep sleep? let mpc52xx code handle that */ | ||
35 | if (state == PM_SUSPEND_STANDBY) | ||
36 | return mpc52xx_pm_prepare(state); | ||
37 | |||
38 | if (state != PM_SUSPEND_MEM) | ||
39 | return -EINVAL; | ||
40 | |||
41 | /* map registers */ | ||
42 | mbar = mpc52xx_find_and_map("mpc5200"); | ||
43 | if (!mbar) { | ||
44 | printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); | ||
45 | return -ENOSYS; | ||
46 | } | ||
47 | |||
48 | cdm = mbar + 0x200; | ||
49 | pic = mbar + 0x500; | ||
50 | gps = mbar + 0xb00; | ||
51 | gpw = mbar + 0xc00; | ||
52 | bes = mbar + 0x1200; | ||
53 | xlb = mbar + 0x1f00; | ||
54 | sram = mbar + 0x8000; | ||
55 | |||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | /* save and restore registers not bound to any real devices */ | ||
60 | static struct mpc52xx_cdm scdm; | ||
61 | static struct mpc52xx_intr spic; | ||
62 | static struct mpc52xx_sdma sbes; | ||
63 | static struct mpc52xx_xlb sxlb; | ||
64 | static struct mpc52xx_gpio sgps; | ||
65 | static struct mpc52xx_gpio_wkup sgpw; | ||
66 | |||
67 | static void lite5200_save_regs(void) | ||
68 | { | ||
69 | _memcpy_fromio(&spic, pic, sizeof(*pic)); | ||
70 | _memcpy_fromio(&sbes, bes, sizeof(*bes)); | ||
71 | _memcpy_fromio(&scdm, cdm, sizeof(*cdm)); | ||
72 | _memcpy_fromio(&sxlb, xlb, sizeof(*xlb)); | ||
73 | _memcpy_fromio(&sgps, gps, sizeof(*gps)); | ||
74 | _memcpy_fromio(&sgpw, gpw, sizeof(*gpw)); | ||
75 | |||
76 | _memcpy_fromio(saved_sram, sram, sram_size); | ||
77 | } | ||
78 | |||
79 | static void lite5200_restore_regs(void) | ||
80 | { | ||
81 | int i; | ||
82 | _memcpy_toio(sram, saved_sram, sram_size); | ||
83 | |||
84 | |||
85 | /* | ||
86 | * GPIOs. Interrupt Master Enable has higher address then other | ||
87 | * registers, so just memcpy is ok. | ||
88 | */ | ||
89 | _memcpy_toio(gpw, &sgpw, sizeof(*gpw)); | ||
90 | _memcpy_toio(gps, &sgps, sizeof(*gps)); | ||
91 | |||
92 | |||
93 | /* XLB Arbitrer */ | ||
94 | out_be32(&xlb->snoop_window, sxlb.snoop_window); | ||
95 | out_be32(&xlb->master_priority, sxlb.master_priority); | ||
96 | out_be32(&xlb->master_pri_enable, sxlb.master_pri_enable); | ||
97 | |||
98 | /* enable */ | ||
99 | out_be32(&xlb->int_enable, sxlb.int_enable); | ||
100 | out_be32(&xlb->config, sxlb.config); | ||
101 | |||
102 | |||
103 | /* CDM - Clock Distribution Module */ | ||
104 | out_8(&cdm->ipb_clk_sel, scdm.ipb_clk_sel); | ||
105 | out_8(&cdm->pci_clk_sel, scdm.pci_clk_sel); | ||
106 | |||
107 | out_8(&cdm->ext_48mhz_en, scdm.ext_48mhz_en); | ||
108 | out_8(&cdm->fd_enable, scdm.fd_enable); | ||
109 | out_be16(&cdm->fd_counters, scdm.fd_counters); | ||
110 | |||
111 | out_be32(&cdm->clk_enables, scdm.clk_enables); | ||
112 | |||
113 | out_8(&cdm->osc_disable, scdm.osc_disable); | ||
114 | |||
115 | out_be16(&cdm->mclken_div_psc1, scdm.mclken_div_psc1); | ||
116 | out_be16(&cdm->mclken_div_psc2, scdm.mclken_div_psc2); | ||
117 | out_be16(&cdm->mclken_div_psc3, scdm.mclken_div_psc3); | ||
118 | out_be16(&cdm->mclken_div_psc6, scdm.mclken_div_psc6); | ||
119 | |||
120 | |||
121 | /* BESTCOMM */ | ||
122 | out_be32(&bes->taskBar, sbes.taskBar); | ||
123 | out_be32(&bes->currentPointer, sbes.currentPointer); | ||
124 | out_be32(&bes->endPointer, sbes.endPointer); | ||
125 | out_be32(&bes->variablePointer, sbes.variablePointer); | ||
126 | |||
127 | out_8(&bes->IntVect1, sbes.IntVect1); | ||
128 | out_8(&bes->IntVect2, sbes.IntVect2); | ||
129 | out_be16(&bes->PtdCntrl, sbes.PtdCntrl); | ||
130 | |||
131 | for (i=0; i<32; i++) | ||
132 | out_8(&bes->ipr[i], sbes.ipr[i]); | ||
133 | |||
134 | out_be32(&bes->cReqSelect, sbes.cReqSelect); | ||
135 | out_be32(&bes->task_size0, sbes.task_size0); | ||
136 | out_be32(&bes->task_size1, sbes.task_size1); | ||
137 | out_be32(&bes->MDEDebug, sbes.MDEDebug); | ||
138 | out_be32(&bes->ADSDebug, sbes.ADSDebug); | ||
139 | out_be32(&bes->Value1, sbes.Value1); | ||
140 | out_be32(&bes->Value2, sbes.Value2); | ||
141 | out_be32(&bes->Control, sbes.Control); | ||
142 | out_be32(&bes->Status, sbes.Status); | ||
143 | out_be32(&bes->PTDDebug, sbes.PTDDebug); | ||
144 | |||
145 | /* restore tasks */ | ||
146 | for (i=0; i<16; i++) | ||
147 | out_be16(&bes->tcr[i], sbes.tcr[i]); | ||
148 | |||
149 | /* enable interrupts */ | ||
150 | out_be32(&bes->IntPend, sbes.IntPend); | ||
151 | out_be32(&bes->IntMask, sbes.IntMask); | ||
152 | |||
153 | |||
154 | /* PIC */ | ||
155 | out_be32(&pic->per_pri1, spic.per_pri1); | ||
156 | out_be32(&pic->per_pri2, spic.per_pri2); | ||
157 | out_be32(&pic->per_pri3, spic.per_pri3); | ||
158 | |||
159 | out_be32(&pic->main_pri1, spic.main_pri1); | ||
160 | out_be32(&pic->main_pri2, spic.main_pri2); | ||
161 | |||
162 | out_be32(&pic->enc_status, spic.enc_status); | ||
163 | |||
164 | /* unmask and enable interrupts */ | ||
165 | out_be32(&pic->per_mask, spic.per_mask); | ||
166 | out_be32(&pic->main_mask, spic.main_mask); | ||
167 | out_be32(&pic->ctrl, spic.ctrl); | ||
168 | } | ||
169 | |||
170 | static int lite5200_pm_enter(suspend_state_t state) | ||
171 | { | ||
172 | /* deep sleep? let mpc52xx code handle that */ | ||
173 | if (state == PM_SUSPEND_STANDBY) { | ||
174 | return mpc52xx_pm_enter(state); | ||
175 | } | ||
176 | |||
177 | lite5200_save_regs(); | ||
178 | |||
179 | /* effectively save FP regs */ | ||
180 | enable_kernel_fp(); | ||
181 | |||
182 | lite5200_low_power(sram, mbar); | ||
183 | |||
184 | lite5200_restore_regs(); | ||
185 | |||
186 | /* restart jiffies */ | ||
187 | wakeup_decrementer(); | ||
188 | |||
189 | iounmap(mbar); | ||
190 | return 0; | ||
191 | } | ||
192 | |||
193 | static int lite5200_pm_finish(suspend_state_t state) | ||
194 | { | ||
195 | /* deep sleep? let mpc52xx code handle that */ | ||
196 | if (state == PM_SUSPEND_STANDBY) { | ||
197 | return mpc52xx_pm_finish(state); | ||
198 | } | ||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static struct pm_ops lite5200_pm_ops = { | ||
203 | .valid = lite5200_pm_valid, | ||
204 | .prepare = lite5200_pm_prepare, | ||
205 | .enter = lite5200_pm_enter, | ||
206 | .finish = lite5200_pm_finish, | ||
207 | }; | ||
208 | |||
209 | int __init lite5200_pm_init(void) | ||
210 | { | ||
211 | pm_set_ops(&lite5200_pm_ops); | ||
212 | return 0; | ||
213 | } | ||
diff --git a/arch/powerpc/platforms/52xx/lite5200_sleep.S b/arch/powerpc/platforms/52xx/lite5200_sleep.S new file mode 100644 index 000000000000..08ab6fefcf7a --- /dev/null +++ b/arch/powerpc/platforms/52xx/lite5200_sleep.S | |||
@@ -0,0 +1,412 @@ | |||
1 | #include <asm/reg.h> | ||
2 | #include <asm/ppc_asm.h> | ||
3 | #include <asm/processor.h> | ||
4 | #include <asm/cache.h> | ||
5 | |||
6 | |||
7 | #define SDRAM_CTRL 0x104 | ||
8 | #define SC_MODE_EN (1<<31) | ||
9 | #define SC_CKE (1<<30) | ||
10 | #define SC_REF_EN (1<<28) | ||
11 | #define SC_SOFT_PRE (1<<1) | ||
12 | |||
13 | #define GPIOW_GPIOE 0xc00 | ||
14 | #define GPIOW_DDR 0xc08 | ||
15 | #define GPIOW_DVO 0xc0c | ||
16 | |||
17 | #define CDM_CE 0x214 | ||
18 | #define CDM_SDRAM (1<<3) | ||
19 | |||
20 | |||
21 | /* helpers... beware: r10 and r4 are overwritten */ | ||
22 | #define SAVE_SPRN(reg, addr) \ | ||
23 | mfspr r10, SPRN_##reg; \ | ||
24 | stw r10, ((addr)*4)(r4); | ||
25 | |||
26 | #define LOAD_SPRN(reg, addr) \ | ||
27 | lwz r10, ((addr)*4)(r4); \ | ||
28 | mtspr SPRN_##reg, r10; \ | ||
29 | sync; \ | ||
30 | isync; | ||
31 | |||
32 | |||
33 | .data | ||
34 | registers: | ||
35 | .space 0x5c*4 | ||
36 | .text | ||
37 | |||
38 | /* ---------------------------------------------------------------------- */ | ||
39 | /* low-power mode with help of M68HLC908QT1 */ | ||
40 | |||
41 | .globl lite5200_low_power | ||
42 | lite5200_low_power: | ||
43 | |||
44 | mr r7, r3 /* save SRAM va */ | ||
45 | mr r8, r4 /* save MBAR va */ | ||
46 | |||
47 | /* setup wakeup address for u-boot at physical location 0x0 */ | ||
48 | lis r3, CONFIG_KERNEL_START@h | ||
49 | lis r4, lite5200_wakeup@h | ||
50 | ori r4, r4, lite5200_wakeup@l | ||
51 | sub r4, r4, r3 | ||
52 | stw r4, 0(r3) | ||
53 | |||
54 | |||
55 | /* | ||
56 | * save stuff BDI overwrites | ||
57 | * 0xf0 (0xe0->0x100 gets overwritten when BDI connected; | ||
58 | * even when CONFIG_BDI* is disabled and MMU XLAT commented; heisenbug?)) | ||
59 | * WARNING: self-refresh doesn't seem to work when BDI2000 is connected, | ||
60 | * possibly because BDI sets SDRAM registers before wakeup code does | ||
61 | */ | ||
62 | lis r4, registers@h | ||
63 | ori r4, r4, registers@l | ||
64 | lwz r10, 0xf0(r3) | ||
65 | stw r10, (0x1d*4)(r4) | ||
66 | |||
67 | /* save registers to r4 [destroys r10] */ | ||
68 | SAVE_SPRN(LR, 0x1c) | ||
69 | bl save_regs | ||
70 | |||
71 | /* flush caches [destroys r3, r4] */ | ||
72 | bl flush_data_cache | ||
73 | |||
74 | |||
75 | /* copy code to sram */ | ||
76 | mr r4, r7 | ||
77 | li r3, (sram_code_end - sram_code)/4 | ||
78 | mtctr r3 | ||
79 | lis r3, sram_code@h | ||
80 | ori r3, r3, sram_code@l | ||
81 | 1: | ||
82 | lwz r5, 0(r3) | ||
83 | stw r5, 0(r4) | ||
84 | addi r3, r3, 4 | ||
85 | addi r4, r4, 4 | ||
86 | bdnz 1b | ||
87 | |||
88 | /* get tb_ticks_per_usec */ | ||
89 | lis r3, tb_ticks_per_usec@h | ||
90 | lwz r11, tb_ticks_per_usec@l(r3) | ||
91 | |||
92 | /* disable I and D caches */ | ||
93 | mfspr r3, SPRN_HID0 | ||
94 | ori r3, r3, HID0_ICE | HID0_DCE | ||
95 | xori r3, r3, HID0_ICE | HID0_DCE | ||
96 | sync; isync; | ||
97 | mtspr SPRN_HID0, r3 | ||
98 | sync; isync; | ||
99 | |||
100 | /* jump to sram */ | ||
101 | mtlr r7 | ||
102 | blrl | ||
103 | /* doesn't return */ | ||
104 | |||
105 | |||
106 | sram_code: | ||
107 | /* self refresh */ | ||
108 | lwz r4, SDRAM_CTRL(r8) | ||
109 | |||
110 | /* send NOP (precharge) */ | ||
111 | oris r4, r4, SC_MODE_EN@h /* mode_en */ | ||
112 | stw r4, SDRAM_CTRL(r8) | ||
113 | sync | ||
114 | |||
115 | ori r4, r4, SC_SOFT_PRE /* soft_pre */ | ||
116 | stw r4, SDRAM_CTRL(r8) | ||
117 | sync | ||
118 | xori r4, r4, SC_SOFT_PRE | ||
119 | |||
120 | xoris r4, r4, SC_MODE_EN@h /* !mode_en */ | ||
121 | stw r4, SDRAM_CTRL(r8) | ||
122 | sync | ||
123 | |||
124 | /* delay (for NOP to finish) */ | ||
125 | li r12, 1 | ||
126 | bl udelay | ||
127 | |||
128 | /* | ||
129 | * mode_en must not be set when enabling self-refresh | ||
130 | * send AR with CKE low (self-refresh) | ||
131 | */ | ||
132 | oris r4, r4, (SC_REF_EN | SC_CKE)@h | ||
133 | xoris r4, r4, (SC_CKE)@h /* ref_en !cke */ | ||
134 | stw r4, SDRAM_CTRL(r8) | ||
135 | sync | ||
136 | |||
137 | /* delay (after !CKE there should be two cycles) */ | ||
138 | li r12, 1 | ||
139 | bl udelay | ||
140 | |||
141 | /* disable clock */ | ||
142 | lwz r4, CDM_CE(r8) | ||
143 | ori r4, r4, CDM_SDRAM | ||
144 | xori r4, r4, CDM_SDRAM | ||
145 | stw r4, CDM_CE(r8) | ||
146 | sync | ||
147 | |||
148 | /* delay a bit */ | ||
149 | li r12, 1 | ||
150 | bl udelay | ||
151 | |||
152 | |||
153 | /* turn off with QT chip */ | ||
154 | li r4, 0x02 | ||
155 | stb r4, GPIOW_GPIOE(r8) /* enable gpio_wkup1 */ | ||
156 | sync | ||
157 | |||
158 | stb r4, GPIOW_DVO(r8) /* "output" high */ | ||
159 | sync | ||
160 | stb r4, GPIOW_DDR(r8) /* output */ | ||
161 | sync | ||
162 | stb r4, GPIOW_DVO(r8) /* output high */ | ||
163 | sync | ||
164 | |||
165 | /* 10uS delay */ | ||
166 | li r12, 10 | ||
167 | bl udelay | ||
168 | |||
169 | /* turn off */ | ||
170 | li r4, 0 | ||
171 | stb r4, GPIOW_DVO(r8) /* output low */ | ||
172 | sync | ||
173 | |||
174 | /* wait until we're offline */ | ||
175 | 1: | ||
176 | b 1b | ||
177 | |||
178 | |||
179 | /* local udelay in sram is needed */ | ||
180 | udelay: /* r11 - tb_ticks_per_usec, r12 - usecs, overwrites r13 */ | ||
181 | mullw r12, r12, r11 | ||
182 | mftb r13 /* start */ | ||
183 | addi r12, r13, r12 /* end */ | ||
184 | 1: | ||
185 | mftb r13 /* current */ | ||
186 | cmp cr0, r13, r12 | ||
187 | blt 1b | ||
188 | blr | ||
189 | |||
190 | sram_code_end: | ||
191 | |||
192 | |||
193 | |||
194 | /* uboot jumps here on resume */ | ||
195 | lite5200_wakeup: | ||
196 | bl restore_regs | ||
197 | |||
198 | |||
199 | /* HIDs, MSR */ | ||
200 | LOAD_SPRN(HID1, 0x19) | ||
201 | LOAD_SPRN(HID2, 0x1a) | ||
202 | |||
203 | |||
204 | /* address translation is tricky (see turn_on_mmu) */ | ||
205 | mfmsr r10 | ||
206 | ori r10, r10, MSR_DR | MSR_IR | ||
207 | |||
208 | |||
209 | mtspr SPRN_SRR1, r10 | ||
210 | lis r10, mmu_on@h | ||
211 | ori r10, r10, mmu_on@l | ||
212 | mtspr SPRN_SRR0, r10 | ||
213 | sync | ||
214 | rfi | ||
215 | mmu_on: | ||
216 | /* kernel offset (r4 is still set from restore_registers) */ | ||
217 | addis r4, r4, CONFIG_KERNEL_START@h | ||
218 | |||
219 | |||
220 | /* restore MSR */ | ||
221 | lwz r10, (4*0x1b)(r4) | ||
222 | mtmsr r10 | ||
223 | sync; isync; | ||
224 | |||
225 | /* invalidate caches */ | ||
226 | mfspr r10, SPRN_HID0 | ||
227 | ori r5, r10, HID0_ICFI | HID0_DCI | ||
228 | mtspr SPRN_HID0, r5 /* invalidate caches */ | ||
229 | sync; isync; | ||
230 | mtspr SPRN_HID0, r10 | ||
231 | sync; isync; | ||
232 | |||
233 | /* enable caches */ | ||
234 | lwz r10, (4*0x18)(r4) | ||
235 | mtspr SPRN_HID0, r10 /* restore (enable caches, DPM) */ | ||
236 | /* ^ this has to be after address translation set in MSR */ | ||
237 | sync | ||
238 | isync | ||
239 | |||
240 | |||
241 | /* restore 0xf0 (BDI2000) */ | ||
242 | lis r3, CONFIG_KERNEL_START@h | ||
243 | lwz r10, (0x1d*4)(r4) | ||
244 | stw r10, 0xf0(r3) | ||
245 | |||
246 | LOAD_SPRN(LR, 0x1c) | ||
247 | |||
248 | |||
249 | blr | ||
250 | |||
251 | |||
252 | /* ---------------------------------------------------------------------- */ | ||
253 | /* boring code: helpers */ | ||
254 | |||
255 | /* save registers */ | ||
256 | #define SAVE_BAT(n, addr) \ | ||
257 | SAVE_SPRN(DBAT##n##L, addr); \ | ||
258 | SAVE_SPRN(DBAT##n##U, addr+1); \ | ||
259 | SAVE_SPRN(IBAT##n##L, addr+2); \ | ||
260 | SAVE_SPRN(IBAT##n##U, addr+3); | ||
261 | |||
262 | #define SAVE_SR(n, addr) \ | ||
263 | mfsr r10, n; \ | ||
264 | stw r10, ((addr)*4)(r4); | ||
265 | |||
266 | #define SAVE_4SR(n, addr) \ | ||
267 | SAVE_SR(n, addr); \ | ||
268 | SAVE_SR(n+1, addr+1); \ | ||
269 | SAVE_SR(n+2, addr+2); \ | ||
270 | SAVE_SR(n+3, addr+3); | ||
271 | |||
272 | save_regs: | ||
273 | stw r0, 0(r4) | ||
274 | stw r1, 0x4(r4) | ||
275 | stw r2, 0x8(r4) | ||
276 | stmw r11, 0xc(r4) /* 0xc -> 0x5f, (0x18*4-1) */ | ||
277 | |||
278 | SAVE_SPRN(HID0, 0x18) | ||
279 | SAVE_SPRN(HID1, 0x19) | ||
280 | SAVE_SPRN(HID2, 0x1a) | ||
281 | mfmsr r10 | ||
282 | stw r10, (4*0x1b)(r4) | ||
283 | /*SAVE_SPRN(LR, 0x1c) have to save it before the call */ | ||
284 | /* 0x1d reserved by 0xf0 */ | ||
285 | SAVE_SPRN(RPA, 0x1e) | ||
286 | SAVE_SPRN(SDR1, 0x1f) | ||
287 | |||
288 | /* save MMU regs */ | ||
289 | SAVE_BAT(0, 0x20) | ||
290 | SAVE_BAT(1, 0x24) | ||
291 | SAVE_BAT(2, 0x28) | ||
292 | SAVE_BAT(3, 0x2c) | ||
293 | SAVE_BAT(4, 0x30) | ||
294 | SAVE_BAT(5, 0x34) | ||
295 | SAVE_BAT(6, 0x38) | ||
296 | SAVE_BAT(7, 0x3c) | ||
297 | |||
298 | SAVE_4SR(0, 0x40) | ||
299 | SAVE_4SR(4, 0x44) | ||
300 | SAVE_4SR(8, 0x48) | ||
301 | SAVE_4SR(12, 0x4c) | ||
302 | |||
303 | SAVE_SPRN(SPRG0, 0x50) | ||
304 | SAVE_SPRN(SPRG1, 0x51) | ||
305 | SAVE_SPRN(SPRG2, 0x52) | ||
306 | SAVE_SPRN(SPRG3, 0x53) | ||
307 | SAVE_SPRN(SPRG4, 0x54) | ||
308 | SAVE_SPRN(SPRG5, 0x55) | ||
309 | SAVE_SPRN(SPRG6, 0x56) | ||
310 | SAVE_SPRN(SPRG7, 0x57) | ||
311 | |||
312 | SAVE_SPRN(IABR, 0x58) | ||
313 | SAVE_SPRN(DABR, 0x59) | ||
314 | SAVE_SPRN(TBRL, 0x5a) | ||
315 | SAVE_SPRN(TBRU, 0x5b) | ||
316 | |||
317 | blr | ||
318 | |||
319 | |||
320 | /* restore registers */ | ||
321 | #define LOAD_BAT(n, addr) \ | ||
322 | LOAD_SPRN(DBAT##n##L, addr); \ | ||
323 | LOAD_SPRN(DBAT##n##U, addr+1); \ | ||
324 | LOAD_SPRN(IBAT##n##L, addr+2); \ | ||
325 | LOAD_SPRN(IBAT##n##U, addr+3); | ||
326 | |||
327 | #define LOAD_SR(n, addr) \ | ||
328 | lwz r10, ((addr)*4)(r4); \ | ||
329 | mtsr n, r10; | ||
330 | |||
331 | #define LOAD_4SR(n, addr) \ | ||
332 | LOAD_SR(n, addr); \ | ||
333 | LOAD_SR(n+1, addr+1); \ | ||
334 | LOAD_SR(n+2, addr+2); \ | ||
335 | LOAD_SR(n+3, addr+3); | ||
336 | |||
337 | restore_regs: | ||
338 | lis r4, registers@h | ||
339 | ori r4, r4, registers@l | ||
340 | |||
341 | /* MMU is not up yet */ | ||
342 | subis r4, r4, CONFIG_KERNEL_START@h | ||
343 | |||
344 | lwz r0, 0(r4) | ||
345 | lwz r1, 0x4(r4) | ||
346 | lwz r2, 0x8(r4) | ||
347 | lmw r11, 0xc(r4) | ||
348 | |||
349 | /* | ||
350 | * these are a bit tricky | ||
351 | * | ||
352 | * 0x18 - HID0 | ||
353 | * 0x19 - HID1 | ||
354 | * 0x1a - HID2 | ||
355 | * 0x1b - MSR | ||
356 | * 0x1c - LR | ||
357 | * 0x1d - reserved by 0xf0 (BDI2000) | ||
358 | */ | ||
359 | LOAD_SPRN(RPA, 0x1e); | ||
360 | LOAD_SPRN(SDR1, 0x1f); | ||
361 | |||
362 | /* restore MMU regs */ | ||
363 | LOAD_BAT(0, 0x20) | ||
364 | LOAD_BAT(1, 0x24) | ||
365 | LOAD_BAT(2, 0x28) | ||
366 | LOAD_BAT(3, 0x2c) | ||
367 | LOAD_BAT(4, 0x30) | ||
368 | LOAD_BAT(5, 0x34) | ||
369 | LOAD_BAT(6, 0x38) | ||
370 | LOAD_BAT(7, 0x3c) | ||
371 | |||
372 | LOAD_4SR(0, 0x40) | ||
373 | LOAD_4SR(4, 0x44) | ||
374 | LOAD_4SR(8, 0x48) | ||
375 | LOAD_4SR(12, 0x4c) | ||
376 | |||
377 | /* rest of regs */ | ||
378 | LOAD_SPRN(SPRG0, 0x50); | ||
379 | LOAD_SPRN(SPRG1, 0x51); | ||
380 | LOAD_SPRN(SPRG2, 0x52); | ||
381 | LOAD_SPRN(SPRG3, 0x53); | ||
382 | LOAD_SPRN(SPRG4, 0x54); | ||
383 | LOAD_SPRN(SPRG5, 0x55); | ||
384 | LOAD_SPRN(SPRG6, 0x56); | ||
385 | LOAD_SPRN(SPRG7, 0x57); | ||
386 | |||
387 | LOAD_SPRN(IABR, 0x58); | ||
388 | LOAD_SPRN(DABR, 0x59); | ||
389 | LOAD_SPRN(TBWL, 0x5a); /* these two have separate R/W regs */ | ||
390 | LOAD_SPRN(TBWU, 0x5b); | ||
391 | |||
392 | blr | ||
393 | |||
394 | |||
395 | |||
396 | /* cache flushing code. copied from arch/ppc/boot/util.S */ | ||
397 | #define NUM_CACHE_LINES (128*8) | ||
398 | |||
399 | /* | ||
400 | * Flush data cache | ||
401 | * Do this by just reading lots of stuff into the cache. | ||
402 | */ | ||
403 | flush_data_cache: | ||
404 | lis r3,CONFIG_KERNEL_START@h | ||
405 | ori r3,r3,CONFIG_KERNEL_START@l | ||
406 | li r4,NUM_CACHE_LINES | ||
407 | mtctr r4 | ||
408 | 1: | ||
409 | lwz r4,0(r3) | ||
410 | addi r3,r3,L1_CACHE_BYTES /* Next line, please */ | ||
411 | bdnz 1b | ||
412 | blr | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index fbfff95b4437..0f4ca8a2b777 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/signal.h> | 24 | #include <linux/signal.h> |
25 | #include <linux/stddef.h> | ||
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
27 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
28 | #include <linux/hardirq.h> | 27 | #include <linux/hardirq.h> |
@@ -242,12 +241,6 @@ static struct irq_chip mpc52xx_sdma_irqchip = { | |||
242 | * irq_host | 241 | * irq_host |
243 | */ | 242 | */ |
244 | 243 | ||
245 | static int mpc52xx_irqhost_match(struct irq_host *h, struct device_node *node) | ||
246 | { | ||
247 | pr_debug("%s: node=%p\n", __func__, node); | ||
248 | return mpc52xx_irqhost->host_data == node; | ||
249 | } | ||
250 | |||
251 | static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, | 244 | static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, |
252 | u32 * intspec, unsigned int intsize, | 245 | u32 * intspec, unsigned int intsize, |
253 | irq_hw_number_t * out_hwirq, | 246 | irq_hw_number_t * out_hwirq, |
@@ -368,7 +361,6 @@ static int mpc52xx_irqhost_map(struct irq_host *h, unsigned int virq, | |||
368 | } | 361 | } |
369 | 362 | ||
370 | static struct irq_host_ops mpc52xx_irqhost_ops = { | 363 | static struct irq_host_ops mpc52xx_irqhost_ops = { |
371 | .match = mpc52xx_irqhost_match, | ||
372 | .xlate = mpc52xx_irqhost_xlate, | 364 | .xlate = mpc52xx_irqhost_xlate, |
373 | .map = mpc52xx_irqhost_map, | 365 | .map = mpc52xx_irqhost_map, |
374 | }; | 366 | }; |
@@ -420,14 +412,13 @@ void __init mpc52xx_init_irq(void) | |||
420 | * hw irq information provided by the ofw to linux virq | 412 | * hw irq information provided by the ofw to linux virq |
421 | */ | 413 | */ |
422 | 414 | ||
423 | mpc52xx_irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, | 415 | mpc52xx_irqhost = irq_alloc_host(picnode, IRQ_HOST_MAP_LINEAR, |
424 | MPC52xx_IRQ_HIGHTESTHWIRQ, | 416 | MPC52xx_IRQ_HIGHTESTHWIRQ, |
425 | &mpc52xx_irqhost_ops, -1); | 417 | &mpc52xx_irqhost_ops, -1); |
426 | 418 | ||
427 | if (!mpc52xx_irqhost) | 419 | if (!mpc52xx_irqhost) |
428 | panic(__FILE__ ": Cannot allocate the IRQ host\n"); | 420 | panic(__FILE__ ": Cannot allocate the IRQ host\n"); |
429 | 421 | ||
430 | mpc52xx_irqhost->host_data = picnode; | ||
431 | printk(KERN_INFO "MPC52xx PIC is up and running!\n"); | 422 | printk(KERN_INFO "MPC52xx PIC is up and running!\n"); |
432 | } | 423 | } |
433 | 424 | ||
diff --git a/arch/powerpc/platforms/82xx/m82xx_pci.h b/arch/powerpc/platforms/82xx/m82xx_pci.h index 9cd8893b5a32..65e38a7ff48f 100644 --- a/arch/powerpc/platforms/82xx/m82xx_pci.h +++ b/arch/powerpc/platforms/82xx/m82xx_pci.h | |||
@@ -8,8 +8,6 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/m8260_pci.h> | ||
12 | |||
13 | #define SIU_INT_IRQ1 ((uint)0x13 + CPM_IRQ_OFFSET) | 11 | #define SIU_INT_IRQ1 ((uint)0x13 + CPM_IRQ_OFFSET) |
14 | 12 | ||
15 | #ifndef _IO_BASE | 13 | #ifndef _IO_BASE |
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c index cc9900d2e5ee..c706871aec1a 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx.c +++ b/arch/powerpc/platforms/82xx/mpc82xx.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/time.h> | 36 | #include <asm/time.h> |
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | #include <asm/machdep.h> | 38 | #include <asm/machdep.h> |
39 | #include <asm/bootinfo.h> | ||
40 | #include <asm/pci-bridge.h> | 39 | #include <asm/pci-bridge.h> |
41 | #include <asm/mpc8260.h> | 40 | #include <asm/mpc8260.h> |
42 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c index 2d1b05b9f8ef..40087952935a 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c +++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <asm/time.h> | 37 | #include <asm/time.h> |
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/machdep.h> | 39 | #include <asm/machdep.h> |
40 | #include <asm/bootinfo.h> | ||
41 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
42 | #include <asm/mpc8260.h> | 41 | #include <asm/mpc8260.h> |
43 | #include <asm/irq.h> | 42 | #include <asm/irq.h> |
@@ -62,7 +61,6 @@ static struct { | |||
62 | 61 | ||
63 | static unsigned long pci_int_base; | 62 | static unsigned long pci_int_base; |
64 | static struct irq_host *pci_pic_host; | 63 | static struct irq_host *pci_pic_host; |
65 | static struct device_node *pci_pic_node; | ||
66 | #endif | 64 | #endif |
67 | 65 | ||
68 | static void __init mpc82xx_ads_pic_init(void) | 66 | static void __init mpc82xx_ads_pic_init(void) |
@@ -400,11 +398,6 @@ m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
400 | } | 398 | } |
401 | } | 399 | } |
402 | 400 | ||
403 | static int pci_pic_host_match(struct irq_host *h, struct device_node *node) | ||
404 | { | ||
405 | return node == pci_pic_node; | ||
406 | } | ||
407 | |||
408 | static int pci_pic_host_map(struct irq_host *h, unsigned int virq, | 401 | static int pci_pic_host_map(struct irq_host *h, unsigned int virq, |
409 | irq_hw_number_t hw) | 402 | irq_hw_number_t hw) |
410 | { | 403 | { |
@@ -420,7 +413,6 @@ static void pci_host_unmap(struct irq_host *h, unsigned int virq) | |||
420 | } | 413 | } |
421 | 414 | ||
422 | static struct irq_host_ops pci_pic_host_ops = { | 415 | static struct irq_host_ops pci_pic_host_ops = { |
423 | .match = pci_pic_host_match, | ||
424 | .map = pci_pic_host_map, | 416 | .map = pci_pic_host_map, |
425 | .unmap = pci_host_unmap, | 417 | .unmap = pci_host_unmap, |
426 | }; | 418 | }; |
@@ -479,7 +471,6 @@ void m82xx_pci_init_irq(void) | |||
479 | iounmap(immap); | 471 | iounmap(immap); |
480 | return; | 472 | return; |
481 | } | 473 | } |
482 | pci_pic_node = of_node_get(np); | ||
483 | /* PCI interrupt controller registers: status and mask */ | 474 | /* PCI interrupt controller registers: status and mask */ |
484 | regs = of_get_property(np, "reg", &size); | 475 | regs = of_get_property(np, "reg", &size); |
485 | if ((!regs) || (size <= 2)) { | 476 | if ((!regs) || (size <= 2)) { |
@@ -491,7 +482,6 @@ void m82xx_pci_init_irq(void) | |||
491 | ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg)); | 482 | ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg)); |
492 | pci_regs.pci_int_mask_reg = | 483 | pci_regs.pci_int_mask_reg = |
493 | ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg)); | 484 | ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg)); |
494 | of_node_put(np); | ||
495 | /* configure chip select for PCI interrupt controller */ | 485 | /* configure chip select for PCI interrupt controller */ |
496 | immap->im_memctl.memc_br3 = regs[0] | 0x00001801; | 486 | immap->im_memctl.memc_br3 = regs[0] | 0x00001801; |
497 | immap->im_memctl.memc_or3 = 0xffff8010; | 487 | immap->im_memctl.memc_or3 = 0xffff8010; |
@@ -502,7 +492,7 @@ void m82xx_pci_init_irq(void) | |||
502 | *pci_regs.pci_int_mask_reg |= 0xfff00000; | 492 | *pci_regs.pci_int_mask_reg |= 0xfff00000; |
503 | iounmap(immap); | 493 | iounmap(immap); |
504 | pci_pic_host = | 494 | pci_pic_host = |
505 | irq_alloc_host(IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1, | 495 | irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1, |
506 | &pci_pic_host_ops, irq_max + 1); | 496 | &pci_pic_host_ops, irq_max + 1); |
507 | return; | 497 | return; |
508 | } | 498 | } |
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h index 5b5cca6c8c88..6f749b76dd8f 100644 --- a/arch/powerpc/platforms/82xx/pq2ads.h +++ b/arch/powerpc/platforms/82xx/pq2ads.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #define __MACH_ADS8260_DEFS | 23 | #define __MACH_ADS8260_DEFS |
24 | 24 | ||
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <asm/ppcboot.h> | ||
27 | 26 | ||
28 | /* For our show_cpuinfo hooks. */ | 27 | /* For our show_cpuinfo hooks. */ |
29 | #define CPUINFO_VENDOR "Freescale Semiconductor" | 28 | #define CPUINFO_VENDOR "Freescale Semiconductor" |
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c index 3edfe170a03b..140b46ffdb19 100644 --- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c | |||
@@ -45,8 +45,6 @@ static void __init mpc8313_rdb_setup_arch(void) | |||
45 | #ifdef CONFIG_PCI | 45 | #ifdef CONFIG_PCI |
46 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 46 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
47 | mpc83xx_add_bridge(np); | 47 | mpc83xx_add_bridge(np); |
48 | |||
49 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
50 | #endif | 48 | #endif |
51 | mpc831x_usb_cfg(); | 49 | mpc831x_usb_cfg(); |
52 | } | 50 | } |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 2c8e641a739b..d494bc456458 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
34 | #include <asm/ipic.h> | 34 | #include <asm/ipic.h> |
35 | #include <asm/bootinfo.h> | ||
36 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
37 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
38 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
@@ -76,7 +75,6 @@ static void __init mpc832x_sys_setup_arch(void) | |||
76 | #ifdef CONFIG_PCI | 75 | #ifdef CONFIG_PCI |
77 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 76 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
78 | mpc83xx_add_bridge(np); | 77 | mpc83xx_add_bridge(np); |
79 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
80 | #endif | 78 | #endif |
81 | 79 | ||
82 | #ifdef CONFIG_QUICC_ENGINE | 80 | #ifdef CONFIG_QUICC_ENGINE |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index 090906170a41..24a790c79ec0 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/spi/spi.h> | ||
18 | 19 | ||
19 | #include <asm/of_platform.h> | 20 | #include <asm/of_platform.h> |
20 | #include <asm/time.h> | 21 | #include <asm/time.h> |
@@ -22,6 +23,7 @@ | |||
22 | #include <asm/udbg.h> | 23 | #include <asm/udbg.h> |
23 | #include <asm/qe.h> | 24 | #include <asm/qe.h> |
24 | #include <asm/qe_ic.h> | 25 | #include <asm/qe_ic.h> |
26 | #include <sysdev/fsl_soc.h> | ||
25 | 27 | ||
26 | #include "mpc83xx.h" | 28 | #include "mpc83xx.h" |
27 | 29 | ||
@@ -32,6 +34,50 @@ | |||
32 | #define DBG(fmt...) | 34 | #define DBG(fmt...) |
33 | #endif | 35 | #endif |
34 | 36 | ||
37 | static void mpc83xx_spi_activate_cs(u8 cs, u8 polarity) | ||
38 | { | ||
39 | pr_debug("%s %d %d\n", __func__, cs, polarity); | ||
40 | par_io_data_set(3, 13, polarity); | ||
41 | } | ||
42 | |||
43 | static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity) | ||
44 | { | ||
45 | pr_debug("%s %d %d\n", __func__, cs, polarity); | ||
46 | par_io_data_set(3, 13, !polarity); | ||
47 | } | ||
48 | |||
49 | static struct spi_board_info mpc832x_spi_boardinfo = { | ||
50 | .bus_num = 0x4c0, | ||
51 | .chip_select = 0, | ||
52 | .max_speed_hz = 50000000, | ||
53 | /* | ||
54 | * XXX: This is spidev (spi in userspace) stub, should | ||
55 | * be replaced by "mmc_spi" when mmc_spi will hit mainline. | ||
56 | */ | ||
57 | .modalias = "spidev", | ||
58 | }; | ||
59 | |||
60 | static int __init mpc832x_spi_init(void) | ||
61 | { | ||
62 | if (!machine_is(mpc832x_rdb)) | ||
63 | return 0; | ||
64 | |||
65 | par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */ | ||
66 | par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */ | ||
67 | par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */ | ||
68 | par_io_config_pin(3, 3, 2, 0, 1, 0); /* SPI1 SEL, I */ | ||
69 | |||
70 | par_io_config_pin(3, 13, 1, 0, 0, 0); /* !SD_CS, O */ | ||
71 | par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */ | ||
72 | par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */ | ||
73 | |||
74 | return fsl_spi_init(&mpc832x_spi_boardinfo, 1, | ||
75 | mpc83xx_spi_activate_cs, | ||
76 | mpc83xx_spi_deactivate_cs); | ||
77 | } | ||
78 | |||
79 | device_initcall(mpc832x_spi_init); | ||
80 | |||
35 | /* ************************************************************************ | 81 | /* ************************************************************************ |
36 | * | 82 | * |
37 | * Setup the architecture | 83 | * Setup the architecture |
@@ -49,8 +95,6 @@ static void __init mpc832x_rdb_setup_arch(void) | |||
49 | #ifdef CONFIG_PCI | 95 | #ifdef CONFIG_PCI |
50 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 96 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
51 | mpc83xx_add_bridge(np); | 97 | mpc83xx_add_bridge(np); |
52 | |||
53 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
54 | #endif | 98 | #endif |
55 | 99 | ||
56 | #ifdef CONFIG_QUICC_ENGINE | 100 | #ifdef CONFIG_QUICC_ENGINE |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 47ba5446f63c..870fd20461ce 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/ipic.h> | 32 | #include <asm/ipic.h> |
33 | #include <asm/bootinfo.h> | ||
34 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
35 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
36 | #include <asm/udbg.h> | 35 | #include <asm/udbg.h> |
@@ -55,8 +54,6 @@ static void __init mpc834x_itx_setup_arch(void) | |||
55 | #ifdef CONFIG_PCI | 54 | #ifdef CONFIG_PCI |
56 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 55 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
57 | mpc83xx_add_bridge(np); | 56 | mpc83xx_add_bridge(np); |
58 | |||
59 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
60 | #endif | 57 | #endif |
61 | 58 | ||
62 | mpc834x_usb_cfg(); | 59 | mpc834x_usb_cfg(); |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 4c9ff9cadfe4..a9140b64b98a 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/machdep.h> | 31 | #include <asm/machdep.h> |
32 | #include <asm/ipic.h> | 32 | #include <asm/ipic.h> |
33 | #include <asm/bootinfo.h> | ||
34 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
35 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
36 | #include <asm/udbg.h> | 35 | #include <asm/udbg.h> |
@@ -86,8 +85,6 @@ static void __init mpc834x_mds_setup_arch(void) | |||
86 | #ifdef CONFIG_PCI | 85 | #ifdef CONFIG_PCI |
87 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 86 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
88 | mpc83xx_add_bridge(np); | 87 | mpc83xx_add_bridge(np); |
89 | |||
90 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
91 | #endif | 88 | #endif |
92 | 89 | ||
93 | mpc834xemds_usb_cfg(); | 90 | mpc834xemds_usb_cfg(); |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 84b58934aafd..db6957611585 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/machdep.h> | 39 | #include <asm/machdep.h> |
40 | #include <asm/ipic.h> | 40 | #include <asm/ipic.h> |
41 | #include <asm/bootinfo.h> | ||
42 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
43 | #include <asm/prom.h> | 42 | #include <asm/prom.h> |
44 | #include <asm/udbg.h> | 43 | #include <asm/udbg.h> |
@@ -82,7 +81,6 @@ static void __init mpc836x_mds_setup_arch(void) | |||
82 | #ifdef CONFIG_PCI | 81 | #ifdef CONFIG_PCI |
83 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 82 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
84 | mpc83xx_add_bridge(np); | 83 | mpc83xx_add_bridge(np); |
85 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
86 | #endif | 84 | #endif |
87 | 85 | ||
88 | #ifdef CONFIG_QUICC_ENGINE | 86 | #ifdef CONFIG_QUICC_ENGINE |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 589ee55730f3..b778cb4f3fb5 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -49,8 +49,6 @@ | |||
49 | */ | 49 | */ |
50 | 50 | ||
51 | extern int mpc83xx_add_bridge(struct device_node *dev); | 51 | extern int mpc83xx_add_bridge(struct device_node *dev); |
52 | extern int mpc83xx_exclude_device(struct pci_controller *hose, | ||
53 | u_char bus, u_char devfn); | ||
54 | extern void mpc83xx_restart(char *cmd); | 52 | extern void mpc83xx_restart(char *cmd); |
55 | extern long mpc83xx_time_init(void); | 53 | extern long mpc83xx_time_init(void); |
56 | extern int mpc834x_usb_cfg(void); | 54 | extern int mpc834x_usb_cfg(void); |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 92069469de20..80425d7b14f8 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -33,13 +33,6 @@ | |||
33 | #define DBG(x...) | 33 | #define DBG(x...) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | int mpc83xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) | ||
37 | { | ||
38 | if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0) | ||
39 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
40 | return PCIBIOS_SUCCESSFUL; | ||
41 | } | ||
42 | |||
43 | int __init mpc83xx_add_bridge(struct device_node *dev) | 36 | int __init mpc83xx_add_bridge(struct device_node *dev) |
44 | { | 37 | { |
45 | int len; | 38 | int len; |
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index f620171ad6b1..b8476b20a424 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -29,13 +29,13 @@ config MPC85xx_MDS | |||
29 | help | 29 | help |
30 | This option enables support for the MPC85xx MDS board | 30 | This option enables support for the MPC85xx MDS board |
31 | 31 | ||
32 | config MPC8544_DS | 32 | config MPC85xx_DS |
33 | bool "Freescale MPC8544 DS" | 33 | bool "Freescale MPC85xx DS" |
34 | select PPC_I8259 | 34 | select PPC_I8259 |
35 | select DEFAULT_UIMAGE | 35 | select DEFAULT_UIMAGE |
36 | select FSL_ULI1575 | 36 | select FSL_ULI1575 |
37 | help | 37 | help |
38 | This option enables support for the MPC8544 DS board | 38 | This option enables support for the MPC85xx DS (MPC8544 DS) board |
39 | 39 | ||
40 | endchoice | 40 | endchoice |
41 | 41 | ||
@@ -58,4 +58,4 @@ config MPC85xx | |||
58 | select FSL_PCI if PCI | 58 | select FSL_PCI if PCI |
59 | select SERIAL_8250_SHARE_IRQ if SERIAL_8250 | 59 | select SERIAL_8250_SHARE_IRQ if SERIAL_8250 |
60 | default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \ | 60 | default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \ |
61 | || MPC85xx_MDS || MPC8544_DS | 61 | || MPC85xx_MDS || MPC85xx_DS |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index d70f2d0f9d36..25bd9e2d4946 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -5,5 +5,5 @@ obj-$(CONFIG_PPC_85xx) += misc.o | |||
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | 5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o |
6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o | 6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o |
7 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o | 7 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o |
8 | obj-$(CONFIG_MPC8544_DS) += mpc8544_ds.o | 8 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o |
9 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o | 9 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 40a828675c7b..c22bc1c4f591 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -192,7 +192,6 @@ void init_fcc_ioports(struct fs_platform_info *fpi) | |||
192 | 192 | ||
193 | static void __init mpc85xx_ads_setup_arch(void) | 193 | static void __init mpc85xx_ads_setup_arch(void) |
194 | { | 194 | { |
195 | struct device_node *cpu; | ||
196 | #ifdef CONFIG_PCI | 195 | #ifdef CONFIG_PCI |
197 | struct device_node *np; | 196 | struct device_node *np; |
198 | #endif | 197 | #endif |
@@ -200,18 +199,6 @@ static void __init mpc85xx_ads_setup_arch(void) | |||
200 | if (ppc_md.progress) | 199 | if (ppc_md.progress) |
201 | ppc_md.progress("mpc85xx_ads_setup_arch()", 0); | 200 | ppc_md.progress("mpc85xx_ads_setup_arch()", 0); |
202 | 201 | ||
203 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
204 | if (cpu != 0) { | ||
205 | const unsigned int *fp; | ||
206 | |||
207 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
208 | if (fp != 0) | ||
209 | loops_per_jiffy = *fp / HZ; | ||
210 | else | ||
211 | loops_per_jiffy = 50000000 / HZ; | ||
212 | of_node_put(cpu); | ||
213 | } | ||
214 | |||
215 | #ifdef CONFIG_CPM2 | 202 | #ifdef CONFIG_CPM2 |
216 | cpm2_reset(); | 203 | cpm2_reset(); |
217 | #endif | 204 | #endif |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 2d4cb7847604..665e8df05dc5 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 36 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 37 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | ||
39 | #include <asm/pci-bridge.h> | 38 | #include <asm/pci-bridge.h> |
40 | #include <asm/mpc85xx.h> | 39 | #include <asm/mpc85xx.h> |
41 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
@@ -266,7 +265,6 @@ device_initcall(mpc85xx_cds_8259_attach); | |||
266 | */ | 265 | */ |
267 | static void __init mpc85xx_cds_setup_arch(void) | 266 | static void __init mpc85xx_cds_setup_arch(void) |
268 | { | 267 | { |
269 | struct device_node *cpu; | ||
270 | #ifdef CONFIG_PCI | 268 | #ifdef CONFIG_PCI |
271 | struct device_node *np; | 269 | struct device_node *np; |
272 | #endif | 270 | #endif |
@@ -274,18 +272,6 @@ static void __init mpc85xx_cds_setup_arch(void) | |||
274 | if (ppc_md.progress) | 272 | if (ppc_md.progress) |
275 | ppc_md.progress("mpc85xx_cds_setup_arch()", 0); | 273 | ppc_md.progress("mpc85xx_cds_setup_arch()", 0); |
276 | 274 | ||
277 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
278 | if (cpu != 0) { | ||
279 | const unsigned int *fp; | ||
280 | |||
281 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
282 | if (fp != 0) | ||
283 | loops_per_jiffy = *fp / HZ; | ||
284 | else | ||
285 | loops_per_jiffy = 500000000 / HZ; | ||
286 | of_node_put(cpu); | ||
287 | } | ||
288 | |||
289 | cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE); | 275 | cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE); |
290 | cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1; | 276 | cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1; |
291 | 277 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 48983bc56d46..4d449022ac9b 100644 --- a/arch/powerpc/platforms/85xx/mpc8544_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * MPC8544 DS Board Setup | 2 | * MPC85xx DS Board Setup |
3 | * | 3 | * |
4 | * Author Xianghua Xiao (x.xiao@freescale.com) | 4 | * Author Xianghua Xiao (x.xiao@freescale.com) |
5 | * Roy Zang <tie-fei.zang@freescale.com> | 5 | * Roy Zang <tie-fei.zang@freescale.com> |
@@ -44,7 +44,7 @@ | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef CONFIG_PPC_I8259 | 46 | #ifdef CONFIG_PPC_I8259 |
47 | static void mpc8544_8259_cascade(unsigned int irq, struct irq_desc *desc) | 47 | static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) |
48 | { | 48 | { |
49 | unsigned int cascade_irq = i8259_irq(); | 49 | unsigned int cascade_irq = i8259_irq(); |
50 | 50 | ||
@@ -55,7 +55,7 @@ static void mpc8544_8259_cascade(unsigned int irq, struct irq_desc *desc) | |||
55 | } | 55 | } |
56 | #endif /* CONFIG_PPC_I8259 */ | 56 | #endif /* CONFIG_PPC_I8259 */ |
57 | 57 | ||
58 | void __init mpc8544_ds_pic_init(void) | 58 | void __init mpc85xx_ds_pic_init(void) |
59 | { | 59 | { |
60 | struct mpic *mpic; | 60 | struct mpic *mpic; |
61 | struct resource r; | 61 | struct resource r; |
@@ -104,16 +104,17 @@ void __init mpc8544_ds_pic_init(void) | |||
104 | return; | 104 | return; |
105 | } | 105 | } |
106 | 106 | ||
107 | DBG("mpc8544ds: cascade mapped to irq %d\n", cascade_irq); | 107 | DBG("mpc85xxds: cascade mapped to irq %d\n", cascade_irq); |
108 | 108 | ||
109 | i8259_init(cascade_node, 0); | 109 | i8259_init(cascade_node, 0); |
110 | of_node_put(cascade_node); | 110 | of_node_put(cascade_node); |
111 | 111 | ||
112 | set_irq_chained_handler(cascade_irq, mpc8544_8259_cascade); | 112 | set_irq_chained_handler(cascade_irq, mpc85xx_8259_cascade); |
113 | #endif /* CONFIG_PPC_I8259 */ | 113 | #endif /* CONFIG_PPC_I8259 */ |
114 | } | 114 | } |
115 | 115 | ||
116 | #ifdef CONFIG_PCI | 116 | #ifdef CONFIG_PCI |
117 | static int primary_phb_addr; | ||
117 | extern int uses_fsl_uli_m1575; | 118 | extern int uses_fsl_uli_m1575; |
118 | extern int uli_exclude_device(struct pci_controller *hose, | 119 | extern int uli_exclude_device(struct pci_controller *hose, |
119 | u_char bus, u_char devfn); | 120 | u_char bus, u_char devfn); |
@@ -121,13 +122,13 @@ extern int uli_exclude_device(struct pci_controller *hose, | |||
121 | static int mpc85xx_exclude_device(struct pci_controller *hose, | 122 | static int mpc85xx_exclude_device(struct pci_controller *hose, |
122 | u_char bus, u_char devfn) | 123 | u_char bus, u_char devfn) |
123 | { | 124 | { |
124 | struct device_node* node; | 125 | struct device_node* node; |
125 | struct resource rsrc; | 126 | struct resource rsrc; |
126 | 127 | ||
127 | node = (struct device_node *)hose->arch_data; | 128 | node = (struct device_node *)hose->arch_data; |
128 | of_address_to_resource(node, 0, &rsrc); | 129 | of_address_to_resource(node, 0, &rsrc); |
129 | 130 | ||
130 | if ((rsrc.start & 0xfffff) == 0xb000) { | 131 | if ((rsrc.start & 0xfffff) == primary_phb_addr) { |
131 | return uli_exclude_device(hose, bus, devfn); | 132 | return uli_exclude_device(hose, bus, devfn); |
132 | } | 133 | } |
133 | 134 | ||
@@ -138,20 +139,20 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, | |||
138 | /* | 139 | /* |
139 | * Setup the architecture | 140 | * Setup the architecture |
140 | */ | 141 | */ |
141 | static void __init mpc8544_ds_setup_arch(void) | 142 | static void __init mpc85xx_ds_setup_arch(void) |
142 | { | 143 | { |
143 | #ifdef CONFIG_PCI | 144 | #ifdef CONFIG_PCI |
144 | struct device_node *np; | 145 | struct device_node *np; |
145 | #endif | 146 | #endif |
146 | 147 | ||
147 | if (ppc_md.progress) | 148 | if (ppc_md.progress) |
148 | ppc_md.progress("mpc8544_ds_setup_arch()", 0); | 149 | ppc_md.progress("mpc85xx_ds_setup_arch()", 0); |
149 | 150 | ||
150 | #ifdef CONFIG_PCI | 151 | #ifdef CONFIG_PCI |
151 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { | 152 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { |
152 | struct resource rsrc; | 153 | struct resource rsrc; |
153 | of_address_to_resource(np, 0, &rsrc); | 154 | of_address_to_resource(np, 0, &rsrc); |
154 | if ((rsrc.start & 0xfffff) == 0xb000) | 155 | if ((rsrc.start & 0xfffff) == primary_phb_addr) |
155 | fsl_add_bridge(np, 1); | 156 | fsl_add_bridge(np, 1); |
156 | else | 157 | else |
157 | fsl_add_bridge(np, 0); | 158 | fsl_add_bridge(np, 0); |
@@ -160,7 +161,7 @@ static void __init mpc8544_ds_setup_arch(void) | |||
160 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 161 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
161 | #endif | 162 | #endif |
162 | 163 | ||
163 | printk("MPC8544 DS board from Freescale Semiconductor\n"); | 164 | printk("MPC85xx DS board from Freescale Semiconductor\n"); |
164 | } | 165 | } |
165 | 166 | ||
166 | /* | 167 | /* |
@@ -170,14 +171,52 @@ static int __init mpc8544_ds_probe(void) | |||
170 | { | 171 | { |
171 | unsigned long root = of_get_flat_dt_root(); | 172 | unsigned long root = of_get_flat_dt_root(); |
172 | 173 | ||
173 | return of_flat_dt_is_compatible(root, "MPC8544DS"); | 174 | if (of_flat_dt_is_compatible(root, "MPC8544DS")) { |
175 | #ifdef CONFIG_PCI | ||
176 | primary_phb_addr = 0xb000; | ||
177 | #endif | ||
178 | return 1; | ||
179 | } else { | ||
180 | return 0; | ||
181 | } | ||
182 | } | ||
183 | |||
184 | /* | ||
185 | * Called very early, device-tree isn't unflattened | ||
186 | */ | ||
187 | static int __init mpc8572_ds_probe(void) | ||
188 | { | ||
189 | unsigned long root = of_get_flat_dt_root(); | ||
190 | |||
191 | if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS")) { | ||
192 | #ifdef CONFIG_PCI | ||
193 | primary_phb_addr = 0x8000; | ||
194 | #endif | ||
195 | return 1; | ||
196 | } else { | ||
197 | return 0; | ||
198 | } | ||
174 | } | 199 | } |
175 | 200 | ||
176 | define_machine(mpc8544_ds) { | 201 | define_machine(mpc8544_ds) { |
177 | .name = "MPC8544 DS", | 202 | .name = "MPC8544 DS", |
178 | .probe = mpc8544_ds_probe, | 203 | .probe = mpc8544_ds_probe, |
179 | .setup_arch = mpc8544_ds_setup_arch, | 204 | .setup_arch = mpc85xx_ds_setup_arch, |
180 | .init_IRQ = mpc8544_ds_pic_init, | 205 | .init_IRQ = mpc85xx_ds_pic_init, |
206 | #ifdef CONFIG_PCI | ||
207 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
208 | #endif | ||
209 | .get_irq = mpic_get_irq, | ||
210 | .restart = mpc85xx_restart, | ||
211 | .calibrate_decr = generic_calibrate_decr, | ||
212 | .progress = udbg_progress, | ||
213 | }; | ||
214 | |||
215 | define_machine(mpc8572_ds) { | ||
216 | .name = "MPC8572 DS", | ||
217 | .probe = mpc8572_ds_probe, | ||
218 | .setup_arch = mpc85xx_ds_setup_arch, | ||
219 | .init_IRQ = mpc85xx_ds_pic_init, | ||
181 | #ifdef CONFIG_PCI | 220 | #ifdef CONFIG_PCI |
182 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | 221 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, |
183 | #endif | 222 | #endif |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 7ca7e676f1c4..c379286c3730 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | #include <asm/machdep.h> | 40 | #include <asm/machdep.h> |
41 | #include <asm/bootinfo.h> | ||
42 | #include <asm/pci-bridge.h> | 41 | #include <asm/pci-bridge.h> |
43 | #include <asm/mpc85xx.h> | 42 | #include <asm/mpc85xx.h> |
44 | #include <asm/irq.h> | 43 | #include <asm/irq.h> |
@@ -73,17 +72,6 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
73 | if (ppc_md.progress) | 72 | if (ppc_md.progress) |
74 | ppc_md.progress("mpc85xx_mds_setup_arch()", 0); | 73 | ppc_md.progress("mpc85xx_mds_setup_arch()", 0); |
75 | 74 | ||
76 | np = of_find_node_by_type(NULL, "cpu"); | ||
77 | if (np != NULL) { | ||
78 | const unsigned int *fp = | ||
79 | of_get_property(np, "clock-frequency", NULL); | ||
80 | if (fp != NULL) | ||
81 | loops_per_jiffy = *fp / HZ; | ||
82 | else | ||
83 | loops_per_jiffy = 50000000 / HZ; | ||
84 | of_node_put(np); | ||
85 | } | ||
86 | |||
87 | /* Map BCSR area */ | 75 | /* Map BCSR area */ |
88 | np = of_find_node_by_name(NULL, "bcsr"); | 76 | np = of_find_node_by_name(NULL, "bcsr"); |
89 | if (np != NULL) { | 77 | if (np != NULL) { |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 47aafa76c933..3ec9d5a25750 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -132,23 +132,13 @@ static int mpc86xx_exclude_device(struct pci_controller *hose, | |||
132 | static void __init | 132 | static void __init |
133 | mpc86xx_hpcn_setup_arch(void) | 133 | mpc86xx_hpcn_setup_arch(void) |
134 | { | 134 | { |
135 | #ifdef CONFIG_PCI | ||
135 | struct device_node *np; | 136 | struct device_node *np; |
137 | #endif | ||
136 | 138 | ||
137 | if (ppc_md.progress) | 139 | if (ppc_md.progress) |
138 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); | 140 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); |
139 | 141 | ||
140 | np = of_find_node_by_type(NULL, "cpu"); | ||
141 | if (np != 0) { | ||
142 | const unsigned int *fp; | ||
143 | |||
144 | fp = of_get_property(np, "clock-frequency", NULL); | ||
145 | if (fp != 0) | ||
146 | loops_per_jiffy = *fp / HZ; | ||
147 | else | ||
148 | loops_per_jiffy = 50000000 / HZ; | ||
149 | of_node_put(np); | ||
150 | } | ||
151 | |||
152 | #ifdef CONFIG_PCI | 142 | #ifdef CONFIG_PCI |
153 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { | 143 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { |
154 | struct resource rsrc; | 144 | struct resource rsrc; |
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index f1693550c70c..b2b98dd8be6a 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c | |||
@@ -36,13 +36,11 @@ | |||
36 | 36 | ||
37 | #include <asm/mmu.h> | 37 | #include <asm/mmu.h> |
38 | #include <asm/reg.h> | 38 | #include <asm/reg.h> |
39 | #include <asm/residual.h> | ||
40 | #include <asm/io.h> | 39 | #include <asm/io.h> |
41 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
42 | #include <asm/mpc8xx.h> | 41 | #include <asm/mpc8xx.h> |
43 | #include <asm/8xx_immap.h> | 42 | #include <asm/8xx_immap.h> |
44 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
45 | #include <asm/bootinfo.h> | ||
46 | #include <asm/time.h> | 44 | #include <asm/time.h> |
47 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
48 | #include <asm/fs_pd.h> | 46 | #include <asm/fs_pd.h> |
@@ -55,7 +53,9 @@ struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops; | |||
55 | #endif | 53 | #endif |
56 | 54 | ||
57 | void m8xx_calibrate_decr(void); | 55 | void m8xx_calibrate_decr(void); |
56 | #ifdef CONFIG_8xx_WDT | ||
58 | extern void m8xx_wdt_handler_install(bd_t *bp); | 57 | extern void m8xx_wdt_handler_install(bd_t *bp); |
58 | #endif | ||
59 | extern int cpm_pic_init(void); | 59 | extern int cpm_pic_init(void); |
60 | extern int cpm_get_irq(void); | 60 | extern int cpm_get_irq(void); |
61 | 61 | ||
@@ -89,24 +89,24 @@ init_internal_rtc(void) | |||
89 | 89 | ||
90 | static int __init get_freq(char *name, unsigned long *val) | 90 | static int __init get_freq(char *name, unsigned long *val) |
91 | { | 91 | { |
92 | struct device_node *cpu; | 92 | struct device_node *cpu; |
93 | const unsigned int *fp; | 93 | const unsigned int *fp; |
94 | int found = 0; | 94 | int found = 0; |
95 | 95 | ||
96 | /* The cpu node should have timebase and clock frequency properties */ | 96 | /* The cpu node should have timebase and clock frequency properties */ |
97 | cpu = of_find_node_by_type(NULL, "cpu"); | 97 | cpu = of_find_node_by_type(NULL, "cpu"); |
98 | 98 | ||
99 | if (cpu) { | 99 | if (cpu) { |
100 | fp = of_get_property(cpu, name, NULL); | 100 | fp = of_get_property(cpu, name, NULL); |
101 | if (fp) { | 101 | if (fp) { |
102 | found = 1; | 102 | found = 1; |
103 | *val = *fp; | 103 | *val = *fp; |
104 | } | 104 | } |
105 | 105 | ||
106 | of_node_put(cpu); | 106 | of_node_put(cpu); |
107 | } | 107 | } |
108 | 108 | ||
109 | return found; | 109 | return found; |
110 | } | 110 | } |
111 | 111 | ||
112 | /* The decrementer counts at the system (internal) clock frequency divided by | 112 | /* The decrementer counts at the system (internal) clock frequency divided by |
@@ -122,7 +122,7 @@ void __init mpc8xx_calibrate_decr(void) | |||
122 | sit8xx_t *sys_tmr2; | 122 | sit8xx_t *sys_tmr2; |
123 | int irq, virq; | 123 | int irq, virq; |
124 | 124 | ||
125 | clk_r1 = (cark8xx_t *) immr_map(im_clkrstk); | 125 | clk_r1 = (cark8xx_t *) immr_map(im_clkrstk); |
126 | 126 | ||
127 | /* Unlock the SCCR. */ | 127 | /* Unlock the SCCR. */ |
128 | out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); | 128 | out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); |
@@ -130,24 +130,24 @@ void __init mpc8xx_calibrate_decr(void) | |||
130 | immr_unmap(clk_r1); | 130 | immr_unmap(clk_r1); |
131 | 131 | ||
132 | /* Force all 8xx processors to use divide by 16 processor clock. */ | 132 | /* Force all 8xx processors to use divide by 16 processor clock. */ |
133 | clk_r2 = (car8xx_t *) immr_map(im_clkrst); | 133 | clk_r2 = (car8xx_t *) immr_map(im_clkrst); |
134 | setbits32(&clk_r2->car_sccr, 0x02000000); | 134 | setbits32(&clk_r2->car_sccr, 0x02000000); |
135 | immr_unmap(clk_r2); | 135 | immr_unmap(clk_r2); |
136 | 136 | ||
137 | /* Processor frequency is MHz. | 137 | /* Processor frequency is MHz. |
138 | */ | 138 | */ |
139 | ppc_tb_freq = 50000000; | 139 | ppc_tb_freq = 50000000; |
140 | if (!get_freq("bus-frequency", &ppc_tb_freq)) { | 140 | if (!get_freq("bus-frequency", &ppc_tb_freq)) { |
141 | printk(KERN_ERR "WARNING: Estimating decrementer frequency " | 141 | printk(KERN_ERR "WARNING: Estimating decrementer frequency " |
142 | "(not found)\n"); | 142 | "(not found)\n"); |
143 | } | 143 | } |
144 | ppc_tb_freq /= 16; | 144 | ppc_tb_freq /= 16; |
145 | ppc_proc_freq = 50000000; | 145 | ppc_proc_freq = 50000000; |
146 | if (!get_freq("clock-frequency", &ppc_proc_freq)) | 146 | if (!get_freq("clock-frequency", &ppc_proc_freq)) |
147 | printk(KERN_ERR "WARNING: Estimating processor frequency" | 147 | printk(KERN_ERR "WARNING: Estimating processor frequency" |
148 | "(not found)\n"); | 148 | "(not found)\n"); |
149 | 149 | ||
150 | printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); | 150 | printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); |
151 | 151 | ||
152 | /* Perform some more timer/timebase initialization. This used | 152 | /* Perform some more timer/timebase initialization. This used |
153 | * to be done elsewhere, but other changes caused it to get | 153 | * to be done elsewhere, but other changes caused it to get |
@@ -164,7 +164,7 @@ void __init mpc8xx_calibrate_decr(void) | |||
164 | * we guarantee the registers are locked, then we unlock them | 164 | * we guarantee the registers are locked, then we unlock them |
165 | * for our use. | 165 | * for our use. |
166 | */ | 166 | */ |
167 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); | 167 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); |
168 | out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY); | 168 | out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY); |
169 | out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY); | 169 | out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY); |
170 | out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY); | 170 | out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY); |
@@ -180,8 +180,8 @@ void __init mpc8xx_calibrate_decr(void) | |||
180 | * we have to enable the timebase). The decrementer interrupt | 180 | * we have to enable the timebase). The decrementer interrupt |
181 | * is wired into the vector table, nothing to do here for that. | 181 | * is wired into the vector table, nothing to do here for that. |
182 | */ | 182 | */ |
183 | cpu = of_find_node_by_type(NULL, "cpu"); | 183 | cpu = of_find_node_by_type(NULL, "cpu"); |
184 | virq= irq_of_parse_and_map(cpu, 0); | 184 | virq= irq_of_parse_and_map(cpu, 0); |
185 | irq = irq_map[virq].hwirq; | 185 | irq = irq_map[virq].hwirq; |
186 | 186 | ||
187 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); | 187 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); |
@@ -211,10 +211,10 @@ int mpc8xx_set_rtc_time(struct rtc_time *tm) | |||
211 | sit8xx_t *sys_tmr2; | 211 | sit8xx_t *sys_tmr2; |
212 | int time; | 212 | int time; |
213 | 213 | ||
214 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); | 214 | sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); |
215 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); | 215 | sys_tmr2 = (sit8xx_t *) immr_map(im_sit); |
216 | time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, | 216 | time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, |
217 | tm->tm_hour, tm->tm_min, tm->tm_sec); | 217 | tm->tm_hour, tm->tm_min, tm->tm_sec); |
218 | 218 | ||
219 | out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY); | 219 | out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY); |
220 | out_be32(&sys_tmr2->sit_rtc, time); | 220 | out_be32(&sys_tmr2->sit_rtc, time); |
@@ -233,8 +233,8 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm) | |||
233 | /* Get time from the RTC. */ | 233 | /* Get time from the RTC. */ |
234 | data = in_be32(&sys_tmr->sit_rtc); | 234 | data = in_be32(&sys_tmr->sit_rtc); |
235 | to_tm(data, tm); | 235 | to_tm(data, tm); |
236 | tm->tm_year -= 1900; | 236 | tm->tm_year -= 1900; |
237 | tm->tm_mon -= 1; | 237 | tm->tm_mon -= 1; |
238 | immr_unmap(sys_tmr); | 238 | immr_unmap(sys_tmr); |
239 | return; | 239 | return; |
240 | } | 240 | } |
@@ -298,7 +298,7 @@ void __init m8xx_pic_init(void) | |||
298 | int irq; | 298 | int irq; |
299 | 299 | ||
300 | if (mpc8xx_pic_init()) { | 300 | if (mpc8xx_pic_init()) { |
301 | printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); | 301 | printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); |
302 | return; | 302 | return; |
303 | } | 303 | } |
304 | 304 | ||
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h index 59bad2f9ae51..dd10cd20b6a7 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads.h +++ b/arch/powerpc/platforms/8xx/mpc86xads.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __ASM_MPC86XADS_H__ | 15 | #ifndef __ASM_MPC86XADS_H__ |
16 | #define __ASM_MPC86XADS_H__ | 16 | #define __ASM_MPC86XADS_H__ |
17 | 17 | ||
18 | #include <asm/ppcboot.h> | ||
19 | #include <sysdev/fsl_soc.h> | 18 | #include <sysdev/fsl_soc.h> |
20 | 19 | ||
21 | /* U-Boot maps BCSR to 0xff080000 */ | 20 | /* U-Boot maps BCSR to 0xff080000 */ |
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index cf0e7bc8c2e7..8f64f48698ab 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
33 | #include <asm/time.h> | 33 | #include <asm/time.h> |
34 | #include <asm/ppcboot.h> | ||
35 | #include <asm/mpc8xx.h> | 34 | #include <asm/mpc8xx.h> |
36 | #include <asm/8xx_immap.h> | 35 | #include <asm/8xx_immap.h> |
37 | #include <asm/commproc.h> | 36 | #include <asm/commproc.h> |
@@ -254,20 +253,6 @@ int platform_device_skip(const char *model, int id) | |||
254 | 253 | ||
255 | static void __init mpc86xads_setup_arch(void) | 254 | static void __init mpc86xads_setup_arch(void) |
256 | { | 255 | { |
257 | struct device_node *cpu; | ||
258 | |||
259 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
260 | if (cpu != 0) { | ||
261 | const unsigned int *fp; | ||
262 | |||
263 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
264 | if (fp != 0) | ||
265 | loops_per_jiffy = *fp / HZ; | ||
266 | else | ||
267 | loops_per_jiffy = 50000000 / HZ; | ||
268 | of_node_put(cpu); | ||
269 | } | ||
270 | |||
271 | cpm_reset(); | 256 | cpm_reset(); |
272 | 257 | ||
273 | mpc86xads_board_setup(); | 258 | mpc86xads_board_setup(); |
diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h index 7c31aec284c2..14db12417064 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads.h +++ b/arch/powerpc/platforms/8xx/mpc885ads.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __ASM_MPC885ADS_H__ | 15 | #ifndef __ASM_MPC885ADS_H__ |
16 | #define __ASM_MPC885ADS_H__ | 16 | #define __ASM_MPC885ADS_H__ |
17 | 17 | ||
18 | #include <asm/ppcboot.h> | ||
19 | #include <sysdev/fsl_soc.h> | 18 | #include <sysdev/fsl_soc.h> |
20 | 19 | ||
21 | /* U-Boot maps BCSR to 0xff080000 */ | 20 | /* U-Boot maps BCSR to 0xff080000 */ |
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index 5a808d611ae3..a1dab4cfd3de 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
33 | #include <asm/system.h> | 33 | #include <asm/system.h> |
34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
35 | #include <asm/ppcboot.h> | ||
36 | #include <asm/mpc8xx.h> | 35 | #include <asm/mpc8xx.h> |
37 | #include <asm/8xx_immap.h> | 36 | #include <asm/8xx_immap.h> |
38 | #include <asm/commproc.h> | 37 | #include <asm/commproc.h> |
@@ -406,20 +405,6 @@ int platform_device_skip(const char *model, int id) | |||
406 | 405 | ||
407 | static void __init mpc885ads_setup_arch(void) | 406 | static void __init mpc885ads_setup_arch(void) |
408 | { | 407 | { |
409 | struct device_node *cpu; | ||
410 | |||
411 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
412 | if (cpu != 0) { | ||
413 | const unsigned int *fp; | ||
414 | |||
415 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
416 | if (fp != 0) | ||
417 | loops_per_jiffy = *fp / HZ; | ||
418 | else | ||
419 | loops_per_jiffy = 50000000 / HZ; | ||
420 | of_node_put(cpu); | ||
421 | } | ||
422 | |||
423 | cpm_reset(); | 408 | cpm_reset(); |
424 | 409 | ||
425 | mpc885ads_board_setup(); | 410 | mpc885ads_board_setup(); |
@@ -441,9 +426,14 @@ static int __init mpc885ads_probe(void) | |||
441 | 426 | ||
442 | define_machine(mpc885_ads) | 427 | define_machine(mpc885_ads) |
443 | { | 428 | { |
444 | .name = "MPC885 ADS",.probe = mpc885ads_probe,.setup_arch = | 429 | .name = "MPC885 ADS", |
445 | mpc885ads_setup_arch,.init_IRQ = | 430 | .probe = mpc885ads_probe, |
446 | m8xx_pic_init,.show_cpuinfo = mpc8xx_show_cpuinfo,.get_irq = | 431 | .setup_arch = mpc885ads_setup_arch, |
447 | mpc8xx_get_irq,.restart = mpc8xx_restart,.calibrate_decr = | 432 | .init_IRQ = m8xx_pic_init, |
448 | mpc8xx_calibrate_decr,.set_rtc_time = | 433 | .show_cpuinfo = mpc8xx_show_cpuinfo, |
449 | mpc8xx_set_rtc_time,.get_rtc_time = mpc8xx_get_rtc_time,}; | 434 | .get_irq = mpc8xx_get_irq, |
435 | .restart = mpc8xx_restart, | ||
436 | .calibrate_decr = mpc8xx_calibrate_decr, | ||
437 | .set_rtc_time = mpc8xx_set_rtc_time, | ||
438 | .get_rtc_time = mpc8xx_get_rtc_time, | ||
439 | }; | ||
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 19d4628edf79..92fcd6e35b51 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -12,13 +12,10 @@ config PPC_MULTIPLATFORM | |||
12 | RS/6000 machine, an Apple machine, or a PReP, CHRP, | 12 | RS/6000 machine, an Apple machine, or a PReP, CHRP, |
13 | Maple or Cell-based machine. | 13 | Maple or Cell-based machine. |
14 | 14 | ||
15 | config EMBEDDED6xx | ||
16 | bool "Embedded 6xx/7xx/7xxx-based board" | ||
17 | depends on PPC32 && (BROKEN||BROKEN_ON_SMP) | ||
18 | |||
19 | config PPC_82xx | 15 | config PPC_82xx |
20 | bool "Freescale 82xx" | 16 | bool "Freescale 82xx" |
21 | depends on 6xx | 17 | depends on 6xx |
18 | select WANT_DEVICE_TREE | ||
22 | 19 | ||
23 | config PPC_83xx | 20 | config PPC_83xx |
24 | bool "Freescale 83xx" | 21 | bool "Freescale 83xx" |
@@ -58,7 +55,7 @@ source "arch/powerpc/platforms/85xx/Kconfig" | |||
58 | source "arch/powerpc/platforms/86xx/Kconfig" | 55 | source "arch/powerpc/platforms/86xx/Kconfig" |
59 | source "arch/powerpc/platforms/embedded6xx/Kconfig" | 56 | source "arch/powerpc/platforms/embedded6xx/Kconfig" |
60 | source "arch/powerpc/platforms/44x/Kconfig" | 57 | source "arch/powerpc/platforms/44x/Kconfig" |
61 | #source "arch/powerpc/platforms/4xx/Kconfig | 58 | source "arch/powerpc/platforms/40x/Kconfig" |
62 | 59 | ||
63 | config PPC_NATIVE | 60 | config PPC_NATIVE |
64 | bool | 61 | bool |
@@ -136,6 +133,16 @@ config MPIC_U3_HT_IRQS | |||
136 | depends on PPC_MAPLE | 133 | depends on PPC_MAPLE |
137 | default y | 134 | default y |
138 | 135 | ||
136 | config MPIC_BROKEN_REGREAD | ||
137 | bool | ||
138 | depends on MPIC | ||
139 | help | ||
140 | This option enables a MPIC driver workaround for some chips | ||
141 | that have a bug that causes some interrupt source information | ||
142 | to not read back properly. It is safe to use on other chips as | ||
143 | well, but enabling it uses about 8KB of memory to keep copies | ||
144 | of the register contents in software. | ||
145 | |||
139 | config IBMVIO | 146 | config IBMVIO |
140 | depends on PPC_PSERIES || PPC_ISERIES | 147 | depends on PPC_PSERIES || PPC_ISERIES |
141 | bool | 148 | bool |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index e4b2aee53a73..4c315be25015 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -36,10 +36,12 @@ config PPC_8xx | |||
36 | bool "Freescale 8xx" | 36 | bool "Freescale 8xx" |
37 | select FSL_SOC | 37 | select FSL_SOC |
38 | select 8xx | 38 | select 8xx |
39 | select WANT_DEVICE_TREE | ||
39 | 40 | ||
40 | config 40x | 41 | config 40x |
41 | bool "AMCC 40x" | 42 | bool "AMCC 40x" |
42 | select PPC_DCR_NATIVE | 43 | select PPC_DCR_NATIVE |
44 | select WANT_DEVICE_TREE | ||
43 | 45 | ||
44 | config 44x | 46 | config 44x |
45 | bool "AMCC 44x" | 47 | bool "AMCC 44x" |
@@ -69,6 +71,18 @@ config POWER4 | |||
69 | depends on PPC64 | 71 | depends on PPC64 |
70 | def_bool y | 72 | def_bool y |
71 | 73 | ||
74 | config TUNE_CELL | ||
75 | bool "Optimize for Cell Broadband Engine" | ||
76 | depends on PPC64 | ||
77 | help | ||
78 | Cause the compiler to optimize for the PPE of the Cell Broadband | ||
79 | Engine. This will make the code run considerably faster on Cell | ||
80 | but somewhat slower on other machines. This option only changes | ||
81 | the scheduling of instructions, not the selection of instructions | ||
82 | itself, so the resulting kernel will keep running on all other | ||
83 | machines. When building a kernel that is supposed to run only | ||
84 | on Cell, you should also select the POWER4_ONLY option. | ||
85 | |||
72 | config 6xx | 86 | config 6xx |
73 | bool | 87 | bool |
74 | 88 | ||
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index d44e832b01f2..6d9079da5f5a 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile | |||
@@ -9,7 +9,7 @@ obj-$(CONFIG_PPC_PMAC) += powermac/ | |||
9 | endif | 9 | endif |
10 | endif | 10 | endif |
11 | obj-$(CONFIG_PPC_CHRP) += chrp/ | 11 | obj-$(CONFIG_PPC_CHRP) += chrp/ |
12 | #obj-$(CONFIG_4xx) += 4xx/ | 12 | obj-$(CONFIG_40x) += 40x/ |
13 | obj-$(CONFIG_44x) += 44x/ | 13 | obj-$(CONFIG_44x) += 44x/ |
14 | obj-$(CONFIG_PPC_MPC52xx) += 52xx/ | 14 | obj-$(CONFIG_PPC_MPC52xx) += 52xx/ |
15 | obj-$(CONFIG_PPC_8xx) += 8xx/ | 15 | obj-$(CONFIG_PPC_8xx) += 8xx/ |
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index f88a7c76f296..61d12f183036 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -13,15 +13,13 @@ obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o | |||
13 | endif | 13 | endif |
14 | 14 | ||
15 | # needed only when building loadable spufs.ko | 15 | # needed only when building loadable spufs.ko |
16 | spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o | ||
17 | spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o | 16 | spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o |
18 | 17 | ||
19 | spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o | 18 | spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o |
20 | spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o | 19 | spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o |
21 | 20 | ||
22 | obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ | 21 | obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ |
23 | spu_coredump.o \ | 22 | spu_syscalls.o \ |
24 | $(spufs-modular-m) \ | ||
25 | $(spu-priv1-y) \ | 23 | $(spu-priv1-y) \ |
26 | $(spu-manage-y) \ | 24 | $(spu-manage-y) \ |
27 | spufs/ | 25 | spufs/ |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 4c9ab5b70bae..1245b2f517bb 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -64,13 +64,11 @@ | |||
64 | 64 | ||
65 | 65 | ||
66 | struct axon_msic { | 66 | struct axon_msic { |
67 | struct device_node *dn; | ||
68 | struct irq_host *irq_host; | 67 | struct irq_host *irq_host; |
69 | __le32 *fifo; | 68 | __le32 *fifo; |
70 | dcr_host_t dcr_host; | 69 | dcr_host_t dcr_host; |
71 | struct list_head list; | 70 | struct list_head list; |
72 | u32 read_offset; | 71 | u32 read_offset; |
73 | u32 dcr_base; | ||
74 | }; | 72 | }; |
75 | 73 | ||
76 | static LIST_HEAD(axon_msic_list); | 74 | static LIST_HEAD(axon_msic_list); |
@@ -79,12 +77,12 @@ static void msic_dcr_write(struct axon_msic *msic, unsigned int dcr_n, u32 val) | |||
79 | { | 77 | { |
80 | pr_debug("axon_msi: dcr_write(0x%x, 0x%x)\n", val, dcr_n); | 78 | pr_debug("axon_msi: dcr_write(0x%x, 0x%x)\n", val, dcr_n); |
81 | 79 | ||
82 | dcr_write(msic->dcr_host, msic->dcr_base + dcr_n, val); | 80 | dcr_write(msic->dcr_host, msic->dcr_host.base + dcr_n, val); |
83 | } | 81 | } |
84 | 82 | ||
85 | static u32 msic_dcr_read(struct axon_msic *msic, unsigned int dcr_n) | 83 | static u32 msic_dcr_read(struct axon_msic *msic, unsigned int dcr_n) |
86 | { | 84 | { |
87 | return dcr_read(msic->dcr_host, msic->dcr_base + dcr_n); | 85 | return dcr_read(msic->dcr_host, msic->dcr_host.base + dcr_n); |
88 | } | 86 | } |
89 | 87 | ||
90 | static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc) | 88 | static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc) |
@@ -126,7 +124,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev) | |||
126 | const phandle *ph; | 124 | const phandle *ph; |
127 | struct axon_msic *msic = NULL; | 125 | struct axon_msic *msic = NULL; |
128 | 126 | ||
129 | dn = pci_device_to_OF_node(dev); | 127 | dn = of_node_get(pci_device_to_OF_node(dev)); |
130 | if (!dn) { | 128 | if (!dn) { |
131 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); | 129 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); |
132 | return NULL; | 130 | return NULL; |
@@ -183,7 +181,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg) | |||
183 | int len; | 181 | int len; |
184 | const u32 *prop; | 182 | const u32 *prop; |
185 | 183 | ||
186 | dn = pci_device_to_OF_node(dev); | 184 | dn = of_node_get(pci_device_to_OF_node(dev)); |
187 | if (!dn) { | 185 | if (!dn) { |
188 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); | 186 | dev_dbg(&dev->dev, "axon_msi: no pci_dn found\n"); |
189 | return -ENODEV; | 187 | return -ENODEV; |
@@ -295,15 +293,7 @@ static int msic_host_map(struct irq_host *h, unsigned int virq, | |||
295 | return 0; | 293 | return 0; |
296 | } | 294 | } |
297 | 295 | ||
298 | static int msic_host_match(struct irq_host *host, struct device_node *dn) | ||
299 | { | ||
300 | struct axon_msic *msic = host->host_data; | ||
301 | |||
302 | return msic->dn == dn; | ||
303 | } | ||
304 | |||
305 | static struct irq_host_ops msic_host_ops = { | 296 | static struct irq_host_ops msic_host_ops = { |
306 | .match = msic_host_match, | ||
307 | .map = msic_host_map, | 297 | .map = msic_host_map, |
308 | }; | 298 | }; |
309 | 299 | ||
@@ -314,7 +304,8 @@ static int axon_msi_notify_reboot(struct notifier_block *nb, | |||
314 | u32 tmp; | 304 | u32 tmp; |
315 | 305 | ||
316 | list_for_each_entry(msic, &axon_msic_list, list) { | 306 | list_for_each_entry(msic, &axon_msic_list, list) { |
317 | pr_debug("axon_msi: disabling %s\n", msic->dn->full_name); | 307 | pr_debug("axon_msi: disabling %s\n", |
308 | msic->irq_host->of_node->full_name); | ||
318 | tmp = msic_dcr_read(msic, MSIC_CTRL_REG); | 309 | tmp = msic_dcr_read(msic, MSIC_CTRL_REG); |
319 | tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE; | 310 | tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE; |
320 | msic_dcr_write(msic, MSIC_CTRL_REG, tmp); | 311 | msic_dcr_write(msic, MSIC_CTRL_REG, tmp); |
@@ -332,7 +323,7 @@ static int axon_msi_setup_one(struct device_node *dn) | |||
332 | struct page *page; | 323 | struct page *page; |
333 | struct axon_msic *msic; | 324 | struct axon_msic *msic; |
334 | unsigned int virq; | 325 | unsigned int virq; |
335 | int dcr_len; | 326 | int dcr_base, dcr_len; |
336 | 327 | ||
337 | pr_debug("axon_msi: setting up dn %s\n", dn->full_name); | 328 | pr_debug("axon_msi: setting up dn %s\n", dn->full_name); |
338 | 329 | ||
@@ -343,17 +334,17 @@ static int axon_msi_setup_one(struct device_node *dn) | |||
343 | goto out; | 334 | goto out; |
344 | } | 335 | } |
345 | 336 | ||
346 | msic->dcr_base = dcr_resource_start(dn, 0); | 337 | dcr_base = dcr_resource_start(dn, 0); |
347 | dcr_len = dcr_resource_len(dn, 0); | 338 | dcr_len = dcr_resource_len(dn, 0); |
348 | 339 | ||
349 | if (msic->dcr_base == 0 || dcr_len == 0) { | 340 | if (dcr_base == 0 || dcr_len == 0) { |
350 | printk(KERN_ERR | 341 | printk(KERN_ERR |
351 | "axon_msi: couldn't parse dcr properties on %s\n", | 342 | "axon_msi: couldn't parse dcr properties on %s\n", |
352 | dn->full_name); | 343 | dn->full_name); |
353 | goto out; | 344 | goto out; |
354 | } | 345 | } |
355 | 346 | ||
356 | msic->dcr_host = dcr_map(dn, msic->dcr_base, dcr_len); | 347 | msic->dcr_host = dcr_map(dn, dcr_base, dcr_len); |
357 | if (!DCR_MAP_OK(msic->dcr_host)) { | 348 | if (!DCR_MAP_OK(msic->dcr_host)) { |
358 | printk(KERN_ERR "axon_msi: dcr_map failed for %s\n", | 349 | printk(KERN_ERR "axon_msi: dcr_map failed for %s\n", |
359 | dn->full_name); | 350 | dn->full_name); |
@@ -370,8 +361,8 @@ static int axon_msi_setup_one(struct device_node *dn) | |||
370 | 361 | ||
371 | msic->fifo = page_address(page); | 362 | msic->fifo = page_address(page); |
372 | 363 | ||
373 | msic->irq_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, NR_IRQS, | 364 | msic->irq_host = irq_alloc_host(of_node_get(dn), IRQ_HOST_MAP_NOMAP, |
374 | &msic_host_ops, 0); | 365 | NR_IRQS, &msic_host_ops, 0); |
375 | if (!msic->irq_host) { | 366 | if (!msic->irq_host) { |
376 | printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n", | 367 | printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n", |
377 | dn->full_name); | 368 | dn->full_name); |
@@ -387,8 +378,6 @@ static int axon_msi_setup_one(struct device_node *dn) | |||
387 | goto out_free_host; | 378 | goto out_free_host; |
388 | } | 379 | } |
389 | 380 | ||
390 | msic->dn = of_node_get(dn); | ||
391 | |||
392 | set_irq_data(virq, msic); | 381 | set_irq_data(virq, msic); |
393 | set_irq_chained_handler(virq, axon_msi_cascade); | 382 | set_irq_chained_handler(virq, axon_msi_cascade); |
394 | pr_debug("axon_msi: irq 0x%x setup for axon_msi\n", virq); | 383 | pr_debug("axon_msi: irq 0x%x setup for axon_msi\n", virq); |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 47264e722029..c29e634177fa 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -381,7 +381,7 @@ static int __init setup_iic(void) | |||
381 | void __init iic_init_IRQ(void) | 381 | void __init iic_init_IRQ(void) |
382 | { | 382 | { |
383 | /* Setup an irq host data structure */ | 383 | /* Setup an irq host data structure */ |
384 | iic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, IIC_SOURCE_COUNT, | 384 | iic_host = irq_alloc_host(NULL, IRQ_HOST_MAP_LINEAR, IIC_SOURCE_COUNT, |
385 | &iic_host_ops, IIC_IRQ_INVALID); | 385 | &iic_host_ops, IIC_IRQ_INVALID); |
386 | BUG_ON(iic_host == NULL); | 386 | BUG_ON(iic_host == NULL); |
387 | irq_set_default_host(iic_host); | 387 | irq_set_default_host(iic_host); |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 05f4b3d3d756..3f4b4aef756d 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -63,7 +63,6 @@ enum { | |||
63 | 63 | ||
64 | struct spider_pic { | 64 | struct spider_pic { |
65 | struct irq_host *host; | 65 | struct irq_host *host; |
66 | struct device_node *of_node; | ||
67 | void __iomem *regs; | 66 | void __iomem *regs; |
68 | unsigned int node_id; | 67 | unsigned int node_id; |
69 | }; | 68 | }; |
@@ -176,12 +175,6 @@ static struct irq_chip spider_pic = { | |||
176 | .set_type = spider_set_irq_type, | 175 | .set_type = spider_set_irq_type, |
177 | }; | 176 | }; |
178 | 177 | ||
179 | static int spider_host_match(struct irq_host *h, struct device_node *node) | ||
180 | { | ||
181 | struct spider_pic *pic = h->host_data; | ||
182 | return node == pic->of_node; | ||
183 | } | ||
184 | |||
185 | static int spider_host_map(struct irq_host *h, unsigned int virq, | 178 | static int spider_host_map(struct irq_host *h, unsigned int virq, |
186 | irq_hw_number_t hw) | 179 | irq_hw_number_t hw) |
187 | { | 180 | { |
@@ -208,7 +201,6 @@ static int spider_host_xlate(struct irq_host *h, struct device_node *ct, | |||
208 | } | 201 | } |
209 | 202 | ||
210 | static struct irq_host_ops spider_host_ops = { | 203 | static struct irq_host_ops spider_host_ops = { |
211 | .match = spider_host_match, | ||
212 | .map = spider_host_map, | 204 | .map = spider_host_map, |
213 | .xlate = spider_host_xlate, | 205 | .xlate = spider_host_xlate, |
214 | }; | 206 | }; |
@@ -247,18 +239,18 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) | |||
247 | * tree in case the device-tree is ever fixed | 239 | * tree in case the device-tree is ever fixed |
248 | */ | 240 | */ |
249 | struct of_irq oirq; | 241 | struct of_irq oirq; |
250 | if (of_irq_map_one(pic->of_node, 0, &oirq) == 0) { | 242 | if (of_irq_map_one(pic->host->of_node, 0, &oirq) == 0) { |
251 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 243 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, |
252 | oirq.size); | 244 | oirq.size); |
253 | return virq; | 245 | return virq; |
254 | } | 246 | } |
255 | 247 | ||
256 | /* Now do the horrible hacks */ | 248 | /* Now do the horrible hacks */ |
257 | tmp = of_get_property(pic->of_node, "#interrupt-cells", NULL); | 249 | tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); |
258 | if (tmp == NULL) | 250 | if (tmp == NULL) |
259 | return NO_IRQ; | 251 | return NO_IRQ; |
260 | intsize = *tmp; | 252 | intsize = *tmp; |
261 | imap = of_get_property(pic->of_node, "interrupt-map", &imaplen); | 253 | imap = of_get_property(pic->host->of_node, "interrupt-map", &imaplen); |
262 | if (imap == NULL || imaplen < (intsize + 1)) | 254 | if (imap == NULL || imaplen < (intsize + 1)) |
263 | return NO_IRQ; | 255 | return NO_IRQ; |
264 | iic = of_find_node_by_phandle(imap[intsize]); | 256 | iic = of_find_node_by_phandle(imap[intsize]); |
@@ -308,15 +300,13 @@ static void __init spider_init_one(struct device_node *of_node, int chip, | |||
308 | panic("spider_pic: can't map registers !"); | 300 | panic("spider_pic: can't map registers !"); |
309 | 301 | ||
310 | /* Allocate a host */ | 302 | /* Allocate a host */ |
311 | pic->host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, SPIDER_SRC_COUNT, | 303 | pic->host = irq_alloc_host(of_node_get(of_node), IRQ_HOST_MAP_LINEAR, |
312 | &spider_host_ops, SPIDER_IRQ_INVALID); | 304 | SPIDER_SRC_COUNT, &spider_host_ops, |
305 | SPIDER_IRQ_INVALID); | ||
313 | if (pic->host == NULL) | 306 | if (pic->host == NULL) |
314 | panic("spider_pic: can't allocate irq host !"); | 307 | panic("spider_pic: can't allocate irq host !"); |
315 | pic->host->host_data = pic; | 308 | pic->host->host_data = pic; |
316 | 309 | ||
317 | /* Fill out other bits */ | ||
318 | pic->of_node = of_node_get(of_node); | ||
319 | |||
320 | /* Go through all sources and disable them */ | 310 | /* Go through all sources and disable them */ |
321 | for (i = 0; i < SPIDER_SRC_COUNT; i++) { | 311 | for (i = 0; i < SPIDER_SRC_COUNT; i++) { |
322 | void __iomem *cfg = pic->regs + TIR_CFGA + 8 * i; | 312 | void __iomem *cfg = pic->regs + TIR_CFGA + 8 * i; |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 106d2921e2d9..b5a21177bb32 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -458,7 +458,7 @@ static int spu_shutdown(struct sys_device *sysdev) | |||
458 | return 0; | 458 | return 0; |
459 | } | 459 | } |
460 | 460 | ||
461 | struct sysdev_class spu_sysdev_class = { | 461 | static struct sysdev_class spu_sysdev_class = { |
462 | set_kset_name("spu"), | 462 | set_kset_name("spu"), |
463 | .shutdown = spu_shutdown, | 463 | .shutdown = spu_shutdown, |
464 | }; | 464 | }; |
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index 47ec3be3edcd..dceb8b6a9382 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * System call callback functions for SPUs | 2 | * System call callback functions for SPUs |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #define DEBUG | 5 | #undef DEBUG |
6 | 6 | ||
7 | #include <linux/kallsyms.h> | 7 | #include <linux/kallsyms.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
@@ -33,7 +33,7 @@ | |||
33 | * mbind, mq_open, ipc, ... | 33 | * mbind, mq_open, ipc, ... |
34 | */ | 34 | */ |
35 | 35 | ||
36 | void *spu_syscall_table[] = { | 36 | static void *spu_syscall_table[] = { |
37 | #define SYSCALL(func) sys_ni_syscall, | 37 | #define SYSCALL(func) sys_ni_syscall, |
38 | #define COMPAT_SYS(func) sys_ni_syscall, | 38 | #define COMPAT_SYS(func) sys_ni_syscall, |
39 | #define PPC_SYS(func) sys_ni_syscall, | 39 | #define PPC_SYS(func) sys_ni_syscall, |
diff --git a/arch/powerpc/platforms/cell/spu_coredump.c b/arch/powerpc/platforms/cell/spu_coredump.c deleted file mode 100644 index 4fd37ff1e210..000000000000 --- a/arch/powerpc/platforms/cell/spu_coredump.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * SPU core dump code | ||
3 | * | ||
4 | * (C) Copyright 2006 IBM Corp. | ||
5 | * | ||
6 | * Author: Dwayne Grant McConnell <decimal@us.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/file.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/syscalls.h> | ||
26 | |||
27 | #include <asm/spu.h> | ||
28 | |||
29 | static struct spu_coredump_calls *spu_coredump_calls; | ||
30 | static DEFINE_MUTEX(spu_coredump_mutex); | ||
31 | |||
32 | int arch_notes_size(void) | ||
33 | { | ||
34 | long ret; | ||
35 | |||
36 | ret = -ENOSYS; | ||
37 | mutex_lock(&spu_coredump_mutex); | ||
38 | if (spu_coredump_calls && try_module_get(spu_coredump_calls->owner)) { | ||
39 | ret = spu_coredump_calls->arch_notes_size(); | ||
40 | module_put(spu_coredump_calls->owner); | ||
41 | } | ||
42 | mutex_unlock(&spu_coredump_mutex); | ||
43 | return ret; | ||
44 | } | ||
45 | |||
46 | void arch_write_notes(struct file *file) | ||
47 | { | ||
48 | mutex_lock(&spu_coredump_mutex); | ||
49 | if (spu_coredump_calls && try_module_get(spu_coredump_calls->owner)) { | ||
50 | spu_coredump_calls->arch_write_notes(file); | ||
51 | module_put(spu_coredump_calls->owner); | ||
52 | } | ||
53 | mutex_unlock(&spu_coredump_mutex); | ||
54 | } | ||
55 | |||
56 | int register_arch_coredump_calls(struct spu_coredump_calls *calls) | ||
57 | { | ||
58 | int ret = 0; | ||
59 | |||
60 | |||
61 | mutex_lock(&spu_coredump_mutex); | ||
62 | if (spu_coredump_calls) | ||
63 | ret = -EBUSY; | ||
64 | else | ||
65 | spu_coredump_calls = calls; | ||
66 | mutex_unlock(&spu_coredump_mutex); | ||
67 | return ret; | ||
68 | } | ||
69 | EXPORT_SYMBOL_GPL(register_arch_coredump_calls); | ||
70 | |||
71 | void unregister_arch_coredump_calls(struct spu_coredump_calls *calls) | ||
72 | { | ||
73 | BUG_ON(spu_coredump_calls != calls); | ||
74 | |||
75 | mutex_lock(&spu_coredump_mutex); | ||
76 | spu_coredump_calls = NULL; | ||
77 | mutex_unlock(&spu_coredump_mutex); | ||
78 | } | ||
79 | EXPORT_SYMBOL_GPL(unregister_arch_coredump_calls); | ||
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 0e14f532500e..1b010707488d 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -377,10 +377,10 @@ static int qs20_reg_memory[QS20_SPES_PER_BE] = { 1, 1, 0, 0, 0, 0, 0, 0 }; | |||
377 | static struct spu *spu_lookup_reg(int node, u32 reg) | 377 | static struct spu *spu_lookup_reg(int node, u32 reg) |
378 | { | 378 | { |
379 | struct spu *spu; | 379 | struct spu *spu; |
380 | u32 *spu_reg; | 380 | const u32 *spu_reg; |
381 | 381 | ||
382 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { | 382 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { |
383 | spu_reg = (u32*)of_get_property(spu_devnode(spu), "reg", NULL); | 383 | spu_reg = of_get_property(spu_devnode(spu), "reg", NULL); |
384 | if (*spu_reg == reg) | 384 | if (*spu_reg == reg) |
385 | return spu; | 385 | return spu; |
386 | } | 386 | } |
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c index 027ac32cc636..a9438b719fe8 100644 --- a/arch/powerpc/platforms/cell/spu_syscalls.c +++ b/arch/powerpc/platforms/cell/spu_syscalls.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * SPU file system -- system call stubs | 2 | * SPU file system -- system call stubs |
3 | * | 3 | * |
4 | * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 | 4 | * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 |
5 | * (C) Copyright 2006-2007, IBM Corporation | ||
5 | * | 6 | * |
6 | * Author: Arnd Bergmann <arndb@de.ibm.com> | 7 | * Author: Arnd Bergmann <arndb@de.ibm.com> |
7 | * | 8 | * |
@@ -20,44 +21,73 @@ | |||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 22 | */ |
22 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/fs.h> | ||
23 | #include <linux/module.h> | 25 | #include <linux/module.h> |
24 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
27 | #include <linux/rcupdate.h> | ||
25 | 28 | ||
26 | #include <asm/spu.h> | 29 | #include <asm/spu.h> |
27 | 30 | ||
28 | struct spufs_calls spufs_calls = { | 31 | /* protected by rcu */ |
29 | .owner = NULL, | 32 | static struct spufs_calls *spufs_calls; |
30 | }; | ||
31 | 33 | ||
32 | /* These stub syscalls are needed to have the actual implementation | 34 | #ifdef CONFIG_SPU_FS_MODULE |
33 | * within a loadable module. When spufs is built into the kernel, | 35 | |
34 | * this file is not used and the syscalls directly enter the fs code */ | 36 | static inline struct spufs_calls *spufs_calls_get(void) |
37 | { | ||
38 | struct spufs_calls *calls = NULL; | ||
39 | |||
40 | rcu_read_lock(); | ||
41 | calls = rcu_dereference(spufs_calls); | ||
42 | if (calls && !try_module_get(calls->owner)) | ||
43 | calls = NULL; | ||
44 | rcu_read_unlock(); | ||
45 | |||
46 | return calls; | ||
47 | } | ||
48 | |||
49 | static inline void spufs_calls_put(struct spufs_calls *calls) | ||
50 | { | ||
51 | BUG_ON(calls != spufs_calls); | ||
52 | |||
53 | /* we don't need to rcu this, as we hold a reference to the module */ | ||
54 | module_put(spufs_calls->owner); | ||
55 | } | ||
56 | |||
57 | #else /* !defined CONFIG_SPU_FS_MODULE */ | ||
58 | |||
59 | static inline struct spufs_calls *spufs_calls_get(void) | ||
60 | { | ||
61 | return spufs_calls; | ||
62 | } | ||
63 | |||
64 | static inline void spufs_calls_put(struct spufs_calls *calls) { } | ||
65 | |||
66 | #endif /* CONFIG_SPU_FS_MODULE */ | ||
35 | 67 | ||
36 | asmlinkage long sys_spu_create(const char __user *name, | 68 | asmlinkage long sys_spu_create(const char __user *name, |
37 | unsigned int flags, mode_t mode, int neighbor_fd) | 69 | unsigned int flags, mode_t mode, int neighbor_fd) |
38 | { | 70 | { |
39 | long ret; | 71 | long ret; |
40 | struct module *owner = spufs_calls.owner; | ||
41 | struct file *neighbor; | 72 | struct file *neighbor; |
42 | int fput_needed; | 73 | int fput_needed; |
74 | struct spufs_calls *calls; | ||
43 | 75 | ||
44 | ret = -ENOSYS; | 76 | calls = spufs_calls_get(); |
45 | if (owner && try_module_get(owner)) { | 77 | if (!calls) |
46 | if (flags & SPU_CREATE_AFFINITY_SPU) { | 78 | return -ENOSYS; |
47 | neighbor = fget_light(neighbor_fd, &fput_needed); | 79 | |
48 | ret = -EBADF; | 80 | if (flags & SPU_CREATE_AFFINITY_SPU) { |
49 | if (neighbor) { | 81 | ret = -EBADF; |
50 | ret = spufs_calls.create_thread(name, flags, | 82 | neighbor = fget_light(neighbor_fd, &fput_needed); |
51 | mode, neighbor); | 83 | if (neighbor) { |
52 | fput_light(neighbor, fput_needed); | 84 | ret = calls->create_thread(name, flags, mode, neighbor); |
53 | } | 85 | fput_light(neighbor, fput_needed); |
54 | } | ||
55 | else { | ||
56 | ret = spufs_calls.create_thread(name, flags, | ||
57 | mode, NULL); | ||
58 | } | 86 | } |
59 | module_put(owner); | 87 | } else |
60 | } | 88 | ret = calls->create_thread(name, flags, mode, NULL); |
89 | |||
90 | spufs_calls_put(calls); | ||
61 | return ret; | 91 | return ret; |
62 | } | 92 | } |
63 | 93 | ||
@@ -66,37 +96,69 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, __u32 __user *ustatus) | |||
66 | long ret; | 96 | long ret; |
67 | struct file *filp; | 97 | struct file *filp; |
68 | int fput_needed; | 98 | int fput_needed; |
69 | struct module *owner = spufs_calls.owner; | 99 | struct spufs_calls *calls; |
70 | 100 | ||
71 | ret = -ENOSYS; | 101 | calls = spufs_calls_get(); |
72 | if (owner && try_module_get(owner)) { | 102 | if (!calls) |
73 | ret = -EBADF; | 103 | return -ENOSYS; |
74 | filp = fget_light(fd, &fput_needed); | 104 | |
75 | if (filp) { | 105 | ret = -EBADF; |
76 | ret = spufs_calls.spu_run(filp, unpc, ustatus); | 106 | filp = fget_light(fd, &fput_needed); |
77 | fput_light(filp, fput_needed); | 107 | if (filp) { |
78 | } | 108 | ret = calls->spu_run(filp, unpc, ustatus); |
79 | module_put(owner); | 109 | fput_light(filp, fput_needed); |
80 | } | 110 | } |
111 | |||
112 | spufs_calls_put(calls); | ||
113 | return ret; | ||
114 | } | ||
115 | |||
116 | int elf_coredump_extra_notes_size(void) | ||
117 | { | ||
118 | struct spufs_calls *calls; | ||
119 | int ret; | ||
120 | |||
121 | calls = spufs_calls_get(); | ||
122 | if (!calls) | ||
123 | return 0; | ||
124 | |||
125 | ret = calls->coredump_extra_notes_size(); | ||
126 | |||
127 | spufs_calls_put(calls); | ||
128 | |||
129 | return ret; | ||
130 | } | ||
131 | |||
132 | int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset) | ||
133 | { | ||
134 | struct spufs_calls *calls; | ||
135 | int ret; | ||
136 | |||
137 | calls = spufs_calls_get(); | ||
138 | if (!calls) | ||
139 | return 0; | ||
140 | |||
141 | ret = calls->coredump_extra_notes_write(file, foffset); | ||
142 | |||
143 | spufs_calls_put(calls); | ||
144 | |||
81 | return ret; | 145 | return ret; |
82 | } | 146 | } |
83 | 147 | ||
84 | int register_spu_syscalls(struct spufs_calls *calls) | 148 | int register_spu_syscalls(struct spufs_calls *calls) |
85 | { | 149 | { |
86 | if (spufs_calls.owner) | 150 | if (spufs_calls) |
87 | return -EBUSY; | 151 | return -EBUSY; |
88 | 152 | ||
89 | spufs_calls.create_thread = calls->create_thread; | 153 | rcu_assign_pointer(spufs_calls, calls); |
90 | spufs_calls.spu_run = calls->spu_run; | ||
91 | smp_mb(); | ||
92 | spufs_calls.owner = calls->owner; | ||
93 | return 0; | 154 | return 0; |
94 | } | 155 | } |
95 | EXPORT_SYMBOL_GPL(register_spu_syscalls); | 156 | EXPORT_SYMBOL_GPL(register_spu_syscalls); |
96 | 157 | ||
97 | void unregister_spu_syscalls(struct spufs_calls *calls) | 158 | void unregister_spu_syscalls(struct spufs_calls *calls) |
98 | { | 159 | { |
99 | BUG_ON(spufs_calls.owner != calls->owner); | 160 | BUG_ON(spufs_calls->owner != calls->owner); |
100 | spufs_calls.owner = NULL; | 161 | rcu_assign_pointer(spufs_calls, NULL); |
162 | synchronize_rcu(); | ||
101 | } | 163 | } |
102 | EXPORT_SYMBOL_GPL(unregister_spu_syscalls); | 164 | EXPORT_SYMBOL_GPL(unregister_spu_syscalls); |
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c index 5e31799b1e3f..80f62363e1ce 100644 --- a/arch/powerpc/platforms/cell/spufs/coredump.c +++ b/arch/powerpc/platforms/cell/spufs/coredump.c | |||
@@ -31,16 +31,7 @@ | |||
31 | 31 | ||
32 | #include "spufs.h" | 32 | #include "spufs.h" |
33 | 33 | ||
34 | struct spufs_ctx_info { | 34 | static ssize_t do_coredump_read(int num, struct spu_context *ctx, void *buffer, |
35 | struct list_head list; | ||
36 | int dfd; | ||
37 | int memsize; /* in bytes */ | ||
38 | struct spu_context *ctx; | ||
39 | }; | ||
40 | |||
41 | static LIST_HEAD(ctx_info_list); | ||
42 | |||
43 | static ssize_t do_coredump_read(int num, struct spu_context *ctx, void __user *buffer, | ||
44 | size_t size, loff_t *off) | 35 | size_t size, loff_t *off) |
45 | { | 36 | { |
46 | u64 data; | 37 | u64 data; |
@@ -50,49 +41,57 @@ static ssize_t do_coredump_read(int num, struct spu_context *ctx, void __user *b | |||
50 | return spufs_coredump_read[num].read(ctx, buffer, size, off); | 41 | return spufs_coredump_read[num].read(ctx, buffer, size, off); |
51 | 42 | ||
52 | data = spufs_coredump_read[num].get(ctx); | 43 | data = spufs_coredump_read[num].get(ctx); |
53 | ret = copy_to_user(buffer, &data, 8); | 44 | ret = snprintf(buffer, size, "0x%.16lx", data); |
54 | return ret ? -EFAULT : 8; | 45 | if (ret >= size) |
46 | return size; | ||
47 | return ++ret; /* count trailing NULL */ | ||
55 | } | 48 | } |
56 | 49 | ||
57 | /* | 50 | /* |
58 | * These are the only things you should do on a core-file: use only these | 51 | * These are the only things you should do on a core-file: use only these |
59 | * functions to write out all the necessary info. | 52 | * functions to write out all the necessary info. |
60 | */ | 53 | */ |
61 | static int spufs_dump_write(struct file *file, const void *addr, int nr) | 54 | static int spufs_dump_write(struct file *file, const void *addr, int nr, loff_t *foffset) |
62 | { | 55 | { |
63 | return file->f_op->write(file, addr, nr, &file->f_pos) == nr; | 56 | unsigned long limit = current->signal->rlim[RLIMIT_CORE].rlim_cur; |
64 | } | 57 | ssize_t written; |
65 | 58 | ||
66 | static int spufs_dump_seek(struct file *file, loff_t off) | 59 | if (*foffset + nr > limit) |
67 | { | 60 | return -EIO; |
68 | if (file->f_op->llseek) { | 61 | |
69 | if (file->f_op->llseek(file, off, 0) != off) | 62 | written = file->f_op->write(file, addr, nr, &file->f_pos); |
70 | return 0; | 63 | *foffset += written; |
71 | } else | 64 | |
72 | file->f_pos = off; | 65 | if (written != nr) |
73 | return 1; | 66 | return -EIO; |
67 | |||
68 | return 0; | ||
74 | } | 69 | } |
75 | 70 | ||
76 | static void spufs_fill_memsize(struct spufs_ctx_info *ctx_info) | 71 | static int spufs_dump_align(struct file *file, char *buf, loff_t new_off, |
72 | loff_t *foffset) | ||
77 | { | 73 | { |
78 | struct spu_context *ctx; | 74 | int rc, size; |
79 | unsigned long long lslr; | 75 | |
76 | size = min((loff_t)PAGE_SIZE, new_off - *foffset); | ||
77 | memset(buf, 0, size); | ||
78 | |||
79 | rc = 0; | ||
80 | while (rc == 0 && new_off > *foffset) { | ||
81 | size = min((loff_t)PAGE_SIZE, new_off - *foffset); | ||
82 | rc = spufs_dump_write(file, buf, size, foffset); | ||
83 | } | ||
80 | 84 | ||
81 | ctx = ctx_info->ctx; | 85 | return rc; |
82 | lslr = ctx->csa.priv2.spu_lslr_RW; | ||
83 | ctx_info->memsize = lslr + 1; | ||
84 | } | 86 | } |
85 | 87 | ||
86 | static int spufs_ctx_note_size(struct spufs_ctx_info *ctx_info) | 88 | static int spufs_ctx_note_size(struct spu_context *ctx, int dfd) |
87 | { | 89 | { |
88 | int dfd, memsize, i, sz, total = 0; | 90 | int i, sz, total = 0; |
89 | char *name; | 91 | char *name; |
90 | char fullname[80]; | 92 | char fullname[80]; |
91 | 93 | ||
92 | dfd = ctx_info->dfd; | 94 | for (i = 0; spufs_coredump_read[i].name != NULL; i++) { |
93 | memsize = ctx_info->memsize; | ||
94 | |||
95 | for (i = 0; spufs_coredump_read[i].name; i++) { | ||
96 | name = spufs_coredump_read[i].name; | 95 | name = spufs_coredump_read[i].name; |
97 | sz = spufs_coredump_read[i].size; | 96 | sz = spufs_coredump_read[i].size; |
98 | 97 | ||
@@ -100,39 +99,12 @@ static int spufs_ctx_note_size(struct spufs_ctx_info *ctx_info) | |||
100 | 99 | ||
101 | total += sizeof(struct elf_note); | 100 | total += sizeof(struct elf_note); |
102 | total += roundup(strlen(fullname) + 1, 4); | 101 | total += roundup(strlen(fullname) + 1, 4); |
103 | if (!strcmp(name, "mem")) | 102 | total += roundup(sz, 4); |
104 | total += roundup(memsize, 4); | ||
105 | else | ||
106 | total += roundup(sz, 4); | ||
107 | } | 103 | } |
108 | 104 | ||
109 | return total; | 105 | return total; |
110 | } | 106 | } |
111 | 107 | ||
112 | static int spufs_add_one_context(struct file *file, int dfd) | ||
113 | { | ||
114 | struct spu_context *ctx; | ||
115 | struct spufs_ctx_info *ctx_info; | ||
116 | int size; | ||
117 | |||
118 | ctx = SPUFS_I(file->f_dentry->d_inode)->i_ctx; | ||
119 | if (ctx->flags & SPU_CREATE_NOSCHED) | ||
120 | return 0; | ||
121 | |||
122 | ctx_info = kzalloc(sizeof(*ctx_info), GFP_KERNEL); | ||
123 | if (unlikely(!ctx_info)) | ||
124 | return -ENOMEM; | ||
125 | |||
126 | ctx_info->dfd = dfd; | ||
127 | ctx_info->ctx = ctx; | ||
128 | |||
129 | spufs_fill_memsize(ctx_info); | ||
130 | |||
131 | size = spufs_ctx_note_size(ctx_info); | ||
132 | list_add(&ctx_info->list, &ctx_info_list); | ||
133 | return size; | ||
134 | } | ||
135 | |||
136 | /* | 108 | /* |
137 | * The additional architecture-specific notes for Cell are various | 109 | * The additional architecture-specific notes for Cell are various |
138 | * context files in the spu context. | 110 | * context files in the spu context. |
@@ -142,33 +114,57 @@ static int spufs_add_one_context(struct file *file, int dfd) | |||
142 | * internal functionality to dump them without needing to actually | 114 | * internal functionality to dump them without needing to actually |
143 | * open the files. | 115 | * open the files. |
144 | */ | 116 | */ |
145 | static int spufs_arch_notes_size(void) | 117 | static struct spu_context *coredump_next_context(int *fd) |
146 | { | 118 | { |
147 | struct fdtable *fdt = files_fdtable(current->files); | 119 | struct fdtable *fdt = files_fdtable(current->files); |
148 | int size = 0, fd; | 120 | struct file *file; |
121 | struct spu_context *ctx = NULL; | ||
149 | 122 | ||
150 | for (fd = 0; fd < fdt->max_fds; fd++) { | 123 | for (; *fd < fdt->max_fds; (*fd)++) { |
151 | if (FD_ISSET(fd, fdt->open_fds)) { | 124 | if (!FD_ISSET(*fd, fdt->open_fds)) |
152 | struct file *file = fcheck(fd); | 125 | continue; |
153 | 126 | ||
154 | if (file && file->f_op == &spufs_context_fops) { | 127 | file = fcheck(*fd); |
155 | int rval = spufs_add_one_context(file, fd); | 128 | |
156 | if (rval < 0) | 129 | if (!file || file->f_op != &spufs_context_fops) |
157 | break; | 130 | continue; |
158 | size += rval; | 131 | |
159 | } | 132 | ctx = SPUFS_I(file->f_dentry->d_inode)->i_ctx; |
160 | } | 133 | if (ctx->flags & SPU_CREATE_NOSCHED) |
134 | continue; | ||
135 | |||
136 | /* start searching the next fd next time we're called */ | ||
137 | (*fd)++; | ||
138 | break; | ||
161 | } | 139 | } |
162 | 140 | ||
163 | return size; | 141 | return ctx; |
164 | } | 142 | } |
165 | 143 | ||
166 | static void spufs_arch_write_note(struct spufs_ctx_info *ctx_info, int i, | 144 | int spufs_coredump_extra_notes_size(void) |
167 | struct file *file) | ||
168 | { | 145 | { |
169 | struct spu_context *ctx; | 146 | struct spu_context *ctx; |
147 | int size = 0, rc, fd; | ||
148 | |||
149 | fd = 0; | ||
150 | while ((ctx = coredump_next_context(&fd)) != NULL) { | ||
151 | spu_acquire_saved(ctx); | ||
152 | rc = spufs_ctx_note_size(ctx, fd); | ||
153 | spu_release_saved(ctx); | ||
154 | if (rc < 0) | ||
155 | break; | ||
156 | |||
157 | size += rc; | ||
158 | } | ||
159 | |||
160 | return size; | ||
161 | } | ||
162 | |||
163 | static int spufs_arch_write_note(struct spu_context *ctx, int i, | ||
164 | struct file *file, int dfd, loff_t *foffset) | ||
165 | { | ||
170 | loff_t pos = 0; | 166 | loff_t pos = 0; |
171 | int sz, dfd, rc, total = 0; | 167 | int sz, rc, nread, total = 0; |
172 | const int bufsz = PAGE_SIZE; | 168 | const int bufsz = PAGE_SIZE; |
173 | char *name; | 169 | char *name; |
174 | char fullname[80], *buf; | 170 | char fullname[80], *buf; |
@@ -176,64 +172,70 @@ static void spufs_arch_write_note(struct spufs_ctx_info *ctx_info, int i, | |||
176 | 172 | ||
177 | buf = (void *)get_zeroed_page(GFP_KERNEL); | 173 | buf = (void *)get_zeroed_page(GFP_KERNEL); |
178 | if (!buf) | 174 | if (!buf) |
179 | return; | 175 | return -ENOMEM; |
180 | 176 | ||
181 | dfd = ctx_info->dfd; | ||
182 | name = spufs_coredump_read[i].name; | 177 | name = spufs_coredump_read[i].name; |
183 | 178 | sz = spufs_coredump_read[i].size; | |
184 | if (!strcmp(name, "mem")) | ||
185 | sz = ctx_info->memsize; | ||
186 | else | ||
187 | sz = spufs_coredump_read[i].size; | ||
188 | |||
189 | ctx = ctx_info->ctx; | ||
190 | if (!ctx) | ||
191 | goto out; | ||
192 | 179 | ||
193 | sprintf(fullname, "SPU/%d/%s", dfd, name); | 180 | sprintf(fullname, "SPU/%d/%s", dfd, name); |
194 | en.n_namesz = strlen(fullname) + 1; | 181 | en.n_namesz = strlen(fullname) + 1; |
195 | en.n_descsz = sz; | 182 | en.n_descsz = sz; |
196 | en.n_type = NT_SPU; | 183 | en.n_type = NT_SPU; |
197 | 184 | ||
198 | if (!spufs_dump_write(file, &en, sizeof(en))) | 185 | rc = spufs_dump_write(file, &en, sizeof(en), foffset); |
186 | if (rc) | ||
199 | goto out; | 187 | goto out; |
200 | if (!spufs_dump_write(file, fullname, en.n_namesz)) | 188 | |
189 | rc = spufs_dump_write(file, fullname, en.n_namesz, foffset); | ||
190 | if (rc) | ||
201 | goto out; | 191 | goto out; |
202 | if (!spufs_dump_seek(file, roundup((unsigned long)file->f_pos, 4))) | 192 | |
193 | rc = spufs_dump_align(file, buf, roundup(*foffset, 4), foffset); | ||
194 | if (rc) | ||
203 | goto out; | 195 | goto out; |
204 | 196 | ||
205 | do { | 197 | do { |
206 | rc = do_coredump_read(i, ctx, buf, bufsz, &pos); | 198 | nread = do_coredump_read(i, ctx, buf, bufsz, &pos); |
207 | if (rc > 0) { | 199 | if (nread > 0) { |
208 | if (!spufs_dump_write(file, buf, rc)) | 200 | rc = spufs_dump_write(file, buf, nread, foffset); |
201 | if (rc) | ||
209 | goto out; | 202 | goto out; |
210 | total += rc; | 203 | total += nread; |
211 | } | 204 | } |
212 | } while (rc == bufsz && total < sz); | 205 | } while (nread == bufsz && total < sz); |
206 | |||
207 | if (nread < 0) { | ||
208 | rc = nread; | ||
209 | goto out; | ||
210 | } | ||
211 | |||
212 | rc = spufs_dump_align(file, buf, roundup(*foffset - total + sz, 4), | ||
213 | foffset); | ||
213 | 214 | ||
214 | spufs_dump_seek(file, roundup((unsigned long)file->f_pos | ||
215 | - total + sz, 4)); | ||
216 | out: | 215 | out: |
217 | free_page((unsigned long)buf); | 216 | free_page((unsigned long)buf); |
217 | return rc; | ||
218 | } | 218 | } |
219 | 219 | ||
220 | static void spufs_arch_write_notes(struct file *file) | 220 | int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset) |
221 | { | 221 | { |
222 | int j; | 222 | struct spu_context *ctx; |
223 | struct spufs_ctx_info *ctx_info, *next; | 223 | int fd, j, rc; |
224 | 224 | ||
225 | list_for_each_entry_safe(ctx_info, next, &ctx_info_list, list) { | 225 | fd = 0; |
226 | spu_acquire_saved(ctx_info->ctx); | 226 | while ((ctx = coredump_next_context(&fd)) != NULL) { |
227 | for (j = 0; j < spufs_coredump_num_notes; j++) | 227 | spu_acquire_saved(ctx); |
228 | spufs_arch_write_note(ctx_info, j, file); | 228 | |
229 | spu_release_saved(ctx_info->ctx); | 229 | for (j = 0; spufs_coredump_read[j].name != NULL; j++) { |
230 | list_del(&ctx_info->list); | 230 | rc = spufs_arch_write_note(ctx, j, file, fd, foffset); |
231 | kfree(ctx_info); | 231 | if (rc) { |
232 | spu_release_saved(ctx); | ||
233 | return rc; | ||
234 | } | ||
235 | } | ||
236 | |||
237 | spu_release_saved(ctx); | ||
232 | } | 238 | } |
233 | } | ||
234 | 239 | ||
235 | struct spu_coredump_calls spufs_coredump_calls = { | 240 | return 0; |
236 | .arch_notes_size = spufs_arch_notes_size, | 241 | } |
237 | .arch_write_notes = spufs_arch_write_notes, | ||
238 | .owner = THIS_MODULE, | ||
239 | }; | ||
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 7de4e919687b..d72b16d6816e 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -199,9 +199,9 @@ static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) | |||
199 | } | 199 | } |
200 | 200 | ||
201 | #ifdef CONFIG_SPU_FS_64K_LS | 201 | #ifdef CONFIG_SPU_FS_64K_LS |
202 | unsigned long spufs_get_unmapped_area(struct file *file, unsigned long addr, | 202 | static unsigned long spufs_get_unmapped_area(struct file *file, |
203 | unsigned long len, unsigned long pgoff, | 203 | unsigned long addr, unsigned long len, unsigned long pgoff, |
204 | unsigned long flags) | 204 | unsigned long flags) |
205 | { | 205 | { |
206 | struct spu_context *ctx = file->private_data; | 206 | struct spu_context *ctx = file->private_data; |
207 | struct spu_state *csa = &ctx->csa; | 207 | struct spu_state *csa = &ctx->csa; |
@@ -1076,6 +1076,36 @@ static const struct file_operations spufs_signal2_nosched_fops = { | |||
1076 | .mmap = spufs_signal2_mmap, | 1076 | .mmap = spufs_signal2_mmap, |
1077 | }; | 1077 | }; |
1078 | 1078 | ||
1079 | /* | ||
1080 | * This is a wrapper around DEFINE_SIMPLE_ATTRIBUTE which does the | ||
1081 | * work of acquiring (or not) the SPU context before calling through | ||
1082 | * to the actual get routine. The set routine is called directly. | ||
1083 | */ | ||
1084 | #define SPU_ATTR_NOACQUIRE 0 | ||
1085 | #define SPU_ATTR_ACQUIRE 1 | ||
1086 | #define SPU_ATTR_ACQUIRE_SAVED 2 | ||
1087 | |||
1088 | #define DEFINE_SPUFS_ATTRIBUTE(__name, __get, __set, __fmt, __acquire) \ | ||
1089 | static u64 __##__get(void *data) \ | ||
1090 | { \ | ||
1091 | struct spu_context *ctx = data; \ | ||
1092 | u64 ret; \ | ||
1093 | \ | ||
1094 | if (__acquire == SPU_ATTR_ACQUIRE) { \ | ||
1095 | spu_acquire(ctx); \ | ||
1096 | ret = __get(ctx); \ | ||
1097 | spu_release(ctx); \ | ||
1098 | } else if (__acquire == SPU_ATTR_ACQUIRE_SAVED) { \ | ||
1099 | spu_acquire_saved(ctx); \ | ||
1100 | ret = __get(ctx); \ | ||
1101 | spu_release_saved(ctx); \ | ||
1102 | } else \ | ||
1103 | ret = __get(ctx); \ | ||
1104 | \ | ||
1105 | return ret; \ | ||
1106 | } \ | ||
1107 | DEFINE_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt); | ||
1108 | |||
1079 | static void spufs_signal1_type_set(void *data, u64 val) | 1109 | static void spufs_signal1_type_set(void *data, u64 val) |
1080 | { | 1110 | { |
1081 | struct spu_context *ctx = data; | 1111 | struct spu_context *ctx = data; |
@@ -1085,25 +1115,13 @@ static void spufs_signal1_type_set(void *data, u64 val) | |||
1085 | spu_release(ctx); | 1115 | spu_release(ctx); |
1086 | } | 1116 | } |
1087 | 1117 | ||
1088 | static u64 __spufs_signal1_type_get(void *data) | 1118 | static u64 spufs_signal1_type_get(struct spu_context *ctx) |
1089 | { | 1119 | { |
1090 | struct spu_context *ctx = data; | ||
1091 | return ctx->ops->signal1_type_get(ctx); | 1120 | return ctx->ops->signal1_type_get(ctx); |
1092 | } | 1121 | } |
1122 | DEFINE_SPUFS_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get, | ||
1123 | spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE); | ||
1093 | 1124 | ||
1094 | static u64 spufs_signal1_type_get(void *data) | ||
1095 | { | ||
1096 | struct spu_context *ctx = data; | ||
1097 | u64 ret; | ||
1098 | |||
1099 | spu_acquire(ctx); | ||
1100 | ret = __spufs_signal1_type_get(data); | ||
1101 | spu_release(ctx); | ||
1102 | |||
1103 | return ret; | ||
1104 | } | ||
1105 | DEFINE_SIMPLE_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get, | ||
1106 | spufs_signal1_type_set, "%llu"); | ||
1107 | 1125 | ||
1108 | static void spufs_signal2_type_set(void *data, u64 val) | 1126 | static void spufs_signal2_type_set(void *data, u64 val) |
1109 | { | 1127 | { |
@@ -1114,25 +1132,12 @@ static void spufs_signal2_type_set(void *data, u64 val) | |||
1114 | spu_release(ctx); | 1132 | spu_release(ctx); |
1115 | } | 1133 | } |
1116 | 1134 | ||
1117 | static u64 __spufs_signal2_type_get(void *data) | 1135 | static u64 spufs_signal2_type_get(struct spu_context *ctx) |
1118 | { | 1136 | { |
1119 | struct spu_context *ctx = data; | ||
1120 | return ctx->ops->signal2_type_get(ctx); | 1137 | return ctx->ops->signal2_type_get(ctx); |
1121 | } | 1138 | } |
1122 | 1139 | DEFINE_SPUFS_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get, | |
1123 | static u64 spufs_signal2_type_get(void *data) | 1140 | spufs_signal2_type_set, "%llu", SPU_ATTR_ACQUIRE); |
1124 | { | ||
1125 | struct spu_context *ctx = data; | ||
1126 | u64 ret; | ||
1127 | |||
1128 | spu_acquire(ctx); | ||
1129 | ret = __spufs_signal2_type_get(data); | ||
1130 | spu_release(ctx); | ||
1131 | |||
1132 | return ret; | ||
1133 | } | ||
1134 | DEFINE_SIMPLE_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get, | ||
1135 | spufs_signal2_type_set, "%llu"); | ||
1136 | 1141 | ||
1137 | #if SPUFS_MMAP_4K | 1142 | #if SPUFS_MMAP_4K |
1138 | static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma, | 1143 | static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma, |
@@ -1608,17 +1613,12 @@ static void spufs_npc_set(void *data, u64 val) | |||
1608 | spu_release(ctx); | 1613 | spu_release(ctx); |
1609 | } | 1614 | } |
1610 | 1615 | ||
1611 | static u64 spufs_npc_get(void *data) | 1616 | static u64 spufs_npc_get(struct spu_context *ctx) |
1612 | { | 1617 | { |
1613 | struct spu_context *ctx = data; | 1618 | return ctx->ops->npc_read(ctx); |
1614 | u64 ret; | ||
1615 | spu_acquire(ctx); | ||
1616 | ret = ctx->ops->npc_read(ctx); | ||
1617 | spu_release(ctx); | ||
1618 | return ret; | ||
1619 | } | 1619 | } |
1620 | DEFINE_SIMPLE_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set, | 1620 | DEFINE_SPUFS_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set, |
1621 | "0x%llx\n") | 1621 | "0x%llx\n", SPU_ATTR_ACQUIRE); |
1622 | 1622 | ||
1623 | static void spufs_decr_set(void *data, u64 val) | 1623 | static void spufs_decr_set(void *data, u64 val) |
1624 | { | 1624 | { |
@@ -1629,24 +1629,13 @@ static void spufs_decr_set(void *data, u64 val) | |||
1629 | spu_release_saved(ctx); | 1629 | spu_release_saved(ctx); |
1630 | } | 1630 | } |
1631 | 1631 | ||
1632 | static u64 __spufs_decr_get(void *data) | 1632 | static u64 spufs_decr_get(struct spu_context *ctx) |
1633 | { | 1633 | { |
1634 | struct spu_context *ctx = data; | ||
1635 | struct spu_lscsa *lscsa = ctx->csa.lscsa; | 1634 | struct spu_lscsa *lscsa = ctx->csa.lscsa; |
1636 | return lscsa->decr.slot[0]; | 1635 | return lscsa->decr.slot[0]; |
1637 | } | 1636 | } |
1638 | 1637 | DEFINE_SPUFS_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set, | |
1639 | static u64 spufs_decr_get(void *data) | 1638 | "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED); |
1640 | { | ||
1641 | struct spu_context *ctx = data; | ||
1642 | u64 ret; | ||
1643 | spu_acquire_saved(ctx); | ||
1644 | ret = __spufs_decr_get(data); | ||
1645 | spu_release_saved(ctx); | ||
1646 | return ret; | ||
1647 | } | ||
1648 | DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set, | ||
1649 | "0x%llx\n") | ||
1650 | 1639 | ||
1651 | static void spufs_decr_status_set(void *data, u64 val) | 1640 | static void spufs_decr_status_set(void *data, u64 val) |
1652 | { | 1641 | { |
@@ -1659,26 +1648,16 @@ static void spufs_decr_status_set(void *data, u64 val) | |||
1659 | spu_release_saved(ctx); | 1648 | spu_release_saved(ctx); |
1660 | } | 1649 | } |
1661 | 1650 | ||
1662 | static u64 __spufs_decr_status_get(void *data) | 1651 | static u64 spufs_decr_status_get(struct spu_context *ctx) |
1663 | { | 1652 | { |
1664 | struct spu_context *ctx = data; | ||
1665 | if (ctx->csa.priv2.mfc_control_RW & MFC_CNTL_DECREMENTER_RUNNING) | 1653 | if (ctx->csa.priv2.mfc_control_RW & MFC_CNTL_DECREMENTER_RUNNING) |
1666 | return SPU_DECR_STATUS_RUNNING; | 1654 | return SPU_DECR_STATUS_RUNNING; |
1667 | else | 1655 | else |
1668 | return 0; | 1656 | return 0; |
1669 | } | 1657 | } |
1670 | 1658 | DEFINE_SPUFS_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get, | |
1671 | static u64 spufs_decr_status_get(void *data) | 1659 | spufs_decr_status_set, "0x%llx\n", |
1672 | { | 1660 | SPU_ATTR_ACQUIRE_SAVED); |
1673 | struct spu_context *ctx = data; | ||
1674 | u64 ret; | ||
1675 | spu_acquire_saved(ctx); | ||
1676 | ret = __spufs_decr_status_get(data); | ||
1677 | spu_release_saved(ctx); | ||
1678 | return ret; | ||
1679 | } | ||
1680 | DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get, | ||
1681 | spufs_decr_status_set, "0x%llx\n") | ||
1682 | 1661 | ||
1683 | static void spufs_event_mask_set(void *data, u64 val) | 1662 | static void spufs_event_mask_set(void *data, u64 val) |
1684 | { | 1663 | { |
@@ -1689,28 +1668,18 @@ static void spufs_event_mask_set(void *data, u64 val) | |||
1689 | spu_release_saved(ctx); | 1668 | spu_release_saved(ctx); |
1690 | } | 1669 | } |
1691 | 1670 | ||
1692 | static u64 __spufs_event_mask_get(void *data) | 1671 | static u64 spufs_event_mask_get(struct spu_context *ctx) |
1693 | { | 1672 | { |
1694 | struct spu_context *ctx = data; | ||
1695 | struct spu_lscsa *lscsa = ctx->csa.lscsa; | 1673 | struct spu_lscsa *lscsa = ctx->csa.lscsa; |
1696 | return lscsa->event_mask.slot[0]; | 1674 | return lscsa->event_mask.slot[0]; |
1697 | } | 1675 | } |
1698 | 1676 | ||
1699 | static u64 spufs_event_mask_get(void *data) | 1677 | DEFINE_SPUFS_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get, |
1700 | { | 1678 | spufs_event_mask_set, "0x%llx\n", |
1701 | struct spu_context *ctx = data; | 1679 | SPU_ATTR_ACQUIRE_SAVED); |
1702 | u64 ret; | ||
1703 | spu_acquire_saved(ctx); | ||
1704 | ret = __spufs_event_mask_get(data); | ||
1705 | spu_release_saved(ctx); | ||
1706 | return ret; | ||
1707 | } | ||
1708 | DEFINE_SIMPLE_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get, | ||
1709 | spufs_event_mask_set, "0x%llx\n") | ||
1710 | 1680 | ||
1711 | static u64 __spufs_event_status_get(void *data) | 1681 | static u64 spufs_event_status_get(struct spu_context *ctx) |
1712 | { | 1682 | { |
1713 | struct spu_context *ctx = data; | ||
1714 | struct spu_state *state = &ctx->csa; | 1683 | struct spu_state *state = &ctx->csa; |
1715 | u64 stat; | 1684 | u64 stat; |
1716 | stat = state->spu_chnlcnt_RW[0]; | 1685 | stat = state->spu_chnlcnt_RW[0]; |
@@ -1718,19 +1687,8 @@ static u64 __spufs_event_status_get(void *data) | |||
1718 | return state->spu_chnldata_RW[0]; | 1687 | return state->spu_chnldata_RW[0]; |
1719 | return 0; | 1688 | return 0; |
1720 | } | 1689 | } |
1721 | 1690 | DEFINE_SPUFS_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get, | |
1722 | static u64 spufs_event_status_get(void *data) | 1691 | NULL, "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED) |
1723 | { | ||
1724 | struct spu_context *ctx = data; | ||
1725 | u64 ret = 0; | ||
1726 | |||
1727 | spu_acquire_saved(ctx); | ||
1728 | ret = __spufs_event_status_get(data); | ||
1729 | spu_release_saved(ctx); | ||
1730 | return ret; | ||
1731 | } | ||
1732 | DEFINE_SIMPLE_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get, | ||
1733 | NULL, "0x%llx\n") | ||
1734 | 1692 | ||
1735 | static void spufs_srr0_set(void *data, u64 val) | 1693 | static void spufs_srr0_set(void *data, u64 val) |
1736 | { | 1694 | { |
@@ -1741,45 +1699,32 @@ static void spufs_srr0_set(void *data, u64 val) | |||
1741 | spu_release_saved(ctx); | 1699 | spu_release_saved(ctx); |
1742 | } | 1700 | } |
1743 | 1701 | ||
1744 | static u64 spufs_srr0_get(void *data) | 1702 | static u64 spufs_srr0_get(struct spu_context *ctx) |
1745 | { | 1703 | { |
1746 | struct spu_context *ctx = data; | ||
1747 | struct spu_lscsa *lscsa = ctx->csa.lscsa; | 1704 | struct spu_lscsa *lscsa = ctx->csa.lscsa; |
1748 | u64 ret; | 1705 | return lscsa->srr0.slot[0]; |
1749 | spu_acquire_saved(ctx); | ||
1750 | ret = lscsa->srr0.slot[0]; | ||
1751 | spu_release_saved(ctx); | ||
1752 | return ret; | ||
1753 | } | 1706 | } |
1754 | DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set, | 1707 | DEFINE_SPUFS_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set, |
1755 | "0x%llx\n") | 1708 | "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED) |
1756 | 1709 | ||
1757 | static u64 spufs_id_get(void *data) | 1710 | static u64 spufs_id_get(struct spu_context *ctx) |
1758 | { | 1711 | { |
1759 | struct spu_context *ctx = data; | ||
1760 | u64 num; | 1712 | u64 num; |
1761 | 1713 | ||
1762 | spu_acquire(ctx); | ||
1763 | if (ctx->state == SPU_STATE_RUNNABLE) | 1714 | if (ctx->state == SPU_STATE_RUNNABLE) |
1764 | num = ctx->spu->number; | 1715 | num = ctx->spu->number; |
1765 | else | 1716 | else |
1766 | num = (unsigned int)-1; | 1717 | num = (unsigned int)-1; |
1767 | spu_release(ctx); | ||
1768 | 1718 | ||
1769 | return num; | 1719 | return num; |
1770 | } | 1720 | } |
1771 | DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, NULL, "0x%llx\n") | 1721 | DEFINE_SPUFS_ATTRIBUTE(spufs_id_ops, spufs_id_get, NULL, "0x%llx\n", |
1772 | 1722 | SPU_ATTR_ACQUIRE) | |
1773 | static u64 __spufs_object_id_get(void *data) | ||
1774 | { | ||
1775 | struct spu_context *ctx = data; | ||
1776 | return ctx->object_id; | ||
1777 | } | ||
1778 | 1723 | ||
1779 | static u64 spufs_object_id_get(void *data) | 1724 | static u64 spufs_object_id_get(struct spu_context *ctx) |
1780 | { | 1725 | { |
1781 | /* FIXME: Should there really be no locking here? */ | 1726 | /* FIXME: Should there really be no locking here? */ |
1782 | return __spufs_object_id_get(data); | 1727 | return ctx->object_id; |
1783 | } | 1728 | } |
1784 | 1729 | ||
1785 | static void spufs_object_id_set(void *data, u64 id) | 1730 | static void spufs_object_id_set(void *data, u64 id) |
@@ -1788,27 +1733,15 @@ static void spufs_object_id_set(void *data, u64 id) | |||
1788 | ctx->object_id = id; | 1733 | ctx->object_id = id; |
1789 | } | 1734 | } |
1790 | 1735 | ||
1791 | DEFINE_SIMPLE_ATTRIBUTE(spufs_object_id_ops, spufs_object_id_get, | 1736 | DEFINE_SPUFS_ATTRIBUTE(spufs_object_id_ops, spufs_object_id_get, |
1792 | spufs_object_id_set, "0x%llx\n"); | 1737 | spufs_object_id_set, "0x%llx\n", SPU_ATTR_NOACQUIRE); |
1793 | 1738 | ||
1794 | static u64 __spufs_lslr_get(void *data) | 1739 | static u64 spufs_lslr_get(struct spu_context *ctx) |
1795 | { | 1740 | { |
1796 | struct spu_context *ctx = data; | ||
1797 | return ctx->csa.priv2.spu_lslr_RW; | 1741 | return ctx->csa.priv2.spu_lslr_RW; |
1798 | } | 1742 | } |
1799 | 1743 | DEFINE_SPUFS_ATTRIBUTE(spufs_lslr_ops, spufs_lslr_get, NULL, "0x%llx\n", | |
1800 | static u64 spufs_lslr_get(void *data) | 1744 | SPU_ATTR_ACQUIRE_SAVED); |
1801 | { | ||
1802 | struct spu_context *ctx = data; | ||
1803 | u64 ret; | ||
1804 | |||
1805 | spu_acquire_saved(ctx); | ||
1806 | ret = __spufs_lslr_get(data); | ||
1807 | spu_release_saved(ctx); | ||
1808 | |||
1809 | return ret; | ||
1810 | } | ||
1811 | DEFINE_SIMPLE_ATTRIBUTE(spufs_lslr_ops, spufs_lslr_get, NULL, "0x%llx\n") | ||
1812 | 1745 | ||
1813 | static int spufs_info_open(struct inode *inode, struct file *file) | 1746 | static int spufs_info_open(struct inode *inode, struct file *file) |
1814 | { | 1747 | { |
@@ -2231,25 +2164,25 @@ struct tree_descr spufs_dir_nosched_contents[] = { | |||
2231 | }; | 2164 | }; |
2232 | 2165 | ||
2233 | struct spufs_coredump_reader spufs_coredump_read[] = { | 2166 | struct spufs_coredump_reader spufs_coredump_read[] = { |
2234 | { "regs", __spufs_regs_read, NULL, 128 * 16 }, | 2167 | { "regs", __spufs_regs_read, NULL, sizeof(struct spu_reg128[128])}, |
2235 | { "fpcr", __spufs_fpcr_read, NULL, 16 }, | 2168 | { "fpcr", __spufs_fpcr_read, NULL, sizeof(struct spu_reg128) }, |
2236 | { "lslr", NULL, __spufs_lslr_get, 11 }, | 2169 | { "lslr", NULL, spufs_lslr_get, 19 }, |
2237 | { "decr", NULL, __spufs_decr_get, 11 }, | 2170 | { "decr", NULL, spufs_decr_get, 19 }, |
2238 | { "decr_status", NULL, __spufs_decr_status_get, 11 }, | 2171 | { "decr_status", NULL, spufs_decr_status_get, 19 }, |
2239 | { "mem", __spufs_mem_read, NULL, 256 * 1024, }, | 2172 | { "mem", __spufs_mem_read, NULL, LS_SIZE, }, |
2240 | { "signal1", __spufs_signal1_read, NULL, 4 }, | 2173 | { "signal1", __spufs_signal1_read, NULL, sizeof(u32) }, |
2241 | { "signal1_type", NULL, __spufs_signal1_type_get, 2 }, | 2174 | { "signal1_type", NULL, spufs_signal1_type_get, 19 }, |
2242 | { "signal2", __spufs_signal2_read, NULL, 4 }, | 2175 | { "signal2", __spufs_signal2_read, NULL, sizeof(u32) }, |
2243 | { "signal2_type", NULL, __spufs_signal2_type_get, 2 }, | 2176 | { "signal2_type", NULL, spufs_signal2_type_get, 19 }, |
2244 | { "event_mask", NULL, __spufs_event_mask_get, 8 }, | 2177 | { "event_mask", NULL, spufs_event_mask_get, 19 }, |
2245 | { "event_status", NULL, __spufs_event_status_get, 8 }, | 2178 | { "event_status", NULL, spufs_event_status_get, 19 }, |
2246 | { "mbox_info", __spufs_mbox_info_read, NULL, 4 }, | 2179 | { "mbox_info", __spufs_mbox_info_read, NULL, sizeof(u32) }, |
2247 | { "ibox_info", __spufs_ibox_info_read, NULL, 4 }, | 2180 | { "ibox_info", __spufs_ibox_info_read, NULL, sizeof(u32) }, |
2248 | { "wbox_info", __spufs_wbox_info_read, NULL, 16 }, | 2181 | { "wbox_info", __spufs_wbox_info_read, NULL, 4 * sizeof(u32)}, |
2249 | { "dma_info", __spufs_dma_info_read, NULL, 69 * 8 }, | 2182 | { "dma_info", __spufs_dma_info_read, NULL, sizeof(struct spu_dma_info)}, |
2250 | { "proxydma_info", __spufs_proxydma_info_read, NULL, 35 * 8 }, | 2183 | { "proxydma_info", __spufs_proxydma_info_read, |
2251 | { "object-id", NULL, __spufs_object_id_get, 19 }, | 2184 | NULL, sizeof(struct spu_proxydma_info)}, |
2252 | { }, | 2185 | { "object-id", NULL, spufs_object_id_get, 19 }, |
2186 | { "npc", NULL, spufs_npc_get, 19 }, | ||
2187 | { NULL }, | ||
2253 | }; | 2188 | }; |
2254 | int spufs_coredump_num_notes = ARRAY_SIZE(spufs_coredump_read) - 1; | ||
2255 | |||
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index b3d0dd118dd0..11098747d09b 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | static struct kmem_cache *spufs_inode_cache; | 44 | static struct kmem_cache *spufs_inode_cache; |
45 | char *isolated_loader; | 45 | char *isolated_loader; |
46 | static int isolated_loader_size; | ||
46 | 47 | ||
47 | static struct inode * | 48 | static struct inode * |
48 | spufs_alloc_inode(struct super_block *sb) | 49 | spufs_alloc_inode(struct super_block *sb) |
@@ -667,7 +668,8 @@ spufs_parse_options(char *options, struct inode *root) | |||
667 | 668 | ||
668 | static void spufs_exit_isolated_loader(void) | 669 | static void spufs_exit_isolated_loader(void) |
669 | { | 670 | { |
670 | kfree(isolated_loader); | 671 | free_pages((unsigned long) isolated_loader, |
672 | get_order(isolated_loader_size)); | ||
671 | } | 673 | } |
672 | 674 | ||
673 | static void | 675 | static void |
@@ -685,11 +687,12 @@ spufs_init_isolated_loader(void) | |||
685 | if (!loader) | 687 | if (!loader) |
686 | return; | 688 | return; |
687 | 689 | ||
688 | /* kmalloc should align on a 16 byte boundary..* */ | 690 | /* the loader must be align on a 16 byte boundary */ |
689 | isolated_loader = kmalloc(size, GFP_KERNEL); | 691 | isolated_loader = (char *)__get_free_pages(GFP_KERNEL, get_order(size)); |
690 | if (!isolated_loader) | 692 | if (!isolated_loader) |
691 | return; | 693 | return; |
692 | 694 | ||
695 | isolated_loader_size = size; | ||
693 | memcpy(isolated_loader, loader, size); | 696 | memcpy(isolated_loader, loader, size); |
694 | printk(KERN_INFO "spufs: SPU isolation mode enabled\n"); | 697 | printk(KERN_INFO "spufs: SPU isolation mode enabled\n"); |
695 | } | 698 | } |
@@ -787,16 +790,11 @@ static int __init spufs_init(void) | |||
787 | ret = register_spu_syscalls(&spufs_calls); | 790 | ret = register_spu_syscalls(&spufs_calls); |
788 | if (ret) | 791 | if (ret) |
789 | goto out_fs; | 792 | goto out_fs; |
790 | ret = register_arch_coredump_calls(&spufs_coredump_calls); | ||
791 | if (ret) | ||
792 | goto out_syscalls; | ||
793 | 793 | ||
794 | spufs_init_isolated_loader(); | 794 | spufs_init_isolated_loader(); |
795 | 795 | ||
796 | return 0; | 796 | return 0; |
797 | 797 | ||
798 | out_syscalls: | ||
799 | unregister_spu_syscalls(&spufs_calls); | ||
800 | out_fs: | 798 | out_fs: |
801 | unregister_filesystem(&spufs_type); | 799 | unregister_filesystem(&spufs_type); |
802 | out_sched: | 800 | out_sched: |
@@ -812,7 +810,6 @@ static void __exit spufs_exit(void) | |||
812 | { | 810 | { |
813 | spu_sched_exit(); | 811 | spu_sched_exit(); |
814 | spufs_exit_isolated_loader(); | 812 | spufs_exit_isolated_loader(); |
815 | unregister_arch_coredump_calls(&spufs_coredump_calls); | ||
816 | unregister_spu_syscalls(&spufs_calls); | 813 | unregister_spu_syscalls(&spufs_calls); |
817 | unregister_filesystem(&spufs_type); | 814 | unregister_filesystem(&spufs_type); |
818 | kmem_cache_destroy(spufs_inode_cache); | 815 | kmem_cache_destroy(spufs_inode_cache); |
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 958f10e90fdd..1ce5e22ea5f4 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -205,7 +205,7 @@ static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc, | |||
205 | * This means we can only do a very rough approximation of POSIX | 205 | * This means we can only do a very rough approximation of POSIX |
206 | * signal semantics. | 206 | * signal semantics. |
207 | */ | 207 | */ |
208 | int spu_handle_restartsys(struct spu_context *ctx, long *spu_ret, | 208 | static int spu_handle_restartsys(struct spu_context *ctx, long *spu_ret, |
209 | unsigned int *npc) | 209 | unsigned int *npc) |
210 | { | 210 | { |
211 | int ret; | 211 | int ret; |
@@ -241,7 +241,7 @@ int spu_handle_restartsys(struct spu_context *ctx, long *spu_ret, | |||
241 | return ret; | 241 | return ret; |
242 | } | 242 | } |
243 | 243 | ||
244 | int spu_process_callback(struct spu_context *ctx) | 244 | static int spu_process_callback(struct spu_context *ctx) |
245 | { | 245 | { |
246 | struct spu_syscall_block s; | 246 | struct spu_syscall_block s; |
247 | u32 ls_pointer, npc; | 247 | u32 ls_pointer, npc; |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 5bebe7fbe056..4d257b3f9336 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -230,8 +230,6 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx) | |||
230 | 230 | ||
231 | if (ctx->flags & SPU_CREATE_NOSCHED) | 231 | if (ctx->flags & SPU_CREATE_NOSCHED) |
232 | atomic_inc(&cbe_spu_info[spu->node].reserved_spus); | 232 | atomic_inc(&cbe_spu_info[spu->node].reserved_spus); |
233 | if (!list_empty(&ctx->aff_list)) | ||
234 | atomic_inc(&ctx->gang->aff_sched_count); | ||
235 | 233 | ||
236 | ctx->stats.slb_flt_base = spu->stats.slb_flt; | 234 | ctx->stats.slb_flt_base = spu->stats.slb_flt; |
237 | ctx->stats.class2_intr_base = spu->stats.class2_intr; | 235 | ctx->stats.class2_intr_base = spu->stats.class2_intr; |
@@ -392,7 +390,6 @@ static int has_affinity(struct spu_context *ctx) | |||
392 | if (list_empty(&ctx->aff_list)) | 390 | if (list_empty(&ctx->aff_list)) |
393 | return 0; | 391 | return 0; |
394 | 392 | ||
395 | mutex_lock(&gang->aff_mutex); | ||
396 | if (!gang->aff_ref_spu) { | 393 | if (!gang->aff_ref_spu) { |
397 | if (!(gang->aff_flags & AFF_MERGED)) | 394 | if (!(gang->aff_flags & AFF_MERGED)) |
398 | aff_merge_remaining_ctxs(gang); | 395 | aff_merge_remaining_ctxs(gang); |
@@ -400,7 +397,6 @@ static int has_affinity(struct spu_context *ctx) | |||
400 | aff_set_offsets(gang); | 397 | aff_set_offsets(gang); |
401 | aff_set_ref_point_location(gang); | 398 | aff_set_ref_point_location(gang); |
402 | } | 399 | } |
403 | mutex_unlock(&gang->aff_mutex); | ||
404 | 400 | ||
405 | return gang->aff_ref_spu != NULL; | 401 | return gang->aff_ref_spu != NULL; |
406 | } | 402 | } |
@@ -418,9 +414,16 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx) | |||
418 | 414 | ||
419 | if (spu->ctx->flags & SPU_CREATE_NOSCHED) | 415 | if (spu->ctx->flags & SPU_CREATE_NOSCHED) |
420 | atomic_dec(&cbe_spu_info[spu->node].reserved_spus); | 416 | atomic_dec(&cbe_spu_info[spu->node].reserved_spus); |
421 | if (!list_empty(&ctx->aff_list)) | 417 | |
422 | if (atomic_dec_and_test(&ctx->gang->aff_sched_count)) | 418 | if (ctx->gang){ |
423 | ctx->gang->aff_ref_spu = NULL; | 419 | mutex_lock(&ctx->gang->aff_mutex); |
420 | if (has_affinity(ctx)) { | ||
421 | if (atomic_dec_and_test(&ctx->gang->aff_sched_count)) | ||
422 | ctx->gang->aff_ref_spu = NULL; | ||
423 | } | ||
424 | mutex_unlock(&ctx->gang->aff_mutex); | ||
425 | } | ||
426 | |||
424 | spu_switch_notify(spu, NULL); | 427 | spu_switch_notify(spu, NULL); |
425 | spu_unmap_mappings(ctx); | 428 | spu_unmap_mappings(ctx); |
426 | spu_save(&ctx->csa, spu); | 429 | spu_save(&ctx->csa, spu); |
@@ -511,20 +514,32 @@ static void spu_prio_wait(struct spu_context *ctx) | |||
511 | 514 | ||
512 | static struct spu *spu_get_idle(struct spu_context *ctx) | 515 | static struct spu *spu_get_idle(struct spu_context *ctx) |
513 | { | 516 | { |
514 | struct spu *spu; | 517 | struct spu *spu, *aff_ref_spu; |
515 | int node, n; | 518 | int node, n; |
516 | 519 | ||
517 | if (has_affinity(ctx)) { | 520 | if (ctx->gang) { |
518 | node = ctx->gang->aff_ref_spu->node; | 521 | mutex_lock(&ctx->gang->aff_mutex); |
522 | if (has_affinity(ctx)) { | ||
523 | aff_ref_spu = ctx->gang->aff_ref_spu; | ||
524 | atomic_inc(&ctx->gang->aff_sched_count); | ||
525 | mutex_unlock(&ctx->gang->aff_mutex); | ||
526 | node = aff_ref_spu->node; | ||
519 | 527 | ||
520 | mutex_lock(&cbe_spu_info[node].list_mutex); | 528 | mutex_lock(&cbe_spu_info[node].list_mutex); |
521 | spu = ctx_location(ctx->gang->aff_ref_spu, ctx->aff_offset, node); | 529 | spu = ctx_location(aff_ref_spu, ctx->aff_offset, node); |
522 | if (spu && spu->alloc_state == SPU_FREE) | 530 | if (spu && spu->alloc_state == SPU_FREE) |
523 | goto found; | 531 | goto found; |
524 | mutex_unlock(&cbe_spu_info[node].list_mutex); | 532 | mutex_unlock(&cbe_spu_info[node].list_mutex); |
525 | return NULL; | ||
526 | } | ||
527 | 533 | ||
534 | mutex_lock(&ctx->gang->aff_mutex); | ||
535 | if (atomic_dec_and_test(&ctx->gang->aff_sched_count)) | ||
536 | ctx->gang->aff_ref_spu = NULL; | ||
537 | mutex_unlock(&ctx->gang->aff_mutex); | ||
538 | |||
539 | return NULL; | ||
540 | } | ||
541 | mutex_unlock(&ctx->gang->aff_mutex); | ||
542 | } | ||
528 | node = cpu_to_node(raw_smp_processor_id()); | 543 | node = cpu_to_node(raw_smp_processor_id()); |
529 | for (n = 0; n < MAX_NUMNODES; n++, node++) { | 544 | for (n = 0; n < MAX_NUMNODES; n++, node++) { |
530 | node = (node < MAX_NUMNODES) ? node : 0; | 545 | node = (node < MAX_NUMNODES) ? node : 0; |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 2bfdeb8ea8bd..ca47b991bda5 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -200,9 +200,14 @@ extern struct tree_descr spufs_dir_contents[]; | |||
200 | extern struct tree_descr spufs_dir_nosched_contents[]; | 200 | extern struct tree_descr spufs_dir_nosched_contents[]; |
201 | 201 | ||
202 | /* system call implementation */ | 202 | /* system call implementation */ |
203 | extern struct spufs_calls spufs_calls; | ||
203 | long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status); | 204 | long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status); |
204 | long spufs_create(struct nameidata *nd, unsigned int flags, | 205 | long spufs_create(struct nameidata *nd, unsigned int flags, |
205 | mode_t mode, struct file *filp); | 206 | mode_t mode, struct file *filp); |
207 | /* ELF coredump callbacks for writing SPU ELF notes */ | ||
208 | extern int spufs_coredump_extra_notes_size(void); | ||
209 | extern int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset); | ||
210 | |||
206 | extern const struct file_operations spufs_context_fops; | 211 | extern const struct file_operations spufs_context_fops; |
207 | 212 | ||
208 | /* gang management */ | 213 | /* gang management */ |
@@ -295,7 +300,7 @@ struct spufs_coredump_reader { | |||
295 | char *name; | 300 | char *name; |
296 | ssize_t (*read)(struct spu_context *ctx, | 301 | ssize_t (*read)(struct spu_context *ctx, |
297 | char __user *buffer, size_t size, loff_t *pos); | 302 | char __user *buffer, size_t size, loff_t *pos); |
298 | u64 (*get)(void *data); | 303 | u64 (*get)(struct spu_context *ctx); |
299 | size_t size; | 304 | size_t size; |
300 | }; | 305 | }; |
301 | extern struct spufs_coredump_reader spufs_coredump_read[]; | 306 | extern struct spufs_coredump_reader spufs_coredump_read[]; |
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 27ffdae98e5a..de7e5ee451d2 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c | |||
@@ -1559,15 +1559,15 @@ static inline void restore_decr_wrapped(struct spu_state *csa, struct spu *spu) | |||
1559 | * "wrapped" flag is set, OR in a '1' to | 1559 | * "wrapped" flag is set, OR in a '1' to |
1560 | * CSA.SPU_Event_Status[Tm]. | 1560 | * CSA.SPU_Event_Status[Tm]. |
1561 | */ | 1561 | */ |
1562 | if (csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) { | 1562 | if (!(csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED)) |
1563 | csa->spu_chnldata_RW[0] |= 0x20; | 1563 | return; |
1564 | } | 1564 | |
1565 | if ((csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) && | 1565 | if ((csa->spu_chnlcnt_RW[0] == 0) && |
1566 | (csa->spu_chnlcnt_RW[0] == 0 && | 1566 | (csa->spu_chnldata_RW[1] & 0x20) && |
1567 | ((csa->spu_chnldata_RW[2] & 0x20) == 0x0) && | 1567 | !(csa->spu_chnldata_RW[0] & 0x20)) |
1568 | ((csa->spu_chnldata_RW[0] & 0x20) != 0x1))) { | ||
1569 | csa->spu_chnlcnt_RW[0] = 1; | 1568 | csa->spu_chnlcnt_RW[0] = 1; |
1570 | } | 1569 | |
1570 | csa->spu_chnldata_RW[0] |= 0x20; | ||
1571 | } | 1571 | } |
1572 | 1572 | ||
1573 | static inline void restore_ch_part1(struct spu_state *csa, struct spu *spu) | 1573 | static inline void restore_ch_part1(struct spu_state *csa, struct spu *spu) |
@@ -2146,19 +2146,6 @@ int spu_restore(struct spu_state *new, struct spu *spu) | |||
2146 | } | 2146 | } |
2147 | EXPORT_SYMBOL_GPL(spu_restore); | 2147 | EXPORT_SYMBOL_GPL(spu_restore); |
2148 | 2148 | ||
2149 | /** | ||
2150 | * spu_harvest - SPU harvest (reset) operation | ||
2151 | * @spu: pointer to SPU iomem structure. | ||
2152 | * | ||
2153 | * Perform SPU harvest (reset) operation. | ||
2154 | */ | ||
2155 | void spu_harvest(struct spu *spu) | ||
2156 | { | ||
2157 | acquire_spu_lock(spu); | ||
2158 | harvest(NULL, spu); | ||
2159 | release_spu_lock(spu); | ||
2160 | } | ||
2161 | |||
2162 | static void init_prob(struct spu_state *csa) | 2149 | static void init_prob(struct spu_state *csa) |
2163 | { | 2150 | { |
2164 | csa->spu_chnlcnt_RW[9] = 1; | 2151 | csa->spu_chnlcnt_RW[9] = 1; |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 43f0fb88abbc..2c34f7170190 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -58,26 +58,8 @@ out: | |||
58 | return ret; | 58 | return ret; |
59 | } | 59 | } |
60 | 60 | ||
61 | #ifndef MODULE | 61 | static long do_spu_create(const char __user *pathname, unsigned int flags, |
62 | asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, __u32 __user *ustatus) | 62 | mode_t mode, struct file *neighbor) |
63 | { | ||
64 | int fput_needed; | ||
65 | struct file *filp; | ||
66 | long ret; | ||
67 | |||
68 | ret = -EBADF; | ||
69 | filp = fget_light(fd, &fput_needed); | ||
70 | if (filp) { | ||
71 | ret = do_spu_run(filp, unpc, ustatus); | ||
72 | fput_light(filp, fput_needed); | ||
73 | } | ||
74 | |||
75 | return ret; | ||
76 | } | ||
77 | #endif | ||
78 | |||
79 | asmlinkage long do_spu_create(const char __user *pathname, unsigned int flags, | ||
80 | mode_t mode, struct file *neighbor) | ||
81 | { | 63 | { |
82 | char *tmp; | 64 | char *tmp; |
83 | int ret; | 65 | int ret; |
@@ -99,32 +81,10 @@ asmlinkage long do_spu_create(const char __user *pathname, unsigned int flags, | |||
99 | return ret; | 81 | return ret; |
100 | } | 82 | } |
101 | 83 | ||
102 | #ifndef MODULE | ||
103 | asmlinkage long sys_spu_create(const char __user *pathname, unsigned int flags, | ||
104 | mode_t mode, int neighbor_fd) | ||
105 | { | ||
106 | int fput_needed; | ||
107 | struct file *neighbor; | ||
108 | long ret; | ||
109 | |||
110 | if (flags & SPU_CREATE_AFFINITY_SPU) { | ||
111 | ret = -EBADF; | ||
112 | neighbor = fget_light(neighbor_fd, &fput_needed); | ||
113 | if (neighbor) { | ||
114 | ret = do_spu_create(pathname, flags, mode, neighbor); | ||
115 | fput_light(neighbor, fput_needed); | ||
116 | } | ||
117 | } | ||
118 | else { | ||
119 | ret = do_spu_create(pathname, flags, mode, NULL); | ||
120 | } | ||
121 | |||
122 | return ret; | ||
123 | } | ||
124 | #endif | ||
125 | |||
126 | struct spufs_calls spufs_calls = { | 84 | struct spufs_calls spufs_calls = { |
127 | .create_thread = do_spu_create, | 85 | .create_thread = do_spu_create, |
128 | .spu_run = do_spu_run, | 86 | .spu_run = do_spu_run, |
87 | .coredump_extra_notes_size = spufs_coredump_extra_notes_size, | ||
88 | .coredump_extra_notes_write = spufs_coredump_extra_notes_write, | ||
129 | .owner = THIS_MODULE, | 89 | .owner = THIS_MODULE, |
130 | }; | 90 | }; |
diff --git a/arch/powerpc/platforms/celleb/Kconfig b/arch/powerpc/platforms/celleb/Kconfig index 2db1e293433e..04748d410fc9 100644 --- a/arch/powerpc/platforms/celleb/Kconfig +++ b/arch/powerpc/platforms/celleb/Kconfig | |||
@@ -2,6 +2,7 @@ config PPC_CELLEB | |||
2 | bool "Toshiba's Cell Reference Set 'Celleb' Architecture" | 2 | bool "Toshiba's Cell Reference Set 'Celleb' Architecture" |
3 | depends on PPC_MULTIPLATFORM && PPC64 | 3 | depends on PPC_MULTIPLATFORM && PPC64 |
4 | select PPC_CELL | 4 | select PPC_CELL |
5 | select PPC_INDIRECT_IO | ||
5 | select PPC_OF_PLATFORM_PCI | 6 | select PPC_OF_PLATFORM_PCI |
6 | select HAS_TXX9_SERIAL | 7 | select HAS_TXX9_SERIAL |
7 | select PPC_UDBG_BEAT | 8 | select PPC_UDBG_BEAT |
diff --git a/arch/powerpc/platforms/celleb/Makefile b/arch/powerpc/platforms/celleb/Makefile index 5240046d8671..889d43f715ea 100644 --- a/arch/powerpc/platforms/celleb/Makefile +++ b/arch/powerpc/platforms/celleb/Makefile | |||
@@ -1,6 +1,7 @@ | |||
1 | obj-y += interrupt.o iommu.o setup.o \ | 1 | obj-y += interrupt.o iommu.o setup.o \ |
2 | htab.o beat.o pci.o \ | 2 | htab.o beat.o hvCall.o pci.o \ |
3 | scc_epci.o scc_uhc.o hvCall.o | 3 | scc_epci.o scc_uhc.o \ |
4 | io-workarounds.o | ||
4 | 5 | ||
5 | obj-$(CONFIG_SMP) += smp.o | 6 | obj-$(CONFIG_SMP) += smp.o |
6 | obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o | 7 | obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o |
diff --git a/arch/powerpc/platforms/celleb/beat.c b/arch/powerpc/platforms/celleb/beat.c index 99341ce8a697..93ebb7d85120 100644 --- a/arch/powerpc/platforms/celleb/beat.c +++ b/arch/powerpc/platforms/celleb/beat.c | |||
@@ -22,16 +22,24 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/rtc.h> | 24 | #include <linux/rtc.h> |
25 | #include <linux/interrupt.h> | ||
26 | #include <linux/irqreturn.h> | ||
27 | #include <linux/reboot.h> | ||
25 | 28 | ||
26 | #include <asm/hvconsole.h> | 29 | #include <asm/hvconsole.h> |
27 | #include <asm/time.h> | 30 | #include <asm/time.h> |
31 | #include <asm/machdep.h> | ||
32 | #include <asm/firmware.h> | ||
28 | 33 | ||
29 | #include "beat_wrapper.h" | 34 | #include "beat_wrapper.h" |
30 | #include "beat.h" | 35 | #include "beat.h" |
36 | #include "interrupt.h" | ||
37 | |||
38 | static int beat_pm_poweroff_flag; | ||
31 | 39 | ||
32 | void beat_restart(char *cmd) | 40 | void beat_restart(char *cmd) |
33 | { | 41 | { |
34 | beat_shutdown_logical_partition(1); | 42 | beat_shutdown_logical_partition(!beat_pm_poweroff_flag); |
35 | } | 43 | } |
36 | 44 | ||
37 | void beat_power_off(void) | 45 | void beat_power_off(void) |
@@ -158,6 +166,102 @@ int64_t beat_put_term_char(u64 vterm, u64 len, u64 t1, u64 t2) | |||
158 | return beat_put_characters_to_console(vterm, len, (u8*)db); | 166 | return beat_put_characters_to_console(vterm, len, (u8*)db); |
159 | } | 167 | } |
160 | 168 | ||
169 | void beat_power_save(void) | ||
170 | { | ||
171 | beat_pause(0); | ||
172 | } | ||
173 | |||
174 | #ifdef CONFIG_KEXEC | ||
175 | void beat_kexec_cpu_down(int crash, int secondary) | ||
176 | { | ||
177 | beatic_deinit_IRQ(); | ||
178 | } | ||
179 | #endif | ||
180 | |||
181 | static irqreturn_t beat_power_event(int virq, void *arg) | ||
182 | { | ||
183 | printk(KERN_DEBUG "Beat: power button pressed\n"); | ||
184 | beat_pm_poweroff_flag = 1; | ||
185 | ctrl_alt_del(); | ||
186 | return IRQ_HANDLED; | ||
187 | } | ||
188 | |||
189 | static irqreturn_t beat_reset_event(int virq, void *arg) | ||
190 | { | ||
191 | printk(KERN_DEBUG "Beat: reset button pressed\n"); | ||
192 | beat_pm_poweroff_flag = 0; | ||
193 | ctrl_alt_del(); | ||
194 | return IRQ_HANDLED; | ||
195 | } | ||
196 | |||
197 | static struct beat_event_list { | ||
198 | const char *typecode; | ||
199 | irq_handler_t handler; | ||
200 | unsigned int virq; | ||
201 | } beat_event_list[] = { | ||
202 | { "power", beat_power_event, 0 }, | ||
203 | { "reset", beat_reset_event, 0 }, | ||
204 | }; | ||
205 | |||
206 | static int __init beat_register_event(void) | ||
207 | { | ||
208 | u64 path[4], data[2]; | ||
209 | int rc, i; | ||
210 | unsigned int virq; | ||
211 | |||
212 | for (i = 0; i < ARRAY_SIZE(beat_event_list); i++) { | ||
213 | struct beat_event_list *ev = &beat_event_list[i]; | ||
214 | |||
215 | if (beat_construct_event_receive_port(data) != 0) { | ||
216 | printk(KERN_ERR "Beat: " | ||
217 | "cannot construct event receive port for %s\n", | ||
218 | ev->typecode); | ||
219 | return -EINVAL; | ||
220 | } | ||
221 | |||
222 | virq = irq_create_mapping(NULL, data[0]); | ||
223 | if (virq == NO_IRQ) { | ||
224 | printk(KERN_ERR "Beat: failed to get virtual IRQ" | ||
225 | " for event receive port for %s\n", | ||
226 | ev->typecode); | ||
227 | beat_destruct_event_receive_port(data[0]); | ||
228 | return -EIO; | ||
229 | } | ||
230 | ev->virq = virq; | ||
231 | |||
232 | rc = request_irq(virq, ev->handler, IRQF_DISABLED, | ||
233 | ev->typecode, NULL); | ||
234 | if (rc != 0) { | ||
235 | printk(KERN_ERR "Beat: failed to request virtual IRQ" | ||
236 | " for event receive port for %s\n", | ||
237 | ev->typecode); | ||
238 | beat_destruct_event_receive_port(data[0]); | ||
239 | return rc; | ||
240 | } | ||
241 | |||
242 | path[0] = 0x1000000065780000ul; /* 1,ex */ | ||
243 | path[1] = 0x627574746f6e0000ul; /* button */ | ||
244 | path[2] = 0; | ||
245 | strncpy((char *)&path[2], ev->typecode, 8); | ||
246 | path[3] = 0; | ||
247 | data[1] = 0; | ||
248 | |||
249 | beat_create_repository_node(path, data); | ||
250 | } | ||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | static int __init beat_event_init(void) | ||
255 | { | ||
256 | if (!firmware_has_feature(FW_FEATURE_BEAT)) | ||
257 | return -EINVAL; | ||
258 | |||
259 | beat_pm_poweroff_flag = 0; | ||
260 | return beat_register_event(); | ||
261 | } | ||
262 | |||
263 | device_initcall(beat_event_init); | ||
264 | |||
161 | EXPORT_SYMBOL(beat_get_term_char); | 265 | EXPORT_SYMBOL(beat_get_term_char); |
162 | EXPORT_SYMBOL(beat_put_term_char); | 266 | EXPORT_SYMBOL(beat_put_term_char); |
163 | EXPORT_SYMBOL(beat_halt_code); | 267 | EXPORT_SYMBOL(beat_halt_code); |
diff --git a/arch/powerpc/platforms/celleb/beat.h b/arch/powerpc/platforms/celleb/beat.h index 2b16bf3bee89..b2e292df13ca 100644 --- a/arch/powerpc/platforms/celleb/beat.h +++ b/arch/powerpc/platforms/celleb/beat.h | |||
@@ -36,5 +36,7 @@ ssize_t beat_nvram_get_size(void); | |||
36 | ssize_t beat_nvram_read(char *, size_t, loff_t *); | 36 | ssize_t beat_nvram_read(char *, size_t, loff_t *); |
37 | ssize_t beat_nvram_write(char *, size_t, loff_t *); | 37 | ssize_t beat_nvram_write(char *, size_t, loff_t *); |
38 | int beat_set_xdabr(unsigned long); | 38 | int beat_set_xdabr(unsigned long); |
39 | void beat_power_save(void); | ||
40 | void beat_kexec_cpu_down(int, int); | ||
39 | 41 | ||
40 | #endif /* _CELLEB_BEAT_H */ | 42 | #endif /* _CELLEB_BEAT_H */ |
diff --git a/arch/powerpc/platforms/celleb/beat_syscall.h b/arch/powerpc/platforms/celleb/beat_syscall.h index 14e16974773f..8580dc7e1798 100644 --- a/arch/powerpc/platforms/celleb/beat_syscall.h +++ b/arch/powerpc/platforms/celleb/beat_syscall.h | |||
@@ -157,4 +157,8 @@ | |||
157 | #define HV_rtc_write __BEAT_ADD_VENDOR_ID(0x191, 1) | 157 | #define HV_rtc_write __BEAT_ADD_VENDOR_ID(0x191, 1) |
158 | #define HV_eeprom_read __BEAT_ADD_VENDOR_ID(0x192, 1) | 158 | #define HV_eeprom_read __BEAT_ADD_VENDOR_ID(0x192, 1) |
159 | #define HV_eeprom_write __BEAT_ADD_VENDOR_ID(0x193, 1) | 159 | #define HV_eeprom_write __BEAT_ADD_VENDOR_ID(0x193, 1) |
160 | #define HV_insert_htab_entry3 __BEAT_ADD_VENDOR_ID(0x104, 1) | ||
161 | #define HV_invalidate_htab_entry3 __BEAT_ADD_VENDOR_ID(0x105, 1) | ||
162 | #define HV_update_htab_permission3 __BEAT_ADD_VENDOR_ID(0x106, 1) | ||
163 | #define HV_clear_htab3 __BEAT_ADD_VENDOR_ID(0x107, 1) | ||
160 | #endif | 164 | #endif |
diff --git a/arch/powerpc/platforms/celleb/beat_wrapper.h b/arch/powerpc/platforms/celleb/beat_wrapper.h index 76ea0a6a9011..cbc1487df7de 100644 --- a/arch/powerpc/platforms/celleb/beat_wrapper.h +++ b/arch/powerpc/platforms/celleb/beat_wrapper.h | |||
@@ -98,6 +98,37 @@ static inline s64 beat_write_htab_entry(u64 htab_id, u64 slot, | |||
98 | return ret; | 98 | return ret; |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline s64 beat_insert_htab_entry3(u64 htab_id, u64 group, | ||
102 | u64 hpte_v, u64 hpte_r, u64 mask_v, u64 value_v, u64 *slot) | ||
103 | { | ||
104 | u64 dummy[1]; | ||
105 | s64 ret; | ||
106 | |||
107 | ret = beat_hcall1(HV_insert_htab_entry3, dummy, htab_id, group, | ||
108 | hpte_v, hpte_r, mask_v, value_v); | ||
109 | *slot = dummy[0]; | ||
110 | return ret; | ||
111 | } | ||
112 | |||
113 | static inline s64 beat_invalidate_htab_entry3(u64 htab_id, u64 group, | ||
114 | u64 va, u64 pss) | ||
115 | { | ||
116 | return beat_hcall_norets(HV_invalidate_htab_entry3, | ||
117 | htab_id, group, va, pss); | ||
118 | } | ||
119 | |||
120 | static inline s64 beat_update_htab_permission3(u64 htab_id, u64 group, | ||
121 | u64 va, u64 pss, u64 ptel_mask, u64 ptel_value) | ||
122 | { | ||
123 | return beat_hcall_norets(HV_update_htab_permission3, | ||
124 | htab_id, group, va, pss, ptel_mask, ptel_value); | ||
125 | } | ||
126 | |||
127 | static inline s64 beat_clear_htab3(u64 htab_id) | ||
128 | { | ||
129 | return beat_hcall_norets(HV_clear_htab3, htab_id); | ||
130 | } | ||
131 | |||
101 | static inline void beat_shutdown_logical_partition(u64 code) | 132 | static inline void beat_shutdown_logical_partition(u64 code) |
102 | { | 133 | { |
103 | (void)beat_hcall_norets(HV_shutdown_logical_partition, code); | 134 | (void)beat_hcall_norets(HV_shutdown_logical_partition, code); |
@@ -217,4 +248,41 @@ static inline s64 beat_put_iopte(u64 ioas_id, u64 io_addr, u64 real_addr, | |||
217 | ioid, flags); | 248 | ioid, flags); |
218 | } | 249 | } |
219 | 250 | ||
251 | static inline s64 beat_construct_event_receive_port(u64 *port) | ||
252 | { | ||
253 | u64 dummy[1]; | ||
254 | s64 ret; | ||
255 | |||
256 | ret = beat_hcall1(HV_construct_event_receive_port, dummy); | ||
257 | *port = dummy[0]; | ||
258 | return ret; | ||
259 | } | ||
260 | |||
261 | static inline s64 beat_destruct_event_receive_port(u64 port) | ||
262 | { | ||
263 | s64 ret; | ||
264 | |||
265 | ret = beat_hcall_norets(HV_destruct_event_receive_port, port); | ||
266 | return ret; | ||
267 | } | ||
268 | |||
269 | static inline s64 beat_create_repository_node(u64 path[4], u64 data[2]) | ||
270 | { | ||
271 | s64 ret; | ||
272 | |||
273 | ret = beat_hcall_norets(HV_create_repository_node2, | ||
274 | path[0], path[1], path[2], path[3], data[0], data[1]); | ||
275 | return ret; | ||
276 | } | ||
277 | |||
278 | static inline s64 beat_get_repository_node_value(u64 lpid, u64 path[4], | ||
279 | u64 data[2]) | ||
280 | { | ||
281 | s64 ret; | ||
282 | |||
283 | ret = beat_hcall2(HV_get_repository_node_value2, data, | ||
284 | lpid, path[0], path[1], path[2], path[3]); | ||
285 | return ret; | ||
286 | } | ||
287 | |||
220 | #endif | 288 | #endif |
diff --git a/arch/powerpc/platforms/celleb/htab.c b/arch/powerpc/platforms/celleb/htab.c index 279d7339e170..5e75c77ea8f3 100644 --- a/arch/powerpc/platforms/celleb/htab.c +++ b/arch/powerpc/platforms/celleb/htab.c | |||
@@ -306,3 +306,133 @@ void __init hpte_init_beat(void) | |||
306 | ppc_md.hpte_remove = beat_lpar_hpte_remove; | 306 | ppc_md.hpte_remove = beat_lpar_hpte_remove; |
307 | ppc_md.hpte_clear_all = beat_lpar_hptab_clear; | 307 | ppc_md.hpte_clear_all = beat_lpar_hptab_clear; |
308 | } | 308 | } |
309 | |||
310 | static long beat_lpar_hpte_insert_v3(unsigned long hpte_group, | ||
311 | unsigned long va, unsigned long pa, | ||
312 | unsigned long rflags, unsigned long vflags, | ||
313 | int psize) | ||
314 | { | ||
315 | unsigned long lpar_rc; | ||
316 | unsigned long slot; | ||
317 | unsigned long hpte_v, hpte_r; | ||
318 | |||
319 | /* same as iseries */ | ||
320 | if (vflags & HPTE_V_SECONDARY) | ||
321 | return -1; | ||
322 | |||
323 | if (!(vflags & HPTE_V_BOLTED)) | ||
324 | DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, " | ||
325 | "rflags=%lx, vflags=%lx, psize=%d)\n", | ||
326 | hpte_group, va, pa, rflags, vflags, psize); | ||
327 | |||
328 | hpte_v = hpte_encode_v(va, psize) | vflags | HPTE_V_VALID; | ||
329 | hpte_r = hpte_encode_r(pa, psize) | rflags; | ||
330 | |||
331 | if (!(vflags & HPTE_V_BOLTED)) | ||
332 | DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r); | ||
333 | |||
334 | if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE)) | ||
335 | hpte_r &= ~_PAGE_COHERENT; | ||
336 | |||
337 | /* insert into not-volted entry */ | ||
338 | lpar_rc = beat_insert_htab_entry3(0, hpte_group, hpte_v, hpte_r, | ||
339 | HPTE_V_BOLTED, 0, &slot); | ||
340 | /* | ||
341 | * Since we try and ioremap PHBs we don't own, the pte insert | ||
342 | * will fail. However we must catch the failure in hash_page | ||
343 | * or we will loop forever, so return -2 in this case. | ||
344 | */ | ||
345 | if (unlikely(lpar_rc != 0)) { | ||
346 | if (!(vflags & HPTE_V_BOLTED)) | ||
347 | DBG_LOW(" lpar err %lx\n", lpar_rc); | ||
348 | return -2; | ||
349 | } | ||
350 | if (!(vflags & HPTE_V_BOLTED)) | ||
351 | DBG_LOW(" -> slot: %lx\n", slot); | ||
352 | |||
353 | /* We have to pass down the secondary bucket bit here as well */ | ||
354 | return (slot ^ hpte_group) & 15; | ||
355 | } | ||
356 | |||
357 | /* | ||
358 | * NOTE: for updatepp ops we are fortunate that the linux "newpp" bits and | ||
359 | * the low 3 bits of flags happen to line up. So no transform is needed. | ||
360 | * We can probably optimize here and assume the high bits of newpp are | ||
361 | * already zero. For now I am paranoid. | ||
362 | */ | ||
363 | static long beat_lpar_hpte_updatepp_v3(unsigned long slot, | ||
364 | unsigned long newpp, | ||
365 | unsigned long va, | ||
366 | int psize, int local) | ||
367 | { | ||
368 | unsigned long lpar_rc; | ||
369 | unsigned long want_v; | ||
370 | unsigned long pss; | ||
371 | |||
372 | want_v = hpte_encode_v(va, psize); | ||
373 | pss = (psize == MMU_PAGE_4K) ? -1UL : mmu_psize_defs[psize].penc; | ||
374 | |||
375 | DBG_LOW(" update: " | ||
376 | "avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ", | ||
377 | want_v & HPTE_V_AVPN, slot, psize, newpp); | ||
378 | |||
379 | lpar_rc = beat_update_htab_permission3(0, slot, want_v, pss, 7, newpp); | ||
380 | |||
381 | if (lpar_rc == 0xfffffff7) { | ||
382 | DBG_LOW("not found !\n"); | ||
383 | return -1; | ||
384 | } | ||
385 | |||
386 | DBG_LOW("ok\n"); | ||
387 | |||
388 | BUG_ON(lpar_rc != 0); | ||
389 | |||
390 | return 0; | ||
391 | } | ||
392 | |||
393 | static void beat_lpar_hpte_invalidate_v3(unsigned long slot, unsigned long va, | ||
394 | int psize, int local) | ||
395 | { | ||
396 | unsigned long want_v; | ||
397 | unsigned long lpar_rc; | ||
398 | unsigned long pss; | ||
399 | |||
400 | DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d\n", | ||
401 | slot, va, psize, local); | ||
402 | want_v = hpte_encode_v(va, psize); | ||
403 | pss = (psize == MMU_PAGE_4K) ? -1UL : mmu_psize_defs[psize].penc; | ||
404 | |||
405 | lpar_rc = beat_invalidate_htab_entry3(0, slot, want_v, pss); | ||
406 | |||
407 | /* E_busy can be valid output: page may be already replaced */ | ||
408 | BUG_ON(lpar_rc != 0 && lpar_rc != 0xfffffff7); | ||
409 | } | ||
410 | |||
411 | static int64_t _beat_lpar_hptab_clear_v3(void) | ||
412 | { | ||
413 | return beat_clear_htab3(0); | ||
414 | } | ||
415 | |||
416 | static void beat_lpar_hptab_clear_v3(void) | ||
417 | { | ||
418 | _beat_lpar_hptab_clear_v3(); | ||
419 | } | ||
420 | |||
421 | void __init hpte_init_beat_v3(void) | ||
422 | { | ||
423 | if (_beat_lpar_hptab_clear_v3() == 0) { | ||
424 | ppc_md.hpte_invalidate = beat_lpar_hpte_invalidate_v3; | ||
425 | ppc_md.hpte_updatepp = beat_lpar_hpte_updatepp_v3; | ||
426 | ppc_md.hpte_updateboltedpp = beat_lpar_hpte_updateboltedpp; | ||
427 | ppc_md.hpte_insert = beat_lpar_hpte_insert_v3; | ||
428 | ppc_md.hpte_remove = beat_lpar_hpte_remove; | ||
429 | ppc_md.hpte_clear_all = beat_lpar_hptab_clear_v3; | ||
430 | } else { | ||
431 | ppc_md.hpte_invalidate = beat_lpar_hpte_invalidate; | ||
432 | ppc_md.hpte_updatepp = beat_lpar_hpte_updatepp; | ||
433 | ppc_md.hpte_updateboltedpp = beat_lpar_hpte_updateboltedpp; | ||
434 | ppc_md.hpte_insert = beat_lpar_hpte_insert; | ||
435 | ppc_md.hpte_remove = beat_lpar_hpte_remove; | ||
436 | ppc_md.hpte_clear_all = beat_lpar_hptab_clear; | ||
437 | } | ||
438 | } | ||
diff --git a/arch/powerpc/platforms/celleb/interrupt.c b/arch/powerpc/platforms/celleb/interrupt.c index 98e6665681d3..c7c68ca70c82 100644 --- a/arch/powerpc/platforms/celleb/interrupt.c +++ b/arch/powerpc/platforms/celleb/interrupt.c | |||
@@ -175,11 +175,18 @@ static int beatic_pic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int beatic_pic_host_match(struct irq_host *h, struct device_node *np) | ||
179 | { | ||
180 | /* Match all */ | ||
181 | return 1; | ||
182 | } | ||
183 | |||
178 | static struct irq_host_ops beatic_pic_host_ops = { | 184 | static struct irq_host_ops beatic_pic_host_ops = { |
179 | .map = beatic_pic_host_map, | 185 | .map = beatic_pic_host_map, |
180 | .remap = beatic_pic_host_remap, | 186 | .remap = beatic_pic_host_remap, |
181 | .unmap = beatic_pic_host_unmap, | 187 | .unmap = beatic_pic_host_unmap, |
182 | .xlate = beatic_pic_host_xlate, | 188 | .xlate = beatic_pic_host_xlate, |
189 | .match = beatic_pic_host_match, | ||
183 | }; | 190 | }; |
184 | 191 | ||
185 | /* | 192 | /* |
@@ -242,7 +249,7 @@ void __init beatic_init_IRQ(void) | |||
242 | ppc_md.get_irq = beatic_get_irq; | 249 | ppc_md.get_irq = beatic_get_irq; |
243 | 250 | ||
244 | /* Allocate an irq host */ | 251 | /* Allocate an irq host */ |
245 | beatic_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, | 252 | beatic_host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, |
246 | &beatic_pic_host_ops, | 253 | &beatic_pic_host_ops, |
247 | 0); | 254 | 0); |
248 | BUG_ON(beatic_host == NULL); | 255 | BUG_ON(beatic_host == NULL); |
diff --git a/arch/powerpc/platforms/celleb/io-workarounds.c b/arch/powerpc/platforms/celleb/io-workarounds.c new file mode 100644 index 000000000000..2b912140bcbb --- /dev/null +++ b/arch/powerpc/platforms/celleb/io-workarounds.c | |||
@@ -0,0 +1,279 @@ | |||
1 | /* | ||
2 | * Support for Celleb io workarounds | ||
3 | * | ||
4 | * (C) Copyright 2006-2007 TOSHIBA CORPORATION | ||
5 | * | ||
6 | * This file is based to arch/powerpc/platform/cell/io-workarounds.c | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | */ | ||
22 | |||
23 | #undef DEBUG | ||
24 | |||
25 | #include <linux/of_device.h> | ||
26 | #include <linux/irq.h> | ||
27 | |||
28 | #include <asm/io.h> | ||
29 | #include <asm/prom.h> | ||
30 | #include <asm/machdep.h> | ||
31 | #include <asm/pci-bridge.h> | ||
32 | #include <asm/ppc-pci.h> | ||
33 | |||
34 | #include "pci.h" | ||
35 | |||
36 | #define MAX_CELLEB_PCI_BUS 4 | ||
37 | |||
38 | void *celleb_dummy_page_va; | ||
39 | |||
40 | static struct celleb_pci_bus { | ||
41 | struct pci_controller *phb; | ||
42 | void (*dummy_read)(struct pci_controller *); | ||
43 | } celleb_pci_busses[MAX_CELLEB_PCI_BUS]; | ||
44 | |||
45 | static int celleb_pci_count = 0; | ||
46 | |||
47 | static struct celleb_pci_bus *celleb_pci_find(unsigned long vaddr, | ||
48 | unsigned long paddr) | ||
49 | { | ||
50 | int i, j; | ||
51 | struct resource *res; | ||
52 | |||
53 | for (i = 0; i < celleb_pci_count; i++) { | ||
54 | struct celleb_pci_bus *bus = &celleb_pci_busses[i]; | ||
55 | struct pci_controller *phb = bus->phb; | ||
56 | if (paddr) | ||
57 | for (j = 0; j < 3; j++) { | ||
58 | res = &phb->mem_resources[j]; | ||
59 | if (paddr >= res->start && paddr <= res->end) | ||
60 | return bus; | ||
61 | } | ||
62 | res = &phb->io_resource; | ||
63 | if (vaddr && vaddr >= res->start && vaddr <= res->end) | ||
64 | return bus; | ||
65 | } | ||
66 | return NULL; | ||
67 | } | ||
68 | |||
69 | static void celleb_io_flush(const PCI_IO_ADDR addr) | ||
70 | { | ||
71 | struct celleb_pci_bus *bus; | ||
72 | int token; | ||
73 | |||
74 | token = PCI_GET_ADDR_TOKEN(addr); | ||
75 | |||
76 | if (token && token <= celleb_pci_count) | ||
77 | bus = &celleb_pci_busses[token - 1]; | ||
78 | else { | ||
79 | unsigned long vaddr, paddr; | ||
80 | pte_t *ptep; | ||
81 | |||
82 | vaddr = (unsigned long)PCI_FIX_ADDR(addr); | ||
83 | if (vaddr < PHB_IO_BASE || vaddr >= PHB_IO_END) | ||
84 | return; | ||
85 | |||
86 | ptep = find_linux_pte(init_mm.pgd, vaddr); | ||
87 | if (ptep == NULL) | ||
88 | paddr = 0; | ||
89 | else | ||
90 | paddr = pte_pfn(*ptep) << PAGE_SHIFT; | ||
91 | bus = celleb_pci_find(vaddr, paddr); | ||
92 | |||
93 | if (bus == NULL) | ||
94 | return; | ||
95 | } | ||
96 | |||
97 | if (bus->dummy_read) | ||
98 | bus->dummy_read(bus->phb); | ||
99 | } | ||
100 | |||
101 | static u8 celleb_readb(const PCI_IO_ADDR addr) | ||
102 | { | ||
103 | u8 val; | ||
104 | val = __do_readb(addr); | ||
105 | celleb_io_flush(addr); | ||
106 | return val; | ||
107 | } | ||
108 | |||
109 | static u16 celleb_readw(const PCI_IO_ADDR addr) | ||
110 | { | ||
111 | u16 val; | ||
112 | val = __do_readw(addr); | ||
113 | celleb_io_flush(addr); | ||
114 | return val; | ||
115 | } | ||
116 | |||
117 | static u32 celleb_readl(const PCI_IO_ADDR addr) | ||
118 | { | ||
119 | u32 val; | ||
120 | val = __do_readl(addr); | ||
121 | celleb_io_flush(addr); | ||
122 | return val; | ||
123 | } | ||
124 | |||
125 | static u64 celleb_readq(const PCI_IO_ADDR addr) | ||
126 | { | ||
127 | u64 val; | ||
128 | val = __do_readq(addr); | ||
129 | celleb_io_flush(addr); | ||
130 | return val; | ||
131 | } | ||
132 | |||
133 | static u16 celleb_readw_be(const PCI_IO_ADDR addr) | ||
134 | { | ||
135 | u16 val; | ||
136 | val = __do_readw_be(addr); | ||
137 | celleb_io_flush(addr); | ||
138 | return val; | ||
139 | } | ||
140 | |||
141 | static u32 celleb_readl_be(const PCI_IO_ADDR addr) | ||
142 | { | ||
143 | u32 val; | ||
144 | val = __do_readl_be(addr); | ||
145 | celleb_io_flush(addr); | ||
146 | return val; | ||
147 | } | ||
148 | |||
149 | static u64 celleb_readq_be(const PCI_IO_ADDR addr) | ||
150 | { | ||
151 | u64 val; | ||
152 | val = __do_readq_be(addr); | ||
153 | celleb_io_flush(addr); | ||
154 | return val; | ||
155 | } | ||
156 | |||
157 | static void celleb_readsb(const PCI_IO_ADDR addr, | ||
158 | void *buf, unsigned long count) | ||
159 | { | ||
160 | __do_readsb(addr, buf, count); | ||
161 | celleb_io_flush(addr); | ||
162 | } | ||
163 | |||
164 | static void celleb_readsw(const PCI_IO_ADDR addr, | ||
165 | void *buf, unsigned long count) | ||
166 | { | ||
167 | __do_readsw(addr, buf, count); | ||
168 | celleb_io_flush(addr); | ||
169 | } | ||
170 | |||
171 | static void celleb_readsl(const PCI_IO_ADDR addr, | ||
172 | void *buf, unsigned long count) | ||
173 | { | ||
174 | __do_readsl(addr, buf, count); | ||
175 | celleb_io_flush(addr); | ||
176 | } | ||
177 | |||
178 | static void celleb_memcpy_fromio(void *dest, | ||
179 | const PCI_IO_ADDR src, | ||
180 | unsigned long n) | ||
181 | { | ||
182 | __do_memcpy_fromio(dest, src, n); | ||
183 | celleb_io_flush(src); | ||
184 | } | ||
185 | |||
186 | static void __iomem *celleb_ioremap(unsigned long addr, | ||
187 | unsigned long size, | ||
188 | unsigned long flags) | ||
189 | { | ||
190 | struct celleb_pci_bus *bus; | ||
191 | void __iomem *res = __ioremap(addr, size, flags); | ||
192 | int busno; | ||
193 | |||
194 | bus = celleb_pci_find(0, addr); | ||
195 | if (bus != NULL) { | ||
196 | busno = bus - celleb_pci_busses; | ||
197 | PCI_SET_ADDR_TOKEN(res, busno + 1); | ||
198 | } | ||
199 | return res; | ||
200 | } | ||
201 | |||
202 | static void celleb_iounmap(volatile void __iomem *addr) | ||
203 | { | ||
204 | return __iounmap(PCI_FIX_ADDR(addr)); | ||
205 | } | ||
206 | |||
207 | static struct ppc_pci_io celleb_pci_io __initdata = { | ||
208 | .readb = celleb_readb, | ||
209 | .readw = celleb_readw, | ||
210 | .readl = celleb_readl, | ||
211 | .readq = celleb_readq, | ||
212 | .readw_be = celleb_readw_be, | ||
213 | .readl_be = celleb_readl_be, | ||
214 | .readq_be = celleb_readq_be, | ||
215 | .readsb = celleb_readsb, | ||
216 | .readsw = celleb_readsw, | ||
217 | .readsl = celleb_readsl, | ||
218 | .memcpy_fromio = celleb_memcpy_fromio, | ||
219 | }; | ||
220 | |||
221 | void __init celleb_pci_add_one(struct pci_controller *phb, | ||
222 | void (*dummy_read)(struct pci_controller *)) | ||
223 | { | ||
224 | struct celleb_pci_bus *bus = &celleb_pci_busses[celleb_pci_count]; | ||
225 | struct device_node *np = phb->arch_data; | ||
226 | |||
227 | if (celleb_pci_count >= MAX_CELLEB_PCI_BUS) { | ||
228 | printk(KERN_ERR "Too many pci bridges, workarounds" | ||
229 | " disabled for %s\n", np->full_name); | ||
230 | return; | ||
231 | } | ||
232 | |||
233 | celleb_pci_count++; | ||
234 | |||
235 | bus->phb = phb; | ||
236 | bus->dummy_read = dummy_read; | ||
237 | } | ||
238 | |||
239 | static struct of_device_id celleb_pci_workaround_match[] __initdata = { | ||
240 | { | ||
241 | .name = "pci-pseudo", | ||
242 | .data = fake_pci_workaround_init, | ||
243 | }, { | ||
244 | .name = "epci", | ||
245 | .data = epci_workaround_init, | ||
246 | }, { | ||
247 | }, | ||
248 | }; | ||
249 | |||
250 | int __init celleb_pci_workaround_init(void) | ||
251 | { | ||
252 | struct pci_controller *phb; | ||
253 | struct device_node *node; | ||
254 | const struct of_device_id *match; | ||
255 | void (*init_func)(struct pci_controller *); | ||
256 | |||
257 | celleb_dummy_page_va = kmalloc(PAGE_SIZE, GFP_KERNEL); | ||
258 | if (!celleb_dummy_page_va) { | ||
259 | printk(KERN_ERR "Celleb: dummy read disabled." | ||
260 | "Alloc celleb_dummy_page_va failed\n"); | ||
261 | return 1; | ||
262 | } | ||
263 | |||
264 | list_for_each_entry(phb, &hose_list, list_node) { | ||
265 | node = phb->arch_data; | ||
266 | match = of_match_node(celleb_pci_workaround_match, node); | ||
267 | |||
268 | if (match) { | ||
269 | init_func = match->data; | ||
270 | (*init_func)(phb); | ||
271 | } | ||
272 | } | ||
273 | |||
274 | ppc_pci_io = celleb_pci_io; | ||
275 | ppc_md.ioremap = celleb_ioremap; | ||
276 | ppc_md.iounmap = celleb_iounmap; | ||
277 | |||
278 | return 0; | ||
279 | } | ||
diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c index e9ac19c4bba4..6bc32fda7a6b 100644 --- a/arch/powerpc/platforms/celleb/pci.c +++ b/arch/powerpc/platforms/celleb/pci.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/bootmem.h> | 32 | #include <linux/bootmem.h> |
33 | #include <linux/pci_regs.h> | 33 | #include <linux/pci_regs.h> |
34 | #include <linux/of_device.h> | ||
34 | 35 | ||
35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
36 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
@@ -242,8 +243,8 @@ static int celleb_fake_pci_write_config(struct pci_bus *bus, | |||
242 | } | 243 | } |
243 | 244 | ||
244 | static struct pci_ops celleb_fake_pci_ops = { | 245 | static struct pci_ops celleb_fake_pci_ops = { |
245 | celleb_fake_pci_read_config, | 246 | .read = celleb_fake_pci_read_config, |
246 | celleb_fake_pci_write_config | 247 | .write = celleb_fake_pci_write_config, |
247 | }; | 248 | }; |
248 | 249 | ||
249 | static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose, | 250 | static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose, |
@@ -288,8 +289,8 @@ static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose, | |||
288 | celleb_config_write_fake(config, PCI_COMMAND, 2, val); | 289 | celleb_config_write_fake(config, PCI_COMMAND, 2, val); |
289 | } | 290 | } |
290 | 291 | ||
291 | static int __devinit celleb_setup_fake_pci_device(struct device_node *node, | 292 | static int __init celleb_setup_fake_pci_device(struct device_node *node, |
292 | struct pci_controller *hose) | 293 | struct pci_controller *hose) |
293 | { | 294 | { |
294 | unsigned int rlen; | 295 | unsigned int rlen; |
295 | int num_base_addr = 0; | 296 | int num_base_addr = 0; |
@@ -327,10 +328,7 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node, | |||
327 | 328 | ||
328 | size = 256; | 329 | size = 256; |
329 | config = &private->fake_config[devno][fn]; | 330 | config = &private->fake_config[devno][fn]; |
330 | if (mem_init_done) | 331 | *config = alloc_maybe_bootmem(size, GFP_KERNEL); |
331 | *config = kzalloc(size, GFP_KERNEL); | ||
332 | else | ||
333 | *config = alloc_bootmem(size); | ||
334 | if (*config == NULL) { | 332 | if (*config == NULL) { |
335 | printk(KERN_ERR "PCI: " | 333 | printk(KERN_ERR "PCI: " |
336 | "not enough memory for fake configuration space\n"); | 334 | "not enough memory for fake configuration space\n"); |
@@ -341,10 +339,7 @@ static int __devinit celleb_setup_fake_pci_device(struct device_node *node, | |||
341 | 339 | ||
342 | size = sizeof(struct celleb_pci_resource); | 340 | size = sizeof(struct celleb_pci_resource); |
343 | res = &private->res[devno][fn]; | 341 | res = &private->res[devno][fn]; |
344 | if (mem_init_done) | 342 | *res = alloc_maybe_bootmem(size, GFP_KERNEL); |
345 | *res = kzalloc(size, GFP_KERNEL); | ||
346 | else | ||
347 | *res = alloc_bootmem(size); | ||
348 | if (*res == NULL) { | 343 | if (*res == NULL) { |
349 | printk(KERN_ERR | 344 | printk(KERN_ERR |
350 | "PCI: not enough memory for resource data space\n"); | 345 | "PCI: not enough memory for resource data space\n"); |
@@ -418,8 +413,8 @@ error: | |||
418 | return 1; | 413 | return 1; |
419 | } | 414 | } |
420 | 415 | ||
421 | static int __devinit phb_set_bus_ranges(struct device_node *dev, | 416 | static int __init phb_set_bus_ranges(struct device_node *dev, |
422 | struct pci_controller *phb) | 417 | struct pci_controller *phb) |
423 | { | 418 | { |
424 | const int *bus_range; | 419 | const int *bus_range; |
425 | unsigned int len; | 420 | unsigned int len; |
@@ -434,46 +429,65 @@ static int __devinit phb_set_bus_ranges(struct device_node *dev, | |||
434 | return 0; | 429 | return 0; |
435 | } | 430 | } |
436 | 431 | ||
437 | static void __devinit celleb_alloc_private_mem(struct pci_controller *hose) | 432 | static void __init celleb_alloc_private_mem(struct pci_controller *hose) |
438 | { | 433 | { |
439 | if (mem_init_done) | 434 | hose->private_data = |
440 | hose->private_data = | 435 | alloc_maybe_bootmem(sizeof(struct celleb_pci_private), |
441 | kzalloc(sizeof(struct celleb_pci_private), GFP_KERNEL); | 436 | GFP_KERNEL); |
442 | else | ||
443 | hose->private_data = | ||
444 | alloc_bootmem(sizeof(struct celleb_pci_private)); | ||
445 | } | 437 | } |
446 | 438 | ||
447 | int __devinit celleb_setup_phb(struct pci_controller *phb) | 439 | static int __init celleb_setup_fake_pci(struct device_node *dev, |
440 | struct pci_controller *phb) | ||
448 | { | 441 | { |
449 | const char *name; | ||
450 | struct device_node *dev = phb->arch_data; | ||
451 | struct device_node *node; | 442 | struct device_node *node; |
452 | unsigned int rlen; | ||
453 | 443 | ||
454 | name = of_get_property(dev, "name", &rlen); | 444 | phb->ops = &celleb_fake_pci_ops; |
455 | if (!name) | 445 | celleb_alloc_private_mem(phb); |
456 | return 1; | ||
457 | 446 | ||
458 | pr_debug("PCI: celleb_setup_phb() %s\n", name); | 447 | for (node = of_get_next_child(dev, NULL); |
459 | phb_set_bus_ranges(dev, phb); | 448 | node != NULL; node = of_get_next_child(dev, node)) |
460 | phb->buid = 1; | 449 | celleb_setup_fake_pci_device(node, phb); |
450 | |||
451 | return 0; | ||
452 | } | ||
461 | 453 | ||
462 | if (strcmp(name, "epci") == 0) { | 454 | void __init fake_pci_workaround_init(struct pci_controller *phb) |
463 | phb->ops = &celleb_epci_ops; | 455 | { |
464 | return celleb_setup_epci(dev, phb); | 456 | /** |
457 | * We will add fake pci bus to scc_pci_bus for the purpose to improve | ||
458 | * I/O Macro performance. But device-tree and device drivers | ||
459 | * are not ready to use address with a token. | ||
460 | */ | ||
461 | |||
462 | /* celleb_pci_add_one(phb, NULL); */ | ||
463 | } | ||
465 | 464 | ||
466 | } else if (strcmp(name, "pci-pseudo") == 0) { | 465 | static struct of_device_id celleb_phb_match[] __initdata = { |
467 | phb->ops = &celleb_fake_pci_ops; | 466 | { |
468 | celleb_alloc_private_mem(phb); | 467 | .name = "pci-pseudo", |
469 | for (node = of_get_next_child(dev, NULL); | 468 | .data = celleb_setup_fake_pci, |
470 | node != NULL; node = of_get_next_child(dev, node)) | 469 | }, { |
471 | celleb_setup_fake_pci_device(node, phb); | 470 | .name = "epci", |
471 | .data = celleb_setup_epci, | ||
472 | }, { | ||
473 | }, | ||
474 | }; | ||
472 | 475 | ||
473 | } else | 476 | int __init celleb_setup_phb(struct pci_controller *phb) |
477 | { | ||
478 | struct device_node *dev = phb->arch_data; | ||
479 | const struct of_device_id *match; | ||
480 | int (*setup_func)(struct device_node *, struct pci_controller *); | ||
481 | |||
482 | match = of_match_node(celleb_phb_match, dev); | ||
483 | if (!match) | ||
474 | return 1; | 484 | return 1; |
475 | 485 | ||
476 | return 0; | 486 | phb_set_bus_ranges(dev, phb); |
487 | phb->buid = 1; | ||
488 | |||
489 | setup_func = match->data; | ||
490 | return (*setup_func)(dev, phb); | ||
477 | } | 491 | } |
478 | 492 | ||
479 | int celleb_pci_probe_mode(struct pci_bus *bus) | 493 | int celleb_pci_probe_mode(struct pci_bus *bus) |
diff --git a/arch/powerpc/platforms/celleb/pci.h b/arch/powerpc/platforms/celleb/pci.h index 5340e348e297..5d5544ffeddb 100644 --- a/arch/powerpc/platforms/celleb/pci.h +++ b/arch/powerpc/platforms/celleb/pci.h | |||
@@ -25,11 +25,18 @@ | |||
25 | 25 | ||
26 | #include <asm/pci-bridge.h> | 26 | #include <asm/pci-bridge.h> |
27 | #include <asm/prom.h> | 27 | #include <asm/prom.h> |
28 | #include <asm/ppc-pci.h> | ||
28 | 29 | ||
29 | extern int celleb_setup_phb(struct pci_controller *); | 30 | extern int celleb_setup_phb(struct pci_controller *); |
30 | extern int celleb_pci_probe_mode(struct pci_bus *); | 31 | extern int celleb_pci_probe_mode(struct pci_bus *); |
31 | 32 | ||
32 | extern struct pci_ops celleb_epci_ops; | ||
33 | extern int celleb_setup_epci(struct device_node *, struct pci_controller *); | 33 | extern int celleb_setup_epci(struct device_node *, struct pci_controller *); |
34 | 34 | ||
35 | extern void *celleb_dummy_page_va; | ||
36 | extern int __init celleb_pci_workaround_init(void); | ||
37 | extern void __init celleb_pci_add_one(struct pci_controller *, | ||
38 | void (*)(struct pci_controller *)); | ||
39 | extern void fake_pci_workaround_init(struct pci_controller *); | ||
40 | extern void epci_workaround_init(struct pci_controller *); | ||
41 | |||
35 | #endif /* _CELLEB_PCI_H */ | 42 | #endif /* _CELLEB_PCI_H */ |
diff --git a/arch/powerpc/platforms/celleb/scc.h b/arch/powerpc/platforms/celleb/scc.h index e9ce8a7c1882..6be1542a6e66 100644 --- a/arch/powerpc/platforms/celleb/scc.h +++ b/arch/powerpc/platforms/celleb/scc.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define SCC_EPCI_STATUS 0x808 | 53 | #define SCC_EPCI_STATUS 0x808 |
54 | #define SCC_EPCI_ABTSET 0x80c | 54 | #define SCC_EPCI_ABTSET 0x80c |
55 | #define SCC_EPCI_WATRP 0x810 | 55 | #define SCC_EPCI_WATRP 0x810 |
56 | #define SCC_EPCI_DUMMYRADR 0x814 | 56 | #define SCC_EPCI_DUMYRADR 0x814 |
57 | #define SCC_EPCI_SWRESP 0x818 | 57 | #define SCC_EPCI_SWRESP 0x818 |
58 | #define SCC_EPCI_CNTOPT 0x81c | 58 | #define SCC_EPCI_CNTOPT 0x81c |
59 | #define SCC_EPCI_ECMODE 0xf00 | 59 | #define SCC_EPCI_ECMODE 0xf00 |
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c index c4b011094bd6..9d076426676c 100644 --- a/arch/powerpc/platforms/celleb/scc_epci.c +++ b/arch/powerpc/platforms/celleb/scc_epci.c | |||
@@ -43,7 +43,11 @@ | |||
43 | 43 | ||
44 | #define iob() __asm__ __volatile__("eieio; sync":::"memory") | 44 | #define iob() __asm__ __volatile__("eieio; sync":::"memory") |
45 | 45 | ||
46 | static inline volatile void __iomem *celleb_epci_get_epci_base( | 46 | struct epci_private { |
47 | dma_addr_t dummy_page_da; | ||
48 | }; | ||
49 | |||
50 | static inline PCI_IO_ADDR celleb_epci_get_epci_base( | ||
47 | struct pci_controller *hose) | 51 | struct pci_controller *hose) |
48 | { | 52 | { |
49 | /* | 53 | /* |
@@ -55,7 +59,7 @@ static inline volatile void __iomem *celleb_epci_get_epci_base( | |||
55 | return hose->cfg_addr; | 59 | return hose->cfg_addr; |
56 | } | 60 | } |
57 | 61 | ||
58 | static inline volatile void __iomem *celleb_epci_get_epci_cfg( | 62 | static inline PCI_IO_ADDR celleb_epci_get_epci_cfg( |
59 | struct pci_controller *hose) | 63 | struct pci_controller *hose) |
60 | { | 64 | { |
61 | /* | 65 | /* |
@@ -67,20 +71,11 @@ static inline volatile void __iomem *celleb_epci_get_epci_cfg( | |||
67 | return hose->cfg_data; | 71 | return hose->cfg_data; |
68 | } | 72 | } |
69 | 73 | ||
70 | #if 0 /* test code for epci dummy read */ | 74 | static void scc_epci_dummy_read(struct pci_controller *hose) |
71 | static void celleb_epci_dummy_read(struct pci_dev *dev) | ||
72 | { | 75 | { |
73 | volatile void __iomem *epci_base; | 76 | PCI_IO_ADDR epci_base; |
74 | struct device_node *node; | ||
75 | struct pci_controller *hose; | ||
76 | u32 val; | 77 | u32 val; |
77 | 78 | ||
78 | node = (struct device_node *)dev->bus->sysdata; | ||
79 | hose = pci_find_hose_for_OF_device(node); | ||
80 | |||
81 | if (!hose) | ||
82 | return; | ||
83 | |||
84 | epci_base = celleb_epci_get_epci_base(hose); | 79 | epci_base = celleb_epci_get_epci_base(hose); |
85 | 80 | ||
86 | val = in_be32(epci_base + SCC_EPCI_WATRP); | 81 | val = in_be32(epci_base + SCC_EPCI_WATRP); |
@@ -88,21 +83,45 @@ static void celleb_epci_dummy_read(struct pci_dev *dev) | |||
88 | 83 | ||
89 | return; | 84 | return; |
90 | } | 85 | } |
91 | #endif | 86 | |
87 | void __init epci_workaround_init(struct pci_controller *hose) | ||
88 | { | ||
89 | PCI_IO_ADDR epci_base; | ||
90 | PCI_IO_ADDR reg; | ||
91 | struct epci_private *private = hose->private_data; | ||
92 | |||
93 | BUG_ON(!private); | ||
94 | |||
95 | private->dummy_page_da = dma_map_single(hose->parent, | ||
96 | celleb_dummy_page_va, PAGE_SIZE, DMA_FROM_DEVICE); | ||
97 | if (private->dummy_page_da == DMA_ERROR_CODE) { | ||
98 | printk(KERN_ERR "EPCI: dummy read disabled." | ||
99 | "Map dummy page failed.\n"); | ||
100 | return; | ||
101 | } | ||
102 | |||
103 | celleb_pci_add_one(hose, scc_epci_dummy_read); | ||
104 | epci_base = celleb_epci_get_epci_base(hose); | ||
105 | |||
106 | reg = epci_base + SCC_EPCI_DUMYRADR; | ||
107 | out_be32(reg, private->dummy_page_da); | ||
108 | } | ||
92 | 109 | ||
93 | static inline void clear_and_disable_master_abort_interrupt( | 110 | static inline void clear_and_disable_master_abort_interrupt( |
94 | struct pci_controller *hose) | 111 | struct pci_controller *hose) |
95 | { | 112 | { |
96 | volatile void __iomem *epci_base, *reg; | 113 | PCI_IO_ADDR epci_base; |
114 | PCI_IO_ADDR reg; | ||
97 | epci_base = celleb_epci_get_epci_base(hose); | 115 | epci_base = celleb_epci_get_epci_base(hose); |
98 | reg = epci_base + PCI_COMMAND; | 116 | reg = epci_base + PCI_COMMAND; |
99 | out_be32(reg, in_be32(reg) | (PCI_STATUS_REC_MASTER_ABORT << 16)); | 117 | out_be32(reg, in_be32(reg) | (PCI_STATUS_REC_MASTER_ABORT << 16)); |
100 | } | 118 | } |
101 | 119 | ||
102 | static int celleb_epci_check_abort(struct pci_controller *hose, | 120 | static int celleb_epci_check_abort(struct pci_controller *hose, |
103 | volatile void __iomem *addr) | 121 | PCI_IO_ADDR addr) |
104 | { | 122 | { |
105 | volatile void __iomem *reg, *epci_base; | 123 | PCI_IO_ADDR reg; |
124 | PCI_IO_ADDR epci_base; | ||
106 | u32 val; | 125 | u32 val; |
107 | 126 | ||
108 | iob(); | 127 | iob(); |
@@ -132,12 +151,12 @@ static int celleb_epci_check_abort(struct pci_controller *hose, | |||
132 | return PCIBIOS_SUCCESSFUL; | 151 | return PCIBIOS_SUCCESSFUL; |
133 | } | 152 | } |
134 | 153 | ||
135 | static volatile void __iomem *celleb_epci_make_config_addr( | 154 | static PCI_IO_ADDR celleb_epci_make_config_addr( |
136 | struct pci_bus *bus, | 155 | struct pci_bus *bus, |
137 | struct pci_controller *hose, | 156 | struct pci_controller *hose, |
138 | unsigned int devfn, int where) | 157 | unsigned int devfn, int where) |
139 | { | 158 | { |
140 | volatile void __iomem *addr; | 159 | PCI_IO_ADDR addr; |
141 | 160 | ||
142 | if (bus != hose->bus) | 161 | if (bus != hose->bus) |
143 | addr = celleb_epci_get_epci_cfg(hose) + | 162 | addr = celleb_epci_get_epci_cfg(hose) + |
@@ -157,7 +176,8 @@ static volatile void __iomem *celleb_epci_make_config_addr( | |||
157 | static int celleb_epci_read_config(struct pci_bus *bus, | 176 | static int celleb_epci_read_config(struct pci_bus *bus, |
158 | unsigned int devfn, int where, int size, u32 * val) | 177 | unsigned int devfn, int where, int size, u32 * val) |
159 | { | 178 | { |
160 | volatile void __iomem *epci_base, *addr; | 179 | PCI_IO_ADDR epci_base; |
180 | PCI_IO_ADDR addr; | ||
161 | struct device_node *node; | 181 | struct device_node *node; |
162 | struct pci_controller *hose; | 182 | struct pci_controller *hose; |
163 | 183 | ||
@@ -220,7 +240,8 @@ static int celleb_epci_read_config(struct pci_bus *bus, | |||
220 | static int celleb_epci_write_config(struct pci_bus *bus, | 240 | static int celleb_epci_write_config(struct pci_bus *bus, |
221 | unsigned int devfn, int where, int size, u32 val) | 241 | unsigned int devfn, int where, int size, u32 val) |
222 | { | 242 | { |
223 | volatile void __iomem *epci_base, *addr; | 243 | PCI_IO_ADDR epci_base; |
244 | PCI_IO_ADDR addr; | ||
224 | struct device_node *node; | 245 | struct device_node *node; |
225 | struct pci_controller *hose; | 246 | struct pci_controller *hose; |
226 | 247 | ||
@@ -278,15 +299,16 @@ static int celleb_epci_write_config(struct pci_bus *bus, | |||
278 | } | 299 | } |
279 | 300 | ||
280 | struct pci_ops celleb_epci_ops = { | 301 | struct pci_ops celleb_epci_ops = { |
281 | celleb_epci_read_config, | 302 | .read = celleb_epci_read_config, |
282 | celleb_epci_write_config, | 303 | .write = celleb_epci_write_config, |
283 | }; | 304 | }; |
284 | 305 | ||
285 | /* to be moved in FW */ | 306 | /* to be moved in FW */ |
286 | static int __devinit celleb_epci_init(struct pci_controller *hose) | 307 | static int __init celleb_epci_init(struct pci_controller *hose) |
287 | { | 308 | { |
288 | u32 val; | 309 | u32 val; |
289 | volatile void __iomem *reg, *epci_base; | 310 | PCI_IO_ADDR reg; |
311 | PCI_IO_ADDR epci_base; | ||
290 | int hwres = 0; | 312 | int hwres = 0; |
291 | 313 | ||
292 | epci_base = celleb_epci_get_epci_base(hose); | 314 | epci_base = celleb_epci_get_epci_base(hose); |
@@ -403,7 +425,7 @@ static int __devinit celleb_epci_init(struct pci_controller *hose) | |||
403 | return 0; | 425 | return 0; |
404 | } | 426 | } |
405 | 427 | ||
406 | int __devinit celleb_setup_epci(struct device_node *node, | 428 | int __init celleb_setup_epci(struct device_node *node, |
407 | struct pci_controller *hose) | 429 | struct pci_controller *hose) |
408 | { | 430 | { |
409 | struct resource r; | 431 | struct resource r; |
@@ -440,10 +462,24 @@ int __devinit celleb_setup_epci(struct device_node *node, | |||
440 | r.start, (unsigned long)hose->cfg_data, | 462 | r.start, (unsigned long)hose->cfg_data, |
441 | (r.end - r.start + 1)); | 463 | (r.end - r.start + 1)); |
442 | 464 | ||
465 | hose->private_data = kzalloc(sizeof(struct epci_private), GFP_KERNEL); | ||
466 | if (hose->private_data == NULL) { | ||
467 | printk(KERN_ERR "EPCI: no memory for private data.\n"); | ||
468 | goto error; | ||
469 | } | ||
470 | |||
471 | hose->ops = &celleb_epci_ops; | ||
443 | celleb_epci_init(hose); | 472 | celleb_epci_init(hose); |
444 | 473 | ||
445 | return 0; | 474 | return 0; |
446 | 475 | ||
447 | error: | 476 | error: |
477 | kfree(hose->private_data); | ||
478 | |||
479 | if (hose->cfg_addr) | ||
480 | iounmap(hose->cfg_addr); | ||
481 | |||
482 | if (hose->cfg_data) | ||
483 | iounmap(hose->cfg_data); | ||
448 | return 1; | 484 | return 1; |
449 | } | 485 | } |
diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/celleb/scc_sio.c index bcd25f54d986..610008211ca1 100644 --- a/arch/powerpc/platforms/celleb/scc_sio.c +++ b/arch/powerpc/platforms/celleb/scc_sio.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * setup serial port in SCC | 2 | * setup serial port in SCC |
3 | * | 3 | * |
4 | * (C) Copyright 2006 TOSHIBA CORPORATION | 4 | * (C) Copyright 2006-2007 TOSHIBA CORPORATION |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -28,58 +28,58 @@ | |||
28 | 28 | ||
29 | /* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024 | 29 | /* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024 |
30 | mmio=0xfff000-0x1000,0xff2000-0x1000 */ | 30 | mmio=0xfff000-0x1000,0xff2000-0x1000 */ |
31 | static int txx9_serial_bitmap = 0; | 31 | static int txx9_serial_bitmap __initdata = 0; |
32 | 32 | ||
33 | static struct { | 33 | static struct { |
34 | uint32_t offset; | 34 | uint32_t offset; |
35 | uint32_t index; | 35 | uint32_t index; |
36 | } txx9_scc_tab[3] = { | 36 | } txx9_scc_tab[3] __initdata = { |
37 | { 0x300, 0 }, /* 0xFFF300 */ | 37 | { 0x300, 0 }, /* 0xFFF300 */ |
38 | { 0x400, 0 }, /* 0xFFF400 */ | 38 | { 0x400, 0 }, /* 0xFFF400 */ |
39 | { 0x800, 1 } /* 0xFF2800 */ | 39 | { 0x800, 1 } /* 0xFF2800 */ |
40 | }; | 40 | }; |
41 | 41 | ||
42 | static int txx9_serial_init(void) | 42 | static int __init txx9_serial_init(void) |
43 | { | 43 | { |
44 | extern int early_serial_txx9_setup(struct uart_port *port); | 44 | extern int early_serial_txx9_setup(struct uart_port *port); |
45 | struct device_node *node; | 45 | struct device_node *node = NULL; |
46 | int i; | 46 | int i; |
47 | struct uart_port req; | 47 | struct uart_port req; |
48 | struct of_irq irq; | 48 | struct of_irq irq; |
49 | struct resource res; | 49 | struct resource res; |
50 | 50 | ||
51 | node = of_find_node_by_path("/ioif1/sio"); | 51 | while ((node = of_find_compatible_node(node, |
52 | if (!node) | 52 | "serial", "toshiba,sio-scc")) != NULL) { |
53 | return 0; | 53 | for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) { |
54 | if (!(txx9_serial_bitmap & (1<<i))) | ||
55 | continue; | ||
54 | 56 | ||
55 | for(i = 0; i < sizeof(txx9_scc_tab)/sizeof(txx9_scc_tab[0]); i++) { | 57 | if (of_irq_map_one(node, i, &irq)) |
56 | if (!(txx9_serial_bitmap & (1<<i))) | 58 | continue; |
57 | continue; | 59 | if (of_address_to_resource(node, |
60 | txx9_scc_tab[i].index, &res)) | ||
61 | continue; | ||
58 | 62 | ||
59 | if (of_irq_map_one(node, i, &irq)) | 63 | memset(&req, 0, sizeof(req)); |
60 | continue; | 64 | req.line = i; |
61 | if (of_address_to_resource(node, txx9_scc_tab[i].index, &res)) | 65 | req.iotype = UPIO_MEM; |
62 | continue; | 66 | req.mapbase = res.start + txx9_scc_tab[i].offset; |
63 | |||
64 | memset(&req, 0, sizeof(req)); | ||
65 | req.line = i; | ||
66 | req.iotype = UPIO_MEM; | ||
67 | req.mapbase = res.start + txx9_scc_tab[i].offset; | ||
68 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 67 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
69 | req.membase = ioremap(req.mapbase, 0x24); | 68 | req.membase = ioremap(req.mapbase, 0x24); |
70 | #endif | 69 | #endif |
71 | req.irq = irq_create_of_mapping(irq.controller, | 70 | req.irq = irq_create_of_mapping(irq.controller, |
72 | irq.specifier, irq.size); | 71 | irq.specifier, irq.size); |
73 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART /*HAVE_CTS_LINE*/; | 72 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART |
74 | req.uartclk = 83300000; | 73 | /*HAVE_CTS_LINE*/; |
75 | early_serial_txx9_setup(&req); | 74 | req.uartclk = 83300000; |
75 | early_serial_txx9_setup(&req); | ||
76 | } | ||
76 | } | 77 | } |
77 | 78 | ||
78 | of_node_put(node); | ||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | static int txx9_serial_config(char *ptr) | 82 | static int __init txx9_serial_config(char *ptr) |
83 | { | 83 | { |
84 | int i; | 84 | int i; |
85 | 85 | ||
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c index 5e9f7f163571..0f1dddb81cd2 100644 --- a/arch/powerpc/platforms/celleb/setup.c +++ b/arch/powerpc/platforms/celleb/setup.c | |||
@@ -73,7 +73,7 @@ static void celleb_show_cpuinfo(struct seq_file *m) | |||
73 | of_node_put(root); | 73 | of_node_put(root); |
74 | } | 74 | } |
75 | 75 | ||
76 | static int celleb_machine_type_hack(char *ptr) | 76 | static int __init celleb_machine_type_hack(char *ptr) |
77 | { | 77 | { |
78 | strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); | 78 | strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); |
79 | celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; | 79 | celleb_machine_type[sizeof(celleb_machine_type)-1] = 0; |
@@ -111,11 +111,6 @@ static void __init celleb_setup_arch(void) | |||
111 | #endif | 111 | #endif |
112 | } | 112 | } |
113 | 113 | ||
114 | static void beat_power_save(void) | ||
115 | { | ||
116 | beat_pause(0); | ||
117 | } | ||
118 | |||
119 | static int __init celleb_probe(void) | 114 | static int __init celleb_probe(void) |
120 | { | 115 | { |
121 | unsigned long root = of_get_flat_dt_root(); | 116 | unsigned long root = of_get_flat_dt_root(); |
@@ -124,18 +119,11 @@ static int __init celleb_probe(void) | |||
124 | return 0; | 119 | return 0; |
125 | 120 | ||
126 | powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE; | 121 | powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE; |
127 | hpte_init_beat(); | 122 | hpte_init_beat_v3(); |
128 | return 1; | 123 | return 1; |
129 | } | 124 | } |
130 | 125 | ||
131 | #ifdef CONFIG_KEXEC | 126 | static struct of_device_id celleb_bus_ids[] __initdata = { |
132 | static void celleb_kexec_cpu_down(int crash, int secondary) | ||
133 | { | ||
134 | beatic_deinit_IRQ(); | ||
135 | } | ||
136 | #endif | ||
137 | |||
138 | static struct of_device_id celleb_bus_ids[] = { | ||
139 | { .type = "scc", }, | 127 | { .type = "scc", }, |
140 | { .type = "ioif", }, /* old style */ | 128 | { .type = "ioif", }, /* old style */ |
141 | {}, | 129 | {}, |
@@ -149,6 +137,8 @@ static int __init celleb_publish_devices(void) | |||
149 | /* Publish OF platform devices for southbridge IOs */ | 137 | /* Publish OF platform devices for southbridge IOs */ |
150 | of_platform_bus_probe(NULL, celleb_bus_ids, NULL); | 138 | of_platform_bus_probe(NULL, celleb_bus_ids, NULL); |
151 | 139 | ||
140 | celleb_pci_workaround_init(); | ||
141 | |||
152 | return 0; | 142 | return 0; |
153 | } | 143 | } |
154 | device_initcall(celleb_publish_devices); | 144 | device_initcall(celleb_publish_devices); |
@@ -175,7 +165,7 @@ define_machine(celleb) { | |||
175 | .pci_probe_mode = celleb_pci_probe_mode, | 165 | .pci_probe_mode = celleb_pci_probe_mode, |
176 | .pci_setup_phb = celleb_setup_phb, | 166 | .pci_setup_phb = celleb_setup_phb, |
177 | #ifdef CONFIG_KEXEC | 167 | #ifdef CONFIG_KEXEC |
178 | .kexec_cpu_down = celleb_kexec_cpu_down, | 168 | .kexec_cpu_down = beat_kexec_cpu_down, |
179 | .machine_kexec = default_machine_kexec, | 169 | .machine_kexec = default_machine_kexec, |
180 | .machine_kexec_prepare = default_machine_kexec_prepare, | 170 | .machine_kexec_prepare = default_machine_kexec_prepare, |
181 | .machine_crash_shutdown = default_machine_crash_shutdown, | 171 | .machine_crash_shutdown = default_machine_crash_shutdown, |
diff --git a/arch/powerpc/platforms/chrp/gg2.h b/arch/powerpc/platforms/chrp/gg2.h new file mode 100644 index 000000000000..341ae55b99fb --- /dev/null +++ b/arch/powerpc/platforms/chrp/gg2.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/gg2.h -- VLSI VAS96011/12 `Golden Gate 2' register definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | ||
5 | * | ||
6 | * This file is based on the following documentation: | ||
7 | * | ||
8 | * The VAS96011/12 Chipset, Data Book, Edition 1.0 | ||
9 | * VLSI Technology, Inc. | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file COPYING in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _ASMPPC_GG2_H | ||
17 | #define _ASMPPC_GG2_H | ||
18 | |||
19 | /* | ||
20 | * Memory Map (CHRP mode) | ||
21 | */ | ||
22 | |||
23 | #define GG2_PCI_MEM_BASE 0xc0000000 /* Peripheral memory space */ | ||
24 | #define GG2_ISA_MEM_BASE 0xf7000000 /* Peripheral memory alias */ | ||
25 | #define GG2_ISA_IO_BASE 0xf8000000 /* Peripheral I/O space */ | ||
26 | #define GG2_PCI_CONFIG_BASE 0xfec00000 /* PCI configuration space */ | ||
27 | #define GG2_INT_ACK_SPECIAL 0xfec80000 /* Interrupt acknowledge and */ | ||
28 | /* special PCI cycles */ | ||
29 | #define GG2_ROM_BASE0 0xff000000 /* ROM bank 0 */ | ||
30 | #define GG2_ROM_BASE1 0xff800000 /* ROM bank 1 */ | ||
31 | |||
32 | |||
33 | /* | ||
34 | * GG2 specific PCI Registers | ||
35 | */ | ||
36 | |||
37 | extern void __iomem *gg2_pci_config_base; /* kernel virtual address */ | ||
38 | |||
39 | #define GG2_PCI_BUSNO 0x40 /* Bus number */ | ||
40 | #define GG2_PCI_SUBBUSNO 0x41 /* Subordinate bus number */ | ||
41 | #define GG2_PCI_DISCCTR 0x42 /* Disconnect counter */ | ||
42 | #define GG2_PCI_PPC_CTRL 0x50 /* PowerPC interface control register */ | ||
43 | #define GG2_PCI_ADDR_MAP 0x5c /* Address map */ | ||
44 | #define GG2_PCI_PCI_CTRL 0x60 /* PCI interface control register */ | ||
45 | #define GG2_PCI_ROM_CTRL 0x70 /* ROM interface control register */ | ||
46 | #define GG2_PCI_ROM_TIME 0x74 /* ROM timing */ | ||
47 | #define GG2_PCI_CC_CTRL 0x80 /* Cache controller control register */ | ||
48 | #define GG2_PCI_DRAM_BANK0 0x90 /* Control register for DRAM bank #0 */ | ||
49 | #define GG2_PCI_DRAM_BANK1 0x94 /* Control register for DRAM bank #1 */ | ||
50 | #define GG2_PCI_DRAM_BANK2 0x98 /* Control register for DRAM bank #2 */ | ||
51 | #define GG2_PCI_DRAM_BANK3 0x9c /* Control register for DRAM bank #3 */ | ||
52 | #define GG2_PCI_DRAM_BANK4 0xa0 /* Control register for DRAM bank #4 */ | ||
53 | #define GG2_PCI_DRAM_BANK5 0xa4 /* Control register for DRAM bank #5 */ | ||
54 | #define GG2_PCI_DRAM_TIME0 0xb0 /* Timing parameters set #0 */ | ||
55 | #define GG2_PCI_DRAM_TIME1 0xb4 /* Timing parameters set #1 */ | ||
56 | #define GG2_PCI_DRAM_CTRL 0xc0 /* DRAM control */ | ||
57 | #define GG2_PCI_ERR_CTRL 0xd0 /* Error control register */ | ||
58 | #define GG2_PCI_ERR_STATUS 0xd4 /* Error status register */ | ||
59 | /* Cleared when read */ | ||
60 | |||
61 | #endif /* _ASMPPC_GG2_H */ | ||
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 28d1647b204e..e43465d34d29 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
14 | #include <asm/hydra.h> | 14 | #include <asm/hydra.h> |
15 | #include <asm/prom.h> | 15 | #include <asm/prom.h> |
16 | #include <asm/gg2.h> | ||
17 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
18 | #include <asm/sections.h> | 17 | #include <asm/sections.h> |
19 | #include <asm/pci-bridge.h> | 18 | #include <asm/pci-bridge.h> |
@@ -21,6 +20,7 @@ | |||
21 | #include <asm/rtas.h> | 20 | #include <asm/rtas.h> |
22 | 21 | ||
23 | #include "chrp.h" | 22 | #include "chrp.h" |
23 | #include "gg2.h" | ||
24 | 24 | ||
25 | /* LongTrail */ | 25 | /* LongTrail */ |
26 | void __iomem *gg2_pci_config_base; | 26 | void __iomem *gg2_pci_config_base; |
@@ -86,8 +86,8 @@ int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off, | |||
86 | 86 | ||
87 | static struct pci_ops gg2_pci_ops = | 87 | static struct pci_ops gg2_pci_ops = |
88 | { | 88 | { |
89 | gg2_read_config, | 89 | .read = gg2_read_config, |
90 | gg2_write_config | 90 | .write = gg2_write_config, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* | 93 | /* |
@@ -124,8 +124,8 @@ int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
124 | 124 | ||
125 | static struct pci_ops rtas_pci_ops = | 125 | static struct pci_ops rtas_pci_ops = |
126 | { | 126 | { |
127 | rtas_read_config, | 127 | .read = rtas_read_config, |
128 | rtas_write_config | 128 | .write = rtas_write_config, |
129 | }; | 129 | }; |
130 | 130 | ||
131 | volatile struct Hydra __iomem *Hydra = NULL; | 131 | volatile struct Hydra __iomem *Hydra = NULL; |
@@ -338,3 +338,32 @@ void chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105) | |||
338 | } | 338 | } |
339 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, | 339 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, |
340 | chrp_pci_fixup_winbond_ata); | 340 | chrp_pci_fixup_winbond_ata); |
341 | |||
342 | /* Pegasos2 firmware version 20040810 configures the built-in IDE controller | ||
343 | * in legacy mode, but sets the PCI registers to PCI native mode. | ||
344 | * The chip can only operate in legacy mode, so force the PCI class into legacy | ||
345 | * mode as well. The same fixup must be done to the class-code property in | ||
346 | * the IDE node /pci@80000000/ide@C,1 | ||
347 | */ | ||
348 | static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) | ||
349 | { | ||
350 | u8 progif; | ||
351 | struct pci_dev *viaisa; | ||
352 | |||
353 | if (!machine_is(chrp) || _chrp_type != _CHRP_Pegasos) | ||
354 | return; | ||
355 | if (viaide->irq != 14) | ||
356 | return; | ||
357 | |||
358 | viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); | ||
359 | if (!viaisa) | ||
360 | return; | ||
361 | printk("Fixing VIA IDE, force legacy mode on '%s'\n", viaide->dev.bus_id); | ||
362 | |||
363 | pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); | ||
364 | pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); | ||
365 | viaide->class &= ~0x5; | ||
366 | |||
367 | pci_dev_put(viaisa); | ||
368 | } | ||
369 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata); | ||
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 373de4c063db..96498ad7b943 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -32,13 +32,11 @@ | |||
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
34 | #include <linux/initrd.h> | 34 | #include <linux/initrd.h> |
35 | #include <linux/module.h> | ||
36 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
37 | 36 | ||
38 | #include <asm/io.h> | 37 | #include <asm/io.h> |
39 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
40 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
41 | #include <asm/gg2.h> | ||
42 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
43 | #include <asm/dma.h> | 41 | #include <asm/dma.h> |
44 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
@@ -52,6 +50,7 @@ | |||
52 | #include <asm/xmon.h> | 50 | #include <asm/xmon.h> |
53 | 51 | ||
54 | #include "chrp.h" | 52 | #include "chrp.h" |
53 | #include "gg2.h" | ||
55 | 54 | ||
56 | void rtas_indicator_progress(char *, unsigned short); | 55 | void rtas_indicator_progress(char *, unsigned short); |
57 | 56 | ||
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index 3ea0eb78568e..10a4a4d063b6 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c | |||
@@ -26,10 +26,8 @@ | |||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/prom.h> | 27 | #include <asm/prom.h> |
28 | #include <asm/smp.h> | 28 | #include <asm/smp.h> |
29 | #include <asm/residual.h> | ||
30 | #include <asm/time.h> | 29 | #include <asm/time.h> |
31 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
32 | #include <asm/smp.h> | ||
33 | #include <asm/mpic.h> | 31 | #include <asm/mpic.h> |
34 | #include <asm/rtas.h> | 32 | #include <asm/rtas.h> |
35 | 33 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig index 2d12f77e46bc..da66103009c6 100644 --- a/arch/powerpc/platforms/embedded6xx/Kconfig +++ b/arch/powerpc/platforms/embedded6xx/Kconfig | |||
@@ -1,9 +1,10 @@ | |||
1 | choice | 1 | config EMBEDDED6xx |
2 | prompt "Machine Type" | 2 | bool "Embedded 6xx/7xx/7xxx-based boards" |
3 | depends on EMBEDDED6xx | 3 | depends on PPC32 && BROKEN_ON_SMP && PPC_MULTIPLATFORM |
4 | 4 | ||
5 | config LINKSTATION | 5 | config LINKSTATION |
6 | bool "Linkstation / Kurobox(HG) from Buffalo" | 6 | bool "Linkstation / Kurobox(HG) from Buffalo" |
7 | depends on EMBEDDED6xx | ||
7 | select MPIC | 8 | select MPIC |
8 | select FSL_SOC | 9 | select FSL_SOC |
9 | select PPC_UDBG_16550 if SERIAL_8250 | 10 | select PPC_UDBG_16550 if SERIAL_8250 |
@@ -17,6 +18,7 @@ config LINKSTATION | |||
17 | 18 | ||
18 | config MPC7448HPC2 | 19 | config MPC7448HPC2 |
19 | bool "Freescale MPC7448HPC2(Taiga)" | 20 | bool "Freescale MPC7448HPC2(Taiga)" |
21 | depends on EMBEDDED6xx | ||
20 | select TSI108_BRIDGE | 22 | select TSI108_BRIDGE |
21 | select DEFAULT_UIMAGE | 23 | select DEFAULT_UIMAGE |
22 | select PPC_UDBG_16550 | 24 | select PPC_UDBG_16550 |
@@ -26,6 +28,7 @@ config MPC7448HPC2 | |||
26 | 28 | ||
27 | config PPC_HOLLY | 29 | config PPC_HOLLY |
28 | bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)" | 30 | bool "PPC750GX/CL with TSI10x bridge (Hickory/Holly)" |
31 | depends on EMBEDDED6xx | ||
29 | select TSI108_BRIDGE | 32 | select TSI108_BRIDGE |
30 | select PPC_UDBG_16550 | 33 | select PPC_UDBG_16550 |
31 | select WANT_DEVICE_TREE | 34 | select WANT_DEVICE_TREE |
@@ -35,12 +38,12 @@ config PPC_HOLLY | |||
35 | 38 | ||
36 | config PPC_PRPMC2800 | 39 | config PPC_PRPMC2800 |
37 | bool "Motorola-PrPMC2800" | 40 | bool "Motorola-PrPMC2800" |
41 | depends on EMBEDDED6xx | ||
38 | select MV64X60 | 42 | select MV64X60 |
39 | select NOT_COHERENT_CACHE | 43 | select NOT_COHERENT_CACHE |
40 | select WANT_DEVICE_TREE | 44 | select WANT_DEVICE_TREE |
41 | help | 45 | help |
42 | This option enables support for the Motorola PrPMC2800 board | 46 | This option enables support for the Motorola PrPMC2800 board |
43 | endchoice | ||
44 | 47 | ||
45 | config TSI108_BRIDGE | 48 | config TSI108_BRIDGE |
46 | bool | 49 | bool |
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c index 6292e36dc577..b6de2b5223dd 100644 --- a/arch/powerpc/platforms/embedded6xx/holly.c +++ b/arch/powerpc/platforms/embedded6xx/holly.c | |||
@@ -113,23 +113,11 @@ static void holly_remap_bridge(void) | |||
113 | 113 | ||
114 | static void __init holly_setup_arch(void) | 114 | static void __init holly_setup_arch(void) |
115 | { | 115 | { |
116 | struct device_node *cpu; | ||
117 | struct device_node *np; | 116 | struct device_node *np; |
118 | 117 | ||
119 | if (ppc_md.progress) | 118 | if (ppc_md.progress) |
120 | ppc_md.progress("holly_setup_arch():set_bridge", 0); | 119 | ppc_md.progress("holly_setup_arch():set_bridge", 0); |
121 | 120 | ||
122 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
123 | if (cpu) { | ||
124 | const unsigned int *fp; | ||
125 | |||
126 | fp = of_get_property(cpu, "clock-frequency", NULL); | ||
127 | if (fp) | ||
128 | loops_per_jiffy = *fp / HZ; | ||
129 | else | ||
130 | loops_per_jiffy = 50000000 / HZ; | ||
131 | of_node_put(cpu); | ||
132 | } | ||
133 | tsi108_csr_vir_base = get_vir_csrbase(); | 121 | tsi108_csr_vir_base = get_vir_csrbase(); |
134 | 122 | ||
135 | /* setup PCI host bridge */ | 123 | /* setup PCI host bridge */ |
@@ -147,7 +135,7 @@ static void __init holly_setup_arch(void) | |||
147 | } | 135 | } |
148 | 136 | ||
149 | /* | 137 | /* |
150 | * Interrupt setup and service. Interrrupts on the holly come | 138 | * Interrupt setup and service. Interrupts on the holly come |
151 | * from the four external INT pins, PCI interrupts are routed via | 139 | * from the four external INT pins, PCI interrupts are routed via |
152 | * PCI interrupt control registers, it generates internal IRQ23 | 140 | * PCI interrupt control registers, it generates internal IRQ23 |
153 | * | 141 | * |
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c index bd5ca58345a1..f392374309b3 100644 --- a/arch/powerpc/platforms/embedded6xx/linkstation.c +++ b/arch/powerpc/platforms/embedded6xx/linkstation.c | |||
@@ -11,16 +11,16 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/pci.h> | ||
15 | #include <linux/initrd.h> | 14 | #include <linux/initrd.h> |
16 | #include <linux/mtd/physmap.h> | 15 | #include <linux/mtd/physmap.h> |
17 | 16 | ||
18 | #include <asm/time.h> | 17 | #include <asm/time.h> |
19 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
20 | #include <asm/mpic.h> | 19 | #include <asm/mpic.h> |
21 | #include <asm/mpc10x.h> | ||
22 | #include <asm/pci-bridge.h> | 20 | #include <asm/pci-bridge.h> |
23 | 21 | ||
22 | #include "mpc10x.h" | ||
23 | |||
24 | static struct mtd_partition linkstation_physmap_partitions[] = { | 24 | static struct mtd_partition linkstation_physmap_partitions[] = { |
25 | { | 25 | { |
26 | .name = "mtd_firmimg", | 26 | .name = "mtd_firmimg", |
@@ -99,7 +99,7 @@ static void __init linkstation_setup_arch(void) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * Interrupt setup and service. Interrrupts on the linkstation come | 102 | * Interrupt setup and service. Interrupts on the linkstation come |
103 | * from the four PCI slots plus onboard 8241 devices: I2C, DUART. | 103 | * from the four PCI slots plus onboard 8241 devices: I2C, DUART. |
104 | */ | 104 | */ |
105 | static void __init linkstation_init_IRQ(void) | 105 | static void __init linkstation_init_IRQ(void) |
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c index d0bee9f19e4e..c99264cedda5 100644 --- a/arch/powerpc/platforms/embedded6xx/ls_uart.c +++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c | |||
@@ -1,14 +1,25 @@ | |||
1 | /* | ||
2 | * AVR power-management chip interface for the Buffalo Linkstation / | ||
3 | * Kurobox Platform. | ||
4 | * | ||
5 | * Author: 2006 (c) G. Liakhovetski | ||
6 | * g.liakhovetski@gmx.de | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public License | ||
9 | * version 2. This program is licensed "as is" without any warranty of | ||
10 | * any kind, whether express or implied. | ||
11 | */ | ||
1 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
2 | #include <linux/string.h> | 13 | #include <linux/string.h> |
3 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
4 | #include <linux/serial_reg.h> | 15 | #include <linux/serial_reg.h> |
5 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
6 | #include <asm/io.h> | 17 | #include <asm/io.h> |
7 | #include <asm/mpc10x.h> | ||
8 | #include <asm/ppc_sys.h> | ||
9 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
10 | #include <asm/termbits.h> | 19 | #include <asm/termbits.h> |
11 | 20 | ||
21 | #include "mpc10x.h" | ||
22 | |||
12 | static void __iomem *avr_addr; | 23 | static void __iomem *avr_addr; |
13 | static unsigned long avr_clock; | 24 | static unsigned long avr_clock; |
14 | 25 | ||
@@ -106,6 +117,9 @@ static int __init ls_uarts_init(void) | |||
106 | phys_addr_t phys_addr; | 117 | phys_addr_t phys_addr; |
107 | int len; | 118 | int len; |
108 | 119 | ||
120 | if (!machine_is(linkstation)) | ||
121 | return 0; | ||
122 | |||
109 | avr = of_find_node_by_path("/soc10x/serial@80004500"); | 123 | avr = of_find_node_by_path("/soc10x/serial@80004500"); |
110 | if (!avr) | 124 | if (!avr) |
111 | return -EINVAL; | 125 | return -EINVAL; |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc10x.h b/arch/powerpc/platforms/embedded6xx/mpc10x.h new file mode 100644 index 000000000000..b30a6a3b5bd2 --- /dev/null +++ b/arch/powerpc/platforms/embedded6xx/mpc10x.h | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Common routines for the Motorola SPS MPC106/8240/107 Host bridge/Mem | ||
3 | * ctlr/EPIC/etc. | ||
4 | * | ||
5 | * Author: Mark A. Greer | ||
6 | * mgreer@mvista.com | ||
7 | * | ||
8 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #ifndef __PPC_KERNEL_MPC10X_H | ||
14 | #define __PPC_KERNEL_MPC10X_H | ||
15 | |||
16 | #include <linux/pci_ids.h> | ||
17 | #include <asm/pci-bridge.h> | ||
18 | |||
19 | /* | ||
20 | * The values here don't completely map everything but should work in most | ||
21 | * cases. | ||
22 | * | ||
23 | * MAP A (PReP Map) | ||
24 | * Processor: 0x80000000 - 0x807fffff -> PCI I/O: 0x00000000 - 0x007fffff | ||
25 | * Processor: 0xc0000000 - 0xdfffffff -> PCI MEM: 0x00000000 - 0x1fffffff | ||
26 | * PCI MEM: 0x80000000 -> Processor System Memory: 0x00000000 | ||
27 | * EUMB mapped to: ioremap_base - 0x00100000 (ioremap_base - 1 MB) | ||
28 | * | ||
29 | * MAP B (CHRP Map) | ||
30 | * Processor: 0xfe000000 - 0xfebfffff -> PCI I/O: 0x00000000 - 0x00bfffff | ||
31 | * Processor: 0x80000000 - 0xbfffffff -> PCI MEM: 0x80000000 - 0xbfffffff | ||
32 | * PCI MEM: 0x00000000 -> Processor System Memory: 0x00000000 | ||
33 | * EUMB mapped to: ioremap_base - 0x00100000 (ioremap_base - 1 MB) | ||
34 | */ | ||
35 | |||
36 | /* | ||
37 | * Define the vendor/device IDs for the various bridges--should be added to | ||
38 | * <linux/pci_ids.h> | ||
39 | */ | ||
40 | #define MPC10X_BRIDGE_106 ((PCI_DEVICE_ID_MOTOROLA_MPC106 << 16) | \ | ||
41 | PCI_VENDOR_ID_MOTOROLA) | ||
42 | #define MPC10X_BRIDGE_8240 ((0x0003 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
43 | #define MPC10X_BRIDGE_107 ((0x0004 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
44 | #define MPC10X_BRIDGE_8245 ((0x0006 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
45 | |||
46 | /* Define the type of map to use */ | ||
47 | #define MPC10X_MEM_MAP_A 1 | ||
48 | #define MPC10X_MEM_MAP_B 2 | ||
49 | |||
50 | /* Map A (PReP Map) Defines */ | ||
51 | #define MPC10X_MAPA_CNFG_ADDR 0x80000cf8 | ||
52 | #define MPC10X_MAPA_CNFG_DATA 0x80000cfc | ||
53 | |||
54 | #define MPC10X_MAPA_ISA_IO_BASE 0x80000000 | ||
55 | #define MPC10X_MAPA_ISA_MEM_BASE 0xc0000000 | ||
56 | #define MPC10X_MAPA_DRAM_OFFSET 0x80000000 | ||
57 | |||
58 | #define MPC10X_MAPA_PCI_INTACK_ADDR 0xbffffff0 | ||
59 | #define MPC10X_MAPA_PCI_IO_START 0x00000000 | ||
60 | #define MPC10X_MAPA_PCI_IO_END (0x00800000 - 1) | ||
61 | #define MPC10X_MAPA_PCI_MEM_START 0x00000000 | ||
62 | #define MPC10X_MAPA_PCI_MEM_END (0x20000000 - 1) | ||
63 | |||
64 | #define MPC10X_MAPA_PCI_MEM_OFFSET (MPC10X_MAPA_ISA_MEM_BASE - \ | ||
65 | MPC10X_MAPA_PCI_MEM_START) | ||
66 | |||
67 | /* Map B (CHRP Map) Defines */ | ||
68 | #define MPC10X_MAPB_CNFG_ADDR 0xfec00000 | ||
69 | #define MPC10X_MAPB_CNFG_DATA 0xfee00000 | ||
70 | |||
71 | #define MPC10X_MAPB_ISA_IO_BASE 0xfe000000 | ||
72 | #define MPC10X_MAPB_ISA_MEM_BASE 0x80000000 | ||
73 | #define MPC10X_MAPB_DRAM_OFFSET 0x00000000 | ||
74 | |||
75 | #define MPC10X_MAPB_PCI_INTACK_ADDR 0xfef00000 | ||
76 | #define MPC10X_MAPB_PCI_IO_START 0x00000000 | ||
77 | #define MPC10X_MAPB_PCI_IO_END (0x00c00000 - 1) | ||
78 | #define MPC10X_MAPB_PCI_MEM_START 0x80000000 | ||
79 | #define MPC10X_MAPB_PCI_MEM_END (0xc0000000 - 1) | ||
80 | |||
81 | #define MPC10X_MAPB_PCI_MEM_OFFSET (MPC10X_MAPB_ISA_MEM_BASE - \ | ||
82 | MPC10X_MAPB_PCI_MEM_START) | ||
83 | |||
84 | /* Set hose members to values appropriate for the mem map used */ | ||
85 | #define MPC10X_SETUP_HOSE(hose, map) { \ | ||
86 | (hose)->pci_mem_offset = MPC10X_MAP##map##_PCI_MEM_OFFSET; \ | ||
87 | (hose)->io_space.start = MPC10X_MAP##map##_PCI_IO_START; \ | ||
88 | (hose)->io_space.end = MPC10X_MAP##map##_PCI_IO_END; \ | ||
89 | (hose)->mem_space.start = MPC10X_MAP##map##_PCI_MEM_START; \ | ||
90 | (hose)->mem_space.end = MPC10X_MAP##map##_PCI_MEM_END; \ | ||
91 | (hose)->io_base_virt = (void *)MPC10X_MAP##map##_ISA_IO_BASE; \ | ||
92 | } | ||
93 | |||
94 | |||
95 | /* Miscellaneous Configuration register offsets */ | ||
96 | #define MPC10X_CFG_PIR_REG 0x09 | ||
97 | #define MPC10X_CFG_PIR_HOST_BRIDGE 0x00 | ||
98 | #define MPC10X_CFG_PIR_AGENT 0x01 | ||
99 | |||
100 | #define MPC10X_CFG_EUMBBAR 0x78 | ||
101 | |||
102 | #define MPC10X_CFG_PICR1_REG 0xa8 | ||
103 | #define MPC10X_CFG_PICR1_ADDR_MAP_MASK 0x00010000 | ||
104 | #define MPC10X_CFG_PICR1_ADDR_MAP_A 0x00010000 | ||
105 | #define MPC10X_CFG_PICR1_ADDR_MAP_B 0x00000000 | ||
106 | #define MPC10X_CFG_PICR1_SPEC_PCI_RD 0x00000004 | ||
107 | #define MPC10X_CFG_PICR1_ST_GATH_EN 0x00000040 | ||
108 | |||
109 | #define MPC10X_CFG_PICR2_REG 0xac | ||
110 | #define MPC10X_CFG_PICR2_COPYBACK_OPT 0x00000001 | ||
111 | |||
112 | #define MPC10X_CFG_MAPB_OPTIONS_REG 0xe0 | ||
113 | #define MPC10X_CFG_MAPB_OPTIONS_CFAE 0x80 /* CPU_FD_ALIAS_EN */ | ||
114 | #define MPC10X_CFG_MAPB_OPTIONS_PFAE 0x40 /* PCI_FD_ALIAS_EN */ | ||
115 | #define MPC10X_CFG_MAPB_OPTIONS_DR 0x20 /* DLL_RESET */ | ||
116 | #define MPC10X_CFG_MAPB_OPTIONS_PCICH 0x08 /* PCI_COMPATIBILITY_HOLE */ | ||
117 | #define MPC10X_CFG_MAPB_OPTIONS_PROCCH 0x04 /* PROC_COMPATIBILITY_HOLE */ | ||
118 | |||
119 | /* Define offsets for the memory controller registers in the config space */ | ||
120 | #define MPC10X_MCTLR_MEM_START_1 0x80 /* Banks 0-3 */ | ||
121 | #define MPC10X_MCTLR_MEM_START_2 0x84 /* Banks 4-7 */ | ||
122 | #define MPC10X_MCTLR_EXT_MEM_START_1 0x88 /* Banks 0-3 */ | ||
123 | #define MPC10X_MCTLR_EXT_MEM_START_2 0x8c /* Banks 4-7 */ | ||
124 | |||
125 | #define MPC10X_MCTLR_MEM_END_1 0x90 /* Banks 0-3 */ | ||
126 | #define MPC10X_MCTLR_MEM_END_2 0x94 /* Banks 4-7 */ | ||
127 | #define MPC10X_MCTLR_EXT_MEM_END_1 0x98 /* Banks 0-3 */ | ||
128 | #define MPC10X_MCTLR_EXT_MEM_END_2 0x9c /* Banks 4-7 */ | ||
129 | |||
130 | #define MPC10X_MCTLR_MEM_BANK_ENABLES 0xa0 | ||
131 | |||
132 | /* Define some offset in the EUMB */ | ||
133 | #define MPC10X_EUMB_SIZE 0x00100000 /* Total EUMB size (1MB) */ | ||
134 | |||
135 | #define MPC10X_EUMB_MU_OFFSET 0x00000000 /* Msg Unit reg offset */ | ||
136 | #define MPC10X_EUMB_MU_SIZE 0x00001000 /* Msg Unit reg size */ | ||
137 | #define MPC10X_EUMB_DMA_OFFSET 0x00001000 /* DMA Unit reg offset */ | ||
138 | #define MPC10X_EUMB_DMA_SIZE 0x00001000 /* DMA Unit reg size */ | ||
139 | #define MPC10X_EUMB_ATU_OFFSET 0x00002000 /* Addr xlate reg offset */ | ||
140 | #define MPC10X_EUMB_ATU_SIZE 0x00001000 /* Addr xlate reg size */ | ||
141 | #define MPC10X_EUMB_I2C_OFFSET 0x00003000 /* I2C Unit reg offset */ | ||
142 | #define MPC10X_EUMB_I2C_SIZE 0x00001000 /* I2C Unit reg size */ | ||
143 | #define MPC10X_EUMB_DUART_OFFSET 0x00004000 /* DUART Unit reg offset (8245) */ | ||
144 | #define MPC10X_EUMB_DUART_SIZE 0x00001000 /* DUART Unit reg size (8245) */ | ||
145 | #define MPC10X_EUMB_EPIC_OFFSET 0x00040000 /* EPIC offset in EUMB */ | ||
146 | #define MPC10X_EUMB_EPIC_SIZE 0x00030000 /* EPIC size */ | ||
147 | #define MPC10X_EUMB_PM_OFFSET 0x000fe000 /* Performance Monitor reg offset (8245) */ | ||
148 | #define MPC10X_EUMB_PM_SIZE 0x00001000 /* Performance Monitor reg size (8245) */ | ||
149 | #define MPC10X_EUMB_WP_OFFSET 0x000ff000 /* Data path diagnostic, watchpoint reg offset */ | ||
150 | #define MPC10X_EUMB_WP_SIZE 0x00001000 /* Data path diagnostic, watchpoint reg size */ | ||
151 | |||
152 | /* | ||
153 | * Define some recommended places to put the EUMB regs. | ||
154 | * For both maps, recommend putting the EUMB from 0xeff00000 to 0xefffffff. | ||
155 | */ | ||
156 | extern unsigned long ioremap_base; | ||
157 | #define MPC10X_MAPA_EUMB_BASE (ioremap_base - MPC10X_EUMB_SIZE) | ||
158 | #define MPC10X_MAPB_EUMB_BASE MPC10X_MAPA_EUMB_BASE | ||
159 | |||
160 | enum ppc_sys_devices { | ||
161 | MPC10X_IIC1, | ||
162 | MPC10X_DMA0, | ||
163 | MPC10X_DMA1, | ||
164 | MPC10X_UART0, | ||
165 | MPC10X_UART1, | ||
166 | NUM_PPC_SYS_DEVS, | ||
167 | }; | ||
168 | |||
169 | int mpc10x_bridge_init(struct pci_controller *hose, | ||
170 | uint current_map, | ||
171 | uint new_map, | ||
172 | uint phys_eumb_base); | ||
173 | unsigned long mpc10x_get_mem_size(uint mem_map); | ||
174 | int mpc10x_enable_store_gathering(struct pci_controller *hose); | ||
175 | int mpc10x_disable_store_gathering(struct pci_controller *hose); | ||
176 | |||
177 | /* For MPC107 boards that use the built-in openpic */ | ||
178 | void mpc10x_set_openpic(void); | ||
179 | |||
180 | #endif /* __PPC_KERNEL_MPC10X_H */ | ||
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index 1e3cc69487b5..96737e5608d3 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <asm/pci-bridge.h> | 40 | #include <asm/pci-bridge.h> |
41 | #include <asm/reg.h> | 41 | #include <asm/reg.h> |
42 | #include <mm/mmu_decl.h> | 42 | #include <mm/mmu_decl.h> |
43 | #include "mpc7448_hpc2.h" | ||
44 | #include <asm/tsi108_pci.h> | 43 | #include <asm/tsi108_pci.h> |
45 | #include <asm/tsi108_irq.h> | 44 | #include <asm/tsi108_irq.h> |
46 | #include <asm/mpic.h> | 45 | #include <asm/mpic.h> |
@@ -91,7 +90,7 @@ static void __init mpc7448_hpc2_setup_arch(void) | |||
91 | } | 90 | } |
92 | 91 | ||
93 | /* | 92 | /* |
94 | * Interrupt setup and service. Interrrupts on the mpc7448_hpc2 come | 93 | * Interrupt setup and service. Interrupts on the mpc7448_hpc2 come |
95 | * from the four external INT pins, PCI interrupts are routed via | 94 | * from the four external INT pins, PCI interrupts are routed via |
96 | * PCI interrupt control registers, it generates internal IRQ23 | 95 | * PCI interrupt control registers, it generates internal IRQ23 |
97 | * | 96 | * |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h deleted file mode 100644 index f7e0e0c7f8d8..000000000000 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * mpc7448_hpc2.h | ||
3 | * | ||
4 | * Definitions for Freescale MPC7448_HPC2 platform | ||
5 | * | ||
6 | * Author: Jacob Pan | ||
7 | * jacob.pan@freescale.com | ||
8 | * Maintainer: Roy Zang <roy.zang@freescale.com> | ||
9 | * | ||
10 | * 2006 (c) Freescale Semiconductor, Inc. This file is licensed under | ||
11 | * the terms of the GNU General Public License version 2. This program | ||
12 | * is licensed "as is" without any warranty of any kind, whether express | ||
13 | * or implied. | ||
14 | */ | ||
15 | |||
16 | #ifndef __PPC_PLATFORMS_MPC7448_HPC2_H | ||
17 | #define __PPC_PLATFORMS_MPC7448_HPC2_H | ||
18 | |||
19 | #include <asm/ppcboot.h> | ||
20 | |||
21 | #endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */ | ||
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c index 53420951dc53..e484cac75095 100644 --- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c | |||
@@ -44,7 +44,6 @@ static void __init prpmc2800_setup_arch(void) | |||
44 | struct device_node *np; | 44 | struct device_node *np; |
45 | phys_addr_t paddr; | 45 | phys_addr_t paddr; |
46 | const unsigned int *reg; | 46 | const unsigned int *reg; |
47 | const unsigned int *prop; | ||
48 | 47 | ||
49 | /* | 48 | /* |
50 | * ioremap mpp and gpp registers in case they are later | 49 | * ioremap mpp and gpp registers in case they are later |
@@ -62,12 +61,6 @@ static void __init prpmc2800_setup_arch(void) | |||
62 | of_node_put(np); | 61 | of_node_put(np); |
63 | mv64x60_gpp_reg_base = ioremap(paddr, reg[1]); | 62 | mv64x60_gpp_reg_base = ioremap(paddr, reg[1]); |
64 | 63 | ||
65 | np = of_find_node_by_type(NULL, "cpu"); | ||
66 | prop = of_get_property(np, "clock-frequency", NULL); | ||
67 | if (prop) | ||
68 | loops_per_jiffy = *prop / HZ; | ||
69 | of_node_put(np); | ||
70 | |||
71 | #ifdef CONFIG_PCI | 64 | #ifdef CONFIG_PCI |
72 | mv64x60_pci_init(); | 65 | mv64x60_pci_init(); |
73 | #endif | 66 | #endif |
@@ -158,6 +151,7 @@ define_machine(prpmc2800){ | |||
158 | .name = prpmc2800_platform_name, | 151 | .name = prpmc2800_platform_name, |
159 | .probe = prpmc2800_probe, | 152 | .probe = prpmc2800_probe, |
160 | .setup_arch = prpmc2800_setup_arch, | 153 | .setup_arch = prpmc2800_setup_arch, |
154 | .init_early = mv64x60_init_early, | ||
161 | .show_cpuinfo = prpmc2800_show_cpuinfo, | 155 | .show_cpuinfo = prpmc2800_show_cpuinfo, |
162 | .init_IRQ = mv64x60_init_irq, | 156 | .init_IRQ = mv64x60_init_irq, |
163 | .get_irq = mv64x60_get_irq, | 157 | .get_irq = mv64x60_get_irq, |
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index 13ac3015d91c..60db509638f1 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
@@ -2,6 +2,7 @@ EXTRA_CFLAGS += -mno-minimal-toc | |||
2 | 2 | ||
3 | extra-y += dt.o | 3 | extra-y += dt.o |
4 | 4 | ||
5 | obj-y += exception.o | ||
5 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ | 6 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ |
6 | hvcall.o proc.o htab.o iommu.o misc.o irq.o | 7 | hvcall.o proc.o htab.o iommu.o misc.o irq.o |
7 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o | 8 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o |
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S new file mode 100644 index 000000000000..5381038f0881 --- /dev/null +++ b/arch/powerpc/platforms/iseries/exception.S | |||
@@ -0,0 +1,251 @@ | |||
1 | /* | ||
2 | * Low level routines for legacy iSeries support. | ||
3 | * | ||
4 | * Extracted from head_64.S | ||
5 | * | ||
6 | * PowerPC version | ||
7 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
8 | * | ||
9 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | ||
10 | * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu> | ||
11 | * Adapted for Power Macintosh by Paul Mackerras. | ||
12 | * Low-level exception handlers and MMU support | ||
13 | * rewritten by Paul Mackerras. | ||
14 | * Copyright (C) 1996 Paul Mackerras. | ||
15 | * | ||
16 | * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and | ||
17 | * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com | ||
18 | * | ||
19 | * This file contains the low-level support and setup for the | ||
20 | * PowerPC-64 platform, including trap and interrupt dispatch. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or | ||
23 | * modify it under the terms of the GNU General Public License | ||
24 | * as published by the Free Software Foundation; either version | ||
25 | * 2 of the License, or (at your option) any later version. | ||
26 | */ | ||
27 | |||
28 | #include <asm/reg.h> | ||
29 | #include <asm/ppc_asm.h> | ||
30 | #include <asm/asm-offsets.h> | ||
31 | #include <asm/thread_info.h> | ||
32 | #include <asm/ptrace.h> | ||
33 | #include <asm/cputable.h> | ||
34 | |||
35 | #include "exception.h" | ||
36 | |||
37 | .text | ||
38 | |||
39 | .globl system_reset_iSeries | ||
40 | system_reset_iSeries: | ||
41 | mfspr r13,SPRN_SPRG3 /* Get paca address */ | ||
42 | mfmsr r24 | ||
43 | ori r24,r24,MSR_RI | ||
44 | mtmsrd r24 /* RI on */ | ||
45 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | ||
46 | cmpwi 0,r24,0 /* Are we processor 0? */ | ||
47 | bne 1f | ||
48 | b .__start_initialization_iSeries /* Start up the first processor */ | ||
49 | 1: mfspr r4,SPRN_CTRLF | ||
50 | li r5,CTRL_RUNLATCH /* Turn off the run light */ | ||
51 | andc r4,r4,r5 | ||
52 | mtspr SPRN_CTRLT,r4 | ||
53 | |||
54 | 1: | ||
55 | HMT_LOW | ||
56 | #ifdef CONFIG_SMP | ||
57 | lbz r23,PACAPROCSTART(r13) /* Test if this processor | ||
58 | * should start */ | ||
59 | sync | ||
60 | LOAD_REG_IMMEDIATE(r3,current_set) | ||
61 | sldi r28,r24,3 /* get current_set[cpu#] */ | ||
62 | ldx r3,r3,r28 | ||
63 | addi r1,r3,THREAD_SIZE | ||
64 | subi r1,r1,STACK_FRAME_OVERHEAD | ||
65 | |||
66 | cmpwi 0,r23,0 | ||
67 | beq iSeries_secondary_smp_loop /* Loop until told to go */ | ||
68 | b __secondary_start /* Loop until told to go */ | ||
69 | iSeries_secondary_smp_loop: | ||
70 | /* Let the Hypervisor know we are alive */ | ||
71 | /* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */ | ||
72 | lis r3,0x8002 | ||
73 | rldicr r3,r3,32,15 /* r0 = (r3 << 32) & 0xffff000000000000 */ | ||
74 | #else /* CONFIG_SMP */ | ||
75 | /* Yield the processor. This is required for non-SMP kernels | ||
76 | which are running on multi-threaded machines. */ | ||
77 | lis r3,0x8000 | ||
78 | rldicr r3,r3,32,15 /* r3 = (r3 << 32) & 0xffff000000000000 */ | ||
79 | addi r3,r3,18 /* r3 = 0x8000000000000012 which is "yield" */ | ||
80 | li r4,0 /* "yield timed" */ | ||
81 | li r5,-1 /* "yield forever" */ | ||
82 | #endif /* CONFIG_SMP */ | ||
83 | li r0,-1 /* r0=-1 indicates a Hypervisor call */ | ||
84 | sc /* Invoke the hypervisor via a system call */ | ||
85 | mfspr r13,SPRN_SPRG3 /* Put r13 back ???? */ | ||
86 | b 1b /* If SMP not configured, secondaries | ||
87 | * loop forever */ | ||
88 | |||
89 | /*** ISeries-LPAR interrupt handlers ***/ | ||
90 | |||
91 | STD_EXCEPTION_ISERIES(machine_check, PACA_EXMC) | ||
92 | |||
93 | .globl data_access_iSeries | ||
94 | data_access_iSeries: | ||
95 | mtspr SPRN_SPRG1,r13 | ||
96 | BEGIN_FTR_SECTION | ||
97 | mtspr SPRN_SPRG2,r12 | ||
98 | mfspr r13,SPRN_DAR | ||
99 | mfspr r12,SPRN_DSISR | ||
100 | srdi r13,r13,60 | ||
101 | rlwimi r13,r12,16,0x20 | ||
102 | mfcr r12 | ||
103 | cmpwi r13,0x2c | ||
104 | beq .do_stab_bolted_iSeries | ||
105 | mtcrf 0x80,r12 | ||
106 | mfspr r12,SPRN_SPRG2 | ||
107 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | ||
108 | EXCEPTION_PROLOG_1(PACA_EXGEN) | ||
109 | EXCEPTION_PROLOG_ISERIES_1 | ||
110 | b data_access_common | ||
111 | |||
112 | .do_stab_bolted_iSeries: | ||
113 | mtcrf 0x80,r12 | ||
114 | mfspr r12,SPRN_SPRG2 | ||
115 | EXCEPTION_PROLOG_1(PACA_EXSLB) | ||
116 | EXCEPTION_PROLOG_ISERIES_1 | ||
117 | b .do_stab_bolted | ||
118 | |||
119 | .globl data_access_slb_iSeries | ||
120 | data_access_slb_iSeries: | ||
121 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
122 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
123 | std r3,PACA_EXSLB+EX_R3(r13) | ||
124 | mfspr r3,SPRN_DAR | ||
125 | std r9,PACA_EXSLB+EX_R9(r13) | ||
126 | mfcr r9 | ||
127 | #ifdef __DISABLED__ | ||
128 | cmpdi r3,0 | ||
129 | bge slb_miss_user_iseries | ||
130 | #endif | ||
131 | std r10,PACA_EXSLB+EX_R10(r13) | ||
132 | std r11,PACA_EXSLB+EX_R11(r13) | ||
133 | std r12,PACA_EXSLB+EX_R12(r13) | ||
134 | mfspr r10,SPRN_SPRG1 | ||
135 | std r10,PACA_EXSLB+EX_R13(r13) | ||
136 | ld r12,PACALPPACAPTR(r13) | ||
137 | ld r12,LPPACASRR1(r12) | ||
138 | b .slb_miss_realmode | ||
139 | |||
140 | STD_EXCEPTION_ISERIES(instruction_access, PACA_EXGEN) | ||
141 | |||
142 | .globl instruction_access_slb_iSeries | ||
143 | instruction_access_slb_iSeries: | ||
144 | mtspr SPRN_SPRG1,r13 /* save r13 */ | ||
145 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | ||
146 | std r3,PACA_EXSLB+EX_R3(r13) | ||
147 | ld r3,PACALPPACAPTR(r13) | ||
148 | ld r3,LPPACASRR0(r3) /* get SRR0 value */ | ||
149 | std r9,PACA_EXSLB+EX_R9(r13) | ||
150 | mfcr r9 | ||
151 | #ifdef __DISABLED__ | ||
152 | cmpdi r3,0 | ||
153 | bge slb_miss_user_iseries | ||
154 | #endif | ||
155 | std r10,PACA_EXSLB+EX_R10(r13) | ||
156 | std r11,PACA_EXSLB+EX_R11(r13) | ||
157 | std r12,PACA_EXSLB+EX_R12(r13) | ||
158 | mfspr r10,SPRN_SPRG1 | ||
159 | std r10,PACA_EXSLB+EX_R13(r13) | ||
160 | ld r12,PACALPPACAPTR(r13) | ||
161 | ld r12,LPPACASRR1(r12) | ||
162 | b .slb_miss_realmode | ||
163 | |||
164 | #ifdef __DISABLED__ | ||
165 | slb_miss_user_iseries: | ||
166 | std r10,PACA_EXGEN+EX_R10(r13) | ||
167 | std r11,PACA_EXGEN+EX_R11(r13) | ||
168 | std r12,PACA_EXGEN+EX_R12(r13) | ||
169 | mfspr r10,SPRG1 | ||
170 | ld r11,PACA_EXSLB+EX_R9(r13) | ||
171 | ld r12,PACA_EXSLB+EX_R3(r13) | ||
172 | std r10,PACA_EXGEN+EX_R13(r13) | ||
173 | std r11,PACA_EXGEN+EX_R9(r13) | ||
174 | std r12,PACA_EXGEN+EX_R3(r13) | ||
175 | EXCEPTION_PROLOG_ISERIES_1 | ||
176 | b slb_miss_user_common | ||
177 | #endif | ||
178 | |||
179 | MASKABLE_EXCEPTION_ISERIES(hardware_interrupt) | ||
180 | STD_EXCEPTION_ISERIES(alignment, PACA_EXGEN) | ||
181 | STD_EXCEPTION_ISERIES(program_check, PACA_EXGEN) | ||
182 | STD_EXCEPTION_ISERIES(fp_unavailable, PACA_EXGEN) | ||
183 | MASKABLE_EXCEPTION_ISERIES(decrementer) | ||
184 | STD_EXCEPTION_ISERIES(trap_0a, PACA_EXGEN) | ||
185 | STD_EXCEPTION_ISERIES(trap_0b, PACA_EXGEN) | ||
186 | |||
187 | .globl system_call_iSeries | ||
188 | system_call_iSeries: | ||
189 | mr r9,r13 | ||
190 | mfspr r13,SPRN_SPRG3 | ||
191 | EXCEPTION_PROLOG_ISERIES_1 | ||
192 | b system_call_common | ||
193 | |||
194 | STD_EXCEPTION_ISERIES(single_step, PACA_EXGEN) | ||
195 | STD_EXCEPTION_ISERIES(trap_0e, PACA_EXGEN) | ||
196 | STD_EXCEPTION_ISERIES(performance_monitor, PACA_EXGEN) | ||
197 | |||
198 | decrementer_iSeries_masked: | ||
199 | /* We may not have a valid TOC pointer in here. */ | ||
200 | li r11,1 | ||
201 | ld r12,PACALPPACAPTR(r13) | ||
202 | stb r11,LPPACADECRINT(r12) | ||
203 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) | ||
204 | lwz r12,0(r12) | ||
205 | mtspr SPRN_DEC,r12 | ||
206 | /* fall through */ | ||
207 | |||
208 | hardware_interrupt_iSeries_masked: | ||
209 | mtcrf 0x80,r9 /* Restore regs */ | ||
210 | ld r12,PACALPPACAPTR(r13) | ||
211 | ld r11,LPPACASRR0(r12) | ||
212 | ld r12,LPPACASRR1(r12) | ||
213 | mtspr SPRN_SRR0,r11 | ||
214 | mtspr SPRN_SRR1,r12 | ||
215 | ld r9,PACA_EXGEN+EX_R9(r13) | ||
216 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
217 | ld r11,PACA_EXGEN+EX_R11(r13) | ||
218 | ld r12,PACA_EXGEN+EX_R12(r13) | ||
219 | ld r13,PACA_EXGEN+EX_R13(r13) | ||
220 | rfid | ||
221 | b . /* prevent speculative execution */ | ||
222 | |||
223 | _INIT_STATIC(__start_initialization_iSeries) | ||
224 | /* Clear out the BSS */ | ||
225 | LOAD_REG_IMMEDIATE(r11,__bss_stop) | ||
226 | LOAD_REG_IMMEDIATE(r8,__bss_start) | ||
227 | sub r11,r11,r8 /* bss size */ | ||
228 | addi r11,r11,7 /* round up to an even double word */ | ||
229 | rldicl. r11,r11,61,3 /* shift right by 3 */ | ||
230 | beq 4f | ||
231 | addi r8,r8,-8 | ||
232 | li r0,0 | ||
233 | mtctr r11 /* zero this many doublewords */ | ||
234 | 3: stdu r0,8(r8) | ||
235 | bdnz 3b | ||
236 | 4: | ||
237 | LOAD_REG_IMMEDIATE(r1,init_thread_union) | ||
238 | addi r1,r1,THREAD_SIZE | ||
239 | li r0,0 | ||
240 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | ||
241 | |||
242 | LOAD_REG_IMMEDIATE(r2,__toc_start) | ||
243 | addi r2,r2,0x4000 | ||
244 | addi r2,r2,0x4000 | ||
245 | |||
246 | bl .iSeries_early_setup | ||
247 | bl .early_setup | ||
248 | |||
249 | /* relocation is on at this point */ | ||
250 | |||
251 | b .start_here_common | ||
diff --git a/arch/powerpc/platforms/iseries/exception.h b/arch/powerpc/platforms/iseries/exception.h new file mode 100644 index 000000000000..ced45a8fa1aa --- /dev/null +++ b/arch/powerpc/platforms/iseries/exception.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _ASM_POWERPC_ISERIES_EXCEPTION_H | ||
2 | #define _ASM_POWERPC_ISERIES_EXCEPTION_H | ||
3 | /* | ||
4 | * Extracted from head_64.S | ||
5 | * | ||
6 | * PowerPC version | ||
7 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
8 | * | ||
9 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | ||
10 | * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu> | ||
11 | * Adapted for Power Macintosh by Paul Mackerras. | ||
12 | * Low-level exception handlers and MMU support | ||
13 | * rewritten by Paul Mackerras. | ||
14 | * Copyright (C) 1996 Paul Mackerras. | ||
15 | * | ||
16 | * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and | ||
17 | * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com | ||
18 | * | ||
19 | * This file contains the low-level support and setup for the | ||
20 | * PowerPC-64 platform, including trap and interrupt dispatch. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or | ||
23 | * modify it under the terms of the GNU General Public License | ||
24 | * as published by the Free Software Foundation; either version | ||
25 | * 2 of the License, or (at your option) any later version. | ||
26 | */ | ||
27 | #include <asm/exception.h> | ||
28 | |||
29 | #define EXCEPTION_PROLOG_ISERIES_1 \ | ||
30 | mfmsr r10; \ | ||
31 | ld r12,PACALPPACAPTR(r13); \ | ||
32 | ld r11,LPPACASRR0(r12); \ | ||
33 | ld r12,LPPACASRR1(r12); \ | ||
34 | ori r10,r10,MSR_RI; \ | ||
35 | mtmsrd r10,1 | ||
36 | |||
37 | #define STD_EXCEPTION_ISERIES(label, area) \ | ||
38 | .globl label##_iSeries; \ | ||
39 | label##_iSeries: \ | ||
40 | HMT_MEDIUM; \ | ||
41 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
42 | EXCEPTION_PROLOG_1(area); \ | ||
43 | EXCEPTION_PROLOG_ISERIES_1; \ | ||
44 | b label##_common | ||
45 | |||
46 | #define MASKABLE_EXCEPTION_ISERIES(label) \ | ||
47 | .globl label##_iSeries; \ | ||
48 | label##_iSeries: \ | ||
49 | HMT_MEDIUM; \ | ||
50 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
51 | EXCEPTION_PROLOG_1(PACA_EXGEN); \ | ||
52 | lbz r10,PACASOFTIRQEN(r13); \ | ||
53 | cmpwi 0,r10,0; \ | ||
54 | beq- label##_iSeries_masked; \ | ||
55 | EXCEPTION_PROLOG_ISERIES_1; \ | ||
56 | b label##_common; \ | ||
57 | |||
58 | #endif /* _ASM_POWERPC_ISERIES_EXCEPTION_H */ | ||
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 63b33675848b..701d9297c207 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -346,8 +346,15 @@ static int iseries_irq_host_map(struct irq_host *h, unsigned int virq, | |||
346 | return 0; | 346 | return 0; |
347 | } | 347 | } |
348 | 348 | ||
349 | static int iseries_irq_host_match(struct irq_host *h, struct device_node *np) | ||
350 | { | ||
351 | /* Match all */ | ||
352 | return 1; | ||
353 | } | ||
354 | |||
349 | static struct irq_host_ops iseries_irq_host_ops = { | 355 | static struct irq_host_ops iseries_irq_host_ops = { |
350 | .map = iseries_irq_host_map, | 356 | .map = iseries_irq_host_map, |
357 | .match = iseries_irq_host_match, | ||
351 | }; | 358 | }; |
352 | 359 | ||
353 | /* | 360 | /* |
@@ -369,7 +376,8 @@ void __init iSeries_init_IRQ(void) | |||
369 | /* Create irq host. No need for a revmap since HV will give us | 376 | /* Create irq host. No need for a revmap since HV will give us |
370 | * back our virtual irq number | 377 | * back our virtual irq number |
371 | */ | 378 | */ |
372 | host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &iseries_irq_host_ops, 0); | 379 | host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, |
380 | &iseries_irq_host_ops, 0); | ||
373 | BUG_ON(host == NULL); | 381 | BUG_ON(host == NULL); |
374 | irq_set_default_host(host); | 382 | irq_set_default_host(host); |
375 | 383 | ||
diff --git a/arch/powerpc/platforms/iseries/it_lp_naca.h b/arch/powerpc/platforms/iseries/it_lp_naca.h index 9bbf58986819..cf6dcf6ef07b 100644 --- a/arch/powerpc/platforms/iseries/it_lp_naca.h +++ b/arch/powerpc/platforms/iseries/it_lp_naca.h | |||
@@ -60,7 +60,7 @@ struct ItLpNaca { | |||
60 | u8 xRsvd2_0[128]; // Reserved x00-x7F | 60 | u8 xRsvd2_0[128]; // Reserved x00-x7F |
61 | 61 | ||
62 | // CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators | 62 | // CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators |
63 | // NB: Padding required to keep xInterrruptHdlr at x300 which is required | 63 | // NB: Padding required to keep xInterruptHdlr at x300 which is required |
64 | // for v4r4 PLIC. | 64 | // for v4r4 PLIC. |
65 | u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F | 65 | u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F |
66 | u8 xRsvd3_0[384]; // Reserved 180-2FF | 66 | u8 xRsvd3_0[384]; // Reserved 180-2FF |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 13a8b1908ded..fad493e29d37 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/time.h> | 41 | #include <asm/time.h> |
42 | #include <asm/paca.h> | 42 | #include <asm/paca.h> |
43 | #include <asm/cache.h> | 43 | #include <asm/cache.h> |
44 | #include <asm/sections.h> | ||
45 | #include <asm/abs_addr.h> | 44 | #include <asm/abs_addr.h> |
46 | #include <asm/iseries/hv_lp_config.h> | 45 | #include <asm/iseries/hv_lp_config.h> |
47 | #include <asm/iseries/hv_call_event.h> | 46 | #include <asm/iseries/hv_call_event.h> |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 2542403288f9..771ed0cf29a5 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -169,15 +169,12 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
169 | switch (len) { | 169 | switch (len) { |
170 | case 1: | 170 | case 1: |
171 | out_8(addr, val); | 171 | out_8(addr, val); |
172 | (void) in_8(addr); | ||
173 | break; | 172 | break; |
174 | case 2: | 173 | case 2: |
175 | out_le16(addr, val); | 174 | out_le16(addr, val); |
176 | (void) in_le16(addr); | ||
177 | break; | 175 | break; |
178 | default: | 176 | default: |
179 | out_le32(addr, val); | 177 | out_le32(addr, val); |
180 | (void) in_le32(addr); | ||
181 | break; | 178 | break; |
182 | } | 179 | } |
183 | return PCIBIOS_SUCCESSFUL; | 180 | return PCIBIOS_SUCCESSFUL; |
@@ -185,8 +182,8 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
185 | 182 | ||
186 | static struct pci_ops u3_agp_pci_ops = | 183 | static struct pci_ops u3_agp_pci_ops = |
187 | { | 184 | { |
188 | u3_agp_read_config, | 185 | .read = u3_agp_read_config, |
189 | u3_agp_write_config | 186 | .write = u3_agp_write_config, |
190 | }; | 187 | }; |
191 | 188 | ||
192 | static unsigned long u3_ht_cfa0(u8 devfn, u8 off) | 189 | static unsigned long u3_ht_cfa0(u8 devfn, u8 off) |
@@ -268,15 +265,12 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
268 | switch (len) { | 265 | switch (len) { |
269 | case 1: | 266 | case 1: |
270 | out_8(addr, val); | 267 | out_8(addr, val); |
271 | (void) in_8(addr); | ||
272 | break; | 268 | break; |
273 | case 2: | 269 | case 2: |
274 | out_le16(addr, val); | 270 | out_le16(addr, val); |
275 | (void) in_le16(addr); | ||
276 | break; | 271 | break; |
277 | default: | 272 | default: |
278 | out_le32(addr, val); | 273 | out_le32(addr, val); |
279 | (void) in_le32(addr); | ||
280 | break; | 274 | break; |
281 | } | 275 | } |
282 | return PCIBIOS_SUCCESSFUL; | 276 | return PCIBIOS_SUCCESSFUL; |
@@ -284,8 +278,8 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
284 | 278 | ||
285 | static struct pci_ops u3_ht_pci_ops = | 279 | static struct pci_ops u3_ht_pci_ops = |
286 | { | 280 | { |
287 | u3_ht_read_config, | 281 | .read = u3_ht_read_config, |
288 | u3_ht_write_config | 282 | .write = u3_ht_write_config, |
289 | }; | 283 | }; |
290 | 284 | ||
291 | static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off) | 285 | static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off) |
@@ -376,15 +370,12 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
376 | switch (len) { | 370 | switch (len) { |
377 | case 1: | 371 | case 1: |
378 | out_8(addr, val); | 372 | out_8(addr, val); |
379 | (void) in_8(addr); | ||
380 | break; | 373 | break; |
381 | case 2: | 374 | case 2: |
382 | out_le16(addr, val); | 375 | out_le16(addr, val); |
383 | (void) in_le16(addr); | ||
384 | break; | 376 | break; |
385 | default: | 377 | default: |
386 | out_le32(addr, val); | 378 | out_le32(addr, val); |
387 | (void) in_le32(addr); | ||
388 | break; | 379 | break; |
389 | } | 380 | } |
390 | return PCIBIOS_SUCCESSFUL; | 381 | return PCIBIOS_SUCCESSFUL; |
@@ -392,8 +383,8 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
392 | 383 | ||
393 | static struct pci_ops u4_pcie_pci_ops = | 384 | static struct pci_ops u4_pcie_pci_ops = |
394 | { | 385 | { |
395 | u4_pcie_read_config, | 386 | .read = u4_pcie_read_config, |
396 | u4_pcie_write_config | 387 | .write = u4_pcie_write_config, |
397 | }; | 388 | }; |
398 | 389 | ||
399 | static void __init setup_u3_agp(struct pci_controller* hose) | 390 | static void __init setup_u3_agp(struct pci_controller* hose) |
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig index 95cd90fd81c7..117d90aa5008 100644 --- a/arch/powerpc/platforms/pasemi/Kconfig +++ b/arch/powerpc/platforms/pasemi/Kconfig | |||
@@ -5,6 +5,7 @@ config PPC_PASEMI | |||
5 | select MPIC | 5 | select MPIC |
6 | select PPC_UDBG_16550 | 6 | select PPC_UDBG_16550 |
7 | select PPC_NATIVE | 7 | select PPC_NATIVE |
8 | select MPIC_BROKEN_REGREAD | ||
8 | help | 9 | help |
9 | This option enables support for PA Semi's PWRficient line | 10 | This option enables support for PA Semi's PWRficient line |
10 | of SoC processors, including PA6T-1682M | 11 | of SoC processors, including PA6T-1682M |
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c index 3c962d5757be..d8e1fcc78513 100644 --- a/arch/powerpc/platforms/pasemi/idle.c +++ b/arch/powerpc/platforms/pasemi/idle.c | |||
@@ -72,8 +72,11 @@ static int pasemi_system_reset_exception(struct pt_regs *regs) | |||
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | 74 | ||
75 | void __init pasemi_idle_init(void) | 75 | static int __init pasemi_idle_init(void) |
76 | { | 76 | { |
77 | if (!machine_is(pasemi)) | ||
78 | return -ENODEV; | ||
79 | |||
77 | #ifndef CONFIG_PPC_PASEMI_CPUFREQ | 80 | #ifndef CONFIG_PPC_PASEMI_CPUFREQ |
78 | printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n"); | 81 | printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n"); |
79 | current_mode = 0; | 82 | current_mode = 0; |
@@ -82,7 +85,10 @@ void __init pasemi_idle_init(void) | |||
82 | ppc_md.system_reset_exception = pasemi_system_reset_exception; | 85 | ppc_md.system_reset_exception = pasemi_system_reset_exception; |
83 | ppc_md.power_save = modes[current_mode].entry; | 86 | ppc_md.power_save = modes[current_mode].entry; |
84 | printk(KERN_INFO "Using PA6T idle loop (%s)\n", modes[current_mode].name); | 87 | printk(KERN_INFO "Using PA6T idle loop (%s)\n", modes[current_mode].name); |
88 | |||
89 | return 0; | ||
85 | } | 90 | } |
91 | late_initcall(pasemi_idle_init); | ||
86 | 92 | ||
87 | static int __init idle_param(char *p) | 93 | static int __init idle_param(char *p) |
88 | { | 94 | { |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 9014d55c717b..6c42787fb382 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -187,7 +187,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) | |||
187 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } | 187 | static void pci_dma_bus_setup_null(struct pci_bus *b) { } |
188 | static void pci_dma_dev_setup_null(struct pci_dev *d) { } | 188 | static void pci_dma_dev_setup_null(struct pci_dev *d) { } |
189 | 189 | ||
190 | int iob_init(struct device_node *dn) | 190 | int __init iob_init(struct device_node *dn) |
191 | { | 191 | { |
192 | unsigned long tmp; | 192 | unsigned long tmp; |
193 | u32 regword; | 193 | u32 regword; |
@@ -233,7 +233,7 @@ int iob_init(struct device_node *dn) | |||
233 | 233 | ||
234 | 234 | ||
235 | /* These are called very early. */ | 235 | /* These are called very early. */ |
236 | void iommu_init_early_pasemi(void) | 236 | void __init iommu_init_early_pasemi(void) |
237 | { | 237 | { |
238 | int iommu_off; | 238 | int iommu_off; |
239 | 239 | ||
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h index be8495497611..516acabb4e96 100644 --- a/arch/powerpc/platforms/pasemi/pasemi.h +++ b/arch/powerpc/platforms/pasemi/pasemi.h | |||
@@ -6,9 +6,9 @@ extern void pas_pci_init(void); | |||
6 | extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev); | 6 | extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev); |
7 | extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev); | 7 | extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev); |
8 | 8 | ||
9 | extern void __init alloc_iobmap_l2(void); | 9 | extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset); |
10 | 10 | ||
11 | extern void __init pasemi_idle_init(void); | 11 | extern void __init alloc_iobmap_l2(void); |
12 | 12 | ||
13 | /* Power savings modes, implemented in asm */ | 13 | /* Power savings modes, implemented in asm */ |
14 | extern void idle_spin(void); | 14 | extern void idle_spin(void); |
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index ab1f5f62bcd8..b6a0ec45c695 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c | |||
@@ -51,6 +51,61 @@ static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose, | |||
51 | return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); | 51 | return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); |
52 | } | 52 | } |
53 | 53 | ||
54 | static inline int is_root_port(int busno, int devfn) | ||
55 | { | ||
56 | return ((busno == 0) && (PCI_FUNC(devfn) < 4) && | ||
57 | ((PCI_SLOT(devfn) == 16) || (PCI_SLOT(devfn) == 17))); | ||
58 | } | ||
59 | |||
60 | static inline int is_5945_reg(int reg) | ||
61 | { | ||
62 | return (((reg >= 0x18) && (reg < 0x34)) || | ||
63 | ((reg >= 0x158) && (reg < 0x178))); | ||
64 | } | ||
65 | |||
66 | static int workaround_5945(struct pci_bus *bus, unsigned int devfn, | ||
67 | int offset, int len, u32 *val) | ||
68 | { | ||
69 | struct pci_controller *hose; | ||
70 | void volatile __iomem *addr, *dummy; | ||
71 | int byte; | ||
72 | u32 tmp; | ||
73 | |||
74 | if (!is_root_port(bus->number, devfn) || !is_5945_reg(offset)) | ||
75 | return 0; | ||
76 | |||
77 | hose = pci_bus_to_host(bus); | ||
78 | |||
79 | addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset & ~0x3); | ||
80 | byte = offset & 0x3; | ||
81 | |||
82 | /* Workaround bug 5945: write 0 to a dummy register before reading, | ||
83 | * and write back what we read. We must read/write the full 32-bit | ||
84 | * contents so we need to shift and mask by hand. | ||
85 | */ | ||
86 | dummy = pa_pxp_cfg_addr(hose, bus->number, devfn, 0x10); | ||
87 | out_le32(dummy, 0); | ||
88 | tmp = in_le32(addr); | ||
89 | out_le32(addr, tmp); | ||
90 | |||
91 | switch (len) { | ||
92 | case 1: | ||
93 | *val = (tmp >> (8*byte)) & 0xff; | ||
94 | break; | ||
95 | case 2: | ||
96 | if (byte == 0) | ||
97 | *val = tmp & 0xffff; | ||
98 | else | ||
99 | *val = (tmp >> 16) & 0xffff; | ||
100 | break; | ||
101 | default: | ||
102 | *val = tmp; | ||
103 | break; | ||
104 | } | ||
105 | |||
106 | return 1; | ||
107 | } | ||
108 | |||
54 | static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, | 109 | static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, |
55 | int offset, int len, u32 *val) | 110 | int offset, int len, u32 *val) |
56 | { | 111 | { |
@@ -64,6 +119,9 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, | |||
64 | if (!pa_pxp_offset_valid(bus->number, devfn, offset)) | 119 | if (!pa_pxp_offset_valid(bus->number, devfn, offset)) |
65 | return PCIBIOS_BAD_REGISTER_NUMBER; | 120 | return PCIBIOS_BAD_REGISTER_NUMBER; |
66 | 121 | ||
122 | if (workaround_5945(bus, devfn, offset, len, val)) | ||
123 | return PCIBIOS_SUCCESSFUL; | ||
124 | |||
67 | addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); | 125 | addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); |
68 | 126 | ||
69 | /* | 127 | /* |
@@ -107,23 +165,20 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
107 | switch (len) { | 165 | switch (len) { |
108 | case 1: | 166 | case 1: |
109 | out_8(addr, val); | 167 | out_8(addr, val); |
110 | (void) in_8(addr); | ||
111 | break; | 168 | break; |
112 | case 2: | 169 | case 2: |
113 | out_le16(addr, val); | 170 | out_le16(addr, val); |
114 | (void) in_le16(addr); | ||
115 | break; | 171 | break; |
116 | default: | 172 | default: |
117 | out_le32(addr, val); | 173 | out_le32(addr, val); |
118 | (void) in_le32(addr); | ||
119 | break; | 174 | break; |
120 | } | 175 | } |
121 | return PCIBIOS_SUCCESSFUL; | 176 | return PCIBIOS_SUCCESSFUL; |
122 | } | 177 | } |
123 | 178 | ||
124 | static struct pci_ops pa_pxp_ops = { | 179 | static struct pci_ops pa_pxp_ops = { |
125 | pa_pxp_read_config, | 180 | .read = pa_pxp_read_config, |
126 | pa_pxp_write_config, | 181 | .write = pa_pxp_write_config, |
127 | }; | 182 | }; |
128 | 183 | ||
129 | static void __init setup_pa_pxp(struct pci_controller *hose) | 184 | static void __init setup_pa_pxp(struct pci_controller *hose) |
@@ -178,3 +233,12 @@ void __init pas_pci_init(void) | |||
178 | /* Use the common resource allocation mechanism */ | 233 | /* Use the common resource allocation mechanism */ |
179 | pci_probe_only = 1; | 234 | pci_probe_only = 1; |
180 | } | 235 | } |
236 | |||
237 | void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset) | ||
238 | { | ||
239 | struct pci_controller *hose; | ||
240 | |||
241 | hose = pci_bus_to_host(dev->bus); | ||
242 | |||
243 | return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset); | ||
244 | } | ||
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index ffe6528048b5..5ddf40a66ae8 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -39,8 +39,21 @@ | |||
39 | 39 | ||
40 | #include "pasemi.h" | 40 | #include "pasemi.h" |
41 | 41 | ||
42 | /* SDC reset register, must be pre-mapped at reset time */ | ||
42 | static void __iomem *reset_reg; | 43 | static void __iomem *reset_reg; |
43 | 44 | ||
45 | /* Various error status registers, must be pre-mapped at MCE time */ | ||
46 | |||
47 | #define MAX_MCE_REGS 32 | ||
48 | struct mce_regs { | ||
49 | char *name; | ||
50 | void __iomem *addr; | ||
51 | }; | ||
52 | |||
53 | static struct mce_regs mce_regs[MAX_MCE_REGS]; | ||
54 | static int num_mce_regs; | ||
55 | |||
56 | |||
44 | static void pas_restart(char *cmd) | 57 | static void pas_restart(char *cmd) |
45 | { | 58 | { |
46 | printk("Restarting...\n"); | 59 | printk("Restarting...\n"); |
@@ -50,26 +63,30 @@ static void pas_restart(char *cmd) | |||
50 | 63 | ||
51 | #ifdef CONFIG_SMP | 64 | #ifdef CONFIG_SMP |
52 | static DEFINE_SPINLOCK(timebase_lock); | 65 | static DEFINE_SPINLOCK(timebase_lock); |
66 | static unsigned long timebase; | ||
53 | 67 | ||
54 | static void __devinit pas_give_timebase(void) | 68 | static void __devinit pas_give_timebase(void) |
55 | { | 69 | { |
56 | unsigned long tb; | ||
57 | |||
58 | spin_lock(&timebase_lock); | 70 | spin_lock(&timebase_lock); |
59 | mtspr(SPRN_TBCTL, TBCTL_FREEZE); | 71 | mtspr(SPRN_TBCTL, TBCTL_FREEZE); |
60 | tb = mftb(); | 72 | isync(); |
61 | mtspr(SPRN_TBCTL, TBCTL_UPDATE_LOWER | (tb & 0xffffffff)); | 73 | timebase = get_tb(); |
62 | mtspr(SPRN_TBCTL, TBCTL_UPDATE_UPPER | (tb >> 32)); | ||
63 | mtspr(SPRN_TBCTL, TBCTL_RESTART); | ||
64 | spin_unlock(&timebase_lock); | 74 | spin_unlock(&timebase_lock); |
65 | pr_debug("pas_give_timebase: cpu %d gave tb %lx\n", | 75 | |
66 | smp_processor_id(), tb); | 76 | while (timebase) |
77 | barrier(); | ||
78 | mtspr(SPRN_TBCTL, TBCTL_RESTART); | ||
67 | } | 79 | } |
68 | 80 | ||
69 | static void __devinit pas_take_timebase(void) | 81 | static void __devinit pas_take_timebase(void) |
70 | { | 82 | { |
71 | pr_debug("pas_take_timebase: cpu %d has tb %lx\n", | 83 | while (!timebase) |
72 | smp_processor_id(), mftb()); | 84 | smp_rmb(); |
85 | |||
86 | spin_lock(&timebase_lock); | ||
87 | set_tb(timebase >> 32, timebase & 0xffffffff); | ||
88 | timebase = 0; | ||
89 | spin_unlock(&timebase_lock); | ||
73 | } | 90 | } |
74 | 91 | ||
75 | struct smp_ops_t pas_smp_ops = { | 92 | struct smp_ops_t pas_smp_ops = { |
@@ -98,9 +115,60 @@ void __init pas_setup_arch(void) | |||
98 | /* Remap SDC register for doing reset */ | 115 | /* Remap SDC register for doing reset */ |
99 | /* XXXOJN This should maybe come out of the device tree */ | 116 | /* XXXOJN This should maybe come out of the device tree */ |
100 | reset_reg = ioremap(0xfc101100, 4); | 117 | reset_reg = ioremap(0xfc101100, 4); |
118 | } | ||
119 | |||
120 | static int __init pas_setup_mce_regs(void) | ||
121 | { | ||
122 | struct pci_dev *dev; | ||
123 | int reg; | ||
124 | |||
125 | if (!machine_is(pasemi)) | ||
126 | return -ENODEV; | ||
127 | |||
128 | /* Remap various SoC status registers for use by the MCE handler */ | ||
129 | |||
130 | reg = 0; | ||
131 | |||
132 | dev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa00a, NULL); | ||
133 | while (dev && reg < MAX_MCE_REGS) { | ||
134 | mce_regs[reg].name = kasprintf(GFP_KERNEL, | ||
135 | "mc%d_mcdebug_errsta", reg); | ||
136 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0x730); | ||
137 | dev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa00a, dev); | ||
138 | reg++; | ||
139 | } | ||
140 | |||
141 | dev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa001, NULL); | ||
142 | if (dev && reg+4 < MAX_MCE_REGS) { | ||
143 | mce_regs[reg].name = "iobdbg_IntStatus1"; | ||
144 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0x438); | ||
145 | reg++; | ||
146 | mce_regs[reg].name = "iobdbg_IOCTbusIntDbgReg"; | ||
147 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0x454); | ||
148 | reg++; | ||
149 | mce_regs[reg].name = "iobiom_IntStatus"; | ||
150 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0xc10); | ||
151 | reg++; | ||
152 | mce_regs[reg].name = "iobiom_IntDbgReg"; | ||
153 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0xc1c); | ||
154 | reg++; | ||
155 | } | ||
156 | |||
157 | dev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa009, NULL); | ||
158 | if (dev && reg+2 < MAX_MCE_REGS) { | ||
159 | mce_regs[reg].name = "l2csts_IntStatus"; | ||
160 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0x200); | ||
161 | reg++; | ||
162 | mce_regs[reg].name = "l2csts_Cnt"; | ||
163 | mce_regs[reg].addr = pasemi_pci_getcfgaddr(dev, 0x214); | ||
164 | reg++; | ||
165 | } | ||
101 | 166 | ||
102 | pasemi_idle_init(); | 167 | num_mce_regs = reg; |
168 | |||
169 | return 0; | ||
103 | } | 170 | } |
171 | device_initcall(pas_setup_mce_regs); | ||
104 | 172 | ||
105 | static __init void pas_init_IRQ(void) | 173 | static __init void pas_init_IRQ(void) |
106 | { | 174 | { |
@@ -162,25 +230,34 @@ static int pas_machine_check_handler(struct pt_regs *regs) | |||
162 | { | 230 | { |
163 | int cpu = smp_processor_id(); | 231 | int cpu = smp_processor_id(); |
164 | unsigned long srr0, srr1, dsisr; | 232 | unsigned long srr0, srr1, dsisr; |
233 | int dump_slb = 0; | ||
234 | int i; | ||
165 | 235 | ||
166 | srr0 = regs->nip; | 236 | srr0 = regs->nip; |
167 | srr1 = regs->msr; | 237 | srr1 = regs->msr; |
168 | dsisr = mfspr(SPRN_DSISR); | 238 | dsisr = mfspr(SPRN_DSISR); |
169 | printk(KERN_ERR "Machine Check on CPU %d\n", cpu); | 239 | printk(KERN_ERR "Machine Check on CPU %d\n", cpu); |
170 | printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1); | 240 | printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1); |
171 | printk(KERN_ERR "DSISR 0x%016lx DAR 0x%016lx\n", dsisr, regs->dar); | 241 | printk(KERN_ERR "DSISR 0x%016lx DAR 0x%016lx\n", dsisr, regs->dar); |
242 | printk(KERN_ERR "BER 0x%016lx MER 0x%016lx\n", mfspr(SPRN_PA6T_BER), | ||
243 | mfspr(SPRN_PA6T_MER)); | ||
244 | printk(KERN_ERR "IER 0x%016lx DER 0x%016lx\n", mfspr(SPRN_PA6T_IER), | ||
245 | mfspr(SPRN_PA6T_DER)); | ||
172 | printk(KERN_ERR "Cause:\n"); | 246 | printk(KERN_ERR "Cause:\n"); |
173 | 247 | ||
174 | if (srr1 & 0x200000) | 248 | if (srr1 & 0x200000) |
175 | printk(KERN_ERR "Signalled by SDC\n"); | 249 | printk(KERN_ERR "Signalled by SDC\n"); |
250 | |||
176 | if (srr1 & 0x100000) { | 251 | if (srr1 & 0x100000) { |
177 | printk(KERN_ERR "Load/Store detected error:\n"); | 252 | printk(KERN_ERR "Load/Store detected error:\n"); |
178 | if (dsisr & 0x8000) | 253 | if (dsisr & 0x8000) |
179 | printk(KERN_ERR "D-cache ECC double-bit error or bus error\n"); | 254 | printk(KERN_ERR "D-cache ECC double-bit error or bus error\n"); |
180 | if (dsisr & 0x4000) | 255 | if (dsisr & 0x4000) |
181 | printk(KERN_ERR "LSU snoop response error\n"); | 256 | printk(KERN_ERR "LSU snoop response error\n"); |
182 | if (dsisr & 0x2000) | 257 | if (dsisr & 0x2000) { |
183 | printk(KERN_ERR "MMU SLB multi-hit or invalid B field\n"); | 258 | printk(KERN_ERR "MMU SLB multi-hit or invalid B field\n"); |
259 | dump_slb = 1; | ||
260 | } | ||
184 | if (dsisr & 0x1000) | 261 | if (dsisr & 0x1000) |
185 | printk(KERN_ERR "Recoverable Duptags\n"); | 262 | printk(KERN_ERR "Recoverable Duptags\n"); |
186 | if (dsisr & 0x800) | 263 | if (dsisr & 0x800) |
@@ -188,13 +265,40 @@ static int pas_machine_check_handler(struct pt_regs *regs) | |||
188 | if (dsisr & 0x400) | 265 | if (dsisr & 0x400) |
189 | printk(KERN_ERR "TLB parity error count overflow\n"); | 266 | printk(KERN_ERR "TLB parity error count overflow\n"); |
190 | } | 267 | } |
268 | |||
191 | if (srr1 & 0x80000) | 269 | if (srr1 & 0x80000) |
192 | printk(KERN_ERR "Bus Error\n"); | 270 | printk(KERN_ERR "Bus Error\n"); |
193 | if (srr1 & 0x40000) | 271 | |
272 | if (srr1 & 0x40000) { | ||
194 | printk(KERN_ERR "I-side SLB multiple hit\n"); | 273 | printk(KERN_ERR "I-side SLB multiple hit\n"); |
274 | dump_slb = 1; | ||
275 | } | ||
276 | |||
195 | if (srr1 & 0x20000) | 277 | if (srr1 & 0x20000) |
196 | printk(KERN_ERR "I-cache parity error hit\n"); | 278 | printk(KERN_ERR "I-cache parity error hit\n"); |
197 | 279 | ||
280 | if (num_mce_regs == 0) | ||
281 | printk(KERN_ERR "No MCE registers mapped yet, can't dump\n"); | ||
282 | else | ||
283 | printk(KERN_ERR "SoC debug registers:\n"); | ||
284 | |||
285 | for (i = 0; i < num_mce_regs; i++) | ||
286 | printk(KERN_ERR "%s: 0x%08x\n", mce_regs[i].name, | ||
287 | in_le32(mce_regs[i].addr)); | ||
288 | |||
289 | if (dump_slb) { | ||
290 | unsigned long e, v; | ||
291 | int i; | ||
292 | |||
293 | printk(KERN_ERR "slb contents:\n"); | ||
294 | for (i = 0; i < SLB_NUM_ENTRIES; i++) { | ||
295 | asm volatile("slbmfee %0,%1" : "=r" (e) : "r" (i)); | ||
296 | asm volatile("slbmfev %0,%1" : "=r" (v) : "r" (i)); | ||
297 | printk(KERN_ERR "%02d %016lx %016lx\n", i, e, v); | ||
298 | } | ||
299 | } | ||
300 | |||
301 | |||
198 | /* SRR1[62] is from MSR[62] if recoverable, so pass that back */ | 302 | /* SRR1[62] is from MSR[62] if recoverable, so pass that back */ |
199 | return !!(srr1 & 0x2); | 303 | return !!(srr1 & 0x2); |
200 | } | 304 | } |
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c index 9d73d0234c5d..cf660916ae0b 100644 --- a/arch/powerpc/platforms/powermac/bootx_init.c +++ b/arch/powerpc/platforms/powermac/bootx_init.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/bootx.h> | 19 | #include <asm/bootx.h> |
20 | #include <asm/bootinfo.h> | ||
21 | #include <asm/btext.h> | 20 | #include <asm/btext.h> |
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
23 | 22 | ||
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index efdf5eb81ecc..da2007e3db0e 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/completion.h> | 40 | #include <linux/completion.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/completion.h> | ||
44 | #include <linux/timer.h> | 43 | #include <linux/timer.h> |
45 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
46 | #include <asm/keylargo.h> | 45 | #include <asm/keylargo.h> |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 92586db19754..ec49099830d5 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -209,15 +209,12 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
209 | switch (len) { | 209 | switch (len) { |
210 | case 1: | 210 | case 1: |
211 | out_8(addr, val); | 211 | out_8(addr, val); |
212 | (void) in_8(addr); | ||
213 | break; | 212 | break; |
214 | case 2: | 213 | case 2: |
215 | out_le16(addr, val); | 214 | out_le16(addr, val); |
216 | (void) in_le16(addr); | ||
217 | break; | 215 | break; |
218 | default: | 216 | default: |
219 | out_le32(addr, val); | 217 | out_le32(addr, val); |
220 | (void) in_le32(addr); | ||
221 | break; | 218 | break; |
222 | } | 219 | } |
223 | return PCIBIOS_SUCCESSFUL; | 220 | return PCIBIOS_SUCCESSFUL; |
@@ -225,8 +222,8 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn, | |||
225 | 222 | ||
226 | static struct pci_ops macrisc_pci_ops = | 223 | static struct pci_ops macrisc_pci_ops = |
227 | { | 224 | { |
228 | macrisc_read_config, | 225 | .read = macrisc_read_config, |
229 | macrisc_write_config | 226 | .write = macrisc_write_config, |
230 | }; | 227 | }; |
231 | 228 | ||
232 | #ifdef CONFIG_PPC32 | 229 | #ifdef CONFIG_PPC32 |
@@ -280,8 +277,8 @@ chaos_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
280 | 277 | ||
281 | static struct pci_ops chaos_pci_ops = | 278 | static struct pci_ops chaos_pci_ops = |
282 | { | 279 | { |
283 | chaos_read_config, | 280 | .read = chaos_read_config, |
284 | chaos_write_config | 281 | .write = chaos_write_config, |
285 | }; | 282 | }; |
286 | 283 | ||
287 | static void __init setup_chaos(struct pci_controller *hose, | 284 | static void __init setup_chaos(struct pci_controller *hose, |
@@ -440,15 +437,12 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
440 | switch (len) { | 437 | switch (len) { |
441 | case 1: | 438 | case 1: |
442 | out_8(addr, val); | 439 | out_8(addr, val); |
443 | (void) in_8(addr); | ||
444 | break; | 440 | break; |
445 | case 2: | 441 | case 2: |
446 | out_le16(addr, val); | 442 | out_le16(addr, val); |
447 | (void) in_le16(addr); | ||
448 | break; | 443 | break; |
449 | default: | 444 | default: |
450 | out_le32((u32 __iomem *)addr, val); | 445 | out_le32((u32 __iomem *)addr, val); |
451 | (void) in_le32(addr); | ||
452 | break; | 446 | break; |
453 | } | 447 | } |
454 | return PCIBIOS_SUCCESSFUL; | 448 | return PCIBIOS_SUCCESSFUL; |
@@ -456,8 +450,8 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
456 | 450 | ||
457 | static struct pci_ops u3_ht_pci_ops = | 451 | static struct pci_ops u3_ht_pci_ops = |
458 | { | 452 | { |
459 | u3_ht_read_config, | 453 | .read = u3_ht_read_config, |
460 | u3_ht_write_config | 454 | .write = u3_ht_write_config, |
461 | }; | 455 | }; |
462 | 456 | ||
463 | #define U4_PCIE_CFA0(devfn, off) \ | 457 | #define U4_PCIE_CFA0(devfn, off) \ |
@@ -545,15 +539,12 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
545 | switch (len) { | 539 | switch (len) { |
546 | case 1: | 540 | case 1: |
547 | out_8(addr, val); | 541 | out_8(addr, val); |
548 | (void) in_8(addr); | ||
549 | break; | 542 | break; |
550 | case 2: | 543 | case 2: |
551 | out_le16(addr, val); | 544 | out_le16(addr, val); |
552 | (void) in_le16(addr); | ||
553 | break; | 545 | break; |
554 | default: | 546 | default: |
555 | out_le32(addr, val); | 547 | out_le32(addr, val); |
556 | (void) in_le32(addr); | ||
557 | break; | 548 | break; |
558 | } | 549 | } |
559 | return PCIBIOS_SUCCESSFUL; | 550 | return PCIBIOS_SUCCESSFUL; |
@@ -561,8 +552,8 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, | |||
561 | 552 | ||
562 | static struct pci_ops u4_pcie_pci_ops = | 553 | static struct pci_ops u4_pcie_pci_ops = |
563 | { | 554 | { |
564 | u4_pcie_read_config, | 555 | .read = u4_pcie_read_config, |
565 | u4_pcie_write_config | 556 | .write = u4_pcie_write_config, |
566 | }; | 557 | }; |
567 | 558 | ||
568 | #endif /* CONFIG_PPC64 */ | 559 | #endif /* CONFIG_PPC64 */ |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 87cd6805171a..999f5e160897 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
384 | /* | 384 | /* |
385 | * Allocate an irq host | 385 | * Allocate an irq host |
386 | */ | 386 | */ |
387 | pmac_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, max_irqs, | 387 | pmac_pic_host = irq_alloc_host(master, IRQ_HOST_MAP_LINEAR, max_irqs, |
388 | &pmac_pic_host_ops, | 388 | &pmac_pic_host_ops, |
389 | max_irqs); | 389 | max_irqs); |
390 | BUG_ON(pmac_pic_host == NULL); | 390 | BUG_ON(pmac_pic_host == NULL); |
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index 6e090a7dea83..fcde070f7054 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h | |||
@@ -22,9 +22,6 @@ extern void pmac_read_rtc_time(void); | |||
22 | extern void pmac_calibrate_decr(void); | 22 | extern void pmac_calibrate_decr(void); |
23 | extern void pmac_pci_irq_fixup(struct pci_dev *); | 23 | extern void pmac_pci_irq_fixup(struct pci_dev *); |
24 | extern void pmac_pci_init(void); | 24 | extern void pmac_pci_init(void); |
25 | extern unsigned long pmac_ide_get_base(int index); | ||
26 | extern void pmac_ide_init_hwif_ports(hw_regs_t *hw, | ||
27 | unsigned long data_port, unsigned long ctrl_port, int *irq); | ||
28 | 25 | ||
29 | extern void pmac_nvram_update(void); | 26 | extern void pmac_nvram_update(void); |
30 | extern unsigned char pmac_nvram_read_byte(int addr); | 27 | extern unsigned char pmac_nvram_read_byte(int addr); |
@@ -33,7 +30,6 @@ extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial); | |||
33 | extern void pmac_pcibios_after_init(void); | 30 | extern void pmac_pcibios_after_init(void); |
34 | extern int of_show_percpuinfo(struct seq_file *m, int i); | 31 | extern int of_show_percpuinfo(struct seq_file *m, int i); |
35 | 32 | ||
36 | extern void pmac_pci_init(void); | ||
37 | extern void pmac_setup_pci_dma(void); | 33 | extern void pmac_setup_pci_dma(void); |
38 | extern void pmac_check_ht_link(void); | 34 | extern void pmac_check_ht_link(void); |
39 | 35 | ||
diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c index 6124e59e1038..44e0b55a2a02 100644 --- a/arch/powerpc/platforms/powermac/udbg_adb.c +++ b/arch/powerpc/platforms/powermac/udbg_adb.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/xmon.h> | 12 | #include <asm/xmon.h> |
13 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
14 | #include <asm/bootx.h> | 14 | #include <asm/bootx.h> |
15 | #include <asm/machdep.h> | ||
16 | #include <asm/errno.h> | 15 | #include <asm/errno.h> |
17 | #include <asm/pmac_feature.h> | 16 | #include <asm/pmac_feature.h> |
18 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
@@ -150,7 +149,7 @@ static void udbg_adb_putc(char c) | |||
150 | return udbg_adb_old_putc(c); | 149 | return udbg_adb_old_putc(c); |
151 | } | 150 | } |
152 | 151 | ||
153 | void udbg_adb_init_early(void) | 152 | void __init udbg_adb_init_early(void) |
154 | { | 153 | { |
155 | #ifdef CONFIG_BOOTX_TEXT | 154 | #ifdef CONFIG_BOOTX_TEXT |
156 | if (btext_find_display(1) == 0) { | 155 | if (btext_find_display(1) == 0) { |
@@ -160,7 +159,7 @@ void udbg_adb_init_early(void) | |||
160 | #endif | 159 | #endif |
161 | } | 160 | } |
162 | 161 | ||
163 | int udbg_adb_init(int force_btext) | 162 | int __init udbg_adb_init(int force_btext) |
164 | { | 163 | { |
165 | struct device_node *np; | 164 | struct device_node *np; |
166 | 165 | ||
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index ce15cada88d4..fd063fe0c9b3 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -297,8 +297,8 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | |||
297 | u64 dev_port; | 297 | u64 dev_port; |
298 | } *notify_event; | 298 | } *notify_event; |
299 | 299 | ||
300 | pr_debug(" -> %s:%u: bus_id %u, dev_id %u, dev_type %u\n", __func__, | 300 | pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id, |
301 | __LINE__, repo->bus_id, repo->dev_id, repo->dev_type); | 301 | repo->dev_id, repo->dev_type); |
302 | 302 | ||
303 | buf = kzalloc(512, GFP_KERNEL); | 303 | buf = kzalloc(512, GFP_KERNEL); |
304 | if (!buf) | 304 | if (!buf) |
@@ -359,6 +359,11 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | |||
359 | break; | 359 | break; |
360 | } | 360 | } |
361 | 361 | ||
362 | pr_debug("%s:%d: notify event (%u:%u:%u): event_type 0x%lx, " | ||
363 | "port %lu\n", __func__, __LINE__, repo->bus_index, | ||
364 | repo->dev_index, repo->dev_type, | ||
365 | notify_event->event_type, notify_event->dev_port); | ||
366 | |||
362 | if (notify_event->event_type != notify_region_probe || | 367 | if (notify_event->event_type != notify_region_probe || |
363 | notify_event->bus_id != repo->bus_id) { | 368 | notify_event->bus_id != repo->bus_id) { |
364 | pr_debug("%s:%u: bad notify_event: event %lu, " | 369 | pr_debug("%s:%u: bad notify_event: event %lu, " |
@@ -370,8 +375,9 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) | |||
370 | 375 | ||
371 | if (notify_event->dev_id == repo->dev_id && | 376 | if (notify_event->dev_id == repo->dev_id && |
372 | notify_event->dev_type == repo->dev_type) { | 377 | notify_event->dev_type == repo->dev_type) { |
373 | pr_debug("%s:%u: device ready: dev_id %u\n", __func__, | 378 | pr_debug("%s:%u: device ready (%u:%u:%u)\n", __func__, |
374 | __LINE__, repo->dev_id); | 379 | __LINE__, repo->bus_index, repo->dev_index, |
380 | repo->dev_type); | ||
375 | error = 0; | 381 | error = 0; |
376 | break; | 382 | break; |
377 | } | 383 | } |
@@ -412,9 +418,10 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo, | |||
412 | return -ENODEV; | 418 | return -ENODEV; |
413 | } | 419 | } |
414 | 420 | ||
415 | pr_debug("%s:%u: index %u:%u: port %lu blk_size %lu num_blocks %lu " | 421 | pr_debug("%s:%u: (%u:%u:%u): port %lu blk_size %lu num_blocks %lu " |
416 | "num_regions %u\n", __func__, __LINE__, repo->bus_index, | 422 | "num_regions %u\n", __func__, __LINE__, repo->bus_index, |
417 | repo->dev_index, port, blk_size, num_blocks, num_regions); | 423 | repo->dev_index, repo->dev_type, port, blk_size, num_blocks, |
424 | num_regions); | ||
418 | 425 | ||
419 | p = kzalloc(sizeof(struct ps3_storage_device) + | 426 | p = kzalloc(sizeof(struct ps3_storage_device) + |
420 | num_regions * sizeof(struct ps3_storage_region), | 427 | num_regions * sizeof(struct ps3_storage_region), |
@@ -681,8 +688,9 @@ static int ps3_probe_thread(void *data) | |||
681 | pr_debug("%s:%u: find device error.\n", | 688 | pr_debug("%s:%u: find device error.\n", |
682 | __func__, __LINE__); | 689 | __func__, __LINE__); |
683 | else { | 690 | else { |
684 | pr_debug("%s:%u: found device\n", __func__, | 691 | pr_debug("%s:%u: found device (%u:%u:%u)\n", |
685 | __LINE__); | 692 | __func__, __LINE__, repo->bus_index, |
693 | repo->dev_index, repo->dev_type); | ||
686 | ps3_register_repository_device(repo); | 694 | ps3_register_repository_device(repo); |
687 | ps3_repository_bump_device(repo); | 695 | ps3_repository_bump_device(repo); |
688 | ms = 250; | 696 | ms = 250; |
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 67e32ec9b37e..3a6db04aa940 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -673,9 +673,16 @@ static int ps3_host_map(struct irq_host *h, unsigned int virq, | |||
673 | return 0; | 673 | return 0; |
674 | } | 674 | } |
675 | 675 | ||
676 | static int ps3_host_match(struct irq_host *h, struct device_node *np) | ||
677 | { | ||
678 | /* Match all */ | ||
679 | return 1; | ||
680 | } | ||
681 | |||
676 | static struct irq_host_ops ps3_host_ops = { | 682 | static struct irq_host_ops ps3_host_ops = { |
677 | .map = ps3_host_map, | 683 | .map = ps3_host_map, |
678 | .unmap = ps3_host_unmap, | 684 | .unmap = ps3_host_unmap, |
685 | .match = ps3_host_match, | ||
679 | }; | 686 | }; |
680 | 687 | ||
681 | void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) | 688 | void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) |
@@ -726,7 +733,7 @@ void __init ps3_init_IRQ(void) | |||
726 | unsigned cpu; | 733 | unsigned cpu; |
727 | struct irq_host *host; | 734 | struct irq_host *host; |
728 | 735 | ||
729 | host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops, | 736 | host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops, |
730 | PS3_INVALID_OUTLET); | 737 | PS3_INVALID_OUTLET); |
731 | irq_set_default_host(host); | 738 | irq_set_default_host(host); |
732 | irq_set_virq_count(PS3_PLUG_MAX + 1); | 739 | irq_set_virq_count(PS3_PLUG_MAX + 1); |
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h index 2eb8f92704b4..27c7d099816a 100644 --- a/arch/powerpc/platforms/ps3/platform.h +++ b/arch/powerpc/platforms/ps3/platform.h | |||
@@ -47,7 +47,11 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq); | |||
47 | /* smp */ | 47 | /* smp */ |
48 | 48 | ||
49 | void smp_init_ps3(void); | 49 | void smp_init_ps3(void); |
50 | #ifdef CONFIG_SMP | ||
50 | void ps3_smp_cleanup_cpu(int cpu); | 51 | void ps3_smp_cleanup_cpu(int cpu); |
52 | #else | ||
53 | static inline void ps3_smp_cleanup_cpu(int cpu) { } | ||
54 | #endif | ||
51 | 55 | ||
52 | /* time */ | 56 | /* time */ |
53 | 57 | ||
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index b8770395013d..22322b35a0ff 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -169,6 +169,8 @@ static void rtas_slot_error_detail(struct pci_dn *pdn, int severity, | |||
169 | */ | 169 | */ |
170 | static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | 170 | static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) |
171 | { | 171 | { |
172 | struct device_node *dn; | ||
173 | struct pci_dev *dev = pdn->pcidev; | ||
172 | u32 cfg; | 174 | u32 cfg; |
173 | int cap, i; | 175 | int cap, i; |
174 | int n = 0; | 176 | int n = 0; |
@@ -184,6 +186,17 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
184 | n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); | 186 | n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); |
185 | printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); | 187 | printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); |
186 | 188 | ||
189 | /* Gather bridge-specific registers */ | ||
190 | if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { | ||
191 | rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); | ||
192 | n += scnprintf(buf+n, len-n, "sec stat:%x\n", cfg); | ||
193 | printk(KERN_WARNING "EEH: Bridge secondary status: %04x\n", cfg); | ||
194 | |||
195 | rtas_read_config(pdn, PCI_BRIDGE_CONTROL, 2, &cfg); | ||
196 | n += scnprintf(buf+n, len-n, "brdg ctl:%x\n", cfg); | ||
197 | printk(KERN_WARNING "EEH: Bridge control: %04x\n", cfg); | ||
198 | } | ||
199 | |||
187 | /* Dump out the PCI-X command and status regs */ | 200 | /* Dump out the PCI-X command and status regs */ |
188 | cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); | 201 | cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); |
189 | if (cap) { | 202 | if (cap) { |
@@ -209,7 +222,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
209 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); | 222 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); |
210 | } | 223 | } |
211 | 224 | ||
212 | cap = pci_find_ext_capability(pdn->pcidev,PCI_EXT_CAP_ID_ERR); | 225 | cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR); |
213 | if (cap) { | 226 | if (cap) { |
214 | n += scnprintf(buf+n, len-n, "pci-e AER:\n"); | 227 | n += scnprintf(buf+n, len-n, "pci-e AER:\n"); |
215 | printk(KERN_WARNING | 228 | printk(KERN_WARNING |
@@ -222,6 +235,18 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) | |||
222 | } | 235 | } |
223 | } | 236 | } |
224 | } | 237 | } |
238 | |||
239 | /* Gather status on devices under the bridge */ | ||
240 | if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { | ||
241 | dn = pdn->node->child; | ||
242 | while (dn) { | ||
243 | pdn = PCI_DN(dn); | ||
244 | if (pdn) | ||
245 | n += gather_pci_data(pdn, buf+n, len-n); | ||
246 | dn = dn->sibling; | ||
247 | } | ||
248 | } | ||
249 | |||
225 | return n; | 250 | return n; |
226 | } | 251 | } |
227 | 252 | ||
@@ -750,12 +775,12 @@ int rtas_set_slot_reset(struct pci_dn *pdn) | |||
750 | return 0; | 775 | return 0; |
751 | 776 | ||
752 | if (rc < 0) { | 777 | if (rc < 0) { |
753 | printk (KERN_ERR "EEH: unrecoverable slot failure %s\n", | 778 | printk(KERN_ERR "EEH: unrecoverable slot failure %s\n", |
754 | pdn->node->full_name); | 779 | pdn->node->full_name); |
755 | return -1; | 780 | return -1; |
756 | } | 781 | } |
757 | printk (KERN_ERR "EEH: bus reset %d failed on slot %s\n", | 782 | printk(KERN_ERR "EEH: bus reset %d failed on slot %s, rc=%d\n", |
758 | i+1, pdn->node->full_name); | 783 | i+1, pdn->node->full_name, rc); |
759 | } | 784 | } |
760 | 785 | ||
761 | return -1; | 786 | return -1; |
@@ -930,7 +955,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
930 | pdn->eeh_freeze_count = 0; | 955 | pdn->eeh_freeze_count = 0; |
931 | pdn->eeh_false_positives = 0; | 956 | pdn->eeh_false_positives = 0; |
932 | 957 | ||
933 | if (status && strcmp(status, "ok") != 0) | 958 | if (status && strncmp(status, "ok", 2) != 0) |
934 | return NULL; /* ignore devices with bad status */ | 959 | return NULL; /* ignore devices with bad status */ |
935 | 960 | ||
936 | /* Ignore bad nodes. */ | 961 | /* Ignore bad nodes. */ |
@@ -944,23 +969,6 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
944 | } | 969 | } |
945 | pdn->class_code = *class_code; | 970 | pdn->class_code = *class_code; |
946 | 971 | ||
947 | /* | ||
948 | * Now decide if we are going to "Disable" EEH checking | ||
949 | * for this device. We still run with the EEH hardware active, | ||
950 | * but we won't be checking for ff's. This means a driver | ||
951 | * could return bad data (very bad!), an interrupt handler could | ||
952 | * hang waiting on status bits that won't change, etc. | ||
953 | * But there are a few cases like display devices that make sense. | ||
954 | */ | ||
955 | enable = 1; /* i.e. we will do checking */ | ||
956 | #if 0 | ||
957 | if ((*class_code >> 16) == PCI_BASE_CLASS_DISPLAY) | ||
958 | enable = 0; | ||
959 | #endif | ||
960 | |||
961 | if (!enable) | ||
962 | pdn->eeh_mode |= EEH_MODE_NOCHECK; | ||
963 | |||
964 | /* Ok... see if this device supports EEH. Some do, some don't, | 972 | /* Ok... see if this device supports EEH. Some do, some don't, |
965 | * and the only way to find out is to check each and every one. */ | 973 | * and the only way to find out is to check each and every one. */ |
966 | regs = of_get_property(dn, "reg", NULL); | 974 | regs = of_get_property(dn, "reg", NULL); |
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index e49c815eae23..1e83fcd0df31 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c | |||
@@ -225,6 +225,10 @@ void pci_addr_cache_insert_device(struct pci_dev *dev) | |||
225 | { | 225 | { |
226 | unsigned long flags; | 226 | unsigned long flags; |
227 | 227 | ||
228 | /* Ignore PCI bridges */ | ||
229 | if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) | ||
230 | return; | ||
231 | |||
228 | spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags); | 232 | spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags); |
229 | __pci_addr_cache_insert_device(dev); | 233 | __pci_addr_cache_insert_device(dev); |
230 | spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags); | 234 | spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags); |
@@ -285,16 +289,13 @@ void __init pci_addr_cache_build(void) | |||
285 | spin_lock_init(&pci_io_addr_cache_root.piar_lock); | 289 | spin_lock_init(&pci_io_addr_cache_root.piar_lock); |
286 | 290 | ||
287 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 291 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
288 | /* Ignore PCI bridges */ | ||
289 | if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) | ||
290 | continue; | ||
291 | 292 | ||
292 | pci_addr_cache_insert_device(dev); | 293 | pci_addr_cache_insert_device(dev); |
293 | 294 | ||
294 | dn = pci_device_to_OF_node(dev); | 295 | dn = pci_device_to_OF_node(dev); |
295 | if (!dn) | 296 | if (!dn) |
296 | continue; | 297 | continue; |
297 | pci_dev_get (dev); /* matching put is in eeh_remove_device() */ | 298 | pci_dev_get(dev); /* matching put is in eeh_remove_device() */ |
298 | PCI_DN(dn)->pcidev = dev; | 299 | PCI_DN(dn)->pcidev = dev; |
299 | 300 | ||
300 | eeh_sysfs_add_device(dev); | 301 | eeh_sysfs_add_device(dev); |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 8cc6eeeaae2f..ea327ca345c6 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
36 | #include <asm/tlb.h> | 36 | #include <asm/tlb.h> |
37 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
38 | #include <asm/abs_addr.h> | ||
39 | #include <asm/cputable.h> | 38 | #include <asm/cputable.h> |
40 | #include <asm/udbg.h> | 39 | #include <asm/udbg.h> |
41 | #include <asm/smp.h> | 40 | #include <asm/smp.h> |
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 6063ea2f67ad..2793a1b100e6 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -70,11 +70,15 @@ static int rtas_change_msi(struct pci_dn *pdn, u32 func, u32 num_irqs) | |||
70 | seq_num = rtas_ret[1]; | 70 | seq_num = rtas_ret[1]; |
71 | } while (rtas_busy_delay(rc)); | 71 | } while (rtas_busy_delay(rc)); |
72 | 72 | ||
73 | if (rc == 0) /* Success */ | 73 | /* |
74 | rc = rtas_ret[0]; | 74 | * If the RTAS call succeeded, check the number of irqs is actually |
75 | * what we asked for. If not, return an error. | ||
76 | */ | ||
77 | if (rc == 0 && rtas_ret[0] != num_irqs) | ||
78 | rc = -ENOSPC; | ||
75 | 79 | ||
76 | pr_debug("rtas_msi: ibm,change_msi(func=%d,num=%d) = (%d)\n", | 80 | pr_debug("rtas_msi: ibm,change_msi(func=%d,num=%d), got %d rc = %d\n", |
77 | func, num_irqs, rc); | 81 | func, num_irqs, rtas_ret[0], rc); |
78 | 82 | ||
79 | return rc; | 83 | return rc; |
80 | } | 84 | } |
@@ -87,7 +91,7 @@ static void rtas_disable_msi(struct pci_dev *pdev) | |||
87 | if (!pdn) | 91 | if (!pdn) |
88 | return; | 92 | return; |
89 | 93 | ||
90 | if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) | 94 | if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0)) |
91 | pr_debug("rtas_msi: Setting MSIs to 0 failed!\n"); | 95 | pr_debug("rtas_msi: Setting MSIs to 0 failed!\n"); |
92 | } | 96 | } |
93 | 97 | ||
@@ -180,38 +184,31 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
180 | if (type == PCI_CAP_ID_MSI) { | 184 | if (type == PCI_CAP_ID_MSI) { |
181 | rc = rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, nvec); | 185 | rc = rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, nvec); |
182 | 186 | ||
183 | if (rc != nvec) { | 187 | if (rc) { |
184 | pr_debug("rtas_msi: trying the old firmware call.\n"); | 188 | pr_debug("rtas_msi: trying the old firmware call.\n"); |
185 | rc = rtas_change_msi(pdn, RTAS_CHANGE_FN, nvec); | 189 | rc = rtas_change_msi(pdn, RTAS_CHANGE_FN, nvec); |
186 | } | 190 | } |
187 | } else | 191 | } else |
188 | rc = rtas_change_msi(pdn, RTAS_CHANGE_MSIX_FN, nvec); | 192 | rc = rtas_change_msi(pdn, RTAS_CHANGE_MSIX_FN, nvec); |
189 | 193 | ||
190 | if (rc != nvec) { | 194 | if (rc) { |
191 | pr_debug("rtas_msi: rtas_change_msi() failed\n"); | 195 | pr_debug("rtas_msi: rtas_change_msi() failed\n"); |
192 | 196 | return rc; | |
193 | /* | ||
194 | * In case of an error it's not clear whether the device is | ||
195 | * left with MSI enabled or not, so we explicitly disable. | ||
196 | */ | ||
197 | goto out_free; | ||
198 | } | 197 | } |
199 | 198 | ||
200 | i = 0; | 199 | i = 0; |
201 | list_for_each_entry(entry, &pdev->msi_list, list) { | 200 | list_for_each_entry(entry, &pdev->msi_list, list) { |
202 | hwirq = rtas_query_irq_number(pdn, i); | 201 | hwirq = rtas_query_irq_number(pdn, i); |
203 | if (hwirq < 0) { | 202 | if (hwirq < 0) { |
204 | rc = hwirq; | ||
205 | pr_debug("rtas_msi: error (%d) getting hwirq\n", rc); | 203 | pr_debug("rtas_msi: error (%d) getting hwirq\n", rc); |
206 | goto out_free; | 204 | return hwirq; |
207 | } | 205 | } |
208 | 206 | ||
209 | virq = irq_create_mapping(NULL, hwirq); | 207 | virq = irq_create_mapping(NULL, hwirq); |
210 | 208 | ||
211 | if (virq == NO_IRQ) { | 209 | if (virq == NO_IRQ) { |
212 | pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq); | 210 | pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq); |
213 | rc = -ENOSPC; | 211 | return -ENOSPC; |
214 | goto out_free; | ||
215 | } | 212 | } |
216 | 213 | ||
217 | dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq); | 214 | dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq); |
@@ -220,10 +217,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
220 | } | 217 | } |
221 | 218 | ||
222 | return 0; | 219 | return 0; |
223 | |||
224 | out_free: | ||
225 | rtas_teardown_msi_irqs(pdev); | ||
226 | return rc; | ||
227 | } | 220 | } |
228 | 221 | ||
229 | static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev) | 222 | static void rtas_msi_pci_irq_fixup(struct pci_dev *pdev) |
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c index 9797b10b2935..73401c820110 100644 --- a/arch/powerpc/platforms/pseries/rtasd.c +++ b/arch/powerpc/platforms/pseries/rtasd.c | |||
@@ -44,15 +44,20 @@ static unsigned long rtas_log_start; | |||
44 | static unsigned long rtas_log_size; | 44 | static unsigned long rtas_log_size; |
45 | 45 | ||
46 | static int surveillance_timeout = -1; | 46 | static int surveillance_timeout = -1; |
47 | static unsigned int rtas_event_scan_rate; | ||
48 | static unsigned int rtas_error_log_max; | 47 | static unsigned int rtas_error_log_max; |
49 | static unsigned int rtas_error_log_buffer_max; | 48 | static unsigned int rtas_error_log_buffer_max; |
50 | 49 | ||
51 | static int full_rtas_msgs = 0; | 50 | /* RTAS service tokens */ |
51 | static unsigned int event_scan; | ||
52 | static unsigned int rtas_event_scan_rate; | ||
52 | 53 | ||
53 | extern int no_logging; | 54 | static int full_rtas_msgs = 0; |
54 | 55 | ||
55 | volatile int error_log_cnt = 0; | 56 | /* Stop logging to nvram after first fatal error */ |
57 | static int logging_enabled; /* Until we initialize everything, | ||
58 | * make sure we don't try logging | ||
59 | * anything */ | ||
60 | static int error_log_cnt; | ||
56 | 61 | ||
57 | /* | 62 | /* |
58 | * Since we use 32 bit RTAS, the physical address of this must be below | 63 | * Since we use 32 bit RTAS, the physical address of this must be below |
@@ -61,8 +66,6 @@ volatile int error_log_cnt = 0; | |||
61 | */ | 66 | */ |
62 | static unsigned char logdata[RTAS_ERROR_LOG_MAX]; | 67 | static unsigned char logdata[RTAS_ERROR_LOG_MAX]; |
63 | 68 | ||
64 | static int get_eventscan_parms(void); | ||
65 | |||
66 | static char *rtas_type[] = { | 69 | static char *rtas_type[] = { |
67 | "Unknown", "Retry", "TCE Error", "Internal Device Failure", | 70 | "Unknown", "Retry", "TCE Error", "Internal Device Failure", |
68 | "Timeout", "Data Parity", "Address Parity", "Cache Parity", | 71 | "Timeout", "Data Parity", "Address Parity", "Cache Parity", |
@@ -166,9 +169,9 @@ static int log_rtas_len(char * buf) | |||
166 | len += err->extended_log_length; | 169 | len += err->extended_log_length; |
167 | } | 170 | } |
168 | 171 | ||
169 | if (rtas_error_log_max == 0) { | 172 | if (rtas_error_log_max == 0) |
170 | get_eventscan_parms(); | 173 | rtas_error_log_max = rtas_get_error_log_max(); |
171 | } | 174 | |
172 | if (len > rtas_error_log_max) | 175 | if (len > rtas_error_log_max) |
173 | len = rtas_error_log_max; | 176 | len = rtas_error_log_max; |
174 | 177 | ||
@@ -215,8 +218,8 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal) | |||
215 | } | 218 | } |
216 | 219 | ||
217 | /* Write error to NVRAM */ | 220 | /* Write error to NVRAM */ |
218 | if (!no_logging && !(err_type & ERR_FLAG_BOOT)) | 221 | if (logging_enabled && !(err_type & ERR_FLAG_BOOT)) |
219 | nvram_write_error_log(buf, len, err_type); | 222 | nvram_write_error_log(buf, len, err_type, error_log_cnt); |
220 | 223 | ||
221 | /* | 224 | /* |
222 | * rtas errors can occur during boot, and we do want to capture | 225 | * rtas errors can occur during boot, and we do want to capture |
@@ -227,8 +230,8 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal) | |||
227 | printk_log_rtas(buf, len); | 230 | printk_log_rtas(buf, len); |
228 | 231 | ||
229 | /* Check to see if we need to or have stopped logging */ | 232 | /* Check to see if we need to or have stopped logging */ |
230 | if (fatal || no_logging) { | 233 | if (fatal || !logging_enabled) { |
231 | no_logging = 1; | 234 | logging_enabled = 0; |
232 | spin_unlock_irqrestore(&rtasd_log_lock, s); | 235 | spin_unlock_irqrestore(&rtasd_log_lock, s); |
233 | return; | 236 | return; |
234 | } | 237 | } |
@@ -300,7 +303,7 @@ static ssize_t rtas_log_read(struct file * file, char __user * buf, | |||
300 | 303 | ||
301 | spin_lock_irqsave(&rtasd_log_lock, s); | 304 | spin_lock_irqsave(&rtasd_log_lock, s); |
302 | /* if it's 0, then we know we got the last one (the one in NVRAM) */ | 305 | /* if it's 0, then we know we got the last one (the one in NVRAM) */ |
303 | if (rtas_log_size == 0 && !no_logging) | 306 | if (rtas_log_size == 0 && logging_enabled) |
304 | nvram_clear_error_log(); | 307 | nvram_clear_error_log(); |
305 | spin_unlock_irqrestore(&rtasd_log_lock, s); | 308 | spin_unlock_irqrestore(&rtasd_log_lock, s); |
306 | 309 | ||
@@ -356,32 +359,7 @@ static int enable_surveillance(int timeout) | |||
356 | return -1; | 359 | return -1; |
357 | } | 360 | } |
358 | 361 | ||
359 | static int get_eventscan_parms(void) | 362 | static void do_event_scan(void) |
360 | { | ||
361 | struct device_node *node; | ||
362 | const int *ip; | ||
363 | |||
364 | node = of_find_node_by_path("/rtas"); | ||
365 | |||
366 | ip = of_get_property(node, "rtas-event-scan-rate", NULL); | ||
367 | if (ip == NULL) { | ||
368 | printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n"); | ||
369 | of_node_put(node); | ||
370 | return -1; | ||
371 | } | ||
372 | rtas_event_scan_rate = *ip; | ||
373 | DEBUG("rtas-event-scan-rate %d\n", rtas_event_scan_rate); | ||
374 | |||
375 | /* Make room for the sequence number */ | ||
376 | rtas_error_log_max = rtas_get_error_log_max(); | ||
377 | rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); | ||
378 | |||
379 | of_node_put(node); | ||
380 | |||
381 | return 0; | ||
382 | } | ||
383 | |||
384 | static void do_event_scan(int event_scan) | ||
385 | { | 363 | { |
386 | int error; | 364 | int error; |
387 | do { | 365 | do { |
@@ -408,7 +386,7 @@ static void do_event_scan_all_cpus(long delay) | |||
408 | cpu = first_cpu(cpu_online_map); | 386 | cpu = first_cpu(cpu_online_map); |
409 | for (;;) { | 387 | for (;;) { |
410 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 388 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
411 | do_event_scan(rtas_token("event-scan")); | 389 | do_event_scan(); |
412 | set_cpus_allowed(current, CPU_MASK_ALL); | 390 | set_cpus_allowed(current, CPU_MASK_ALL); |
413 | 391 | ||
414 | /* Drop hotplug lock, and sleep for the specified delay */ | 392 | /* Drop hotplug lock, and sleep for the specified delay */ |
@@ -426,31 +404,19 @@ static void do_event_scan_all_cpus(long delay) | |||
426 | static int rtasd(void *unused) | 404 | static int rtasd(void *unused) |
427 | { | 405 | { |
428 | unsigned int err_type; | 406 | unsigned int err_type; |
429 | int event_scan = rtas_token("event-scan"); | ||
430 | int rc; | 407 | int rc; |
431 | 408 | ||
432 | daemonize("rtasd"); | 409 | daemonize("rtasd"); |
433 | 410 | ||
434 | if (event_scan == RTAS_UNKNOWN_SERVICE || get_eventscan_parms() == -1) | ||
435 | goto error; | ||
436 | |||
437 | rtas_log_buf = vmalloc(rtas_error_log_buffer_max*LOG_NUMBER); | ||
438 | if (!rtas_log_buf) { | ||
439 | printk(KERN_ERR "rtasd: no memory\n"); | ||
440 | goto error; | ||
441 | } | ||
442 | |||
443 | printk(KERN_DEBUG "RTAS daemon started\n"); | 411 | printk(KERN_DEBUG "RTAS daemon started\n"); |
444 | |||
445 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); | 412 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); |
446 | 413 | ||
447 | /* See if we have any error stored in NVRAM */ | 414 | /* See if we have any error stored in NVRAM */ |
448 | memset(logdata, 0, rtas_error_log_max); | 415 | memset(logdata, 0, rtas_error_log_max); |
449 | 416 | rc = nvram_read_error_log(logdata, rtas_error_log_max, | |
450 | rc = nvram_read_error_log(logdata, rtas_error_log_max, &err_type); | 417 | &err_type, &error_log_cnt); |
451 | |||
452 | /* We can use rtas_log_buf now */ | 418 | /* We can use rtas_log_buf now */ |
453 | no_logging = 0; | 419 | logging_enabled = 1; |
454 | 420 | ||
455 | if (!rc) { | 421 | if (!rc) { |
456 | if (err_type != ERR_FLAG_ALREADY_LOGGED) { | 422 | if (err_type != ERR_FLAG_ALREADY_LOGGED) { |
@@ -473,8 +439,6 @@ static int rtasd(void *unused) | |||
473 | for (;;) | 439 | for (;;) |
474 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); | 440 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); |
475 | 441 | ||
476 | error: | ||
477 | /* Should delete proc entries */ | ||
478 | return -EINVAL; | 442 | return -EINVAL; |
479 | } | 443 | } |
480 | 444 | ||
@@ -486,11 +450,28 @@ static int __init rtas_init(void) | |||
486 | return 0; | 450 | return 0; |
487 | 451 | ||
488 | /* No RTAS */ | 452 | /* No RTAS */ |
489 | if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { | 453 | event_scan = rtas_token("event-scan"); |
454 | if (event_scan == RTAS_UNKNOWN_SERVICE) { | ||
490 | printk(KERN_DEBUG "rtasd: no event-scan on system\n"); | 455 | printk(KERN_DEBUG "rtasd: no event-scan on system\n"); |
491 | return -ENODEV; | 456 | return -ENODEV; |
492 | } | 457 | } |
493 | 458 | ||
459 | rtas_event_scan_rate = rtas_token("rtas-event-scan-rate"); | ||
460 | if (rtas_event_scan_rate == RTAS_UNKNOWN_SERVICE) { | ||
461 | printk(KERN_ERR "rtasd: no rtas-event-scan-rate on system\n"); | ||
462 | return -ENODEV; | ||
463 | } | ||
464 | |||
465 | /* Make room for the sequence number */ | ||
466 | rtas_error_log_max = rtas_get_error_log_max(); | ||
467 | rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); | ||
468 | |||
469 | rtas_log_buf = vmalloc(rtas_error_log_buffer_max*LOG_NUMBER); | ||
470 | if (!rtas_log_buf) { | ||
471 | printk(KERN_ERR "rtasd: no memory\n"); | ||
472 | return -ENOMEM; | ||
473 | } | ||
474 | |||
494 | entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); | 475 | entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); |
495 | if (entry) | 476 | if (entry) |
496 | entry->proc_fops = &proc_rtas_log_operations; | 477 | entry->proc_fops = &proc_rtas_log_operations; |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index f0b5ff17d860..66e7d68ffeb1 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -540,7 +540,7 @@ static void __init xics_init_host(void) | |||
540 | ops = &xics_host_lpar_ops; | 540 | ops = &xics_host_lpar_ops; |
541 | else | 541 | else |
542 | ops = &xics_host_direct_ops; | 542 | ops = &xics_host_direct_ops; |
543 | xics_host = irq_alloc_host(IRQ_HOST_MAP_TREE, 0, ops, | 543 | xics_host = irq_alloc_host(NULL, IRQ_HOST_MAP_TREE, 0, ops, |
544 | XICS_IRQ_SPURIOUS); | 544 | XICS_IRQ_SPURIOUS); |
545 | BUG_ON(xics_host == NULL); | 545 | BUG_ON(xics_host == NULL); |
546 | irq_set_default_host(xics_host); | 546 | irq_set_default_host(xics_host); |
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 08ce31e612c2..b0ea8e9495e8 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -16,15 +16,11 @@ obj-$(CONFIG_FSL_PCI) += fsl_pci.o | |||
16 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o | 16 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o |
17 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ | 17 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ |
18 | mv64x60-$(CONFIG_PCI) += mv64x60_pci.o | 18 | mv64x60-$(CONFIG_PCI) += mv64x60_pci.o |
19 | obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o | 19 | obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \ |
20 | mv64x60_udbg.o | ||
20 | obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o | 21 | obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o |
21 | obj-$(CONFIG_AXON_RAM) += axonram.o | 22 | obj-$(CONFIG_AXON_RAM) += axonram.o |
22 | 23 | ||
23 | # contains only the suspend handler for time | ||
24 | ifeq ($(CONFIG_RTC_CLASS),) | ||
25 | obj-$(CONFIG_PM) += timer.o | ||
26 | endif | ||
27 | |||
28 | ifeq ($(CONFIG_PPC_MERGE),y) | 24 | ifeq ($(CONFIG_PPC_MERGE),y) |
29 | obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o | 25 | obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o |
30 | obj-$(CONFIG_PPC_I8259) += i8259.o | 26 | obj-$(CONFIG_PPC_I8259) += i8259.o |
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c index dd5417aec1b4..160a8b49bdea 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/commproc.c | |||
@@ -45,12 +45,11 @@ | |||
45 | #define CPM_MAP_SIZE (0x4000) | 45 | #define CPM_MAP_SIZE (0x4000) |
46 | 46 | ||
47 | static void m8xx_cpm_dpinit(void); | 47 | static void m8xx_cpm_dpinit(void); |
48 | static uint host_buffer; /* One page of host buffer */ | 48 | static uint host_buffer; /* One page of host buffer */ |
49 | static uint host_end; /* end + 1 */ | 49 | static uint host_end; /* end + 1 */ |
50 | cpm8xx_t *cpmp; /* Pointer to comm processor space */ | 50 | cpm8xx_t *cpmp; /* Pointer to comm processor space */ |
51 | cpic8xx_t *cpic_reg; | 51 | cpic8xx_t *cpic_reg; |
52 | 52 | ||
53 | static struct device_node *cpm_pic_node; | ||
54 | static struct irq_host *cpm_pic_host; | 53 | static struct irq_host *cpm_pic_host; |
55 | 54 | ||
56 | static void cpm_mask_irq(unsigned int irq) | 55 | static void cpm_mask_irq(unsigned int irq) |
@@ -95,11 +94,6 @@ int cpm_get_irq(void) | |||
95 | return irq_linear_revmap(cpm_pic_host, cpm_vec); | 94 | return irq_linear_revmap(cpm_pic_host, cpm_vec); |
96 | } | 95 | } |
97 | 96 | ||
98 | static int cpm_pic_host_match(struct irq_host *h, struct device_node *node) | ||
99 | { | ||
100 | return cpm_pic_node == node; | ||
101 | } | ||
102 | |||
103 | static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, | 97 | static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, |
104 | irq_hw_number_t hw) | 98 | irq_hw_number_t hw) |
105 | { | 99 | { |
@@ -115,7 +109,7 @@ static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, | |||
115 | * and return. This is a no-op function so we don't need any special | 109 | * and return. This is a no-op function so we don't need any special |
116 | * tests in the interrupt handler. | 110 | * tests in the interrupt handler. |
117 | */ | 111 | */ |
118 | static irqreturn_t cpm_error_interrupt(int irq, void *dev) | 112 | static irqreturn_t cpm_error_interrupt(int irq, void *dev) |
119 | { | 113 | { |
120 | return IRQ_HANDLED; | 114 | return IRQ_HANDLED; |
121 | } | 115 | } |
@@ -127,7 +121,6 @@ static struct irqaction cpm_error_irqaction = { | |||
127 | }; | 121 | }; |
128 | 122 | ||
129 | static struct irq_host_ops cpm_pic_host_ops = { | 123 | static struct irq_host_ops cpm_pic_host_ops = { |
130 | .match = cpm_pic_host_match, | ||
131 | .map = cpm_pic_host_map, | 124 | .map = cpm_pic_host_map, |
132 | }; | 125 | }; |
133 | 126 | ||
@@ -165,9 +158,8 @@ unsigned int cpm_pic_init(void) | |||
165 | 158 | ||
166 | out_be32(&cpic_reg->cpic_cimr, 0); | 159 | out_be32(&cpic_reg->cpic_cimr, 0); |
167 | 160 | ||
168 | cpm_pic_node = of_node_get(np); | 161 | cpm_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR, |
169 | 162 | 64, &cpm_pic_host_ops, 64); | |
170 | cpm_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm_pic_host_ops, 64); | ||
171 | if (cpm_pic_host == NULL) { | 163 | if (cpm_pic_host == NULL) { |
172 | printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); | 164 | printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); |
173 | sirq = NO_IRQ; | 165 | sirq = NO_IRQ; |
@@ -181,7 +173,7 @@ unsigned int cpm_pic_init(void) | |||
181 | printk(KERN_ERR "CPM PIC init: can not find cpm node\n"); | 173 | printk(KERN_ERR "CPM PIC init: can not find cpm node\n"); |
182 | goto end; | 174 | goto end; |
183 | } | 175 | } |
184 | eirq= irq_of_parse_and_map(np, 0); | 176 | eirq = irq_of_parse_and_map(np, 0); |
185 | if (eirq == NO_IRQ) | 177 | if (eirq == NO_IRQ) |
186 | goto end; | 178 | goto end; |
187 | 179 | ||
@@ -197,15 +189,15 @@ end: | |||
197 | 189 | ||
198 | void cpm_reset(void) | 190 | void cpm_reset(void) |
199 | { | 191 | { |
200 | cpm8xx_t *commproc; | 192 | cpm8xx_t *commproc; |
201 | sysconf8xx_t *siu_conf; | 193 | sysconf8xx_t *siu_conf; |
202 | 194 | ||
203 | commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); | 195 | commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); |
204 | 196 | ||
205 | #ifdef CONFIG_UCODE_PATCH | 197 | #ifdef CONFIG_UCODE_PATCH |
206 | /* Perform a reset. | 198 | /* Perform a reset. |
207 | */ | 199 | */ |
208 | out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG); | 200 | out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG); |
209 | 201 | ||
210 | /* Wait for it. | 202 | /* Wait for it. |
211 | */ | 203 | */ |
@@ -307,7 +299,7 @@ static rh_block_t cpm_boot_dpmem_rh_block[16]; | |||
307 | static rh_info_t cpm_dpmem_info; | 299 | static rh_info_t cpm_dpmem_info; |
308 | 300 | ||
309 | #define CPM_DPMEM_ALIGNMENT 8 | 301 | #define CPM_DPMEM_ALIGNMENT 8 |
310 | static u8* dpram_vbase; | 302 | static u8 *dpram_vbase; |
311 | static uint dpram_pbase; | 303 | static uint dpram_pbase; |
312 | 304 | ||
313 | void m8xx_cpm_dpinit(void) | 305 | void m8xx_cpm_dpinit(void) |
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c index c827715a5090..3bf89b324760 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2_common.c | |||
@@ -201,7 +201,7 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | if (mode == CPM_CLK_RX) | 203 | if (mode == CPM_CLK_RX) |
204 | shift +=3; | 204 | shift += 3; |
205 | 205 | ||
206 | for (i=0; i<24; i++) { | 206 | for (i=0; i<24; i++) { |
207 | if (clk_map[i][0] == target && clk_map[i][1] == clock) { | 207 | if (clk_map[i][0] == target && clk_map[i][1] == clock) { |
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index eabfe06fe05c..d5b36e0ecbda 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
@@ -50,7 +50,6 @@ | |||
50 | 50 | ||
51 | static intctl_cpm2_t *cpm2_intctl; | 51 | static intctl_cpm2_t *cpm2_intctl; |
52 | 52 | ||
53 | static struct device_node *cpm2_pic_node; | ||
54 | static struct irq_host *cpm2_pic_host; | 53 | static struct irq_host *cpm2_pic_host; |
55 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 54 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) |
56 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | 55 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; |
@@ -206,11 +205,6 @@ unsigned int cpm2_get_irq(void) | |||
206 | return irq_linear_revmap(cpm2_pic_host, irq); | 205 | return irq_linear_revmap(cpm2_pic_host, irq); |
207 | } | 206 | } |
208 | 207 | ||
209 | static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node) | ||
210 | { | ||
211 | return cpm2_pic_node == node; | ||
212 | } | ||
213 | |||
214 | static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, | 208 | static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, |
215 | irq_hw_number_t hw) | 209 | irq_hw_number_t hw) |
216 | { | 210 | { |
@@ -234,7 +228,6 @@ static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
234 | } | 228 | } |
235 | 229 | ||
236 | static struct irq_host_ops cpm2_pic_host_ops = { | 230 | static struct irq_host_ops cpm2_pic_host_ops = { |
237 | .match = cpm2_pic_host_match, | ||
238 | .map = cpm2_pic_host_map, | 231 | .map = cpm2_pic_host_map, |
239 | .xlate = cpm2_pic_host_xlate, | 232 | .xlate = cpm2_pic_host_xlate, |
240 | }; | 233 | }; |
@@ -273,8 +266,8 @@ void cpm2_pic_init(struct device_node *node) | |||
273 | out_be32(&cpm2_intctl->ic_scprrl, 0x05309770); | 266 | out_be32(&cpm2_intctl->ic_scprrl, 0x05309770); |
274 | 267 | ||
275 | /* create a legacy host */ | 268 | /* create a legacy host */ |
276 | cpm2_pic_node = of_node_get(node); | 269 | cpm2_pic_host = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
277 | cpm2_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm2_pic_host_ops, 64); | 270 | 64, &cpm2_pic_host_ops, 64); |
278 | if (cpm2_pic_host == NULL) { | 271 | if (cpm2_pic_host == NULL) { |
279 | printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); | 272 | printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); |
280 | return; | 273 | return; |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index a1d2042bb304..e0e24b01e3a6 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -204,7 +204,7 @@ static void dart_free(struct iommu_table *tbl, long index, long npages) | |||
204 | } | 204 | } |
205 | 205 | ||
206 | 206 | ||
207 | static int dart_init(struct device_node *dart_node) | 207 | static int __init dart_init(struct device_node *dart_node) |
208 | { | 208 | { |
209 | unsigned int i; | 209 | unsigned int i; |
210 | unsigned long tmp, base, size; | 210 | unsigned long tmp, base, size; |
@@ -313,7 +313,7 @@ static void pci_dma_bus_setup_dart(struct pci_bus *bus) | |||
313 | PCI_DN(dn)->iommu_table = &iommu_table_dart; | 313 | PCI_DN(dn)->iommu_table = &iommu_table_dart; |
314 | } | 314 | } |
315 | 315 | ||
316 | void iommu_init_early_dart(void) | 316 | void __init iommu_init_early_dart(void) |
317 | { | 317 | { |
318 | struct device_node *dn; | 318 | struct device_node *dn; |
319 | 319 | ||
diff --git a/arch/powerpc/sysdev/dcr.c b/arch/powerpc/sysdev/dcr.c index 574b6ef44e0b..ab11c0b29024 100644 --- a/arch/powerpc/sysdev/dcr.c +++ b/arch/powerpc/sysdev/dcr.c | |||
@@ -33,6 +33,7 @@ unsigned int dcr_resource_start(struct device_node *np, unsigned int index) | |||
33 | 33 | ||
34 | return dr[index * 2]; | 34 | return dr[index * 2]; |
35 | } | 35 | } |
36 | EXPORT_SYMBOL_GPL(dcr_resource_start); | ||
36 | 37 | ||
37 | unsigned int dcr_resource_len(struct device_node *np, unsigned int index) | 38 | unsigned int dcr_resource_len(struct device_node *np, unsigned int index) |
38 | { | 39 | { |
@@ -44,6 +45,7 @@ unsigned int dcr_resource_len(struct device_node *np, unsigned int index) | |||
44 | 45 | ||
45 | return dr[index * 2 + 1]; | 46 | return dr[index * 2 + 1]; |
46 | } | 47 | } |
48 | EXPORT_SYMBOL_GPL(dcr_resource_len); | ||
47 | 49 | ||
48 | #ifndef CONFIG_PPC_DCR_NATIVE | 50 | #ifndef CONFIG_PPC_DCR_NATIVE |
49 | 51 | ||
@@ -102,7 +104,7 @@ u64 of_translate_dcr_address(struct device_node *dev, | |||
102 | dcr_host_t dcr_map(struct device_node *dev, unsigned int dcr_n, | 104 | dcr_host_t dcr_map(struct device_node *dev, unsigned int dcr_n, |
103 | unsigned int dcr_c) | 105 | unsigned int dcr_c) |
104 | { | 106 | { |
105 | dcr_host_t ret = { .token = NULL, .stride = 0 }; | 107 | dcr_host_t ret = { .token = NULL, .stride = 0, .base = dcr_n }; |
106 | u64 addr; | 108 | u64 addr; |
107 | 109 | ||
108 | pr_debug("dcr_map(%s, 0x%x, 0x%x)\n", | 110 | pr_debug("dcr_map(%s, 0x%x, 0x%x)\n", |
@@ -122,6 +124,7 @@ dcr_host_t dcr_map(struct device_node *dev, unsigned int dcr_n, | |||
122 | ret.token -= dcr_n * ret.stride; | 124 | ret.token -= dcr_n * ret.stride; |
123 | return ret; | 125 | return ret; |
124 | } | 126 | } |
127 | EXPORT_SYMBOL_GPL(dcr_map); | ||
125 | 128 | ||
126 | void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c) | 129 | void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c) |
127 | { | 130 | { |
@@ -133,5 +136,6 @@ void dcr_unmap(dcr_host_t host, unsigned int dcr_n, unsigned int dcr_c) | |||
133 | iounmap(h.token); | 136 | iounmap(h.token); |
134 | h.token = NULL; | 137 | h.token = NULL; |
135 | } | 138 | } |
139 | EXPORT_SYMBOL_GPL(dcr_unmap); | ||
136 | 140 | ||
137 | #endif /* !defined(CONFIG_PPC_DCR_NATIVE) */ | 141 | #endif /* !defined(CONFIG_PPC_DCR_NATIVE) */ |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 114c90f8f560..34cad96e0de9 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -255,5 +255,7 @@ DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_transpare | |||
255 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent); | 255 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent); |
256 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent); | 256 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent); |
257 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent); | 257 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent); |
258 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent) | ||
259 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent); | ||
258 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent); | 260 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent); |
259 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent); | 261 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent); |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 1cf29c9d4408..d028e8da027b 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
26 | #include <linux/phy.h> | 26 | #include <linux/phy.h> |
27 | #include <linux/spi/spi.h> | ||
27 | #include <linux/fsl_devices.h> | 28 | #include <linux/fsl_devices.h> |
28 | #include <linux/fs_enet_pd.h> | 29 | #include <linux/fs_enet_pd.h> |
29 | #include <linux/fs_uart_pd.h> | 30 | #include <linux/fs_uart_pd.h> |
@@ -52,13 +53,13 @@ phys_addr_t get_immrbase(void) | |||
52 | 53 | ||
53 | soc = of_find_node_by_type(NULL, "soc"); | 54 | soc = of_find_node_by_type(NULL, "soc"); |
54 | if (soc) { | 55 | if (soc) { |
55 | unsigned int size; | 56 | int size; |
56 | const void *prop = of_get_property(soc, "reg", &size); | 57 | const void *prop = of_get_property(soc, "reg", &size); |
57 | 58 | ||
58 | if (prop) | 59 | if (prop) |
59 | immrbase = of_translate_address(soc, prop); | 60 | immrbase = of_translate_address(soc, prop); |
60 | of_node_put(soc); | 61 | of_node_put(soc); |
61 | }; | 62 | } |
62 | 63 | ||
63 | return immrbase; | 64 | return immrbase; |
64 | } | 65 | } |
@@ -76,16 +77,23 @@ u32 get_brgfreq(void) | |||
76 | if (brgfreq != -1) | 77 | if (brgfreq != -1) |
77 | return brgfreq; | 78 | return brgfreq; |
78 | 79 | ||
79 | node = of_find_node_by_type(NULL, "cpm"); | 80 | node = of_find_compatible_node(NULL, NULL, "fsl,cpm1"); |
81 | if (!node) | ||
82 | node = of_find_compatible_node(NULL, NULL, "fsl,cpm2"); | ||
83 | if (!node) | ||
84 | node = of_find_node_by_type(NULL, "cpm"); | ||
80 | if (node) { | 85 | if (node) { |
81 | unsigned int size; | 86 | int size; |
82 | const unsigned int *prop = of_get_property(node, | 87 | const unsigned int *prop; |
83 | "brg-frequency", &size); | ||
84 | 88 | ||
85 | if (prop) | 89 | prop = of_get_property(node, "fsl,brg-frequency", &size); |
90 | if (!prop) | ||
91 | prop = of_get_property(node, "brg-frequency", &size); | ||
92 | if (prop && size == 4) | ||
86 | brgfreq = *prop; | 93 | brgfreq = *prop; |
94 | |||
87 | of_node_put(node); | 95 | of_node_put(node); |
88 | }; | 96 | } |
89 | 97 | ||
90 | return brgfreq; | 98 | return brgfreq; |
91 | } | 99 | } |
@@ -103,14 +111,14 @@ u32 get_baudrate(void) | |||
103 | 111 | ||
104 | node = of_find_node_by_type(NULL, "serial"); | 112 | node = of_find_node_by_type(NULL, "serial"); |
105 | if (node) { | 113 | if (node) { |
106 | unsigned int size; | 114 | int size; |
107 | const unsigned int *prop = of_get_property(node, | 115 | const unsigned int *prop = of_get_property(node, |
108 | "current-speed", &size); | 116 | "current-speed", &size); |
109 | 117 | ||
110 | if (prop) | 118 | if (prop) |
111 | fs_baudrate = *prop; | 119 | fs_baudrate = *prop; |
112 | of_node_put(node); | 120 | of_node_put(node); |
113 | }; | 121 | } |
114 | 122 | ||
115 | return fs_baudrate; | 123 | return fs_baudrate; |
116 | } | 124 | } |
@@ -321,21 +329,26 @@ static struct i2c_driver_device i2c_devices[] __initdata = { | |||
321 | {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, | 329 | {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, |
322 | }; | 330 | }; |
323 | 331 | ||
324 | static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info) | 332 | static int __init of_find_i2c_driver(struct device_node *node, |
333 | struct i2c_board_info *info) | ||
325 | { | 334 | { |
326 | int i; | 335 | int i; |
327 | 336 | ||
328 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { | 337 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { |
329 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) | 338 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) |
330 | continue; | 339 | continue; |
331 | strncpy(info->driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN); | 340 | if (strlcpy(info->driver_name, i2c_devices[i].i2c_driver, |
332 | strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); | 341 | KOBJ_NAME_LEN) >= KOBJ_NAME_LEN || |
342 | strlcpy(info->type, i2c_devices[i].i2c_type, | ||
343 | I2C_NAME_SIZE) >= I2C_NAME_SIZE) | ||
344 | return -ENOMEM; | ||
333 | return 0; | 345 | return 0; |
334 | } | 346 | } |
335 | return -ENODEV; | 347 | return -ENODEV; |
336 | } | 348 | } |
337 | 349 | ||
338 | static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num) | 350 | static void __init of_register_i2c_devices(struct device_node *adap_node, |
351 | int bus_num) | ||
339 | { | 352 | { |
340 | struct device_node *node = NULL; | 353 | struct device_node *node = NULL; |
341 | 354 | ||
@@ -1187,3 +1200,89 @@ err: | |||
1187 | arch_initcall(cpm_smc_uart_of_init); | 1200 | arch_initcall(cpm_smc_uart_of_init); |
1188 | 1201 | ||
1189 | #endif /* CONFIG_8xx */ | 1202 | #endif /* CONFIG_8xx */ |
1203 | |||
1204 | int __init fsl_spi_init(struct spi_board_info *board_infos, | ||
1205 | unsigned int num_board_infos, | ||
1206 | void (*activate_cs)(u8 cs, u8 polarity), | ||
1207 | void (*deactivate_cs)(u8 cs, u8 polarity)) | ||
1208 | { | ||
1209 | struct device_node *np; | ||
1210 | unsigned int i; | ||
1211 | const u32 *sysclk; | ||
1212 | |||
1213 | np = of_find_node_by_type(NULL, "qe"); | ||
1214 | if (!np) | ||
1215 | return -ENODEV; | ||
1216 | |||
1217 | sysclk = of_get_property(np, "bus-frequency", NULL); | ||
1218 | if (!sysclk) | ||
1219 | return -ENODEV; | ||
1220 | |||
1221 | for (np = NULL, i = 1; | ||
1222 | (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL; | ||
1223 | i++) { | ||
1224 | int ret = 0; | ||
1225 | unsigned int j; | ||
1226 | const void *prop; | ||
1227 | struct resource res[2]; | ||
1228 | struct platform_device *pdev; | ||
1229 | struct fsl_spi_platform_data pdata = { | ||
1230 | .activate_cs = activate_cs, | ||
1231 | .deactivate_cs = deactivate_cs, | ||
1232 | }; | ||
1233 | |||
1234 | memset(res, 0, sizeof(res)); | ||
1235 | |||
1236 | pdata.sysclk = *sysclk; | ||
1237 | |||
1238 | prop = of_get_property(np, "reg", NULL); | ||
1239 | if (!prop) | ||
1240 | goto err; | ||
1241 | pdata.bus_num = *(u32 *)prop; | ||
1242 | |||
1243 | prop = of_get_property(np, "mode", NULL); | ||
1244 | if (prop && !strcmp(prop, "cpu-qe")) | ||
1245 | pdata.qe_mode = 1; | ||
1246 | |||
1247 | for (j = 0; j < num_board_infos; j++) { | ||
1248 | if (board_infos[j].bus_num == pdata.bus_num) | ||
1249 | pdata.max_chipselect++; | ||
1250 | } | ||
1251 | |||
1252 | if (!pdata.max_chipselect) | ||
1253 | goto err; | ||
1254 | |||
1255 | ret = of_address_to_resource(np, 0, &res[0]); | ||
1256 | if (ret) | ||
1257 | goto err; | ||
1258 | |||
1259 | ret = of_irq_to_resource(np, 0, &res[1]); | ||
1260 | if (ret == NO_IRQ) | ||
1261 | goto err; | ||
1262 | |||
1263 | pdev = platform_device_alloc("mpc83xx_spi", i); | ||
1264 | if (!pdev) | ||
1265 | goto err; | ||
1266 | |||
1267 | ret = platform_device_add_data(pdev, &pdata, sizeof(pdata)); | ||
1268 | if (ret) | ||
1269 | goto unreg; | ||
1270 | |||
1271 | ret = platform_device_add_resources(pdev, res, | ||
1272 | ARRAY_SIZE(res)); | ||
1273 | if (ret) | ||
1274 | goto unreg; | ||
1275 | |||
1276 | ret = platform_device_register(pdev); | ||
1277 | if (ret) | ||
1278 | goto unreg; | ||
1279 | |||
1280 | continue; | ||
1281 | unreg: | ||
1282 | platform_device_del(pdev); | ||
1283 | err: | ||
1284 | continue; | ||
1285 | } | ||
1286 | |||
1287 | return spi_register_board_info(board_infos, num_board_infos); | ||
1288 | } | ||
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h index 04e145b5fc32..618d91d1e103 100644 --- a/arch/powerpc/sysdev/fsl_soc.h +++ b/arch/powerpc/sysdev/fsl_soc.h | |||
@@ -8,5 +8,12 @@ extern phys_addr_t get_immrbase(void); | |||
8 | extern u32 get_brgfreq(void); | 8 | extern u32 get_brgfreq(void); |
9 | extern u32 get_baudrate(void); | 9 | extern u32 get_baudrate(void); |
10 | 10 | ||
11 | struct spi_board_info; | ||
12 | |||
13 | extern int fsl_spi_init(struct spi_board_info *board_infos, | ||
14 | unsigned int num_board_infos, | ||
15 | void (*activate_cs)(u8 cs, u8 polarity), | ||
16 | void (*deactivate_cs)(u8 cs, u8 polarity)); | ||
17 | |||
11 | #endif | 18 | #endif |
12 | #endif | 19 | #endif |
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index ad87adc975bc..7c1b27ac7d3c 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -25,7 +25,6 @@ static unsigned char cached_8259[2] = { 0xff, 0xff }; | |||
25 | 25 | ||
26 | static DEFINE_SPINLOCK(i8259_lock); | 26 | static DEFINE_SPINLOCK(i8259_lock); |
27 | 27 | ||
28 | static struct device_node *i8259_node; | ||
29 | static struct irq_host *i8259_host; | 28 | static struct irq_host *i8259_host; |
30 | 29 | ||
31 | /* | 30 | /* |
@@ -165,7 +164,7 @@ static struct resource pic_edgectrl_iores = { | |||
165 | 164 | ||
166 | static int i8259_host_match(struct irq_host *h, struct device_node *node) | 165 | static int i8259_host_match(struct irq_host *h, struct device_node *node) |
167 | { | 166 | { |
168 | return i8259_node == NULL || i8259_node == node; | 167 | return h->of_node == NULL || h->of_node == node; |
169 | } | 168 | } |
170 | 169 | ||
171 | static int i8259_host_map(struct irq_host *h, unsigned int virq, | 170 | static int i8259_host_map(struct irq_host *h, unsigned int virq, |
@@ -276,9 +275,8 @@ void i8259_init(struct device_node *node, unsigned long intack_addr) | |||
276 | spin_unlock_irqrestore(&i8259_lock, flags); | 275 | spin_unlock_irqrestore(&i8259_lock, flags); |
277 | 276 | ||
278 | /* create a legacy host */ | 277 | /* create a legacy host */ |
279 | if (node) | 278 | i8259_host = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LEGACY, |
280 | i8259_node = of_node_get(node); | 279 | 0, &i8259_host_ops, 0); |
281 | i8259_host = irq_alloc_host(IRQ_HOST_MAP_LEGACY, 0, &i8259_host_ops, 0); | ||
282 | if (i8259_host == NULL) { | 280 | if (i8259_host == NULL) { |
283 | printk(KERN_ERR "i8259: failed to allocate irq host !\n"); | 281 | printk(KERN_ERR "i8259: failed to allocate irq host !\n"); |
284 | return; | 282 | return; |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index 5294560c7b00..b5d068204aa3 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -144,8 +144,8 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
144 | 144 | ||
145 | static struct pci_ops indirect_pci_ops = | 145 | static struct pci_ops indirect_pci_ops = |
146 | { | 146 | { |
147 | indirect_read_config, | 147 | .read = indirect_read_config, |
148 | indirect_write_config | 148 | .write = indirect_write_config, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | void __init | 151 | void __init |
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 473c415e9e25..05a56e55804c 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -511,10 +511,8 @@ static struct irq_chip ipic_irq_chip = { | |||
511 | 511 | ||
512 | static int ipic_host_match(struct irq_host *h, struct device_node *node) | 512 | static int ipic_host_match(struct irq_host *h, struct device_node *node) |
513 | { | 513 | { |
514 | struct ipic *ipic = h->host_data; | ||
515 | |||
516 | /* Exact match, unless ipic node is NULL */ | 514 | /* Exact match, unless ipic node is NULL */ |
517 | return ipic->of_node == NULL || ipic->of_node == node; | 515 | return h->of_node == NULL || h->of_node == node; |
518 | } | 516 | } |
519 | 517 | ||
520 | static int ipic_host_map(struct irq_host *h, unsigned int virq, | 518 | static int ipic_host_map(struct irq_host *h, unsigned int virq, |
@@ -568,9 +566,8 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) | |||
568 | return NULL; | 566 | return NULL; |
569 | 567 | ||
570 | memset(ipic, 0, sizeof(struct ipic)); | 568 | memset(ipic, 0, sizeof(struct ipic)); |
571 | ipic->of_node = of_node_get(node); | ||
572 | 569 | ||
573 | ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, | 570 | ipic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
574 | NR_IPIC_INTS, | 571 | NR_IPIC_INTS, |
575 | &ipic_host_ops, 0); | 572 | &ipic_host_ops, 0); |
576 | if (ipic->irqhost == NULL) { | 573 | if (ipic->irqhost == NULL) { |
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h index c28e589877eb..bb309a501b2d 100644 --- a/arch/powerpc/sysdev/ipic.h +++ b/arch/powerpc/sysdev/ipic.h | |||
@@ -48,9 +48,6 @@ struct ipic { | |||
48 | 48 | ||
49 | /* The "linux" controller struct */ | 49 | /* The "linux" controller struct */ |
50 | struct irq_chip hc_irq; | 50 | struct irq_chip hc_irq; |
51 | |||
52 | /* The device node of the interrupt controller */ | ||
53 | struct device_node *of_node; | ||
54 | }; | 51 | }; |
55 | 52 | ||
56 | struct ipic_info { | 53 | struct ipic_info { |
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index 2fc2bcd79b5e..565156ae65bc 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | extern int cpm_get_irq(struct pt_regs *regs); | 20 | extern int cpm_get_irq(struct pt_regs *regs); |
21 | 21 | ||
22 | static struct device_node *mpc8xx_pic_node; | ||
23 | static struct irq_host *mpc8xx_pic_host; | 22 | static struct irq_host *mpc8xx_pic_host; |
24 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 23 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) |
25 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | 24 | static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; |
@@ -120,11 +119,6 @@ unsigned int mpc8xx_get_irq(void) | |||
120 | 119 | ||
121 | } | 120 | } |
122 | 121 | ||
123 | static int mpc8xx_pic_host_match(struct irq_host *h, struct device_node *node) | ||
124 | { | ||
125 | return mpc8xx_pic_node == node; | ||
126 | } | ||
127 | |||
128 | static int mpc8xx_pic_host_map(struct irq_host *h, unsigned int virq, | 122 | static int mpc8xx_pic_host_map(struct irq_host *h, unsigned int virq, |
129 | irq_hw_number_t hw) | 123 | irq_hw_number_t hw) |
130 | { | 124 | { |
@@ -158,7 +152,6 @@ static int mpc8xx_pic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
158 | 152 | ||
159 | 153 | ||
160 | static struct irq_host_ops mpc8xx_pic_host_ops = { | 154 | static struct irq_host_ops mpc8xx_pic_host_ops = { |
161 | .match = mpc8xx_pic_host_match, | ||
162 | .map = mpc8xx_pic_host_map, | 155 | .map = mpc8xx_pic_host_map, |
163 | .xlate = mpc8xx_pic_host_xlate, | 156 | .xlate = mpc8xx_pic_host_xlate, |
164 | }; | 157 | }; |
@@ -176,22 +169,24 @@ int mpc8xx_pic_init(void) | |||
176 | return -ENOMEM; | 169 | return -ENOMEM; |
177 | } | 170 | } |
178 | 171 | ||
179 | mpc8xx_pic_node = of_node_get(np); | ||
180 | |||
181 | ret = of_address_to_resource(np, 0, &res); | 172 | ret = of_address_to_resource(np, 0, &res); |
182 | of_node_put(np); | ||
183 | if (ret) | 173 | if (ret) |
184 | return ret; | 174 | goto out; |
185 | 175 | ||
186 | siu_reg = (void *)ioremap(res.start, res.end - res.start + 1); | 176 | siu_reg = (void *)ioremap(res.start, res.end - res.start + 1); |
187 | if (siu_reg == NULL) | 177 | if (siu_reg == NULL) { |
188 | return -EINVAL; | 178 | ret = -EINVAL; |
179 | goto out; | ||
180 | } | ||
189 | 181 | ||
190 | mpc8xx_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &mpc8xx_pic_host_ops, 64); | 182 | mpc8xx_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR, |
183 | 64, &mpc8xx_pic_host_ops, 64); | ||
191 | if (mpc8xx_pic_host == NULL) { | 184 | if (mpc8xx_pic_host == NULL) { |
192 | printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n"); | 185 | printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n"); |
193 | ret = -ENOMEM; | 186 | ret = -ENOMEM; |
194 | } | 187 | } |
195 | 188 | ||
189 | out: | ||
190 | of_node_put(np); | ||
196 | return ret; | 191 | return ret; |
197 | } | 192 | } |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 74c64c0d3b71..893e65439e85 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -156,8 +156,7 @@ static inline u32 _mpic_read(enum mpic_reg_type type, | |||
156 | switch(type) { | 156 | switch(type) { |
157 | #ifdef CONFIG_PPC_DCR | 157 | #ifdef CONFIG_PPC_DCR |
158 | case mpic_access_dcr: | 158 | case mpic_access_dcr: |
159 | return dcr_read(rb->dhost, | 159 | return dcr_read(rb->dhost, rb->dhost.base + reg); |
160 | rb->dbase + reg + rb->doff); | ||
161 | #endif | 160 | #endif |
162 | case mpic_access_mmio_be: | 161 | case mpic_access_mmio_be: |
163 | return in_be32(rb->base + (reg >> 2)); | 162 | return in_be32(rb->base + (reg >> 2)); |
@@ -174,8 +173,7 @@ static inline void _mpic_write(enum mpic_reg_type type, | |||
174 | switch(type) { | 173 | switch(type) { |
175 | #ifdef CONFIG_PPC_DCR | 174 | #ifdef CONFIG_PPC_DCR |
176 | case mpic_access_dcr: | 175 | case mpic_access_dcr: |
177 | return dcr_write(rb->dhost, | 176 | return dcr_write(rb->dhost, rb->dhost.base + reg, value); |
178 | rb->dbase + reg + rb->doff, value); | ||
179 | #endif | 177 | #endif |
180 | case mpic_access_mmio_be: | 178 | case mpic_access_mmio_be: |
181 | return out_be32(rb->base + (reg >> 2), value); | 179 | return out_be32(rb->base + (reg >> 2), value); |
@@ -228,8 +226,13 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigne | |||
228 | unsigned int isu = src_no >> mpic->isu_shift; | 226 | unsigned int isu = src_no >> mpic->isu_shift; |
229 | unsigned int idx = src_no & mpic->isu_mask; | 227 | unsigned int idx = src_no & mpic->isu_mask; |
230 | 228 | ||
231 | return _mpic_read(mpic->reg_type, &mpic->isus[isu], | 229 | #ifdef CONFIG_MPIC_BROKEN_REGREAD |
232 | reg + (idx * MPIC_INFO(IRQ_STRIDE))); | 230 | if (reg == 0) |
231 | return mpic->isu_reg0_shadow[idx]; | ||
232 | else | ||
233 | #endif | ||
234 | return _mpic_read(mpic->reg_type, &mpic->isus[isu], | ||
235 | reg + (idx * MPIC_INFO(IRQ_STRIDE))); | ||
233 | } | 236 | } |
234 | 237 | ||
235 | static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, | 238 | static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, |
@@ -240,6 +243,11 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, | |||
240 | 243 | ||
241 | _mpic_write(mpic->reg_type, &mpic->isus[isu], | 244 | _mpic_write(mpic->reg_type, &mpic->isus[isu], |
242 | reg + (idx * MPIC_INFO(IRQ_STRIDE)), value); | 245 | reg + (idx * MPIC_INFO(IRQ_STRIDE)), value); |
246 | |||
247 | #ifdef CONFIG_MPIC_BROKEN_REGREAD | ||
248 | if (reg == 0) | ||
249 | mpic->isu_reg0_shadow[idx] = value; | ||
250 | #endif | ||
243 | } | 251 | } |
244 | 252 | ||
245 | #define mpic_read(b,r) _mpic_read(mpic->reg_type,&(b),(r)) | 253 | #define mpic_read(b,r) _mpic_read(mpic->reg_type,&(b),(r)) |
@@ -269,9 +277,11 @@ static void _mpic_map_mmio(struct mpic *mpic, unsigned long phys_addr, | |||
269 | static void _mpic_map_dcr(struct mpic *mpic, struct mpic_reg_bank *rb, | 277 | static void _mpic_map_dcr(struct mpic *mpic, struct mpic_reg_bank *rb, |
270 | unsigned int offset, unsigned int size) | 278 | unsigned int offset, unsigned int size) |
271 | { | 279 | { |
272 | rb->dbase = mpic->dcr_base; | 280 | const u32 *dbasep; |
273 | rb->doff = offset; | 281 | |
274 | rb->dhost = dcr_map(mpic->of_node, rb->dbase + rb->doff, size); | 282 | dbasep = of_get_property(mpic->irqhost->of_node, "dcr-reg", NULL); |
283 | |||
284 | rb->dhost = dcr_map(mpic->irqhost->of_node, *dbasep + offset, size); | ||
275 | BUG_ON(!DCR_MAP_OK(rb->dhost)); | 285 | BUG_ON(!DCR_MAP_OK(rb->dhost)); |
276 | } | 286 | } |
277 | 287 | ||
@@ -758,7 +768,7 @@ static void mpic_end_ipi(unsigned int irq) | |||
758 | 768 | ||
759 | #endif /* CONFIG_SMP */ | 769 | #endif /* CONFIG_SMP */ |
760 | 770 | ||
761 | static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask) | 771 | void mpic_set_affinity(unsigned int irq, cpumask_t cpumask) |
762 | { | 772 | { |
763 | struct mpic *mpic = mpic_from_irq(irq); | 773 | struct mpic *mpic = mpic_from_irq(irq); |
764 | unsigned int src = mpic_irq_to_hw(irq); | 774 | unsigned int src = mpic_irq_to_hw(irq); |
@@ -861,10 +871,8 @@ static struct irq_chip mpic_irq_ht_chip = { | |||
861 | 871 | ||
862 | static int mpic_host_match(struct irq_host *h, struct device_node *node) | 872 | static int mpic_host_match(struct irq_host *h, struct device_node *node) |
863 | { | 873 | { |
864 | struct mpic *mpic = h->host_data; | ||
865 | |||
866 | /* Exact match, unless mpic node is NULL */ | 874 | /* Exact match, unless mpic node is NULL */ |
867 | return mpic->of_node == NULL || mpic->of_node == node; | 875 | return h->of_node == NULL || h->of_node == node; |
868 | } | 876 | } |
869 | 877 | ||
870 | static int mpic_host_map(struct irq_host *h, unsigned int virq, | 878 | static int mpic_host_map(struct irq_host *h, unsigned int virq, |
@@ -985,10 +993,9 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
985 | 993 | ||
986 | memset(mpic, 0, sizeof(struct mpic)); | 994 | memset(mpic, 0, sizeof(struct mpic)); |
987 | mpic->name = name; | 995 | mpic->name = name; |
988 | mpic->of_node = of_node_get(node); | ||
989 | 996 | ||
990 | mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, isu_size, | 997 | mpic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
991 | &mpic_host_ops, | 998 | isu_size, &mpic_host_ops, |
992 | flags & MPIC_LARGE_VECTORS ? 2048 : 256); | 999 | flags & MPIC_LARGE_VECTORS ? 2048 : 256); |
993 | if (mpic->irqhost == NULL) { | 1000 | if (mpic->irqhost == NULL) { |
994 | of_node_put(node); | 1001 | of_node_put(node); |
@@ -1068,20 +1075,14 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1068 | BUG_ON(paddr == 0 && node == NULL); | 1075 | BUG_ON(paddr == 0 && node == NULL); |
1069 | 1076 | ||
1070 | /* If no physical address passed in, check if it's dcr based */ | 1077 | /* If no physical address passed in, check if it's dcr based */ |
1071 | if (paddr == 0 && of_get_property(node, "dcr-reg", NULL) != NULL) | 1078 | if (paddr == 0 && of_get_property(node, "dcr-reg", NULL) != NULL) { |
1072 | mpic->flags |= MPIC_USES_DCR; | ||
1073 | |||
1074 | #ifdef CONFIG_PPC_DCR | 1079 | #ifdef CONFIG_PPC_DCR |
1075 | if (mpic->flags & MPIC_USES_DCR) { | 1080 | mpic->flags |= MPIC_USES_DCR; |
1076 | const u32 *dbasep; | ||
1077 | dbasep = of_get_property(node, "dcr-reg", NULL); | ||
1078 | BUG_ON(dbasep == NULL); | ||
1079 | mpic->dcr_base = *dbasep; | ||
1080 | mpic->reg_type = mpic_access_dcr; | 1081 | mpic->reg_type = mpic_access_dcr; |
1081 | } | ||
1082 | #else | 1082 | #else |
1083 | BUG_ON (mpic->flags & MPIC_USES_DCR); | 1083 | BUG(); |
1084 | #endif /* CONFIG_PPC_DCR */ | 1084 | #endif /* CONFIG_PPC_DCR */ |
1085 | } | ||
1085 | 1086 | ||
1086 | /* If the MPIC is not DCR based, and no physical address was passed | 1087 | /* If the MPIC is not DCR based, and no physical address was passed |
1087 | * in, try to obtain one | 1088 | * in, try to obtain one |
diff --git a/arch/powerpc/sysdev/mpic.h b/arch/powerpc/sysdev/mpic.h index 3a1c3d2c594d..1cb6bd841027 100644 --- a/arch/powerpc/sysdev/mpic.h +++ b/arch/powerpc/sysdev/mpic.h | |||
@@ -34,5 +34,6 @@ extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type); | |||
34 | extern void mpic_end_irq(unsigned int irq); | 34 | extern void mpic_end_irq(unsigned int irq); |
35 | extern void mpic_mask_irq(unsigned int irq); | 35 | extern void mpic_mask_irq(unsigned int irq); |
36 | extern void mpic_unmask_irq(unsigned int irq); | 36 | extern void mpic_unmask_irq(unsigned int irq); |
37 | extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask); | ||
37 | 38 | ||
38 | #endif /* _POWERPC_SYSDEV_MPIC_H */ | 39 | #endif /* _POWERPC_SYSDEV_MPIC_H */ |
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c index b076793033c2..d272a52ecd24 100644 --- a/arch/powerpc/sysdev/mpic_msi.c +++ b/arch/powerpc/sysdev/mpic_msi.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/bootmem.h> | ||
13 | #include <linux/bitmap.h> | 12 | #include <linux/bitmap.h> |
14 | #include <linux/msi.h> | 13 | #include <linux/msi.h> |
15 | #include <asm/mpic.h> | 14 | #include <asm/mpic.h> |
@@ -117,16 +116,17 @@ static int mpic_msi_reserve_dt_hwirqs(struct mpic *mpic) | |||
117 | int i, len; | 116 | int i, len; |
118 | const u32 *p; | 117 | const u32 *p; |
119 | 118 | ||
120 | p = of_get_property(mpic->of_node, "msi-available-ranges", &len); | 119 | p = of_get_property(mpic->irqhost->of_node, |
120 | "msi-available-ranges", &len); | ||
121 | if (!p) { | 121 | if (!p) { |
122 | pr_debug("mpic: no msi-available-ranges property found on %s\n", | 122 | pr_debug("mpic: no msi-available-ranges property found on %s\n", |
123 | mpic->of_node->full_name); | 123 | mpic->irqhost->of_node->full_name); |
124 | return -ENODEV; | 124 | return -ENODEV; |
125 | } | 125 | } |
126 | 126 | ||
127 | if (len % 8 != 0) { | 127 | if (len % 8 != 0) { |
128 | printk(KERN_WARNING "mpic: Malformed msi-available-ranges " | 128 | printk(KERN_WARNING "mpic: Malformed msi-available-ranges " |
129 | "property on %s\n", mpic->of_node->full_name); | 129 | "property on %s\n", mpic->irqhost->of_node->full_name); |
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | } | 131 | } |
132 | 132 | ||
@@ -151,10 +151,7 @@ int mpic_msi_init_allocator(struct mpic *mpic) | |||
151 | size = BITS_TO_LONGS(mpic->irq_count) * sizeof(long); | 151 | size = BITS_TO_LONGS(mpic->irq_count) * sizeof(long); |
152 | pr_debug("mpic: allocator bitmap size is 0x%x bytes\n", size); | 152 | pr_debug("mpic: allocator bitmap size is 0x%x bytes\n", size); |
153 | 153 | ||
154 | if (mem_init_done) | 154 | mpic->hwirq_bitmap = alloc_maybe_bootmem(size, GFP_KERNEL); |
155 | mpic->hwirq_bitmap = kmalloc(size, GFP_KERNEL); | ||
156 | else | ||
157 | mpic->hwirq_bitmap = alloc_bootmem(size); | ||
158 | 155 | ||
159 | if (!mpic->hwirq_bitmap) { | 156 | if (!mpic->hwirq_bitmap) { |
160 | pr_debug("mpic: ENOMEM allocating allocator bitmap!\n"); | 157 | pr_debug("mpic: ENOMEM allocating allocator bitmap!\n"); |
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c index 305b864c25d9..1d5a40899b74 100644 --- a/arch/powerpc/sysdev/mpic_u3msi.c +++ b/arch/powerpc/sysdev/mpic_u3msi.c | |||
@@ -40,6 +40,7 @@ static struct irq_chip mpic_u3msi_chip = { | |||
40 | .unmask = mpic_u3msi_unmask_irq, | 40 | .unmask = mpic_u3msi_unmask_irq, |
41 | .eoi = mpic_end_irq, | 41 | .eoi = mpic_end_irq, |
42 | .set_type = mpic_set_irq_type, | 42 | .set_type = mpic_set_irq_type, |
43 | .set_affinity = mpic_set_affinity, | ||
43 | .typename = "MPIC-U3MSI", | 44 | .typename = "MPIC-U3MSI", |
44 | }; | 45 | }; |
45 | 46 | ||
@@ -107,59 +108,46 @@ static void u3msi_teardown_msi_irqs(struct pci_dev *pdev) | |||
107 | return; | 108 | return; |
108 | } | 109 | } |
109 | 110 | ||
110 | static void u3msi_compose_msi_msg(struct pci_dev *pdev, int virq, | ||
111 | struct msi_msg *msg) | ||
112 | { | ||
113 | u64 addr; | ||
114 | |||
115 | addr = find_ht_magic_addr(pdev); | ||
116 | msg->address_lo = addr & 0xFFFFFFFF; | ||
117 | msg->address_hi = addr >> 32; | ||
118 | msg->data = virq_to_hw(virq); | ||
119 | |||
120 | pr_debug("u3msi: allocated virq 0x%x (hw 0x%lx) at address 0x%lx\n", | ||
121 | virq, virq_to_hw(virq), addr); | ||
122 | } | ||
123 | |||
124 | static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | 111 | static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) |
125 | { | 112 | { |
126 | irq_hw_number_t hwirq; | 113 | irq_hw_number_t hwirq; |
127 | int rc; | ||
128 | unsigned int virq; | 114 | unsigned int virq; |
129 | struct msi_desc *entry; | 115 | struct msi_desc *entry; |
130 | struct msi_msg msg; | 116 | struct msi_msg msg; |
117 | u64 addr; | ||
118 | |||
119 | addr = find_ht_magic_addr(pdev); | ||
120 | msg.address_lo = addr & 0xFFFFFFFF; | ||
121 | msg.address_hi = addr >> 32; | ||
131 | 122 | ||
132 | list_for_each_entry(entry, &pdev->msi_list, list) { | 123 | list_for_each_entry(entry, &pdev->msi_list, list) { |
133 | hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1); | 124 | hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1); |
134 | if (hwirq < 0) { | 125 | if (hwirq < 0) { |
135 | rc = hwirq; | ||
136 | pr_debug("u3msi: failed allocating hwirq\n"); | 126 | pr_debug("u3msi: failed allocating hwirq\n"); |
137 | goto out_free; | 127 | return hwirq; |
138 | } | 128 | } |
139 | 129 | ||
140 | virq = irq_create_mapping(msi_mpic->irqhost, hwirq); | 130 | virq = irq_create_mapping(msi_mpic->irqhost, hwirq); |
141 | if (virq == NO_IRQ) { | 131 | if (virq == NO_IRQ) { |
142 | pr_debug("u3msi: failed mapping hwirq 0x%lx\n", hwirq); | 132 | pr_debug("u3msi: failed mapping hwirq 0x%lx\n", hwirq); |
143 | mpic_msi_free_hwirqs(msi_mpic, hwirq, 1); | 133 | mpic_msi_free_hwirqs(msi_mpic, hwirq, 1); |
144 | rc = -ENOSPC; | 134 | return -ENOSPC; |
145 | goto out_free; | ||
146 | } | 135 | } |
147 | 136 | ||
148 | set_irq_msi(virq, entry); | 137 | set_irq_msi(virq, entry); |
149 | set_irq_chip(virq, &mpic_u3msi_chip); | 138 | set_irq_chip(virq, &mpic_u3msi_chip); |
150 | set_irq_type(virq, IRQ_TYPE_EDGE_RISING); | 139 | set_irq_type(virq, IRQ_TYPE_EDGE_RISING); |
151 | 140 | ||
152 | u3msi_compose_msi_msg(pdev, virq, &msg); | 141 | pr_debug("u3msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n", |
142 | virq, hwirq, addr); | ||
143 | |||
144 | msg.data = hwirq; | ||
153 | write_msi_msg(virq, &msg); | 145 | write_msi_msg(virq, &msg); |
154 | 146 | ||
155 | hwirq++; | 147 | hwirq++; |
156 | } | 148 | } |
157 | 149 | ||
158 | return 0; | 150 | return 0; |
159 | |||
160 | out_free: | ||
161 | u3msi_teardown_msi_irqs(pdev); | ||
162 | return rc; | ||
163 | } | 151 | } |
164 | 152 | ||
165 | int mpic_u3msi_init(struct mpic *mpic) | 153 | int mpic_u3msi_init(struct mpic *mpic) |
diff --git a/arch/powerpc/sysdev/mv64x60.h b/arch/powerpc/sysdev/mv64x60.h index 2ff0b4ef2681..4f618fa465c0 100644 --- a/arch/powerpc/sysdev/mv64x60.h +++ b/arch/powerpc/sysdev/mv64x60.h | |||
@@ -7,5 +7,6 @@ extern void __init mv64x60_init_irq(void); | |||
7 | extern unsigned int mv64x60_get_irq(void); | 7 | extern unsigned int mv64x60_get_irq(void); |
8 | 8 | ||
9 | extern void __init mv64x60_pci_init(void); | 9 | extern void __init mv64x60_pci_init(void); |
10 | extern void __init mv64x60_init_early(void); | ||
10 | 11 | ||
11 | #endif /* __MV64X60_H__ */ | 12 | #endif /* __MV64X60_H__ */ |
diff --git a/arch/powerpc/sysdev/mv64x60_pic.c b/arch/powerpc/sysdev/mv64x60_pic.c index 01d316287772..19e6ef263797 100644 --- a/arch/powerpc/sysdev/mv64x60_pic.c +++ b/arch/powerpc/sysdev/mv64x60_pic.c | |||
@@ -202,11 +202,6 @@ static struct irq_chip mv64x60_chip_gpp = { | |||
202 | * mv64x60_host_ops functions | 202 | * mv64x60_host_ops functions |
203 | */ | 203 | */ |
204 | 204 | ||
205 | static int mv64x60_host_match(struct irq_host *h, struct device_node *np) | ||
206 | { | ||
207 | return mv64x60_irq_host->host_data == np; | ||
208 | } | ||
209 | |||
210 | static struct irq_chip *mv64x60_chips[] = { | 205 | static struct irq_chip *mv64x60_chips[] = { |
211 | [MV64x60_LEVEL1_LOW] = &mv64x60_chip_low, | 206 | [MV64x60_LEVEL1_LOW] = &mv64x60_chip_low, |
212 | [MV64x60_LEVEL1_HIGH] = &mv64x60_chip_high, | 207 | [MV64x60_LEVEL1_HIGH] = &mv64x60_chip_high, |
@@ -228,7 +223,6 @@ static int mv64x60_host_map(struct irq_host *h, unsigned int virq, | |||
228 | } | 223 | } |
229 | 224 | ||
230 | static struct irq_host_ops mv64x60_host_ops = { | 225 | static struct irq_host_ops mv64x60_host_ops = { |
231 | .match = mv64x60_host_match, | ||
232 | .map = mv64x60_host_map, | 226 | .map = mv64x60_host_map, |
233 | }; | 227 | }; |
234 | 228 | ||
@@ -253,14 +247,12 @@ void __init mv64x60_init_irq(void) | |||
253 | np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-pic"); | 247 | np = of_find_compatible_node(NULL, NULL, "marvell,mv64x60-pic"); |
254 | reg = of_get_property(np, "reg", &size); | 248 | reg = of_get_property(np, "reg", &size); |
255 | paddr = of_translate_address(np, reg); | 249 | paddr = of_translate_address(np, reg); |
256 | of_node_put(np); | ||
257 | mv64x60_irq_reg_base = ioremap(paddr, reg[1]); | 250 | mv64x60_irq_reg_base = ioremap(paddr, reg[1]); |
258 | 251 | ||
259 | mv64x60_irq_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, MV64x60_NUM_IRQS, | 252 | mv64x60_irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, |
253 | MV64x60_NUM_IRQS, | ||
260 | &mv64x60_host_ops, MV64x60_NUM_IRQS); | 254 | &mv64x60_host_ops, MV64x60_NUM_IRQS); |
261 | 255 | ||
262 | mv64x60_irq_host->host_data = np; | ||
263 | |||
264 | spin_lock_irqsave(&mv64x60_lock, flags); | 256 | spin_lock_irqsave(&mv64x60_lock, flags); |
265 | out_le32(mv64x60_gpp_reg_base + MV64x60_GPP_INTR_MASK, | 257 | out_le32(mv64x60_gpp_reg_base + MV64x60_GPP_INTR_MASK, |
266 | mv64x60_cached_gpp_mask); | 258 | mv64x60_cached_gpp_mask); |
diff --git a/arch/powerpc/sysdev/mv64x60_udbg.c b/arch/powerpc/sysdev/mv64x60_udbg.c new file mode 100644 index 000000000000..367e7b13ec00 --- /dev/null +++ b/arch/powerpc/sysdev/mv64x60_udbg.c | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * udbg serial input/output routines for the Marvell MV64x60 (Discovery). | ||
3 | * | ||
4 | * Author: Dale Farnsworth <dale@farnsworth.org> | ||
5 | * | ||
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #include <asm/io.h> | ||
13 | #include <asm/prom.h> | ||
14 | #include <asm/udbg.h> | ||
15 | |||
16 | #include <sysdev/mv64x60.h> | ||
17 | |||
18 | #define MPSC_0_CR1_OFFSET 0x000c | ||
19 | |||
20 | #define MPSC_0_CR2_OFFSET 0x0010 | ||
21 | #define MPSC_CHR_2_TCS (1 << 9) | ||
22 | |||
23 | #define MPSC_0_CHR_10_OFFSET 0x0030 | ||
24 | |||
25 | #define MPSC_INTR_CAUSE_OFF_0 0x0004 | ||
26 | #define MPSC_INTR_CAUSE_OFF_1 0x000c | ||
27 | #define MPSC_INTR_CAUSE_RCC (1<<6) | ||
28 | |||
29 | static void __iomem *mpsc_base; | ||
30 | static void __iomem *mpsc_intr_cause; | ||
31 | |||
32 | static void mv64x60_udbg_putc(char c) | ||
33 | { | ||
34 | if (c == '\n') | ||
35 | mv64x60_udbg_putc('\r'); | ||
36 | |||
37 | while(in_le32(mpsc_base + MPSC_0_CR2_OFFSET) & MPSC_CHR_2_TCS) | ||
38 | ; | ||
39 | out_le32(mpsc_base + MPSC_0_CR1_OFFSET, c); | ||
40 | out_le32(mpsc_base + MPSC_0_CR2_OFFSET, MPSC_CHR_2_TCS); | ||
41 | } | ||
42 | |||
43 | static int mv64x60_udbg_testc(void) | ||
44 | { | ||
45 | return (in_le32(mpsc_intr_cause) & MPSC_INTR_CAUSE_RCC) != 0; | ||
46 | } | ||
47 | |||
48 | static int mv64x60_udbg_getc(void) | ||
49 | { | ||
50 | int cause = 0; | ||
51 | int c; | ||
52 | |||
53 | while (!mv64x60_udbg_testc()) | ||
54 | ; | ||
55 | |||
56 | c = in_8(mpsc_base + MPSC_0_CHR_10_OFFSET + 2); | ||
57 | out_8(mpsc_base + MPSC_0_CHR_10_OFFSET + 2, c); | ||
58 | out_le32(mpsc_intr_cause, cause & ~MPSC_INTR_CAUSE_RCC); | ||
59 | return c; | ||
60 | } | ||
61 | |||
62 | static int mv64x60_udbg_getc_poll(void) | ||
63 | { | ||
64 | if (!mv64x60_udbg_testc()) | ||
65 | return -1; | ||
66 | |||
67 | return mv64x60_udbg_getc(); | ||
68 | } | ||
69 | |||
70 | static void mv64x60_udbg_init(void) | ||
71 | { | ||
72 | struct device_node *np, *mpscintr, *stdout = NULL; | ||
73 | const char *path; | ||
74 | const phandle *ph; | ||
75 | struct resource r[2]; | ||
76 | const int *block_index; | ||
77 | int intr_cause_offset; | ||
78 | int err; | ||
79 | |||
80 | path = of_get_property(of_chosen, "linux,stdout-path", NULL); | ||
81 | if (!path) | ||
82 | return; | ||
83 | |||
84 | stdout = of_find_node_by_path(path); | ||
85 | if (!stdout) | ||
86 | return; | ||
87 | |||
88 | for (np = NULL; | ||
89 | (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); ) | ||
90 | if (np == stdout) | ||
91 | break; | ||
92 | |||
93 | of_node_put(stdout); | ||
94 | if (!np) | ||
95 | return; | ||
96 | |||
97 | block_index = of_get_property(np, "block-index", NULL); | ||
98 | if (!block_index) | ||
99 | goto error; | ||
100 | |||
101 | switch (*block_index) { | ||
102 | case 0: | ||
103 | intr_cause_offset = MPSC_INTR_CAUSE_OFF_0; | ||
104 | break; | ||
105 | case 1: | ||
106 | intr_cause_offset = MPSC_INTR_CAUSE_OFF_1; | ||
107 | break; | ||
108 | default: | ||
109 | goto error; | ||
110 | } | ||
111 | |||
112 | err = of_address_to_resource(np, 0, &r[0]); | ||
113 | if (err) | ||
114 | goto error; | ||
115 | |||
116 | ph = of_get_property(np, "mpscintr", NULL); | ||
117 | mpscintr = of_find_node_by_phandle(*ph); | ||
118 | if (!mpscintr) | ||
119 | goto error; | ||
120 | |||
121 | err = of_address_to_resource(mpscintr, 0, &r[1]); | ||
122 | of_node_put(mpscintr); | ||
123 | if (err) | ||
124 | goto error; | ||
125 | |||
126 | of_node_put(np); | ||
127 | |||
128 | mpsc_base = ioremap(r[0].start, r[0].end - r[0].start + 1); | ||
129 | if (!mpsc_base) | ||
130 | return; | ||
131 | |||
132 | mpsc_intr_cause = ioremap(r[1].start, r[1].end - r[1].start + 1); | ||
133 | if (!mpsc_intr_cause) { | ||
134 | iounmap(mpsc_base); | ||
135 | return; | ||
136 | } | ||
137 | mpsc_intr_cause += intr_cause_offset; | ||
138 | |||
139 | udbg_putc = mv64x60_udbg_putc; | ||
140 | udbg_getc = mv64x60_udbg_getc; | ||
141 | udbg_getc_poll = mv64x60_udbg_getc_poll; | ||
142 | |||
143 | return; | ||
144 | |||
145 | error: | ||
146 | of_node_put(np); | ||
147 | } | ||
148 | |||
149 | void mv64x60_init_early(void) | ||
150 | { | ||
151 | mv64x60_udbg_init(); | ||
152 | } | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 4d1dcb45963d..55e6f394af82 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c | |||
@@ -245,10 +245,8 @@ static struct irq_chip qe_ic_irq_chip = { | |||
245 | 245 | ||
246 | static int qe_ic_host_match(struct irq_host *h, struct device_node *node) | 246 | static int qe_ic_host_match(struct irq_host *h, struct device_node *node) |
247 | { | 247 | { |
248 | struct qe_ic *qe_ic = h->host_data; | ||
249 | |||
250 | /* Exact match, unless qe_ic node is NULL */ | 248 | /* Exact match, unless qe_ic node is NULL */ |
251 | return qe_ic->of_node == NULL || qe_ic->of_node == node; | 249 | return h->of_node == NULL || h->of_node == node; |
252 | } | 250 | } |
253 | 251 | ||
254 | static int qe_ic_host_map(struct irq_host *h, unsigned int virq, | 252 | static int qe_ic_host_map(struct irq_host *h, unsigned int virq, |
@@ -352,9 +350,8 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags) | |||
352 | return; | 350 | return; |
353 | 351 | ||
354 | memset(qe_ic, 0, sizeof(struct qe_ic)); | 352 | memset(qe_ic, 0, sizeof(struct qe_ic)); |
355 | qe_ic->of_node = of_node_get(node); | ||
356 | 353 | ||
357 | qe_ic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, | 354 | qe_ic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
358 | NR_QE_IC_INTS, &qe_ic_host_ops, 0); | 355 | NR_QE_IC_INTS, &qe_ic_host_ops, 0); |
359 | if (qe_ic->irqhost == NULL) { | 356 | if (qe_ic->irqhost == NULL) { |
360 | of_node_put(node); | 357 | of_node_put(node); |
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.h b/arch/powerpc/sysdev/qe_lib/qe_ic.h index 9a631adb189d..c1361d005a8a 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.h +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.h | |||
@@ -84,9 +84,6 @@ struct qe_ic { | |||
84 | /* The "linux" controller struct */ | 84 | /* The "linux" controller struct */ |
85 | struct irq_chip hc_irq; | 85 | struct irq_chip hc_irq; |
86 | 86 | ||
87 | /* The device node of the interrupt controller */ | ||
88 | struct device_node *of_node; | ||
89 | |||
90 | /* VIRQ numbers of QE high/low irqs */ | 87 | /* VIRQ numbers of QE high/low irqs */ |
91 | unsigned int virq_high; | 88 | unsigned int virq_high; |
92 | unsigned int virq_low; | 89 | unsigned int virq_low; |
diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c deleted file mode 100644 index e81e7ec2e799..000000000000 --- a/arch/powerpc/sysdev/timer.c +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Common code to keep time when machine suspends. | ||
3 | * | ||
4 | * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> | ||
5 | * | ||
6 | * GPLv2 | ||
7 | */ | ||
8 | |||
9 | #include <linux/time.h> | ||
10 | #include <linux/sysdev.h> | ||
11 | #include <asm/rtc.h> | ||
12 | |||
13 | static unsigned long suspend_rtc_time; | ||
14 | |||
15 | /* | ||
16 | * Reset the time after a sleep. | ||
17 | */ | ||
18 | static int timer_resume(struct sys_device *dev) | ||
19 | { | ||
20 | struct timeval tv; | ||
21 | struct timespec ts; | ||
22 | struct rtc_time cur_rtc_tm; | ||
23 | unsigned long cur_rtc_time, diff; | ||
24 | |||
25 | /* get current RTC time and convert to seconds */ | ||
26 | get_rtc_time(&cur_rtc_tm); | ||
27 | cur_rtc_time = mktime(cur_rtc_tm.tm_year + 1900, | ||
28 | cur_rtc_tm.tm_mon + 1, | ||
29 | cur_rtc_tm.tm_mday, | ||
30 | cur_rtc_tm.tm_hour, | ||
31 | cur_rtc_tm.tm_min, | ||
32 | cur_rtc_tm.tm_sec); | ||
33 | |||
34 | diff = cur_rtc_time - suspend_rtc_time; | ||
35 | |||
36 | /* adjust time of day by seconds that elapsed while | ||
37 | * we were suspended */ | ||
38 | do_gettimeofday(&tv); | ||
39 | ts.tv_sec = tv.tv_sec + diff; | ||
40 | ts.tv_nsec = tv.tv_usec * NSEC_PER_USEC; | ||
41 | do_settimeofday(&ts); | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static int timer_suspend(struct sys_device *dev, pm_message_t state) | ||
47 | { | ||
48 | struct rtc_time suspend_rtc_tm; | ||
49 | WARN_ON(!ppc_md.get_rtc_time); | ||
50 | |||
51 | get_rtc_time(&suspend_rtc_tm); | ||
52 | suspend_rtc_time = mktime(suspend_rtc_tm.tm_year + 1900, | ||
53 | suspend_rtc_tm.tm_mon + 1, | ||
54 | suspend_rtc_tm.tm_mday, | ||
55 | suspend_rtc_tm.tm_hour, | ||
56 | suspend_rtc_tm.tm_min, | ||
57 | suspend_rtc_tm.tm_sec); | ||
58 | |||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | static struct sysdev_class timer_sysclass = { | ||
63 | .resume = timer_resume, | ||
64 | .suspend = timer_suspend, | ||
65 | set_kset_name("timer"), | ||
66 | }; | ||
67 | |||
68 | static struct sys_device device_timer = { | ||
69 | .id = 0, | ||
70 | .cls = &timer_sysclass, | ||
71 | }; | ||
72 | |||
73 | static int time_init_device(void) | ||
74 | { | ||
75 | int error = sysdev_class_register(&timer_sysclass); | ||
76 | if (!error) | ||
77 | error = sysdev_register(&device_timer); | ||
78 | return error; | ||
79 | } | ||
80 | |||
81 | device_initcall(time_init_device); | ||
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 90db8a720fed..31d3d33d91fc 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -52,7 +52,6 @@ | |||
52 | u32 tsi108_pci_cfg_base; | 52 | u32 tsi108_pci_cfg_base; |
53 | static u32 tsi108_pci_cfg_phys; | 53 | static u32 tsi108_pci_cfg_phys; |
54 | u32 tsi108_csr_vir_base; | 54 | u32 tsi108_csr_vir_base; |
55 | static struct device_node *pci_irq_node; | ||
56 | static struct irq_host *pci_irq_host; | 55 | static struct irq_host *pci_irq_host; |
57 | 56 | ||
58 | extern u32 get_vir_csrbase(void); | 57 | extern u32 get_vir_csrbase(void); |
@@ -193,8 +192,8 @@ void tsi108_clear_pci_cfg_error(void) | |||
193 | } | 192 | } |
194 | 193 | ||
195 | static struct pci_ops tsi108_direct_pci_ops = { | 194 | static struct pci_ops tsi108_direct_pci_ops = { |
196 | tsi108_direct_read_config, | 195 | .read = tsi108_direct_read_config, |
197 | tsi108_direct_write_config | 196 | .write = tsi108_direct_write_config, |
198 | }; | 197 | }; |
199 | 198 | ||
200 | int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) | 199 | int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) |
@@ -405,13 +404,7 @@ static int pci_irq_host_map(struct irq_host *h, unsigned int virq, | |||
405 | return 0; | 404 | return 0; |
406 | } | 405 | } |
407 | 406 | ||
408 | static int pci_irq_host_match(struct irq_host *h, struct device_node *node) | ||
409 | { | ||
410 | return pci_irq_node == node; | ||
411 | } | ||
412 | |||
413 | static struct irq_host_ops pci_irq_host_ops = { | 407 | static struct irq_host_ops pci_irq_host_ops = { |
414 | .match = pci_irq_host_match, | ||
415 | .map = pci_irq_host_map, | 408 | .map = pci_irq_host_map, |
416 | .xlate = pci_irq_host_xlate, | 409 | .xlate = pci_irq_host_xlate, |
417 | }; | 410 | }; |
@@ -433,10 +426,11 @@ void __init tsi108_pci_int_init(struct device_node *node) | |||
433 | { | 426 | { |
434 | DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); | 427 | DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); |
435 | 428 | ||
436 | pci_irq_node = of_node_get(node); | 429 | pci_irq_host = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LEGACY, |
437 | pci_irq_host = irq_alloc_host(IRQ_HOST_MAP_LEGACY, 0, &pci_irq_host_ops, 0); | 430 | 0, &pci_irq_host_ops, 0); |
438 | if (pci_irq_host == NULL) { | 431 | if (pci_irq_host == NULL) { |
439 | printk(KERN_ERR "pci_irq_host: failed to allocate irq host !\n"); | 432 | printk(KERN_ERR "pci_irq_host: failed to allocate irq host !\n"); |
433 | of_node_put(node); | ||
440 | return; | 434 | return; |
441 | } | 435 | } |
442 | 436 | ||
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 89059895a20d..5149716c734d 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/kernel_stat.h> | ||
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
29 | #include <asm/prom.h> | 30 | #include <asm/prom.h> |
@@ -55,9 +56,6 @@ struct uic { | |||
55 | 56 | ||
56 | /* For secondary UICs, the cascade interrupt's irqaction */ | 57 | /* For secondary UICs, the cascade interrupt's irqaction */ |
57 | struct irqaction cascade; | 58 | struct irqaction cascade; |
58 | |||
59 | /* The device node of the interrupt controller */ | ||
60 | struct device_node *of_node; | ||
61 | }; | 59 | }; |
62 | 60 | ||
63 | static void uic_unmask_irq(unsigned int virq) | 61 | static void uic_unmask_irq(unsigned int virq) |
@@ -142,7 +140,7 @@ static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
142 | 140 | ||
143 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | 141 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); |
144 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; | 142 | desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; |
145 | if (trigger) | 143 | if (!trigger) |
146 | desc->status |= IRQ_LEVEL; | 144 | desc->status |= IRQ_LEVEL; |
147 | 145 | ||
148 | spin_unlock_irqrestore(&uic->lock, flags); | 146 | spin_unlock_irqrestore(&uic->lock, flags); |
@@ -159,10 +157,62 @@ static struct irq_chip uic_irq_chip = { | |||
159 | .set_type = uic_set_irq_type, | 157 | .set_type = uic_set_irq_type, |
160 | }; | 158 | }; |
161 | 159 | ||
162 | static int uic_host_match(struct irq_host *h, struct device_node *node) | 160 | /** |
161 | * handle_uic_irq - irq flow handler for UIC | ||
162 | * @irq: the interrupt number | ||
163 | * @desc: the interrupt description structure for this irq | ||
164 | * | ||
165 | * This is modified version of the generic handle_level_irq() suitable | ||
166 | * for the UIC. On the UIC, acking (i.e. clearing the SR bit) a level | ||
167 | * irq will have no effect if the interrupt is still asserted by the | ||
168 | * device, even if the interrupt is already masked. Therefore, unlike | ||
169 | * the standard handle_level_irq(), we must ack the interrupt *after* | ||
170 | * invoking the ISR (which should have de-asserted the interrupt in | ||
171 | * the external source). For edge interrupts we ack at the beginning | ||
172 | * instead of the end, to keep the window in which we can miss an | ||
173 | * interrupt as small as possible. | ||
174 | */ | ||
175 | void fastcall handle_uic_irq(unsigned int irq, struct irq_desc *desc) | ||
163 | { | 176 | { |
164 | struct uic *uic = h->host_data; | 177 | unsigned int cpu = smp_processor_id(); |
165 | return uic->of_node == node; | 178 | struct irqaction *action; |
179 | irqreturn_t action_ret; | ||
180 | |||
181 | spin_lock(&desc->lock); | ||
182 | if (desc->status & IRQ_LEVEL) | ||
183 | desc->chip->mask(irq); | ||
184 | else | ||
185 | desc->chip->mask_ack(irq); | ||
186 | |||
187 | if (unlikely(desc->status & IRQ_INPROGRESS)) | ||
188 | goto out_unlock; | ||
189 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); | ||
190 | kstat_cpu(cpu).irqs[irq]++; | ||
191 | |||
192 | /* | ||
193 | * If its disabled or no action available | ||
194 | * keep it masked and get out of here | ||
195 | */ | ||
196 | action = desc->action; | ||
197 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { | ||
198 | desc->status |= IRQ_PENDING; | ||
199 | goto out_unlock; | ||
200 | } | ||
201 | |||
202 | desc->status |= IRQ_INPROGRESS; | ||
203 | desc->status &= ~IRQ_PENDING; | ||
204 | spin_unlock(&desc->lock); | ||
205 | |||
206 | action_ret = handle_IRQ_event(irq, action); | ||
207 | |||
208 | spin_lock(&desc->lock); | ||
209 | desc->status &= ~IRQ_INPROGRESS; | ||
210 | if (desc->status & IRQ_LEVEL) | ||
211 | desc->chip->ack(irq); | ||
212 | if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) | ||
213 | desc->chip->unmask(irq); | ||
214 | out_unlock: | ||
215 | spin_unlock(&desc->lock); | ||
166 | } | 216 | } |
167 | 217 | ||
168 | static int uic_host_map(struct irq_host *h, unsigned int virq, | 218 | static int uic_host_map(struct irq_host *h, unsigned int virq, |
@@ -173,7 +223,7 @@ static int uic_host_map(struct irq_host *h, unsigned int virq, | |||
173 | set_irq_chip_data(virq, uic); | 223 | set_irq_chip_data(virq, uic); |
174 | /* Despite the name, handle_level_irq() works for both level | 224 | /* Despite the name, handle_level_irq() works for both level |
175 | * and edge irqs on UIC. FIXME: check this is correct */ | 225 | * and edge irqs on UIC. FIXME: check this is correct */ |
176 | set_irq_chip_and_handler(virq, &uic_irq_chip, handle_level_irq); | 226 | set_irq_chip_and_handler(virq, &uic_irq_chip, handle_uic_irq); |
177 | 227 | ||
178 | /* Set default irq type */ | 228 | /* Set default irq type */ |
179 | set_irq_type(virq, IRQ_TYPE_NONE); | 229 | set_irq_type(virq, IRQ_TYPE_NONE); |
@@ -194,7 +244,6 @@ static int uic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
194 | } | 244 | } |
195 | 245 | ||
196 | static struct irq_host_ops uic_host_ops = { | 246 | static struct irq_host_ops uic_host_ops = { |
197 | .match = uic_host_match, | ||
198 | .map = uic_host_map, | 247 | .map = uic_host_map, |
199 | .xlate = uic_host_xlate, | 248 | .xlate = uic_host_xlate, |
200 | }; | 249 | }; |
@@ -207,6 +256,9 @@ irqreturn_t uic_cascade(int virq, void *data) | |||
207 | int subvirq; | 256 | int subvirq; |
208 | 257 | ||
209 | msr = mfdcr(uic->dcrbase + UIC_MSR); | 258 | msr = mfdcr(uic->dcrbase + UIC_MSR); |
259 | if (!msr) /* spurious interrupt */ | ||
260 | return IRQ_HANDLED; | ||
261 | |||
210 | src = 32 - ffs(msr); | 262 | src = 32 - ffs(msr); |
211 | 263 | ||
212 | subvirq = irq_linear_revmap(uic->irqhost, src); | 264 | subvirq = irq_linear_revmap(uic->irqhost, src); |
@@ -229,7 +281,6 @@ static struct uic * __init uic_init_one(struct device_node *node) | |||
229 | 281 | ||
230 | memset(uic, 0, sizeof(*uic)); | 282 | memset(uic, 0, sizeof(*uic)); |
231 | spin_lock_init(&uic->lock); | 283 | spin_lock_init(&uic->lock); |
232 | uic->of_node = of_node_get(node); | ||
233 | indexp = of_get_property(node, "cell-index", &len); | 284 | indexp = of_get_property(node, "cell-index", &len); |
234 | if (!indexp || (len != sizeof(u32))) { | 285 | if (!indexp || (len != sizeof(u32))) { |
235 | printk(KERN_ERR "uic: Device node %s has missing or invalid " | 286 | printk(KERN_ERR "uic: Device node %s has missing or invalid " |
@@ -246,8 +297,8 @@ static struct uic * __init uic_init_one(struct device_node *node) | |||
246 | } | 297 | } |
247 | uic->dcrbase = *dcrreg; | 298 | uic->dcrbase = *dcrreg; |
248 | 299 | ||
249 | uic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, NR_UIC_INTS, | 300 | uic->irqhost = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LINEAR, |
250 | &uic_host_ops, -1); | 301 | NR_UIC_INTS, &uic_host_ops, -1); |
251 | if (! uic->irqhost) { | 302 | if (! uic->irqhost) { |
252 | of_node_put(node); | 303 | of_node_put(node); |
253 | return NULL; /* FIXME: panic? */ | 304 | return NULL; /* FIXME: panic? */ |
diff --git a/arch/ppc/.gitignore b/arch/ppc/.gitignore index a1a869c8c840..1e79a0ae4473 100644 --- a/arch/ppc/.gitignore +++ b/arch/ppc/.gitignore | |||
@@ -1 +1 @@ | |||
include | /include | ||
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 6bdeeb70b157..20dce4681259 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -4,6 +4,10 @@ | |||
4 | 4 | ||
5 | mainmenu "Linux/PowerPC Kernel Configuration" | 5 | mainmenu "Linux/PowerPC Kernel Configuration" |
6 | 6 | ||
7 | config WORD_SIZE | ||
8 | int | ||
9 | default 32 | ||
10 | |||
7 | config MMU | 11 | config MMU |
8 | bool | 12 | bool |
9 | default y | 13 | default y |
@@ -573,24 +577,9 @@ choice | |||
573 | 577 | ||
574 | Select PReP if configuring for a PReP machine. | 578 | Select PReP if configuring for a PReP machine. |
575 | 579 | ||
576 | Select Gemini if configuring for a Synergy Microsystems' Gemini | ||
577 | series Single Board Computer. More information is available at: | ||
578 | <http://www.synergymicro.com/PressRel/97_10_15.html>. | ||
579 | |||
580 | Select APUS if configuring for a PowerUP Amiga. More information is | ||
581 | available at: <http://linux-apus.sourceforge.net/>. | ||
582 | |||
583 | config PPC_PREP | 580 | config PPC_PREP |
584 | bool "PReP" | 581 | bool "PReP" |
585 | 582 | ||
586 | config APUS | ||
587 | bool "Amiga-APUS" | ||
588 | depends on BROKEN | ||
589 | help | ||
590 | Select APUS if configuring for a PowerUP Amiga. | ||
591 | More information is available at: | ||
592 | <http://linux-apus.sourceforge.net/>. | ||
593 | |||
594 | config KATANA | 583 | config KATANA |
595 | bool "Artesyn-Katana" | 584 | bool "Artesyn-Katana" |
596 | help | 585 | help |
@@ -1027,133 +1016,7 @@ config CMDLINE | |||
1027 | some command-line options at build time by entering them here. In | 1016 | some command-line options at build time by entering them here. In |
1028 | most cases you will need to specify the root device here. | 1017 | most cases you will need to specify the root device here. |
1029 | 1018 | ||
1030 | config AMIGA | 1019 | if BROKEN |
1031 | bool | ||
1032 | depends on APUS | ||
1033 | default y | ||
1034 | help | ||
1035 | This option enables support for the Amiga series of computers. | ||
1036 | |||
1037 | config ZORRO | ||
1038 | bool | ||
1039 | depends on APUS | ||
1040 | default y | ||
1041 | help | ||
1042 | This enables support for the Zorro bus in the Amiga. If you have | ||
1043 | expansion cards in your Amiga that conform to the Amiga | ||
1044 | AutoConfig(tm) specification, say Y, otherwise N. Note that even | ||
1045 | expansion cards that do not fit in the Zorro slots but fit in e.g. | ||
1046 | the CPU slot may fall in this category, so you have to say Y to let | ||
1047 | Linux use these. | ||
1048 | |||
1049 | config ABSTRACT_CONSOLE | ||
1050 | bool | ||
1051 | depends on APUS | ||
1052 | default y | ||
1053 | |||
1054 | config APUS_FAST_EXCEPT | ||
1055 | bool | ||
1056 | depends on APUS | ||
1057 | default y | ||
1058 | |||
1059 | config AMIGA_PCMCIA | ||
1060 | bool "Amiga 1200/600 PCMCIA support" | ||
1061 | depends on APUS && EXPERIMENTAL | ||
1062 | help | ||
1063 | Include support in the kernel for pcmcia on Amiga 1200 and Amiga | ||
1064 | 600. If you intend to use pcmcia cards say Y; otherwise say N. | ||
1065 | |||
1066 | config AMIGA_BUILTIN_SERIAL | ||
1067 | tristate "Amiga builtin serial support" | ||
1068 | depends on APUS | ||
1069 | help | ||
1070 | If you want to use your Amiga's built-in serial port in Linux, | ||
1071 | answer Y. | ||
1072 | |||
1073 | To compile this driver as a module, choose M here. | ||
1074 | |||
1075 | config GVPIOEXT | ||
1076 | tristate "GVP IO-Extender support" | ||
1077 | depends on APUS | ||
1078 | help | ||
1079 | If you want to use a GVP IO-Extender serial card in Linux, say Y. | ||
1080 | Otherwise, say N. | ||
1081 | |||
1082 | config GVPIOEXT_LP | ||
1083 | tristate "GVP IO-Extender parallel printer support" | ||
1084 | depends on GVPIOEXT | ||
1085 | help | ||
1086 | Say Y to enable driving a printer from the parallel port on your | ||
1087 | GVP IO-Extender card, N otherwise. | ||
1088 | |||
1089 | config GVPIOEXT_PLIP | ||
1090 | tristate "GVP IO-Extender PLIP support" | ||
1091 | depends on GVPIOEXT | ||
1092 | help | ||
1093 | Say Y to enable doing IP over the parallel port on your GVP | ||
1094 | IO-Extender card, N otherwise. | ||
1095 | |||
1096 | config MULTIFACE_III_TTY | ||
1097 | tristate "Multiface Card III serial support" | ||
1098 | depends on APUS | ||
1099 | help | ||
1100 | If you want to use a Multiface III card's serial port in Linux, | ||
1101 | answer Y. | ||
1102 | |||
1103 | To compile this driver as a module, choose M here. | ||
1104 | |||
1105 | config A2232 | ||
1106 | tristate "Commodore A2232 serial support (EXPERIMENTAL)" | ||
1107 | depends on EXPERIMENTAL && APUS | ||
1108 | ---help--- | ||
1109 | This option supports the 2232 7-port serial card shipped with the | ||
1110 | Amiga 2000 and other Zorro-bus machines, dating from 1989. At | ||
1111 | a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip | ||
1112 | each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The | ||
1113 | ports were connected with 8 pin DIN connectors on the card bracket, | ||
1114 | for which 8 pin to DB25 adapters were supplied. The card also had | ||
1115 | jumpers internally to toggle various pinning configurations. | ||
1116 | |||
1117 | This driver can be built as a module; but then "generic_serial" | ||
1118 | will also be built as a module. This has to be loaded before | ||
1119 | "ser_a2232". If you want to do this, answer M here. | ||
1120 | |||
1121 | config WHIPPET_SERIAL | ||
1122 | tristate "Hisoft Whippet PCMCIA serial support" | ||
1123 | depends on AMIGA_PCMCIA | ||
1124 | help | ||
1125 | HiSoft has a web page at <http://www.hisoft.co.uk/>, but there | ||
1126 | is no listing for the Whippet in their Amiga section. | ||
1127 | |||
1128 | config APNE | ||
1129 | tristate "PCMCIA NE2000 support" | ||
1130 | depends on AMIGA_PCMCIA | ||
1131 | help | ||
1132 | If you have a PCMCIA NE2000 compatible adapter, say Y. Otherwise, | ||
1133 | say N. | ||
1134 | |||
1135 | To compile this driver as a module, choose M here: the | ||
1136 | module will be called apne. | ||
1137 | |||
1138 | config SERIAL_CONSOLE | ||
1139 | bool "Support for serial port console" | ||
1140 | depends on APUS && (AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y) | ||
1141 | |||
1142 | config HEARTBEAT | ||
1143 | bool "Use power LED as a heartbeat" | ||
1144 | depends on APUS | ||
1145 | help | ||
1146 | Use the power-on LED on your machine as a load meter. The exact | ||
1147 | behavior is platform-dependent, but normally the flash frequency is | ||
1148 | a hyperbolic function of the 5-minute load average. | ||
1149 | |||
1150 | config PROC_HARDWARE | ||
1151 | bool "/proc/hardware support" | ||
1152 | depends on APUS | ||
1153 | |||
1154 | source "drivers/zorro/Kconfig" | ||
1155 | |||
1156 | if !44x || BROKEN | ||
1157 | source kernel/power/Kconfig | 1020 | source kernel/power/Kconfig |
1158 | endif | 1021 | endif |
1159 | 1022 | ||
@@ -1227,8 +1090,7 @@ config MCA | |||
1227 | 1090 | ||
1228 | config PCI | 1091 | config PCI |
1229 | bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx | 1092 | bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx |
1230 | default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx | 1093 | default y if !40x && !CPM2 && !8xx && !83xx && !85xx |
1231 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS | ||
1232 | default PCI_QSPAN if !4xx && !CPM2 && 8xx | 1094 | default PCI_QSPAN if !4xx && !CPM2 && 8xx |
1233 | help | 1095 | help |
1234 | Find out whether your system includes a PCI bus. PCI is the name of | 1096 | Find out whether your system includes a PCI bus. PCI is the name of |
@@ -1284,10 +1146,6 @@ config 8260_PCI9_IDMA4 | |||
1284 | 1146 | ||
1285 | endchoice | 1147 | endchoice |
1286 | 1148 | ||
1287 | config PCI_PERMEDIA | ||
1288 | bool "PCI for Permedia2" | ||
1289 | depends on !4xx && !8xx && APUS | ||
1290 | |||
1291 | source "drivers/pci/Kconfig" | 1149 | source "drivers/pci/Kconfig" |
1292 | 1150 | ||
1293 | source "drivers/pcmcia/Kconfig" | 1151 | source "drivers/pcmcia/Kconfig" |
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index 0db66dcf0723..eee6264e8a04 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile | |||
@@ -69,7 +69,6 @@ core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/ | |||
69 | core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/ | 69 | core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/ |
70 | core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/ | 70 | core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/ |
71 | core-$(CONFIG_XMON) += arch/ppc/xmon/ | 71 | core-$(CONFIG_XMON) += arch/ppc/xmon/ |
72 | core-$(CONFIG_APUS) += arch/ppc/amiga/ | ||
73 | drivers-$(CONFIG_8xx) += arch/ppc/8xx_io/ | 72 | drivers-$(CONFIG_8xx) += arch/ppc/8xx_io/ |
74 | drivers-$(CONFIG_4xx) += arch/ppc/4xx_io/ | 73 | drivers-$(CONFIG_4xx) += arch/ppc/4xx_io/ |
75 | drivers-$(CONFIG_CPM2) += arch/ppc/8260_io/ | 74 | drivers-$(CONFIG_CPM2) += arch/ppc/8260_io/ |
diff --git a/arch/ppc/amiga/Makefile b/arch/ppc/amiga/Makefile deleted file mode 100644 index 59fec0a3ac8e..000000000000 --- a/arch/ppc/amiga/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for Linux arch/m68k/amiga source directory | ||
3 | # | ||
4 | |||
5 | obj-y := config.o amiints.o cia.o time.o bootinfo.o amisound.o \ | ||
6 | chipram.o amiga_ksyms.o | ||
7 | |||
8 | obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o | ||
diff --git a/arch/ppc/amiga/amiga_ksyms.c b/arch/ppc/amiga/amiga_ksyms.c deleted file mode 100644 index ec74e5b7a1ce..000000000000 --- a/arch/ppc/amiga/amiga_ksyms.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../m68k/amiga/amiga_ksyms.c" | ||
diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c deleted file mode 100644 index 265fcd3c6ab2..000000000000 --- a/arch/ppc/amiga/amiints.c +++ /dev/null | |||
@@ -1,322 +0,0 @@ | |||
1 | /* | ||
2 | * Amiga Linux interrupt handling code | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file COPYING in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * 11/07/96: rewritten interrupt handling, irq lists are exists now only for | ||
9 | * this sources where it makes sense (VERTB/PORTS/EXTER) and you must | ||
10 | * be careful that dev_id for this sources is unique since this the | ||
11 | * only possibility to distinguish between different handlers for | ||
12 | * free_irq. irq lists also have different irq flags: | ||
13 | * - IRQ_FLG_FAST: handler is inserted at top of list (after other | ||
14 | * fast handlers) | ||
15 | * - IRQ_FLG_SLOW: handler is inserted at bottom of list and before | ||
16 | * they're executed irq level is set to the previous | ||
17 | * one, but handlers don't need to be reentrant, if | ||
18 | * reentrance occurred, slow handlers will be just | ||
19 | * called again. | ||
20 | * The whole interrupt handling for CIAs is moved to cia.c | ||
21 | * /Roman Zippel | ||
22 | * | ||
23 | * 07/08/99: rewamp of the interrupt handling - we now have two types of | ||
24 | * interrupts, normal and fast handlers, fast handlers being | ||
25 | * marked with SA_INTERRUPT and runs with all other interrupts | ||
26 | * disabled. Normal interrupts disable their own source but | ||
27 | * run with all other interrupt sources enabled. | ||
28 | * PORTS and EXTER interrupts are always shared even if the | ||
29 | * drivers do not explicitly mark this when calling | ||
30 | * request_irq which they really should do. | ||
31 | * This is similar to the way interrupts are handled on all | ||
32 | * other architectures and makes a ton of sense besides | ||
33 | * having the advantage of making it easier to share | ||
34 | * drivers. | ||
35 | * /Jes | ||
36 | */ | ||
37 | |||
38 | #include <linux/types.h> | ||
39 | #include <linux/kernel.h> | ||
40 | #include <linux/sched.h> | ||
41 | #include <linux/interrupt.h> | ||
42 | #include <linux/irq.h> | ||
43 | #include <linux/kernel_stat.h> | ||
44 | #include <linux/init.h> | ||
45 | |||
46 | #include <asm/system.h> | ||
47 | #include <asm/irq.h> | ||
48 | #include <asm/traps.h> | ||
49 | #include <asm/amigahw.h> | ||
50 | #include <asm/amigaints.h> | ||
51 | #include <asm/amipcmcia.h> | ||
52 | |||
53 | #ifdef CONFIG_APUS | ||
54 | #include <asm/amigappc.h> | ||
55 | #endif | ||
56 | |||
57 | extern void cia_init_IRQ(struct ciabase *base); | ||
58 | |||
59 | unsigned short ami_intena_vals[AMI_STD_IRQS] = { | ||
60 | IF_VERTB, IF_COPER, IF_AUD0, IF_AUD1, IF_AUD2, IF_AUD3, IF_BLIT, | ||
61 | IF_DSKSYN, IF_DSKBLK, IF_RBF, IF_TBE, IF_SOFT, IF_PORTS, IF_EXTER | ||
62 | }; | ||
63 | static const unsigned char ami_servers[AMI_STD_IRQS] = { | ||
64 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 | ||
65 | }; | ||
66 | |||
67 | static short ami_ablecount[AMI_IRQS]; | ||
68 | |||
69 | static void ami_badint(int irq, void *dev_id, struct pt_regs *fp) | ||
70 | { | ||
71 | /* num_spurious += 1;*/ | ||
72 | } | ||
73 | |||
74 | /* | ||
75 | * void amiga_init_IRQ(void) | ||
76 | * | ||
77 | * Parameters: None | ||
78 | * | ||
79 | * Returns: Nothing | ||
80 | * | ||
81 | * This function should be called during kernel startup to initialize | ||
82 | * the amiga IRQ handling routines. | ||
83 | */ | ||
84 | |||
85 | __init | ||
86 | void amiga_init_IRQ(void) | ||
87 | { | ||
88 | int i; | ||
89 | |||
90 | for (i = 0; i < AMI_IRQS; i++) | ||
91 | ami_ablecount[i] = 0; | ||
92 | |||
93 | /* turn off PCMCIA interrupts */ | ||
94 | if (AMIGAHW_PRESENT(PCMCIA)) | ||
95 | gayle.inten = GAYLE_IRQ_IDE; | ||
96 | |||
97 | /* turn off all interrupts... */ | ||
98 | amiga_custom.intena = 0x7fff; | ||
99 | amiga_custom.intreq = 0x7fff; | ||
100 | |||
101 | #ifdef CONFIG_APUS | ||
102 | /* Clear any inter-CPU interrupt requests. Circumvents bug in | ||
103 | Blizzard IPL emulation HW (or so it appears). */ | ||
104 | APUS_WRITE(APUS_INT_LVL, INTLVL_SETRESET | INTLVL_MASK); | ||
105 | |||
106 | /* Init IPL emulation. */ | ||
107 | APUS_WRITE(APUS_REG_INT, REGINT_INTMASTER | REGINT_ENABLEIPL); | ||
108 | APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT); | ||
109 | APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_IPLMASK); | ||
110 | #endif | ||
111 | /* ... and enable the master interrupt bit */ | ||
112 | amiga_custom.intena = IF_SETCLR | IF_INTEN; | ||
113 | |||
114 | cia_init_IRQ(&ciaa_base); | ||
115 | cia_init_IRQ(&ciab_base); | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * Enable/disable a particular machine specific interrupt source. | ||
120 | * Note that this may affect other interrupts in case of a shared interrupt. | ||
121 | * This function should only be called for a _very_ short time to change some | ||
122 | * internal data, that may not be changed by the interrupt at the same time. | ||
123 | * ami_(enable|disable)_irq calls may also be nested. | ||
124 | */ | ||
125 | |||
126 | void amiga_enable_irq(unsigned int irq) | ||
127 | { | ||
128 | if (irq >= AMI_IRQS) { | ||
129 | printk("%s: Unknown IRQ %d\n", __FUNCTION__, irq); | ||
130 | return; | ||
131 | } | ||
132 | |||
133 | ami_ablecount[irq]--; | ||
134 | if (ami_ablecount[irq]<0) | ||
135 | ami_ablecount[irq]=0; | ||
136 | else if (ami_ablecount[irq]) | ||
137 | return; | ||
138 | |||
139 | /* No action for auto-vector interrupts */ | ||
140 | if (irq >= IRQ_AMIGA_AUTO){ | ||
141 | printk("%s: Trying to enable auto-vector IRQ %i\n", | ||
142 | __FUNCTION__, irq - IRQ_AMIGA_AUTO); | ||
143 | return; | ||
144 | } | ||
145 | |||
146 | if (irq >= IRQ_AMIGA_CIAA) { | ||
147 | cia_set_irq(irq, 0); | ||
148 | cia_able_irq(irq, 1); | ||
149 | return; | ||
150 | } | ||
151 | |||
152 | /* enable the interrupt */ | ||
153 | amiga_custom.intena = IF_SETCLR | ami_intena_vals[irq]; | ||
154 | } | ||
155 | |||
156 | void amiga_disable_irq(unsigned int irq) | ||
157 | { | ||
158 | if (irq >= AMI_IRQS) { | ||
159 | printk("%s: Unknown IRQ %d\n", __FUNCTION__, irq); | ||
160 | return; | ||
161 | } | ||
162 | |||
163 | if (ami_ablecount[irq]++) | ||
164 | return; | ||
165 | |||
166 | /* No action for auto-vector interrupts */ | ||
167 | if (irq >= IRQ_AMIGA_AUTO) { | ||
168 | printk("%s: Trying to disable auto-vector IRQ %i\n", | ||
169 | __FUNCTION__, irq - IRQ_AMIGA_AUTO); | ||
170 | return; | ||
171 | } | ||
172 | |||
173 | if (irq >= IRQ_AMIGA_CIAA) { | ||
174 | cia_able_irq(irq, 0); | ||
175 | return; | ||
176 | } | ||
177 | |||
178 | /* disable the interrupt */ | ||
179 | amiga_custom.intena = ami_intena_vals[irq]; | ||
180 | } | ||
181 | |||
182 | inline void amiga_do_irq(int irq, struct pt_regs *fp) | ||
183 | { | ||
184 | irq_desc_t *desc = irq_desc + irq; | ||
185 | struct irqaction *action = desc->action; | ||
186 | |||
187 | kstat_cpu(0).irqs[irq]++; | ||
188 | action->handler(irq, action->dev_id, fp); | ||
189 | } | ||
190 | |||
191 | void amiga_do_irq_list(int irq, struct pt_regs *fp) | ||
192 | { | ||
193 | irq_desc_t *desc = irq_desc + irq; | ||
194 | struct irqaction *action; | ||
195 | |||
196 | kstat_cpu(0).irqs[irq]++; | ||
197 | |||
198 | amiga_custom.intreq = ami_intena_vals[irq]; | ||
199 | |||
200 | for (action = desc->action; action; action = action->next) | ||
201 | action->handler(irq, action->dev_id, fp); | ||
202 | } | ||
203 | |||
204 | /* | ||
205 | * The builtin Amiga hardware interrupt handlers. | ||
206 | */ | ||
207 | |||
208 | static void ami_int1(int irq, void *dev_id, struct pt_regs *fp) | ||
209 | { | ||
210 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
211 | |||
212 | /* if serial transmit buffer empty, interrupt */ | ||
213 | if (ints & IF_TBE) { | ||
214 | amiga_custom.intreq = IF_TBE; | ||
215 | amiga_do_irq(IRQ_AMIGA_TBE, fp); | ||
216 | } | ||
217 | |||
218 | /* if floppy disk transfer complete, interrupt */ | ||
219 | if (ints & IF_DSKBLK) { | ||
220 | amiga_custom.intreq = IF_DSKBLK; | ||
221 | amiga_do_irq(IRQ_AMIGA_DSKBLK, fp); | ||
222 | } | ||
223 | |||
224 | /* if software interrupt set, interrupt */ | ||
225 | if (ints & IF_SOFT) { | ||
226 | amiga_custom.intreq = IF_SOFT; | ||
227 | amiga_do_irq(IRQ_AMIGA_SOFT, fp); | ||
228 | } | ||
229 | } | ||
230 | |||
231 | static void ami_int3(int irq, void *dev_id, struct pt_regs *fp) | ||
232 | { | ||
233 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
234 | |||
235 | /* if a blitter interrupt */ | ||
236 | if (ints & IF_BLIT) { | ||
237 | amiga_custom.intreq = IF_BLIT; | ||
238 | amiga_do_irq(IRQ_AMIGA_BLIT, fp); | ||
239 | } | ||
240 | |||
241 | /* if a copper interrupt */ | ||
242 | if (ints & IF_COPER) { | ||
243 | amiga_custom.intreq = IF_COPER; | ||
244 | amiga_do_irq(IRQ_AMIGA_COPPER, fp); | ||
245 | } | ||
246 | |||
247 | /* if a vertical blank interrupt */ | ||
248 | if (ints & IF_VERTB) | ||
249 | amiga_do_irq_list(IRQ_AMIGA_VERTB, fp); | ||
250 | } | ||
251 | |||
252 | static void ami_int4(int irq, void *dev_id, struct pt_regs *fp) | ||
253 | { | ||
254 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
255 | |||
256 | /* if audio 0 interrupt */ | ||
257 | if (ints & IF_AUD0) { | ||
258 | amiga_custom.intreq = IF_AUD0; | ||
259 | amiga_do_irq(IRQ_AMIGA_AUD0, fp); | ||
260 | } | ||
261 | |||
262 | /* if audio 1 interrupt */ | ||
263 | if (ints & IF_AUD1) { | ||
264 | amiga_custom.intreq = IF_AUD1; | ||
265 | amiga_do_irq(IRQ_AMIGA_AUD1, fp); | ||
266 | } | ||
267 | |||
268 | /* if audio 2 interrupt */ | ||
269 | if (ints & IF_AUD2) { | ||
270 | amiga_custom.intreq = IF_AUD2; | ||
271 | amiga_do_irq(IRQ_AMIGA_AUD2, fp); | ||
272 | } | ||
273 | |||
274 | /* if audio 3 interrupt */ | ||
275 | if (ints & IF_AUD3) { | ||
276 | amiga_custom.intreq = IF_AUD3; | ||
277 | amiga_do_irq(IRQ_AMIGA_AUD3, fp); | ||
278 | } | ||
279 | } | ||
280 | |||
281 | static void ami_int5(int irq, void *dev_id, struct pt_regs *fp) | ||
282 | { | ||
283 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | ||
284 | |||
285 | /* if serial receive buffer full interrupt */ | ||
286 | if (ints & IF_RBF) { | ||
287 | /* acknowledge of IF_RBF must be done by the serial interrupt */ | ||
288 | amiga_do_irq(IRQ_AMIGA_RBF, fp); | ||
289 | } | ||
290 | |||
291 | /* if a disk sync interrupt */ | ||
292 | if (ints & IF_DSKSYN) { | ||
293 | amiga_custom.intreq = IF_DSKSYN; | ||
294 | amiga_do_irq(IRQ_AMIGA_DSKSYN, fp); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | static void ami_int7(int irq, void *dev_id, struct pt_regs *fp) | ||
299 | { | ||
300 | panic ("level 7 interrupt received\n"); | ||
301 | } | ||
302 | |||
303 | #ifdef CONFIG_APUS | ||
304 | /* The PPC irq handling links all handlers requested on the same vector | ||
305 | and executes them in a loop. Having ami_badint at the end of the chain | ||
306 | is a bad idea. */ | ||
307 | struct irqaction amiga_sys_irqaction[AUTO_IRQS] = { | ||
308 | { .handler = ami_badint, .name = "spurious int" }, | ||
309 | { .handler = ami_int1, .name = "int1 handler" }, | ||
310 | { 0, /* CIAA */ }, | ||
311 | { .handler = ami_int3, .name = "int3 handler" }, | ||
312 | { .handler = ami_int4, .name = "int4 handler" }, | ||
313 | { .handler = ami_int5, .name = "int5 handler" }, | ||
314 | { 0, /* CIAB */ }, | ||
315 | { .handler = ami_int7, .name = "int7 handler" }, | ||
316 | }; | ||
317 | #else | ||
318 | void (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { | ||
319 | ami_badint, ami_int1, ami_badint, ami_int3, | ||
320 | ami_int4, ami_int5, ami_badint, ami_int7 | ||
321 | }; | ||
322 | #endif | ||
diff --git a/arch/ppc/amiga/amisound.c b/arch/ppc/amiga/amisound.c deleted file mode 100644 index 2b86cbef79f6..000000000000 --- a/arch/ppc/amiga/amisound.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../m68k/amiga/amisound.c" | ||
diff --git a/arch/ppc/amiga/bootinfo.c b/arch/ppc/amiga/bootinfo.c deleted file mode 100644 index efd869a3ed9b..000000000000 --- a/arch/ppc/amiga/bootinfo.c +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | * Extracted from arch/m68k/kernel/setup.c. | ||
3 | * Should be properly generalized and put somewhere else. | ||
4 | * Jesper | ||
5 | */ | ||
6 | |||
7 | #include <linux/types.h> | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/string.h> | ||
10 | #include <linux/init.h> | ||
11 | |||
12 | #include <asm/setup.h> | ||
13 | #include <asm/bootinfo.h> | ||
14 | |||
15 | extern char cmd_line[CL_SIZE]; | ||
16 | |||
17 | extern int num_memory; | ||
18 | extern int m68k_realnum_memory; | ||
19 | extern struct mem_info memory[NUM_MEMINFO]; | ||
20 | extern struct mem_info m68k_memory[NUM_MEMINFO]; | ||
21 | extern struct mem_info ramdisk; | ||
22 | |||
23 | extern int amiga_parse_bootinfo(const struct bi_record *); | ||
24 | extern int atari_parse_bootinfo(const struct bi_record *); | ||
25 | extern int mac_parse_bootinfo(const struct bi_record *); | ||
26 | |||
27 | void __init parse_bootinfo(const struct bi_record *record) | ||
28 | { | ||
29 | while (record->tag != BI_LAST) { | ||
30 | int unknown = 0; | ||
31 | const u_long *data = record->data; | ||
32 | switch (record->tag) { | ||
33 | case BI_MACHTYPE: | ||
34 | case BI_CPUTYPE: | ||
35 | case BI_FPUTYPE: | ||
36 | case BI_MMUTYPE: | ||
37 | /* Already set up by head.S */ | ||
38 | break; | ||
39 | |||
40 | case BI_MEMCHUNK: | ||
41 | if (num_memory < NUM_MEMINFO) { | ||
42 | memory[num_memory].addr = data[0]; | ||
43 | memory[num_memory].size = data[1]; | ||
44 | num_memory++; | ||
45 | |||
46 | /* FIXME: duplicate for m68k drivers. */ | ||
47 | m68k_memory[m68k_realnum_memory].addr = data[0]; | ||
48 | m68k_memory[m68k_realnum_memory].size = data[1]; | ||
49 | m68k_realnum_memory++; | ||
50 | } else | ||
51 | printk("parse_bootinfo: too many memory chunks\n"); | ||
52 | break; | ||
53 | |||
54 | case BI_RAMDISK: | ||
55 | ramdisk.addr = data[0]; | ||
56 | ramdisk.size = data[1]; | ||
57 | break; | ||
58 | |||
59 | case BI_COMMAND_LINE: | ||
60 | strlcpy(cmd_line, (const char *)data, sizeof(cmd_line)); | ||
61 | break; | ||
62 | |||
63 | default: | ||
64 | if (MACH_IS_AMIGA) | ||
65 | unknown = amiga_parse_bootinfo(record); | ||
66 | else if (MACH_IS_ATARI) | ||
67 | unknown = atari_parse_bootinfo(record); | ||
68 | else if (MACH_IS_MAC) | ||
69 | unknown = mac_parse_bootinfo(record); | ||
70 | else | ||
71 | unknown = 1; | ||
72 | } | ||
73 | if (unknown) | ||
74 | printk("parse_bootinfo: unknown tag 0x%04x ignored\n", | ||
75 | record->tag); | ||
76 | record = (struct bi_record *)((u_long)record+record->size); | ||
77 | } | ||
78 | } | ||
diff --git a/arch/ppc/amiga/chipram.c b/arch/ppc/amiga/chipram.c deleted file mode 100644 index e6ab3c6b223c..000000000000 --- a/arch/ppc/amiga/chipram.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../m68k/amiga/chipram.c" | ||
diff --git a/arch/ppc/amiga/cia.c b/arch/ppc/amiga/cia.c deleted file mode 100644 index 9558f2f40e64..000000000000 --- a/arch/ppc/amiga/cia.c +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1996 Roman Zippel | ||
3 | * | ||
4 | * The concept of some functions bases on the original Amiga OS function | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/irq.h> | ||
16 | #include <linux/kernel_stat.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include <asm/irq.h> | ||
20 | #include <asm/amigahw.h> | ||
21 | #include <asm/amigaints.h> | ||
22 | |||
23 | struct ciabase { | ||
24 | volatile struct CIA *cia; | ||
25 | u_char icr_mask, icr_data; | ||
26 | u_short int_mask; | ||
27 | int handler_irq, cia_irq, server_irq; | ||
28 | char *name; | ||
29 | } ciaa_base = { | ||
30 | &ciaa, 0, 0, IF_PORTS, | ||
31 | IRQ_AMIGA_AUTO_2, IRQ_AMIGA_CIAA, | ||
32 | IRQ_AMIGA_PORTS, | ||
33 | "CIAA handler" | ||
34 | }, ciab_base = { | ||
35 | &ciab, 0, 0, IF_EXTER, | ||
36 | IRQ_AMIGA_AUTO_6, IRQ_AMIGA_CIAB, | ||
37 | IRQ_AMIGA_EXTER, | ||
38 | "CIAB handler" | ||
39 | }; | ||
40 | |||
41 | #define CIA_SET_BASE_ADJUST_IRQ(base, irq) \ | ||
42 | do { \ | ||
43 | if (irq >= IRQ_AMIGA_CIAB) { \ | ||
44 | base = &ciab_base; \ | ||
45 | irq -= IRQ_AMIGA_CIAB; \ | ||
46 | } else { \ | ||
47 | base = &ciaa_base; \ | ||
48 | irq -= IRQ_AMIGA_CIAA; \ | ||
49 | } \ | ||
50 | } while (0) | ||
51 | |||
52 | /* | ||
53 | * Cause or clear CIA interrupts, return old interrupt status. | ||
54 | */ | ||
55 | |||
56 | static unsigned char cia_set_irq_private(struct ciabase *base, | ||
57 | unsigned char mask) | ||
58 | { | ||
59 | u_char old; | ||
60 | |||
61 | old = (base->icr_data |= base->cia->icr); | ||
62 | if (mask & CIA_ICR_SETCLR) | ||
63 | base->icr_data |= mask; | ||
64 | else | ||
65 | base->icr_data &= ~mask; | ||
66 | if (base->icr_data & base->icr_mask) | ||
67 | amiga_custom.intreq = IF_SETCLR | base->int_mask; | ||
68 | return old & base->icr_mask; | ||
69 | } | ||
70 | |||
71 | unsigned char cia_set_irq(unsigned int irq, int set) | ||
72 | { | ||
73 | struct ciabase *base; | ||
74 | unsigned char mask; | ||
75 | |||
76 | if (irq >= IRQ_AMIGA_CIAB) | ||
77 | mask = (1 << (irq - IRQ_AMIGA_CIAB)); | ||
78 | else | ||
79 | mask = (1 << (irq - IRQ_AMIGA_CIAA)); | ||
80 | mask |= (set) ? CIA_ICR_SETCLR : 0; | ||
81 | |||
82 | CIA_SET_BASE_ADJUST_IRQ(base, irq); | ||
83 | |||
84 | return cia_set_irq_private(base, mask); | ||
85 | } | ||
86 | |||
87 | unsigned char cia_get_irq_mask(unsigned int irq) | ||
88 | { | ||
89 | struct ciabase *base; | ||
90 | |||
91 | CIA_SET_BASE_ADJUST_IRQ(base, irq); | ||
92 | |||
93 | return base->cia->icr; | ||
94 | } | ||
95 | |||
96 | /* | ||
97 | * Enable or disable CIA interrupts, return old interrupt mask. | ||
98 | */ | ||
99 | |||
100 | static unsigned char cia_able_irq_private(struct ciabase *base, | ||
101 | unsigned char mask) | ||
102 | { | ||
103 | u_char old; | ||
104 | |||
105 | old = base->icr_mask; | ||
106 | base->icr_data |= base->cia->icr; | ||
107 | base->cia->icr = mask; | ||
108 | if (mask & CIA_ICR_SETCLR) | ||
109 | base->icr_mask |= mask; | ||
110 | else | ||
111 | base->icr_mask &= ~mask; | ||
112 | base->icr_mask &= CIA_ICR_ALL; | ||
113 | |||
114 | if (base->icr_data & base->icr_mask) | ||
115 | amiga_custom.intreq = IF_SETCLR | base->int_mask; | ||
116 | return old; | ||
117 | } | ||
118 | |||
119 | unsigned char cia_able_irq(unsigned int irq, int enable) | ||
120 | { | ||
121 | struct ciabase *base; | ||
122 | unsigned char mask; | ||
123 | |||
124 | if (irq >= IRQ_AMIGA_CIAB) | ||
125 | mask = (1 << (irq - IRQ_AMIGA_CIAB)); | ||
126 | else | ||
127 | mask = (1 << (irq - IRQ_AMIGA_CIAA)); | ||
128 | mask |= (enable) ? CIA_ICR_SETCLR : 0; | ||
129 | |||
130 | CIA_SET_BASE_ADJUST_IRQ(base, irq); | ||
131 | |||
132 | return cia_able_irq_private(base, mask); | ||
133 | } | ||
134 | |||
135 | static void cia_handler(int irq, void *dev_id, struct pt_regs *fp) | ||
136 | { | ||
137 | struct ciabase *base = (struct ciabase *)dev_id; | ||
138 | irq_desc_t *desc; | ||
139 | struct irqaction *action; | ||
140 | int i; | ||
141 | unsigned char ints; | ||
142 | |||
143 | irq = base->cia_irq; | ||
144 | desc = irq_desc + irq; | ||
145 | ints = cia_set_irq_private(base, CIA_ICR_ALL); | ||
146 | amiga_custom.intreq = base->int_mask; | ||
147 | for (i = 0; i < CIA_IRQS; i++, irq++) { | ||
148 | if (ints & 1) { | ||
149 | kstat_cpu(0).irqs[irq]++; | ||
150 | action = desc->action; | ||
151 | action->handler(irq, action->dev_id, fp); | ||
152 | } | ||
153 | ints >>= 1; | ||
154 | desc++; | ||
155 | } | ||
156 | amiga_do_irq_list(base->server_irq, fp); | ||
157 | } | ||
158 | |||
159 | void __init cia_init_IRQ(struct ciabase *base) | ||
160 | { | ||
161 | extern struct irqaction amiga_sys_irqaction[AUTO_IRQS]; | ||
162 | struct irqaction *action; | ||
163 | |||
164 | /* clear any pending interrupt and turn off all interrupts */ | ||
165 | cia_set_irq_private(base, CIA_ICR_ALL); | ||
166 | cia_able_irq_private(base, CIA_ICR_ALL); | ||
167 | |||
168 | /* install CIA handler */ | ||
169 | action = &amiga_sys_irqaction[base->handler_irq-IRQ_AMIGA_AUTO]; | ||
170 | action->handler = cia_handler; | ||
171 | action->dev_id = base; | ||
172 | action->name = base->name; | ||
173 | setup_irq(base->handler_irq, &amiga_sys_irqaction[base->handler_irq-IRQ_AMIGA_AUTO]); | ||
174 | |||
175 | amiga_custom.intena = IF_SETCLR | base->int_mask; | ||
176 | } | ||
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c deleted file mode 100644 index bc50ed11957d..000000000000 --- a/arch/ppc/amiga/config.c +++ /dev/null | |||
@@ -1,953 +0,0 @@ | |||
1 | #define m68k_debug_device debug_device | ||
2 | |||
3 | /* | ||
4 | * Copyright (C) 1993 Hamish Macdonald | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * Miscellaneous Amiga stuff | ||
13 | */ | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/kd.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/console.h> | ||
21 | #include <linux/init.h> | ||
22 | #ifdef CONFIG_ZORRO | ||
23 | #include <linux/zorro.h> | ||
24 | #endif | ||
25 | |||
26 | #include <asm/bootinfo.h> | ||
27 | #include <asm/setup.h> | ||
28 | #include <asm/system.h> | ||
29 | #include <asm/pgtable.h> | ||
30 | #include <asm/amigahw.h> | ||
31 | #include <asm/amigaints.h> | ||
32 | #include <asm/irq.h> | ||
33 | #include <asm/machdep.h> | ||
34 | #include <asm/io.h> | ||
35 | |||
36 | unsigned long powerup_PCI_present; | ||
37 | unsigned long powerup_BPPCPLUS_present; | ||
38 | unsigned long amiga_model; | ||
39 | unsigned long amiga_eclock; | ||
40 | unsigned long amiga_masterclock; | ||
41 | unsigned long amiga_colorclock; | ||
42 | unsigned long amiga_chipset; | ||
43 | unsigned char amiga_vblank; | ||
44 | unsigned char amiga_psfreq; | ||
45 | struct amiga_hw_present amiga_hw_present; | ||
46 | |||
47 | static char s_a500[] __initdata = "A500"; | ||
48 | static char s_a500p[] __initdata = "A500+"; | ||
49 | static char s_a600[] __initdata = "A600"; | ||
50 | static char s_a1000[] __initdata = "A1000"; | ||
51 | static char s_a1200[] __initdata = "A1200"; | ||
52 | static char s_a2000[] __initdata = "A2000"; | ||
53 | static char s_a2500[] __initdata = "A2500"; | ||
54 | static char s_a3000[] __initdata = "A3000"; | ||
55 | static char s_a3000t[] __initdata = "A3000T"; | ||
56 | static char s_a3000p[] __initdata = "A3000+"; | ||
57 | static char s_a4000[] __initdata = "A4000"; | ||
58 | static char s_a4000t[] __initdata = "A4000T"; | ||
59 | static char s_cdtv[] __initdata = "CDTV"; | ||
60 | static char s_cd32[] __initdata = "CD32"; | ||
61 | static char s_draco[] __initdata = "Draco"; | ||
62 | static char *amiga_models[] __initdata = { | ||
63 | s_a500, s_a500p, s_a600, s_a1000, s_a1200, s_a2000, s_a2500, s_a3000, | ||
64 | s_a3000t, s_a3000p, s_a4000, s_a4000t, s_cdtv, s_cd32, s_draco, | ||
65 | }; | ||
66 | |||
67 | static char amiga_model_name[13] = "Amiga "; | ||
68 | |||
69 | extern char m68k_debug_device[]; | ||
70 | |||
71 | static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); | ||
72 | /* amiga specific irq functions */ | ||
73 | extern void amiga_init_IRQ (void); | ||
74 | extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *); | ||
75 | extern int amiga_request_irq (unsigned int irq, | ||
76 | void (*handler)(int, void *, struct pt_regs *), | ||
77 | unsigned long flags, const char *devname, | ||
78 | void *dev_id); | ||
79 | extern void amiga_free_irq (unsigned int irq, void *dev_id); | ||
80 | extern void amiga_enable_irq (unsigned int); | ||
81 | extern void amiga_disable_irq (unsigned int); | ||
82 | static void amiga_get_model(char *model); | ||
83 | static int amiga_get_hardware_list(char *buffer); | ||
84 | /* amiga specific timer functions */ | ||
85 | static unsigned long amiga_gettimeoffset (void); | ||
86 | static void a3000_gettod (int *, int *, int *, int *, int *, int *); | ||
87 | static void a2000_gettod (int *, int *, int *, int *, int *, int *); | ||
88 | static int amiga_hwclk (int, struct hwclk_time *); | ||
89 | static int amiga_set_clock_mmss (unsigned long); | ||
90 | static void amiga_reset (void); | ||
91 | extern void amiga_init_sound(void); | ||
92 | static void amiga_savekmsg_init(void); | ||
93 | static void amiga_mem_console_write(struct console *co, const char *b, | ||
94 | unsigned int count); | ||
95 | void amiga_serial_console_write(struct console *co, const char *s, | ||
96 | unsigned int count); | ||
97 | static void amiga_debug_init(void); | ||
98 | #ifdef CONFIG_HEARTBEAT | ||
99 | static void amiga_heartbeat(int on); | ||
100 | #endif | ||
101 | |||
102 | static struct console amiga_console_driver = { | ||
103 | .name = "debug", | ||
104 | .flags = CON_PRINTBUFFER, | ||
105 | .index = -1, | ||
106 | }; | ||
107 | |||
108 | |||
109 | /* | ||
110 | * Motherboard Resources present in all Amiga models | ||
111 | */ | ||
112 | |||
113 | static struct { | ||
114 | struct resource _ciab, _ciaa, _custom, _kickstart; | ||
115 | } mb_resources = { | ||
116 | // { "Ranger Memory", 0x00c00000, 0x00c7ffff }, | ||
117 | ._ciab = { "CIA B", 0x00bfd000, 0x00bfdfff }, | ||
118 | ._ciaa = { "CIA A", 0x00bfe000, 0x00bfefff }, | ||
119 | ._custom = { "Custom I/O", 0x00dff000, 0x00dfffff }, | ||
120 | ._kickstart = { "Kickstart ROM", 0x00f80000, 0x00ffffff } | ||
121 | }; | ||
122 | |||
123 | static struct resource rtc_resource = { | ||
124 | NULL, 0x00dc0000, 0x00dcffff | ||
125 | }; | ||
126 | |||
127 | static struct resource ram_resource[NUM_MEMINFO]; | ||
128 | |||
129 | |||
130 | /* | ||
131 | * Parse an Amiga-specific record in the bootinfo | ||
132 | */ | ||
133 | |||
134 | int amiga_parse_bootinfo(const struct bi_record *record) | ||
135 | { | ||
136 | int unknown = 0; | ||
137 | const unsigned long *data = record->data; | ||
138 | |||
139 | switch (record->tag) { | ||
140 | case BI_AMIGA_MODEL: | ||
141 | { | ||
142 | unsigned long d = *data; | ||
143 | |||
144 | powerup_PCI_present = d & 0x100; | ||
145 | amiga_model = d & 0xff; | ||
146 | } | ||
147 | break; | ||
148 | |||
149 | case BI_AMIGA_ECLOCK: | ||
150 | amiga_eclock = *data; | ||
151 | break; | ||
152 | |||
153 | case BI_AMIGA_CHIPSET: | ||
154 | amiga_chipset = *data; | ||
155 | break; | ||
156 | |||
157 | case BI_AMIGA_CHIP_SIZE: | ||
158 | amiga_chip_size = *(const int *)data; | ||
159 | break; | ||
160 | |||
161 | case BI_AMIGA_VBLANK: | ||
162 | amiga_vblank = *(const unsigned char *)data; | ||
163 | break; | ||
164 | |||
165 | case BI_AMIGA_PSFREQ: | ||
166 | amiga_psfreq = *(const unsigned char *)data; | ||
167 | break; | ||
168 | |||
169 | case BI_AMIGA_AUTOCON: | ||
170 | #ifdef CONFIG_ZORRO | ||
171 | if (zorro_num_autocon < ZORRO_NUM_AUTO) { | ||
172 | const struct ConfigDev *cd = (struct ConfigDev *)data; | ||
173 | struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++]; | ||
174 | dev->rom = cd->cd_Rom; | ||
175 | dev->slotaddr = cd->cd_SlotAddr; | ||
176 | dev->slotsize = cd->cd_SlotSize; | ||
177 | dev->resource.start = (unsigned long)cd->cd_BoardAddr; | ||
178 | dev->resource.end = dev->resource.start+cd->cd_BoardSize-1; | ||
179 | } else | ||
180 | printk("amiga_parse_bootinfo: too many AutoConfig devices\n"); | ||
181 | #endif /* CONFIG_ZORRO */ | ||
182 | break; | ||
183 | |||
184 | case BI_AMIGA_SERPER: | ||
185 | /* serial port period: ignored here */ | ||
186 | break; | ||
187 | |||
188 | case BI_AMIGA_PUP_BRIDGE: | ||
189 | powerup_PCI_present = *(const unsigned short *)data; | ||
190 | break; | ||
191 | |||
192 | case BI_AMIGA_BPPC_SCSI: | ||
193 | powerup_BPPCPLUS_present = *(const unsigned short *)data; | ||
194 | break; | ||
195 | |||
196 | default: | ||
197 | unknown = 1; | ||
198 | } | ||
199 | return(unknown); | ||
200 | } | ||
201 | |||
202 | /* | ||
203 | * Identify builtin hardware | ||
204 | */ | ||
205 | |||
206 | static void __init amiga_identify(void) | ||
207 | { | ||
208 | /* Fill in some default values, if necessary */ | ||
209 | if (amiga_eclock == 0) | ||
210 | amiga_eclock = 709379; | ||
211 | |||
212 | memset(&amiga_hw_present, 0, sizeof(amiga_hw_present)); | ||
213 | |||
214 | printk("Amiga hardware found: "); | ||
215 | if (amiga_model >= AMI_500 && amiga_model <= AMI_DRACO) { | ||
216 | printk("[%s] ", amiga_models[amiga_model-AMI_500]); | ||
217 | strcat(amiga_model_name, amiga_models[amiga_model-AMI_500]); | ||
218 | } | ||
219 | |||
220 | switch(amiga_model) { | ||
221 | case AMI_UNKNOWN: | ||
222 | goto Generic; | ||
223 | |||
224 | case AMI_600: | ||
225 | case AMI_1200: | ||
226 | AMIGAHW_SET(A1200_IDE); | ||
227 | AMIGAHW_SET(PCMCIA); | ||
228 | case AMI_500: | ||
229 | case AMI_500PLUS: | ||
230 | case AMI_1000: | ||
231 | case AMI_2000: | ||
232 | case AMI_2500: | ||
233 | AMIGAHW_SET(A2000_CLK); /* Is this correct for all models? */ | ||
234 | goto Generic; | ||
235 | |||
236 | case AMI_3000: | ||
237 | case AMI_3000T: | ||
238 | AMIGAHW_SET(AMBER_FF); | ||
239 | AMIGAHW_SET(MAGIC_REKICK); | ||
240 | /* fall through */ | ||
241 | case AMI_3000PLUS: | ||
242 | AMIGAHW_SET(A3000_SCSI); | ||
243 | AMIGAHW_SET(A3000_CLK); | ||
244 | AMIGAHW_SET(ZORRO3); | ||
245 | goto Generic; | ||
246 | |||
247 | case AMI_4000T: | ||
248 | AMIGAHW_SET(A4000_SCSI); | ||
249 | /* fall through */ | ||
250 | case AMI_4000: | ||
251 | AMIGAHW_SET(A4000_IDE); | ||
252 | AMIGAHW_SET(A3000_CLK); | ||
253 | AMIGAHW_SET(ZORRO3); | ||
254 | goto Generic; | ||
255 | |||
256 | case AMI_CDTV: | ||
257 | case AMI_CD32: | ||
258 | AMIGAHW_SET(CD_ROM); | ||
259 | AMIGAHW_SET(A2000_CLK); /* Is this correct? */ | ||
260 | goto Generic; | ||
261 | |||
262 | Generic: | ||
263 | AMIGAHW_SET(AMI_VIDEO); | ||
264 | AMIGAHW_SET(AMI_BLITTER); | ||
265 | AMIGAHW_SET(AMI_AUDIO); | ||
266 | AMIGAHW_SET(AMI_FLOPPY); | ||
267 | AMIGAHW_SET(AMI_KEYBOARD); | ||
268 | AMIGAHW_SET(AMI_MOUSE); | ||
269 | AMIGAHW_SET(AMI_SERIAL); | ||
270 | AMIGAHW_SET(AMI_PARALLEL); | ||
271 | AMIGAHW_SET(CHIP_RAM); | ||
272 | AMIGAHW_SET(PAULA); | ||
273 | |||
274 | switch(amiga_chipset) { | ||
275 | case CS_OCS: | ||
276 | case CS_ECS: | ||
277 | case CS_AGA: | ||
278 | switch (amiga_custom.deniseid & 0xf) { | ||
279 | case 0x0c: | ||
280 | AMIGAHW_SET(DENISE_HR); | ||
281 | break; | ||
282 | case 0x08: | ||
283 | AMIGAHW_SET(LISA); | ||
284 | break; | ||
285 | } | ||
286 | break; | ||
287 | default: | ||
288 | AMIGAHW_SET(DENISE); | ||
289 | break; | ||
290 | } | ||
291 | switch ((amiga_custom.vposr>>8) & 0x7f) { | ||
292 | case 0x00: | ||
293 | AMIGAHW_SET(AGNUS_PAL); | ||
294 | break; | ||
295 | case 0x10: | ||
296 | AMIGAHW_SET(AGNUS_NTSC); | ||
297 | break; | ||
298 | case 0x20: | ||
299 | case 0x21: | ||
300 | AMIGAHW_SET(AGNUS_HR_PAL); | ||
301 | break; | ||
302 | case 0x30: | ||
303 | case 0x31: | ||
304 | AMIGAHW_SET(AGNUS_HR_NTSC); | ||
305 | break; | ||
306 | case 0x22: | ||
307 | case 0x23: | ||
308 | AMIGAHW_SET(ALICE_PAL); | ||
309 | break; | ||
310 | case 0x32: | ||
311 | case 0x33: | ||
312 | AMIGAHW_SET(ALICE_NTSC); | ||
313 | break; | ||
314 | } | ||
315 | AMIGAHW_SET(ZORRO); | ||
316 | break; | ||
317 | |||
318 | case AMI_DRACO: | ||
319 | panic("No support for Draco yet"); | ||
320 | |||
321 | default: | ||
322 | panic("Unknown Amiga Model"); | ||
323 | } | ||
324 | |||
325 | #define AMIGAHW_ANNOUNCE(name, str) \ | ||
326 | if (AMIGAHW_PRESENT(name)) \ | ||
327 | printk(str) | ||
328 | |||
329 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "VIDEO "); | ||
330 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "BLITTER "); | ||
331 | AMIGAHW_ANNOUNCE(AMBER_FF, "AMBER_FF "); | ||
332 | AMIGAHW_ANNOUNCE(AMI_AUDIO, "AUDIO "); | ||
333 | AMIGAHW_ANNOUNCE(AMI_FLOPPY, "FLOPPY "); | ||
334 | AMIGAHW_ANNOUNCE(A3000_SCSI, "A3000_SCSI "); | ||
335 | AMIGAHW_ANNOUNCE(A4000_SCSI, "A4000_SCSI "); | ||
336 | AMIGAHW_ANNOUNCE(A1200_IDE, "A1200_IDE "); | ||
337 | AMIGAHW_ANNOUNCE(A4000_IDE, "A4000_IDE "); | ||
338 | AMIGAHW_ANNOUNCE(CD_ROM, "CD_ROM "); | ||
339 | AMIGAHW_ANNOUNCE(AMI_KEYBOARD, "KEYBOARD "); | ||
340 | AMIGAHW_ANNOUNCE(AMI_MOUSE, "MOUSE "); | ||
341 | AMIGAHW_ANNOUNCE(AMI_SERIAL, "SERIAL "); | ||
342 | AMIGAHW_ANNOUNCE(AMI_PARALLEL, "PARALLEL "); | ||
343 | AMIGAHW_ANNOUNCE(A2000_CLK, "A2000_CLK "); | ||
344 | AMIGAHW_ANNOUNCE(A3000_CLK, "A3000_CLK "); | ||
345 | AMIGAHW_ANNOUNCE(CHIP_RAM, "CHIP_RAM "); | ||
346 | AMIGAHW_ANNOUNCE(PAULA, "PAULA "); | ||
347 | AMIGAHW_ANNOUNCE(DENISE, "DENISE "); | ||
348 | AMIGAHW_ANNOUNCE(DENISE_HR, "DENISE_HR "); | ||
349 | AMIGAHW_ANNOUNCE(LISA, "LISA "); | ||
350 | AMIGAHW_ANNOUNCE(AGNUS_PAL, "AGNUS_PAL "); | ||
351 | AMIGAHW_ANNOUNCE(AGNUS_NTSC, "AGNUS_NTSC "); | ||
352 | AMIGAHW_ANNOUNCE(AGNUS_HR_PAL, "AGNUS_HR_PAL "); | ||
353 | AMIGAHW_ANNOUNCE(AGNUS_HR_NTSC, "AGNUS_HR_NTSC "); | ||
354 | AMIGAHW_ANNOUNCE(ALICE_PAL, "ALICE_PAL "); | ||
355 | AMIGAHW_ANNOUNCE(ALICE_NTSC, "ALICE_NTSC "); | ||
356 | AMIGAHW_ANNOUNCE(MAGIC_REKICK, "MAGIC_REKICK "); | ||
357 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA "); | ||
358 | if (AMIGAHW_PRESENT(ZORRO)) | ||
359 | printk("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : ""); | ||
360 | printk("\n"); | ||
361 | |||
362 | #undef AMIGAHW_ANNOUNCE | ||
363 | } | ||
364 | |||
365 | /* | ||
366 | * Setup the Amiga configuration info | ||
367 | */ | ||
368 | |||
369 | void __init config_amiga(void) | ||
370 | { | ||
371 | int i; | ||
372 | |||
373 | amiga_debug_init(); | ||
374 | amiga_identify(); | ||
375 | |||
376 | /* Some APUS boxes may have PCI memory, but ... */ | ||
377 | iomem_resource.name = "Memory"; | ||
378 | for (i = 0; i < 4; i++) | ||
379 | request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]); | ||
380 | |||
381 | mach_sched_init = amiga_sched_init; | ||
382 | mach_init_IRQ = amiga_init_IRQ; | ||
383 | #ifndef CONFIG_APUS | ||
384 | mach_default_handler = &amiga_default_handler; | ||
385 | mach_request_irq = amiga_request_irq; | ||
386 | mach_free_irq = amiga_free_irq; | ||
387 | enable_irq = amiga_enable_irq; | ||
388 | disable_irq = amiga_disable_irq; | ||
389 | #endif | ||
390 | mach_get_model = amiga_get_model; | ||
391 | mach_get_hardware_list = amiga_get_hardware_list; | ||
392 | mach_gettimeoffset = amiga_gettimeoffset; | ||
393 | if (AMIGAHW_PRESENT(A3000_CLK)){ | ||
394 | mach_gettod = a3000_gettod; | ||
395 | rtc_resource.name = "A3000 RTC"; | ||
396 | request_resource(&iomem_resource, &rtc_resource); | ||
397 | } | ||
398 | else{ /* if (AMIGAHW_PRESENT(A2000_CLK)) */ | ||
399 | mach_gettod = a2000_gettod; | ||
400 | rtc_resource.name = "A2000 RTC"; | ||
401 | request_resource(&iomem_resource, &rtc_resource); | ||
402 | } | ||
403 | |||
404 | mach_max_dma_address = 0xffffffff; /* | ||
405 | * default MAX_DMA=0xffffffff | ||
406 | * on all machines. If we don't | ||
407 | * do so, the SCSI code will not | ||
408 | * be able to allocate any mem | ||
409 | * for transfers, unless we are | ||
410 | * dealing with a Z2 mem only | ||
411 | * system. /Jes | ||
412 | */ | ||
413 | |||
414 | mach_hwclk = amiga_hwclk; | ||
415 | mach_set_clock_mmss = amiga_set_clock_mmss; | ||
416 | mach_reset = amiga_reset; | ||
417 | #ifdef CONFIG_HEARTBEAT | ||
418 | mach_heartbeat = amiga_heartbeat; | ||
419 | #endif | ||
420 | |||
421 | /* Fill in the clock values (based on the 700 kHz E-Clock) */ | ||
422 | amiga_masterclock = 40*amiga_eclock; /* 28 MHz */ | ||
423 | amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */ | ||
424 | |||
425 | /* clear all DMA bits */ | ||
426 | amiga_custom.dmacon = DMAF_ALL; | ||
427 | /* ensure that the DMA master bit is set */ | ||
428 | amiga_custom.dmacon = DMAF_SETCLR | DMAF_MASTER; | ||
429 | |||
430 | /* request all RAM */ | ||
431 | for (i = 0; i < m68k_num_memory; i++) { | ||
432 | ram_resource[i].name = | ||
433 | (m68k_memory[i].addr >= 0x01000000) ? "32-bit Fast RAM" : | ||
434 | (m68k_memory[i].addr < 0x00c00000) ? "16-bit Fast RAM" : | ||
435 | "16-bit Slow RAM"; | ||
436 | ram_resource[i].start = m68k_memory[i].addr; | ||
437 | ram_resource[i].end = m68k_memory[i].addr+m68k_memory[i].size-1; | ||
438 | request_resource(&iomem_resource, &ram_resource[i]); | ||
439 | } | ||
440 | |||
441 | /* initialize chipram allocator */ | ||
442 | amiga_chip_init (); | ||
443 | |||
444 | /* debugging using chipram */ | ||
445 | if (!strcmp( m68k_debug_device, "mem" )){ | ||
446 | if (!AMIGAHW_PRESENT(CHIP_RAM)) | ||
447 | printk("Warning: no chipram present for debugging\n"); | ||
448 | else { | ||
449 | amiga_savekmsg_init(); | ||
450 | amiga_console_driver.write = amiga_mem_console_write; | ||
451 | register_console(&amiga_console_driver); | ||
452 | } | ||
453 | } | ||
454 | |||
455 | /* our beloved beeper */ | ||
456 | if (AMIGAHW_PRESENT(AMI_AUDIO)) | ||
457 | amiga_init_sound(); | ||
458 | |||
459 | /* | ||
460 | * if it is an A3000, set the magic bit that forces | ||
461 | * a hard rekick | ||
462 | */ | ||
463 | if (AMIGAHW_PRESENT(MAGIC_REKICK)) | ||
464 | *(unsigned char *)ZTWO_VADDR(0xde0002) |= 0x80; | ||
465 | } | ||
466 | |||
467 | static unsigned short jiffy_ticks; | ||
468 | |||
469 | static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *, | ||
470 | struct pt_regs *)) | ||
471 | { | ||
472 | static struct resource sched_res = { | ||
473 | "timer", 0x00bfd400, 0x00bfd5ff, | ||
474 | }; | ||
475 | jiffy_ticks = (amiga_eclock+HZ/2)/HZ; | ||
476 | |||
477 | if (request_resource(&mb_resources._ciab, &sched_res)) | ||
478 | printk("Cannot allocate ciab.ta{lo,hi}\n"); | ||
479 | ciab.cra &= 0xC0; /* turn off timer A, continuous mode, from Eclk */ | ||
480 | ciab.talo = jiffy_ticks % 256; | ||
481 | ciab.tahi = jiffy_ticks / 256; | ||
482 | |||
483 | /* install interrupt service routine for CIAB Timer A | ||
484 | * | ||
485 | * Please don't change this to use ciaa, as it interferes with the | ||
486 | * SCSI code. We'll have to take a look at this later | ||
487 | */ | ||
488 | request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, 0, "timer", NULL); | ||
489 | /* start timer */ | ||
490 | ciab.cra |= 0x11; | ||
491 | } | ||
492 | |||
493 | #define TICK_SIZE 10000 | ||
494 | |||
495 | extern unsigned char cia_get_irq_mask(unsigned int irq); | ||
496 | |||
497 | /* This is always executed with interrupts disabled. */ | ||
498 | static unsigned long amiga_gettimeoffset (void) | ||
499 | { | ||
500 | unsigned short hi, lo, hi2; | ||
501 | unsigned long ticks, offset = 0; | ||
502 | |||
503 | /* read CIA B timer A current value */ | ||
504 | hi = ciab.tahi; | ||
505 | lo = ciab.talo; | ||
506 | hi2 = ciab.tahi; | ||
507 | |||
508 | if (hi != hi2) { | ||
509 | lo = ciab.talo; | ||
510 | hi = hi2; | ||
511 | } | ||
512 | |||
513 | ticks = hi << 8 | lo; | ||
514 | |||
515 | if (ticks > jiffy_ticks / 2) | ||
516 | /* check for pending interrupt */ | ||
517 | if (cia_get_irq_mask(IRQ_AMIGA_CIAB) & CIA_ICR_TA) | ||
518 | offset = 10000; | ||
519 | |||
520 | ticks = jiffy_ticks - ticks; | ||
521 | ticks = (10000 * ticks) / jiffy_ticks; | ||
522 | |||
523 | return ticks + offset; | ||
524 | } | ||
525 | |||
526 | static void a3000_gettod (int *yearp, int *monp, int *dayp, | ||
527 | int *hourp, int *minp, int *secp) | ||
528 | { | ||
529 | volatile struct tod3000 *tod = TOD_3000; | ||
530 | |||
531 | tod->cntrl1 = TOD3000_CNTRL1_HOLD; | ||
532 | |||
533 | *secp = tod->second1 * 10 + tod->second2; | ||
534 | *minp = tod->minute1 * 10 + tod->minute2; | ||
535 | *hourp = tod->hour1 * 10 + tod->hour2; | ||
536 | *dayp = tod->day1 * 10 + tod->day2; | ||
537 | *monp = tod->month1 * 10 + tod->month2; | ||
538 | *yearp = tod->year1 * 10 + tod->year2; | ||
539 | |||
540 | tod->cntrl1 = TOD3000_CNTRL1_FREE; | ||
541 | } | ||
542 | |||
543 | static void a2000_gettod (int *yearp, int *monp, int *dayp, | ||
544 | int *hourp, int *minp, int *secp) | ||
545 | { | ||
546 | volatile struct tod2000 *tod = TOD_2000; | ||
547 | |||
548 | tod->cntrl1 = TOD2000_CNTRL1_HOLD; | ||
549 | |||
550 | while (tod->cntrl1 & TOD2000_CNTRL1_BUSY) | ||
551 | ; | ||
552 | |||
553 | *secp = tod->second1 * 10 + tod->second2; | ||
554 | *minp = tod->minute1 * 10 + tod->minute2; | ||
555 | *hourp = (tod->hour1 & 3) * 10 + tod->hour2; | ||
556 | *dayp = tod->day1 * 10 + tod->day2; | ||
557 | *monp = tod->month1 * 10 + tod->month2; | ||
558 | *yearp = tod->year1 * 10 + tod->year2; | ||
559 | |||
560 | if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){ | ||
561 | if (!(tod->hour1 & TOD2000_HOUR1_PM) && *hourp == 12) | ||
562 | *hourp = 0; | ||
563 | else if ((tod->hour1 & TOD2000_HOUR1_PM) && *hourp != 12) | ||
564 | *hourp += 12; | ||
565 | } | ||
566 | |||
567 | tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD; | ||
568 | } | ||
569 | |||
570 | static int amiga_hwclk(int op, struct hwclk_time *t) | ||
571 | { | ||
572 | if (AMIGAHW_PRESENT(A3000_CLK)) { | ||
573 | volatile struct tod3000 *tod = TOD_3000; | ||
574 | |||
575 | tod->cntrl1 = TOD3000_CNTRL1_HOLD; | ||
576 | |||
577 | if (!op) { /* read */ | ||
578 | t->sec = tod->second1 * 10 + tod->second2; | ||
579 | t->min = tod->minute1 * 10 + tod->minute2; | ||
580 | t->hour = tod->hour1 * 10 + tod->hour2; | ||
581 | t->day = tod->day1 * 10 + tod->day2; | ||
582 | t->wday = tod->weekday; | ||
583 | t->mon = tod->month1 * 10 + tod->month2 - 1; | ||
584 | t->year = tod->year1 * 10 + tod->year2; | ||
585 | if (t->year <= 69) | ||
586 | t->year += 100; | ||
587 | } else { | ||
588 | tod->second1 = t->sec / 10; | ||
589 | tod->second2 = t->sec % 10; | ||
590 | tod->minute1 = t->min / 10; | ||
591 | tod->minute2 = t->min % 10; | ||
592 | tod->hour1 = t->hour / 10; | ||
593 | tod->hour2 = t->hour % 10; | ||
594 | tod->day1 = t->day / 10; | ||
595 | tod->day2 = t->day % 10; | ||
596 | if (t->wday != -1) | ||
597 | tod->weekday = t->wday; | ||
598 | tod->month1 = (t->mon + 1) / 10; | ||
599 | tod->month2 = (t->mon + 1) % 10; | ||
600 | if (t->year >= 100) | ||
601 | t->year -= 100; | ||
602 | tod->year1 = t->year / 10; | ||
603 | tod->year2 = t->year % 10; | ||
604 | } | ||
605 | |||
606 | tod->cntrl1 = TOD3000_CNTRL1_FREE; | ||
607 | } else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ { | ||
608 | volatile struct tod2000 *tod = TOD_2000; | ||
609 | |||
610 | tod->cntrl1 = TOD2000_CNTRL1_HOLD; | ||
611 | |||
612 | while (tod->cntrl1 & TOD2000_CNTRL1_BUSY) | ||
613 | ; | ||
614 | |||
615 | if (!op) { /* read */ | ||
616 | t->sec = tod->second1 * 10 + tod->second2; | ||
617 | t->min = tod->minute1 * 10 + tod->minute2; | ||
618 | t->hour = (tod->hour1 & 3) * 10 + tod->hour2; | ||
619 | t->day = tod->day1 * 10 + tod->day2; | ||
620 | t->wday = tod->weekday; | ||
621 | t->mon = tod->month1 * 10 + tod->month2 - 1; | ||
622 | t->year = tod->year1 * 10 + tod->year2; | ||
623 | if (t->year <= 69) | ||
624 | t->year += 100; | ||
625 | |||
626 | if (!(tod->cntrl3 & TOD2000_CNTRL3_24HMODE)){ | ||
627 | if (!(tod->hour1 & TOD2000_HOUR1_PM) && t->hour == 12) | ||
628 | t->hour = 0; | ||
629 | else if ((tod->hour1 & TOD2000_HOUR1_PM) && t->hour != 12) | ||
630 | t->hour += 12; | ||
631 | } | ||
632 | } else { | ||
633 | tod->second1 = t->sec / 10; | ||
634 | tod->second2 = t->sec % 10; | ||
635 | tod->minute1 = t->min / 10; | ||
636 | tod->minute2 = t->min % 10; | ||
637 | if (tod->cntrl3 & TOD2000_CNTRL3_24HMODE) | ||
638 | tod->hour1 = t->hour / 10; | ||
639 | else if (t->hour >= 12) | ||
640 | tod->hour1 = TOD2000_HOUR1_PM + | ||
641 | (t->hour - 12) / 10; | ||
642 | else | ||
643 | tod->hour1 = t->hour / 10; | ||
644 | tod->hour2 = t->hour % 10; | ||
645 | tod->day1 = t->day / 10; | ||
646 | tod->day2 = t->day % 10; | ||
647 | if (t->wday != -1) | ||
648 | tod->weekday = t->wday; | ||
649 | tod->month1 = (t->mon + 1) / 10; | ||
650 | tod->month2 = (t->mon + 1) % 10; | ||
651 | if (t->year >= 100) | ||
652 | t->year -= 100; | ||
653 | tod->year1 = t->year / 10; | ||
654 | tod->year2 = t->year % 10; | ||
655 | } | ||
656 | |||
657 | tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD; | ||
658 | } | ||
659 | |||
660 | return 0; | ||
661 | } | ||
662 | |||
663 | static int amiga_set_clock_mmss (unsigned long nowtime) | ||
664 | { | ||
665 | short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60; | ||
666 | |||
667 | if (AMIGAHW_PRESENT(A3000_CLK)) { | ||
668 | volatile struct tod3000 *tod = TOD_3000; | ||
669 | |||
670 | tod->cntrl1 = TOD3000_CNTRL1_HOLD; | ||
671 | |||
672 | tod->second1 = real_seconds / 10; | ||
673 | tod->second2 = real_seconds % 10; | ||
674 | tod->minute1 = real_minutes / 10; | ||
675 | tod->minute2 = real_minutes % 10; | ||
676 | |||
677 | tod->cntrl1 = TOD3000_CNTRL1_FREE; | ||
678 | } else /* if (AMIGAHW_PRESENT(A2000_CLK)) */ { | ||
679 | volatile struct tod2000 *tod = TOD_2000; | ||
680 | |||
681 | tod->cntrl1 = TOD2000_CNTRL1_HOLD; | ||
682 | |||
683 | while (tod->cntrl1 & TOD2000_CNTRL1_BUSY) | ||
684 | ; | ||
685 | |||
686 | tod->second1 = real_seconds / 10; | ||
687 | tod->second2 = real_seconds % 10; | ||
688 | tod->minute1 = real_minutes / 10; | ||
689 | tod->minute2 = real_minutes % 10; | ||
690 | |||
691 | tod->cntrl1 &= ~TOD2000_CNTRL1_HOLD; | ||
692 | } | ||
693 | |||
694 | return 0; | ||
695 | } | ||
696 | |||
697 | static NORET_TYPE void amiga_reset( void ) | ||
698 | ATTRIB_NORET; | ||
699 | |||
700 | static void amiga_reset (void) | ||
701 | { | ||
702 | for (;;); | ||
703 | } | ||
704 | |||
705 | |||
706 | /* | ||
707 | * Debugging | ||
708 | */ | ||
709 | |||
710 | #define SAVEKMSG_MAXMEM 128*1024 | ||
711 | |||
712 | #define SAVEKMSG_MAGIC1 0x53415645 /* 'SAVE' */ | ||
713 | #define SAVEKMSG_MAGIC2 0x4B4D5347 /* 'KMSG' */ | ||
714 | |||
715 | struct savekmsg { | ||
716 | unsigned long magic1; /* SAVEKMSG_MAGIC1 */ | ||
717 | unsigned long magic2; /* SAVEKMSG_MAGIC2 */ | ||
718 | unsigned long magicptr; /* address of magic1 */ | ||
719 | unsigned long size; | ||
720 | char data[0]; | ||
721 | }; | ||
722 | |||
723 | static struct savekmsg *savekmsg = NULL; | ||
724 | |||
725 | static void amiga_mem_console_write(struct console *co, const char *s, | ||
726 | unsigned int count) | ||
727 | { | ||
728 | if (savekmsg->size+count <= SAVEKMSG_MAXMEM-sizeof(struct savekmsg)) { | ||
729 | memcpy(savekmsg->data+savekmsg->size, s, count); | ||
730 | savekmsg->size += count; | ||
731 | } | ||
732 | } | ||
733 | |||
734 | static void amiga_savekmsg_init(void) | ||
735 | { | ||
736 | static struct resource debug_res = { "Debug" }; | ||
737 | |||
738 | savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res); | ||
739 | savekmsg->magic1 = SAVEKMSG_MAGIC1; | ||
740 | savekmsg->magic2 = SAVEKMSG_MAGIC2; | ||
741 | savekmsg->magicptr = virt_to_phys(savekmsg); | ||
742 | savekmsg->size = 0; | ||
743 | } | ||
744 | |||
745 | static void amiga_serial_putc(char c) | ||
746 | { | ||
747 | amiga_custom.serdat = (unsigned char)c | 0x100; | ||
748 | mb(); | ||
749 | while (!(amiga_custom.serdatr & 0x2000)) | ||
750 | ; | ||
751 | } | ||
752 | |||
753 | void amiga_serial_console_write(struct console *co, const char *s, | ||
754 | unsigned int count) | ||
755 | { | ||
756 | #if 0 /* def CONFIG_KGDB */ | ||
757 | /* FIXME:APUS GDB doesn't seem to like O-packages before it is | ||
758 | properly connected with the target. */ | ||
759 | __gdb_output_string (s, count); | ||
760 | #else | ||
761 | while (count--) { | ||
762 | if (*s == '\n') | ||
763 | amiga_serial_putc('\r'); | ||
764 | amiga_serial_putc(*s++); | ||
765 | } | ||
766 | #endif | ||
767 | } | ||
768 | |||
769 | #ifdef CONFIG_SERIAL_CONSOLE | ||
770 | void amiga_serial_puts(const char *s) | ||
771 | { | ||
772 | amiga_serial_console_write(NULL, s, strlen(s)); | ||
773 | } | ||
774 | |||
775 | int amiga_serial_console_wait_key(struct console *co) | ||
776 | { | ||
777 | int ch; | ||
778 | |||
779 | while (!(amiga_custom.intreqr & IF_RBF)) | ||
780 | barrier(); | ||
781 | ch = amiga_custom.serdatr & 0xff; | ||
782 | /* clear the interrupt, so that another character can be read */ | ||
783 | amiga_custom.intreq = IF_RBF; | ||
784 | return ch; | ||
785 | } | ||
786 | |||
787 | void amiga_serial_gets(struct console *co, char *s, int len) | ||
788 | { | ||
789 | int ch, cnt = 0; | ||
790 | |||
791 | while (1) { | ||
792 | ch = amiga_serial_console_wait_key(co); | ||
793 | |||
794 | /* Check for backspace. */ | ||
795 | if (ch == 8 || ch == 127) { | ||
796 | if (cnt == 0) { | ||
797 | amiga_serial_putc('\007'); | ||
798 | continue; | ||
799 | } | ||
800 | cnt--; | ||
801 | amiga_serial_puts("\010 \010"); | ||
802 | continue; | ||
803 | } | ||
804 | |||
805 | /* Check for enter. */ | ||
806 | if (ch == 10 || ch == 13) | ||
807 | break; | ||
808 | |||
809 | /* See if line is too long. */ | ||
810 | if (cnt >= len + 1) { | ||
811 | amiga_serial_putc(7); | ||
812 | cnt--; | ||
813 | continue; | ||
814 | } | ||
815 | |||
816 | /* Store and echo character. */ | ||
817 | s[cnt++] = ch; | ||
818 | amiga_serial_putc(ch); | ||
819 | } | ||
820 | /* Print enter. */ | ||
821 | amiga_serial_puts("\r\n"); | ||
822 | s[cnt] = 0; | ||
823 | } | ||
824 | #endif | ||
825 | |||
826 | static void __init amiga_debug_init(void) | ||
827 | { | ||
828 | if (!strcmp( m68k_debug_device, "ser" )) { | ||
829 | /* no initialization required (?) */ | ||
830 | amiga_console_driver.write = amiga_serial_console_write; | ||
831 | register_console(&amiga_console_driver); | ||
832 | } | ||
833 | } | ||
834 | |||
835 | #ifdef CONFIG_HEARTBEAT | ||
836 | static void amiga_heartbeat(int on) | ||
837 | { | ||
838 | if (on) | ||
839 | ciaa.pra &= ~2; | ||
840 | else | ||
841 | ciaa.pra |= 2; | ||
842 | } | ||
843 | #endif | ||
844 | |||
845 | /* | ||
846 | * Amiga specific parts of /proc | ||
847 | */ | ||
848 | |||
849 | static void amiga_get_model(char *model) | ||
850 | { | ||
851 | strcpy(model, amiga_model_name); | ||
852 | } | ||
853 | |||
854 | |||
855 | static int amiga_get_hardware_list(char *buffer) | ||
856 | { | ||
857 | int len = 0; | ||
858 | |||
859 | if (AMIGAHW_PRESENT(CHIP_RAM)) | ||
860 | len += sprintf(buffer+len, "Chip RAM:\t%ldK\n", amiga_chip_size>>10); | ||
861 | len += sprintf(buffer+len, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n", | ||
862 | amiga_psfreq, amiga_eclock); | ||
863 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { | ||
864 | char *type; | ||
865 | switch(amiga_chipset) { | ||
866 | case CS_OCS: | ||
867 | type = "OCS"; | ||
868 | break; | ||
869 | case CS_ECS: | ||
870 | type = "ECS"; | ||
871 | break; | ||
872 | case CS_AGA: | ||
873 | type = "AGA"; | ||
874 | break; | ||
875 | default: | ||
876 | type = "Old or Unknown"; | ||
877 | break; | ||
878 | } | ||
879 | len += sprintf(buffer+len, "Graphics:\t%s\n", type); | ||
880 | } | ||
881 | |||
882 | #define AMIGAHW_ANNOUNCE(name, str) \ | ||
883 | if (AMIGAHW_PRESENT(name)) \ | ||
884 | len += sprintf (buffer+len, "\t%s\n", str) | ||
885 | |||
886 | len += sprintf (buffer + len, "Detected hardware:\n"); | ||
887 | |||
888 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); | ||
889 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); | ||
890 | AMIGAHW_ANNOUNCE(AMBER_FF, "Amber Flicker Fixer"); | ||
891 | AMIGAHW_ANNOUNCE(AMI_AUDIO, "Amiga Audio"); | ||
892 | AMIGAHW_ANNOUNCE(AMI_FLOPPY, "Floppy Controller"); | ||
893 | AMIGAHW_ANNOUNCE(A3000_SCSI, "SCSI Controller WD33C93 (A3000 style)"); | ||
894 | AMIGAHW_ANNOUNCE(A4000_SCSI, "SCSI Controller NCR53C710 (A4000T style)"); | ||
895 | AMIGAHW_ANNOUNCE(A1200_IDE, "IDE Interface (A1200 style)"); | ||
896 | AMIGAHW_ANNOUNCE(A4000_IDE, "IDE Interface (A4000 style)"); | ||
897 | AMIGAHW_ANNOUNCE(CD_ROM, "Internal CD ROM drive"); | ||
898 | AMIGAHW_ANNOUNCE(AMI_KEYBOARD, "Keyboard"); | ||
899 | AMIGAHW_ANNOUNCE(AMI_MOUSE, "Mouse Port"); | ||
900 | AMIGAHW_ANNOUNCE(AMI_SERIAL, "Serial Port"); | ||
901 | AMIGAHW_ANNOUNCE(AMI_PARALLEL, "Parallel Port"); | ||
902 | AMIGAHW_ANNOUNCE(A2000_CLK, "Hardware Clock (A2000 style)"); | ||
903 | AMIGAHW_ANNOUNCE(A3000_CLK, "Hardware Clock (A3000 style)"); | ||
904 | AMIGAHW_ANNOUNCE(CHIP_RAM, "Chip RAM"); | ||
905 | AMIGAHW_ANNOUNCE(PAULA, "Paula 8364"); | ||
906 | AMIGAHW_ANNOUNCE(DENISE, "Denise 8362"); | ||
907 | AMIGAHW_ANNOUNCE(DENISE_HR, "Denise 8373"); | ||
908 | AMIGAHW_ANNOUNCE(LISA, "Lisa 8375"); | ||
909 | AMIGAHW_ANNOUNCE(AGNUS_PAL, "Normal/Fat PAL Agnus 8367/8371"); | ||
910 | AMIGAHW_ANNOUNCE(AGNUS_NTSC, "Normal/Fat NTSC Agnus 8361/8370"); | ||
911 | AMIGAHW_ANNOUNCE(AGNUS_HR_PAL, "Fat Hires PAL Agnus 8372"); | ||
912 | AMIGAHW_ANNOUNCE(AGNUS_HR_NTSC, "Fat Hires NTSC Agnus 8372"); | ||
913 | AMIGAHW_ANNOUNCE(ALICE_PAL, "PAL Alice 8374"); | ||
914 | AMIGAHW_ANNOUNCE(ALICE_NTSC, "NTSC Alice 8374"); | ||
915 | AMIGAHW_ANNOUNCE(MAGIC_REKICK, "Magic Hard Rekick"); | ||
916 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); | ||
917 | if (AMIGAHW_PRESENT(ZORRO)) | ||
918 | len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion " | ||
919 | "Device%s\n", | ||
920 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", | ||
921 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); | ||
922 | |||
923 | #undef AMIGAHW_ANNOUNCE | ||
924 | |||
925 | return(len); | ||
926 | } | ||
927 | |||
928 | #ifdef CONFIG_APUS | ||
929 | int get_hardware_list(char *buffer) | ||
930 | { | ||
931 | extern int get_cpuinfo(char *buffer); | ||
932 | int len = 0; | ||
933 | char model[80]; | ||
934 | u_long mem; | ||
935 | int i; | ||
936 | |||
937 | if (mach_get_model) | ||
938 | mach_get_model(model); | ||
939 | else | ||
940 | strcpy(model, "Unknown PowerPC"); | ||
941 | |||
942 | len += sprintf(buffer+len, "Model:\t\t%s\n", model); | ||
943 | len += get_cpuinfo(buffer+len); | ||
944 | for (mem = 0, i = 0; i < m68k_realnum_memory; i++) | ||
945 | mem += m68k_memory[i].size; | ||
946 | len += sprintf(buffer+len, "System Memory:\t%ldK\n", mem>>10); | ||
947 | |||
948 | if (mach_get_hardware_list) | ||
949 | len += mach_get_hardware_list(buffer+len); | ||
950 | |||
951 | return(len); | ||
952 | } | ||
953 | #endif | ||
diff --git a/arch/ppc/amiga/ints.c b/arch/ppc/amiga/ints.c deleted file mode 100644 index 083a17462190..000000000000 --- a/arch/ppc/amiga/ints.c +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* | ||
2 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c | ||
3 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. | ||
4 | */ | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | #include <linux/sched.h> | ||
8 | #include <linux/kernel_stat.h> | ||
9 | #include <linux/errno.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/seq_file.h> | ||
12 | |||
13 | #include <asm/setup.h> | ||
14 | #include <asm/system.h> | ||
15 | #include <asm/irq.h> | ||
16 | #include <asm/traps.h> | ||
17 | #include <asm/page.h> | ||
18 | #include <asm/machdep.h> | ||
19 | |||
20 | /* table for system interrupt handlers */ | ||
21 | static irq_handler_t irq_list[SYS_IRQS]; | ||
22 | |||
23 | static const char *default_names[SYS_IRQS] = { | ||
24 | "spurious int", "int1 handler", "int2 handler", "int3 handler", | ||
25 | "int4 handler", "int5 handler", "int6 handler", "int7 handler" | ||
26 | }; | ||
27 | |||
28 | /* The number of spurious interrupts */ | ||
29 | volatile unsigned int num_spurious; | ||
30 | |||
31 | #define NUM_IRQ_NODES 100 | ||
32 | static irq_node_t nodes[NUM_IRQ_NODES]; | ||
33 | |||
34 | |||
35 | /* | ||
36 | * void init_IRQ(void) | ||
37 | * | ||
38 | * Parameters: None | ||
39 | * | ||
40 | * Returns: Nothing | ||
41 | * | ||
42 | * This function should be called during kernel startup to initialize | ||
43 | * the IRQ handling routines. | ||
44 | */ | ||
45 | |||
46 | __init | ||
47 | void m68k_init_IRQ(void) | ||
48 | { | ||
49 | int i; | ||
50 | |||
51 | for (i = 0; i < SYS_IRQS; i++) { | ||
52 | if (mach_default_handler) | ||
53 | irq_list[i].handler = (*mach_default_handler)[i]; | ||
54 | irq_list[i].flags = 0; | ||
55 | irq_list[i].dev_id = NULL; | ||
56 | irq_list[i].devname = default_names[i]; | ||
57 | } | ||
58 | |||
59 | for (i = 0; i < NUM_IRQ_NODES; i++) | ||
60 | nodes[i].handler = NULL; | ||
61 | |||
62 | mach_init_IRQ (); | ||
63 | } | ||
64 | |||
65 | irq_node_t *new_irq_node(void) | ||
66 | { | ||
67 | irq_node_t *node; | ||
68 | short i; | ||
69 | |||
70 | for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) | ||
71 | if (!node->handler) | ||
72 | return node; | ||
73 | |||
74 | printk ("new_irq_node: out of nodes\n"); | ||
75 | return NULL; | ||
76 | } | ||
77 | |||
78 | int sys_request_irq(unsigned int irq, | ||
79 | void (*handler)(int, void *, struct pt_regs *), | ||
80 | unsigned long flags, const char *devname, void *dev_id) | ||
81 | { | ||
82 | if (irq < IRQ1 || irq > IRQ7) { | ||
83 | printk("%s: Incorrect IRQ %d from %s\n", | ||
84 | __FUNCTION__, irq, devname); | ||
85 | return -ENXIO; | ||
86 | } | ||
87 | |||
88 | #if 0 | ||
89 | if (!(irq_list[irq].flags & IRQ_FLG_STD)) { | ||
90 | if (irq_list[irq].flags & IRQ_FLG_LOCK) { | ||
91 | printk("%s: IRQ %d from %s is not replaceable\n", | ||
92 | __FUNCTION__, irq, irq_list[irq].devname); | ||
93 | return -EBUSY; | ||
94 | } | ||
95 | if (!(flags & IRQ_FLG_REPLACE)) { | ||
96 | printk("%s: %s can't replace IRQ %d from %s\n", | ||
97 | __FUNCTION__, devname, irq, irq_list[irq].devname); | ||
98 | return -EBUSY; | ||
99 | } | ||
100 | } | ||
101 | #endif | ||
102 | |||
103 | irq_list[irq].handler = handler; | ||
104 | irq_list[irq].flags = flags; | ||
105 | irq_list[irq].dev_id = dev_id; | ||
106 | irq_list[irq].devname = devname; | ||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | void sys_free_irq(unsigned int irq, void *dev_id) | ||
111 | { | ||
112 | if (irq < IRQ1 || irq > IRQ7) { | ||
113 | printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); | ||
114 | return; | ||
115 | } | ||
116 | |||
117 | if (irq_list[irq].dev_id != dev_id) | ||
118 | printk("%s: Removing probably wrong IRQ %d from %s\n", | ||
119 | __FUNCTION__, irq, irq_list[irq].devname); | ||
120 | |||
121 | irq_list[irq].handler = (*mach_default_handler)[irq]; | ||
122 | irq_list[irq].flags = 0; | ||
123 | irq_list[irq].dev_id = NULL; | ||
124 | irq_list[irq].devname = default_names[irq]; | ||
125 | } | ||
126 | |||
127 | asmlinkage void process_int(unsigned long vec, struct pt_regs *fp) | ||
128 | { | ||
129 | if (vec >= VEC_INT1 && vec <= VEC_INT7 && !MACH_IS_BVME6000) { | ||
130 | vec -= VEC_SPUR; | ||
131 | kstat_cpu(0).irqs[vec]++; | ||
132 | irq_list[vec].handler(vec, irq_list[vec].dev_id, fp); | ||
133 | } else { | ||
134 | if (mach_process_int) | ||
135 | mach_process_int(vec, fp); | ||
136 | else | ||
137 | panic("Can't process interrupt vector %ld\n", vec); | ||
138 | return; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | int m68k_get_irq_list(struct seq_file *p, void *v) | ||
143 | { | ||
144 | int i; | ||
145 | |||
146 | /* autovector interrupts */ | ||
147 | if (mach_default_handler) { | ||
148 | for (i = 0; i < SYS_IRQS; i++) { | ||
149 | seq_printf(p, "auto %2d: %10u ", i, | ||
150 | i ? kstat_cpu(0).irqs[i] : num_spurious); | ||
151 | seq_puts(p, " "); | ||
152 | seq_printf(p, "%s\n", irq_list[i].devname); | ||
153 | } | ||
154 | } | ||
155 | |||
156 | mach_get_irq_list(p, v); | ||
157 | return 0; | ||
158 | } | ||
diff --git a/arch/ppc/amiga/pcmcia.c b/arch/ppc/amiga/pcmcia.c deleted file mode 100644 index 5d29dc65093c..000000000000 --- a/arch/ppc/amiga/pcmcia.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "../../m68k/amiga/pcmcia.c" | ||
diff --git a/arch/ppc/amiga/time.c b/arch/ppc/amiga/time.c deleted file mode 100644 index 8c880c0ca380..000000000000 --- a/arch/ppc/amiga/time.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | #include <linux/errno.h> | ||
2 | #include <linux/sched.h> | ||
3 | #include <linux/kernel.h> | ||
4 | #include <linux/param.h> | ||
5 | #include <linux/string.h> | ||
6 | #include <linux/mm.h> | ||
7 | |||
8 | #include <asm/machdep.h> | ||
9 | #include <asm/io.h> | ||
10 | |||
11 | #include <linux/timex.h> | ||
12 | |||
13 | unsigned long m68k_get_rtc_time(void) | ||
14 | { | ||
15 | unsigned int year, mon, day, hour, min, sec; | ||
16 | |||
17 | extern void arch_gettod(int *year, int *mon, int *day, int *hour, | ||
18 | int *min, int *sec); | ||
19 | |||
20 | arch_gettod (&year, &mon, &day, &hour, &min, &sec); | ||
21 | |||
22 | if ((year += 1900) < 1970) | ||
23 | year += 100; | ||
24 | |||
25 | return mktime(year, mon, day, hour, min, sec); | ||
26 | } | ||
27 | |||
28 | int m68k_set_rtc_time(unsigned long nowtime) | ||
29 | { | ||
30 | if (mach_set_clock_mmss) | ||
31 | return mach_set_clock_mmss (nowtime); | ||
32 | return -1; | ||
33 | } | ||
34 | |||
35 | void apus_heartbeat (void) | ||
36 | { | ||
37 | #ifdef CONFIG_HEARTBEAT | ||
38 | static unsigned cnt = 0, period = 0, dist = 0; | ||
39 | |||
40 | if (cnt == 0 || cnt == dist) | ||
41 | mach_heartbeat( 1 ); | ||
42 | else if (cnt == 7 || cnt == dist+7) | ||
43 | mach_heartbeat( 0 ); | ||
44 | |||
45 | if (++cnt > period) { | ||
46 | cnt = 0; | ||
47 | /* The hyperbolic function below modifies the heartbeat period | ||
48 | * length in dependency of the current (5min) load. It goes | ||
49 | * through the points f(0)=126, f(1)=86, f(5)=51, | ||
50 | * f(inf)->30. */ | ||
51 | period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30; | ||
52 | dist = period / 4; | ||
53 | } | ||
54 | #endif | ||
55 | /* should be made smarter */ | ||
56 | ppc_md.heartbeat_count = 1; | ||
57 | } | ||
diff --git a/arch/ppc/configs/apus_defconfig b/arch/ppc/configs/apus_defconfig deleted file mode 100644 index e2245252d31f..000000000000 --- a/arch/ppc/configs/apus_defconfig +++ /dev/null | |||
@@ -1,920 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | # CONFIG_EMBEDDED is not set | ||
22 | CONFIG_FUTEX=y | ||
23 | CONFIG_EPOLL=y | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | CONFIG_6xx=y | ||
41 | # CONFIG_40x is not set | ||
42 | # CONFIG_POWER3 is not set | ||
43 | # CONFIG_8xx is not set | ||
44 | |||
45 | # | ||
46 | # IBM 4xx options | ||
47 | # | ||
48 | # CONFIG_8260 is not set | ||
49 | CONFIG_GENERIC_ISA_DMA=y | ||
50 | CONFIG_PPC_STD_MMU=y | ||
51 | CONFIG_SERIAL_CONSOLE=y | ||
52 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
53 | CONFIG_APUS=y | ||
54 | # CONFIG_WILLOW_2 is not set | ||
55 | # CONFIG_PCORE is not set | ||
56 | # CONFIG_POWERPMC250 is not set | ||
57 | # CONFIG_EV64260 is not set | ||
58 | # CONFIG_SPRUCE is not set | ||
59 | # CONFIG_LOPEC is not set | ||
60 | # CONFIG_MCPN765 is not set | ||
61 | # CONFIG_MVME5100 is not set | ||
62 | # CONFIG_PPLUS is not set | ||
63 | # CONFIG_PRPMC750 is not set | ||
64 | # CONFIG_PRPMC800 is not set | ||
65 | # CONFIG_SANDPOINT is not set | ||
66 | # CONFIG_ADIR is not set | ||
67 | # CONFIG_K2 is not set | ||
68 | # CONFIG_PAL4 is not set | ||
69 | # CONFIG_GEMINI is not set | ||
70 | # CONFIG_SMP is not set | ||
71 | # CONFIG_PREEMPT is not set | ||
72 | # CONFIG_ALTIVEC is not set | ||
73 | # CONFIG_TAU is not set | ||
74 | # CONFIG_CPU_FREQ is not set | ||
75 | |||
76 | # | ||
77 | # General setup | ||
78 | # | ||
79 | # CONFIG_HIGHMEM is not set | ||
80 | CONFIG_PCI=y | ||
81 | CONFIG_PCI_DOMAINS=y | ||
82 | CONFIG_PCI_PERMEDIA=y | ||
83 | CONFIG_KCORE_ELF=y | ||
84 | CONFIG_BINFMT_ELF=y | ||
85 | CONFIG_KERNEL_ELF=y | ||
86 | CONFIG_BINFMT_MISC=m | ||
87 | CONFIG_PCI_LEGACY_PROC=y | ||
88 | CONFIG_PCI_NAMES=y | ||
89 | # CONFIG_HOTPLUG is not set | ||
90 | |||
91 | # | ||
92 | # Parallel port support | ||
93 | # | ||
94 | CONFIG_PARPORT=m | ||
95 | # CONFIG_PARPORT_PC is not set | ||
96 | CONFIG_PARPORT_AMIGA=m | ||
97 | # CONFIG_PARPORT_MFC3 is not set | ||
98 | # CONFIG_PARPORT_OTHER is not set | ||
99 | # CONFIG_PARPORT_1284 is not set | ||
100 | CONFIG_PPC601_SYNC_FIX=y | ||
101 | # CONFIG_CMDLINE_BOOL is not set | ||
102 | CONFIG_AMIGA=y | ||
103 | CONFIG_ZORRO=y | ||
104 | CONFIG_ABSTRACT_CONSOLE=y | ||
105 | CONFIG_APUS_FAST_EXCEPT=y | ||
106 | CONFIG_AMIGA_PCMCIA=y | ||
107 | CONFIG_AMIGA_BUILTIN_SERIAL=y | ||
108 | CONFIG_GVPIOEXT=y | ||
109 | CONFIG_GVPIOEXT_LP=m | ||
110 | CONFIG_GVPIOEXT_PLIP=m | ||
111 | CONFIG_MULTIFACE_III_TTY=y | ||
112 | CONFIG_A2232=y | ||
113 | CONFIG_WHIPPET_SERIAL=y | ||
114 | CONFIG_APNE=y | ||
115 | CONFIG_HEARTBEAT=y | ||
116 | CONFIG_PROC_HARDWARE=y | ||
117 | CONFIG_ZORRO_NAMES=y | ||
118 | |||
119 | # | ||
120 | # Advanced setup | ||
121 | # | ||
122 | # CONFIG_ADVANCED_OPTIONS is not set | ||
123 | |||
124 | # | ||
125 | # Default settings for advanced configuration options are used | ||
126 | # | ||
127 | CONFIG_HIGHMEM_START=0xfe000000 | ||
128 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
129 | CONFIG_KERNEL_START=0xc0000000 | ||
130 | CONFIG_TASK_SIZE=0x80000000 | ||
131 | CONFIG_BOOT_LOAD=0x00800000 | ||
132 | |||
133 | # | ||
134 | # Memory Technology Devices (MTD) | ||
135 | # | ||
136 | # CONFIG_MTD is not set | ||
137 | |||
138 | # | ||
139 | # Plug and Play support | ||
140 | # | ||
141 | # CONFIG_PNP is not set | ||
142 | |||
143 | # | ||
144 | # Block devices | ||
145 | # | ||
146 | # CONFIG_BLK_DEV_FD is not set | ||
147 | CONFIG_AMIGA_FLOPPY=y | ||
148 | CONFIG_AMIGA_Z2RAM=m | ||
149 | # CONFIG_PARIDE is not set | ||
150 | # CONFIG_BLK_CPQ_DA is not set | ||
151 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
152 | # CONFIG_BLK_DEV_DAC960 is not set | ||
153 | # CONFIG_BLK_DEV_UMEM is not set | ||
154 | CONFIG_BLK_DEV_LOOP=y | ||
155 | CONFIG_BLK_DEV_NBD=m | ||
156 | CONFIG_BLK_DEV_RAM=y | ||
157 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
158 | CONFIG_BLK_DEV_INITRD=y | ||
159 | |||
160 | # | ||
161 | # Multi-device support (RAID and LVM) | ||
162 | # | ||
163 | CONFIG_MD=y | ||
164 | CONFIG_BLK_DEV_MD=m | ||
165 | CONFIG_MD_LINEAR=m | ||
166 | CONFIG_MD_RAID0=m | ||
167 | CONFIG_MD_RAID1=m | ||
168 | CONFIG_MD_RAID5=m | ||
169 | # CONFIG_MD_MULTIPATH is not set | ||
170 | CONFIG_BLK_DEV_DM=m | ||
171 | |||
172 | # | ||
173 | # ATA/IDE/MFM/RLL support | ||
174 | # | ||
175 | CONFIG_IDE=y | ||
176 | |||
177 | # | ||
178 | # IDE, ATA and ATAPI Block devices | ||
179 | # | ||
180 | CONFIG_BLK_DEV_IDE=y | ||
181 | |||
182 | # | ||
183 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
184 | # | ||
185 | # CONFIG_BLK_DEV_HD is not set | ||
186 | CONFIG_BLK_DEV_IDEDISK=y | ||
187 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
188 | # CONFIG_IDEDISK_STROKE is not set | ||
189 | CONFIG_BLK_DEV_IDECD=y | ||
190 | CONFIG_BLK_DEV_IDEFLOPPY=y | ||
191 | CONFIG_BLK_DEV_IDESCSI=m | ||
192 | # CONFIG_IDE_TASK_IOCTL is not set | ||
193 | |||
194 | # | ||
195 | # IDE chipset support/bugfixes | ||
196 | # | ||
197 | # CONFIG_BLK_DEV_IDEPCI is not set | ||
198 | CONFIG_BLK_DEV_GAYLE=y | ||
199 | CONFIG_BLK_DEV_IDEDOUBLER=y | ||
200 | CONFIG_BLK_DEV_BUDDHA=y | ||
201 | |||
202 | # | ||
203 | # SCSI support | ||
204 | # | ||
205 | CONFIG_SCSI=y | ||
206 | |||
207 | # | ||
208 | # SCSI support type (disk, tape, CD-ROM) | ||
209 | # | ||
210 | CONFIG_BLK_DEV_SD=y | ||
211 | CONFIG_CHR_DEV_ST=m | ||
212 | CONFIG_CHR_DEV_OSST=m | ||
213 | CONFIG_BLK_DEV_SR=y | ||
214 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
215 | CONFIG_CHR_DEV_SG=m | ||
216 | |||
217 | # | ||
218 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
219 | # | ||
220 | # CONFIG_SCSI_MULTI_LUN is not set | ||
221 | # CONFIG_SCSI_REPORT_LUNS is not set | ||
222 | CONFIG_SCSI_CONSTANTS=y | ||
223 | CONFIG_SCSI_LOGGING=y | ||
224 | |||
225 | # | ||
226 | # SCSI low-level drivers | ||
227 | # | ||
228 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
229 | # CONFIG_SCSI_ACARD is not set | ||
230 | # CONFIG_SCSI_AACRAID is not set | ||
231 | # CONFIG_SCSI_AIC7XXX is not set | ||
232 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
233 | # CONFIG_SCSI_AIC79XX is not set | ||
234 | # CONFIG_SCSI_DPT_I2O is not set | ||
235 | # CONFIG_SCSI_ADVANSYS is not set | ||
236 | # CONFIG_SCSI_IN2000 is not set | ||
237 | # CONFIG_SCSI_AM53C974 is not set | ||
238 | # CONFIG_SCSI_MEGARAID is not set | ||
239 | # CONFIG_SCSI_BUSLOGIC is not set | ||
240 | # CONFIG_SCSI_CPQFCTS is not set | ||
241 | # CONFIG_SCSI_DMX3191D is not set | ||
242 | # CONFIG_SCSI_EATA is not set | ||
243 | # CONFIG_SCSI_EATA_PIO is not set | ||
244 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
245 | # CONFIG_SCSI_GDTH is not set | ||
246 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | ||
247 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set | ||
248 | # CONFIG_SCSI_INITIO is not set | ||
249 | # CONFIG_SCSI_INIA100 is not set | ||
250 | # CONFIG_SCSI_PPA is not set | ||
251 | # CONFIG_SCSI_IMM is not set | ||
252 | # CONFIG_SCSI_NCR53C7xx is not set | ||
253 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
254 | # CONFIG_SCSI_NCR53C8XX is not set | ||
255 | # CONFIG_SCSI_SYM53C8XX is not set | ||
256 | # CONFIG_SCSI_PCI2000 is not set | ||
257 | # CONFIG_SCSI_PCI2220I is not set | ||
258 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
259 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
260 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
261 | # CONFIG_SCSI_DC395x is not set | ||
262 | # CONFIG_SCSI_DC390T is not set | ||
263 | # CONFIG_SCSI_U14_34F is not set | ||
264 | # CONFIG_SCSI_NSP32 is not set | ||
265 | # CONFIG_SCSI_DEBUG is not set | ||
266 | CONFIG_A3000_SCSI=y | ||
267 | CONFIG_A4000T_SCSI=y | ||
268 | CONFIG_A2091_SCSI=y | ||
269 | CONFIG_GVP11_SCSI=y | ||
270 | CONFIG_CYBERSTORM_SCSI=y | ||
271 | CONFIG_CYBERSTORMII_SCSI=y | ||
272 | CONFIG_BLZ2060_SCSI=y | ||
273 | CONFIG_BLZ1230_SCSI=y | ||
274 | CONFIG_FASTLANE_SCSI=y | ||
275 | CONFIG_A4091_SCSI=y | ||
276 | CONFIG_WARPENGINE_SCSI=y | ||
277 | CONFIG_BLZ603EPLUS_SCSI=y | ||
278 | CONFIG_OKTAGON_SCSI=y | ||
279 | |||
280 | # | ||
281 | # Fusion MPT device support | ||
282 | # | ||
283 | # CONFIG_FUSION is not set | ||
284 | |||
285 | # | ||
286 | # IEEE 1394 (FireWire) support (EXPERIMENTAL) | ||
287 | # | ||
288 | # CONFIG_IEEE1394 is not set | ||
289 | |||
290 | # | ||
291 | # I2O device support | ||
292 | # | ||
293 | # CONFIG_I2O is not set | ||
294 | |||
295 | # | ||
296 | # Networking support | ||
297 | # | ||
298 | CONFIG_NET=y | ||
299 | |||
300 | # | ||
301 | # Networking options | ||
302 | # | ||
303 | CONFIG_PACKET=m | ||
304 | CONFIG_PACKET_MMAP=y | ||
305 | CONFIG_NETLINK_DEV=m | ||
306 | CONFIG_NETFILTER=y | ||
307 | # CONFIG_NETFILTER_DEBUG is not set | ||
308 | CONFIG_UNIX=y | ||
309 | # CONFIG_NET_KEY is not set | ||
310 | CONFIG_INET=y | ||
311 | # CONFIG_IP_MULTICAST is not set | ||
312 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
313 | # CONFIG_IP_PNP is not set | ||
314 | # CONFIG_NET_IPIP is not set | ||
315 | # CONFIG_NET_IPGRE is not set | ||
316 | # CONFIG_ARPD is not set | ||
317 | # CONFIG_INET_ECN is not set | ||
318 | CONFIG_SYN_COOKIES=y | ||
319 | # CONFIG_INET_AH is not set | ||
320 | # CONFIG_INET_ESP is not set | ||
321 | # CONFIG_INET_IPCOMP is not set | ||
322 | |||
323 | # | ||
324 | # IP: Netfilter Configuration | ||
325 | # | ||
326 | CONFIG_IP_NF_CONNTRACK=m | ||
327 | CONFIG_IP_NF_FTP=m | ||
328 | CONFIG_IP_NF_IRC=m | ||
329 | CONFIG_IP_NF_TFTP=m | ||
330 | CONFIG_IP_NF_AMANDA=m | ||
331 | CONFIG_IP_NF_QUEUE=m | ||
332 | CONFIG_IP_NF_IPTABLES=m | ||
333 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
334 | CONFIG_IP_NF_MATCH_MAC=m | ||
335 | # CONFIG_IP_NF_MATCH_PKTTYPE is not set | ||
336 | CONFIG_IP_NF_MATCH_MARK=m | ||
337 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
338 | CONFIG_IP_NF_MATCH_TOS=m | ||
339 | # CONFIG_IP_NF_MATCH_ECN is not set | ||
340 | # CONFIG_IP_NF_MATCH_DSCP is not set | ||
341 | # CONFIG_IP_NF_MATCH_AH_ESP is not set | ||
342 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
343 | CONFIG_IP_NF_MATCH_TTL=m | ||
344 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
345 | CONFIG_IP_NF_MATCH_HELPER=m | ||
346 | CONFIG_IP_NF_MATCH_STATE=m | ||
347 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
348 | CONFIG_IP_NF_MATCH_UNCLEAN=m | ||
349 | CONFIG_IP_NF_MATCH_OWNER=m | ||
350 | CONFIG_IP_NF_FILTER=m | ||
351 | CONFIG_IP_NF_TARGET_REJECT=m | ||
352 | CONFIG_IP_NF_TARGET_MIRROR=m | ||
353 | CONFIG_IP_NF_NAT=m | ||
354 | CONFIG_IP_NF_NAT_NEEDED=y | ||
355 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
356 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
357 | CONFIG_IP_NF_NAT_SNMP_BASIC=m | ||
358 | CONFIG_IP_NF_NAT_IRC=m | ||
359 | CONFIG_IP_NF_NAT_FTP=m | ||
360 | CONFIG_IP_NF_NAT_TFTP=m | ||
361 | CONFIG_IP_NF_NAT_AMANDA=m | ||
362 | CONFIG_IP_NF_MANGLE=m | ||
363 | CONFIG_IP_NF_TARGET_TOS=m | ||
364 | CONFIG_IP_NF_TARGET_ECN=m | ||
365 | CONFIG_IP_NF_TARGET_DSCP=m | ||
366 | CONFIG_IP_NF_TARGET_MARK=m | ||
367 | CONFIG_IP_NF_TARGET_LOG=m | ||
368 | CONFIG_IP_NF_TARGET_ULOG=m | ||
369 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
370 | CONFIG_IP_NF_ARPTABLES=m | ||
371 | CONFIG_IP_NF_ARPFILTER=m | ||
372 | CONFIG_IP_NF_COMPAT_IPCHAINS=m | ||
373 | # CONFIG_IP_NF_COMPAT_IPFWADM is not set | ||
374 | # CONFIG_IPV6 is not set | ||
375 | # CONFIG_XFRM_USER is not set | ||
376 | |||
377 | # | ||
378 | # SCTP Configuration (EXPERIMENTAL) | ||
379 | # | ||
380 | CONFIG_IPV6_SCTP__=y | ||
381 | # CONFIG_IP_SCTP is not set | ||
382 | # CONFIG_ATM is not set | ||
383 | # CONFIG_VLAN_8021Q is not set | ||
384 | # CONFIG_LLC is not set | ||
385 | # CONFIG_DECNET is not set | ||
386 | # CONFIG_BRIDGE is not set | ||
387 | # CONFIG_X25 is not set | ||
388 | # CONFIG_LAPB is not set | ||
389 | # CONFIG_NET_DIVERT is not set | ||
390 | # CONFIG_ECONET is not set | ||
391 | # CONFIG_WAN_ROUTER is not set | ||
392 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
393 | |||
394 | # | ||
395 | # QoS and/or fair queueing | ||
396 | # | ||
397 | # CONFIG_NET_SCHED is not set | ||
398 | |||
399 | # | ||
400 | # Network testing | ||
401 | # | ||
402 | # CONFIG_NET_PKTGEN is not set | ||
403 | CONFIG_NETDEVICES=y | ||
404 | |||
405 | # | ||
406 | # ARCnet devices | ||
407 | # | ||
408 | # CONFIG_ARCNET is not set | ||
409 | CONFIG_DUMMY=m | ||
410 | # CONFIG_BONDING is not set | ||
411 | # CONFIG_EQUALIZER is not set | ||
412 | CONFIG_TUN=m | ||
413 | # CONFIG_ETHERTAP is not set | ||
414 | |||
415 | # | ||
416 | # Ethernet (10 or 100Mbit) | ||
417 | # | ||
418 | CONFIG_NET_ETHERNET=y | ||
419 | # CONFIG_MII is not set | ||
420 | # CONFIG_OAKNET is not set | ||
421 | CONFIG_ARIADNE=y | ||
422 | # CONFIG_ZORRO8390 is not set | ||
423 | CONFIG_A2065=y | ||
424 | CONFIG_HYDRA=y | ||
425 | # CONFIG_HAPPYMEAL is not set | ||
426 | # CONFIG_SUNGEM is not set | ||
427 | # CONFIG_NET_VENDOR_3COM is not set | ||
428 | |||
429 | # | ||
430 | # Tulip family network device support | ||
431 | # | ||
432 | # CONFIG_NET_TULIP is not set | ||
433 | # CONFIG_HP100 is not set | ||
434 | # CONFIG_NET_PCI is not set | ||
435 | |||
436 | # | ||
437 | # Ethernet (1000 Mbit) | ||
438 | # | ||
439 | # CONFIG_ACENIC is not set | ||
440 | # CONFIG_DL2K is not set | ||
441 | # CONFIG_E1000 is not set | ||
442 | # CONFIG_NS83820 is not set | ||
443 | # CONFIG_HAMACHI is not set | ||
444 | # CONFIG_YELLOWFIN is not set | ||
445 | # CONFIG_R8169 is not set | ||
446 | # CONFIG_SK98LIN is not set | ||
447 | # CONFIG_TIGON3 is not set | ||
448 | |||
449 | # | ||
450 | # Ethernet (10000 Mbit) | ||
451 | # | ||
452 | # CONFIG_IXGB is not set | ||
453 | # CONFIG_FDDI is not set | ||
454 | # CONFIG_HIPPI is not set | ||
455 | CONFIG_PLIP=m | ||
456 | CONFIG_PPP=y | ||
457 | CONFIG_PPP_MULTILINK=y | ||
458 | CONFIG_PPP_FILTER=y | ||
459 | CONFIG_PPP_ASYNC=y | ||
460 | CONFIG_PPP_SYNC_TTY=y | ||
461 | CONFIG_PPP_DEFLATE=y | ||
462 | CONFIG_PPP_BSDCOMP=y | ||
463 | CONFIG_PPPOE=y | ||
464 | CONFIG_SLIP=y | ||
465 | CONFIG_SLIP_COMPRESSED=y | ||
466 | CONFIG_SLIP_SMART=y | ||
467 | CONFIG_SLIP_MODE_SLIP6=y | ||
468 | |||
469 | # | ||
470 | # Wireless LAN (non-hamradio) | ||
471 | # | ||
472 | # CONFIG_NET_RADIO is not set | ||
473 | |||
474 | # | ||
475 | # Token Ring devices (depends on LLC=y) | ||
476 | # | ||
477 | # CONFIG_NET_FC is not set | ||
478 | # CONFIG_RCPCI is not set | ||
479 | # CONFIG_SHAPER is not set | ||
480 | |||
481 | # | ||
482 | # Wan interfaces | ||
483 | # | ||
484 | # CONFIG_WAN is not set | ||
485 | |||
486 | # | ||
487 | # Amateur Radio support | ||
488 | # | ||
489 | # CONFIG_HAMRADIO is not set | ||
490 | |||
491 | # | ||
492 | # IrDA (infrared) support | ||
493 | # | ||
494 | # CONFIG_IRDA is not set | ||
495 | |||
496 | # | ||
497 | # ISDN subsystem | ||
498 | # | ||
499 | # CONFIG_ISDN_BOOL is not set | ||
500 | |||
501 | # | ||
502 | # Graphics support | ||
503 | # | ||
504 | CONFIG_FB=y | ||
505 | # CONFIG_FB_CIRRUS is not set | ||
506 | CONFIG_FB_PM2=y | ||
507 | # CONFIG_FB_PM2_FIFO_DISCONNECT is not set | ||
508 | # CONFIG_FB_PM2_PCI is not set | ||
509 | CONFIG_FB_PM2_CVPPC=y | ||
510 | CONFIG_FB_CYBER2000=y | ||
511 | CONFIG_FB_AMIGA=y | ||
512 | CONFIG_FB_AMIGA_OCS=y | ||
513 | CONFIG_FB_AMIGA_ECS=y | ||
514 | CONFIG_FB_AMIGA_AGA=y | ||
515 | CONFIG_FB_CYBER=y | ||
516 | CONFIG_FB_VIRGE=y | ||
517 | CONFIG_FB_RETINAZ3=y | ||
518 | CONFIG_FB_FM2=y | ||
519 | # CONFIG_FB_CT65550 is not set | ||
520 | # CONFIG_FB_IMSTT is not set | ||
521 | # CONFIG_FB_S3TRIO is not set | ||
522 | # CONFIG_FB_VGA16 is not set | ||
523 | # CONFIG_FB_RIVA is not set | ||
524 | # CONFIG_FB_MATROX is not set | ||
525 | # CONFIG_FB_RADEON is not set | ||
526 | # CONFIG_FB_ATY128 is not set | ||
527 | # CONFIG_FB_ATY is not set | ||
528 | # CONFIG_FB_SIS is not set | ||
529 | # CONFIG_FB_NEOMAGIC is not set | ||
530 | # CONFIG_FB_3DFX is not set | ||
531 | # CONFIG_FB_VOODOO1 is not set | ||
532 | # CONFIG_FB_TRIDENT is not set | ||
533 | # CONFIG_FB_PM3 is not set | ||
534 | # CONFIG_FB_VIRTUAL is not set | ||
535 | |||
536 | # | ||
537 | # Logo configuration | ||
538 | # | ||
539 | CONFIG_LOGO=y | ||
540 | CONFIG_LOGO_LINUX_MONO=y | ||
541 | CONFIG_LOGO_LINUX_VGA16=y | ||
542 | CONFIG_LOGO_LINUX_CLUT224=y | ||
543 | |||
544 | # | ||
545 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
546 | # | ||
547 | # CONFIG_CD_NO_IDESCSI is not set | ||
548 | |||
549 | # | ||
550 | # Input device support | ||
551 | # | ||
552 | CONFIG_INPUT=m | ||
553 | |||
554 | # | ||
555 | # Userland interfaces | ||
556 | # | ||
557 | CONFIG_INPUT_MOUSEDEV=m | ||
558 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
559 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
560 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
561 | CONFIG_INPUT_JOYDEV=m | ||
562 | # CONFIG_INPUT_TSDEV is not set | ||
563 | CONFIG_INPUT_EVDEV=m | ||
564 | CONFIG_INPUT_EVBUG=m | ||
565 | |||
566 | # | ||
567 | # Input I/O drivers | ||
568 | # | ||
569 | # CONFIG_GAMEPORT is not set | ||
570 | CONFIG_SOUND_GAMEPORT=y | ||
571 | CONFIG_SERIO=y | ||
572 | # CONFIG_SERIO_I8042 is not set | ||
573 | CONFIG_SERIO_SERPORT=y | ||
574 | # CONFIG_SERIO_CT82C710 is not set | ||
575 | # CONFIG_SERIO_PARKBD is not set | ||
576 | |||
577 | # | ||
578 | # Input Device Drivers | ||
579 | # | ||
580 | CONFIG_INPUT_KEYBOARD=y | ||
581 | CONFIG_KEYBOARD_ATKBD=m | ||
582 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
583 | # CONFIG_KEYBOARD_XTKBD is not set | ||
584 | # CONFIG_KEYBOARD_NEWTON is not set | ||
585 | CONFIG_KEYBOARD_AMIGA=m | ||
586 | CONFIG_INPUT_MOUSE=y | ||
587 | CONFIG_MOUSE_PS2=m | ||
588 | CONFIG_MOUSE_SERIAL=m | ||
589 | CONFIG_MOUSE_AMIGA=m | ||
590 | # CONFIG_INPUT_JOYSTICK is not set | ||
591 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
592 | CONFIG_INPUT_MISC=y | ||
593 | # CONFIG_INPUT_PCSPKR is not set | ||
594 | CONFIG_INPUT_UINPUT=m | ||
595 | |||
596 | # | ||
597 | # Macintosh device drivers | ||
598 | # | ||
599 | |||
600 | # | ||
601 | # Character devices | ||
602 | # | ||
603 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
604 | |||
605 | # | ||
606 | # Serial drivers | ||
607 | # | ||
608 | # CONFIG_SERIAL_8250 is not set | ||
609 | |||
610 | # | ||
611 | # Non-8250 serial port support | ||
612 | # | ||
613 | CONFIG_UNIX98_PTYS=y | ||
614 | CONFIG_UNIX98_PTY_COUNT=256 | ||
615 | CONFIG_PRINTER=m | ||
616 | # CONFIG_LP_CONSOLE is not set | ||
617 | # CONFIG_PPDEV is not set | ||
618 | # CONFIG_TIPAR is not set | ||
619 | |||
620 | # | ||
621 | # I2C support | ||
622 | # | ||
623 | # CONFIG_I2C is not set | ||
624 | |||
625 | # | ||
626 | # I2C Hardware Sensors Mainboard support | ||
627 | # | ||
628 | |||
629 | # | ||
630 | # I2C Hardware Sensors Chip support | ||
631 | # | ||
632 | # CONFIG_I2C_SENSOR is not set | ||
633 | |||
634 | # | ||
635 | # Mice | ||
636 | # | ||
637 | CONFIG_BUSMOUSE=y | ||
638 | # CONFIG_QIC02_TAPE is not set | ||
639 | |||
640 | # | ||
641 | # IPMI | ||
642 | # | ||
643 | # CONFIG_IPMI_HANDLER is not set | ||
644 | |||
645 | # | ||
646 | # Watchdog Cards | ||
647 | # | ||
648 | # CONFIG_WATCHDOG is not set | ||
649 | # CONFIG_NVRAM is not set | ||
650 | CONFIG_GEN_RTC=y | ||
651 | # CONFIG_GEN_RTC_X is not set | ||
652 | # CONFIG_DTLK is not set | ||
653 | # CONFIG_R3964 is not set | ||
654 | # CONFIG_APPLICOM is not set | ||
655 | |||
656 | # | ||
657 | # Ftape, the floppy tape device driver | ||
658 | # | ||
659 | # CONFIG_FTAPE is not set | ||
660 | # CONFIG_AGP is not set | ||
661 | # CONFIG_DRM is not set | ||
662 | # CONFIG_RAW_DRIVER is not set | ||
663 | # CONFIG_HANGCHECK_TIMER is not set | ||
664 | |||
665 | # | ||
666 | # Multimedia devices | ||
667 | # | ||
668 | # CONFIG_VIDEO_DEV is not set | ||
669 | |||
670 | # | ||
671 | # Digital Video Broadcasting Devices | ||
672 | # | ||
673 | # CONFIG_DVB is not set | ||
674 | |||
675 | # | ||
676 | # File systems | ||
677 | # | ||
678 | CONFIG_EXT2_FS=y | ||
679 | # CONFIG_EXT2_FS_XATTR is not set | ||
680 | CONFIG_EXT3_FS=y | ||
681 | CONFIG_EXT3_FS_XATTR=y | ||
682 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
683 | # CONFIG_EXT3_FS_SECURITY is not set | ||
684 | CONFIG_JBD=y | ||
685 | # CONFIG_JBD_DEBUG is not set | ||
686 | CONFIG_FS_MBCACHE=y | ||
687 | # CONFIG_REISERFS_FS is not set | ||
688 | # CONFIG_JFS_FS is not set | ||
689 | # CONFIG_XFS_FS is not set | ||
690 | CONFIG_MINIX_FS=y | ||
691 | CONFIG_ROMFS_FS=y | ||
692 | # CONFIG_QUOTA is not set | ||
693 | CONFIG_AUTOFS_FS=m | ||
694 | CONFIG_AUTOFS4_FS=m | ||
695 | |||
696 | # | ||
697 | # CD-ROM/DVD Filesystems | ||
698 | # | ||
699 | CONFIG_ISO9660_FS=y | ||
700 | CONFIG_JOLIET=y | ||
701 | # CONFIG_ZISOFS is not set | ||
702 | # CONFIG_UDF_FS is not set | ||
703 | |||
704 | # | ||
705 | # DOS/FAT/NT Filesystems | ||
706 | # | ||
707 | CONFIG_FAT_FS=y | ||
708 | CONFIG_MSDOS_FS=y | ||
709 | CONFIG_VFAT_FS=y | ||
710 | # CONFIG_NTFS_FS is not set | ||
711 | |||
712 | # | ||
713 | # Pseudo filesystems | ||
714 | # | ||
715 | CONFIG_PROC_FS=y | ||
716 | # CONFIG_DEVFS_FS is not set | ||
717 | CONFIG_DEVPTS_FS=y | ||
718 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
719 | CONFIG_TMPFS=y | ||
720 | CONFIG_RAMFS=y | ||
721 | |||
722 | # | ||
723 | # Miscellaneous filesystems | ||
724 | # | ||
725 | # CONFIG_ADFS_FS is not set | ||
726 | CONFIG_AFFS_FS=y | ||
727 | CONFIG_HFS_FS=y | ||
728 | # CONFIG_BEFS_FS is not set | ||
729 | # CONFIG_BFS_FS is not set | ||
730 | # CONFIG_EFS_FS is not set | ||
731 | CONFIG_CRAMFS=y | ||
732 | # CONFIG_VXFS_FS is not set | ||
733 | # CONFIG_HPFS_FS is not set | ||
734 | # CONFIG_QNX4FS_FS is not set | ||
735 | # CONFIG_SYSV_FS is not set | ||
736 | # CONFIG_UFS_FS is not set | ||
737 | |||
738 | # | ||
739 | # Network File Systems | ||
740 | # | ||
741 | CONFIG_NFS_FS=y | ||
742 | CONFIG_NFS_V3=y | ||
743 | # CONFIG_NFS_V4 is not set | ||
744 | CONFIG_NFSD=m | ||
745 | CONFIG_NFSD_V3=y | ||
746 | # CONFIG_NFSD_V4 is not set | ||
747 | # CONFIG_NFSD_TCP is not set | ||
748 | CONFIG_LOCKD=y | ||
749 | CONFIG_LOCKD_V4=y | ||
750 | CONFIG_EXPORTFS=m | ||
751 | CONFIG_SUNRPC=y | ||
752 | # CONFIG_SUNRPC_GSS is not set | ||
753 | CONFIG_SMB_FS=m | ||
754 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
755 | # CONFIG_CIFS is not set | ||
756 | # CONFIG_NCP_FS is not set | ||
757 | CONFIG_CODA_FS=m | ||
758 | # CONFIG_INTERMEZZO_FS is not set | ||
759 | # CONFIG_AFS_FS is not set | ||
760 | |||
761 | # | ||
762 | # Partition Types | ||
763 | # | ||
764 | CONFIG_PARTITION_ADVANCED=y | ||
765 | # CONFIG_ACORN_PARTITION is not set | ||
766 | # CONFIG_OSF_PARTITION is not set | ||
767 | CONFIG_AMIGA_PARTITION=y | ||
768 | CONFIG_ATARI_PARTITION=y | ||
769 | # CONFIG_MAC_PARTITION is not set | ||
770 | CONFIG_MSDOS_PARTITION=y | ||
771 | CONFIG_BSD_DISKLABEL=y | ||
772 | # CONFIG_MINIX_SUBPARTITION is not set | ||
773 | CONFIG_SOLARIS_X86_PARTITION=y | ||
774 | CONFIG_UNIXWARE_DISKLABEL=y | ||
775 | # CONFIG_LDM_PARTITION is not set | ||
776 | # CONFIG_NEC98_PARTITION is not set | ||
777 | # CONFIG_SGI_PARTITION is not set | ||
778 | # CONFIG_ULTRIX_PARTITION is not set | ||
779 | # CONFIG_SUN_PARTITION is not set | ||
780 | # CONFIG_EFI_PARTITION is not set | ||
781 | CONFIG_SMB_NLS=y | ||
782 | CONFIG_NLS=y | ||
783 | |||
784 | # | ||
785 | # Native Language Support | ||
786 | # | ||
787 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
788 | CONFIG_NLS_CODEPAGE_437=m | ||
789 | CONFIG_NLS_CODEPAGE_737=m | ||
790 | CONFIG_NLS_CODEPAGE_775=m | ||
791 | CONFIG_NLS_CODEPAGE_850=m | ||
792 | CONFIG_NLS_CODEPAGE_852=m | ||
793 | CONFIG_NLS_CODEPAGE_855=m | ||
794 | CONFIG_NLS_CODEPAGE_857=m | ||
795 | CONFIG_NLS_CODEPAGE_860=m | ||
796 | CONFIG_NLS_CODEPAGE_861=m | ||
797 | CONFIG_NLS_CODEPAGE_862=m | ||
798 | CONFIG_NLS_CODEPAGE_863=m | ||
799 | CONFIG_NLS_CODEPAGE_864=m | ||
800 | CONFIG_NLS_CODEPAGE_865=m | ||
801 | CONFIG_NLS_CODEPAGE_866=m | ||
802 | CONFIG_NLS_CODEPAGE_869=m | ||
803 | CONFIG_NLS_CODEPAGE_936=m | ||
804 | CONFIG_NLS_CODEPAGE_950=m | ||
805 | CONFIG_NLS_CODEPAGE_932=m | ||
806 | CONFIG_NLS_CODEPAGE_949=m | ||
807 | CONFIG_NLS_CODEPAGE_874=m | ||
808 | CONFIG_NLS_ISO8859_8=m | ||
809 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
810 | CONFIG_NLS_CODEPAGE_1251=m | ||
811 | CONFIG_NLS_ISO8859_1=m | ||
812 | CONFIG_NLS_ISO8859_2=m | ||
813 | CONFIG_NLS_ISO8859_3=m | ||
814 | CONFIG_NLS_ISO8859_4=m | ||
815 | CONFIG_NLS_ISO8859_5=m | ||
816 | CONFIG_NLS_ISO8859_6=m | ||
817 | CONFIG_NLS_ISO8859_7=m | ||
818 | CONFIG_NLS_ISO8859_9=m | ||
819 | CONFIG_NLS_ISO8859_13=m | ||
820 | CONFIG_NLS_ISO8859_14=m | ||
821 | CONFIG_NLS_ISO8859_15=m | ||
822 | CONFIG_NLS_KOI8_R=m | ||
823 | CONFIG_NLS_KOI8_U=m | ||
824 | CONFIG_NLS_UTF8=m | ||
825 | |||
826 | # | ||
827 | # Sound | ||
828 | # | ||
829 | CONFIG_SOUND=y | ||
830 | CONFIG_DMASOUND_PAULA=m | ||
831 | CONFIG_DMASOUND=m | ||
832 | |||
833 | # | ||
834 | # Advanced Linux Sound Architecture | ||
835 | # | ||
836 | # CONFIG_SND is not set | ||
837 | |||
838 | # | ||
839 | # Open Sound System | ||
840 | # | ||
841 | CONFIG_SOUND_PRIME=m | ||
842 | # CONFIG_SOUND_BT878 is not set | ||
843 | # CONFIG_SOUND_CMPCI is not set | ||
844 | # CONFIG_SOUND_EMU10K1 is not set | ||
845 | # CONFIG_SOUND_FUSION is not set | ||
846 | # CONFIG_SOUND_CS4281 is not set | ||
847 | # CONFIG_SOUND_ES1370 is not set | ||
848 | # CONFIG_SOUND_ES1371 is not set | ||
849 | # CONFIG_SOUND_ESSSOLO1 is not set | ||
850 | # CONFIG_SOUND_MAESTRO is not set | ||
851 | # CONFIG_SOUND_MAESTRO3 is not set | ||
852 | # CONFIG_SOUND_ICH is not set | ||
853 | # CONFIG_SOUND_RME96XX is not set | ||
854 | # CONFIG_SOUND_SONICVIBES is not set | ||
855 | # CONFIG_SOUND_TRIDENT is not set | ||
856 | # CONFIG_SOUND_MSNDCLAS is not set | ||
857 | # CONFIG_SOUND_MSNDPIN is not set | ||
858 | # CONFIG_SOUND_VIA82CXXX is not set | ||
859 | CONFIG_SOUND_OSS=m | ||
860 | CONFIG_SOUND_TRACEINIT=y | ||
861 | CONFIG_SOUND_DMAP=y | ||
862 | # CONFIG_SOUND_AD1816 is not set | ||
863 | # CONFIG_SOUND_SGALAXY is not set | ||
864 | # CONFIG_SOUND_ADLIB is not set | ||
865 | # CONFIG_SOUND_ACI_MIXER is not set | ||
866 | # CONFIG_SOUND_CS4232 is not set | ||
867 | # CONFIG_SOUND_SSCAPE is not set | ||
868 | # CONFIG_SOUND_GUS is not set | ||
869 | CONFIG_SOUND_VMIDI=m | ||
870 | # CONFIG_SOUND_TRIX is not set | ||
871 | # CONFIG_SOUND_MSS is not set | ||
872 | # CONFIG_SOUND_MPU401 is not set | ||
873 | # CONFIG_SOUND_NM256 is not set | ||
874 | # CONFIG_SOUND_MAD16 is not set | ||
875 | # CONFIG_SOUND_PAS is not set | ||
876 | # CONFIG_SOUND_PSS is not set | ||
877 | # CONFIG_SOUND_SB is not set | ||
878 | # CONFIG_SOUND_AWE32_SYNTH is not set | ||
879 | # CONFIG_SOUND_WAVEFRONT is not set | ||
880 | # CONFIG_SOUND_MAUI is not set | ||
881 | # CONFIG_SOUND_YM3812 is not set | ||
882 | # CONFIG_SOUND_OPL3SA1 is not set | ||
883 | # CONFIG_SOUND_OPL3SA2 is not set | ||
884 | # CONFIG_SOUND_YMFPCI is not set | ||
885 | # CONFIG_SOUND_UART6850 is not set | ||
886 | # CONFIG_SOUND_AEDSP16 is not set | ||
887 | |||
888 | # | ||
889 | # USB support | ||
890 | # | ||
891 | # CONFIG_USB is not set | ||
892 | # CONFIG_USB_GADGET is not set | ||
893 | |||
894 | # | ||
895 | # Bluetooth support | ||
896 | # | ||
897 | # CONFIG_BT is not set | ||
898 | |||
899 | # | ||
900 | # Library routines | ||
901 | # | ||
902 | # CONFIG_CRC32 is not set | ||
903 | CONFIG_ZLIB_INFLATE=y | ||
904 | CONFIG_ZLIB_DEFLATE=y | ||
905 | |||
906 | # | ||
907 | # Kernel hacking | ||
908 | # | ||
909 | # CONFIG_DEBUG_KERNEL is not set | ||
910 | # CONFIG_KALLSYMS is not set | ||
911 | |||
912 | # | ||
913 | # Security options | ||
914 | # | ||
915 | # CONFIG_SECURITY is not set | ||
916 | |||
917 | # | ||
918 | # Cryptographic options | ||
919 | # | ||
920 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index c7cb9d5f24a3..1b0ec7202dd5 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S | |||
@@ -32,10 +32,6 @@ | |||
32 | #include <asm/ppc_asm.h> | 32 | #include <asm/ppc_asm.h> |
33 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | 34 | ||
35 | #ifdef CONFIG_APUS | ||
36 | #include <asm/amigappc.h> | ||
37 | #endif | ||
38 | |||
39 | /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ | 35 | /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ |
40 | #define LOAD_BAT(n, reg, RA, RB) \ | 36 | #define LOAD_BAT(n, reg, RA, RB) \ |
41 | /* see the comment for clear_bats() -- Cort */ \ | 37 | /* see the comment for clear_bats() -- Cort */ \ |
@@ -128,14 +124,6 @@ __start: | |||
128 | */ | 124 | */ |
129 | bl early_init | 125 | bl early_init |
130 | 126 | ||
131 | #ifdef CONFIG_APUS | ||
132 | /* On APUS the __va/__pa constants need to be set to the correct | ||
133 | * values before continuing. | ||
134 | */ | ||
135 | mr r4,r30 | ||
136 | bl fix_mem_constants | ||
137 | #endif /* CONFIG_APUS */ | ||
138 | |||
139 | /* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains | 127 | /* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains |
140 | * the physical address we are running at, returned by early_init() | 128 | * the physical address we are running at, returned by early_init() |
141 | */ | 129 | */ |
@@ -145,7 +133,7 @@ __after_mmu_off: | |||
145 | bl flush_tlbs | 133 | bl flush_tlbs |
146 | 134 | ||
147 | bl initial_bats | 135 | bl initial_bats |
148 | #if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) | 136 | #ifdef CONFIG_BOOTX_TEXT |
149 | bl setup_disp_bat | 137 | bl setup_disp_bat |
150 | #endif | 138 | #endif |
151 | 139 | ||
@@ -161,7 +149,6 @@ __after_mmu_off: | |||
161 | #endif /* CONFIG_6xx */ | 149 | #endif /* CONFIG_6xx */ |
162 | 150 | ||
163 | 151 | ||
164 | #ifndef CONFIG_APUS | ||
165 | /* | 152 | /* |
166 | * We need to run with _start at physical address 0. | 153 | * We need to run with _start at physical address 0. |
167 | * If the MMU is already turned on, we copy stuff to KERNELBASE, | 154 | * If the MMU is already turned on, we copy stuff to KERNELBASE, |
@@ -172,7 +159,7 @@ __after_mmu_off: | |||
172 | addis r4,r3,KERNELBASE@h /* current address of _start */ | 159 | addis r4,r3,KERNELBASE@h /* current address of _start */ |
173 | cmpwi 0,r4,0 /* are we already running at 0? */ | 160 | cmpwi 0,r4,0 /* are we already running at 0? */ |
174 | bne relocate_kernel | 161 | bne relocate_kernel |
175 | #endif /* CONFIG_APUS */ | 162 | |
176 | /* | 163 | /* |
177 | * we now have the 1st 16M of ram mapped with the bats. | 164 | * we now have the 1st 16M of ram mapped with the bats. |
178 | * prep needs the mmu to be turned on here, but pmac already has it on. | 165 | * prep needs the mmu to be turned on here, but pmac already has it on. |
@@ -812,85 +799,6 @@ copy_and_flush: | |||
812 | addi r6,r6,4 | 799 | addi r6,r6,4 |
813 | blr | 800 | blr |
814 | 801 | ||
815 | #ifdef CONFIG_APUS | ||
816 | /* | ||
817 | * On APUS the physical base address of the kernel is not known at compile | ||
818 | * time, which means the __pa/__va constants used are incorrect. In the | ||
819 | * __init section is recorded the virtual addresses of instructions using | ||
820 | * these constants, so all that has to be done is fix these before | ||
821 | * continuing the kernel boot. | ||
822 | * | ||
823 | * r4 = The physical address of the kernel base. | ||
824 | */ | ||
825 | fix_mem_constants: | ||
826 | mr r10,r4 | ||
827 | addis r10,r10,-KERNELBASE@h /* virt_to_phys constant */ | ||
828 | neg r11,r10 /* phys_to_virt constant */ | ||
829 | |||
830 | lis r12,__vtop_table_begin@h | ||
831 | ori r12,r12,__vtop_table_begin@l | ||
832 | add r12,r12,r10 /* table begin phys address */ | ||
833 | lis r13,__vtop_table_end@h | ||
834 | ori r13,r13,__vtop_table_end@l | ||
835 | add r13,r13,r10 /* table end phys address */ | ||
836 | subi r12,r12,4 | ||
837 | subi r13,r13,4 | ||
838 | 1: lwzu r14,4(r12) /* virt address of instruction */ | ||
839 | add r14,r14,r10 /* phys address of instruction */ | ||
840 | lwz r15,0(r14) /* instruction, now insert top */ | ||
841 | rlwimi r15,r10,16,16,31 /* half of vp const in low half */ | ||
842 | stw r15,0(r14) /* of instruction and restore. */ | ||
843 | dcbst r0,r14 /* write it to memory */ | ||
844 | sync | ||
845 | icbi r0,r14 /* flush the icache line */ | ||
846 | cmpw r12,r13 | ||
847 | bne 1b | ||
848 | sync /* additional sync needed on g4 */ | ||
849 | isync | ||
850 | |||
851 | /* | ||
852 | * Map the memory where the exception handlers will | ||
853 | * be copied to when hash constants have been patched. | ||
854 | */ | ||
855 | #ifdef CONFIG_APUS_FAST_EXCEPT | ||
856 | lis r8,0xfff0 | ||
857 | #else | ||
858 | lis r8,0 | ||
859 | #endif | ||
860 | ori r8,r8,0x2 /* 128KB, supervisor */ | ||
861 | mtspr SPRN_DBAT3U,r8 | ||
862 | mtspr SPRN_DBAT3L,r8 | ||
863 | |||
864 | lis r12,__ptov_table_begin@h | ||
865 | ori r12,r12,__ptov_table_begin@l | ||
866 | add r12,r12,r10 /* table begin phys address */ | ||
867 | lis r13,__ptov_table_end@h | ||
868 | ori r13,r13,__ptov_table_end@l | ||
869 | add r13,r13,r10 /* table end phys address */ | ||
870 | subi r12,r12,4 | ||
871 | subi r13,r13,4 | ||
872 | 1: lwzu r14,4(r12) /* virt address of instruction */ | ||
873 | add r14,r14,r10 /* phys address of instruction */ | ||
874 | lwz r15,0(r14) /* instruction, now insert top */ | ||
875 | rlwimi r15,r11,16,16,31 /* half of pv const in low half*/ | ||
876 | stw r15,0(r14) /* of instruction and restore. */ | ||
877 | dcbst r0,r14 /* write it to memory */ | ||
878 | sync | ||
879 | icbi r0,r14 /* flush the icache line */ | ||
880 | cmpw r12,r13 | ||
881 | bne 1b | ||
882 | |||
883 | sync /* additional sync needed on g4 */ | ||
884 | isync /* No speculative loading until now */ | ||
885 | blr | ||
886 | |||
887 | /*********************************************************************** | ||
888 | * Please note that on APUS the exception handlers are located at the | ||
889 | * physical address 0xfff0000. For this reason, the exception handlers | ||
890 | * cannot use relative branches to access the code below. | ||
891 | ***********************************************************************/ | ||
892 | #endif /* CONFIG_APUS */ | ||
893 | |||
894 | #ifdef CONFIG_SMP | 802 | #ifdef CONFIG_SMP |
895 | .globl __secondary_start_pmac_0 | 803 | .globl __secondary_start_pmac_0 |
896 | __secondary_start_pmac_0: | 804 | __secondary_start_pmac_0: |
@@ -1043,19 +951,6 @@ start_here: | |||
1043 | bl machine_init | 951 | bl machine_init |
1044 | bl MMU_init | 952 | bl MMU_init |
1045 | 953 | ||
1046 | #ifdef CONFIG_APUS | ||
1047 | /* Copy exception code to exception vector base on APUS. */ | ||
1048 | lis r4,KERNELBASE@h | ||
1049 | #ifdef CONFIG_APUS_FAST_EXCEPT | ||
1050 | lis r3,0xfff0 /* Copy to 0xfff00000 */ | ||
1051 | #else | ||
1052 | lis r3,0 /* Copy to 0x00000000 */ | ||
1053 | #endif | ||
1054 | li r5,0x4000 /* # bytes of memory to copy */ | ||
1055 | li r6,0 | ||
1056 | bl copy_and_flush /* copy the first 0x4000 bytes */ | ||
1057 | #endif /* CONFIG_APUS */ | ||
1058 | |||
1059 | /* | 954 | /* |
1060 | * Go back to running unmapped so we can load up new values | 955 | * Go back to running unmapped so we can load up new values |
1061 | * for SDR1 (hash table pointer) and the segment registers | 956 | * for SDR1 (hash table pointer) and the segment registers |
@@ -1232,11 +1127,7 @@ initial_bats: | |||
1232 | #else | 1127 | #else |
1233 | ori r8,r8,2 /* R/W access */ | 1128 | ori r8,r8,2 /* R/W access */ |
1234 | #endif /* CONFIG_SMP */ | 1129 | #endif /* CONFIG_SMP */ |
1235 | #ifdef CONFIG_APUS | ||
1236 | ori r11,r11,BL_8M<<2|0x2 /* set up 8MB BAT registers for 604 */ | ||
1237 | #else | ||
1238 | ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */ | 1130 | ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */ |
1239 | #endif /* CONFIG_APUS */ | ||
1240 | 1131 | ||
1241 | mtspr SPRN_DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ | 1132 | mtspr SPRN_DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ |
1242 | mtspr SPRN_DBAT0U,r11 /* bit in upper BAT register */ | 1133 | mtspr SPRN_DBAT0U,r11 /* bit in upper BAT register */ |
@@ -1245,7 +1136,7 @@ initial_bats: | |||
1245 | isync | 1136 | isync |
1246 | blr | 1137 | blr |
1247 | 1138 | ||
1248 | #if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) | 1139 | #ifdef CONFIG_BOOTX_TEXT |
1249 | setup_disp_bat: | 1140 | setup_disp_bat: |
1250 | /* | 1141 | /* |
1251 | * setup the display bat prepared for us in prom.c | 1142 | * setup the display bat prepared for us in prom.c |
@@ -1268,7 +1159,7 @@ setup_disp_bat: | |||
1268 | mtspr SPRN_IBAT3U,r11 | 1159 | mtspr SPRN_IBAT3U,r11 |
1269 | blr | 1160 | blr |
1270 | 1161 | ||
1271 | #endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */ | 1162 | #endif /* defined(CONFIG_BOOTX_TEXT) */ |
1272 | 1163 | ||
1273 | #ifdef CONFIG_8260 | 1164 | #ifdef CONFIG_8260 |
1274 | /* Jump into the system reset for the rom. | 1165 | /* Jump into the system reset for the rom. |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 63f0a987139b..22494ec123ea 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -60,8 +60,6 @@ long long __ashrdi3(long long, int); | |||
60 | long long __ashldi3(long long, int); | 60 | long long __ashldi3(long long, int); |
61 | long long __lshrdi3(long long, int); | 61 | long long __lshrdi3(long long, int); |
62 | 62 | ||
63 | extern unsigned long mm_ptov (unsigned long paddr); | ||
64 | |||
65 | EXPORT_SYMBOL(clear_pages); | 63 | EXPORT_SYMBOL(clear_pages); |
66 | EXPORT_SYMBOL(clear_user_page); | 64 | EXPORT_SYMBOL(clear_user_page); |
67 | EXPORT_SYMBOL(transfer_to_handler); | 65 | EXPORT_SYMBOL(transfer_to_handler); |
@@ -118,7 +116,6 @@ EXPORT_SYMBOL(_outsw_ns); | |||
118 | EXPORT_SYMBOL(_insl_ns); | 116 | EXPORT_SYMBOL(_insl_ns); |
119 | EXPORT_SYMBOL(_outsl_ns); | 117 | EXPORT_SYMBOL(_outsl_ns); |
120 | EXPORT_SYMBOL(iopa); | 118 | EXPORT_SYMBOL(iopa); |
121 | EXPORT_SYMBOL(mm_ptov); | ||
122 | EXPORT_SYMBOL(ioremap); | 119 | EXPORT_SYMBOL(ioremap); |
123 | #ifdef CONFIG_44x | 120 | #ifdef CONFIG_44x |
124 | EXPORT_SYMBOL(ioremap64); | 121 | EXPORT_SYMBOL(ioremap64); |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index 967c1ef59a6b..aac88c2f3db9 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
26 | #include <asm/bootinfo.h> | 26 | #include <asm/bootinfo.h> |
27 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
28 | #include <asm/amigappc.h> | ||
29 | #include <asm/smp.h> | 28 | #include <asm/smp.h> |
30 | #include <asm/elf.h> | 29 | #include <asm/elf.h> |
31 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S index c0aac3ff9e91..98c1212674f6 100644 --- a/arch/ppc/kernel/vmlinux.lds.S +++ b/arch/ppc/kernel/vmlinux.lds.S | |||
@@ -91,6 +91,8 @@ SECTIONS | |||
91 | . = ALIGN(8192); | 91 | . = ALIGN(8192); |
92 | .data.init_task : { *(.data.init_task) } | 92 | .data.init_task : { *(.data.init_task) } |
93 | 93 | ||
94 | NOTES | ||
95 | |||
94 | . = ALIGN(4096); | 96 | . = ALIGN(4096); |
95 | __init_begin = .; | 97 | __init_begin = .; |
96 | .init.text : { | 98 | .init.text : { |
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 35ebb6395ae3..1f51e6c94507 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
@@ -426,41 +426,3 @@ unsigned long iopa(unsigned long addr) | |||
426 | return(pa); | 426 | return(pa); |
427 | } | 427 | } |
428 | 428 | ||
429 | /* This is will find the virtual address for a physical one.... | ||
430 | * Swiped from APUS, could be dangerous :-). | ||
431 | * This is only a placeholder until I really find a way to make this | ||
432 | * work. -- Dan | ||
433 | */ | ||
434 | unsigned long | ||
435 | mm_ptov (unsigned long paddr) | ||
436 | { | ||
437 | unsigned long ret; | ||
438 | #if 0 | ||
439 | if (paddr < 16*1024*1024) | ||
440 | ret = ZTWO_VADDR(paddr); | ||
441 | else { | ||
442 | int i; | ||
443 | |||
444 | for (i = 0; i < kmap_chunk_count;){ | ||
445 | unsigned long phys = kmap_chunks[i++]; | ||
446 | unsigned long size = kmap_chunks[i++]; | ||
447 | unsigned long virt = kmap_chunks[i++]; | ||
448 | if (paddr >= phys | ||
449 | && paddr < (phys + size)){ | ||
450 | ret = virt + paddr - phys; | ||
451 | goto exit; | ||
452 | } | ||
453 | } | ||
454 | |||
455 | ret = (unsigned long) __va(paddr); | ||
456 | } | ||
457 | exit: | ||
458 | #ifdef DEBUGPV | ||
459 | printk ("PTOV(%lx)=%lx\n", paddr, ret); | ||
460 | #endif | ||
461 | #else | ||
462 | ret = (unsigned long)paddr + KERNELBASE; | ||
463 | #endif | ||
464 | return ret; | ||
465 | } | ||
466 | |||
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index e17fad470621..40f53fbe6d35 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -2,10 +2,6 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_APUS) += apus_setup.o | ||
6 | ifeq ($(CONFIG_APUS),y) | ||
7 | obj-$(CONFIG_PCI) += apus_pci.o | ||
8 | endif | ||
9 | obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o | 5 | obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o |
10 | obj-$(CONFIG_PREP_RESIDUAL) += residual.o | 6 | obj-$(CONFIG_PREP_RESIDUAL) += residual.o |
11 | obj-$(CONFIG_PQ2ADS) += pq2ads.o | 7 | obj-$(CONFIG_PQ2ADS) += pq2ads.o |
diff --git a/arch/ppc/platforms/apus_pci.c b/arch/ppc/platforms/apus_pci.c deleted file mode 100644 index dc165f0c8908..000000000000 --- a/arch/ppc/platforms/apus_pci.c +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) Michel Dänzer <michdaen@iiic.ethz.ch> | ||
3 | * | ||
4 | * APUS PCI routines. | ||
5 | * | ||
6 | * Currently, only B/CVisionPPC cards (Permedia2) are supported. | ||
7 | * | ||
8 | * Thanks to Geert Uytterhoeven for the idea: | ||
9 | * Read values from given config space(s) for the first devices, -1 otherwise | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifdef CONFIG_AMIGA | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/pci.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/init.h> | ||
20 | |||
21 | #include <asm/io.h> | ||
22 | #include <asm/pci-bridge.h> | ||
23 | #include <asm/machdep.h> | ||
24 | |||
25 | #include "apus_pci.h" | ||
26 | |||
27 | |||
28 | /* These definitions are mostly adapted from pm2fb.c */ | ||
29 | |||
30 | #undef APUS_PCI_MASTER_DEBUG | ||
31 | #ifdef APUS_PCI_MASTER_DEBUG | ||
32 | #define DPRINTK(a,b...) printk(KERN_DEBUG "apus_pci: %s: " a, __FUNCTION__ , ## b) | ||
33 | #else | ||
34 | #define DPRINTK(a,b...) | ||
35 | #endif | ||
36 | |||
37 | /* | ||
38 | * The _DEFINITIVE_ memory mapping/unmapping functions. | ||
39 | * This is due to the fact that they're changing soooo often... | ||
40 | */ | ||
41 | #define DEFW() wmb() | ||
42 | #define DEFR() rmb() | ||
43 | #define DEFRW() mb() | ||
44 | |||
45 | #define DEVNO(d) ((d)>>3) | ||
46 | #define FNNO(d) ((d)&7) | ||
47 | |||
48 | |||
49 | extern unsigned long powerup_PCI_present; | ||
50 | |||
51 | static struct pci_controller *apus_hose; | ||
52 | |||
53 | |||
54 | void *pci_io_base(unsigned int bus) | ||
55 | { | ||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | |||
60 | int | ||
61 | apus_pcibios_read_config(struct pci_bus *bus, int devfn, int offset, | ||
62 | int len, u32 *val) | ||
63 | { | ||
64 | int fnno = FNNO(devfn); | ||
65 | int devno = DEVNO(devfn); | ||
66 | volatile unsigned char *cfg_data; | ||
67 | |||
68 | if (bus->number > 0 || devno != 1) { | ||
69 | *val = ~0; | ||
70 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
71 | } | ||
72 | /* base address + function offset + offset ^ endianness conversion */ | ||
73 | /* XXX the fnno<<5 bit seems wacky -- paulus */ | ||
74 | cfg_data = apus_hose->cfg_data + (fnno<<5) + (offset ^ (len - 1)); | ||
75 | switch (len) { | ||
76 | case 1: | ||
77 | *val = readb(cfg_data); | ||
78 | break; | ||
79 | case 2: | ||
80 | *val = readw(cfg_data); | ||
81 | break; | ||
82 | default: | ||
83 | *val = readl(cfg_data); | ||
84 | break; | ||
85 | } | ||
86 | |||
87 | DPRINTK("read b: 0x%x, d: 0x%x, f: 0x%x, o: 0x%x, l: %d, v: 0x%x\n", | ||
88 | bus->number, devfn>>3, devfn&7, offset, len, *val); | ||
89 | return PCIBIOS_SUCCESSFUL; | ||
90 | } | ||
91 | |||
92 | int | ||
93 | apus_pcibios_write_config(struct pci_bus *bus, int devfn, int offset, | ||
94 | int len, u32 *val) | ||
95 | { | ||
96 | int fnno = FNNO(devfn); | ||
97 | int devno = DEVNO(devfn); | ||
98 | volatile unsigned char *cfg_data; | ||
99 | |||
100 | if (bus->number > 0 || devno != 1) { | ||
101 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
102 | } | ||
103 | /* base address + function offset + offset ^ endianness conversion */ | ||
104 | /* XXX the fnno<<5 bit seems wacky -- paulus */ | ||
105 | cfg_data = apus_hose->cfg_data + (fnno<<5) + (offset ^ (len - 1)); | ||
106 | switch (len) { | ||
107 | case 1: | ||
108 | writeb(val, cfg_data); DEFW(); | ||
109 | break; | ||
110 | case 2: | ||
111 | writew(val, cfg_data); DEFW(); | ||
112 | break; | ||
113 | default: | ||
114 | writel(val, cfg_data); DEFW(); | ||
115 | break; | ||
116 | } | ||
117 | |||
118 | DPRINTK("write b: 0x%x, d: 0x%x, f: 0x%x, o: 0x%x, l: %d, v: 0x%x\n", | ||
119 | bus->number, devfn>>3, devfn&7, offset, len, val); | ||
120 | return PCIBIOS_SUCCESSFUL; | ||
121 | } | ||
122 | |||
123 | static struct pci_ops apus_pci_ops = { | ||
124 | apus_pcibios_read_config, | ||
125 | apus_pcibios_write_config | ||
126 | }; | ||
127 | |||
128 | static struct resource pci_mem = { "B/CVisionPPC PCI mem", CVPPC_FB_APERTURE_ONE, CVPPC_PCI_CONFIG, IORESOURCE_MEM }; | ||
129 | |||
130 | void __init | ||
131 | apus_pcibios_fixup(void) | ||
132 | { | ||
133 | /* struct pci_dev *dev = pci_find_slot(0, 1<<3); | ||
134 | unsigned int reg, val, offset;*/ | ||
135 | |||
136 | /* FIXME: interrupt? */ | ||
137 | /*dev->interrupt = xxx;*/ | ||
138 | |||
139 | request_resource(&iomem_resource, &pci_mem); | ||
140 | printk("%s: PCI mem resource requested\n", __FUNCTION__); | ||
141 | } | ||
142 | |||
143 | static void __init apus_pcibios_fixup_bus(struct pci_bus *bus) | ||
144 | { | ||
145 | bus->resource[1] = &pci_mem; | ||
146 | } | ||
147 | |||
148 | |||
149 | /* | ||
150 | * This is from pm2fb.c again | ||
151 | * | ||
152 | * Check if PCI (B/CVisionPPC) is available, initialize it and set up | ||
153 | * the pcibios_* pointers | ||
154 | */ | ||
155 | |||
156 | |||
157 | void __init | ||
158 | apus_setup_pci_ptrs(void) | ||
159 | { | ||
160 | if (!powerup_PCI_present) { | ||
161 | DPRINTK("no PCI bridge detected\n"); | ||
162 | return; | ||
163 | } | ||
164 | DPRINTK("Phase5 B/CVisionPPC PCI bridge detected.\n"); | ||
165 | |||
166 | apus_hose = pcibios_alloc_controller(); | ||
167 | if (!apus_hose) { | ||
168 | printk("apus_pci: Can't allocate PCI controller structure\n"); | ||
169 | return; | ||
170 | } | ||
171 | |||
172 | if (!(apus_hose->cfg_data = ioremap(CVPPC_PCI_CONFIG, 256))) { | ||
173 | printk("apus_pci: unable to map PCI config region\n"); | ||
174 | return; | ||
175 | } | ||
176 | |||
177 | if (!(apus_hose->cfg_addr = ioremap(CSPPC_PCI_BRIDGE, 256))) { | ||
178 | printk("apus_pci: unable to map PCI bridge\n"); | ||
179 | return; | ||
180 | } | ||
181 | |||
182 | writel(CSPPCF_BRIDGE_BIG_ENDIAN, apus_hose->cfg_addr + CSPPC_BRIDGE_ENDIAN); | ||
183 | DEFW(); | ||
184 | |||
185 | writel(CVPPC_REGS_REGION, apus_hose->cfg_data+ PCI_BASE_ADDRESS_0); | ||
186 | DEFW(); | ||
187 | writel(CVPPC_FB_APERTURE_ONE, apus_hose->cfg_data + PCI_BASE_ADDRESS_1); | ||
188 | DEFW(); | ||
189 | writel(CVPPC_FB_APERTURE_TWO, apus_hose->cfg_data + PCI_BASE_ADDRESS_2); | ||
190 | DEFW(); | ||
191 | writel(CVPPC_ROM_ADDRESS, apus_hose->cfg_data + PCI_ROM_ADDRESS); | ||
192 | DEFW(); | ||
193 | |||
194 | writel(0xef000000 | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | | ||
195 | PCI_COMMAND_MASTER, apus_hose->cfg_data + PCI_COMMAND); | ||
196 | DEFW(); | ||
197 | |||
198 | apus_hose->first_busno = 0; | ||
199 | apus_hose->last_busno = 0; | ||
200 | apus_hose->ops = &apus_pci_ops; | ||
201 | ppc_md.pcibios_fixup = apus_pcibios_fixup; | ||
202 | ppc_md.pcibios_fixup_bus = apus_pcibios_fixup_bus; | ||
203 | |||
204 | return; | ||
205 | } | ||
206 | |||
207 | #endif /* CONFIG_AMIGA */ | ||
diff --git a/arch/ppc/platforms/apus_pci.h b/arch/ppc/platforms/apus_pci.h deleted file mode 100644 index f15974ae0189..000000000000 --- a/arch/ppc/platforms/apus_pci.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Phase5 CybervisionPPC (TVP4020) definitions for the Permedia2 framebuffer | ||
3 | * driver. | ||
4 | * | ||
5 | * Copyright (c) 1998-1999 Ilario Nardinocchi (nardinoc@CS.UniBO.IT) | ||
6 | * -------------------------------------------------------------------------- | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file README.legal in the main directory of this archive | ||
9 | * for more details. | ||
10 | */ | ||
11 | |||
12 | #ifndef APUS_PCI_H | ||
13 | #define APUS_PCI_H | ||
14 | |||
15 | |||
16 | #define CSPPC_PCI_BRIDGE 0xfffe0000 | ||
17 | #define CSPPC_BRIDGE_ENDIAN 0x0000 | ||
18 | #define CSPPC_BRIDGE_INT 0x0010 | ||
19 | |||
20 | #define CVPPC_PCI_CONFIG 0xfffc0000 | ||
21 | #define CVPPC_ROM_ADDRESS 0xe2000001 | ||
22 | #define CVPPC_REGS_REGION 0xef000000 | ||
23 | #define CVPPC_FB_APERTURE_ONE 0xe0000000 | ||
24 | #define CVPPC_FB_APERTURE_TWO 0xe1000000 | ||
25 | #define CVPPC_FB_SIZE 0x00800000 | ||
26 | |||
27 | /* CVPPC_BRIDGE_ENDIAN */ | ||
28 | #define CSPPCF_BRIDGE_BIG_ENDIAN 0x02 | ||
29 | |||
30 | /* CVPPC_BRIDGE_INT */ | ||
31 | #define CSPPCF_BRIDGE_ACTIVE_INT2 0x01 | ||
32 | |||
33 | |||
34 | #endif /* APUS_PCI_H */ | ||
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c deleted file mode 100644 index 063274d2c503..000000000000 --- a/arch/ppc/platforms/apus_setup.c +++ /dev/null | |||
@@ -1,798 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1998, 1999 Jesper Skov | ||
3 | * | ||
4 | * Basically what is needed to replace functionality found in | ||
5 | * arch/m68k allowing Amiga drivers to work under APUS. | ||
6 | * Bits of code and/or ideas from arch/m68k and arch/ppc files. | ||
7 | * | ||
8 | * TODO: | ||
9 | * This file needs a *really* good cleanup. Restructure and optimize. | ||
10 | * Make sure it can be compiled for non-APUS configs. Begin to move | ||
11 | * Amiga specific stuff into mach/amiga. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/sched.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/initrd.h> | ||
18 | #include <linux/seq_file.h> | ||
19 | |||
20 | /* Needs INITSERIAL call in head.S! */ | ||
21 | #undef APUS_DEBUG | ||
22 | |||
23 | #include <asm/bootinfo.h> | ||
24 | #include <asm/setup.h> | ||
25 | #include <asm/amigahw.h> | ||
26 | #include <asm/amigaints.h> | ||
27 | #include <asm/amigappc.h> | ||
28 | #include <asm/pgtable.h> | ||
29 | #include <asm/dma.h> | ||
30 | #include <asm/machdep.h> | ||
31 | #include <asm/time.h> | ||
32 | |||
33 | unsigned long m68k_machtype; | ||
34 | char debug_device[6] = ""; | ||
35 | |||
36 | extern void amiga_init_IRQ(void); | ||
37 | |||
38 | extern void apus_setup_pci_ptrs(void); | ||
39 | |||
40 | void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL; | ||
41 | /* machine dependent irq functions */ | ||
42 | void (*mach_init_IRQ) (void) __initdata = NULL; | ||
43 | void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL; | ||
44 | void (*mach_get_model) (char *model) = NULL; | ||
45 | int (*mach_get_hardware_list) (char *buffer) = NULL; | ||
46 | int (*mach_get_irq_list) (struct seq_file *, void *) = NULL; | ||
47 | void (*mach_process_int) (int, struct pt_regs *) = NULL; | ||
48 | /* machine dependent timer functions */ | ||
49 | unsigned long (*mach_gettimeoffset) (void); | ||
50 | void (*mach_gettod) (int*, int*, int*, int*, int*, int*); | ||
51 | int (*mach_hwclk) (int, struct hwclk_time*) = NULL; | ||
52 | int (*mach_set_clock_mmss) (unsigned long) = NULL; | ||
53 | void (*mach_reset)( void ); | ||
54 | long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ | ||
55 | #ifdef CONFIG_HEARTBEAT | ||
56 | void (*mach_heartbeat) (int) = NULL; | ||
57 | extern void apus_heartbeat (void); | ||
58 | #endif | ||
59 | |||
60 | extern unsigned long amiga_model; | ||
61 | extern unsigned decrementer_count;/* count value for 1e6/HZ microseconds */ | ||
62 | extern unsigned count_period_num; /* 1 decrementer count equals */ | ||
63 | extern unsigned count_period_den; /* count_period_num / count_period_den us */ | ||
64 | |||
65 | int num_memory = 0; | ||
66 | struct mem_info memory[NUM_MEMINFO];/* memory description */ | ||
67 | /* FIXME: Duplicate memory data to avoid conflicts with m68k shared code. */ | ||
68 | int m68k_realnum_memory = 0; | ||
69 | struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ | ||
70 | |||
71 | struct mem_info ramdisk; | ||
72 | |||
73 | extern void config_amiga(void); | ||
74 | |||
75 | static int __60nsram = 0; | ||
76 | |||
77 | /* for cpuinfo */ | ||
78 | static int __bus_speed = 0; | ||
79 | static int __speed_test_failed = 0; | ||
80 | |||
81 | /********************************************** COMPILE PROTECTION */ | ||
82 | /* Provide some stubs that links to Amiga specific functions. | ||
83 | * This allows CONFIG_APUS to be removed from generic PPC files while | ||
84 | * preventing link errors for other PPC targets. | ||
85 | */ | ||
86 | unsigned long apus_get_rtc_time(void) | ||
87 | { | ||
88 | #ifdef CONFIG_APUS | ||
89 | extern unsigned long m68k_get_rtc_time(void); | ||
90 | |||
91 | return m68k_get_rtc_time (); | ||
92 | #else | ||
93 | return 0; | ||
94 | #endif | ||
95 | } | ||
96 | |||
97 | int apus_set_rtc_time(unsigned long nowtime) | ||
98 | { | ||
99 | #ifdef CONFIG_APUS | ||
100 | extern int m68k_set_rtc_time(unsigned long nowtime); | ||
101 | |||
102 | return m68k_set_rtc_time (nowtime); | ||
103 | #else | ||
104 | return 0; | ||
105 | #endif | ||
106 | } | ||
107 | |||
108 | /*********************************************************** SETUP */ | ||
109 | /* From arch/m68k/kernel/setup.c. */ | ||
110 | void __init apus_setup_arch(void) | ||
111 | { | ||
112 | #ifdef CONFIG_APUS | ||
113 | extern char cmd_line[]; | ||
114 | int i; | ||
115 | char *p, *q; | ||
116 | |||
117 | /* Let m68k-shared code know it should do the Amiga thing. */ | ||
118 | m68k_machtype = MACH_AMIGA; | ||
119 | |||
120 | /* Parse the command line for arch-specific options. | ||
121 | * For the m68k, this is currently only "debug=xxx" to enable printing | ||
122 | * certain kernel messages to some machine-specific device. */ | ||
123 | for( p = cmd_line; p && *p; ) { | ||
124 | i = 0; | ||
125 | if (!strncmp( p, "debug=", 6 )) { | ||
126 | strlcpy( debug_device, p+6, sizeof(debug_device) ); | ||
127 | if ((q = strchr( debug_device, ' ' ))) *q = 0; | ||
128 | i = 1; | ||
129 | } else if (!strncmp( p, "60nsram", 7 )) { | ||
130 | APUS_WRITE (APUS_REG_WAITSTATE, | ||
131 | REGWAITSTATE_SETRESET | ||
132 | |REGWAITSTATE_PPCR | ||
133 | |REGWAITSTATE_PPCW); | ||
134 | __60nsram = 1; | ||
135 | i = 1; | ||
136 | } | ||
137 | |||
138 | if (i) { | ||
139 | /* option processed, delete it */ | ||
140 | if ((q = strchr( p, ' ' ))) | ||
141 | strcpy( p, q+1 ); | ||
142 | else | ||
143 | *p = 0; | ||
144 | } else { | ||
145 | if ((p = strchr( p, ' ' ))) ++p; | ||
146 | } | ||
147 | } | ||
148 | |||
149 | config_amiga(); | ||
150 | |||
151 | #if 0 /* Enable for logging - also include logging.o in Makefile rule */ | ||
152 | { | ||
153 | #define LOG_SIZE 4096 | ||
154 | void* base; | ||
155 | |||
156 | /* Throw away some memory - the P5 firmare stomps on top | ||
157 | * of CHIP memory during bootup. | ||
158 | */ | ||
159 | amiga_chip_alloc(0x1000); | ||
160 | |||
161 | base = amiga_chip_alloc(LOG_SIZE+sizeof(klog_data_t)); | ||
162 | LOG_INIT(base, base+sizeof(klog_data_t), LOG_SIZE); | ||
163 | } | ||
164 | #endif | ||
165 | #endif | ||
166 | } | ||
167 | |||
168 | int | ||
169 | apus_show_cpuinfo(struct seq_file *m) | ||
170 | { | ||
171 | extern int __map_without_bats; | ||
172 | extern unsigned long powerup_PCI_present; | ||
173 | |||
174 | seq_printf(m, "machine\t\t: Amiga\n"); | ||
175 | seq_printf(m, "bus speed\t: %d%s", __bus_speed, | ||
176 | (__speed_test_failed) ? " [failed]\n" : "\n"); | ||
177 | seq_printf(m, "using BATs\t: %s\n", | ||
178 | (__map_without_bats) ? "No" : "Yes"); | ||
179 | seq_printf(m, "ram speed\t: %dns\n", (__60nsram) ? 60 : 70); | ||
180 | seq_printf(m, "PCI bridge\t: %s\n", | ||
181 | (powerup_PCI_present) ? "Yes" : "No"); | ||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | static void get_current_tb(unsigned long long *time) | ||
186 | { | ||
187 | __asm __volatile ("1:mftbu 4 \n\t" | ||
188 | " mftb 5 \n\t" | ||
189 | " mftbu 6 \n\t" | ||
190 | " cmpw 4,6 \n\t" | ||
191 | " bne 1b \n\t" | ||
192 | " stw 4,0(%0)\n\t" | ||
193 | " stw 5,4(%0)\n\t" | ||
194 | : | ||
195 | : "r" (time) | ||
196 | : "r4", "r5", "r6"); | ||
197 | } | ||
198 | |||
199 | |||
200 | void apus_calibrate_decr(void) | ||
201 | { | ||
202 | #ifdef CONFIG_APUS | ||
203 | unsigned long freq; | ||
204 | |||
205 | /* This algorithm for determining the bus speed was | ||
206 | contributed by Ralph Schmidt. */ | ||
207 | unsigned long long start, stop; | ||
208 | int bus_speed; | ||
209 | int speed_test_failed = 0; | ||
210 | |||
211 | { | ||
212 | unsigned long loop = amiga_eclock / 10; | ||
213 | |||
214 | get_current_tb (&start); | ||
215 | while (loop--) { | ||
216 | unsigned char tmp; | ||
217 | |||
218 | tmp = ciaa.pra; | ||
219 | } | ||
220 | get_current_tb (&stop); | ||
221 | } | ||
222 | |||
223 | bus_speed = (((unsigned long)(stop-start))*10*4) / 1000000; | ||
224 | if (AMI_1200 == amiga_model) | ||
225 | bus_speed /= 2; | ||
226 | |||
227 | if ((bus_speed >= 47) && (bus_speed < 53)) { | ||
228 | bus_speed = 50; | ||
229 | freq = 12500000; | ||
230 | } else if ((bus_speed >= 57) && (bus_speed < 63)) { | ||
231 | bus_speed = 60; | ||
232 | freq = 15000000; | ||
233 | } else if ((bus_speed >= 63) && (bus_speed < 69)) { | ||
234 | bus_speed = 67; | ||
235 | freq = 16666667; | ||
236 | } else { | ||
237 | printk ("APUS: Unable to determine bus speed (%d). " | ||
238 | "Defaulting to 50MHz", bus_speed); | ||
239 | bus_speed = 50; | ||
240 | freq = 12500000; | ||
241 | speed_test_failed = 1; | ||
242 | } | ||
243 | |||
244 | /* Ease diagnostics... */ | ||
245 | { | ||
246 | extern int __map_without_bats; | ||
247 | extern unsigned long powerup_PCI_present; | ||
248 | |||
249 | printk ("APUS: BATs=%d, BUS=%dMHz", | ||
250 | (__map_without_bats) ? 0 : 1, | ||
251 | bus_speed); | ||
252 | if (speed_test_failed) | ||
253 | printk ("[FAILED - please report]"); | ||
254 | |||
255 | printk (", RAM=%dns, PCI bridge=%d\n", | ||
256 | (__60nsram) ? 60 : 70, | ||
257 | (powerup_PCI_present) ? 1 : 0); | ||
258 | |||
259 | /* print a bit more if asked politely... */ | ||
260 | if (!(ciaa.pra & 0x40)){ | ||
261 | extern unsigned int bat_addrs[4][3]; | ||
262 | int b; | ||
263 | for (b = 0; b < 4; ++b) { | ||
264 | printk ("APUS: BAT%d ", b); | ||
265 | printk ("%08x-%08x -> %08x\n", | ||
266 | bat_addrs[b][0], | ||
267 | bat_addrs[b][1], | ||
268 | bat_addrs[b][2]); | ||
269 | } | ||
270 | } | ||
271 | |||
272 | } | ||
273 | |||
274 | printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", | ||
275 | freq/1000000, freq%1000000); | ||
276 | tb_ticks_per_jiffy = freq / HZ; | ||
277 | tb_to_us = mulhwu_scale_factor(freq, 1000000); | ||
278 | |||
279 | __bus_speed = bus_speed; | ||
280 | __speed_test_failed = speed_test_failed; | ||
281 | #endif | ||
282 | } | ||
283 | |||
284 | void arch_gettod(int *year, int *mon, int *day, int *hour, | ||
285 | int *min, int *sec) | ||
286 | { | ||
287 | #ifdef CONFIG_APUS | ||
288 | if (mach_gettod) | ||
289 | mach_gettod(year, mon, day, hour, min, sec); | ||
290 | else | ||
291 | *year = *mon = *day = *hour = *min = *sec = 0; | ||
292 | #endif | ||
293 | } | ||
294 | |||
295 | /* for "kbd-reset" cmdline param */ | ||
296 | __init | ||
297 | void kbd_reset_setup(char *str, int *ints) | ||
298 | { | ||
299 | } | ||
300 | |||
301 | /*********************************************************** MEMORY */ | ||
302 | #define KMAP_MAX 32 | ||
303 | unsigned long kmap_chunks[KMAP_MAX*3]; | ||
304 | int kmap_chunk_count = 0; | ||
305 | |||
306 | /* From pgtable.h */ | ||
307 | static __inline__ pte_t *my_find_pte(struct mm_struct *mm,unsigned long va) | ||
308 | { | ||
309 | pgd_t *dir = 0; | ||
310 | pmd_t *pmd = 0; | ||
311 | pte_t *pte = 0; | ||
312 | |||
313 | va &= PAGE_MASK; | ||
314 | |||
315 | dir = pgd_offset( mm, va ); | ||
316 | if (dir) | ||
317 | { | ||
318 | pmd = pmd_offset(dir, va & PAGE_MASK); | ||
319 | if (pmd && pmd_present(*pmd)) | ||
320 | { | ||
321 | pte = pte_offset(pmd, va); | ||
322 | } | ||
323 | } | ||
324 | return pte; | ||
325 | } | ||
326 | |||
327 | |||
328 | /* Again simulating an m68k/mm/kmap.c function. */ | ||
329 | void kernel_set_cachemode( unsigned long address, unsigned long size, | ||
330 | unsigned int cmode ) | ||
331 | { | ||
332 | unsigned long mask, flags; | ||
333 | |||
334 | switch (cmode) | ||
335 | { | ||
336 | case IOMAP_FULL_CACHING: | ||
337 | mask = ~(_PAGE_NO_CACHE | _PAGE_GUARDED); | ||
338 | flags = 0; | ||
339 | break; | ||
340 | case IOMAP_NOCACHE_SER: | ||
341 | mask = ~0; | ||
342 | flags = (_PAGE_NO_CACHE | _PAGE_GUARDED); | ||
343 | break; | ||
344 | default: | ||
345 | panic ("kernel_set_cachemode() doesn't support mode %d\n", | ||
346 | cmode); | ||
347 | break; | ||
348 | } | ||
349 | |||
350 | size /= PAGE_SIZE; | ||
351 | address &= PAGE_MASK; | ||
352 | while (size--) | ||
353 | { | ||
354 | pte_t *pte; | ||
355 | |||
356 | pte = my_find_pte(&init_mm, address); | ||
357 | if ( !pte ) | ||
358 | { | ||
359 | printk("pte NULL in kernel_set_cachemode()\n"); | ||
360 | return; | ||
361 | } | ||
362 | |||
363 | pte_val (*pte) &= mask; | ||
364 | pte_val (*pte) |= flags; | ||
365 | flush_tlb_page(find_vma(&init_mm,address),address); | ||
366 | |||
367 | address += PAGE_SIZE; | ||
368 | } | ||
369 | } | ||
370 | |||
371 | unsigned long mm_ptov (unsigned long paddr) | ||
372 | { | ||
373 | unsigned long ret; | ||
374 | if (paddr < 16*1024*1024) | ||
375 | ret = ZTWO_VADDR(paddr); | ||
376 | else { | ||
377 | int i; | ||
378 | |||
379 | for (i = 0; i < kmap_chunk_count;){ | ||
380 | unsigned long phys = kmap_chunks[i++]; | ||
381 | unsigned long size = kmap_chunks[i++]; | ||
382 | unsigned long virt = kmap_chunks[i++]; | ||
383 | if (paddr >= phys | ||
384 | && paddr < (phys + size)){ | ||
385 | ret = virt + paddr - phys; | ||
386 | goto exit; | ||
387 | } | ||
388 | } | ||
389 | |||
390 | ret = (unsigned long) __va(paddr); | ||
391 | } | ||
392 | exit: | ||
393 | #ifdef DEBUGPV | ||
394 | printk ("PTOV(%lx)=%lx\n", paddr, ret); | ||
395 | #endif | ||
396 | return ret; | ||
397 | } | ||
398 | |||
399 | int mm_end_of_chunk (unsigned long addr, int len) | ||
400 | { | ||
401 | if (memory[0].addr + memory[0].size == addr + len) | ||
402 | return 1; | ||
403 | return 0; | ||
404 | } | ||
405 | |||
406 | /*********************************************************** CACHE */ | ||
407 | |||
408 | #define L1_CACHE_BYTES 32 | ||
409 | #define MAX_CACHE_SIZE 8192 | ||
410 | void cache_push(__u32 addr, int length) | ||
411 | { | ||
412 | addr = mm_ptov(addr); | ||
413 | |||
414 | if (MAX_CACHE_SIZE < length) | ||
415 | length = MAX_CACHE_SIZE; | ||
416 | |||
417 | while(length > 0){ | ||
418 | __asm ("dcbf 0,%0\n\t" | ||
419 | : : "r" (addr)); | ||
420 | addr += L1_CACHE_BYTES; | ||
421 | length -= L1_CACHE_BYTES; | ||
422 | } | ||
423 | /* Also flush trailing block */ | ||
424 | __asm ("dcbf 0,%0\n\t" | ||
425 | "sync \n\t" | ||
426 | : : "r" (addr)); | ||
427 | } | ||
428 | |||
429 | void cache_clear(__u32 addr, int length) | ||
430 | { | ||
431 | if (MAX_CACHE_SIZE < length) | ||
432 | length = MAX_CACHE_SIZE; | ||
433 | |||
434 | addr = mm_ptov(addr); | ||
435 | |||
436 | __asm ("dcbf 0,%0\n\t" | ||
437 | "sync \n\t" | ||
438 | "icbi 0,%0 \n\t" | ||
439 | "isync \n\t" | ||
440 | : : "r" (addr)); | ||
441 | |||
442 | addr += L1_CACHE_BYTES; | ||
443 | length -= L1_CACHE_BYTES; | ||
444 | |||
445 | while(length > 0){ | ||
446 | __asm ("dcbf 0,%0\n\t" | ||
447 | "sync \n\t" | ||
448 | "icbi 0,%0 \n\t" | ||
449 | "isync \n\t" | ||
450 | : : "r" (addr)); | ||
451 | addr += L1_CACHE_BYTES; | ||
452 | length -= L1_CACHE_BYTES; | ||
453 | } | ||
454 | |||
455 | __asm ("dcbf 0,%0\n\t" | ||
456 | "sync \n\t" | ||
457 | "icbi 0,%0 \n\t" | ||
458 | "isync \n\t" | ||
459 | : : "r" (addr)); | ||
460 | } | ||
461 | |||
462 | /****************************************************** from setup.c */ | ||
463 | void | ||
464 | apus_restart(char *cmd) | ||
465 | { | ||
466 | local_irq_disable(); | ||
467 | |||
468 | APUS_WRITE(APUS_REG_LOCK, | ||
469 | REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK2); | ||
470 | APUS_WRITE(APUS_REG_LOCK, | ||
471 | REGLOCK_BLACKMAGICK1|REGLOCK_BLACKMAGICK3); | ||
472 | APUS_WRITE(APUS_REG_LOCK, | ||
473 | REGLOCK_BLACKMAGICK2|REGLOCK_BLACKMAGICK3); | ||
474 | APUS_WRITE(APUS_REG_SHADOW, REGSHADOW_SELFRESET); | ||
475 | APUS_WRITE(APUS_REG_RESET, REGRESET_AMIGARESET); | ||
476 | for(;;); | ||
477 | } | ||
478 | |||
479 | void | ||
480 | apus_power_off(void) | ||
481 | { | ||
482 | for (;;); | ||
483 | } | ||
484 | |||
485 | void | ||
486 | apus_halt(void) | ||
487 | { | ||
488 | apus_restart(NULL); | ||
489 | } | ||
490 | |||
491 | /****************************************************** IRQ stuff */ | ||
492 | |||
493 | static unsigned char last_ipl[8]; | ||
494 | |||
495 | int apus_get_irq(void) | ||
496 | { | ||
497 | unsigned char ipl_emu, mask; | ||
498 | unsigned int level; | ||
499 | |||
500 | APUS_READ(APUS_IPL_EMU, ipl_emu); | ||
501 | level = (ipl_emu >> 3) & IPLEMU_IPLMASK; | ||
502 | mask = IPLEMU_SETRESET|IPLEMU_DISABLEINT|level; | ||
503 | level ^= 7; | ||
504 | |||
505 | /* Save previous IPL value */ | ||
506 | if (last_ipl[level]) | ||
507 | return -2; | ||
508 | last_ipl[level] = ipl_emu; | ||
509 | |||
510 | /* Set to current IPL value */ | ||
511 | APUS_WRITE(APUS_IPL_EMU, mask); | ||
512 | APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT|level); | ||
513 | |||
514 | |||
515 | #ifdef __INTERRUPT_DEBUG | ||
516 | printk("<%d:%d>", level, ~ipl_emu & IPLEMU_IPLMASK); | ||
517 | #endif | ||
518 | return level + IRQ_AMIGA_AUTO; | ||
519 | } | ||
520 | |||
521 | void apus_end_irq(unsigned int irq) | ||
522 | { | ||
523 | unsigned char ipl_emu; | ||
524 | unsigned int level = irq - IRQ_AMIGA_AUTO; | ||
525 | #ifdef __INTERRUPT_DEBUG | ||
526 | printk("{%d}", ~last_ipl[level] & IPLEMU_IPLMASK); | ||
527 | #endif | ||
528 | /* Restore IPL to the previous value */ | ||
529 | ipl_emu = last_ipl[level] & IPLEMU_IPLMASK; | ||
530 | APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET|IPLEMU_DISABLEINT|ipl_emu); | ||
531 | last_ipl[level] = 0; | ||
532 | ipl_emu ^= 7; | ||
533 | APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT|ipl_emu); | ||
534 | } | ||
535 | |||
536 | /****************************************************** debugging */ | ||
537 | |||
538 | /* some serial hardware definitions */ | ||
539 | #define SDR_OVRUN (1<<15) | ||
540 | #define SDR_RBF (1<<14) | ||
541 | #define SDR_TBE (1<<13) | ||
542 | #define SDR_TSRE (1<<12) | ||
543 | |||
544 | #define AC_SETCLR (1<<15) | ||
545 | #define AC_UARTBRK (1<<11) | ||
546 | |||
547 | #define SER_DTR (1<<7) | ||
548 | #define SER_RTS (1<<6) | ||
549 | #define SER_DCD (1<<5) | ||
550 | #define SER_CTS (1<<4) | ||
551 | #define SER_DSR (1<<3) | ||
552 | |||
553 | static __inline__ void ser_RTSon(void) | ||
554 | { | ||
555 | ciab.pra &= ~SER_RTS; /* active low */ | ||
556 | } | ||
557 | |||
558 | int __debug_ser_out( unsigned char c ) | ||
559 | { | ||
560 | amiga_custom.serdat = c | 0x100; | ||
561 | mb(); | ||
562 | while (!(amiga_custom.serdatr & 0x2000)) | ||
563 | barrier(); | ||
564 | return 1; | ||
565 | } | ||
566 | |||
567 | unsigned char __debug_ser_in( void ) | ||
568 | { | ||
569 | unsigned char c; | ||
570 | |||
571 | /* XXX: is that ok?? derived from amiga_ser.c... */ | ||
572 | while( !(amiga_custom.intreqr & IF_RBF) ) | ||
573 | barrier(); | ||
574 | c = amiga_custom.serdatr; | ||
575 | /* clear the interrupt, so that another character can be read */ | ||
576 | amiga_custom.intreq = IF_RBF; | ||
577 | return c; | ||
578 | } | ||
579 | |||
580 | int __debug_serinit( void ) | ||
581 | { | ||
582 | unsigned long flags; | ||
583 | |||
584 | local_irq_save(flags); | ||
585 | |||
586 | /* turn off Rx and Tx interrupts */ | ||
587 | amiga_custom.intena = IF_RBF | IF_TBE; | ||
588 | |||
589 | /* clear any pending interrupt */ | ||
590 | amiga_custom.intreq = IF_RBF | IF_TBE; | ||
591 | |||
592 | local_irq_restore(flags); | ||
593 | |||
594 | /* | ||
595 | * set the appropriate directions for the modem control flags, | ||
596 | * and clear RTS and DTR | ||
597 | */ | ||
598 | ciab.ddra |= (SER_DTR | SER_RTS); /* outputs */ | ||
599 | ciab.ddra &= ~(SER_DCD | SER_CTS | SER_DSR); /* inputs */ | ||
600 | |||
601 | #ifdef CONFIG_KGDB | ||
602 | /* turn Rx interrupts on for GDB */ | ||
603 | amiga_custom.intena = IF_SETCLR | IF_RBF; | ||
604 | ser_RTSon(); | ||
605 | #endif | ||
606 | |||
607 | return 0; | ||
608 | } | ||
609 | |||
610 | void __debug_print_hex(unsigned long x) | ||
611 | { | ||
612 | int i; | ||
613 | char hexchars[] = "0123456789ABCDEF"; | ||
614 | |||
615 | for (i = 0; i < 8; i++) { | ||
616 | __debug_ser_out(hexchars[(x >> 28) & 15]); | ||
617 | x <<= 4; | ||
618 | } | ||
619 | __debug_ser_out('\n'); | ||
620 | __debug_ser_out('\r'); | ||
621 | } | ||
622 | |||
623 | void __debug_print_string(char* s) | ||
624 | { | ||
625 | unsigned char c; | ||
626 | while((c = *s++)) | ||
627 | __debug_ser_out(c); | ||
628 | __debug_ser_out('\n'); | ||
629 | __debug_ser_out('\r'); | ||
630 | } | ||
631 | |||
632 | static void apus_progress(char *s, unsigned short value) | ||
633 | { | ||
634 | __debug_print_string(s); | ||
635 | } | ||
636 | |||
637 | /****************************************************** init */ | ||
638 | |||
639 | /* The number of spurious interrupts */ | ||
640 | volatile unsigned int num_spurious; | ||
641 | |||
642 | extern struct irqaction amiga_sys_irqaction[AUTO_IRQS]; | ||
643 | |||
644 | |||
645 | extern void amiga_enable_irq(unsigned int irq); | ||
646 | extern void amiga_disable_irq(unsigned int irq); | ||
647 | |||
648 | struct hw_interrupt_type amiga_sys_irqctrl = { | ||
649 | .typename = "Amiga IPL", | ||
650 | .end = apus_end_irq, | ||
651 | }; | ||
652 | |||
653 | struct hw_interrupt_type amiga_irqctrl = { | ||
654 | .typename = "Amiga ", | ||
655 | .enable = amiga_enable_irq, | ||
656 | .disable = amiga_disable_irq, | ||
657 | }; | ||
658 | |||
659 | #define HARDWARE_MAPPED_SIZE (512*1024) | ||
660 | unsigned long __init apus_find_end_of_memory(void) | ||
661 | { | ||
662 | int shadow = 0; | ||
663 | unsigned long total; | ||
664 | |||
665 | /* The memory size reported by ADOS excludes the 512KB | ||
666 | reserved for PPC exception registers and possibly 512KB | ||
667 | containing a shadow of the ADOS ROM. */ | ||
668 | { | ||
669 | unsigned long size = memory[0].size; | ||
670 | |||
671 | /* If 2MB aligned, size was probably user | ||
672 | specified. We can't tell anything about shadowing | ||
673 | in this case so skip shadow assignment. */ | ||
674 | if (0 != (size & 0x1fffff)){ | ||
675 | /* Align to 512KB to ensure correct handling | ||
676 | of both memfile and system specified | ||
677 | sizes. */ | ||
678 | size = ((size+0x0007ffff) & 0xfff80000); | ||
679 | /* If memory is 1MB aligned, assume | ||
680 | shadowing. */ | ||
681 | shadow = !(size & 0x80000); | ||
682 | } | ||
683 | |||
684 | /* Add the chunk that ADOS does not see. by aligning | ||
685 | the size to the nearest 2MB limit upwards. */ | ||
686 | memory[0].size = ((size+0x001fffff) & 0xffe00000); | ||
687 | } | ||
688 | |||
689 | ppc_memstart = memory[0].addr; | ||
690 | ppc_memoffset = PAGE_OFFSET - PPC_MEMSTART; | ||
691 | total = memory[0].size; | ||
692 | |||
693 | /* Remove the memory chunks that are controlled by special | ||
694 | Phase5 hardware. */ | ||
695 | |||
696 | /* Remove the upper 512KB if it contains a shadow of | ||
697 | the ADOS ROM. FIXME: It might be possible to | ||
698 | disable this shadow HW. Check the booter | ||
699 | (ppc_boot.c) */ | ||
700 | if (shadow) | ||
701 | total -= HARDWARE_MAPPED_SIZE; | ||
702 | |||
703 | /* Remove the upper 512KB where the PPC exception | ||
704 | vectors are mapped. */ | ||
705 | total -= HARDWARE_MAPPED_SIZE; | ||
706 | |||
707 | /* Linux/APUS only handles one block of memory -- the one on | ||
708 | the PowerUP board. Other system memory is horrible slow in | ||
709 | comparison. The user can use other memory for swapping | ||
710 | using the z2ram device. */ | ||
711 | return total; | ||
712 | } | ||
713 | |||
714 | static void __init | ||
715 | apus_map_io(void) | ||
716 | { | ||
717 | /* Map PPC exception vectors. */ | ||
718 | io_block_mapping(0xfff00000, 0xfff00000, 0x00020000, _PAGE_KERNEL); | ||
719 | /* Map chip and ZorroII memory */ | ||
720 | io_block_mapping(zTwoBase, 0x00000000, 0x01000000, _PAGE_IO); | ||
721 | } | ||
722 | |||
723 | __init | ||
724 | void apus_init_IRQ(void) | ||
725 | { | ||
726 | struct irqaction *action; | ||
727 | int i; | ||
728 | |||
729 | #ifdef CONFIG_PCI | ||
730 | apus_setup_pci_ptrs(); | ||
731 | #endif | ||
732 | |||
733 | for ( i = 0 ; i < AMI_IRQS; i++ ) { | ||
734 | irq_desc[i].status = IRQ_LEVEL; | ||
735 | if (i < IRQ_AMIGA_AUTO) { | ||
736 | irq_desc[i].chip = &amiga_irqctrl; | ||
737 | } else { | ||
738 | irq_desc[i].chip = &amiga_sys_irqctrl; | ||
739 | action = &amiga_sys_irqaction[i-IRQ_AMIGA_AUTO]; | ||
740 | if (action->name) | ||
741 | setup_irq(i, action); | ||
742 | } | ||
743 | } | ||
744 | |||
745 | amiga_init_IRQ(); | ||
746 | |||
747 | } | ||
748 | |||
749 | __init | ||
750 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
751 | unsigned long r6, unsigned long r7) | ||
752 | { | ||
753 | extern int parse_bootinfo(const struct bi_record *); | ||
754 | extern char _end[]; | ||
755 | |||
756 | /* Parse bootinfo. The bootinfo is located right after | ||
757 | the kernel bss */ | ||
758 | parse_bootinfo((const struct bi_record *)&_end); | ||
759 | #ifdef CONFIG_BLK_DEV_INITRD | ||
760 | /* Take care of initrd if we have one. Use data from | ||
761 | bootinfo to avoid the need to initialize PPC | ||
762 | registers when kernel is booted via a PPC reset. */ | ||
763 | if ( ramdisk.addr ) { | ||
764 | initrd_start = (unsigned long) __va(ramdisk.addr); | ||
765 | initrd_end = (unsigned long) | ||
766 | __va(ramdisk.size + ramdisk.addr); | ||
767 | } | ||
768 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
769 | |||
770 | ISA_DMA_THRESHOLD = 0x00ffffff; | ||
771 | |||
772 | ppc_md.setup_arch = apus_setup_arch; | ||
773 | ppc_md.show_cpuinfo = apus_show_cpuinfo; | ||
774 | ppc_md.init_IRQ = apus_init_IRQ; | ||
775 | ppc_md.get_irq = apus_get_irq; | ||
776 | |||
777 | #ifdef CONFIG_HEARTBEAT | ||
778 | ppc_md.heartbeat = apus_heartbeat; | ||
779 | ppc_md.heartbeat_count = 1; | ||
780 | #endif | ||
781 | #ifdef APUS_DEBUG | ||
782 | __debug_serinit(); | ||
783 | ppc_md.progress = apus_progress; | ||
784 | #endif | ||
785 | ppc_md.init = NULL; | ||
786 | |||
787 | ppc_md.restart = apus_restart; | ||
788 | ppc_md.power_off = apus_power_off; | ||
789 | ppc_md.halt = apus_halt; | ||
790 | |||
791 | ppc_md.time_init = NULL; | ||
792 | ppc_md.set_rtc_time = apus_set_rtc_time; | ||
793 | ppc_md.get_rtc_time = apus_get_rtc_time; | ||
794 | ppc_md.calibrate_decr = apus_calibrate_decr; | ||
795 | |||
796 | ppc_md.find_end_of_memory = apus_find_end_of_memory; | ||
797 | ppc_md.setup_io_mappings = apus_map_io; | ||
798 | } | ||
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index 491fe9a57229..3f5be2c5ce99 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -44,11 +44,11 @@ | |||
44 | #include <linux/pm.h> | 44 | #include <linux/pm.h> |
45 | #include <linux/bootmem.h> | 45 | #include <linux/bootmem.h> |
46 | #include <linux/device.h> | 46 | #include <linux/device.h> |
47 | #include <linux/rwsem.h> | ||
47 | 48 | ||
48 | #include <asm/io.h> | 49 | #include <asm/io.h> |
49 | #include <asm/ocp.h> | 50 | #include <asm/ocp.h> |
50 | #include <asm/errno.h> | 51 | #include <asm/errno.h> |
51 | #include <asm/rwsem.h> | ||
52 | #include <asm/semaphore.h> | 52 | #include <asm/semaphore.h> |
53 | 53 | ||
54 | //#define DBG(x) printk x | 54 | //#define DBG(x) printk x |
diff --git a/drivers/char/hvc_beat.c b/drivers/char/hvc_beat.c index 6f019f19be71..e74bb949c289 100644 --- a/drivers/char/hvc_beat.c +++ b/drivers/char/hvc_beat.c | |||
@@ -97,7 +97,7 @@ static int hvc_beat_config(char *p) | |||
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
99 | 99 | ||
100 | static int hvc_beat_console_init(void) | 100 | static int __init hvc_beat_console_init(void) |
101 | { | 101 | { |
102 | if (hvc_beat_useit && machine_is_compatible("Beat")) { | 102 | if (hvc_beat_useit && machine_is_compatible("Beat")) { |
103 | hvc_instantiate(0, 0, &hvc_beat_get_put_ops); | 103 | hvc_instantiate(0, 0, &hvc_beat_get_put_ops); |
@@ -106,7 +106,7 @@ static int hvc_beat_console_init(void) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | /* temp */ | 108 | /* temp */ |
109 | static int hvc_beat_init(void) | 109 | static int __init hvc_beat_init(void) |
110 | { | 110 | { |
111 | struct hvc_struct *hp; | 111 | struct hvc_struct *hp; |
112 | 112 | ||
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index dd441ff4af56..1dd3a065f57b 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2252,19 +2252,19 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
2252 | return ret; | 2252 | return ret; |
2253 | } | 2253 | } |
2254 | 2254 | ||
2255 | regsize = get_property(np, "reg-size", &proplen); | 2255 | regsize = of_get_property(np, "reg-size", &proplen); |
2256 | if (regsize && proplen != 4) { | 2256 | if (regsize && proplen != 4) { |
2257 | dev_warn(&dev->dev, PFX "invalid regsize from OF\n"); | 2257 | dev_warn(&dev->dev, PFX "invalid regsize from OF\n"); |
2258 | return -EINVAL; | 2258 | return -EINVAL; |
2259 | } | 2259 | } |
2260 | 2260 | ||
2261 | regspacing = get_property(np, "reg-spacing", &proplen); | 2261 | regspacing = of_get_property(np, "reg-spacing", &proplen); |
2262 | if (regspacing && proplen != 4) { | 2262 | if (regspacing && proplen != 4) { |
2263 | dev_warn(&dev->dev, PFX "invalid regspacing from OF\n"); | 2263 | dev_warn(&dev->dev, PFX "invalid regspacing from OF\n"); |
2264 | return -EINVAL; | 2264 | return -EINVAL; |
2265 | } | 2265 | } |
2266 | 2266 | ||
2267 | regshift = get_property(np, "reg-shift", &proplen); | 2267 | regshift = of_get_property(np, "reg-shift", &proplen); |
2268 | if (regshift && proplen != 4) { | 2268 | if (regshift && proplen != 4) { |
2269 | dev_warn(&dev->dev, PFX "invalid regshift from OF\n"); | 2269 | dev_warn(&dev->dev, PFX "invalid regshift from OF\n"); |
2270 | return -EINVAL; | 2270 | return -EINVAL; |
diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c index 17ef5d3c01b4..444696625171 100644 --- a/drivers/macintosh/adb-iop.c +++ b/drivers/macintosh/adb-iop.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
21 | 21 | ||
22 | #include <asm/bootinfo.h> | ||
23 | #include <asm/macintosh.h> | 22 | #include <asm/macintosh.h> |
24 | #include <asm/macints.h> | 23 | #include <asm/macints.h> |
25 | #include <asm/mac_iop.h> | 24 | #include <asm/mac_iop.h> |
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index b46817f699f1..48d17bf6c927 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -70,7 +70,7 @@ static struct notifier_block adbhid_adb_notifier = { | |||
70 | #define ADB_KEY_POWER_OLD 0x7e | 70 | #define ADB_KEY_POWER_OLD 0x7e |
71 | #define ADB_KEY_POWER 0x7f | 71 | #define ADB_KEY_POWER 0x7f |
72 | 72 | ||
73 | u8 adb_to_linux_keycodes[128] = { | 73 | u16 adb_to_linux_keycodes[128] = { |
74 | /* 0x00 */ KEY_A, /* 30 */ | 74 | /* 0x00 */ KEY_A, /* 30 */ |
75 | /* 0x01 */ KEY_S, /* 31 */ | 75 | /* 0x01 */ KEY_S, /* 31 */ |
76 | /* 0x02 */ KEY_D, /* 32 */ | 76 | /* 0x02 */ KEY_D, /* 32 */ |
@@ -134,7 +134,7 @@ u8 adb_to_linux_keycodes[128] = { | |||
134 | /* 0x3c */ KEY_RIGHT, /* 106 */ | 134 | /* 0x3c */ KEY_RIGHT, /* 106 */ |
135 | /* 0x3d */ KEY_DOWN, /* 108 */ | 135 | /* 0x3d */ KEY_DOWN, /* 108 */ |
136 | /* 0x3e */ KEY_UP, /* 103 */ | 136 | /* 0x3e */ KEY_UP, /* 103 */ |
137 | /* 0x3f */ 0, | 137 | /* 0x3f */ KEY_FN, /* 0x1d0 */ |
138 | /* 0x40 */ 0, | 138 | /* 0x40 */ 0, |
139 | /* 0x41 */ KEY_KPDOT, /* 83 */ | 139 | /* 0x41 */ KEY_KPDOT, /* 83 */ |
140 | /* 0x42 */ 0, | 140 | /* 0x42 */ 0, |
@@ -208,7 +208,7 @@ struct adbhid { | |||
208 | int original_handler_id; | 208 | int original_handler_id; |
209 | int current_handler_id; | 209 | int current_handler_id; |
210 | int mouse_kind; | 210 | int mouse_kind; |
211 | unsigned char *keycode; | 211 | u16 *keycode; |
212 | char name[64]; | 212 | char name[64]; |
213 | char phys[32]; | 213 | char phys[32]; |
214 | int flags; | 214 | int flags; |
@@ -275,7 +275,7 @@ static void | |||
275 | adbhid_input_keycode(int id, int keycode, int repeat) | 275 | adbhid_input_keycode(int id, int keycode, int repeat) |
276 | { | 276 | { |
277 | struct adbhid *ahid = adbhid[id]; | 277 | struct adbhid *ahid = adbhid[id]; |
278 | int up_flag; | 278 | int up_flag, key; |
279 | 279 | ||
280 | up_flag = (keycode & 0x80); | 280 | up_flag = (keycode & 0x80); |
281 | keycode &= 0x7f; | 281 | keycode &= 0x7f; |
@@ -321,8 +321,7 @@ adbhid_input_keycode(int id, int keycode, int repeat) | |||
321 | } | 321 | } |
322 | } else | 322 | } else |
323 | ahid->flags |= FLAG_FN_KEY_PRESSED; | 323 | ahid->flags |= FLAG_FN_KEY_PRESSED; |
324 | /* Swallow the key press */ | 324 | break; |
325 | return; | ||
326 | case ADB_KEY_DEL: | 325 | case ADB_KEY_DEL: |
327 | /* Emulate Fn+delete = forward delete */ | 326 | /* Emulate Fn+delete = forward delete */ |
328 | if (ahid->flags & FLAG_FN_KEY_PRESSED) { | 327 | if (ahid->flags & FLAG_FN_KEY_PRESSED) { |
@@ -336,9 +335,9 @@ adbhid_input_keycode(int id, int keycode, int repeat) | |||
336 | #endif /* CONFIG_PPC_PMAC */ | 335 | #endif /* CONFIG_PPC_PMAC */ |
337 | } | 336 | } |
338 | 337 | ||
339 | if (adbhid[id]->keycode[keycode]) { | 338 | key = adbhid[id]->keycode[keycode]; |
340 | input_report_key(adbhid[id]->input, | 339 | if (key) { |
341 | adbhid[id]->keycode[keycode], !up_flag); | 340 | input_report_key(adbhid[id]->input, key, !up_flag); |
342 | input_sync(adbhid[id]->input); | 341 | input_sync(adbhid[id]->input); |
343 | } else | 342 | } else |
344 | printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode, | 343 | printk(KERN_INFO "Unhandled ADB key (scancode %#02x) %s.\n", keycode, |
@@ -757,8 +756,8 @@ adbhid_input_register(int id, int default_id, int original_handler_id, | |||
757 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); | 756 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP); |
758 | input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); | 757 | input_dev->ledbit[0] = BIT(LED_SCROLLL) | BIT(LED_CAPSL) | BIT(LED_NUML); |
759 | input_dev->event = adbhid_kbd_event; | 758 | input_dev->event = adbhid_kbd_event; |
760 | input_dev->keycodemax = 127; | 759 | input_dev->keycodemax = KEY_FN; |
761 | input_dev->keycodesize = 1; | 760 | input_dev->keycodesize = sizeof(hid->keycode[0]); |
762 | break; | 761 | break; |
763 | 762 | ||
764 | case ADB_MOUSE: | 763 | case ADB_MOUSE: |
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c index e54c4d9f6365..73c50bc02095 100644 --- a/drivers/macintosh/ans-lcd.c +++ b/drivers/macintosh/ans-lcd.c | |||
@@ -14,9 +14,10 @@ | |||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include <asm/sections.h> | 15 | #include <asm/sections.h> |
16 | #include <asm/prom.h> | 16 | #include <asm/prom.h> |
17 | #include <asm/ans-lcd.h> | ||
18 | #include <asm/io.h> | 17 | #include <asm/io.h> |
19 | 18 | ||
19 | #include "ans-lcd.h" | ||
20 | |||
20 | #define ANSLCD_ADDR 0xf301c000 | 21 | #define ANSLCD_ADDR 0xf301c000 |
21 | #define ANSLCD_CTRL_IX 0x00 | 22 | #define ANSLCD_CTRL_IX 0x00 |
22 | #define ANSLCD_DATA_IX 0x10 | 23 | #define ANSLCD_DATA_IX 0x10 |
diff --git a/include/asm-ppc/ans-lcd.h b/drivers/macintosh/ans-lcd.h index d795b9fd2db6..d795b9fd2db6 100644 --- a/include/asm-ppc/ans-lcd.h +++ b/drivers/macintosh/ans-lcd.h | |||
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index f25685b9b7cf..276945d51513 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -379,13 +379,10 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr, | |||
379 | if (thermostat) | 379 | if (thermostat) |
380 | return 0; | 380 | return 0; |
381 | 381 | ||
382 | th = (struct thermostat *) | 382 | th = kzalloc(sizeof(struct thermostat), GFP_KERNEL); |
383 | kmalloc(sizeof(struct thermostat), GFP_KERNEL); | ||
384 | |||
385 | if (!th) | 383 | if (!th) |
386 | return -ENOMEM; | 384 | return -ENOMEM; |
387 | 385 | ||
388 | memset(th, 0, sizeof(*th)); | ||
389 | th->clt.addr = addr; | 386 | th->clt.addr = addr; |
390 | th->clt.adapter = adapter; | 387 | th->clt.adapter = adapter; |
391 | th->clt.driver = &thermostat_driver; | 388 | th->clt.driver = &thermostat_driver; |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 04f3973e3874..f7c509b7a8ea 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -410,7 +410,7 @@ static int __init via_pmu_start(void) | |||
410 | 410 | ||
411 | irq = irq_of_parse_and_map(vias, 0); | 411 | irq = irq_of_parse_and_map(vias, 0); |
412 | if (irq == NO_IRQ) { | 412 | if (irq == NO_IRQ) { |
413 | printk(KERN_ERR "via-pmu: can't map interruptn"); | 413 | printk(KERN_ERR "via-pmu: can't map interrupt\n"); |
414 | return -ENODEV; | 414 | return -ENODEV; |
415 | } | 415 | } |
416 | if (request_irq(irq, via_pmu_interrupt, 0, "VIA-PMU", (void *)0)) { | 416 | if (request_irq(irq, via_pmu_interrupt, 0, "VIA-PMU", (void *)0)) { |
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 351982bcec1b..f449d775cdf4 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -380,10 +380,12 @@ static int __init sat_sensors_init(void) | |||
380 | return i2c_add_driver(&wf_sat_driver); | 380 | return i2c_add_driver(&wf_sat_driver); |
381 | } | 381 | } |
382 | 382 | ||
383 | #if 0 /* uncomment when module_exit() below is uncommented */ | ||
383 | static void __exit sat_sensors_exit(void) | 384 | static void __exit sat_sensors_exit(void) |
384 | { | 385 | { |
385 | i2c_del_driver(&wf_sat_driver); | 386 | i2c_del_driver(&wf_sat_driver); |
386 | } | 387 | } |
388 | #endif | ||
387 | 389 | ||
388 | module_init(sat_sensors_init); | 390 | module_init(sat_sensors_init); |
389 | /*module_exit(sat_sensors_exit); Uncomment when cleanup is implemented */ | 391 | /*module_exit(sat_sensors_exit); Uncomment when cleanup is implemented */ |
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index 276ba3c5143f..aa8ce7abe922 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c | |||
@@ -19,16 +19,41 @@ | |||
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/hdpu_features.h> | ||
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <linux/hdpu_features.h> | 25 | #include <linux/seq_file.h> |
26 | #include <asm/io.h> | ||
25 | 27 | ||
26 | #define SKY_CPUSTATE_VERSION "1.1" | 28 | #define SKY_CPUSTATE_VERSION "1.1" |
27 | 29 | ||
28 | static int hdpu_cpustate_probe(struct platform_device *pdev); | 30 | static int hdpu_cpustate_probe(struct platform_device *pdev); |
29 | static int hdpu_cpustate_remove(struct platform_device *pdev); | 31 | static int hdpu_cpustate_remove(struct platform_device *pdev); |
30 | 32 | ||
31 | struct cpustate_t cpustate; | 33 | static unsigned char cpustate_get_state(void); |
34 | static int cpustate_proc_open(struct inode *inode, struct file *file); | ||
35 | static int cpustate_proc_read(struct seq_file *seq, void *offset); | ||
36 | |||
37 | static struct cpustate_t cpustate; | ||
38 | |||
39 | static const struct file_operations proc_cpustate = { | ||
40 | .open = cpustate_proc_open, | ||
41 | .read = seq_read, | ||
42 | .llseek = seq_lseek, | ||
43 | .release = single_release, | ||
44 | .owner = THIS_MODULE, | ||
45 | }; | ||
46 | |||
47 | static int cpustate_proc_open(struct inode *inode, struct file *file) | ||
48 | { | ||
49 | return single_open(file, cpustate_proc_read, NULL); | ||
50 | } | ||
51 | |||
52 | static int cpustate_proc_read(struct seq_file *seq, void *offset) | ||
53 | { | ||
54 | seq_printf(seq, "CPU State: %04x\n", cpustate_get_state()); | ||
55 | return 0; | ||
56 | } | ||
32 | 57 | ||
33 | static int cpustate_get_ref(int excl) | 58 | static int cpustate_get_ref(int excl) |
34 | { | 59 | { |
@@ -66,13 +91,13 @@ static int cpustate_free_ref(void) | |||
66 | return 0; | 91 | return 0; |
67 | } | 92 | } |
68 | 93 | ||
69 | unsigned char cpustate_get_state(void) | 94 | static unsigned char cpustate_get_state(void) |
70 | { | 95 | { |
71 | 96 | ||
72 | return cpustate.cached_val; | 97 | return cpustate.cached_val; |
73 | } | 98 | } |
74 | 99 | ||
75 | void cpustate_set_state(unsigned char new_state) | 100 | static void cpustate_set_state(unsigned char new_state) |
76 | { | 101 | { |
77 | unsigned int state = (new_state << 21); | 102 | unsigned int state = (new_state << 21); |
78 | 103 | ||
@@ -134,29 +159,6 @@ static int cpustate_release(struct inode *inode, struct file *file) | |||
134 | return cpustate_free_ref(); | 159 | return cpustate_free_ref(); |
135 | } | 160 | } |
136 | 161 | ||
137 | /* | ||
138 | * Info exported via "/proc/sky_cpustate". | ||
139 | */ | ||
140 | static int cpustate_read_proc(char *page, char **start, off_t off, | ||
141 | int count, int *eof, void *data) | ||
142 | { | ||
143 | char *p = page; | ||
144 | int len = 0; | ||
145 | |||
146 | p += sprintf(p, "CPU State: %04x\n", cpustate_get_state()); | ||
147 | len = p - page; | ||
148 | |||
149 | if (len <= off + count) | ||
150 | *eof = 1; | ||
151 | *start = page + off; | ||
152 | len -= off; | ||
153 | if (len > count) | ||
154 | len = count; | ||
155 | if (len < 0) | ||
156 | len = 0; | ||
157 | return len; | ||
158 | } | ||
159 | |||
160 | static struct platform_driver hdpu_cpustate_driver = { | 162 | static struct platform_driver hdpu_cpustate_driver = { |
161 | .probe = hdpu_cpustate_probe, | 163 | .probe = hdpu_cpustate_probe, |
162 | .remove = hdpu_cpustate_remove, | 164 | .remove = hdpu_cpustate_remove, |
@@ -169,22 +171,18 @@ static struct platform_driver hdpu_cpustate_driver = { | |||
169 | * The various file operations we support. | 171 | * The various file operations we support. |
170 | */ | 172 | */ |
171 | static const struct file_operations cpustate_fops = { | 173 | static const struct file_operations cpustate_fops = { |
172 | owner:THIS_MODULE, | 174 | .owner = THIS_MODULE, |
173 | open:cpustate_open, | 175 | .open = cpustate_open, |
174 | release:cpustate_release, | 176 | .release = cpustate_release, |
175 | read:cpustate_read, | 177 | .read = cpustate_read, |
176 | write:cpustate_write, | 178 | .write = cpustate_write, |
177 | fasync:NULL, | 179 | .llseek = no_llseek, |
178 | poll:NULL, | ||
179 | ioctl:NULL, | ||
180 | llseek:no_llseek, | ||
181 | |||
182 | }; | 180 | }; |
183 | 181 | ||
184 | static struct miscdevice cpustate_dev = { | 182 | static struct miscdevice cpustate_dev = { |
185 | MISC_DYNAMIC_MINOR, | 183 | .minor = MISC_DYNAMIC_MINOR, |
186 | "sky_cpustate", | 184 | .name = "sky_cpustate", |
187 | &cpustate_fops | 185 | .fops = &cpustate_fops, |
188 | }; | 186 | }; |
189 | 187 | ||
190 | static int hdpu_cpustate_probe(struct platform_device *pdev) | 188 | static int hdpu_cpustate_probe(struct platform_device *pdev) |
@@ -194,23 +192,31 @@ static int hdpu_cpustate_probe(struct platform_device *pdev) | |||
194 | int ret; | 192 | int ret; |
195 | 193 | ||
196 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 194 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
195 | if (!res) { | ||
196 | printk(KERN_ERR "sky_cpustate: " | ||
197 | "Invalid memory resource.\n"); | ||
198 | return -EINVAL; | ||
199 | } | ||
197 | cpustate.set_addr = (unsigned long *)res->start; | 200 | cpustate.set_addr = (unsigned long *)res->start; |
198 | cpustate.clr_addr = (unsigned long *)res->end - 1; | 201 | cpustate.clr_addr = (unsigned long *)res->end - 1; |
199 | 202 | ||
200 | ret = misc_register(&cpustate_dev); | 203 | ret = misc_register(&cpustate_dev); |
201 | if (ret) { | 204 | if (ret) { |
202 | printk(KERN_WARNING "sky_cpustate: Unable to register misc " | 205 | printk(KERN_WARNING "sky_cpustate: " |
203 | "device.\n"); | 206 | "Unable to register misc device.\n"); |
204 | cpustate.set_addr = NULL; | 207 | cpustate.set_addr = NULL; |
205 | cpustate.clr_addr = NULL; | 208 | cpustate.clr_addr = NULL; |
206 | return ret; | 209 | return ret; |
207 | } | 210 | } |
208 | 211 | ||
209 | proc_de = create_proc_read_entry("sky_cpustate", 0, 0, | 212 | proc_de = create_proc_entry("sky_cpustate", 0666, &proc_root); |
210 | cpustate_read_proc, NULL); | 213 | if (!proc_de) { |
211 | if (proc_de == NULL) | 214 | printk(KERN_WARNING "sky_cpustate: " |
212 | printk(KERN_WARNING "sky_cpustate: Unable to create proc " | 215 | "Unable to create proc entry\n"); |
213 | "dir entry\n"); | 216 | } else { |
217 | proc_de->proc_fops = &proc_cpustate; | ||
218 | proc_de->owner = THIS_MODULE; | ||
219 | } | ||
214 | 220 | ||
215 | printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n"); | 221 | printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n"); |
216 | return 0; | 222 | return 0; |
@@ -218,21 +224,18 @@ static int hdpu_cpustate_probe(struct platform_device *pdev) | |||
218 | 224 | ||
219 | static int hdpu_cpustate_remove(struct platform_device *pdev) | 225 | static int hdpu_cpustate_remove(struct platform_device *pdev) |
220 | { | 226 | { |
221 | |||
222 | cpustate.set_addr = NULL; | 227 | cpustate.set_addr = NULL; |
223 | cpustate.clr_addr = NULL; | 228 | cpustate.clr_addr = NULL; |
224 | 229 | ||
225 | remove_proc_entry("sky_cpustate", NULL); | 230 | remove_proc_entry("sky_cpustate", NULL); |
226 | misc_deregister(&cpustate_dev); | 231 | misc_deregister(&cpustate_dev); |
227 | return 0; | ||
228 | 232 | ||
233 | return 0; | ||
229 | } | 234 | } |
230 | 235 | ||
231 | static int __init cpustate_init(void) | 236 | static int __init cpustate_init(void) |
232 | { | 237 | { |
233 | int rc; | 238 | return platform_driver_register(&hdpu_cpustate_driver); |
234 | rc = platform_driver_register(&hdpu_cpustate_driver); | ||
235 | return rc; | ||
236 | } | 239 | } |
237 | 240 | ||
238 | static void __exit cpustate_exit(void) | 241 | static void __exit cpustate_exit(void) |
diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c index 60c8b26f0678..2887b2147980 100644 --- a/drivers/misc/hdpuftrs/hdpu_nexus.c +++ b/drivers/misc/hdpuftrs/hdpu_nexus.c | |||
@@ -18,17 +18,38 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | #include <linux/hdpu_features.h> | 20 | #include <linux/hdpu_features.h> |
21 | |||
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/seq_file.h> | ||
23 | #include <asm/io.h> | ||
23 | 24 | ||
24 | static int hdpu_nexus_probe(struct platform_device *pdev); | 25 | static int hdpu_nexus_probe(struct platform_device *pdev); |
25 | static int hdpu_nexus_remove(struct platform_device *pdev); | 26 | static int hdpu_nexus_remove(struct platform_device *pdev); |
27 | static int hdpu_slot_id_open(struct inode *inode, struct file *file); | ||
28 | static int hdpu_slot_id_read(struct seq_file *seq, void *offset); | ||
29 | static int hdpu_chassis_id_open(struct inode *inode, struct file *file); | ||
30 | static int hdpu_chassis_id_read(struct seq_file *seq, void *offset); | ||
26 | 31 | ||
27 | static struct proc_dir_entry *hdpu_slot_id; | 32 | static struct proc_dir_entry *hdpu_slot_id; |
28 | static struct proc_dir_entry *hdpu_chassis_id; | 33 | static struct proc_dir_entry *hdpu_chassis_id; |
29 | static int slot_id = -1; | 34 | static int slot_id = -1; |
30 | static int chassis_id = -1; | 35 | static int chassis_id = -1; |
31 | 36 | ||
37 | static const struct file_operations proc_slot_id = { | ||
38 | .open = hdpu_slot_id_open, | ||
39 | .read = seq_read, | ||
40 | .llseek = seq_lseek, | ||
41 | .release = single_release, | ||
42 | .owner = THIS_MODULE, | ||
43 | }; | ||
44 | |||
45 | static const struct file_operations proc_chassis_id = { | ||
46 | .open = hdpu_chassis_id_open, | ||
47 | .read = seq_read, | ||
48 | .llseek = seq_lseek, | ||
49 | .release = single_release, | ||
50 | .owner = THIS_MODULE, | ||
51 | }; | ||
52 | |||
32 | static struct platform_driver hdpu_nexus_driver = { | 53 | static struct platform_driver hdpu_nexus_driver = { |
33 | .probe = hdpu_nexus_probe, | 54 | .probe = hdpu_nexus_probe, |
34 | .remove = hdpu_nexus_remove, | 55 | .remove = hdpu_nexus_remove, |
@@ -37,43 +58,67 @@ static struct platform_driver hdpu_nexus_driver = { | |||
37 | }, | 58 | }, |
38 | }; | 59 | }; |
39 | 60 | ||
40 | int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset, | 61 | static int hdpu_slot_id_open(struct inode *inode, struct file *file) |
41 | int buffer_length, int *zero, void *ptr) | ||
42 | { | 62 | { |
63 | return single_open(file, hdpu_slot_id_read, NULL); | ||
64 | } | ||
43 | 65 | ||
44 | if (offset > 0) | 66 | static int hdpu_slot_id_read(struct seq_file *seq, void *offset) |
45 | return 0; | 67 | { |
46 | return sprintf(buffer, "%d\n", slot_id); | 68 | seq_printf(seq, "%d\n", slot_id); |
69 | return 0; | ||
47 | } | 70 | } |
48 | 71 | ||
49 | int hdpu_chassis_id_read(char *buffer, char **buffer_location, off_t offset, | 72 | static int hdpu_chassis_id_open(struct inode *inode, struct file *file) |
50 | int buffer_length, int *zero, void *ptr) | ||
51 | { | 73 | { |
74 | return single_open(file, hdpu_chassis_id_read, NULL); | ||
75 | } | ||
52 | 76 | ||
53 | if (offset > 0) | 77 | static int hdpu_chassis_id_read(struct seq_file *seq, void *offset) |
54 | return 0; | 78 | { |
55 | return sprintf(buffer, "%d\n", chassis_id); | 79 | seq_printf(seq, "%d\n", chassis_id); |
80 | return 0; | ||
56 | } | 81 | } |
57 | 82 | ||
58 | static int hdpu_nexus_probe(struct platform_device *pdev) | 83 | static int hdpu_nexus_probe(struct platform_device *pdev) |
59 | { | 84 | { |
60 | struct resource *res; | 85 | struct resource *res; |
86 | int *nexus_id_addr; | ||
61 | 87 | ||
62 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 88 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
63 | int *nexus_id_addr; | 89 | if (!res) { |
64 | nexus_id_addr = | 90 | printk(KERN_ERR "sky_nexus: " |
65 | ioremap(res->start, (unsigned long)(res->end - res->start)); | 91 | "Invalid memory resource.\n"); |
92 | return -EINVAL; | ||
93 | } | ||
94 | nexus_id_addr = ioremap(res->start, | ||
95 | (unsigned long)(res->end - res->start)); | ||
66 | if (nexus_id_addr) { | 96 | if (nexus_id_addr) { |
67 | slot_id = (*nexus_id_addr >> 8) & 0x1f; | 97 | slot_id = (*nexus_id_addr >> 8) & 0x1f; |
68 | chassis_id = *nexus_id_addr & 0xff; | 98 | chassis_id = *nexus_id_addr & 0xff; |
69 | iounmap(nexus_id_addr); | 99 | iounmap(nexus_id_addr); |
70 | } else | 100 | } else { |
71 | printk("Could not map slot id\n"); | 101 | printk(KERN_ERR "sky_nexus: Could not map slot id\n"); |
102 | } | ||
103 | |||
72 | hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root); | 104 | hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root); |
73 | hdpu_slot_id->read_proc = hdpu_slot_id_read; | 105 | if (!hdpu_slot_id) { |
106 | printk(KERN_WARNING "sky_nexus: " | ||
107 | "Unable to create proc dir entry: sky_slot_id\n"); | ||
108 | } else { | ||
109 | hdpu_slot_id->proc_fops = &proc_slot_id; | ||
110 | hdpu_slot_id->owner = THIS_MODULE; | ||
111 | } | ||
74 | 112 | ||
75 | hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root); | 113 | hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root); |
76 | hdpu_chassis_id->read_proc = hdpu_chassis_id_read; | 114 | if (!hdpu_chassis_id) { |
115 | printk(KERN_WARNING "sky_nexus: " | ||
116 | "Unable to create proc dir entry: sky_chassis_id\n"); | ||
117 | } else { | ||
118 | hdpu_chassis_id->proc_fops = &proc_chassis_id; | ||
119 | hdpu_chassis_id->owner = THIS_MODULE; | ||
120 | } | ||
121 | |||
77 | return 0; | 122 | return 0; |
78 | } | 123 | } |
79 | 124 | ||
@@ -81,18 +126,19 @@ static int hdpu_nexus_remove(struct platform_device *pdev) | |||
81 | { | 126 | { |
82 | slot_id = -1; | 127 | slot_id = -1; |
83 | chassis_id = -1; | 128 | chassis_id = -1; |
129 | |||
84 | remove_proc_entry("sky_slot_id", &proc_root); | 130 | remove_proc_entry("sky_slot_id", &proc_root); |
85 | remove_proc_entry("sky_chassis_id", &proc_root); | 131 | remove_proc_entry("sky_chassis_id", &proc_root); |
132 | |||
86 | hdpu_slot_id = 0; | 133 | hdpu_slot_id = 0; |
87 | hdpu_chassis_id = 0; | 134 | hdpu_chassis_id = 0; |
135 | |||
88 | return 0; | 136 | return 0; |
89 | } | 137 | } |
90 | 138 | ||
91 | static int __init nexus_init(void) | 139 | static int __init nexus_init(void) |
92 | { | 140 | { |
93 | int rc; | 141 | return platform_driver_register(&hdpu_nexus_driver); |
94 | rc = platform_driver_register(&hdpu_nexus_driver); | ||
95 | return rc; | ||
96 | } | 142 | } |
97 | 143 | ||
98 | static void __exit nexus_exit(void) | 144 | static void __exit nexus_exit(void) |
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index cc6c73442435..6cd132c75187 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -362,7 +362,7 @@ config MTD_WALNUT | |||
362 | 362 | ||
363 | config MTD_EBONY | 363 | config MTD_EBONY |
364 | tristate "Flash devices mapped on IBM 440GP Ebony" | 364 | tristate "Flash devices mapped on IBM 440GP Ebony" |
365 | depends on MTD_JEDECPROBE && EBONY | 365 | depends on MTD_JEDECPROBE && EBONY && !PPC_MERGE |
366 | help | 366 | help |
367 | This enables access routines for the flash chips on the IBM 440GP | 367 | This enables access routines for the flash chips on the IBM 440GP |
368 | Ebony board. If you have one of these boards and would like to | 368 | Ebony board. If you have one of these boards and would like to |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index bbb42c35b69b..cf75a566442e 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -1,9 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * Normal mappings of chips in physical memory for OF devices | 2 | * Flash mappings described by the OF (or flattened) device tree |
3 | * | 3 | * |
4 | * Copyright (C) 2006 MontaVista Software Inc. | 4 | * Copyright (C) 2006 MontaVista Software Inc. |
5 | * Author: Vitaly Wool <vwool@ru.mvista.com> | 5 | * Author: Vitaly Wool <vwool@ru.mvista.com> |
6 | * | 6 | * |
7 | * Revised to handle newer style flash binding by: | ||
8 | * Copyright (C) 2007 David Gibson, IBM Corporation. | ||
9 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
@@ -12,102 +15,157 @@ | |||
12 | 15 | ||
13 | #include <linux/module.h> | 16 | #include <linux/module.h> |
14 | #include <linux/types.h> | 17 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | 18 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/device.h> | 19 | #include <linux/device.h> |
19 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
20 | #include <linux/mtd/map.h> | 21 | #include <linux/mtd/map.h> |
21 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
22 | #include <linux/mtd/physmap.h> | 23 | #include <linux/of.h> |
23 | #include <asm/io.h> | 24 | #include <linux/of_platform.h> |
24 | #include <asm/prom.h> | ||
25 | #include <asm/of_device.h> | ||
26 | #include <asm/of_platform.h> | ||
27 | 25 | ||
28 | struct physmap_flash_info { | 26 | struct of_flash { |
29 | struct mtd_info *mtd; | 27 | struct mtd_info *mtd; |
30 | struct map_info map; | 28 | struct map_info map; |
31 | struct resource *res; | 29 | struct resource *res; |
32 | #ifdef CONFIG_MTD_PARTITIONS | 30 | #ifdef CONFIG_MTD_PARTITIONS |
33 | int nr_parts; | ||
34 | struct mtd_partition *parts; | 31 | struct mtd_partition *parts; |
35 | #endif | 32 | #endif |
36 | }; | 33 | }; |
37 | 34 | ||
38 | static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL }; | ||
39 | #ifdef CONFIG_MTD_PARTITIONS | 35 | #ifdef CONFIG_MTD_PARTITIONS |
40 | static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; | 36 | #define OF_FLASH_PARTS(info) ((info)->parts) |
41 | #endif | ||
42 | 37 | ||
43 | #ifdef CONFIG_MTD_PARTITIONS | 38 | static int parse_obsolete_partitions(struct of_device *dev, |
44 | static int parse_flash_partitions(struct device_node *node, | 39 | struct of_flash *info, |
45 | struct mtd_partition **parts) | 40 | struct device_node *dp) |
46 | { | 41 | { |
47 | int i, plen, retval = -ENOMEM; | 42 | int i, plen, nr_parts; |
48 | const u32 *part; | 43 | const struct { |
49 | const char *name; | 44 | u32 offset, len; |
50 | 45 | } *part; | |
51 | part = of_get_property(node, "partitions", &plen); | 46 | const char *names; |
52 | if (part == NULL) | 47 | |
53 | goto err; | 48 | part = of_get_property(dp, "partitions", &plen); |
54 | 49 | if (!part) | |
55 | retval = plen / (2 * sizeof(u32)); | 50 | return 0; /* No partitions found */ |
56 | *parts = kzalloc(retval * sizeof(struct mtd_partition), GFP_KERNEL); | 51 | |
57 | if (*parts == NULL) { | 52 | dev_warn(&dev->dev, "Device tree uses obsolete partition map binding\n"); |
58 | printk(KERN_ERR "Can't allocate the flash partition data!\n"); | 53 | |
59 | goto err; | 54 | nr_parts = plen / sizeof(part[0]); |
60 | } | 55 | |
56 | info->parts = kzalloc(nr_parts * sizeof(*info->parts), GFP_KERNEL); | ||
57 | if (!info->parts) | ||
58 | return -ENOMEM; | ||
61 | 59 | ||
62 | name = of_get_property(node, "partition-names", &plen); | 60 | names = of_get_property(dp, "partition-names", &plen); |
63 | 61 | ||
64 | for (i = 0; i < retval; i++) { | 62 | for (i = 0; i < nr_parts; i++) { |
65 | (*parts)[i].offset = *part++; | 63 | info->parts[i].offset = part->offset; |
66 | (*parts)[i].size = *part & ~1; | 64 | info->parts[i].size = part->len & ~1; |
67 | if (*part++ & 1) /* bit 0 set signifies read only partition */ | 65 | if (part->len & 1) /* bit 0 set signifies read only partition */ |
68 | (*parts)[i].mask_flags = MTD_WRITEABLE; | 66 | info->parts[i].mask_flags = MTD_WRITEABLE; |
69 | 67 | ||
70 | if (name != NULL && plen > 0) { | 68 | if (names && (plen > 0)) { |
71 | int len = strlen(name) + 1; | 69 | int len = strlen(names) + 1; |
72 | 70 | ||
73 | (*parts)[i].name = (char *)name; | 71 | info->parts[i].name = (char *)names; |
74 | plen -= len; | 72 | plen -= len; |
75 | name += len; | 73 | names += len; |
76 | } else | 74 | } else { |
77 | (*parts)[i].name = "unnamed"; | 75 | info->parts[i].name = "unnamed"; |
76 | } | ||
77 | |||
78 | part++; | ||
78 | } | 79 | } |
79 | err: | 80 | |
80 | return retval; | 81 | return nr_parts; |
81 | } | 82 | } |
82 | #endif | ||
83 | 83 | ||
84 | static int of_physmap_remove(struct of_device *dev) | 84 | static int __devinit parse_partitions(struct of_flash *info, |
85 | struct of_device *dev) | ||
86 | { | ||
87 | const char *partname; | ||
88 | static const char *part_probe_types[] | ||
89 | = { "cmdlinepart", "RedBoot", NULL }; | ||
90 | struct device_node *dp = dev->node, *pp; | ||
91 | int nr_parts, i; | ||
92 | |||
93 | /* First look for RedBoot table or partitions on the command | ||
94 | * line, these take precedence over device tree information */ | ||
95 | nr_parts = parse_mtd_partitions(info->mtd, part_probe_types, | ||
96 | &info->parts, 0); | ||
97 | if (nr_parts > 0) { | ||
98 | add_mtd_partitions(info->mtd, info->parts, nr_parts); | ||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | /* First count the subnodes */ | ||
103 | nr_parts = 0; | ||
104 | for (pp = dp->child; pp; pp = pp->sibling) | ||
105 | nr_parts++; | ||
106 | |||
107 | if (nr_parts == 0) | ||
108 | return parse_obsolete_partitions(dev, info, dp); | ||
109 | |||
110 | info->parts = kzalloc(nr_parts * sizeof(*info->parts), | ||
111 | GFP_KERNEL); | ||
112 | if (!info->parts) | ||
113 | return -ENOMEM; | ||
114 | |||
115 | for (pp = dp->child, i = 0; pp; pp = pp->sibling, i++) { | ||
116 | const u32 *reg; | ||
117 | int len; | ||
118 | |||
119 | reg = of_get_property(pp, "reg", &len); | ||
120 | if (!reg || (len != 2*sizeof(u32))) { | ||
121 | dev_err(&dev->dev, "Invalid 'reg' on %s\n", | ||
122 | dp->full_name); | ||
123 | kfree(info->parts); | ||
124 | info->parts = NULL; | ||
125 | return -EINVAL; | ||
126 | } | ||
127 | info->parts[i].offset = reg[0]; | ||
128 | info->parts[i].size = reg[1]; | ||
129 | |||
130 | partname = of_get_property(pp, "label", &len); | ||
131 | if (!partname) | ||
132 | partname = of_get_property(pp, "name", &len); | ||
133 | info->parts[i].name = (char *)partname; | ||
134 | |||
135 | if (of_get_property(pp, "read-only", &len)) | ||
136 | info->parts[i].mask_flags = MTD_WRITEABLE; | ||
137 | } | ||
138 | |||
139 | return nr_parts; | ||
140 | } | ||
141 | #else /* MTD_PARTITIONS */ | ||
142 | #define OF_FLASH_PARTS(info) (0) | ||
143 | #define parse_partitions(info, dev) (0) | ||
144 | #endif /* MTD_PARTITIONS */ | ||
145 | |||
146 | static int of_flash_remove(struct of_device *dev) | ||
85 | { | 147 | { |
86 | struct physmap_flash_info *info; | 148 | struct of_flash *info; |
87 | 149 | ||
88 | info = dev_get_drvdata(&dev->dev); | 150 | info = dev_get_drvdata(&dev->dev); |
89 | if (info == NULL) | 151 | if (!info) |
90 | return 0; | 152 | return 0; |
91 | dev_set_drvdata(&dev->dev, NULL); | 153 | dev_set_drvdata(&dev->dev, NULL); |
92 | 154 | ||
93 | if (info->mtd != NULL) { | 155 | if (info->mtd) { |
94 | #ifdef CONFIG_MTD_PARTITIONS | 156 | if (OF_FLASH_PARTS(info)) { |
95 | if (info->nr_parts) { | ||
96 | del_mtd_partitions(info->mtd); | 157 | del_mtd_partitions(info->mtd); |
97 | kfree(info->parts); | 158 | kfree(OF_FLASH_PARTS(info)); |
98 | } else { | 159 | } else { |
99 | del_mtd_device(info->mtd); | 160 | del_mtd_device(info->mtd); |
100 | } | 161 | } |
101 | #else | ||
102 | del_mtd_device(info->mtd); | ||
103 | #endif | ||
104 | map_destroy(info->mtd); | 162 | map_destroy(info->mtd); |
105 | } | 163 | } |
106 | 164 | ||
107 | if (info->map.virt != NULL) | 165 | if (info->map.virt) |
108 | iounmap(info->map.virt); | 166 | iounmap(info->map.virt); |
109 | 167 | ||
110 | if (info->res != NULL) { | 168 | if (info->res) { |
111 | release_resource(info->res); | 169 | release_resource(info->res); |
112 | kfree(info->res); | 170 | kfree(info->res); |
113 | } | 171 | } |
@@ -115,48 +173,79 @@ static int of_physmap_remove(struct of_device *dev) | |||
115 | return 0; | 173 | return 0; |
116 | } | 174 | } |
117 | 175 | ||
118 | static int __devinit of_physmap_probe(struct of_device *dev, const struct of_device_id *match) | 176 | /* Helper function to handle probing of the obsolete "direct-mapped" |
177 | * compatible binding, which has an extra "probe-type" property | ||
178 | * describing the type of flash probe necessary. */ | ||
179 | static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, | ||
180 | struct map_info *map) | ||
119 | { | 181 | { |
120 | struct device_node *dp = dev->node; | 182 | struct device_node *dp = dev->node; |
121 | struct resource res; | ||
122 | struct physmap_flash_info *info; | ||
123 | const char **probe_type; | ||
124 | const char *of_probe; | 183 | const char *of_probe; |
184 | struct mtd_info *mtd; | ||
185 | static const char *rom_probe_types[] | ||
186 | = { "cfi_probe", "jedec_probe", "map_rom"}; | ||
187 | int i; | ||
188 | |||
189 | dev_warn(&dev->dev, "Device tree uses obsolete \"direct-mapped\" " | ||
190 | "flash binding\n"); | ||
191 | |||
192 | of_probe = of_get_property(dp, "probe-type", NULL); | ||
193 | if (!of_probe) { | ||
194 | for (i = 0; i < ARRAY_SIZE(rom_probe_types); i++) { | ||
195 | mtd = do_map_probe(rom_probe_types[i], map); | ||
196 | if (mtd) | ||
197 | return mtd; | ||
198 | } | ||
199 | return NULL; | ||
200 | } else if (strcmp(of_probe, "CFI") == 0) { | ||
201 | return do_map_probe("cfi_probe", map); | ||
202 | } else if (strcmp(of_probe, "JEDEC") == 0) { | ||
203 | return do_map_probe("jedec_probe", map); | ||
204 | } else { | ||
205 | if (strcmp(of_probe, "ROM") != 0) | ||
206 | dev_warn(&dev->dev, "obsolete_probe: don't know probe " | ||
207 | "type '%s', mapping as rom\n", of_probe); | ||
208 | return do_map_probe("mtd_rom", map); | ||
209 | } | ||
210 | } | ||
211 | |||
212 | static int __devinit of_flash_probe(struct of_device *dev, | ||
213 | const struct of_device_id *match) | ||
214 | { | ||
215 | struct device_node *dp = dev->node; | ||
216 | struct resource res; | ||
217 | struct of_flash *info; | ||
218 | const char *probe_type = match->data; | ||
125 | const u32 *width; | 219 | const u32 *width; |
126 | int err; | 220 | int err; |
127 | 221 | ||
128 | 222 | err = -ENXIO; | |
129 | if (of_address_to_resource(dp, 0, &res)) { | 223 | if (of_address_to_resource(dp, 0, &res)) { |
130 | dev_err(&dev->dev, "Can't get the flash mapping!\n"); | 224 | dev_err(&dev->dev, "Can't get IO address from device tree\n"); |
131 | err = -EINVAL; | ||
132 | goto err_out; | 225 | goto err_out; |
133 | } | 226 | } |
134 | 227 | ||
135 | dev_dbg(&dev->dev, "physmap flash device: %.8llx at %.8llx\n", | 228 | dev_dbg(&dev->dev, "of_flash device: %.8llx-%.8llx\n", |
136 | (unsigned long long)res.end - res.start + 1, | 229 | (unsigned long long)res.start, (unsigned long long)res.end); |
137 | (unsigned long long)res.start); | ||
138 | 230 | ||
139 | info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL); | 231 | err = -ENOMEM; |
140 | if (info == NULL) { | 232 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
141 | err = -ENOMEM; | 233 | if (!info) |
142 | goto err_out; | 234 | goto err_out; |
143 | } | ||
144 | memset(info, 0, sizeof(*info)); | 235 | memset(info, 0, sizeof(*info)); |
145 | 236 | ||
146 | dev_set_drvdata(&dev->dev, info); | 237 | dev_set_drvdata(&dev->dev, info); |
147 | 238 | ||
239 | err = -EBUSY; | ||
148 | info->res = request_mem_region(res.start, res.end - res.start + 1, | 240 | info->res = request_mem_region(res.start, res.end - res.start + 1, |
149 | dev->dev.bus_id); | 241 | dev->dev.bus_id); |
150 | if (info->res == NULL) { | 242 | if (!info->res) |
151 | dev_err(&dev->dev, "Could not reserve memory region\n"); | ||
152 | err = -ENOMEM; | ||
153 | goto err_out; | 243 | goto err_out; |
154 | } | ||
155 | 244 | ||
245 | err = -ENXIO; | ||
156 | width = of_get_property(dp, "bank-width", NULL); | 246 | width = of_get_property(dp, "bank-width", NULL); |
157 | if (width == NULL) { | 247 | if (!width) { |
158 | dev_err(&dev->dev, "Can't get the flash bank width!\n"); | 248 | dev_err(&dev->dev, "Can't get bank width from device tree\n"); |
159 | err = -EINVAL; | ||
160 | goto err_out; | 249 | goto err_out; |
161 | } | 250 | } |
162 | 251 | ||
@@ -165,91 +254,87 @@ static int __devinit of_physmap_probe(struct of_device *dev, const struct of_dev | |||
165 | info->map.size = res.end - res.start + 1; | 254 | info->map.size = res.end - res.start + 1; |
166 | info->map.bankwidth = *width; | 255 | info->map.bankwidth = *width; |
167 | 256 | ||
257 | err = -ENOMEM; | ||
168 | info->map.virt = ioremap(info->map.phys, info->map.size); | 258 | info->map.virt = ioremap(info->map.phys, info->map.size); |
169 | if (info->map.virt == NULL) { | 259 | if (!info->map.virt) { |
170 | dev_err(&dev->dev, "Failed to ioremap flash region\n"); | 260 | dev_err(&dev->dev, "Failed to ioremap() flash region\n"); |
171 | err = EIO; | ||
172 | goto err_out; | 261 | goto err_out; |
173 | } | 262 | } |
174 | 263 | ||
175 | simple_map_init(&info->map); | 264 | simple_map_init(&info->map); |
176 | 265 | ||
177 | of_probe = of_get_property(dp, "probe-type", NULL); | 266 | if (probe_type) |
178 | if (of_probe == NULL) { | 267 | info->mtd = do_map_probe(probe_type, &info->map); |
179 | probe_type = rom_probe_types; | 268 | else |
180 | for (; info->mtd == NULL && *probe_type != NULL; probe_type++) | 269 | info->mtd = obsolete_probe(dev, &info->map); |
181 | info->mtd = do_map_probe(*probe_type, &info->map); | 270 | |
182 | } else if (!strcmp(of_probe, "CFI")) | 271 | err = -ENXIO; |
183 | info->mtd = do_map_probe("cfi_probe", &info->map); | 272 | if (!info->mtd) { |
184 | else if (!strcmp(of_probe, "JEDEC")) | 273 | dev_err(&dev->dev, "do_map_probe() failed\n"); |
185 | info->mtd = do_map_probe("jedec_probe", &info->map); | ||
186 | else { | ||
187 | if (strcmp(of_probe, "ROM")) | ||
188 | dev_dbg(&dev->dev, "map_probe: don't know probe type " | ||
189 | "'%s', mapping as rom\n", of_probe); | ||
190 | info->mtd = do_map_probe("mtd_rom", &info->map); | ||
191 | } | ||
192 | if (info->mtd == NULL) { | ||
193 | dev_err(&dev->dev, "map_probe failed\n"); | ||
194 | err = -ENXIO; | ||
195 | goto err_out; | 274 | goto err_out; |
196 | } | 275 | } |
197 | info->mtd->owner = THIS_MODULE; | 276 | info->mtd->owner = THIS_MODULE; |
198 | 277 | ||
199 | #ifdef CONFIG_MTD_PARTITIONS | 278 | err = parse_partitions(info, dev); |
200 | err = parse_mtd_partitions(info->mtd, part_probe_types, &info->parts, 0); | 279 | if (err < 0) |
201 | if (err > 0) { | 280 | goto err_out; |
202 | add_mtd_partitions(info->mtd, info->parts, err); | 281 | |
203 | } else if ((err = parse_flash_partitions(dp, &info->parts)) > 0) { | 282 | if (err > 0) |
204 | dev_info(&dev->dev, "Using OF partition information\n"); | 283 | add_mtd_partitions(info->mtd, OF_FLASH_PARTS(info), err); |
205 | add_mtd_partitions(info->mtd, info->parts, err); | 284 | else |
206 | info->nr_parts = err; | 285 | add_mtd_device(info->mtd); |
207 | } else | ||
208 | #endif | ||
209 | 286 | ||
210 | add_mtd_device(info->mtd); | ||
211 | return 0; | 287 | return 0; |
212 | 288 | ||
213 | err_out: | 289 | err_out: |
214 | of_physmap_remove(dev); | 290 | of_flash_remove(dev); |
215 | return err; | 291 | return err; |
216 | |||
217 | return 0; | ||
218 | |||
219 | |||
220 | } | 292 | } |
221 | 293 | ||
222 | static struct of_device_id of_physmap_match[] = { | 294 | static struct of_device_id of_flash_match[] = { |
295 | { | ||
296 | .compatible = "cfi-flash", | ||
297 | .data = (void *)"cfi_probe", | ||
298 | }, | ||
299 | { | ||
300 | /* FIXME: JEDEC chips can't be safely and reliably | ||
301 | * probed, although the mtd code gets it right in | ||
302 | * practice most of the time. We should use the | ||
303 | * vendor and device ids specified by the binding to | ||
304 | * bypass the heuristic probe code, but the mtd layer | ||
305 | * provides, at present, no interface for doing so | ||
306 | * :(. */ | ||
307 | .compatible = "jedec-flash", | ||
308 | .data = (void *)"jedec_probe", | ||
309 | }, | ||
223 | { | 310 | { |
224 | .type = "rom", | 311 | .type = "rom", |
225 | .compatible = "direct-mapped" | 312 | .compatible = "direct-mapped" |
226 | }, | 313 | }, |
227 | { }, | 314 | { }, |
228 | }; | 315 | }; |
316 | MODULE_DEVICE_TABLE(of, of_flash_match); | ||
229 | 317 | ||
230 | MODULE_DEVICE_TABLE(of, of_physmap_match); | 318 | static struct of_platform_driver of_flash_driver = { |
231 | 319 | .name = "of-flash", | |
232 | 320 | .match_table = of_flash_match, | |
233 | static struct of_platform_driver of_physmap_flash_driver = { | 321 | .probe = of_flash_probe, |
234 | .name = "physmap-flash", | 322 | .remove = of_flash_remove, |
235 | .match_table = of_physmap_match, | ||
236 | .probe = of_physmap_probe, | ||
237 | .remove = of_physmap_remove, | ||
238 | }; | 323 | }; |
239 | 324 | ||
240 | static int __init of_physmap_init(void) | 325 | static int __init of_flash_init(void) |
241 | { | 326 | { |
242 | return of_register_platform_driver(&of_physmap_flash_driver); | 327 | return of_register_platform_driver(&of_flash_driver); |
243 | } | 328 | } |
244 | 329 | ||
245 | static void __exit of_physmap_exit(void) | 330 | static void __exit of_flash_exit(void) |
246 | { | 331 | { |
247 | of_unregister_platform_driver(&of_physmap_flash_driver); | 332 | of_unregister_platform_driver(&of_flash_driver); |
248 | } | 333 | } |
249 | 334 | ||
250 | module_init(of_physmap_init); | 335 | module_init(of_flash_init); |
251 | module_exit(of_physmap_exit); | 336 | module_exit(of_flash_exit); |
252 | 337 | ||
253 | MODULE_LICENSE("GPL"); | 338 | MODULE_LICENSE("GPL"); |
254 | MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>"); | 339 | MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>"); |
255 | MODULE_DESCRIPTION("Configurable MTD map driver for OF"); | 340 | MODULE_DESCRIPTION("Device tree based MTD map driver"); |
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index 6c257b88ce51..df884f0ad8e5 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <asm/ocp.h> | ||
36 | #include <linux/crc32.h> | 35 | #include <linux/crc32.h> |
37 | #include <linux/mii.h> | 36 | #include <linux/mii.h> |
38 | #include <linux/phy.h> | 37 | #include <linux/phy.h> |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 81b52b7cca21..d6ae38e55d01 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -986,6 +986,31 @@ config SERIAL_PMACZILOG | |||
986 | PowerMac machines. | 986 | PowerMac machines. |
987 | Say Y or M if you want to be able to these serial ports. | 987 | Say Y or M if you want to be able to these serial ports. |
988 | 988 | ||
989 | config SERIAL_PMACZILOG_TTYS | ||
990 | bool "Use ttySn device nodes for Zilog z85c30" | ||
991 | depends on SERIAL_PMACZILOG | ||
992 | help | ||
993 | The pmac_zilog driver for the z85C30 chip on many powermacs | ||
994 | historically used the device numbers for /dev/ttySn. The | ||
995 | 8250 serial port driver also uses these numbers, which means | ||
996 | the two drivers being unable to coexist; you could not use | ||
997 | both z85C30 and 8250 type ports at the same time. | ||
998 | |||
999 | If this option is not selected, the pmac_zilog driver will | ||
1000 | use the device numbers allocated for /dev/ttyPZn. This allows | ||
1001 | the pmac_zilog and 8250 drivers to co-exist, but may cause | ||
1002 | existing userspace setups to break. Programs that need to | ||
1003 | access the built-in serial ports on powermacs will need to | ||
1004 | be reconfigured to use /dev/ttyPZn instead of /dev/ttySn. | ||
1005 | |||
1006 | If you enable this option, any z85c30 ports in the system will | ||
1007 | be registered as ttyS0 onwards as in the past, and you will be | ||
1008 | unable to use the 8250 module for PCMCIA or other 16C550-style | ||
1009 | UARTs. | ||
1010 | |||
1011 | Say N unless you need the z85c30 ports on your powermac | ||
1012 | to appear as /dev/ttySn. | ||
1013 | |||
989 | config SERIAL_PMACZILOG_CONSOLE | 1014 | config SERIAL_PMACZILOG_CONSOLE |
990 | bool "Console on PowerMac z85c30 serial port" | 1015 | bool "Console on PowerMac z85c30 serial port" |
991 | depends on SERIAL_PMACZILOG=y | 1016 | depends on SERIAL_PMACZILOG=y |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 35f8b86cc78f..035cca028199 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -1051,7 +1051,7 @@ mpc52xx_uart_of_assign(struct device_node *np, int idx) | |||
1051 | /* If the slot is already occupied, then swap slots */ | 1051 | /* If the slot is already occupied, then swap slots */ |
1052 | if (mpc52xx_uart_nodes[idx] && (free_idx != -1)) | 1052 | if (mpc52xx_uart_nodes[idx] && (free_idx != -1)) |
1053 | mpc52xx_uart_nodes[free_idx] = mpc52xx_uart_nodes[idx]; | 1053 | mpc52xx_uart_nodes[free_idx] = mpc52xx_uart_nodes[idx]; |
1054 | mpc52xx_uart_nodes[i] = np; | 1054 | mpc52xx_uart_nodes[idx] = np; |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | static void | 1057 | static void |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 0fa9f6761763..794bd0f50d73 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -88,6 +88,16 @@ MODULE_LICENSE("GPL"); | |||
88 | 88 | ||
89 | #define PWRDBG(fmt, arg...) printk(KERN_DEBUG fmt , ## arg) | 89 | #define PWRDBG(fmt, arg...) printk(KERN_DEBUG fmt , ## arg) |
90 | 90 | ||
91 | #ifdef CONFIG_SERIAL_PMACZILOG_TTYS | ||
92 | #define PMACZILOG_MAJOR TTY_MAJOR | ||
93 | #define PMACZILOG_MINOR 64 | ||
94 | #define PMACZILOG_NAME "ttyS" | ||
95 | #else | ||
96 | #define PMACZILOG_MAJOR 204 | ||
97 | #define PMACZILOG_MINOR 192 | ||
98 | #define PMACZILOG_NAME "ttyPZ" | ||
99 | #endif | ||
100 | |||
91 | 101 | ||
92 | /* | 102 | /* |
93 | * For the sake of early serial console, we can do a pre-probe | 103 | * For the sake of early serial console, we can do a pre-probe |
@@ -99,9 +109,10 @@ static DEFINE_MUTEX(pmz_irq_mutex); | |||
99 | 109 | ||
100 | static struct uart_driver pmz_uart_reg = { | 110 | static struct uart_driver pmz_uart_reg = { |
101 | .owner = THIS_MODULE, | 111 | .owner = THIS_MODULE, |
102 | .driver_name = "ttyS", | 112 | .driver_name = PMACZILOG_NAME, |
103 | .dev_name = "ttyS", | 113 | .dev_name = PMACZILOG_NAME, |
104 | .major = TTY_MAJOR, | 114 | .major = PMACZILOG_MAJOR, |
115 | .minor = PMACZILOG_MINOR, | ||
105 | }; | 116 | }; |
106 | 117 | ||
107 | 118 | ||
@@ -1587,7 +1598,7 @@ static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state) | |||
1587 | if (pm_state.event == mdev->ofdev.dev.power.power_state.event) | 1598 | if (pm_state.event == mdev->ofdev.dev.power.power_state.event) |
1588 | return 0; | 1599 | return 0; |
1589 | 1600 | ||
1590 | pmz_debug("suspend, switching to state %d\n", pm_state); | 1601 | pmz_debug("suspend, switching to state %d\n", pm_state.event); |
1591 | 1602 | ||
1592 | state = pmz_uart_reg.state + uap->port.line; | 1603 | state = pmz_uart_reg.state + uap->port.line; |
1593 | 1604 | ||
@@ -1778,7 +1789,7 @@ static void pmz_console_write(struct console *con, const char *s, unsigned int c | |||
1778 | static int __init pmz_console_setup(struct console *co, char *options); | 1789 | static int __init pmz_console_setup(struct console *co, char *options); |
1779 | 1790 | ||
1780 | static struct console pmz_console = { | 1791 | static struct console pmz_console = { |
1781 | .name = "ttyS", | 1792 | .name = PMACZILOG_NAME, |
1782 | .write = pmz_console_write, | 1793 | .write = pmz_console_write, |
1783 | .device = uart_console_device, | 1794 | .device = uart_console_device, |
1784 | .setup = pmz_console_setup, | 1795 | .setup = pmz_console_setup, |
@@ -1802,7 +1813,6 @@ static int __init pmz_register(void) | |||
1802 | 1813 | ||
1803 | pmz_uart_reg.nr = pmz_ports_count; | 1814 | pmz_uart_reg.nr = pmz_ports_count; |
1804 | pmz_uart_reg.cons = PMACZILOG_CONSOLE; | 1815 | pmz_uart_reg.cons = PMACZILOG_CONSOLE; |
1805 | pmz_uart_reg.minor = 64; | ||
1806 | 1816 | ||
1807 | /* | 1817 | /* |
1808 | * Register this driver with the serial core | 1818 | * Register this driver with the serial core |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 8503e733a172..cbe71a5338d0 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * more details. | 17 | * more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #undef DEBUG | ||
21 | |||
20 | #include <linux/module.h> | 22 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
22 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
@@ -535,33 +537,35 @@ static int __devinit platinumfb_probe(struct of_device* odev, | |||
535 | volatile __u8 *fbuffer; | 537 | volatile __u8 *fbuffer; |
536 | int bank0, bank1, bank2, bank3, rc; | 538 | int bank0, bank1, bank2, bank3, rc; |
537 | 539 | ||
538 | printk(KERN_INFO "platinumfb: Found Apple Platinum video hardware\n"); | 540 | dev_info(&odev->dev, "Found Apple Platinum video hardware\n"); |
539 | 541 | ||
540 | info = framebuffer_alloc(sizeof(*pinfo), &odev->dev); | 542 | info = framebuffer_alloc(sizeof(*pinfo), &odev->dev); |
541 | if (info == NULL) | 543 | if (info == NULL) { |
544 | dev_err(&odev->dev, "Failed to allocate fbdev !\n"); | ||
542 | return -ENOMEM; | 545 | return -ENOMEM; |
546 | } | ||
543 | pinfo = info->par; | 547 | pinfo = info->par; |
544 | 548 | ||
545 | if (of_address_to_resource(dp, 0, &pinfo->rsrc_reg) || | 549 | if (of_address_to_resource(dp, 0, &pinfo->rsrc_reg) || |
546 | of_address_to_resource(dp, 1, &pinfo->rsrc_fb)) { | 550 | of_address_to_resource(dp, 1, &pinfo->rsrc_fb)) { |
547 | printk(KERN_ERR "platinumfb: Can't get resources\n"); | 551 | dev_err(&odev->dev, "Can't get resources\n"); |
548 | framebuffer_release(info); | ||
549 | return -ENXIO; | ||
550 | } | ||
551 | if (!request_mem_region(pinfo->rsrc_reg.start, | ||
552 | pinfo->rsrc_reg.start - | ||
553 | pinfo->rsrc_reg.end + 1, | ||
554 | "platinumfb registers")) { | ||
555 | framebuffer_release(info); | 552 | framebuffer_release(info); |
556 | return -ENXIO; | 553 | return -ENXIO; |
557 | } | 554 | } |
555 | dev_dbg(&odev->dev, " registers : 0x%llx...0x%llx\n", | ||
556 | (unsigned long long)pinfo->rsrc_reg.start, | ||
557 | (unsigned long long)pinfo->rsrc_reg.end); | ||
558 | dev_dbg(&odev->dev, " framebuffer: 0x%llx...0x%llx\n", | ||
559 | (unsigned long long)pinfo->rsrc_fb.start, | ||
560 | (unsigned long long)pinfo->rsrc_fb.end); | ||
561 | |||
562 | /* Do not try to request register space, they overlap with the | ||
563 | * northbridge and that can fail. Only request framebuffer | ||
564 | */ | ||
558 | if (!request_mem_region(pinfo->rsrc_fb.start, | 565 | if (!request_mem_region(pinfo->rsrc_fb.start, |
559 | pinfo->rsrc_fb.start | 566 | pinfo->rsrc_fb.end - pinfo->rsrc_fb.start + 1, |
560 | - pinfo->rsrc_fb.end + 1, | ||
561 | "platinumfb framebuffer")) { | 567 | "platinumfb framebuffer")) { |
562 | release_mem_region(pinfo->rsrc_reg.start, | 568 | printk(KERN_ERR "platinumfb: Can't request framebuffer !\n"); |
563 | pinfo->rsrc_reg.end - | ||
564 | pinfo->rsrc_reg.start + 1); | ||
565 | framebuffer_release(info); | 569 | framebuffer_release(info); |
566 | return -ENXIO; | 570 | return -ENXIO; |
567 | } | 571 | } |
@@ -600,7 +604,8 @@ static int __devinit platinumfb_probe(struct of_device* odev, | |||
600 | bank2 = fbuffer[0x200000] == 0x56; | 604 | bank2 = fbuffer[0x200000] == 0x56; |
601 | bank3 = fbuffer[0x300000] == 0x78; | 605 | bank3 = fbuffer[0x300000] == 0x78; |
602 | pinfo->total_vram = (bank0 + bank1 + bank2 + bank3) * 0x100000; | 606 | pinfo->total_vram = (bank0 + bank1 + bank2 + bank3) * 0x100000; |
603 | printk(KERN_INFO "platinumfb: Total VRAM = %dMB (%d%d%d%d)\n", (int) (pinfo->total_vram / 1024 / 1024), | 607 | printk(KERN_INFO "platinumfb: Total VRAM = %dMB (%d%d%d%d)\n", |
608 | (unsigned int) (pinfo->total_vram / 1024 / 1024), | ||
604 | bank3, bank2, bank1, bank0); | 609 | bank3, bank2, bank1, bank0); |
605 | 610 | ||
606 | /* | 611 | /* |
@@ -644,16 +649,15 @@ static int __devexit platinumfb_remove(struct of_device* odev) | |||
644 | unregister_framebuffer (info); | 649 | unregister_framebuffer (info); |
645 | 650 | ||
646 | /* Unmap frame buffer and registers */ | 651 | /* Unmap frame buffer and registers */ |
652 | iounmap(pinfo->frame_buffer); | ||
653 | iounmap(pinfo->platinum_regs); | ||
654 | iounmap(pinfo->cmap_regs); | ||
655 | |||
647 | release_mem_region(pinfo->rsrc_fb.start, | 656 | release_mem_region(pinfo->rsrc_fb.start, |
648 | pinfo->rsrc_fb.end - | 657 | pinfo->rsrc_fb.end - |
649 | pinfo->rsrc_fb.start + 1); | 658 | pinfo->rsrc_fb.start + 1); |
650 | release_mem_region(pinfo->rsrc_reg.start, | 659 | |
651 | pinfo->rsrc_reg.end - | ||
652 | pinfo->rsrc_reg.start + 1); | ||
653 | iounmap(pinfo->frame_buffer); | ||
654 | iounmap(pinfo->platinum_regs); | ||
655 | release_mem_region(pinfo->cmap_regs_phys, 0x1000); | 660 | release_mem_region(pinfo->cmap_regs_phys, 0x1000); |
656 | iounmap(pinfo->cmap_regs); | ||
657 | 661 | ||
658 | framebuffer_release(info); | 662 | framebuffer_release(info); |
659 | 663 | ||
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 4482a0673b15..b1013f34085d 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1514,9 +1514,6 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) | |||
1514 | int thread_status_size = 0; | 1514 | int thread_status_size = 0; |
1515 | elf_addr_t *auxv; | 1515 | elf_addr_t *auxv; |
1516 | unsigned long mm_flags; | 1516 | unsigned long mm_flags; |
1517 | #ifdef ELF_CORE_WRITE_EXTRA_NOTES | ||
1518 | int extra_notes_size; | ||
1519 | #endif | ||
1520 | 1517 | ||
1521 | /* | 1518 | /* |
1522 | * We no longer stop all VM operations. | 1519 | * We no longer stop all VM operations. |
@@ -1645,10 +1642,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) | |||
1645 | 1642 | ||
1646 | sz += thread_status_size; | 1643 | sz += thread_status_size; |
1647 | 1644 | ||
1648 | #ifdef ELF_CORE_WRITE_EXTRA_NOTES | 1645 | sz += elf_coredump_extra_notes_size(); |
1649 | extra_notes_size = ELF_CORE_EXTRA_NOTES_SIZE; | ||
1650 | sz += extra_notes_size; | ||
1651 | #endif | ||
1652 | 1646 | ||
1653 | fill_elf_note_phdr(&phdr, sz, offset); | 1647 | fill_elf_note_phdr(&phdr, sz, offset); |
1654 | offset += sz; | 1648 | offset += sz; |
@@ -1698,10 +1692,8 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file) | |||
1698 | if (!writenote(notes + i, file, &foffset)) | 1692 | if (!writenote(notes + i, file, &foffset)) |
1699 | goto end_coredump; | 1693 | goto end_coredump; |
1700 | 1694 | ||
1701 | #ifdef ELF_CORE_WRITE_EXTRA_NOTES | 1695 | if (elf_coredump_extra_notes_write(file, &foffset)) |
1702 | ELF_CORE_WRITE_EXTRA_NOTES; | 1696 | goto end_coredump; |
1703 | foffset += extra_notes_size; | ||
1704 | #endif | ||
1705 | 1697 | ||
1706 | /* write out the thread status notes section */ | 1698 | /* write out the thread status notes section */ |
1707 | list_for_each(t, &thread_list) { | 1699 | list_for_each(t, &thread_list) { |
diff --git a/include/asm-powerpc/8xx_immap.h b/include/asm-powerpc/8xx_immap.h new file mode 100644 index 000000000000..1311cefdfd30 --- /dev/null +++ b/include/asm-powerpc/8xx_immap.h | |||
@@ -0,0 +1,564 @@ | |||
1 | /* | ||
2 | * MPC8xx Internal Memory Map | ||
3 | * Copyright (c) 1997 Dan Malek (dmalek@jlc.net) | ||
4 | * | ||
5 | * The I/O on the MPC860 is comprised of blocks of special registers | ||
6 | * and the dual port ram for the Communication Processor Module. | ||
7 | * Within this space are functional units such as the SIU, memory | ||
8 | * controller, system timers, and other control functions. It is | ||
9 | * a combination that I found difficult to separate into logical | ||
10 | * functional files.....but anyone else is welcome to try. -- Dan | ||
11 | */ | ||
12 | #ifdef __KERNEL__ | ||
13 | #ifndef __IMMAP_8XX__ | ||
14 | #define __IMMAP_8XX__ | ||
15 | |||
16 | /* System configuration registers. | ||
17 | */ | ||
18 | typedef struct sys_conf { | ||
19 | uint sc_siumcr; | ||
20 | uint sc_sypcr; | ||
21 | uint sc_swt; | ||
22 | char res1[2]; | ||
23 | ushort sc_swsr; | ||
24 | uint sc_sipend; | ||
25 | uint sc_simask; | ||
26 | uint sc_siel; | ||
27 | uint sc_sivec; | ||
28 | uint sc_tesr; | ||
29 | char res2[0xc]; | ||
30 | uint sc_sdcr; | ||
31 | char res3[0x4c]; | ||
32 | } sysconf8xx_t; | ||
33 | |||
34 | /* PCMCIA configuration registers. | ||
35 | */ | ||
36 | typedef struct pcmcia_conf { | ||
37 | uint pcmc_pbr0; | ||
38 | uint pcmc_por0; | ||
39 | uint pcmc_pbr1; | ||
40 | uint pcmc_por1; | ||
41 | uint pcmc_pbr2; | ||
42 | uint pcmc_por2; | ||
43 | uint pcmc_pbr3; | ||
44 | uint pcmc_por3; | ||
45 | uint pcmc_pbr4; | ||
46 | uint pcmc_por4; | ||
47 | uint pcmc_pbr5; | ||
48 | uint pcmc_por5; | ||
49 | uint pcmc_pbr6; | ||
50 | uint pcmc_por6; | ||
51 | uint pcmc_pbr7; | ||
52 | uint pcmc_por7; | ||
53 | char res1[0x20]; | ||
54 | uint pcmc_pgcra; | ||
55 | uint pcmc_pgcrb; | ||
56 | uint pcmc_pscr; | ||
57 | char res2[4]; | ||
58 | uint pcmc_pipr; | ||
59 | char res3[4]; | ||
60 | uint pcmc_per; | ||
61 | char res4[4]; | ||
62 | } pcmconf8xx_t; | ||
63 | |||
64 | /* Memory controller registers. | ||
65 | */ | ||
66 | typedef struct mem_ctlr { | ||
67 | uint memc_br0; | ||
68 | uint memc_or0; | ||
69 | uint memc_br1; | ||
70 | uint memc_or1; | ||
71 | uint memc_br2; | ||
72 | uint memc_or2; | ||
73 | uint memc_br3; | ||
74 | uint memc_or3; | ||
75 | uint memc_br4; | ||
76 | uint memc_or4; | ||
77 | uint memc_br5; | ||
78 | uint memc_or5; | ||
79 | uint memc_br6; | ||
80 | uint memc_or6; | ||
81 | uint memc_br7; | ||
82 | uint memc_or7; | ||
83 | char res1[0x24]; | ||
84 | uint memc_mar; | ||
85 | uint memc_mcr; | ||
86 | char res2[4]; | ||
87 | uint memc_mamr; | ||
88 | uint memc_mbmr; | ||
89 | ushort memc_mstat; | ||
90 | ushort memc_mptpr; | ||
91 | uint memc_mdr; | ||
92 | char res3[0x80]; | ||
93 | } memctl8xx_t; | ||
94 | |||
95 | /*----------------------------------------------------------------------- | ||
96 | * BR - Memory Controler: Base Register 16-9 | ||
97 | */ | ||
98 | #define BR_BA_MSK 0xffff8000 /* Base Address Mask */ | ||
99 | #define BR_AT_MSK 0x00007000 /* Address Type Mask */ | ||
100 | #define BR_PS_MSK 0x00000c00 /* Port Size Mask */ | ||
101 | #define BR_PS_32 0x00000000 /* 32 bit port size */ | ||
102 | #define BR_PS_16 0x00000800 /* 16 bit port size */ | ||
103 | #define BR_PS_8 0x00000400 /* 8 bit port size */ | ||
104 | #define BR_PARE 0x00000200 /* Parity Enable */ | ||
105 | #define BR_WP 0x00000100 /* Write Protect */ | ||
106 | #define BR_MS_MSK 0x000000c0 /* Machine Select Mask */ | ||
107 | #define BR_MS_GPCM 0x00000000 /* G.P.C.M. Machine Select */ | ||
108 | #define BR_MS_UPMA 0x00000080 /* U.P.M.A Machine Select */ | ||
109 | #define BR_MS_UPMB 0x000000c0 /* U.P.M.B Machine Select */ | ||
110 | #define BR_V 0x00000001 /* Bank Valid */ | ||
111 | |||
112 | /*----------------------------------------------------------------------- | ||
113 | * OR - Memory Controler: Option Register 16-11 | ||
114 | */ | ||
115 | #define OR_AM_MSK 0xffff8000 /* Address Mask Mask */ | ||
116 | #define OR_ATM_MSK 0x00007000 /* Address Type Mask Mask */ | ||
117 | #define OR_CSNT_SAM 0x00000800 /* Chip Select Negation Time/ Start */ | ||
118 | /* Address Multiplex */ | ||
119 | #define OR_ACS_MSK 0x00000600 /* Address to Chip Select Setup mask */ | ||
120 | #define OR_ACS_DIV1 0x00000000 /* CS is output at the same time */ | ||
121 | #define OR_ACS_DIV4 0x00000400 /* CS is output 1/4 a clock later */ | ||
122 | #define OR_ACS_DIV2 0x00000600 /* CS is output 1/2 a clock later */ | ||
123 | #define OR_G5LA 0x00000400 /* Output #GPL5 on #GPL_A5 */ | ||
124 | #define OR_G5LS 0x00000200 /* Drive #GPL high on falling edge of...*/ | ||
125 | #define OR_BI 0x00000100 /* Burst inhibit */ | ||
126 | #define OR_SCY_MSK 0x000000f0 /* Cycle Lenght in Clocks */ | ||
127 | #define OR_SCY_0_CLK 0x00000000 /* 0 clock cycles wait states */ | ||
128 | #define OR_SCY_1_CLK 0x00000010 /* 1 clock cycles wait states */ | ||
129 | #define OR_SCY_2_CLK 0x00000020 /* 2 clock cycles wait states */ | ||
130 | #define OR_SCY_3_CLK 0x00000030 /* 3 clock cycles wait states */ | ||
131 | #define OR_SCY_4_CLK 0x00000040 /* 4 clock cycles wait states */ | ||
132 | #define OR_SCY_5_CLK 0x00000050 /* 5 clock cycles wait states */ | ||
133 | #define OR_SCY_6_CLK 0x00000060 /* 6 clock cycles wait states */ | ||
134 | #define OR_SCY_7_CLK 0x00000070 /* 7 clock cycles wait states */ | ||
135 | #define OR_SCY_8_CLK 0x00000080 /* 8 clock cycles wait states */ | ||
136 | #define OR_SCY_9_CLK 0x00000090 /* 9 clock cycles wait states */ | ||
137 | #define OR_SCY_10_CLK 0x000000a0 /* 10 clock cycles wait states */ | ||
138 | #define OR_SCY_11_CLK 0x000000b0 /* 11 clock cycles wait states */ | ||
139 | #define OR_SCY_12_CLK 0x000000c0 /* 12 clock cycles wait states */ | ||
140 | #define OR_SCY_13_CLK 0x000000d0 /* 13 clock cycles wait states */ | ||
141 | #define OR_SCY_14_CLK 0x000000e0 /* 14 clock cycles wait states */ | ||
142 | #define OR_SCY_15_CLK 0x000000f0 /* 15 clock cycles wait states */ | ||
143 | #define OR_SETA 0x00000008 /* External Transfer Acknowledge */ | ||
144 | #define OR_TRLX 0x00000004 /* Timing Relaxed */ | ||
145 | #define OR_EHTR 0x00000002 /* Extended Hold Time on Read */ | ||
146 | |||
147 | /* System Integration Timers. | ||
148 | */ | ||
149 | typedef struct sys_int_timers { | ||
150 | ushort sit_tbscr; | ||
151 | char res0[0x02]; | ||
152 | uint sit_tbreff0; | ||
153 | uint sit_tbreff1; | ||
154 | char res1[0x14]; | ||
155 | ushort sit_rtcsc; | ||
156 | char res2[0x02]; | ||
157 | uint sit_rtc; | ||
158 | uint sit_rtsec; | ||
159 | uint sit_rtcal; | ||
160 | char res3[0x10]; | ||
161 | ushort sit_piscr; | ||
162 | char res4[2]; | ||
163 | uint sit_pitc; | ||
164 | uint sit_pitr; | ||
165 | char res5[0x34]; | ||
166 | } sit8xx_t; | ||
167 | |||
168 | #define TBSCR_TBIRQ_MASK ((ushort)0xff00) | ||
169 | #define TBSCR_REFA ((ushort)0x0080) | ||
170 | #define TBSCR_REFB ((ushort)0x0040) | ||
171 | #define TBSCR_REFAE ((ushort)0x0008) | ||
172 | #define TBSCR_REFBE ((ushort)0x0004) | ||
173 | #define TBSCR_TBF ((ushort)0x0002) | ||
174 | #define TBSCR_TBE ((ushort)0x0001) | ||
175 | |||
176 | #define RTCSC_RTCIRQ_MASK ((ushort)0xff00) | ||
177 | #define RTCSC_SEC ((ushort)0x0080) | ||
178 | #define RTCSC_ALR ((ushort)0x0040) | ||
179 | #define RTCSC_38K ((ushort)0x0010) | ||
180 | #define RTCSC_SIE ((ushort)0x0008) | ||
181 | #define RTCSC_ALE ((ushort)0x0004) | ||
182 | #define RTCSC_RTF ((ushort)0x0002) | ||
183 | #define RTCSC_RTE ((ushort)0x0001) | ||
184 | |||
185 | #define PISCR_PIRQ_MASK ((ushort)0xff00) | ||
186 | #define PISCR_PS ((ushort)0x0080) | ||
187 | #define PISCR_PIE ((ushort)0x0004) | ||
188 | #define PISCR_PTF ((ushort)0x0002) | ||
189 | #define PISCR_PTE ((ushort)0x0001) | ||
190 | |||
191 | /* Clocks and Reset. | ||
192 | */ | ||
193 | typedef struct clk_and_reset { | ||
194 | uint car_sccr; | ||
195 | uint car_plprcr; | ||
196 | uint car_rsr; | ||
197 | char res[0x74]; /* Reserved area */ | ||
198 | } car8xx_t; | ||
199 | |||
200 | /* System Integration Timers keys. | ||
201 | */ | ||
202 | typedef struct sitk { | ||
203 | uint sitk_tbscrk; | ||
204 | uint sitk_tbreff0k; | ||
205 | uint sitk_tbreff1k; | ||
206 | uint sitk_tbk; | ||
207 | char res1[0x10]; | ||
208 | uint sitk_rtcsck; | ||
209 | uint sitk_rtck; | ||
210 | uint sitk_rtseck; | ||
211 | uint sitk_rtcalk; | ||
212 | char res2[0x10]; | ||
213 | uint sitk_piscrk; | ||
214 | uint sitk_pitck; | ||
215 | char res3[0x38]; | ||
216 | } sitk8xx_t; | ||
217 | |||
218 | /* Clocks and reset keys. | ||
219 | */ | ||
220 | typedef struct cark { | ||
221 | uint cark_sccrk; | ||
222 | uint cark_plprcrk; | ||
223 | uint cark_rsrk; | ||
224 | char res[0x474]; | ||
225 | } cark8xx_t; | ||
226 | |||
227 | /* The key to unlock registers maintained by keep-alive power. | ||
228 | */ | ||
229 | #define KAPWR_KEY ((unsigned int)0x55ccaa33) | ||
230 | |||
231 | /* Video interface. MPC823 Only. | ||
232 | */ | ||
233 | typedef struct vid823 { | ||
234 | ushort vid_vccr; | ||
235 | ushort res1; | ||
236 | u_char vid_vsr; | ||
237 | u_char res2; | ||
238 | u_char vid_vcmr; | ||
239 | u_char res3; | ||
240 | uint vid_vbcb; | ||
241 | uint res4; | ||
242 | uint vid_vfcr0; | ||
243 | uint vid_vfaa0; | ||
244 | uint vid_vfba0; | ||
245 | uint vid_vfcr1; | ||
246 | uint vid_vfaa1; | ||
247 | uint vid_vfba1; | ||
248 | u_char res5[0x18]; | ||
249 | } vid823_t; | ||
250 | |||
251 | /* LCD interface. 823 Only. | ||
252 | */ | ||
253 | typedef struct lcd { | ||
254 | uint lcd_lccr; | ||
255 | uint lcd_lchcr; | ||
256 | uint lcd_lcvcr; | ||
257 | char res1[4]; | ||
258 | uint lcd_lcfaa; | ||
259 | uint lcd_lcfba; | ||
260 | char lcd_lcsr; | ||
261 | char res2[0x7]; | ||
262 | } lcd823_t; | ||
263 | |||
264 | /* I2C | ||
265 | */ | ||
266 | typedef struct i2c { | ||
267 | u_char i2c_i2mod; | ||
268 | char res1[3]; | ||
269 | u_char i2c_i2add; | ||
270 | char res2[3]; | ||
271 | u_char i2c_i2brg; | ||
272 | char res3[3]; | ||
273 | u_char i2c_i2com; | ||
274 | char res4[3]; | ||
275 | u_char i2c_i2cer; | ||
276 | char res5[3]; | ||
277 | u_char i2c_i2cmr; | ||
278 | char res6[0x8b]; | ||
279 | } i2c8xx_t; | ||
280 | |||
281 | /* DMA control/status registers. | ||
282 | */ | ||
283 | typedef struct sdma_csr { | ||
284 | char res1[4]; | ||
285 | uint sdma_sdar; | ||
286 | u_char sdma_sdsr; | ||
287 | char res3[3]; | ||
288 | u_char sdma_sdmr; | ||
289 | char res4[3]; | ||
290 | u_char sdma_idsr1; | ||
291 | char res5[3]; | ||
292 | u_char sdma_idmr1; | ||
293 | char res6[3]; | ||
294 | u_char sdma_idsr2; | ||
295 | char res7[3]; | ||
296 | u_char sdma_idmr2; | ||
297 | char res8[0x13]; | ||
298 | } sdma8xx_t; | ||
299 | |||
300 | /* Communication Processor Module Interrupt Controller. | ||
301 | */ | ||
302 | typedef struct cpm_ic { | ||
303 | ushort cpic_civr; | ||
304 | char res[0xe]; | ||
305 | uint cpic_cicr; | ||
306 | uint cpic_cipr; | ||
307 | uint cpic_cimr; | ||
308 | uint cpic_cisr; | ||
309 | } cpic8xx_t; | ||
310 | |||
311 | /* Input/Output Port control/status registers. | ||
312 | */ | ||
313 | typedef struct io_port { | ||
314 | ushort iop_padir; | ||
315 | ushort iop_papar; | ||
316 | ushort iop_paodr; | ||
317 | ushort iop_padat; | ||
318 | char res1[8]; | ||
319 | ushort iop_pcdir; | ||
320 | ushort iop_pcpar; | ||
321 | ushort iop_pcso; | ||
322 | ushort iop_pcdat; | ||
323 | ushort iop_pcint; | ||
324 | char res2[6]; | ||
325 | ushort iop_pddir; | ||
326 | ushort iop_pdpar; | ||
327 | char res3[2]; | ||
328 | ushort iop_pddat; | ||
329 | uint utmode; | ||
330 | char res4[4]; | ||
331 | } iop8xx_t; | ||
332 | |||
333 | /* Communication Processor Module Timers | ||
334 | */ | ||
335 | typedef struct cpm_timers { | ||
336 | ushort cpmt_tgcr; | ||
337 | char res1[0xe]; | ||
338 | ushort cpmt_tmr1; | ||
339 | ushort cpmt_tmr2; | ||
340 | ushort cpmt_trr1; | ||
341 | ushort cpmt_trr2; | ||
342 | ushort cpmt_tcr1; | ||
343 | ushort cpmt_tcr2; | ||
344 | ushort cpmt_tcn1; | ||
345 | ushort cpmt_tcn2; | ||
346 | ushort cpmt_tmr3; | ||
347 | ushort cpmt_tmr4; | ||
348 | ushort cpmt_trr3; | ||
349 | ushort cpmt_trr4; | ||
350 | ushort cpmt_tcr3; | ||
351 | ushort cpmt_tcr4; | ||
352 | ushort cpmt_tcn3; | ||
353 | ushort cpmt_tcn4; | ||
354 | ushort cpmt_ter1; | ||
355 | ushort cpmt_ter2; | ||
356 | ushort cpmt_ter3; | ||
357 | ushort cpmt_ter4; | ||
358 | char res2[8]; | ||
359 | } cpmtimer8xx_t; | ||
360 | |||
361 | /* Finally, the Communication Processor stuff..... | ||
362 | */ | ||
363 | typedef struct scc { /* Serial communication channels */ | ||
364 | uint scc_gsmrl; | ||
365 | uint scc_gsmrh; | ||
366 | ushort scc_psmr; | ||
367 | char res1[2]; | ||
368 | ushort scc_todr; | ||
369 | ushort scc_dsr; | ||
370 | ushort scc_scce; | ||
371 | char res2[2]; | ||
372 | ushort scc_sccm; | ||
373 | char res3; | ||
374 | u_char scc_sccs; | ||
375 | char res4[8]; | ||
376 | } scc_t; | ||
377 | |||
378 | typedef struct smc { /* Serial management channels */ | ||
379 | char res1[2]; | ||
380 | ushort smc_smcmr; | ||
381 | char res2[2]; | ||
382 | u_char smc_smce; | ||
383 | char res3[3]; | ||
384 | u_char smc_smcm; | ||
385 | char res4[5]; | ||
386 | } smc_t; | ||
387 | |||
388 | /* MPC860T Fast Ethernet Controller. It isn't part of the CPM, but | ||
389 | * it fits within the address space. | ||
390 | */ | ||
391 | |||
392 | typedef struct fec { | ||
393 | uint fec_addr_low; /* lower 32 bits of station address */ | ||
394 | ushort fec_addr_high; /* upper 16 bits of station address */ | ||
395 | ushort res1; /* reserved */ | ||
396 | uint fec_hash_table_high; /* upper 32-bits of hash table */ | ||
397 | uint fec_hash_table_low; /* lower 32-bits of hash table */ | ||
398 | uint fec_r_des_start; /* beginning of Rx descriptor ring */ | ||
399 | uint fec_x_des_start; /* beginning of Tx descriptor ring */ | ||
400 | uint fec_r_buff_size; /* Rx buffer size */ | ||
401 | uint res2[9]; /* reserved */ | ||
402 | uint fec_ecntrl; /* ethernet control register */ | ||
403 | uint fec_ievent; /* interrupt event register */ | ||
404 | uint fec_imask; /* interrupt mask register */ | ||
405 | uint fec_ivec; /* interrupt level and vector status */ | ||
406 | uint fec_r_des_active; /* Rx ring updated flag */ | ||
407 | uint fec_x_des_active; /* Tx ring updated flag */ | ||
408 | uint res3[10]; /* reserved */ | ||
409 | uint fec_mii_data; /* MII data register */ | ||
410 | uint fec_mii_speed; /* MII speed control register */ | ||
411 | uint res4[17]; /* reserved */ | ||
412 | uint fec_r_bound; /* end of RAM (read-only) */ | ||
413 | uint fec_r_fstart; /* Rx FIFO start address */ | ||
414 | uint res5[6]; /* reserved */ | ||
415 | uint fec_x_fstart; /* Tx FIFO start address */ | ||
416 | uint res6[17]; /* reserved */ | ||
417 | uint fec_fun_code; /* fec SDMA function code */ | ||
418 | uint res7[3]; /* reserved */ | ||
419 | uint fec_r_cntrl; /* Rx control register */ | ||
420 | uint fec_r_hash; /* Rx hash register */ | ||
421 | uint res8[14]; /* reserved */ | ||
422 | uint fec_x_cntrl; /* Tx control register */ | ||
423 | uint res9[0x1e]; /* reserved */ | ||
424 | } fec_t; | ||
425 | |||
426 | /* The FEC and LCD color map share the same address space.... | ||
427 | * I guess we will never see an 823T :-). | ||
428 | */ | ||
429 | union fec_lcd { | ||
430 | fec_t fl_un_fec; | ||
431 | u_char fl_un_cmap[0x200]; | ||
432 | }; | ||
433 | |||
434 | typedef struct comm_proc { | ||
435 | /* General control and status registers. | ||
436 | */ | ||
437 | ushort cp_cpcr; | ||
438 | u_char res1[2]; | ||
439 | ushort cp_rccr; | ||
440 | u_char res2; | ||
441 | u_char cp_rmds; | ||
442 | u_char res3[4]; | ||
443 | ushort cp_cpmcr1; | ||
444 | ushort cp_cpmcr2; | ||
445 | ushort cp_cpmcr3; | ||
446 | ushort cp_cpmcr4; | ||
447 | u_char res4[2]; | ||
448 | ushort cp_rter; | ||
449 | u_char res5[2]; | ||
450 | ushort cp_rtmr; | ||
451 | u_char res6[0x14]; | ||
452 | |||
453 | /* Baud rate generators. | ||
454 | */ | ||
455 | uint cp_brgc1; | ||
456 | uint cp_brgc2; | ||
457 | uint cp_brgc3; | ||
458 | uint cp_brgc4; | ||
459 | |||
460 | /* Serial Communication Channels. | ||
461 | */ | ||
462 | scc_t cp_scc[4]; | ||
463 | |||
464 | /* Serial Management Channels. | ||
465 | */ | ||
466 | smc_t cp_smc[2]; | ||
467 | |||
468 | /* Serial Peripheral Interface. | ||
469 | */ | ||
470 | ushort cp_spmode; | ||
471 | u_char res7[4]; | ||
472 | u_char cp_spie; | ||
473 | u_char res8[3]; | ||
474 | u_char cp_spim; | ||
475 | u_char res9[2]; | ||
476 | u_char cp_spcom; | ||
477 | u_char res10[2]; | ||
478 | |||
479 | /* Parallel Interface Port. | ||
480 | */ | ||
481 | u_char res11[2]; | ||
482 | ushort cp_pipc; | ||
483 | u_char res12[2]; | ||
484 | ushort cp_ptpr; | ||
485 | uint cp_pbdir; | ||
486 | uint cp_pbpar; | ||
487 | u_char res13[2]; | ||
488 | ushort cp_pbodr; | ||
489 | uint cp_pbdat; | ||
490 | |||
491 | /* Port E - MPC87x/88x only. | ||
492 | */ | ||
493 | uint cp_pedir; | ||
494 | uint cp_pepar; | ||
495 | uint cp_peso; | ||
496 | uint cp_peodr; | ||
497 | uint cp_pedat; | ||
498 | |||
499 | /* Communications Processor Timing Register - | ||
500 | Contains RMII Timing for the FECs on MPC87x/88x only. | ||
501 | */ | ||
502 | uint cp_cptr; | ||
503 | |||
504 | /* Serial Interface and Time Slot Assignment. | ||
505 | */ | ||
506 | uint cp_simode; | ||
507 | u_char cp_sigmr; | ||
508 | u_char res15; | ||
509 | u_char cp_sistr; | ||
510 | u_char cp_sicmr; | ||
511 | u_char res16[4]; | ||
512 | uint cp_sicr; | ||
513 | uint cp_sirp; | ||
514 | u_char res17[0xc]; | ||
515 | |||
516 | /* 256 bytes of MPC823 video controller RAM array. | ||
517 | */ | ||
518 | u_char cp_vcram[0x100]; | ||
519 | u_char cp_siram[0x200]; | ||
520 | |||
521 | /* The fast ethernet controller is not really part of the CPM, | ||
522 | * but it resides in the address space. | ||
523 | * The LCD color map is also here. | ||
524 | */ | ||
525 | union fec_lcd fl_un; | ||
526 | #define cp_fec fl_un.fl_un_fec | ||
527 | #define lcd_cmap fl_un.fl_un_cmap | ||
528 | char res18[0xE00]; | ||
529 | |||
530 | /* The DUET family has a second FEC here */ | ||
531 | fec_t cp_fec2; | ||
532 | #define cp_fec1 cp_fec /* consistency macro */ | ||
533 | |||
534 | /* Dual Ported RAM follows. | ||
535 | * There are many different formats for this memory area | ||
536 | * depending upon the devices used and options chosen. | ||
537 | * Some processors don't have all of it populated. | ||
538 | */ | ||
539 | u_char cp_dpmem[0x1C00]; /* BD / Data / ucode */ | ||
540 | u_char cp_dparam[0x400]; /* Parameter RAM */ | ||
541 | } cpm8xx_t; | ||
542 | |||
543 | /* Internal memory map. | ||
544 | */ | ||
545 | typedef struct immap { | ||
546 | sysconf8xx_t im_siu_conf; /* SIU Configuration */ | ||
547 | pcmconf8xx_t im_pcmcia; /* PCMCIA Configuration */ | ||
548 | memctl8xx_t im_memctl; /* Memory Controller */ | ||
549 | sit8xx_t im_sit; /* System integration timers */ | ||
550 | car8xx_t im_clkrst; /* Clocks and reset */ | ||
551 | sitk8xx_t im_sitk; /* Sys int timer keys */ | ||
552 | cark8xx_t im_clkrstk; /* Clocks and reset keys */ | ||
553 | vid823_t im_vid; /* Video (823 only) */ | ||
554 | lcd823_t im_lcd; /* LCD (823 only) */ | ||
555 | i2c8xx_t im_i2c; /* I2C control/status */ | ||
556 | sdma8xx_t im_sdma; /* SDMA control/status */ | ||
557 | cpic8xx_t im_cpic; /* CPM Interrupt Controller */ | ||
558 | iop8xx_t im_ioport; /* IO Port control/status */ | ||
559 | cpmtimer8xx_t im_cpmtimer; /* CPM timers */ | ||
560 | cpm8xx_t im_cpm; /* Communication processor */ | ||
561 | } immap_t; | ||
562 | |||
563 | #endif /* __IMMAP_8XX__ */ | ||
564 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index c44810b9d322..f3fc733758f5 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * PowerPC atomic operations | 5 | * PowerPC atomic operations |
6 | */ | 6 | */ |
7 | 7 | ||
8 | typedef struct { volatile int counter; } atomic_t; | 8 | typedef struct { int counter; } atomic_t; |
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
@@ -15,8 +15,19 @@ typedef struct { volatile int counter; } atomic_t; | |||
15 | 15 | ||
16 | #define ATOMIC_INIT(i) { (i) } | 16 | #define ATOMIC_INIT(i) { (i) } |
17 | 17 | ||
18 | #define atomic_read(v) ((v)->counter) | 18 | static __inline__ int atomic_read(const atomic_t *v) |
19 | #define atomic_set(v,i) (((v)->counter) = (i)) | 19 | { |
20 | int t; | ||
21 | |||
22 | __asm__ __volatile__("lwz%U1%X1 %0,%1" : "=r"(t) : "m"(v->counter)); | ||
23 | |||
24 | return t; | ||
25 | } | ||
26 | |||
27 | static __inline__ void atomic_set(atomic_t *v, int i) | ||
28 | { | ||
29 | __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i)); | ||
30 | } | ||
20 | 31 | ||
21 | static __inline__ void atomic_add(int a, atomic_t *v) | 32 | static __inline__ void atomic_add(int a, atomic_t *v) |
22 | { | 33 | { |
@@ -240,12 +251,23 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) | |||
240 | 251 | ||
241 | #ifdef __powerpc64__ | 252 | #ifdef __powerpc64__ |
242 | 253 | ||
243 | typedef struct { volatile long counter; } atomic64_t; | 254 | typedef struct { long counter; } atomic64_t; |
244 | 255 | ||
245 | #define ATOMIC64_INIT(i) { (i) } | 256 | #define ATOMIC64_INIT(i) { (i) } |
246 | 257 | ||
247 | #define atomic64_read(v) ((v)->counter) | 258 | static __inline__ long atomic64_read(const atomic64_t *v) |
248 | #define atomic64_set(v,i) (((v)->counter) = (i)) | 259 | { |
260 | long t; | ||
261 | |||
262 | __asm__ __volatile__("ld%U1%X1 %0,%1" : "=r"(t) : "m"(v->counter)); | ||
263 | |||
264 | return t; | ||
265 | } | ||
266 | |||
267 | static __inline__ void atomic64_set(atomic64_t *v, long i) | ||
268 | { | ||
269 | __asm__ __volatile__("std%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i)); | ||
270 | } | ||
249 | 271 | ||
250 | static __inline__ void atomic64_add(long a, atomic64_t *v) | 272 | static __inline__ void atomic64_add(long a, atomic64_t *v) |
251 | { | 273 | { |
diff --git a/include/asm-powerpc/clk_interface.h b/include/asm-powerpc/clk_interface.h new file mode 100644 index 000000000000..ab1882c1e176 --- /dev/null +++ b/include/asm-powerpc/clk_interface.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef __ASM_POWERPC_CLK_INTERFACE_H | ||
2 | #define __ASM_POWERPC_CLK_INTERFACE_H | ||
3 | |||
4 | #include <linux/clk.h> | ||
5 | |||
6 | struct clk_interface { | ||
7 | struct clk* (*clk_get) (struct device *dev, const char *id); | ||
8 | int (*clk_enable) (struct clk *clk); | ||
9 | void (*clk_disable) (struct clk *clk); | ||
10 | unsigned long (*clk_get_rate) (struct clk *clk); | ||
11 | void (*clk_put) (struct clk *clk); | ||
12 | long (*clk_round_rate) (struct clk *clk, unsigned long rate); | ||
13 | int (*clk_set_rate) (struct clk *clk, unsigned long rate); | ||
14 | int (*clk_set_parent) (struct clk *clk, struct clk *parent); | ||
15 | struct clk* (*clk_get_parent) (struct clk *clk); | ||
16 | }; | ||
17 | |||
18 | extern struct clk_interface clk_functions; | ||
19 | |||
20 | #endif /* __ASM_POWERPC_CLK_INTERFACE_H */ | ||
diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h new file mode 100644 index 000000000000..397248705e0e --- /dev/null +++ b/include/asm-powerpc/commproc.h | |||
@@ -0,0 +1,692 @@ | |||
1 | /* | ||
2 | * MPC8xx Communication Processor Module. | ||
3 | * Copyright (c) 1997 Dan Malek (dmalek@jlc.net) | ||
4 | * | ||
5 | * This file contains structures and information for the communication | ||
6 | * processor channels. Some CPM control and status is available | ||
7 | * throught the MPC8xx internal memory map. See immap.h for details. | ||
8 | * This file only contains what I need for the moment, not the total | ||
9 | * CPM capabilities. I (or someone else) will add definitions as they | ||
10 | * are needed. -- Dan | ||
11 | * | ||
12 | * On the MBX board, EPPC-Bug loads CPM microcode into the first 512 | ||
13 | * bytes of the DP RAM and relocates the I2C parameter area to the | ||
14 | * IDMA1 space. The remaining DP RAM is available for buffer descriptors | ||
15 | * or other use. | ||
16 | */ | ||
17 | #ifndef __CPM_8XX__ | ||
18 | #define __CPM_8XX__ | ||
19 | |||
20 | #include <asm/8xx_immap.h> | ||
21 | #include <asm/ptrace.h> | ||
22 | |||
23 | /* CPM Command register. | ||
24 | */ | ||
25 | #define CPM_CR_RST ((ushort)0x8000) | ||
26 | #define CPM_CR_OPCODE ((ushort)0x0f00) | ||
27 | #define CPM_CR_CHAN ((ushort)0x00f0) | ||
28 | #define CPM_CR_FLG ((ushort)0x0001) | ||
29 | |||
30 | /* Some commands (there are more...later) | ||
31 | */ | ||
32 | #define CPM_CR_INIT_TRX ((ushort)0x0000) | ||
33 | #define CPM_CR_INIT_RX ((ushort)0x0001) | ||
34 | #define CPM_CR_INIT_TX ((ushort)0x0002) | ||
35 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) | ||
36 | #define CPM_CR_STOP_TX ((ushort)0x0004) | ||
37 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) | ||
38 | #define CPM_CR_RESTART_TX ((ushort)0x0006) | ||
39 | #define CPM_CR_CLOSE_RX_BD ((ushort)0x0007) | ||
40 | #define CPM_CR_SET_GADDR ((ushort)0x0008) | ||
41 | #define CPM_CR_SET_TIMER CPM_CR_SET_GADDR | ||
42 | |||
43 | /* Channel numbers. | ||
44 | */ | ||
45 | #define CPM_CR_CH_SCC1 ((ushort)0x0000) | ||
46 | #define CPM_CR_CH_I2C ((ushort)0x0001) /* I2C and IDMA1 */ | ||
47 | #define CPM_CR_CH_SCC2 ((ushort)0x0004) | ||
48 | #define CPM_CR_CH_SPI ((ushort)0x0005) /* SPI / IDMA2 / Timers */ | ||
49 | #define CPM_CR_CH_TIMER CPM_CR_CH_SPI | ||
50 | #define CPM_CR_CH_SCC3 ((ushort)0x0008) | ||
51 | #define CPM_CR_CH_SMC1 ((ushort)0x0009) /* SMC1 / DSP1 */ | ||
52 | #define CPM_CR_CH_SCC4 ((ushort)0x000c) | ||
53 | #define CPM_CR_CH_SMC2 ((ushort)0x000d) /* SMC2 / DSP2 */ | ||
54 | |||
55 | #define mk_cr_cmd(CH, CMD) ((CMD << 8) | (CH << 4)) | ||
56 | |||
57 | /* The dual ported RAM is multi-functional. Some areas can be (and are | ||
58 | * being) used for microcode. There is an area that can only be used | ||
59 | * as data ram for buffer descriptors, which is all we use right now. | ||
60 | * Currently the first 512 and last 256 bytes are used for microcode. | ||
61 | */ | ||
62 | #define CPM_DATAONLY_BASE ((uint)0x0800) | ||
63 | #define CPM_DATAONLY_SIZE ((uint)0x0700) | ||
64 | #define CPM_DP_NOSPACE ((uint)0x7fffffff) | ||
65 | |||
66 | /* Export the base address of the communication processor registers | ||
67 | * and dual port ram. | ||
68 | */ | ||
69 | extern cpm8xx_t *cpmp; /* Pointer to comm processor */ | ||
70 | extern unsigned long cpm_dpalloc(uint size, uint align); | ||
71 | extern int cpm_dpfree(unsigned long offset); | ||
72 | extern unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align); | ||
73 | extern void cpm_dpdump(void); | ||
74 | extern void *cpm_dpram_addr(unsigned long offset); | ||
75 | extern uint cpm_dpram_phys(u8* addr); | ||
76 | extern void cpm_setbrg(uint brg, uint rate); | ||
77 | |||
78 | extern uint m8xx_cpm_hostalloc(uint size); | ||
79 | extern int m8xx_cpm_hostfree(uint start); | ||
80 | extern void m8xx_cpm_hostdump(void); | ||
81 | |||
82 | extern void cpm_load_patch(volatile immap_t *immr); | ||
83 | |||
84 | /* Buffer descriptors used by many of the CPM protocols. | ||
85 | */ | ||
86 | typedef struct cpm_buf_desc { | ||
87 | ushort cbd_sc; /* Status and Control */ | ||
88 | ushort cbd_datlen; /* Data length in buffer */ | ||
89 | uint cbd_bufaddr; /* Buffer address in host memory */ | ||
90 | } cbd_t; | ||
91 | |||
92 | #define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */ | ||
93 | #define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */ | ||
94 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */ | ||
95 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ | ||
96 | #define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame */ | ||
97 | #define BD_SC_TC ((ushort)0x0400) /* Transmit CRC */ | ||
98 | #define BD_SC_CM ((ushort)0x0200) /* Continous mode */ | ||
99 | #define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */ | ||
100 | #define BD_SC_P ((ushort)0x0100) /* xmt preamble */ | ||
101 | #define BD_SC_BR ((ushort)0x0020) /* Break received */ | ||
102 | #define BD_SC_FR ((ushort)0x0010) /* Framing error */ | ||
103 | #define BD_SC_PR ((ushort)0x0008) /* Parity error */ | ||
104 | #define BD_SC_NAK ((ushort)0x0004) /* NAK - did not respond */ | ||
105 | #define BD_SC_OV ((ushort)0x0002) /* Overrun */ | ||
106 | #define BD_SC_UN ((ushort)0x0002) /* Underrun */ | ||
107 | #define BD_SC_CD ((ushort)0x0001) /* ?? */ | ||
108 | #define BD_SC_CL ((ushort)0x0001) /* Collision */ | ||
109 | |||
110 | /* Parameter RAM offsets. | ||
111 | */ | ||
112 | #define PROFF_SCC1 ((uint)0x0000) | ||
113 | #define PROFF_IIC ((uint)0x0080) | ||
114 | #define PROFF_SCC2 ((uint)0x0100) | ||
115 | #define PROFF_SPI ((uint)0x0180) | ||
116 | #define PROFF_SCC3 ((uint)0x0200) | ||
117 | #define PROFF_SMC1 ((uint)0x0280) | ||
118 | #define PROFF_SCC4 ((uint)0x0300) | ||
119 | #define PROFF_SMC2 ((uint)0x0380) | ||
120 | |||
121 | /* Define enough so I can at least use the serial port as a UART. | ||
122 | * The MBX uses SMC1 as the host serial port. | ||
123 | */ | ||
124 | typedef struct smc_uart { | ||
125 | ushort smc_rbase; /* Rx Buffer descriptor base address */ | ||
126 | ushort smc_tbase; /* Tx Buffer descriptor base address */ | ||
127 | u_char smc_rfcr; /* Rx function code */ | ||
128 | u_char smc_tfcr; /* Tx function code */ | ||
129 | ushort smc_mrblr; /* Max receive buffer length */ | ||
130 | uint smc_rstate; /* Internal */ | ||
131 | uint smc_idp; /* Internal */ | ||
132 | ushort smc_rbptr; /* Internal */ | ||
133 | ushort smc_ibc; /* Internal */ | ||
134 | uint smc_rxtmp; /* Internal */ | ||
135 | uint smc_tstate; /* Internal */ | ||
136 | uint smc_tdp; /* Internal */ | ||
137 | ushort smc_tbptr; /* Internal */ | ||
138 | ushort smc_tbc; /* Internal */ | ||
139 | uint smc_txtmp; /* Internal */ | ||
140 | ushort smc_maxidl; /* Maximum idle characters */ | ||
141 | ushort smc_tmpidl; /* Temporary idle counter */ | ||
142 | ushort smc_brklen; /* Last received break length */ | ||
143 | ushort smc_brkec; /* rcv'd break condition counter */ | ||
144 | ushort smc_brkcr; /* xmt break count register */ | ||
145 | ushort smc_rmask; /* Temporary bit mask */ | ||
146 | char res1[8]; /* Reserved */ | ||
147 | ushort smc_rpbase; /* Relocation pointer */ | ||
148 | } smc_uart_t; | ||
149 | |||
150 | /* Function code bits. | ||
151 | */ | ||
152 | #define SMC_EB ((u_char)0x10) /* Set big endian byte order */ | ||
153 | |||
154 | /* SMC uart mode register. | ||
155 | */ | ||
156 | #define SMCMR_REN ((ushort)0x0001) | ||
157 | #define SMCMR_TEN ((ushort)0x0002) | ||
158 | #define SMCMR_DM ((ushort)0x000c) | ||
159 | #define SMCMR_SM_GCI ((ushort)0x0000) | ||
160 | #define SMCMR_SM_UART ((ushort)0x0020) | ||
161 | #define SMCMR_SM_TRANS ((ushort)0x0030) | ||
162 | #define SMCMR_SM_MASK ((ushort)0x0030) | ||
163 | #define SMCMR_PM_EVEN ((ushort)0x0100) /* Even parity, else odd */ | ||
164 | #define SMCMR_REVD SMCMR_PM_EVEN | ||
165 | #define SMCMR_PEN ((ushort)0x0200) /* Parity enable */ | ||
166 | #define SMCMR_BS SMCMR_PEN | ||
167 | #define SMCMR_SL ((ushort)0x0400) /* Two stops, else one */ | ||
168 | #define SMCR_CLEN_MASK ((ushort)0x7800) /* Character length */ | ||
169 | #define smcr_mk_clen(C) (((C) << 11) & SMCR_CLEN_MASK) | ||
170 | |||
171 | /* SMC2 as Centronics parallel printer. It is half duplex, in that | ||
172 | * it can only receive or transmit. The parameter ram values for | ||
173 | * each direction are either unique or properly overlap, so we can | ||
174 | * include them in one structure. | ||
175 | */ | ||
176 | typedef struct smc_centronics { | ||
177 | ushort scent_rbase; | ||
178 | ushort scent_tbase; | ||
179 | u_char scent_cfcr; | ||
180 | u_char scent_smask; | ||
181 | ushort scent_mrblr; | ||
182 | uint scent_rstate; | ||
183 | uint scent_r_ptr; | ||
184 | ushort scent_rbptr; | ||
185 | ushort scent_r_cnt; | ||
186 | uint scent_rtemp; | ||
187 | uint scent_tstate; | ||
188 | uint scent_t_ptr; | ||
189 | ushort scent_tbptr; | ||
190 | ushort scent_t_cnt; | ||
191 | uint scent_ttemp; | ||
192 | ushort scent_max_sl; | ||
193 | ushort scent_sl_cnt; | ||
194 | ushort scent_character1; | ||
195 | ushort scent_character2; | ||
196 | ushort scent_character3; | ||
197 | ushort scent_character4; | ||
198 | ushort scent_character5; | ||
199 | ushort scent_character6; | ||
200 | ushort scent_character7; | ||
201 | ushort scent_character8; | ||
202 | ushort scent_rccm; | ||
203 | ushort scent_rccr; | ||
204 | } smc_cent_t; | ||
205 | |||
206 | /* Centronics Status Mask Register. | ||
207 | */ | ||
208 | #define SMC_CENT_F ((u_char)0x08) | ||
209 | #define SMC_CENT_PE ((u_char)0x04) | ||
210 | #define SMC_CENT_S ((u_char)0x02) | ||
211 | |||
212 | /* SMC Event and Mask register. | ||
213 | */ | ||
214 | #define SMCM_BRKE ((unsigned char)0x40) /* When in UART Mode */ | ||
215 | #define SMCM_BRK ((unsigned char)0x10) /* When in UART Mode */ | ||
216 | #define SMCM_TXE ((unsigned char)0x10) /* When in Transparent Mode */ | ||
217 | #define SMCM_BSY ((unsigned char)0x04) | ||
218 | #define SMCM_TX ((unsigned char)0x02) | ||
219 | #define SMCM_RX ((unsigned char)0x01) | ||
220 | |||
221 | /* Baud rate generators. | ||
222 | */ | ||
223 | #define CPM_BRG_RST ((uint)0x00020000) | ||
224 | #define CPM_BRG_EN ((uint)0x00010000) | ||
225 | #define CPM_BRG_EXTC_INT ((uint)0x00000000) | ||
226 | #define CPM_BRG_EXTC_CLK2 ((uint)0x00004000) | ||
227 | #define CPM_BRG_EXTC_CLK6 ((uint)0x00008000) | ||
228 | #define CPM_BRG_ATB ((uint)0x00002000) | ||
229 | #define CPM_BRG_CD_MASK ((uint)0x00001ffe) | ||
230 | #define CPM_BRG_DIV16 ((uint)0x00000001) | ||
231 | |||
232 | /* SI Clock Route Register | ||
233 | */ | ||
234 | #define SICR_RCLK_SCC1_BRG1 ((uint)0x00000000) | ||
235 | #define SICR_TCLK_SCC1_BRG1 ((uint)0x00000000) | ||
236 | #define SICR_RCLK_SCC2_BRG2 ((uint)0x00000800) | ||
237 | #define SICR_TCLK_SCC2_BRG2 ((uint)0x00000100) | ||
238 | #define SICR_RCLK_SCC3_BRG3 ((uint)0x00100000) | ||
239 | #define SICR_TCLK_SCC3_BRG3 ((uint)0x00020000) | ||
240 | #define SICR_RCLK_SCC4_BRG4 ((uint)0x18000000) | ||
241 | #define SICR_TCLK_SCC4_BRG4 ((uint)0x03000000) | ||
242 | |||
243 | /* SCCs. | ||
244 | */ | ||
245 | #define SCC_GSMRH_IRP ((uint)0x00040000) | ||
246 | #define SCC_GSMRH_GDE ((uint)0x00010000) | ||
247 | #define SCC_GSMRH_TCRC_CCITT ((uint)0x00008000) | ||
248 | #define SCC_GSMRH_TCRC_BISYNC ((uint)0x00004000) | ||
249 | #define SCC_GSMRH_TCRC_HDLC ((uint)0x00000000) | ||
250 | #define SCC_GSMRH_REVD ((uint)0x00002000) | ||
251 | #define SCC_GSMRH_TRX ((uint)0x00001000) | ||
252 | #define SCC_GSMRH_TTX ((uint)0x00000800) | ||
253 | #define SCC_GSMRH_CDP ((uint)0x00000400) | ||
254 | #define SCC_GSMRH_CTSP ((uint)0x00000200) | ||
255 | #define SCC_GSMRH_CDS ((uint)0x00000100) | ||
256 | #define SCC_GSMRH_CTSS ((uint)0x00000080) | ||
257 | #define SCC_GSMRH_TFL ((uint)0x00000040) | ||
258 | #define SCC_GSMRH_RFW ((uint)0x00000020) | ||
259 | #define SCC_GSMRH_TXSY ((uint)0x00000010) | ||
260 | #define SCC_GSMRH_SYNL16 ((uint)0x0000000c) | ||
261 | #define SCC_GSMRH_SYNL8 ((uint)0x00000008) | ||
262 | #define SCC_GSMRH_SYNL4 ((uint)0x00000004) | ||
263 | #define SCC_GSMRH_RTSM ((uint)0x00000002) | ||
264 | #define SCC_GSMRH_RSYN ((uint)0x00000001) | ||
265 | |||
266 | #define SCC_GSMRL_SIR ((uint)0x80000000) /* SCC2 only */ | ||
267 | #define SCC_GSMRL_EDGE_NONE ((uint)0x60000000) | ||
268 | #define SCC_GSMRL_EDGE_NEG ((uint)0x40000000) | ||
269 | #define SCC_GSMRL_EDGE_POS ((uint)0x20000000) | ||
270 | #define SCC_GSMRL_EDGE_BOTH ((uint)0x00000000) | ||
271 | #define SCC_GSMRL_TCI ((uint)0x10000000) | ||
272 | #define SCC_GSMRL_TSNC_3 ((uint)0x0c000000) | ||
273 | #define SCC_GSMRL_TSNC_4 ((uint)0x08000000) | ||
274 | #define SCC_GSMRL_TSNC_14 ((uint)0x04000000) | ||
275 | #define SCC_GSMRL_TSNC_INF ((uint)0x00000000) | ||
276 | #define SCC_GSMRL_RINV ((uint)0x02000000) | ||
277 | #define SCC_GSMRL_TINV ((uint)0x01000000) | ||
278 | #define SCC_GSMRL_TPL_128 ((uint)0x00c00000) | ||
279 | #define SCC_GSMRL_TPL_64 ((uint)0x00a00000) | ||
280 | #define SCC_GSMRL_TPL_48 ((uint)0x00800000) | ||
281 | #define SCC_GSMRL_TPL_32 ((uint)0x00600000) | ||
282 | #define SCC_GSMRL_TPL_16 ((uint)0x00400000) | ||
283 | #define SCC_GSMRL_TPL_8 ((uint)0x00200000) | ||
284 | #define SCC_GSMRL_TPL_NONE ((uint)0x00000000) | ||
285 | #define SCC_GSMRL_TPP_ALL1 ((uint)0x00180000) | ||
286 | #define SCC_GSMRL_TPP_01 ((uint)0x00100000) | ||
287 | #define SCC_GSMRL_TPP_10 ((uint)0x00080000) | ||
288 | #define SCC_GSMRL_TPP_ZEROS ((uint)0x00000000) | ||
289 | #define SCC_GSMRL_TEND ((uint)0x00040000) | ||
290 | #define SCC_GSMRL_TDCR_32 ((uint)0x00030000) | ||
291 | #define SCC_GSMRL_TDCR_16 ((uint)0x00020000) | ||
292 | #define SCC_GSMRL_TDCR_8 ((uint)0x00010000) | ||
293 | #define SCC_GSMRL_TDCR_1 ((uint)0x00000000) | ||
294 | #define SCC_GSMRL_RDCR_32 ((uint)0x0000c000) | ||
295 | #define SCC_GSMRL_RDCR_16 ((uint)0x00008000) | ||
296 | #define SCC_GSMRL_RDCR_8 ((uint)0x00004000) | ||
297 | #define SCC_GSMRL_RDCR_1 ((uint)0x00000000) | ||
298 | #define SCC_GSMRL_RENC_DFMAN ((uint)0x00003000) | ||
299 | #define SCC_GSMRL_RENC_MANCH ((uint)0x00002000) | ||
300 | #define SCC_GSMRL_RENC_FM0 ((uint)0x00001000) | ||
301 | #define SCC_GSMRL_RENC_NRZI ((uint)0x00000800) | ||
302 | #define SCC_GSMRL_RENC_NRZ ((uint)0x00000000) | ||
303 | #define SCC_GSMRL_TENC_DFMAN ((uint)0x00000600) | ||
304 | #define SCC_GSMRL_TENC_MANCH ((uint)0x00000400) | ||
305 | #define SCC_GSMRL_TENC_FM0 ((uint)0x00000200) | ||
306 | #define SCC_GSMRL_TENC_NRZI ((uint)0x00000100) | ||
307 | #define SCC_GSMRL_TENC_NRZ ((uint)0x00000000) | ||
308 | #define SCC_GSMRL_DIAG_LE ((uint)0x000000c0) /* Loop and echo */ | ||
309 | #define SCC_GSMRL_DIAG_ECHO ((uint)0x00000080) | ||
310 | #define SCC_GSMRL_DIAG_LOOP ((uint)0x00000040) | ||
311 | #define SCC_GSMRL_DIAG_NORM ((uint)0x00000000) | ||
312 | #define SCC_GSMRL_ENR ((uint)0x00000020) | ||
313 | #define SCC_GSMRL_ENT ((uint)0x00000010) | ||
314 | #define SCC_GSMRL_MODE_ENET ((uint)0x0000000c) | ||
315 | #define SCC_GSMRL_MODE_QMC ((uint)0x0000000a) | ||
316 | #define SCC_GSMRL_MODE_DDCMP ((uint)0x00000009) | ||
317 | #define SCC_GSMRL_MODE_BISYNC ((uint)0x00000008) | ||
318 | #define SCC_GSMRL_MODE_V14 ((uint)0x00000007) | ||
319 | #define SCC_GSMRL_MODE_AHDLC ((uint)0x00000006) | ||
320 | #define SCC_GSMRL_MODE_PROFIBUS ((uint)0x00000005) | ||
321 | #define SCC_GSMRL_MODE_UART ((uint)0x00000004) | ||
322 | #define SCC_GSMRL_MODE_SS7 ((uint)0x00000003) | ||
323 | #define SCC_GSMRL_MODE_ATALK ((uint)0x00000002) | ||
324 | #define SCC_GSMRL_MODE_HDLC ((uint)0x00000000) | ||
325 | |||
326 | #define SCC_TODR_TOD ((ushort)0x8000) | ||
327 | |||
328 | /* SCC Event and Mask register. | ||
329 | */ | ||
330 | #define SCCM_TXE ((unsigned char)0x10) | ||
331 | #define SCCM_BSY ((unsigned char)0x04) | ||
332 | #define SCCM_TX ((unsigned char)0x02) | ||
333 | #define SCCM_RX ((unsigned char)0x01) | ||
334 | |||
335 | typedef struct scc_param { | ||
336 | ushort scc_rbase; /* Rx Buffer descriptor base address */ | ||
337 | ushort scc_tbase; /* Tx Buffer descriptor base address */ | ||
338 | u_char scc_rfcr; /* Rx function code */ | ||
339 | u_char scc_tfcr; /* Tx function code */ | ||
340 | ushort scc_mrblr; /* Max receive buffer length */ | ||
341 | uint scc_rstate; /* Internal */ | ||
342 | uint scc_idp; /* Internal */ | ||
343 | ushort scc_rbptr; /* Internal */ | ||
344 | ushort scc_ibc; /* Internal */ | ||
345 | uint scc_rxtmp; /* Internal */ | ||
346 | uint scc_tstate; /* Internal */ | ||
347 | uint scc_tdp; /* Internal */ | ||
348 | ushort scc_tbptr; /* Internal */ | ||
349 | ushort scc_tbc; /* Internal */ | ||
350 | uint scc_txtmp; /* Internal */ | ||
351 | uint scc_rcrc; /* Internal */ | ||
352 | uint scc_tcrc; /* Internal */ | ||
353 | } sccp_t; | ||
354 | |||
355 | /* Function code bits. | ||
356 | */ | ||
357 | #define SCC_EB ((u_char)0x10) /* Set big endian byte order */ | ||
358 | |||
359 | /* CPM Ethernet through SCCx. | ||
360 | */ | ||
361 | typedef struct scc_enet { | ||
362 | sccp_t sen_genscc; | ||
363 | uint sen_cpres; /* Preset CRC */ | ||
364 | uint sen_cmask; /* Constant mask for CRC */ | ||
365 | uint sen_crcec; /* CRC Error counter */ | ||
366 | uint sen_alec; /* alignment error counter */ | ||
367 | uint sen_disfc; /* discard frame counter */ | ||
368 | ushort sen_pads; /* Tx short frame pad character */ | ||
369 | ushort sen_retlim; /* Retry limit threshold */ | ||
370 | ushort sen_retcnt; /* Retry limit counter */ | ||
371 | ushort sen_maxflr; /* maximum frame length register */ | ||
372 | ushort sen_minflr; /* minimum frame length register */ | ||
373 | ushort sen_maxd1; /* maximum DMA1 length */ | ||
374 | ushort sen_maxd2; /* maximum DMA2 length */ | ||
375 | ushort sen_maxd; /* Rx max DMA */ | ||
376 | ushort sen_dmacnt; /* Rx DMA counter */ | ||
377 | ushort sen_maxb; /* Max BD byte count */ | ||
378 | ushort sen_gaddr1; /* Group address filter */ | ||
379 | ushort sen_gaddr2; | ||
380 | ushort sen_gaddr3; | ||
381 | ushort sen_gaddr4; | ||
382 | uint sen_tbuf0data0; /* Save area 0 - current frame */ | ||
383 | uint sen_tbuf0data1; /* Save area 1 - current frame */ | ||
384 | uint sen_tbuf0rba; /* Internal */ | ||
385 | uint sen_tbuf0crc; /* Internal */ | ||
386 | ushort sen_tbuf0bcnt; /* Internal */ | ||
387 | ushort sen_paddrh; /* physical address (MSB) */ | ||
388 | ushort sen_paddrm; | ||
389 | ushort sen_paddrl; /* physical address (LSB) */ | ||
390 | ushort sen_pper; /* persistence */ | ||
391 | ushort sen_rfbdptr; /* Rx first BD pointer */ | ||
392 | ushort sen_tfbdptr; /* Tx first BD pointer */ | ||
393 | ushort sen_tlbdptr; /* Tx last BD pointer */ | ||
394 | uint sen_tbuf1data0; /* Save area 0 - current frame */ | ||
395 | uint sen_tbuf1data1; /* Save area 1 - current frame */ | ||
396 | uint sen_tbuf1rba; /* Internal */ | ||
397 | uint sen_tbuf1crc; /* Internal */ | ||
398 | ushort sen_tbuf1bcnt; /* Internal */ | ||
399 | ushort sen_txlen; /* Tx Frame length counter */ | ||
400 | ushort sen_iaddr1; /* Individual address filter */ | ||
401 | ushort sen_iaddr2; | ||
402 | ushort sen_iaddr3; | ||
403 | ushort sen_iaddr4; | ||
404 | ushort sen_boffcnt; /* Backoff counter */ | ||
405 | |||
406 | /* NOTE: Some versions of the manual have the following items | ||
407 | * incorrectly documented. Below is the proper order. | ||
408 | */ | ||
409 | ushort sen_taddrh; /* temp address (MSB) */ | ||
410 | ushort sen_taddrm; | ||
411 | ushort sen_taddrl; /* temp address (LSB) */ | ||
412 | } scc_enet_t; | ||
413 | |||
414 | /* SCC Event register as used by Ethernet. | ||
415 | */ | ||
416 | #define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ | ||
417 | #define SCCE_ENET_TXE ((ushort)0x0010) /* Transmit Error */ | ||
418 | #define SCCE_ENET_RXF ((ushort)0x0008) /* Full frame received */ | ||
419 | #define SCCE_ENET_BSY ((ushort)0x0004) /* All incoming buffers full */ | ||
420 | #define SCCE_ENET_TXB ((ushort)0x0002) /* A buffer was transmitted */ | ||
421 | #define SCCE_ENET_RXB ((ushort)0x0001) /* A buffer was received */ | ||
422 | |||
423 | /* SCC Mode Register (PMSR) as used by Ethernet. | ||
424 | */ | ||
425 | #define SCC_PSMR_HBC ((ushort)0x8000) /* Enable heartbeat */ | ||
426 | #define SCC_PSMR_FC ((ushort)0x4000) /* Force collision */ | ||
427 | #define SCC_PSMR_RSH ((ushort)0x2000) /* Receive short frames */ | ||
428 | #define SCC_PSMR_IAM ((ushort)0x1000) /* Check individual hash */ | ||
429 | #define SCC_PSMR_ENCRC ((ushort)0x0800) /* Ethernet CRC mode */ | ||
430 | #define SCC_PSMR_PRO ((ushort)0x0200) /* Promiscuous mode */ | ||
431 | #define SCC_PSMR_BRO ((ushort)0x0100) /* Catch broadcast pkts */ | ||
432 | #define SCC_PSMR_SBT ((ushort)0x0080) /* Special backoff timer */ | ||
433 | #define SCC_PSMR_LPB ((ushort)0x0040) /* Set Loopback mode */ | ||
434 | #define SCC_PSMR_SIP ((ushort)0x0020) /* Sample Input Pins */ | ||
435 | #define SCC_PSMR_LCW ((ushort)0x0010) /* Late collision window */ | ||
436 | #define SCC_PSMR_NIB22 ((ushort)0x000a) /* Start frame search */ | ||
437 | #define SCC_PSMR_FDE ((ushort)0x0001) /* Full duplex enable */ | ||
438 | |||
439 | /* Buffer descriptor control/status used by Ethernet receive. | ||
440 | */ | ||
441 | #define BD_ENET_RX_EMPTY ((ushort)0x8000) | ||
442 | #define BD_ENET_RX_WRAP ((ushort)0x2000) | ||
443 | #define BD_ENET_RX_INTR ((ushort)0x1000) | ||
444 | #define BD_ENET_RX_LAST ((ushort)0x0800) | ||
445 | #define BD_ENET_RX_FIRST ((ushort)0x0400) | ||
446 | #define BD_ENET_RX_MISS ((ushort)0x0100) | ||
447 | #define BD_ENET_RX_LG ((ushort)0x0020) | ||
448 | #define BD_ENET_RX_NO ((ushort)0x0010) | ||
449 | #define BD_ENET_RX_SH ((ushort)0x0008) | ||
450 | #define BD_ENET_RX_CR ((ushort)0x0004) | ||
451 | #define BD_ENET_RX_OV ((ushort)0x0002) | ||
452 | #define BD_ENET_RX_CL ((ushort)0x0001) | ||
453 | #define BD_ENET_RX_BC ((ushort)0x0080) /* DA is Broadcast */ | ||
454 | #define BD_ENET_RX_MC ((ushort)0x0040) /* DA is Multicast */ | ||
455 | #define BD_ENET_RX_STATS ((ushort)0x013f) /* All status bits */ | ||
456 | |||
457 | /* Buffer descriptor control/status used by Ethernet transmit. | ||
458 | */ | ||
459 | #define BD_ENET_TX_READY ((ushort)0x8000) | ||
460 | #define BD_ENET_TX_PAD ((ushort)0x4000) | ||
461 | #define BD_ENET_TX_WRAP ((ushort)0x2000) | ||
462 | #define BD_ENET_TX_INTR ((ushort)0x1000) | ||
463 | #define BD_ENET_TX_LAST ((ushort)0x0800) | ||
464 | #define BD_ENET_TX_TC ((ushort)0x0400) | ||
465 | #define BD_ENET_TX_DEF ((ushort)0x0200) | ||
466 | #define BD_ENET_TX_HB ((ushort)0x0100) | ||
467 | #define BD_ENET_TX_LC ((ushort)0x0080) | ||
468 | #define BD_ENET_TX_RL ((ushort)0x0040) | ||
469 | #define BD_ENET_TX_RCMASK ((ushort)0x003c) | ||
470 | #define BD_ENET_TX_UN ((ushort)0x0002) | ||
471 | #define BD_ENET_TX_CSL ((ushort)0x0001) | ||
472 | #define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */ | ||
473 | |||
474 | /* SCC as UART | ||
475 | */ | ||
476 | typedef struct scc_uart { | ||
477 | sccp_t scc_genscc; | ||
478 | char res1[8]; /* Reserved */ | ||
479 | ushort scc_maxidl; /* Maximum idle chars */ | ||
480 | ushort scc_idlc; /* temp idle counter */ | ||
481 | ushort scc_brkcr; /* Break count register */ | ||
482 | ushort scc_parec; /* receive parity error counter */ | ||
483 | ushort scc_frmec; /* receive framing error counter */ | ||
484 | ushort scc_nosec; /* receive noise counter */ | ||
485 | ushort scc_brkec; /* receive break condition counter */ | ||
486 | ushort scc_brkln; /* last received break length */ | ||
487 | ushort scc_uaddr1; /* UART address character 1 */ | ||
488 | ushort scc_uaddr2; /* UART address character 2 */ | ||
489 | ushort scc_rtemp; /* Temp storage */ | ||
490 | ushort scc_toseq; /* Transmit out of sequence char */ | ||
491 | ushort scc_char1; /* control character 1 */ | ||
492 | ushort scc_char2; /* control character 2 */ | ||
493 | ushort scc_char3; /* control character 3 */ | ||
494 | ushort scc_char4; /* control character 4 */ | ||
495 | ushort scc_char5; /* control character 5 */ | ||
496 | ushort scc_char6; /* control character 6 */ | ||
497 | ushort scc_char7; /* control character 7 */ | ||
498 | ushort scc_char8; /* control character 8 */ | ||
499 | ushort scc_rccm; /* receive control character mask */ | ||
500 | ushort scc_rccr; /* receive control character register */ | ||
501 | ushort scc_rlbc; /* receive last break character */ | ||
502 | } scc_uart_t; | ||
503 | |||
504 | /* SCC Event and Mask registers when it is used as a UART. | ||
505 | */ | ||
506 | #define UART_SCCM_GLR ((ushort)0x1000) | ||
507 | #define UART_SCCM_GLT ((ushort)0x0800) | ||
508 | #define UART_SCCM_AB ((ushort)0x0200) | ||
509 | #define UART_SCCM_IDL ((ushort)0x0100) | ||
510 | #define UART_SCCM_GRA ((ushort)0x0080) | ||
511 | #define UART_SCCM_BRKE ((ushort)0x0040) | ||
512 | #define UART_SCCM_BRKS ((ushort)0x0020) | ||
513 | #define UART_SCCM_CCR ((ushort)0x0008) | ||
514 | #define UART_SCCM_BSY ((ushort)0x0004) | ||
515 | #define UART_SCCM_TX ((ushort)0x0002) | ||
516 | #define UART_SCCM_RX ((ushort)0x0001) | ||
517 | |||
518 | /* The SCC PMSR when used as a UART. | ||
519 | */ | ||
520 | #define SCU_PSMR_FLC ((ushort)0x8000) | ||
521 | #define SCU_PSMR_SL ((ushort)0x4000) | ||
522 | #define SCU_PSMR_CL ((ushort)0x3000) | ||
523 | #define SCU_PSMR_UM ((ushort)0x0c00) | ||
524 | #define SCU_PSMR_FRZ ((ushort)0x0200) | ||
525 | #define SCU_PSMR_RZS ((ushort)0x0100) | ||
526 | #define SCU_PSMR_SYN ((ushort)0x0080) | ||
527 | #define SCU_PSMR_DRT ((ushort)0x0040) | ||
528 | #define SCU_PSMR_PEN ((ushort)0x0010) | ||
529 | #define SCU_PSMR_RPM ((ushort)0x000c) | ||
530 | #define SCU_PSMR_REVP ((ushort)0x0008) | ||
531 | #define SCU_PSMR_TPM ((ushort)0x0003) | ||
532 | #define SCU_PSMR_TEVP ((ushort)0x0002) | ||
533 | |||
534 | /* CPM Transparent mode SCC. | ||
535 | */ | ||
536 | typedef struct scc_trans { | ||
537 | sccp_t st_genscc; | ||
538 | uint st_cpres; /* Preset CRC */ | ||
539 | uint st_cmask; /* Constant mask for CRC */ | ||
540 | } scc_trans_t; | ||
541 | |||
542 | #define BD_SCC_TX_LAST ((ushort)0x0800) | ||
543 | |||
544 | /* IIC parameter RAM. | ||
545 | */ | ||
546 | typedef struct iic { | ||
547 | ushort iic_rbase; /* Rx Buffer descriptor base address */ | ||
548 | ushort iic_tbase; /* Tx Buffer descriptor base address */ | ||
549 | u_char iic_rfcr; /* Rx function code */ | ||
550 | u_char iic_tfcr; /* Tx function code */ | ||
551 | ushort iic_mrblr; /* Max receive buffer length */ | ||
552 | uint iic_rstate; /* Internal */ | ||
553 | uint iic_rdp; /* Internal */ | ||
554 | ushort iic_rbptr; /* Internal */ | ||
555 | ushort iic_rbc; /* Internal */ | ||
556 | uint iic_rxtmp; /* Internal */ | ||
557 | uint iic_tstate; /* Internal */ | ||
558 | uint iic_tdp; /* Internal */ | ||
559 | ushort iic_tbptr; /* Internal */ | ||
560 | ushort iic_tbc; /* Internal */ | ||
561 | uint iic_txtmp; /* Internal */ | ||
562 | char res1[4]; /* Reserved */ | ||
563 | ushort iic_rpbase; /* Relocation pointer */ | ||
564 | char res2[2]; /* Reserved */ | ||
565 | } iic_t; | ||
566 | |||
567 | #define BD_IIC_START ((ushort)0x0400) | ||
568 | |||
569 | /* SPI parameter RAM. | ||
570 | */ | ||
571 | typedef struct spi { | ||
572 | ushort spi_rbase; /* Rx Buffer descriptor base address */ | ||
573 | ushort spi_tbase; /* Tx Buffer descriptor base address */ | ||
574 | u_char spi_rfcr; /* Rx function code */ | ||
575 | u_char spi_tfcr; /* Tx function code */ | ||
576 | ushort spi_mrblr; /* Max receive buffer length */ | ||
577 | uint spi_rstate; /* Internal */ | ||
578 | uint spi_rdp; /* Internal */ | ||
579 | ushort spi_rbptr; /* Internal */ | ||
580 | ushort spi_rbc; /* Internal */ | ||
581 | uint spi_rxtmp; /* Internal */ | ||
582 | uint spi_tstate; /* Internal */ | ||
583 | uint spi_tdp; /* Internal */ | ||
584 | ushort spi_tbptr; /* Internal */ | ||
585 | ushort spi_tbc; /* Internal */ | ||
586 | uint spi_txtmp; /* Internal */ | ||
587 | uint spi_res; | ||
588 | ushort spi_rpbase; /* Relocation pointer */ | ||
589 | ushort spi_res2; | ||
590 | } spi_t; | ||
591 | |||
592 | /* SPI Mode register. | ||
593 | */ | ||
594 | #define SPMODE_LOOP ((ushort)0x4000) /* Loopback */ | ||
595 | #define SPMODE_CI ((ushort)0x2000) /* Clock Invert */ | ||
596 | #define SPMODE_CP ((ushort)0x1000) /* Clock Phase */ | ||
597 | #define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */ | ||
598 | #define SPMODE_REV ((ushort)0x0400) /* Reversed Data */ | ||
599 | #define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */ | ||
600 | #define SPMODE_EN ((ushort)0x0100) /* Enable */ | ||
601 | #define SPMODE_LENMSK ((ushort)0x00f0) /* character length */ | ||
602 | #define SPMODE_LEN4 ((ushort)0x0030) /* 4 bits per char */ | ||
603 | #define SPMODE_LEN8 ((ushort)0x0070) /* 8 bits per char */ | ||
604 | #define SPMODE_LEN16 ((ushort)0x00f0) /* 16 bits per char */ | ||
605 | #define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */ | ||
606 | |||
607 | /* SPIE fields */ | ||
608 | #define SPIE_MME 0x20 | ||
609 | #define SPIE_TXE 0x10 | ||
610 | #define SPIE_BSY 0x04 | ||
611 | #define SPIE_TXB 0x02 | ||
612 | #define SPIE_RXB 0x01 | ||
613 | |||
614 | /* | ||
615 | * RISC Controller Configuration Register definitons | ||
616 | */ | ||
617 | #define RCCR_TIME 0x8000 /* RISC Timer Enable */ | ||
618 | #define RCCR_TIMEP(t) (((t) & 0x3F)<<8) /* RISC Timer Period */ | ||
619 | #define RCCR_TIME_MASK 0x00FF /* not RISC Timer related bits */ | ||
620 | |||
621 | /* RISC Timer Parameter RAM offset */ | ||
622 | #define PROFF_RTMR ((uint)0x01B0) | ||
623 | |||
624 | typedef struct risc_timer_pram { | ||
625 | unsigned short tm_base; /* RISC Timer Table Base Address */ | ||
626 | unsigned short tm_ptr; /* RISC Timer Table Pointer (internal) */ | ||
627 | unsigned short r_tmr; /* RISC Timer Mode Register */ | ||
628 | unsigned short r_tmv; /* RISC Timer Valid Register */ | ||
629 | unsigned long tm_cmd; /* RISC Timer Command Register */ | ||
630 | unsigned long tm_cnt; /* RISC Timer Internal Count */ | ||
631 | } rt_pram_t; | ||
632 | |||
633 | /* Bits in RISC Timer Command Register */ | ||
634 | #define TM_CMD_VALID 0x80000000 /* Valid - Enables the timer */ | ||
635 | #define TM_CMD_RESTART 0x40000000 /* Restart - for automatic restart */ | ||
636 | #define TM_CMD_PWM 0x20000000 /* Run in Pulse Width Modulation Mode */ | ||
637 | #define TM_CMD_NUM(n) (((n)&0xF)<<16) /* Timer Number */ | ||
638 | #define TM_CMD_PERIOD(p) ((p)&0xFFFF) /* Timer Period */ | ||
639 | |||
640 | /* CPM interrupts. There are nearly 32 interrupts generated by CPM | ||
641 | * channels or devices. All of these are presented to the PPC core | ||
642 | * as a single interrupt. The CPM interrupt handler dispatches its | ||
643 | * own handlers, in a similar fashion to the PPC core handler. We | ||
644 | * use the table as defined in the manuals (i.e. no special high | ||
645 | * priority and SCC1 == SCCa, etc...). | ||
646 | */ | ||
647 | #define CPMVEC_NR 32 | ||
648 | #define CPMVEC_PIO_PC15 ((ushort)0x1f) | ||
649 | #define CPMVEC_SCC1 ((ushort)0x1e) | ||
650 | #define CPMVEC_SCC2 ((ushort)0x1d) | ||
651 | #define CPMVEC_SCC3 ((ushort)0x1c) | ||
652 | #define CPMVEC_SCC4 ((ushort)0x1b) | ||
653 | #define CPMVEC_PIO_PC14 ((ushort)0x1a) | ||
654 | #define CPMVEC_TIMER1 ((ushort)0x19) | ||
655 | #define CPMVEC_PIO_PC13 ((ushort)0x18) | ||
656 | #define CPMVEC_PIO_PC12 ((ushort)0x17) | ||
657 | #define CPMVEC_SDMA_CB_ERR ((ushort)0x16) | ||
658 | #define CPMVEC_IDMA1 ((ushort)0x15) | ||
659 | #define CPMVEC_IDMA2 ((ushort)0x14) | ||
660 | #define CPMVEC_TIMER2 ((ushort)0x12) | ||
661 | #define CPMVEC_RISCTIMER ((ushort)0x11) | ||
662 | #define CPMVEC_I2C ((ushort)0x10) | ||
663 | #define CPMVEC_PIO_PC11 ((ushort)0x0f) | ||
664 | #define CPMVEC_PIO_PC10 ((ushort)0x0e) | ||
665 | #define CPMVEC_TIMER3 ((ushort)0x0c) | ||
666 | #define CPMVEC_PIO_PC9 ((ushort)0x0b) | ||
667 | #define CPMVEC_PIO_PC8 ((ushort)0x0a) | ||
668 | #define CPMVEC_PIO_PC7 ((ushort)0x09) | ||
669 | #define CPMVEC_TIMER4 ((ushort)0x07) | ||
670 | #define CPMVEC_PIO_PC6 ((ushort)0x06) | ||
671 | #define CPMVEC_SPI ((ushort)0x05) | ||
672 | #define CPMVEC_SMC1 ((ushort)0x04) | ||
673 | #define CPMVEC_SMC2 ((ushort)0x03) | ||
674 | #define CPMVEC_PIO_PC5 ((ushort)0x02) | ||
675 | #define CPMVEC_PIO_PC4 ((ushort)0x01) | ||
676 | #define CPMVEC_ERROR ((ushort)0x00) | ||
677 | |||
678 | /* CPM interrupt configuration vector. | ||
679 | */ | ||
680 | #define CICR_SCD_SCC4 ((uint)0x00c00000) /* SCC4 @ SCCd */ | ||
681 | #define CICR_SCC_SCC3 ((uint)0x00200000) /* SCC3 @ SCCc */ | ||
682 | #define CICR_SCB_SCC2 ((uint)0x00040000) /* SCC2 @ SCCb */ | ||
683 | #define CICR_SCA_SCC1 ((uint)0x00000000) /* SCC1 @ SCCa */ | ||
684 | #define CICR_IRL_MASK ((uint)0x0000e000) /* Core interrrupt */ | ||
685 | #define CICR_HP_MASK ((uint)0x00001f00) /* Hi-pri int. */ | ||
686 | #define CICR_IEN ((uint)0x00000080) /* Int. enable */ | ||
687 | #define CICR_SPS ((uint)0x00000001) /* SCC Spread */ | ||
688 | |||
689 | extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id); | ||
690 | extern void cpm_free_handler(int vec); | ||
691 | |||
692 | #endif /* __CPM_8XX__ */ | ||
diff --git a/include/asm-powerpc/cpm2.h b/include/asm-powerpc/cpm2.h new file mode 100644 index 000000000000..12a2860f9a9c --- /dev/null +++ b/include/asm-powerpc/cpm2.h | |||
@@ -0,0 +1,1248 @@ | |||
1 | /* | ||
2 | * Communication Processor Module v2. | ||
3 | * | ||
4 | * This file contains structures and information for the communication | ||
5 | * processor channels found in the dual port RAM or parameter RAM. | ||
6 | * All CPM control and status is available through the CPM2 internal | ||
7 | * memory map. See immap_cpm2.h for details. | ||
8 | */ | ||
9 | #ifdef __KERNEL__ | ||
10 | #ifndef __CPM2__ | ||
11 | #define __CPM2__ | ||
12 | |||
13 | #include <asm/immap_cpm2.h> | ||
14 | |||
15 | /* CPM Command register. | ||
16 | */ | ||
17 | #define CPM_CR_RST ((uint)0x80000000) | ||
18 | #define CPM_CR_PAGE ((uint)0x7c000000) | ||
19 | #define CPM_CR_SBLOCK ((uint)0x03e00000) | ||
20 | #define CPM_CR_FLG ((uint)0x00010000) | ||
21 | #define CPM_CR_MCN ((uint)0x00003fc0) | ||
22 | #define CPM_CR_OPCODE ((uint)0x0000000f) | ||
23 | |||
24 | /* Device sub-block and page codes. | ||
25 | */ | ||
26 | #define CPM_CR_SCC1_SBLOCK (0x04) | ||
27 | #define CPM_CR_SCC2_SBLOCK (0x05) | ||
28 | #define CPM_CR_SCC3_SBLOCK (0x06) | ||
29 | #define CPM_CR_SCC4_SBLOCK (0x07) | ||
30 | #define CPM_CR_SMC1_SBLOCK (0x08) | ||
31 | #define CPM_CR_SMC2_SBLOCK (0x09) | ||
32 | #define CPM_CR_SPI_SBLOCK (0x0a) | ||
33 | #define CPM_CR_I2C_SBLOCK (0x0b) | ||
34 | #define CPM_CR_TIMER_SBLOCK (0x0f) | ||
35 | #define CPM_CR_RAND_SBLOCK (0x0e) | ||
36 | #define CPM_CR_FCC1_SBLOCK (0x10) | ||
37 | #define CPM_CR_FCC2_SBLOCK (0x11) | ||
38 | #define CPM_CR_FCC3_SBLOCK (0x12) | ||
39 | #define CPM_CR_IDMA1_SBLOCK (0x14) | ||
40 | #define CPM_CR_IDMA2_SBLOCK (0x15) | ||
41 | #define CPM_CR_IDMA3_SBLOCK (0x16) | ||
42 | #define CPM_CR_IDMA4_SBLOCK (0x17) | ||
43 | #define CPM_CR_MCC1_SBLOCK (0x1c) | ||
44 | |||
45 | #define CPM_CR_FCC_SBLOCK(x) (x + 0x10) | ||
46 | |||
47 | #define CPM_CR_SCC1_PAGE (0x00) | ||
48 | #define CPM_CR_SCC2_PAGE (0x01) | ||
49 | #define CPM_CR_SCC3_PAGE (0x02) | ||
50 | #define CPM_CR_SCC4_PAGE (0x03) | ||
51 | #define CPM_CR_SMC1_PAGE (0x07) | ||
52 | #define CPM_CR_SMC2_PAGE (0x08) | ||
53 | #define CPM_CR_SPI_PAGE (0x09) | ||
54 | #define CPM_CR_I2C_PAGE (0x0a) | ||
55 | #define CPM_CR_TIMER_PAGE (0x0a) | ||
56 | #define CPM_CR_RAND_PAGE (0x0a) | ||
57 | #define CPM_CR_FCC1_PAGE (0x04) | ||
58 | #define CPM_CR_FCC2_PAGE (0x05) | ||
59 | #define CPM_CR_FCC3_PAGE (0x06) | ||
60 | #define CPM_CR_IDMA1_PAGE (0x07) | ||
61 | #define CPM_CR_IDMA2_PAGE (0x08) | ||
62 | #define CPM_CR_IDMA3_PAGE (0x09) | ||
63 | #define CPM_CR_IDMA4_PAGE (0x0a) | ||
64 | #define CPM_CR_MCC1_PAGE (0x07) | ||
65 | #define CPM_CR_MCC2_PAGE (0x08) | ||
66 | |||
67 | #define CPM_CR_FCC_PAGE(x) (x + 0x04) | ||
68 | |||
69 | /* Some opcodes (there are more...later) | ||
70 | */ | ||
71 | #define CPM_CR_INIT_TRX ((ushort)0x0000) | ||
72 | #define CPM_CR_INIT_RX ((ushort)0x0001) | ||
73 | #define CPM_CR_INIT_TX ((ushort)0x0002) | ||
74 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) | ||
75 | #define CPM_CR_STOP_TX ((ushort)0x0004) | ||
76 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) | ||
77 | #define CPM_CR_RESTART_TX ((ushort)0x0006) | ||
78 | #define CPM_CR_SET_GADDR ((ushort)0x0008) | ||
79 | #define CPM_CR_START_IDMA ((ushort)0x0009) | ||
80 | #define CPM_CR_STOP_IDMA ((ushort)0x000b) | ||
81 | |||
82 | #define mk_cr_cmd(PG, SBC, MCN, OP) \ | ||
83 | ((PG << 26) | (SBC << 21) | (MCN << 6) | OP) | ||
84 | |||
85 | /* Dual Port RAM addresses. The first 16K is available for almost | ||
86 | * any CPM use, so we put the BDs there. The first 128 bytes are | ||
87 | * used for SMC1 and SMC2 parameter RAM, so we start allocating | ||
88 | * BDs above that. All of this must change when we start | ||
89 | * downloading RAM microcode. | ||
90 | */ | ||
91 | #define CPM_DATAONLY_BASE ((uint)128) | ||
92 | #define CPM_DP_NOSPACE ((uint)0x7fffffff) | ||
93 | #if defined(CONFIG_8272) || defined(CONFIG_MPC8555) | ||
94 | #define CPM_DATAONLY_SIZE ((uint)(8 * 1024) - CPM_DATAONLY_BASE) | ||
95 | #define CPM_FCC_SPECIAL_BASE ((uint)0x00009000) | ||
96 | #else | ||
97 | #define CPM_DATAONLY_SIZE ((uint)(16 * 1024) - CPM_DATAONLY_BASE) | ||
98 | #define CPM_FCC_SPECIAL_BASE ((uint)0x0000b000) | ||
99 | #endif | ||
100 | |||
101 | /* The number of pages of host memory we allocate for CPM. This is | ||
102 | * done early in kernel initialization to get physically contiguous | ||
103 | * pages. | ||
104 | */ | ||
105 | #define NUM_CPM_HOST_PAGES 2 | ||
106 | |||
107 | /* Export the base address of the communication processor registers | ||
108 | * and dual port ram. | ||
109 | */ | ||
110 | extern cpm_cpm2_t *cpmp; /* Pointer to comm processor */ | ||
111 | |||
112 | extern unsigned long cpm_dpalloc(uint size, uint align); | ||
113 | extern int cpm_dpfree(unsigned long offset); | ||
114 | extern unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align); | ||
115 | extern void cpm_dpdump(void); | ||
116 | extern void *cpm_dpram_addr(unsigned long offset); | ||
117 | extern void cpm_setbrg(uint brg, uint rate); | ||
118 | extern void cpm2_fastbrg(uint brg, uint rate, int div16); | ||
119 | extern void cpm2_reset(void); | ||
120 | |||
121 | |||
122 | /* Buffer descriptors used by many of the CPM protocols. | ||
123 | */ | ||
124 | typedef struct cpm_buf_desc { | ||
125 | ushort cbd_sc; /* Status and Control */ | ||
126 | ushort cbd_datlen; /* Data length in buffer */ | ||
127 | uint cbd_bufaddr; /* Buffer address in host memory */ | ||
128 | } cbd_t; | ||
129 | |||
130 | #define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */ | ||
131 | #define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */ | ||
132 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */ | ||
133 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ | ||
134 | #define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame */ | ||
135 | #define BD_SC_CM ((ushort)0x0200) /* Continous mode */ | ||
136 | #define BD_SC_ID ((ushort)0x0100) /* Rec'd too many idles */ | ||
137 | #define BD_SC_P ((ushort)0x0100) /* xmt preamble */ | ||
138 | #define BD_SC_BR ((ushort)0x0020) /* Break received */ | ||
139 | #define BD_SC_FR ((ushort)0x0010) /* Framing error */ | ||
140 | #define BD_SC_PR ((ushort)0x0008) /* Parity error */ | ||
141 | #define BD_SC_OV ((ushort)0x0002) /* Overrun */ | ||
142 | #define BD_SC_CD ((ushort)0x0001) /* ?? */ | ||
143 | |||
144 | /* Function code bits, usually generic to devices. | ||
145 | */ | ||
146 | #define CPMFCR_GBL ((u_char)0x20) /* Set memory snooping */ | ||
147 | #define CPMFCR_EB ((u_char)0x10) /* Set big endian byte order */ | ||
148 | #define CPMFCR_TC2 ((u_char)0x04) /* Transfer code 2 value */ | ||
149 | #define CPMFCR_DTB ((u_char)0x02) /* Use local bus for data when set */ | ||
150 | #define CPMFCR_BDB ((u_char)0x01) /* Use local bus for BD when set */ | ||
151 | |||
152 | /* Parameter RAM offsets from the base. | ||
153 | */ | ||
154 | #define PROFF_SCC1 ((uint)0x8000) | ||
155 | #define PROFF_SCC2 ((uint)0x8100) | ||
156 | #define PROFF_SCC3 ((uint)0x8200) | ||
157 | #define PROFF_SCC4 ((uint)0x8300) | ||
158 | #define PROFF_FCC1 ((uint)0x8400) | ||
159 | #define PROFF_FCC2 ((uint)0x8500) | ||
160 | #define PROFF_FCC3 ((uint)0x8600) | ||
161 | #define PROFF_MCC1 ((uint)0x8700) | ||
162 | #define PROFF_SMC1_BASE ((uint)0x87fc) | ||
163 | #define PROFF_IDMA1_BASE ((uint)0x87fe) | ||
164 | #define PROFF_MCC2 ((uint)0x8800) | ||
165 | #define PROFF_SMC2_BASE ((uint)0x88fc) | ||
166 | #define PROFF_IDMA2_BASE ((uint)0x88fe) | ||
167 | #define PROFF_SPI_BASE ((uint)0x89fc) | ||
168 | #define PROFF_IDMA3_BASE ((uint)0x89fe) | ||
169 | #define PROFF_TIMERS ((uint)0x8ae0) | ||
170 | #define PROFF_REVNUM ((uint)0x8af0) | ||
171 | #define PROFF_RAND ((uint)0x8af8) | ||
172 | #define PROFF_I2C_BASE ((uint)0x8afc) | ||
173 | #define PROFF_IDMA4_BASE ((uint)0x8afe) | ||
174 | |||
175 | #define PROFF_SCC_SIZE ((uint)0x100) | ||
176 | #define PROFF_FCC_SIZE ((uint)0x100) | ||
177 | #define PROFF_SMC_SIZE ((uint)64) | ||
178 | |||
179 | /* The SMCs are relocated to any of the first eight DPRAM pages. | ||
180 | * We will fix these at the first locations of DPRAM, until we | ||
181 | * get some microcode patches :-). | ||
182 | * The parameter ram space for the SMCs is fifty-some bytes, and | ||
183 | * they are required to start on a 64 byte boundary. | ||
184 | */ | ||
185 | #define PROFF_SMC1 (0) | ||
186 | #define PROFF_SMC2 (64) | ||
187 | |||
188 | |||
189 | /* Define enough so I can at least use the serial port as a UART. | ||
190 | */ | ||
191 | typedef struct smc_uart { | ||
192 | ushort smc_rbase; /* Rx Buffer descriptor base address */ | ||
193 | ushort smc_tbase; /* Tx Buffer descriptor base address */ | ||
194 | u_char smc_rfcr; /* Rx function code */ | ||
195 | u_char smc_tfcr; /* Tx function code */ | ||
196 | ushort smc_mrblr; /* Max receive buffer length */ | ||
197 | uint smc_rstate; /* Internal */ | ||
198 | uint smc_idp; /* Internal */ | ||
199 | ushort smc_rbptr; /* Internal */ | ||
200 | ushort smc_ibc; /* Internal */ | ||
201 | uint smc_rxtmp; /* Internal */ | ||
202 | uint smc_tstate; /* Internal */ | ||
203 | uint smc_tdp; /* Internal */ | ||
204 | ushort smc_tbptr; /* Internal */ | ||
205 | ushort smc_tbc; /* Internal */ | ||
206 | uint smc_txtmp; /* Internal */ | ||
207 | ushort smc_maxidl; /* Maximum idle characters */ | ||
208 | ushort smc_tmpidl; /* Temporary idle counter */ | ||
209 | ushort smc_brklen; /* Last received break length */ | ||
210 | ushort smc_brkec; /* rcv'd break condition counter */ | ||
211 | ushort smc_brkcr; /* xmt break count register */ | ||
212 | ushort smc_rmask; /* Temporary bit mask */ | ||
213 | uint smc_stmp; /* SDMA Temp */ | ||
214 | } smc_uart_t; | ||
215 | |||
216 | /* SMC uart mode register (Internal memory map). | ||
217 | */ | ||
218 | #define SMCMR_REN ((ushort)0x0001) | ||
219 | #define SMCMR_TEN ((ushort)0x0002) | ||
220 | #define SMCMR_DM ((ushort)0x000c) | ||
221 | #define SMCMR_SM_GCI ((ushort)0x0000) | ||
222 | #define SMCMR_SM_UART ((ushort)0x0020) | ||
223 | #define SMCMR_SM_TRANS ((ushort)0x0030) | ||
224 | #define SMCMR_SM_MASK ((ushort)0x0030) | ||
225 | #define SMCMR_PM_EVEN ((ushort)0x0100) /* Even parity, else odd */ | ||
226 | #define SMCMR_REVD SMCMR_PM_EVEN | ||
227 | #define SMCMR_PEN ((ushort)0x0200) /* Parity enable */ | ||
228 | #define SMCMR_BS SMCMR_PEN | ||
229 | #define SMCMR_SL ((ushort)0x0400) /* Two stops, else one */ | ||
230 | #define SMCR_CLEN_MASK ((ushort)0x7800) /* Character length */ | ||
231 | #define smcr_mk_clen(C) (((C) << 11) & SMCR_CLEN_MASK) | ||
232 | |||
233 | /* SMC Event and Mask register. | ||
234 | */ | ||
235 | #define SMCM_BRKE ((unsigned char)0x40) /* When in UART Mode */ | ||
236 | #define SMCM_BRK ((unsigned char)0x10) /* When in UART Mode */ | ||
237 | #define SMCM_TXE ((unsigned char)0x10) | ||
238 | #define SMCM_BSY ((unsigned char)0x04) | ||
239 | #define SMCM_TX ((unsigned char)0x02) | ||
240 | #define SMCM_RX ((unsigned char)0x01) | ||
241 | |||
242 | /* Baud rate generators. | ||
243 | */ | ||
244 | #define CPM_BRG_RST ((uint)0x00020000) | ||
245 | #define CPM_BRG_EN ((uint)0x00010000) | ||
246 | #define CPM_BRG_EXTC_INT ((uint)0x00000000) | ||
247 | #define CPM_BRG_EXTC_CLK3_9 ((uint)0x00004000) | ||
248 | #define CPM_BRG_EXTC_CLK5_15 ((uint)0x00008000) | ||
249 | #define CPM_BRG_ATB ((uint)0x00002000) | ||
250 | #define CPM_BRG_CD_MASK ((uint)0x00001ffe) | ||
251 | #define CPM_BRG_DIV16 ((uint)0x00000001) | ||
252 | |||
253 | /* SCCs. | ||
254 | */ | ||
255 | #define SCC_GSMRH_IRP ((uint)0x00040000) | ||
256 | #define SCC_GSMRH_GDE ((uint)0x00010000) | ||
257 | #define SCC_GSMRH_TCRC_CCITT ((uint)0x00008000) | ||
258 | #define SCC_GSMRH_TCRC_BISYNC ((uint)0x00004000) | ||
259 | #define SCC_GSMRH_TCRC_HDLC ((uint)0x00000000) | ||
260 | #define SCC_GSMRH_REVD ((uint)0x00002000) | ||
261 | #define SCC_GSMRH_TRX ((uint)0x00001000) | ||
262 | #define SCC_GSMRH_TTX ((uint)0x00000800) | ||
263 | #define SCC_GSMRH_CDP ((uint)0x00000400) | ||
264 | #define SCC_GSMRH_CTSP ((uint)0x00000200) | ||
265 | #define SCC_GSMRH_CDS ((uint)0x00000100) | ||
266 | #define SCC_GSMRH_CTSS ((uint)0x00000080) | ||
267 | #define SCC_GSMRH_TFL ((uint)0x00000040) | ||
268 | #define SCC_GSMRH_RFW ((uint)0x00000020) | ||
269 | #define SCC_GSMRH_TXSY ((uint)0x00000010) | ||
270 | #define SCC_GSMRH_SYNL16 ((uint)0x0000000c) | ||
271 | #define SCC_GSMRH_SYNL8 ((uint)0x00000008) | ||
272 | #define SCC_GSMRH_SYNL4 ((uint)0x00000004) | ||
273 | #define SCC_GSMRH_RTSM ((uint)0x00000002) | ||
274 | #define SCC_GSMRH_RSYN ((uint)0x00000001) | ||
275 | |||
276 | #define SCC_GSMRL_SIR ((uint)0x80000000) /* SCC2 only */ | ||
277 | #define SCC_GSMRL_EDGE_NONE ((uint)0x60000000) | ||
278 | #define SCC_GSMRL_EDGE_NEG ((uint)0x40000000) | ||
279 | #define SCC_GSMRL_EDGE_POS ((uint)0x20000000) | ||
280 | #define SCC_GSMRL_EDGE_BOTH ((uint)0x00000000) | ||
281 | #define SCC_GSMRL_TCI ((uint)0x10000000) | ||
282 | #define SCC_GSMRL_TSNC_3 ((uint)0x0c000000) | ||
283 | #define SCC_GSMRL_TSNC_4 ((uint)0x08000000) | ||
284 | #define SCC_GSMRL_TSNC_14 ((uint)0x04000000) | ||
285 | #define SCC_GSMRL_TSNC_INF ((uint)0x00000000) | ||
286 | #define SCC_GSMRL_RINV ((uint)0x02000000) | ||
287 | #define SCC_GSMRL_TINV ((uint)0x01000000) | ||
288 | #define SCC_GSMRL_TPL_128 ((uint)0x00c00000) | ||
289 | #define SCC_GSMRL_TPL_64 ((uint)0x00a00000) | ||
290 | #define SCC_GSMRL_TPL_48 ((uint)0x00800000) | ||
291 | #define SCC_GSMRL_TPL_32 ((uint)0x00600000) | ||
292 | #define SCC_GSMRL_TPL_16 ((uint)0x00400000) | ||
293 | #define SCC_GSMRL_TPL_8 ((uint)0x00200000) | ||
294 | #define SCC_GSMRL_TPL_NONE ((uint)0x00000000) | ||
295 | #define SCC_GSMRL_TPP_ALL1 ((uint)0x00180000) | ||
296 | #define SCC_GSMRL_TPP_01 ((uint)0x00100000) | ||
297 | #define SCC_GSMRL_TPP_10 ((uint)0x00080000) | ||
298 | #define SCC_GSMRL_TPP_ZEROS ((uint)0x00000000) | ||
299 | #define SCC_GSMRL_TEND ((uint)0x00040000) | ||
300 | #define SCC_GSMRL_TDCR_32 ((uint)0x00030000) | ||
301 | #define SCC_GSMRL_TDCR_16 ((uint)0x00020000) | ||
302 | #define SCC_GSMRL_TDCR_8 ((uint)0x00010000) | ||
303 | #define SCC_GSMRL_TDCR_1 ((uint)0x00000000) | ||
304 | #define SCC_GSMRL_RDCR_32 ((uint)0x0000c000) | ||
305 | #define SCC_GSMRL_RDCR_16 ((uint)0x00008000) | ||
306 | #define SCC_GSMRL_RDCR_8 ((uint)0x00004000) | ||
307 | #define SCC_GSMRL_RDCR_1 ((uint)0x00000000) | ||
308 | #define SCC_GSMRL_RENC_DFMAN ((uint)0x00003000) | ||
309 | #define SCC_GSMRL_RENC_MANCH ((uint)0x00002000) | ||
310 | #define SCC_GSMRL_RENC_FM0 ((uint)0x00001000) | ||
311 | #define SCC_GSMRL_RENC_NRZI ((uint)0x00000800) | ||
312 | #define SCC_GSMRL_RENC_NRZ ((uint)0x00000000) | ||
313 | #define SCC_GSMRL_TENC_DFMAN ((uint)0x00000600) | ||
314 | #define SCC_GSMRL_TENC_MANCH ((uint)0x00000400) | ||
315 | #define SCC_GSMRL_TENC_FM0 ((uint)0x00000200) | ||
316 | #define SCC_GSMRL_TENC_NRZI ((uint)0x00000100) | ||
317 | #define SCC_GSMRL_TENC_NRZ ((uint)0x00000000) | ||
318 | #define SCC_GSMRL_DIAG_LE ((uint)0x000000c0) /* Loop and echo */ | ||
319 | #define SCC_GSMRL_DIAG_ECHO ((uint)0x00000080) | ||
320 | #define SCC_GSMRL_DIAG_LOOP ((uint)0x00000040) | ||
321 | #define SCC_GSMRL_DIAG_NORM ((uint)0x00000000) | ||
322 | #define SCC_GSMRL_ENR ((uint)0x00000020) | ||
323 | #define SCC_GSMRL_ENT ((uint)0x00000010) | ||
324 | #define SCC_GSMRL_MODE_ENET ((uint)0x0000000c) | ||
325 | #define SCC_GSMRL_MODE_DDCMP ((uint)0x00000009) | ||
326 | #define SCC_GSMRL_MODE_BISYNC ((uint)0x00000008) | ||
327 | #define SCC_GSMRL_MODE_V14 ((uint)0x00000007) | ||
328 | #define SCC_GSMRL_MODE_AHDLC ((uint)0x00000006) | ||
329 | #define SCC_GSMRL_MODE_PROFIBUS ((uint)0x00000005) | ||
330 | #define SCC_GSMRL_MODE_UART ((uint)0x00000004) | ||
331 | #define SCC_GSMRL_MODE_SS7 ((uint)0x00000003) | ||
332 | #define SCC_GSMRL_MODE_ATALK ((uint)0x00000002) | ||
333 | #define SCC_GSMRL_MODE_HDLC ((uint)0x00000000) | ||
334 | |||
335 | #define SCC_TODR_TOD ((ushort)0x8000) | ||
336 | |||
337 | /* SCC Event and Mask register. | ||
338 | */ | ||
339 | #define SCCM_TXE ((unsigned char)0x10) | ||
340 | #define SCCM_BSY ((unsigned char)0x04) | ||
341 | #define SCCM_TX ((unsigned char)0x02) | ||
342 | #define SCCM_RX ((unsigned char)0x01) | ||
343 | |||
344 | typedef struct scc_param { | ||
345 | ushort scc_rbase; /* Rx Buffer descriptor base address */ | ||
346 | ushort scc_tbase; /* Tx Buffer descriptor base address */ | ||
347 | u_char scc_rfcr; /* Rx function code */ | ||
348 | u_char scc_tfcr; /* Tx function code */ | ||
349 | ushort scc_mrblr; /* Max receive buffer length */ | ||
350 | uint scc_rstate; /* Internal */ | ||
351 | uint scc_idp; /* Internal */ | ||
352 | ushort scc_rbptr; /* Internal */ | ||
353 | ushort scc_ibc; /* Internal */ | ||
354 | uint scc_rxtmp; /* Internal */ | ||
355 | uint scc_tstate; /* Internal */ | ||
356 | uint scc_tdp; /* Internal */ | ||
357 | ushort scc_tbptr; /* Internal */ | ||
358 | ushort scc_tbc; /* Internal */ | ||
359 | uint scc_txtmp; /* Internal */ | ||
360 | uint scc_rcrc; /* Internal */ | ||
361 | uint scc_tcrc; /* Internal */ | ||
362 | } sccp_t; | ||
363 | |||
364 | /* CPM Ethernet through SCC1. | ||
365 | */ | ||
366 | typedef struct scc_enet { | ||
367 | sccp_t sen_genscc; | ||
368 | uint sen_cpres; /* Preset CRC */ | ||
369 | uint sen_cmask; /* Constant mask for CRC */ | ||
370 | uint sen_crcec; /* CRC Error counter */ | ||
371 | uint sen_alec; /* alignment error counter */ | ||
372 | uint sen_disfc; /* discard frame counter */ | ||
373 | ushort sen_pads; /* Tx short frame pad character */ | ||
374 | ushort sen_retlim; /* Retry limit threshold */ | ||
375 | ushort sen_retcnt; /* Retry limit counter */ | ||
376 | ushort sen_maxflr; /* maximum frame length register */ | ||
377 | ushort sen_minflr; /* minimum frame length register */ | ||
378 | ushort sen_maxd1; /* maximum DMA1 length */ | ||
379 | ushort sen_maxd2; /* maximum DMA2 length */ | ||
380 | ushort sen_maxd; /* Rx max DMA */ | ||
381 | ushort sen_dmacnt; /* Rx DMA counter */ | ||
382 | ushort sen_maxb; /* Max BD byte count */ | ||
383 | ushort sen_gaddr1; /* Group address filter */ | ||
384 | ushort sen_gaddr2; | ||
385 | ushort sen_gaddr3; | ||
386 | ushort sen_gaddr4; | ||
387 | uint sen_tbuf0data0; /* Save area 0 - current frame */ | ||
388 | uint sen_tbuf0data1; /* Save area 1 - current frame */ | ||
389 | uint sen_tbuf0rba; /* Internal */ | ||
390 | uint sen_tbuf0crc; /* Internal */ | ||
391 | ushort sen_tbuf0bcnt; /* Internal */ | ||
392 | ushort sen_paddrh; /* physical address (MSB) */ | ||
393 | ushort sen_paddrm; | ||
394 | ushort sen_paddrl; /* physical address (LSB) */ | ||
395 | ushort sen_pper; /* persistence */ | ||
396 | ushort sen_rfbdptr; /* Rx first BD pointer */ | ||
397 | ushort sen_tfbdptr; /* Tx first BD pointer */ | ||
398 | ushort sen_tlbdptr; /* Tx last BD pointer */ | ||
399 | uint sen_tbuf1data0; /* Save area 0 - current frame */ | ||
400 | uint sen_tbuf1data1; /* Save area 1 - current frame */ | ||
401 | uint sen_tbuf1rba; /* Internal */ | ||
402 | uint sen_tbuf1crc; /* Internal */ | ||
403 | ushort sen_tbuf1bcnt; /* Internal */ | ||
404 | ushort sen_txlen; /* Tx Frame length counter */ | ||
405 | ushort sen_iaddr1; /* Individual address filter */ | ||
406 | ushort sen_iaddr2; | ||
407 | ushort sen_iaddr3; | ||
408 | ushort sen_iaddr4; | ||
409 | ushort sen_boffcnt; /* Backoff counter */ | ||
410 | |||
411 | /* NOTE: Some versions of the manual have the following items | ||
412 | * incorrectly documented. Below is the proper order. | ||
413 | */ | ||
414 | ushort sen_taddrh; /* temp address (MSB) */ | ||
415 | ushort sen_taddrm; | ||
416 | ushort sen_taddrl; /* temp address (LSB) */ | ||
417 | } scc_enet_t; | ||
418 | |||
419 | |||
420 | /* SCC Event register as used by Ethernet. | ||
421 | */ | ||
422 | #define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ | ||
423 | #define SCCE_ENET_TXE ((ushort)0x0010) /* Transmit Error */ | ||
424 | #define SCCE_ENET_RXF ((ushort)0x0008) /* Full frame received */ | ||
425 | #define SCCE_ENET_BSY ((ushort)0x0004) /* All incoming buffers full */ | ||
426 | #define SCCE_ENET_TXB ((ushort)0x0002) /* A buffer was transmitted */ | ||
427 | #define SCCE_ENET_RXB ((ushort)0x0001) /* A buffer was received */ | ||
428 | |||
429 | /* SCC Mode Register (PSMR) as used by Ethernet. | ||
430 | */ | ||
431 | #define SCC_PSMR_HBC ((ushort)0x8000) /* Enable heartbeat */ | ||
432 | #define SCC_PSMR_FC ((ushort)0x4000) /* Force collision */ | ||
433 | #define SCC_PSMR_RSH ((ushort)0x2000) /* Receive short frames */ | ||
434 | #define SCC_PSMR_IAM ((ushort)0x1000) /* Check individual hash */ | ||
435 | #define SCC_PSMR_ENCRC ((ushort)0x0800) /* Ethernet CRC mode */ | ||
436 | #define SCC_PSMR_PRO ((ushort)0x0200) /* Promiscuous mode */ | ||
437 | #define SCC_PSMR_BRO ((ushort)0x0100) /* Catch broadcast pkts */ | ||
438 | #define SCC_PSMR_SBT ((ushort)0x0080) /* Special backoff timer */ | ||
439 | #define SCC_PSMR_LPB ((ushort)0x0040) /* Set Loopback mode */ | ||
440 | #define SCC_PSMR_SIP ((ushort)0x0020) /* Sample Input Pins */ | ||
441 | #define SCC_PSMR_LCW ((ushort)0x0010) /* Late collision window */ | ||
442 | #define SCC_PSMR_NIB22 ((ushort)0x000a) /* Start frame search */ | ||
443 | #define SCC_PSMR_FDE ((ushort)0x0001) /* Full duplex enable */ | ||
444 | |||
445 | /* Buffer descriptor control/status used by Ethernet receive. | ||
446 | * Common to SCC and FCC. | ||
447 | */ | ||
448 | #define BD_ENET_RX_EMPTY ((ushort)0x8000) | ||
449 | #define BD_ENET_RX_WRAP ((ushort)0x2000) | ||
450 | #define BD_ENET_RX_INTR ((ushort)0x1000) | ||
451 | #define BD_ENET_RX_LAST ((ushort)0x0800) | ||
452 | #define BD_ENET_RX_FIRST ((ushort)0x0400) | ||
453 | #define BD_ENET_RX_MISS ((ushort)0x0100) | ||
454 | #define BD_ENET_RX_BC ((ushort)0x0080) /* FCC Only */ | ||
455 | #define BD_ENET_RX_MC ((ushort)0x0040) /* FCC Only */ | ||
456 | #define BD_ENET_RX_LG ((ushort)0x0020) | ||
457 | #define BD_ENET_RX_NO ((ushort)0x0010) | ||
458 | #define BD_ENET_RX_SH ((ushort)0x0008) | ||
459 | #define BD_ENET_RX_CR ((ushort)0x0004) | ||
460 | #define BD_ENET_RX_OV ((ushort)0x0002) | ||
461 | #define BD_ENET_RX_CL ((ushort)0x0001) | ||
462 | #define BD_ENET_RX_STATS ((ushort)0x01ff) /* All status bits */ | ||
463 | |||
464 | /* Buffer descriptor control/status used by Ethernet transmit. | ||
465 | * Common to SCC and FCC. | ||
466 | */ | ||
467 | #define BD_ENET_TX_READY ((ushort)0x8000) | ||
468 | #define BD_ENET_TX_PAD ((ushort)0x4000) | ||
469 | #define BD_ENET_TX_WRAP ((ushort)0x2000) | ||
470 | #define BD_ENET_TX_INTR ((ushort)0x1000) | ||
471 | #define BD_ENET_TX_LAST ((ushort)0x0800) | ||
472 | #define BD_ENET_TX_TC ((ushort)0x0400) | ||
473 | #define BD_ENET_TX_DEF ((ushort)0x0200) | ||
474 | #define BD_ENET_TX_HB ((ushort)0x0100) | ||
475 | #define BD_ENET_TX_LC ((ushort)0x0080) | ||
476 | #define BD_ENET_TX_RL ((ushort)0x0040) | ||
477 | #define BD_ENET_TX_RCMASK ((ushort)0x003c) | ||
478 | #define BD_ENET_TX_UN ((ushort)0x0002) | ||
479 | #define BD_ENET_TX_CSL ((ushort)0x0001) | ||
480 | #define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */ | ||
481 | |||
482 | /* SCC as UART | ||
483 | */ | ||
484 | typedef struct scc_uart { | ||
485 | sccp_t scc_genscc; | ||
486 | uint scc_res1; /* Reserved */ | ||
487 | uint scc_res2; /* Reserved */ | ||
488 | ushort scc_maxidl; /* Maximum idle chars */ | ||
489 | ushort scc_idlc; /* temp idle counter */ | ||
490 | ushort scc_brkcr; /* Break count register */ | ||
491 | ushort scc_parec; /* receive parity error counter */ | ||
492 | ushort scc_frmec; /* receive framing error counter */ | ||
493 | ushort scc_nosec; /* receive noise counter */ | ||
494 | ushort scc_brkec; /* receive break condition counter */ | ||
495 | ushort scc_brkln; /* last received break length */ | ||
496 | ushort scc_uaddr1; /* UART address character 1 */ | ||
497 | ushort scc_uaddr2; /* UART address character 2 */ | ||
498 | ushort scc_rtemp; /* Temp storage */ | ||
499 | ushort scc_toseq; /* Transmit out of sequence char */ | ||
500 | ushort scc_char1; /* control character 1 */ | ||
501 | ushort scc_char2; /* control character 2 */ | ||
502 | ushort scc_char3; /* control character 3 */ | ||
503 | ushort scc_char4; /* control character 4 */ | ||
504 | ushort scc_char5; /* control character 5 */ | ||
505 | ushort scc_char6; /* control character 6 */ | ||
506 | ushort scc_char7; /* control character 7 */ | ||
507 | ushort scc_char8; /* control character 8 */ | ||
508 | ushort scc_rccm; /* receive control character mask */ | ||
509 | ushort scc_rccr; /* receive control character register */ | ||
510 | ushort scc_rlbc; /* receive last break character */ | ||
511 | } scc_uart_t; | ||
512 | |||
513 | /* SCC Event and Mask registers when it is used as a UART. | ||
514 | */ | ||
515 | #define UART_SCCM_GLR ((ushort)0x1000) | ||
516 | #define UART_SCCM_GLT ((ushort)0x0800) | ||
517 | #define UART_SCCM_AB ((ushort)0x0200) | ||
518 | #define UART_SCCM_IDL ((ushort)0x0100) | ||
519 | #define UART_SCCM_GRA ((ushort)0x0080) | ||
520 | #define UART_SCCM_BRKE ((ushort)0x0040) | ||
521 | #define UART_SCCM_BRKS ((ushort)0x0020) | ||
522 | #define UART_SCCM_CCR ((ushort)0x0008) | ||
523 | #define UART_SCCM_BSY ((ushort)0x0004) | ||
524 | #define UART_SCCM_TX ((ushort)0x0002) | ||
525 | #define UART_SCCM_RX ((ushort)0x0001) | ||
526 | |||
527 | /* The SCC PSMR when used as a UART. | ||
528 | */ | ||
529 | #define SCU_PSMR_FLC ((ushort)0x8000) | ||
530 | #define SCU_PSMR_SL ((ushort)0x4000) | ||
531 | #define SCU_PSMR_CL ((ushort)0x3000) | ||
532 | #define SCU_PSMR_UM ((ushort)0x0c00) | ||
533 | #define SCU_PSMR_FRZ ((ushort)0x0200) | ||
534 | #define SCU_PSMR_RZS ((ushort)0x0100) | ||
535 | #define SCU_PSMR_SYN ((ushort)0x0080) | ||
536 | #define SCU_PSMR_DRT ((ushort)0x0040) | ||
537 | #define SCU_PSMR_PEN ((ushort)0x0010) | ||
538 | #define SCU_PSMR_RPM ((ushort)0x000c) | ||
539 | #define SCU_PSMR_REVP ((ushort)0x0008) | ||
540 | #define SCU_PSMR_TPM ((ushort)0x0003) | ||
541 | #define SCU_PSMR_TEVP ((ushort)0x0002) | ||
542 | |||
543 | /* CPM Transparent mode SCC. | ||
544 | */ | ||
545 | typedef struct scc_trans { | ||
546 | sccp_t st_genscc; | ||
547 | uint st_cpres; /* Preset CRC */ | ||
548 | uint st_cmask; /* Constant mask for CRC */ | ||
549 | } scc_trans_t; | ||
550 | |||
551 | #define BD_SCC_TX_LAST ((ushort)0x0800) | ||
552 | |||
553 | /* How about some FCCs..... | ||
554 | */ | ||
555 | #define FCC_GFMR_DIAG_NORM ((uint)0x00000000) | ||
556 | #define FCC_GFMR_DIAG_LE ((uint)0x40000000) | ||
557 | #define FCC_GFMR_DIAG_AE ((uint)0x80000000) | ||
558 | #define FCC_GFMR_DIAG_ALE ((uint)0xc0000000) | ||
559 | #define FCC_GFMR_TCI ((uint)0x20000000) | ||
560 | #define FCC_GFMR_TRX ((uint)0x10000000) | ||
561 | #define FCC_GFMR_TTX ((uint)0x08000000) | ||
562 | #define FCC_GFMR_TTX ((uint)0x08000000) | ||
563 | #define FCC_GFMR_CDP ((uint)0x04000000) | ||
564 | #define FCC_GFMR_CTSP ((uint)0x02000000) | ||
565 | #define FCC_GFMR_CDS ((uint)0x01000000) | ||
566 | #define FCC_GFMR_CTSS ((uint)0x00800000) | ||
567 | #define FCC_GFMR_SYNL_NONE ((uint)0x00000000) | ||
568 | #define FCC_GFMR_SYNL_AUTO ((uint)0x00004000) | ||
569 | #define FCC_GFMR_SYNL_8 ((uint)0x00008000) | ||
570 | #define FCC_GFMR_SYNL_16 ((uint)0x0000c000) | ||
571 | #define FCC_GFMR_RTSM ((uint)0x00002000) | ||
572 | #define FCC_GFMR_RENC_NRZ ((uint)0x00000000) | ||
573 | #define FCC_GFMR_RENC_NRZI ((uint)0x00000800) | ||
574 | #define FCC_GFMR_REVD ((uint)0x00000400) | ||
575 | #define FCC_GFMR_TENC_NRZ ((uint)0x00000000) | ||
576 | #define FCC_GFMR_TENC_NRZI ((uint)0x00000100) | ||
577 | #define FCC_GFMR_TCRC_16 ((uint)0x00000000) | ||
578 | #define FCC_GFMR_TCRC_32 ((uint)0x00000080) | ||
579 | #define FCC_GFMR_ENR ((uint)0x00000020) | ||
580 | #define FCC_GFMR_ENT ((uint)0x00000010) | ||
581 | #define FCC_GFMR_MODE_ENET ((uint)0x0000000c) | ||
582 | #define FCC_GFMR_MODE_ATM ((uint)0x0000000a) | ||
583 | #define FCC_GFMR_MODE_HDLC ((uint)0x00000000) | ||
584 | |||
585 | /* Generic FCC parameter ram. | ||
586 | */ | ||
587 | typedef struct fcc_param { | ||
588 | ushort fcc_riptr; /* Rx Internal temp pointer */ | ||
589 | ushort fcc_tiptr; /* Tx Internal temp pointer */ | ||
590 | ushort fcc_res1; | ||
591 | ushort fcc_mrblr; /* Max receive buffer length, mod 32 bytes */ | ||
592 | uint fcc_rstate; /* Upper byte is Func code, must be set */ | ||
593 | uint fcc_rbase; /* Receive BD base */ | ||
594 | ushort fcc_rbdstat; /* RxBD status */ | ||
595 | ushort fcc_rbdlen; /* RxBD down counter */ | ||
596 | uint fcc_rdptr; /* RxBD internal data pointer */ | ||
597 | uint fcc_tstate; /* Upper byte is Func code, must be set */ | ||
598 | uint fcc_tbase; /* Transmit BD base */ | ||
599 | ushort fcc_tbdstat; /* TxBD status */ | ||
600 | ushort fcc_tbdlen; /* TxBD down counter */ | ||
601 | uint fcc_tdptr; /* TxBD internal data pointer */ | ||
602 | uint fcc_rbptr; /* Rx BD Internal buf pointer */ | ||
603 | uint fcc_tbptr; /* Tx BD Internal buf pointer */ | ||
604 | uint fcc_rcrc; /* Rx temp CRC */ | ||
605 | uint fcc_res2; | ||
606 | uint fcc_tcrc; /* Tx temp CRC */ | ||
607 | } fccp_t; | ||
608 | |||
609 | |||
610 | /* Ethernet controller through FCC. | ||
611 | */ | ||
612 | typedef struct fcc_enet { | ||
613 | fccp_t fen_genfcc; | ||
614 | uint fen_statbuf; /* Internal status buffer */ | ||
615 | uint fen_camptr; /* CAM address */ | ||
616 | uint fen_cmask; /* Constant mask for CRC */ | ||
617 | uint fen_cpres; /* Preset CRC */ | ||
618 | uint fen_crcec; /* CRC Error counter */ | ||
619 | uint fen_alec; /* alignment error counter */ | ||
620 | uint fen_disfc; /* discard frame counter */ | ||
621 | ushort fen_retlim; /* Retry limit */ | ||
622 | ushort fen_retcnt; /* Retry counter */ | ||
623 | ushort fen_pper; /* Persistence */ | ||
624 | ushort fen_boffcnt; /* backoff counter */ | ||
625 | uint fen_gaddrh; /* Group address filter, high 32-bits */ | ||
626 | uint fen_gaddrl; /* Group address filter, low 32-bits */ | ||
627 | ushort fen_tfcstat; /* out of sequence TxBD */ | ||
628 | ushort fen_tfclen; | ||
629 | uint fen_tfcptr; | ||
630 | ushort fen_mflr; /* Maximum frame length (1518) */ | ||
631 | ushort fen_paddrh; /* MAC address */ | ||
632 | ushort fen_paddrm; | ||
633 | ushort fen_paddrl; | ||
634 | ushort fen_ibdcount; /* Internal BD counter */ | ||
635 | ushort fen_ibdstart; /* Internal BD start pointer */ | ||
636 | ushort fen_ibdend; /* Internal BD end pointer */ | ||
637 | ushort fen_txlen; /* Internal Tx frame length counter */ | ||
638 | uint fen_ibdbase[8]; /* Internal use */ | ||
639 | uint fen_iaddrh; /* Individual address filter */ | ||
640 | uint fen_iaddrl; | ||
641 | ushort fen_minflr; /* Minimum frame length (64) */ | ||
642 | ushort fen_taddrh; /* Filter transfer MAC address */ | ||
643 | ushort fen_taddrm; | ||
644 | ushort fen_taddrl; | ||
645 | ushort fen_padptr; /* Pointer to pad byte buffer */ | ||
646 | ushort fen_cftype; /* control frame type */ | ||
647 | ushort fen_cfrange; /* control frame range */ | ||
648 | ushort fen_maxb; /* maximum BD count */ | ||
649 | ushort fen_maxd1; /* Max DMA1 length (1520) */ | ||
650 | ushort fen_maxd2; /* Max DMA2 length (1520) */ | ||
651 | ushort fen_maxd; /* internal max DMA count */ | ||
652 | ushort fen_dmacnt; /* internal DMA counter */ | ||
653 | uint fen_octc; /* Total octect counter */ | ||
654 | uint fen_colc; /* Total collision counter */ | ||
655 | uint fen_broc; /* Total broadcast packet counter */ | ||
656 | uint fen_mulc; /* Total multicast packet count */ | ||
657 | uint fen_uspc; /* Total packets < 64 bytes */ | ||
658 | uint fen_frgc; /* Total packets < 64 bytes with errors */ | ||
659 | uint fen_ospc; /* Total packets > 1518 */ | ||
660 | uint fen_jbrc; /* Total packets > 1518 with errors */ | ||
661 | uint fen_p64c; /* Total packets == 64 bytes */ | ||
662 | uint fen_p65c; /* Total packets 64 < bytes <= 127 */ | ||
663 | uint fen_p128c; /* Total packets 127 < bytes <= 255 */ | ||
664 | uint fen_p256c; /* Total packets 256 < bytes <= 511 */ | ||
665 | uint fen_p512c; /* Total packets 512 < bytes <= 1023 */ | ||
666 | uint fen_p1024c; /* Total packets 1024 < bytes <= 1518 */ | ||
667 | uint fen_cambuf; /* Internal CAM buffer poiner */ | ||
668 | ushort fen_rfthr; /* Received frames threshold */ | ||
669 | ushort fen_rfcnt; /* Received frames count */ | ||
670 | } fcc_enet_t; | ||
671 | |||
672 | /* FCC Event/Mask register as used by Ethernet. | ||
673 | */ | ||
674 | #define FCC_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ | ||
675 | #define FCC_ENET_RXC ((ushort)0x0040) /* Control Frame Received */ | ||
676 | #define FCC_ENET_TXC ((ushort)0x0020) /* Out of seq. Tx sent */ | ||
677 | #define FCC_ENET_TXE ((ushort)0x0010) /* Transmit Error */ | ||
678 | #define FCC_ENET_RXF ((ushort)0x0008) /* Full frame received */ | ||
679 | #define FCC_ENET_BSY ((ushort)0x0004) /* Busy. Rx Frame dropped */ | ||
680 | #define FCC_ENET_TXB ((ushort)0x0002) /* A buffer was transmitted */ | ||
681 | #define FCC_ENET_RXB ((ushort)0x0001) /* A buffer was received */ | ||
682 | |||
683 | /* FCC Mode Register (FPSMR) as used by Ethernet. | ||
684 | */ | ||
685 | #define FCC_PSMR_HBC ((uint)0x80000000) /* Enable heartbeat */ | ||
686 | #define FCC_PSMR_FC ((uint)0x40000000) /* Force Collision */ | ||
687 | #define FCC_PSMR_SBT ((uint)0x20000000) /* Stop backoff timer */ | ||
688 | #define FCC_PSMR_LPB ((uint)0x10000000) /* Local protect. 1 = FDX */ | ||
689 | #define FCC_PSMR_LCW ((uint)0x08000000) /* Late collision select */ | ||
690 | #define FCC_PSMR_FDE ((uint)0x04000000) /* Full Duplex Enable */ | ||
691 | #define FCC_PSMR_MON ((uint)0x02000000) /* RMON Enable */ | ||
692 | #define FCC_PSMR_PRO ((uint)0x00400000) /* Promiscuous Enable */ | ||
693 | #define FCC_PSMR_FCE ((uint)0x00200000) /* Flow Control Enable */ | ||
694 | #define FCC_PSMR_RSH ((uint)0x00100000) /* Receive Short Frames */ | ||
695 | #define FCC_PSMR_CAM ((uint)0x00000400) /* CAM enable */ | ||
696 | #define FCC_PSMR_BRO ((uint)0x00000200) /* Broadcast pkt discard */ | ||
697 | #define FCC_PSMR_ENCRC ((uint)0x00000080) /* Use 32-bit CRC */ | ||
698 | |||
699 | /* IIC parameter RAM. | ||
700 | */ | ||
701 | typedef struct iic { | ||
702 | ushort iic_rbase; /* Rx Buffer descriptor base address */ | ||
703 | ushort iic_tbase; /* Tx Buffer descriptor base address */ | ||
704 | u_char iic_rfcr; /* Rx function code */ | ||
705 | u_char iic_tfcr; /* Tx function code */ | ||
706 | ushort iic_mrblr; /* Max receive buffer length */ | ||
707 | uint iic_rstate; /* Internal */ | ||
708 | uint iic_rdp; /* Internal */ | ||
709 | ushort iic_rbptr; /* Internal */ | ||
710 | ushort iic_rbc; /* Internal */ | ||
711 | uint iic_rxtmp; /* Internal */ | ||
712 | uint iic_tstate; /* Internal */ | ||
713 | uint iic_tdp; /* Internal */ | ||
714 | ushort iic_tbptr; /* Internal */ | ||
715 | ushort iic_tbc; /* Internal */ | ||
716 | uint iic_txtmp; /* Internal */ | ||
717 | } iic_t; | ||
718 | |||
719 | /* SPI parameter RAM. | ||
720 | */ | ||
721 | typedef struct spi { | ||
722 | ushort spi_rbase; /* Rx Buffer descriptor base address */ | ||
723 | ushort spi_tbase; /* Tx Buffer descriptor base address */ | ||
724 | u_char spi_rfcr; /* Rx function code */ | ||
725 | u_char spi_tfcr; /* Tx function code */ | ||
726 | ushort spi_mrblr; /* Max receive buffer length */ | ||
727 | uint spi_rstate; /* Internal */ | ||
728 | uint spi_rdp; /* Internal */ | ||
729 | ushort spi_rbptr; /* Internal */ | ||
730 | ushort spi_rbc; /* Internal */ | ||
731 | uint spi_rxtmp; /* Internal */ | ||
732 | uint spi_tstate; /* Internal */ | ||
733 | uint spi_tdp; /* Internal */ | ||
734 | ushort spi_tbptr; /* Internal */ | ||
735 | ushort spi_tbc; /* Internal */ | ||
736 | uint spi_txtmp; /* Internal */ | ||
737 | uint spi_res; /* Tx temp. */ | ||
738 | uint spi_res1[4]; /* SDMA temp. */ | ||
739 | } spi_t; | ||
740 | |||
741 | /* SPI Mode register. | ||
742 | */ | ||
743 | #define SPMODE_LOOP ((ushort)0x4000) /* Loopback */ | ||
744 | #define SPMODE_CI ((ushort)0x2000) /* Clock Invert */ | ||
745 | #define SPMODE_CP ((ushort)0x1000) /* Clock Phase */ | ||
746 | #define SPMODE_DIV16 ((ushort)0x0800) /* BRG/16 mode */ | ||
747 | #define SPMODE_REV ((ushort)0x0400) /* Reversed Data */ | ||
748 | #define SPMODE_MSTR ((ushort)0x0200) /* SPI Master */ | ||
749 | #define SPMODE_EN ((ushort)0x0100) /* Enable */ | ||
750 | #define SPMODE_LENMSK ((ushort)0x00f0) /* character length */ | ||
751 | #define SPMODE_PMMSK ((ushort)0x000f) /* prescale modulus */ | ||
752 | |||
753 | #define SPMODE_LEN(x) ((((x)-1)&0xF)<<4) | ||
754 | #define SPMODE_PM(x) ((x) &0xF) | ||
755 | |||
756 | #define SPI_EB ((u_char)0x10) /* big endian byte order */ | ||
757 | |||
758 | #define BD_IIC_START ((ushort)0x0400) | ||
759 | |||
760 | /* IDMA parameter RAM | ||
761 | */ | ||
762 | typedef struct idma { | ||
763 | ushort ibase; /* IDMA buffer descriptor table base address */ | ||
764 | ushort dcm; /* DMA channel mode */ | ||
765 | ushort ibdptr; /* IDMA current buffer descriptor pointer */ | ||
766 | ushort dpr_buf; /* IDMA transfer buffer base address */ | ||
767 | ushort buf_inv; /* internal buffer inventory */ | ||
768 | ushort ss_max; /* steady-state maximum transfer size */ | ||
769 | ushort dpr_in_ptr; /* write pointer inside the internal buffer */ | ||
770 | ushort sts; /* source transfer size */ | ||
771 | ushort dpr_out_ptr; /* read pointer inside the internal buffer */ | ||
772 | ushort seob; /* source end of burst */ | ||
773 | ushort deob; /* destination end of burst */ | ||
774 | ushort dts; /* destination transfer size */ | ||
775 | ushort ret_add; /* return address when working in ERM=1 mode */ | ||
776 | ushort res0; /* reserved */ | ||
777 | uint bd_cnt; /* internal byte count */ | ||
778 | uint s_ptr; /* source internal data pointer */ | ||
779 | uint d_ptr; /* destination internal data pointer */ | ||
780 | uint istate; /* internal state */ | ||
781 | u_char res1[20]; /* pad to 64-byte length */ | ||
782 | } idma_t; | ||
783 | |||
784 | /* DMA channel mode bit fields | ||
785 | */ | ||
786 | #define IDMA_DCM_FB ((ushort)0x8000) /* fly-by mode */ | ||
787 | #define IDMA_DCM_LP ((ushort)0x4000) /* low priority */ | ||
788 | #define IDMA_DCM_TC2 ((ushort)0x0400) /* value driven on TC[2] */ | ||
789 | #define IDMA_DCM_DMA_WRAP_MASK ((ushort)0x01c0) /* mask for DMA wrap */ | ||
790 | #define IDMA_DCM_DMA_WRAP_64 ((ushort)0x0000) /* 64-byte DMA xfer buffer */ | ||
791 | #define IDMA_DCM_DMA_WRAP_128 ((ushort)0x0040) /* 128-byte DMA xfer buffer */ | ||
792 | #define IDMA_DCM_DMA_WRAP_256 ((ushort)0x0080) /* 256-byte DMA xfer buffer */ | ||
793 | #define IDMA_DCM_DMA_WRAP_512 ((ushort)0x00c0) /* 512-byte DMA xfer buffer */ | ||
794 | #define IDMA_DCM_DMA_WRAP_1024 ((ushort)0x0100) /* 1024-byte DMA xfer buffer */ | ||
795 | #define IDMA_DCM_DMA_WRAP_2048 ((ushort)0x0140) /* 2048-byte DMA xfer buffer */ | ||
796 | #define IDMA_DCM_SINC ((ushort)0x0020) /* source inc addr */ | ||
797 | #define IDMA_DCM_DINC ((ushort)0x0010) /* destination inc addr */ | ||
798 | #define IDMA_DCM_ERM ((ushort)0x0008) /* external request mode */ | ||
799 | #define IDMA_DCM_DT ((ushort)0x0004) /* DONE treatment */ | ||
800 | #define IDMA_DCM_SD_MASK ((ushort)0x0003) /* mask for SD bit field */ | ||
801 | #define IDMA_DCM_SD_MEM2MEM ((ushort)0x0000) /* memory-to-memory xfer */ | ||
802 | #define IDMA_DCM_SD_PER2MEM ((ushort)0x0002) /* peripheral-to-memory xfer */ | ||
803 | #define IDMA_DCM_SD_MEM2PER ((ushort)0x0001) /* memory-to-peripheral xfer */ | ||
804 | |||
805 | /* IDMA Buffer Descriptors | ||
806 | */ | ||
807 | typedef struct idma_bd { | ||
808 | uint flags; | ||
809 | uint len; /* data length */ | ||
810 | uint src; /* source data buffer pointer */ | ||
811 | uint dst; /* destination data buffer pointer */ | ||
812 | } idma_bd_t; | ||
813 | |||
814 | /* IDMA buffer descriptor flag bit fields | ||
815 | */ | ||
816 | #define IDMA_BD_V ((uint)0x80000000) /* valid */ | ||
817 | #define IDMA_BD_W ((uint)0x20000000) /* wrap */ | ||
818 | #define IDMA_BD_I ((uint)0x10000000) /* interrupt */ | ||
819 | #define IDMA_BD_L ((uint)0x08000000) /* last */ | ||
820 | #define IDMA_BD_CM ((uint)0x02000000) /* continuous mode */ | ||
821 | #define IDMA_BD_SDN ((uint)0x00400000) /* source done */ | ||
822 | #define IDMA_BD_DDN ((uint)0x00200000) /* destination done */ | ||
823 | #define IDMA_BD_DGBL ((uint)0x00100000) /* destination global */ | ||
824 | #define IDMA_BD_DBO_LE ((uint)0x00040000) /* little-end dest byte order */ | ||
825 | #define IDMA_BD_DBO_BE ((uint)0x00080000) /* big-end dest byte order */ | ||
826 | #define IDMA_BD_DDTB ((uint)0x00010000) /* destination data bus */ | ||
827 | #define IDMA_BD_SGBL ((uint)0x00002000) /* source global */ | ||
828 | #define IDMA_BD_SBO_LE ((uint)0x00000800) /* little-end src byte order */ | ||
829 | #define IDMA_BD_SBO_BE ((uint)0x00001000) /* big-end src byte order */ | ||
830 | #define IDMA_BD_SDTB ((uint)0x00000200) /* source data bus */ | ||
831 | |||
832 | /* per-channel IDMA registers | ||
833 | */ | ||
834 | typedef struct im_idma { | ||
835 | u_char idsr; /* IDMAn event status register */ | ||
836 | u_char res0[3]; | ||
837 | u_char idmr; /* IDMAn event mask register */ | ||
838 | u_char res1[3]; | ||
839 | } im_idma_t; | ||
840 | |||
841 | /* IDMA event register bit fields | ||
842 | */ | ||
843 | #define IDMA_EVENT_SC ((unsigned char)0x08) /* stop completed */ | ||
844 | #define IDMA_EVENT_OB ((unsigned char)0x04) /* out of buffers */ | ||
845 | #define IDMA_EVENT_EDN ((unsigned char)0x02) /* external DONE asserted */ | ||
846 | #define IDMA_EVENT_BC ((unsigned char)0x01) /* buffer descriptor complete */ | ||
847 | |||
848 | /* RISC Controller Configuration Register (RCCR) bit fields | ||
849 | */ | ||
850 | #define RCCR_TIME ((uint)0x80000000) /* timer enable */ | ||
851 | #define RCCR_TIMEP_MASK ((uint)0x3f000000) /* mask for timer period bit field */ | ||
852 | #define RCCR_DR0M ((uint)0x00800000) /* IDMA0 request mode */ | ||
853 | #define RCCR_DR1M ((uint)0x00400000) /* IDMA1 request mode */ | ||
854 | #define RCCR_DR2M ((uint)0x00000080) /* IDMA2 request mode */ | ||
855 | #define RCCR_DR3M ((uint)0x00000040) /* IDMA3 request mode */ | ||
856 | #define RCCR_DR0QP_MASK ((uint)0x00300000) /* mask for IDMA0 req priority */ | ||
857 | #define RCCR_DR0QP_HIGH ((uint)0x00000000) /* IDMA0 has high req priority */ | ||
858 | #define RCCR_DR0QP_MED ((uint)0x00100000) /* IDMA0 has medium req priority */ | ||
859 | #define RCCR_DR0QP_LOW ((uint)0x00200000) /* IDMA0 has low req priority */ | ||
860 | #define RCCR_DR1QP_MASK ((uint)0x00030000) /* mask for IDMA1 req priority */ | ||
861 | #define RCCR_DR1QP_HIGH ((uint)0x00000000) /* IDMA1 has high req priority */ | ||
862 | #define RCCR_DR1QP_MED ((uint)0x00010000) /* IDMA1 has medium req priority */ | ||
863 | #define RCCR_DR1QP_LOW ((uint)0x00020000) /* IDMA1 has low req priority */ | ||
864 | #define RCCR_DR2QP_MASK ((uint)0x00000030) /* mask for IDMA2 req priority */ | ||
865 | #define RCCR_DR2QP_HIGH ((uint)0x00000000) /* IDMA2 has high req priority */ | ||
866 | #define RCCR_DR2QP_MED ((uint)0x00000010) /* IDMA2 has medium req priority */ | ||
867 | #define RCCR_DR2QP_LOW ((uint)0x00000020) /* IDMA2 has low req priority */ | ||
868 | #define RCCR_DR3QP_MASK ((uint)0x00000003) /* mask for IDMA3 req priority */ | ||
869 | #define RCCR_DR3QP_HIGH ((uint)0x00000000) /* IDMA3 has high req priority */ | ||
870 | #define RCCR_DR3QP_MED ((uint)0x00000001) /* IDMA3 has medium req priority */ | ||
871 | #define RCCR_DR3QP_LOW ((uint)0x00000002) /* IDMA3 has low req priority */ | ||
872 | #define RCCR_EIE ((uint)0x00080000) /* external interrupt enable */ | ||
873 | #define RCCR_SCD ((uint)0x00040000) /* scheduler configuration */ | ||
874 | #define RCCR_ERAM_MASK ((uint)0x0000e000) /* mask for enable RAM microcode */ | ||
875 | #define RCCR_ERAM_0KB ((uint)0x00000000) /* use 0KB of dpram for microcode */ | ||
876 | #define RCCR_ERAM_2KB ((uint)0x00002000) /* use 2KB of dpram for microcode */ | ||
877 | #define RCCR_ERAM_4KB ((uint)0x00004000) /* use 4KB of dpram for microcode */ | ||
878 | #define RCCR_ERAM_6KB ((uint)0x00006000) /* use 6KB of dpram for microcode */ | ||
879 | #define RCCR_ERAM_8KB ((uint)0x00008000) /* use 8KB of dpram for microcode */ | ||
880 | #define RCCR_ERAM_10KB ((uint)0x0000a000) /* use 10KB of dpram for microcode */ | ||
881 | #define RCCR_ERAM_12KB ((uint)0x0000c000) /* use 12KB of dpram for microcode */ | ||
882 | #define RCCR_EDM0 ((uint)0x00000800) /* DREQ0 edge detect mode */ | ||
883 | #define RCCR_EDM1 ((uint)0x00000400) /* DREQ1 edge detect mode */ | ||
884 | #define RCCR_EDM2 ((uint)0x00000200) /* DREQ2 edge detect mode */ | ||
885 | #define RCCR_EDM3 ((uint)0x00000100) /* DREQ3 edge detect mode */ | ||
886 | #define RCCR_DEM01 ((uint)0x00000008) /* DONE0/DONE1 edge detect mode */ | ||
887 | #define RCCR_DEM23 ((uint)0x00000004) /* DONE2/DONE3 edge detect mode */ | ||
888 | |||
889 | /*----------------------------------------------------------------------- | ||
890 | * CMXFCR - CMX FCC Clock Route Register | ||
891 | */ | ||
892 | #define CMXFCR_FC1 0x40000000 /* FCC1 connection */ | ||
893 | #define CMXFCR_RF1CS_MSK 0x38000000 /* Receive FCC1 Clock Source Mask */ | ||
894 | #define CMXFCR_TF1CS_MSK 0x07000000 /* Transmit FCC1 Clock Source Mask */ | ||
895 | #define CMXFCR_FC2 0x00400000 /* FCC2 connection */ | ||
896 | #define CMXFCR_RF2CS_MSK 0x00380000 /* Receive FCC2 Clock Source Mask */ | ||
897 | #define CMXFCR_TF2CS_MSK 0x00070000 /* Transmit FCC2 Clock Source Mask */ | ||
898 | #define CMXFCR_FC3 0x00004000 /* FCC3 connection */ | ||
899 | #define CMXFCR_RF3CS_MSK 0x00003800 /* Receive FCC3 Clock Source Mask */ | ||
900 | #define CMXFCR_TF3CS_MSK 0x00000700 /* Transmit FCC3 Clock Source Mask */ | ||
901 | |||
902 | #define CMXFCR_RF1CS_BRG5 0x00000000 /* Receive FCC1 Clock Source is BRG5 */ | ||
903 | #define CMXFCR_RF1CS_BRG6 0x08000000 /* Receive FCC1 Clock Source is BRG6 */ | ||
904 | #define CMXFCR_RF1CS_BRG7 0x10000000 /* Receive FCC1 Clock Source is BRG7 */ | ||
905 | #define CMXFCR_RF1CS_BRG8 0x18000000 /* Receive FCC1 Clock Source is BRG8 */ | ||
906 | #define CMXFCR_RF1CS_CLK9 0x20000000 /* Receive FCC1 Clock Source is CLK9 */ | ||
907 | #define CMXFCR_RF1CS_CLK10 0x28000000 /* Receive FCC1 Clock Source is CLK10 */ | ||
908 | #define CMXFCR_RF1CS_CLK11 0x30000000 /* Receive FCC1 Clock Source is CLK11 */ | ||
909 | #define CMXFCR_RF1CS_CLK12 0x38000000 /* Receive FCC1 Clock Source is CLK12 */ | ||
910 | |||
911 | #define CMXFCR_TF1CS_BRG5 0x00000000 /* Transmit FCC1 Clock Source is BRG5 */ | ||
912 | #define CMXFCR_TF1CS_BRG6 0x01000000 /* Transmit FCC1 Clock Source is BRG6 */ | ||
913 | #define CMXFCR_TF1CS_BRG7 0x02000000 /* Transmit FCC1 Clock Source is BRG7 */ | ||
914 | #define CMXFCR_TF1CS_BRG8 0x03000000 /* Transmit FCC1 Clock Source is BRG8 */ | ||
915 | #define CMXFCR_TF1CS_CLK9 0x04000000 /* Transmit FCC1 Clock Source is CLK9 */ | ||
916 | #define CMXFCR_TF1CS_CLK10 0x05000000 /* Transmit FCC1 Clock Source is CLK10 */ | ||
917 | #define CMXFCR_TF1CS_CLK11 0x06000000 /* Transmit FCC1 Clock Source is CLK11 */ | ||
918 | #define CMXFCR_TF1CS_CLK12 0x07000000 /* Transmit FCC1 Clock Source is CLK12 */ | ||
919 | |||
920 | #define CMXFCR_RF2CS_BRG5 0x00000000 /* Receive FCC2 Clock Source is BRG5 */ | ||
921 | #define CMXFCR_RF2CS_BRG6 0x00080000 /* Receive FCC2 Clock Source is BRG6 */ | ||
922 | #define CMXFCR_RF2CS_BRG7 0x00100000 /* Receive FCC2 Clock Source is BRG7 */ | ||
923 | #define CMXFCR_RF2CS_BRG8 0x00180000 /* Receive FCC2 Clock Source is BRG8 */ | ||
924 | #define CMXFCR_RF2CS_CLK13 0x00200000 /* Receive FCC2 Clock Source is CLK13 */ | ||
925 | #define CMXFCR_RF2CS_CLK14 0x00280000 /* Receive FCC2 Clock Source is CLK14 */ | ||
926 | #define CMXFCR_RF2CS_CLK15 0x00300000 /* Receive FCC2 Clock Source is CLK15 */ | ||
927 | #define CMXFCR_RF2CS_CLK16 0x00380000 /* Receive FCC2 Clock Source is CLK16 */ | ||
928 | |||
929 | #define CMXFCR_TF2CS_BRG5 0x00000000 /* Transmit FCC2 Clock Source is BRG5 */ | ||
930 | #define CMXFCR_TF2CS_BRG6 0x00010000 /* Transmit FCC2 Clock Source is BRG6 */ | ||
931 | #define CMXFCR_TF2CS_BRG7 0x00020000 /* Transmit FCC2 Clock Source is BRG7 */ | ||
932 | #define CMXFCR_TF2CS_BRG8 0x00030000 /* Transmit FCC2 Clock Source is BRG8 */ | ||
933 | #define CMXFCR_TF2CS_CLK13 0x00040000 /* Transmit FCC2 Clock Source is CLK13 */ | ||
934 | #define CMXFCR_TF2CS_CLK14 0x00050000 /* Transmit FCC2 Clock Source is CLK14 */ | ||
935 | #define CMXFCR_TF2CS_CLK15 0x00060000 /* Transmit FCC2 Clock Source is CLK15 */ | ||
936 | #define CMXFCR_TF2CS_CLK16 0x00070000 /* Transmit FCC2 Clock Source is CLK16 */ | ||
937 | |||
938 | #define CMXFCR_RF3CS_BRG5 0x00000000 /* Receive FCC3 Clock Source is BRG5 */ | ||
939 | #define CMXFCR_RF3CS_BRG6 0x00000800 /* Receive FCC3 Clock Source is BRG6 */ | ||
940 | #define CMXFCR_RF3CS_BRG7 0x00001000 /* Receive FCC3 Clock Source is BRG7 */ | ||
941 | #define CMXFCR_RF3CS_BRG8 0x00001800 /* Receive FCC3 Clock Source is BRG8 */ | ||
942 | #define CMXFCR_RF3CS_CLK13 0x00002000 /* Receive FCC3 Clock Source is CLK13 */ | ||
943 | #define CMXFCR_RF3CS_CLK14 0x00002800 /* Receive FCC3 Clock Source is CLK14 */ | ||
944 | #define CMXFCR_RF3CS_CLK15 0x00003000 /* Receive FCC3 Clock Source is CLK15 */ | ||
945 | #define CMXFCR_RF3CS_CLK16 0x00003800 /* Receive FCC3 Clock Source is CLK16 */ | ||
946 | |||
947 | #define CMXFCR_TF3CS_BRG5 0x00000000 /* Transmit FCC3 Clock Source is BRG5 */ | ||
948 | #define CMXFCR_TF3CS_BRG6 0x00000100 /* Transmit FCC3 Clock Source is BRG6 */ | ||
949 | #define CMXFCR_TF3CS_BRG7 0x00000200 /* Transmit FCC3 Clock Source is BRG7 */ | ||
950 | #define CMXFCR_TF3CS_BRG8 0x00000300 /* Transmit FCC3 Clock Source is BRG8 */ | ||
951 | #define CMXFCR_TF3CS_CLK13 0x00000400 /* Transmit FCC3 Clock Source is CLK13 */ | ||
952 | #define CMXFCR_TF3CS_CLK14 0x00000500 /* Transmit FCC3 Clock Source is CLK14 */ | ||
953 | #define CMXFCR_TF3CS_CLK15 0x00000600 /* Transmit FCC3 Clock Source is CLK15 */ | ||
954 | #define CMXFCR_TF3CS_CLK16 0x00000700 /* Transmit FCC3 Clock Source is CLK16 */ | ||
955 | |||
956 | /*----------------------------------------------------------------------- | ||
957 | * CMXSCR - CMX SCC Clock Route Register | ||
958 | */ | ||
959 | #define CMXSCR_GR1 0x80000000 /* Grant Support of SCC1 */ | ||
960 | #define CMXSCR_SC1 0x40000000 /* SCC1 connection */ | ||
961 | #define CMXSCR_RS1CS_MSK 0x38000000 /* Receive SCC1 Clock Source Mask */ | ||
962 | #define CMXSCR_TS1CS_MSK 0x07000000 /* Transmit SCC1 Clock Source Mask */ | ||
963 | #define CMXSCR_GR2 0x00800000 /* Grant Support of SCC2 */ | ||
964 | #define CMXSCR_SC2 0x00400000 /* SCC2 connection */ | ||
965 | #define CMXSCR_RS2CS_MSK 0x00380000 /* Receive SCC2 Clock Source Mask */ | ||
966 | #define CMXSCR_TS2CS_MSK 0x00070000 /* Transmit SCC2 Clock Source Mask */ | ||
967 | #define CMXSCR_GR3 0x00008000 /* Grant Support of SCC3 */ | ||
968 | #define CMXSCR_SC3 0x00004000 /* SCC3 connection */ | ||
969 | #define CMXSCR_RS3CS_MSK 0x00003800 /* Receive SCC3 Clock Source Mask */ | ||
970 | #define CMXSCR_TS3CS_MSK 0x00000700 /* Transmit SCC3 Clock Source Mask */ | ||
971 | #define CMXSCR_GR4 0x00000080 /* Grant Support of SCC4 */ | ||
972 | #define CMXSCR_SC4 0x00000040 /* SCC4 connection */ | ||
973 | #define CMXSCR_RS4CS_MSK 0x00000038 /* Receive SCC4 Clock Source Mask */ | ||
974 | #define CMXSCR_TS4CS_MSK 0x00000007 /* Transmit SCC4 Clock Source Mask */ | ||
975 | |||
976 | #define CMXSCR_RS1CS_BRG1 0x00000000 /* SCC1 Rx Clock Source is BRG1 */ | ||
977 | #define CMXSCR_RS1CS_BRG2 0x08000000 /* SCC1 Rx Clock Source is BRG2 */ | ||
978 | #define CMXSCR_RS1CS_BRG3 0x10000000 /* SCC1 Rx Clock Source is BRG3 */ | ||
979 | #define CMXSCR_RS1CS_BRG4 0x18000000 /* SCC1 Rx Clock Source is BRG4 */ | ||
980 | #define CMXSCR_RS1CS_CLK11 0x20000000 /* SCC1 Rx Clock Source is CLK11 */ | ||
981 | #define CMXSCR_RS1CS_CLK12 0x28000000 /* SCC1 Rx Clock Source is CLK12 */ | ||
982 | #define CMXSCR_RS1CS_CLK3 0x30000000 /* SCC1 Rx Clock Source is CLK3 */ | ||
983 | #define CMXSCR_RS1CS_CLK4 0x38000000 /* SCC1 Rx Clock Source is CLK4 */ | ||
984 | |||
985 | #define CMXSCR_TS1CS_BRG1 0x00000000 /* SCC1 Tx Clock Source is BRG1 */ | ||
986 | #define CMXSCR_TS1CS_BRG2 0x01000000 /* SCC1 Tx Clock Source is BRG2 */ | ||
987 | #define CMXSCR_TS1CS_BRG3 0x02000000 /* SCC1 Tx Clock Source is BRG3 */ | ||
988 | #define CMXSCR_TS1CS_BRG4 0x03000000 /* SCC1 Tx Clock Source is BRG4 */ | ||
989 | #define CMXSCR_TS1CS_CLK11 0x04000000 /* SCC1 Tx Clock Source is CLK11 */ | ||
990 | #define CMXSCR_TS1CS_CLK12 0x05000000 /* SCC1 Tx Clock Source is CLK12 */ | ||
991 | #define CMXSCR_TS1CS_CLK3 0x06000000 /* SCC1 Tx Clock Source is CLK3 */ | ||
992 | #define CMXSCR_TS1CS_CLK4 0x07000000 /* SCC1 Tx Clock Source is CLK4 */ | ||
993 | |||
994 | #define CMXSCR_RS2CS_BRG1 0x00000000 /* SCC2 Rx Clock Source is BRG1 */ | ||
995 | #define CMXSCR_RS2CS_BRG2 0x00080000 /* SCC2 Rx Clock Source is BRG2 */ | ||
996 | #define CMXSCR_RS2CS_BRG3 0x00100000 /* SCC2 Rx Clock Source is BRG3 */ | ||
997 | #define CMXSCR_RS2CS_BRG4 0x00180000 /* SCC2 Rx Clock Source is BRG4 */ | ||
998 | #define CMXSCR_RS2CS_CLK11 0x00200000 /* SCC2 Rx Clock Source is CLK11 */ | ||
999 | #define CMXSCR_RS2CS_CLK12 0x00280000 /* SCC2 Rx Clock Source is CLK12 */ | ||
1000 | #define CMXSCR_RS2CS_CLK3 0x00300000 /* SCC2 Rx Clock Source is CLK3 */ | ||
1001 | #define CMXSCR_RS2CS_CLK4 0x00380000 /* SCC2 Rx Clock Source is CLK4 */ | ||
1002 | |||
1003 | #define CMXSCR_TS2CS_BRG1 0x00000000 /* SCC2 Tx Clock Source is BRG1 */ | ||
1004 | #define CMXSCR_TS2CS_BRG2 0x00010000 /* SCC2 Tx Clock Source is BRG2 */ | ||
1005 | #define CMXSCR_TS2CS_BRG3 0x00020000 /* SCC2 Tx Clock Source is BRG3 */ | ||
1006 | #define CMXSCR_TS2CS_BRG4 0x00030000 /* SCC2 Tx Clock Source is BRG4 */ | ||
1007 | #define CMXSCR_TS2CS_CLK11 0x00040000 /* SCC2 Tx Clock Source is CLK11 */ | ||
1008 | #define CMXSCR_TS2CS_CLK12 0x00050000 /* SCC2 Tx Clock Source is CLK12 */ | ||
1009 | #define CMXSCR_TS2CS_CLK3 0x00060000 /* SCC2 Tx Clock Source is CLK3 */ | ||
1010 | #define CMXSCR_TS2CS_CLK4 0x00070000 /* SCC2 Tx Clock Source is CLK4 */ | ||
1011 | |||
1012 | #define CMXSCR_RS3CS_BRG1 0x00000000 /* SCC3 Rx Clock Source is BRG1 */ | ||
1013 | #define CMXSCR_RS3CS_BRG2 0x00000800 /* SCC3 Rx Clock Source is BRG2 */ | ||
1014 | #define CMXSCR_RS3CS_BRG3 0x00001000 /* SCC3 Rx Clock Source is BRG3 */ | ||
1015 | #define CMXSCR_RS3CS_BRG4 0x00001800 /* SCC3 Rx Clock Source is BRG4 */ | ||
1016 | #define CMXSCR_RS3CS_CLK5 0x00002000 /* SCC3 Rx Clock Source is CLK5 */ | ||
1017 | #define CMXSCR_RS3CS_CLK6 0x00002800 /* SCC3 Rx Clock Source is CLK6 */ | ||
1018 | #define CMXSCR_RS3CS_CLK7 0x00003000 /* SCC3 Rx Clock Source is CLK7 */ | ||
1019 | #define CMXSCR_RS3CS_CLK8 0x00003800 /* SCC3 Rx Clock Source is CLK8 */ | ||
1020 | |||
1021 | #define CMXSCR_TS3CS_BRG1 0x00000000 /* SCC3 Tx Clock Source is BRG1 */ | ||
1022 | #define CMXSCR_TS3CS_BRG2 0x00000100 /* SCC3 Tx Clock Source is BRG2 */ | ||
1023 | #define CMXSCR_TS3CS_BRG3 0x00000200 /* SCC3 Tx Clock Source is BRG3 */ | ||
1024 | #define CMXSCR_TS3CS_BRG4 0x00000300 /* SCC3 Tx Clock Source is BRG4 */ | ||
1025 | #define CMXSCR_TS3CS_CLK5 0x00000400 /* SCC3 Tx Clock Source is CLK5 */ | ||
1026 | #define CMXSCR_TS3CS_CLK6 0x00000500 /* SCC3 Tx Clock Source is CLK6 */ | ||
1027 | #define CMXSCR_TS3CS_CLK7 0x00000600 /* SCC3 Tx Clock Source is CLK7 */ | ||
1028 | #define CMXSCR_TS3CS_CLK8 0x00000700 /* SCC3 Tx Clock Source is CLK8 */ | ||
1029 | |||
1030 | #define CMXSCR_RS4CS_BRG1 0x00000000 /* SCC4 Rx Clock Source is BRG1 */ | ||
1031 | #define CMXSCR_RS4CS_BRG2 0x00000008 /* SCC4 Rx Clock Source is BRG2 */ | ||
1032 | #define CMXSCR_RS4CS_BRG3 0x00000010 /* SCC4 Rx Clock Source is BRG3 */ | ||
1033 | #define CMXSCR_RS4CS_BRG4 0x00000018 /* SCC4 Rx Clock Source is BRG4 */ | ||
1034 | #define CMXSCR_RS4CS_CLK5 0x00000020 /* SCC4 Rx Clock Source is CLK5 */ | ||
1035 | #define CMXSCR_RS4CS_CLK6 0x00000028 /* SCC4 Rx Clock Source is CLK6 */ | ||
1036 | #define CMXSCR_RS4CS_CLK7 0x00000030 /* SCC4 Rx Clock Source is CLK7 */ | ||
1037 | #define CMXSCR_RS4CS_CLK8 0x00000038 /* SCC4 Rx Clock Source is CLK8 */ | ||
1038 | |||
1039 | #define CMXSCR_TS4CS_BRG1 0x00000000 /* SCC4 Tx Clock Source is BRG1 */ | ||
1040 | #define CMXSCR_TS4CS_BRG2 0x00000001 /* SCC4 Tx Clock Source is BRG2 */ | ||
1041 | #define CMXSCR_TS4CS_BRG3 0x00000002 /* SCC4 Tx Clock Source is BRG3 */ | ||
1042 | #define CMXSCR_TS4CS_BRG4 0x00000003 /* SCC4 Tx Clock Source is BRG4 */ | ||
1043 | #define CMXSCR_TS4CS_CLK5 0x00000004 /* SCC4 Tx Clock Source is CLK5 */ | ||
1044 | #define CMXSCR_TS4CS_CLK6 0x00000005 /* SCC4 Tx Clock Source is CLK6 */ | ||
1045 | #define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */ | ||
1046 | #define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */ | ||
1047 | |||
1048 | /*----------------------------------------------------------------------- | ||
1049 | * SIUMCR - SIU Module Configuration Register 4-31 | ||
1050 | */ | ||
1051 | #define SIUMCR_BBD 0x80000000 /* Bus Busy Disable */ | ||
1052 | #define SIUMCR_ESE 0x40000000 /* External Snoop Enable */ | ||
1053 | #define SIUMCR_PBSE 0x20000000 /* Parity Byte Select Enable */ | ||
1054 | #define SIUMCR_CDIS 0x10000000 /* Core Disable */ | ||
1055 | #define SIUMCR_DPPC00 0x00000000 /* Data Parity Pins Configuration*/ | ||
1056 | #define SIUMCR_DPPC01 0x04000000 /* - " - */ | ||
1057 | #define SIUMCR_DPPC10 0x08000000 /* - " - */ | ||
1058 | #define SIUMCR_DPPC11 0x0c000000 /* - " - */ | ||
1059 | #define SIUMCR_L2CPC00 0x00000000 /* L2 Cache Pins Configuration */ | ||
1060 | #define SIUMCR_L2CPC01 0x01000000 /* - " - */ | ||
1061 | #define SIUMCR_L2CPC10 0x02000000 /* - " - */ | ||
1062 | #define SIUMCR_L2CPC11 0x03000000 /* - " - */ | ||
1063 | #define SIUMCR_LBPC00 0x00000000 /* Local Bus Pins Configuration */ | ||
1064 | #define SIUMCR_LBPC01 0x00400000 /* - " - */ | ||
1065 | #define SIUMCR_LBPC10 0x00800000 /* - " - */ | ||
1066 | #define SIUMCR_LBPC11 0x00c00000 /* - " - */ | ||
1067 | #define SIUMCR_APPC00 0x00000000 /* Address Parity Pins Configuration*/ | ||
1068 | #define SIUMCR_APPC01 0x00100000 /* - " - */ | ||
1069 | #define SIUMCR_APPC10 0x00200000 /* - " - */ | ||
1070 | #define SIUMCR_APPC11 0x00300000 /* - " - */ | ||
1071 | #define SIUMCR_CS10PC00 0x00000000 /* CS10 Pin Configuration */ | ||
1072 | #define SIUMCR_CS10PC01 0x00040000 /* - " - */ | ||
1073 | #define SIUMCR_CS10PC10 0x00080000 /* - " - */ | ||
1074 | #define SIUMCR_CS10PC11 0x000c0000 /* - " - */ | ||
1075 | #define SIUMCR_BCTLC00 0x00000000 /* Buffer Control Configuration */ | ||
1076 | #define SIUMCR_BCTLC01 0x00010000 /* - " - */ | ||
1077 | #define SIUMCR_BCTLC10 0x00020000 /* - " - */ | ||
1078 | #define SIUMCR_BCTLC11 0x00030000 /* - " - */ | ||
1079 | #define SIUMCR_MMR00 0x00000000 /* Mask Masters Requests */ | ||
1080 | #define SIUMCR_MMR01 0x00004000 /* - " - */ | ||
1081 | #define SIUMCR_MMR10 0x00008000 /* - " - */ | ||
1082 | #define SIUMCR_MMR11 0x0000c000 /* - " - */ | ||
1083 | #define SIUMCR_LPBSE 0x00002000 /* LocalBus Parity Byte Select Enable*/ | ||
1084 | |||
1085 | /*----------------------------------------------------------------------- | ||
1086 | * SCCR - System Clock Control Register 9-8 | ||
1087 | */ | ||
1088 | #define SCCR_PCI_MODE 0x00000100 /* PCI Mode */ | ||
1089 | #define SCCR_PCI_MODCK 0x00000080 /* Value of PCI_MODCK pin */ | ||
1090 | #define SCCR_PCIDF_MSK 0x00000078 /* PCI division factor */ | ||
1091 | #define SCCR_PCIDF_SHIFT 3 | ||
1092 | |||
1093 | #ifndef CPM_IMMR_OFFSET | ||
1094 | #define CPM_IMMR_OFFSET 0x101a8 | ||
1095 | #endif | ||
1096 | |||
1097 | #define FCC_PSMR_RMII ((uint)0x00020000) /* Use RMII interface */ | ||
1098 | |||
1099 | /* FCC iop & clock configuration. BSP code is responsible to define Fx_RXCLK & Fx_TXCLK | ||
1100 | * in order to use clock-computing stuff below for the FCC x | ||
1101 | */ | ||
1102 | |||
1103 | /* Automatically generates register configurations */ | ||
1104 | #define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ | ||
1105 | |||
1106 | #define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ | ||
1107 | #define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ | ||
1108 | #define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ | ||
1109 | #define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ | ||
1110 | #define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ | ||
1111 | #define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ | ||
1112 | |||
1113 | #define PC_F1RXCLK PC_CLK(F1_RXCLK) | ||
1114 | #define PC_F1TXCLK PC_CLK(F1_TXCLK) | ||
1115 | #define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) | ||
1116 | #define CMX1_CLK_MASK ((uint)0xff000000) | ||
1117 | |||
1118 | #define PC_F2RXCLK PC_CLK(F2_RXCLK) | ||
1119 | #define PC_F2TXCLK PC_CLK(F2_TXCLK) | ||
1120 | #define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) | ||
1121 | #define CMX2_CLK_MASK ((uint)0x00ff0000) | ||
1122 | |||
1123 | #define PC_F3RXCLK PC_CLK(F3_RXCLK) | ||
1124 | #define PC_F3TXCLK PC_CLK(F3_TXCLK) | ||
1125 | #define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) | ||
1126 | #define CMX3_CLK_MASK ((uint)0x0000ff00) | ||
1127 | |||
1128 | #define CPMUX_CLK_MASK (CMX3_CLK_MASK | CMX2_CLK_MASK) | ||
1129 | #define CPMUX_CLK_ROUTE (CMX3_CLK_ROUTE | CMX2_CLK_ROUTE) | ||
1130 | |||
1131 | #define CLK_TRX (PC_F3TXCLK | PC_F3RXCLK | PC_F2TXCLK | PC_F2RXCLK) | ||
1132 | |||
1133 | /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, | ||
1134 | * but there is little variation among the choices. | ||
1135 | */ | ||
1136 | #define PA1_COL 0x00000001U | ||
1137 | #define PA1_CRS 0x00000002U | ||
1138 | #define PA1_TXER 0x00000004U | ||
1139 | #define PA1_TXEN 0x00000008U | ||
1140 | #define PA1_RXDV 0x00000010U | ||
1141 | #define PA1_RXER 0x00000020U | ||
1142 | #define PA1_TXDAT 0x00003c00U | ||
1143 | #define PA1_RXDAT 0x0003c000U | ||
1144 | #define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) | ||
1145 | #define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ | ||
1146 | PA1_RXDV | PA1_RXER) | ||
1147 | #define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) | ||
1148 | #define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) | ||
1149 | |||
1150 | |||
1151 | /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, | ||
1152 | * but there is little variation among the choices. | ||
1153 | */ | ||
1154 | #define PB2_TXER 0x00000001U | ||
1155 | #define PB2_RXDV 0x00000002U | ||
1156 | #define PB2_TXEN 0x00000004U | ||
1157 | #define PB2_RXER 0x00000008U | ||
1158 | #define PB2_COL 0x00000010U | ||
1159 | #define PB2_CRS 0x00000020U | ||
1160 | #define PB2_TXDAT 0x000003c0U | ||
1161 | #define PB2_RXDAT 0x00003c00U | ||
1162 | #define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ | ||
1163 | PB2_RXER | PB2_RXDV | PB2_TXER) | ||
1164 | #define PB2_PSORB1 (PB2_TXEN) | ||
1165 | #define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) | ||
1166 | #define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) | ||
1167 | |||
1168 | |||
1169 | /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, | ||
1170 | * but there is little variation among the choices. | ||
1171 | */ | ||
1172 | #define PB3_RXDV 0x00004000U | ||
1173 | #define PB3_RXER 0x00008000U | ||
1174 | #define PB3_TXER 0x00010000U | ||
1175 | #define PB3_TXEN 0x00020000U | ||
1176 | #define PB3_COL 0x00040000U | ||
1177 | #define PB3_CRS 0x00080000U | ||
1178 | #define PB3_TXDAT 0x0f000000U | ||
1179 | #define PC3_TXDAT 0x00000010U | ||
1180 | #define PB3_RXDAT 0x00f00000U | ||
1181 | #define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ | ||
1182 | PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) | ||
1183 | #define PB3_PSORB1 0 | ||
1184 | #define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) | ||
1185 | #define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) | ||
1186 | #define PC3_DIRC1 (PC3_TXDAT) | ||
1187 | |||
1188 | /* Handy macro to specify mem for FCCs*/ | ||
1189 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | ||
1190 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | ||
1191 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | ||
1192 | #define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2) | ||
1193 | |||
1194 | /* Clocks and GRG's */ | ||
1195 | |||
1196 | enum cpm_clk_dir { | ||
1197 | CPM_CLK_RX, | ||
1198 | CPM_CLK_TX, | ||
1199 | CPM_CLK_RTX | ||
1200 | }; | ||
1201 | |||
1202 | enum cpm_clk_target { | ||
1203 | CPM_CLK_SCC1, | ||
1204 | CPM_CLK_SCC2, | ||
1205 | CPM_CLK_SCC3, | ||
1206 | CPM_CLK_SCC4, | ||
1207 | CPM_CLK_FCC1, | ||
1208 | CPM_CLK_FCC2, | ||
1209 | CPM_CLK_FCC3 | ||
1210 | }; | ||
1211 | |||
1212 | enum cpm_clk { | ||
1213 | CPM_CLK_NONE = 0, | ||
1214 | CPM_BRG1, /* Baud Rate Generator 1 */ | ||
1215 | CPM_BRG2, /* Baud Rate Generator 2 */ | ||
1216 | CPM_BRG3, /* Baud Rate Generator 3 */ | ||
1217 | CPM_BRG4, /* Baud Rate Generator 4 */ | ||
1218 | CPM_BRG5, /* Baud Rate Generator 5 */ | ||
1219 | CPM_BRG6, /* Baud Rate Generator 6 */ | ||
1220 | CPM_BRG7, /* Baud Rate Generator 7 */ | ||
1221 | CPM_BRG8, /* Baud Rate Generator 8 */ | ||
1222 | CPM_CLK1, /* Clock 1 */ | ||
1223 | CPM_CLK2, /* Clock 2 */ | ||
1224 | CPM_CLK3, /* Clock 3 */ | ||
1225 | CPM_CLK4, /* Clock 4 */ | ||
1226 | CPM_CLK5, /* Clock 5 */ | ||
1227 | CPM_CLK6, /* Clock 6 */ | ||
1228 | CPM_CLK7, /* Clock 7 */ | ||
1229 | CPM_CLK8, /* Clock 8 */ | ||
1230 | CPM_CLK9, /* Clock 9 */ | ||
1231 | CPM_CLK10, /* Clock 10 */ | ||
1232 | CPM_CLK11, /* Clock 11 */ | ||
1233 | CPM_CLK12, /* Clock 12 */ | ||
1234 | CPM_CLK13, /* Clock 13 */ | ||
1235 | CPM_CLK14, /* Clock 14 */ | ||
1236 | CPM_CLK15, /* Clock 15 */ | ||
1237 | CPM_CLK16, /* Clock 16 */ | ||
1238 | CPM_CLK17, /* Clock 17 */ | ||
1239 | CPM_CLK18, /* Clock 18 */ | ||
1240 | CPM_CLK19, /* Clock 19 */ | ||
1241 | CPM_CLK20, /* Clock 20 */ | ||
1242 | CPM_CLK_DUMMY | ||
1243 | }; | ||
1244 | |||
1245 | extern int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode); | ||
1246 | |||
1247 | #endif /* __CPM2__ */ | ||
1248 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 3dc8e2dfca84..f62cffd56c0c 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -136,6 +136,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
136 | #define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) | 136 | #define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) |
137 | #define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x0000000000800000) | 137 | #define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x0000000000800000) |
138 | #define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x0000000001000000) | 138 | #define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x0000000001000000) |
139 | #define CPU_FTR_SPE ASM_CONST(0x0000000002000000) | ||
139 | 140 | ||
140 | /* | 141 | /* |
141 | * Add the 64-bit processor unique features in the top half of the word; | 142 | * Add the 64-bit processor unique features in the top half of the word; |
@@ -180,6 +181,21 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
180 | #define PPC_FEATURE_HAS_ALTIVEC_COMP 0 | 181 | #define PPC_FEATURE_HAS_ALTIVEC_COMP 0 |
181 | #endif | 182 | #endif |
182 | 183 | ||
184 | /* We only set the spe features if the kernel was compiled with spe | ||
185 | * support | ||
186 | */ | ||
187 | #ifdef CONFIG_SPE | ||
188 | #define CPU_FTR_SPE_COMP CPU_FTR_SPE | ||
189 | #define PPC_FEATURE_HAS_SPE_COMP PPC_FEATURE_HAS_SPE | ||
190 | #define PPC_FEATURE_HAS_EFP_SINGLE_COMP PPC_FEATURE_HAS_EFP_SINGLE | ||
191 | #define PPC_FEATURE_HAS_EFP_DOUBLE_COMP PPC_FEATURE_HAS_EFP_DOUBLE | ||
192 | #else | ||
193 | #define CPU_FTR_SPE_COMP 0 | ||
194 | #define PPC_FEATURE_HAS_SPE_COMP 0 | ||
195 | #define PPC_FEATURE_HAS_EFP_SINGLE_COMP 0 | ||
196 | #define PPC_FEATURE_HAS_EFP_DOUBLE_COMP 0 | ||
197 | #endif | ||
198 | |||
183 | /* We need to mark all pages as being coherent if we're SMP or we | 199 | /* We need to mark all pages as being coherent if we're SMP or we |
184 | * have a 74[45]x and an MPC107 host bridge. Also 83xx requires | 200 | * have a 74[45]x and an MPC107 host bridge. Also 83xx requires |
185 | * it for PCI "streaming/prefetch" to work properly. | 201 | * it for PCI "streaming/prefetch" to work properly. |
@@ -310,10 +326,12 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
310 | #define CPU_FTRS_8XX (CPU_FTR_USE_TB) | 326 | #define CPU_FTRS_8XX (CPU_FTR_USE_TB) |
311 | #define CPU_FTRS_40X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) | 327 | #define CPU_FTRS_40X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) |
312 | #define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) | 328 | #define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) |
313 | #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ | 329 | #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ |
314 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_UNIFIED_ID_CACHE) | 330 | CPU_FTR_NODSISRALIGN | CPU_FTR_COHERENT_ICACHE | \ |
315 | #define CPU_FTRS_E500 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) | 331 | CPU_FTR_UNIFIED_ID_CACHE) |
316 | #define CPU_FTRS_E500_2 (CPU_FTR_USE_TB | \ | 332 | #define CPU_FTRS_E500 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ |
333 | CPU_FTR_NODSISRALIGN) | ||
334 | #define CPU_FTRS_E500_2 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ | ||
317 | CPU_FTR_BIG_PHYS | CPU_FTR_NODSISRALIGN) | 335 | CPU_FTR_BIG_PHYS | CPU_FTR_NODSISRALIGN) |
318 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) | 336 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) |
319 | 337 | ||
diff --git a/include/asm-powerpc/dcr-mmio.h b/include/asm-powerpc/dcr-mmio.h index 5dbfca8dde36..6b82c3ba495a 100644 --- a/include/asm-powerpc/dcr-mmio.h +++ b/include/asm-powerpc/dcr-mmio.h | |||
@@ -23,7 +23,11 @@ | |||
23 | 23 | ||
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | 25 | ||
26 | typedef struct { void __iomem *token; unsigned int stride; } dcr_host_t; | 26 | typedef struct { |
27 | void __iomem *token; | ||
28 | unsigned int stride; | ||
29 | unsigned int base; | ||
30 | } dcr_host_t; | ||
27 | 31 | ||
28 | #define DCR_MAP_OK(host) ((host).token != NULL) | 32 | #define DCR_MAP_OK(host) ((host).token != NULL) |
29 | 33 | ||
diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h index 05af081222f6..f41058c0f6cb 100644 --- a/include/asm-powerpc/dcr-native.h +++ b/include/asm-powerpc/dcr-native.h | |||
@@ -22,11 +22,13 @@ | |||
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
24 | 24 | ||
25 | typedef struct {} dcr_host_t; | 25 | typedef struct { |
26 | unsigned int base; | ||
27 | } dcr_host_t; | ||
26 | 28 | ||
27 | #define DCR_MAP_OK(host) (1) | 29 | #define DCR_MAP_OK(host) (1) |
28 | 30 | ||
29 | #define dcr_map(dev, dcr_n, dcr_c) ((dcr_host_t){}) | 31 | #define dcr_map(dev, dcr_n, dcr_c) ((dcr_host_t){ .base = (dcr_n) }) |
30 | #define dcr_unmap(host, dcr_n, dcr_c) do {} while (0) | 32 | #define dcr_unmap(host, dcr_n, dcr_c) do {} while (0) |
31 | #define dcr_read(host, dcr_n) mfdcr(dcr_n) | 33 | #define dcr_read(host, dcr_n) mfdcr(dcr_n) |
32 | #define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value) | 34 | #define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value) |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 744d6bb24116..d05891608f74 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -249,8 +249,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size, | |||
249 | return virt_to_bus(ptr); | 249 | return virt_to_bus(ptr); |
250 | } | 250 | } |
251 | 251 | ||
252 | /* We do nothing. */ | 252 | static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, |
253 | #define dma_unmap_single(dev, addr, size, dir) ((void)0) | 253 | size_t size, |
254 | enum dma_data_direction direction) | ||
255 | { | ||
256 | /* We do nothing. */ | ||
257 | } | ||
254 | 258 | ||
255 | static inline dma_addr_t | 259 | static inline dma_addr_t |
256 | dma_map_page(struct device *dev, struct page *page, | 260 | dma_map_page(struct device *dev, struct page *page, |
@@ -264,8 +268,12 @@ dma_map_page(struct device *dev, struct page *page, | |||
264 | return page_to_bus(page) + offset; | 268 | return page_to_bus(page) + offset; |
265 | } | 269 | } |
266 | 270 | ||
267 | /* We do nothing. */ | 271 | static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, |
268 | #define dma_unmap_page(dev, handle, size, dir) ((void)0) | 272 | size_t size, |
273 | enum dma_data_direction direction) | ||
274 | { | ||
275 | /* We do nothing. */ | ||
276 | } | ||
269 | 277 | ||
270 | static inline int | 278 | static inline int |
271 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 279 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
@@ -284,8 +292,12 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
284 | return nents; | 292 | return nents; |
285 | } | 293 | } |
286 | 294 | ||
287 | /* We don't do anything here. */ | 295 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, |
288 | #define dma_unmap_sg(dev, sg, nents, dir) ((void)0) | 296 | int nhwentries, |
297 | enum dma_data_direction direction) | ||
298 | { | ||
299 | /* We don't do anything here. */ | ||
300 | } | ||
289 | 301 | ||
290 | #endif /* CONFIG_PPC64 */ | 302 | #endif /* CONFIG_PPC64 */ |
291 | 303 | ||
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index de507995c7b1..e42820d6d25b 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h | |||
@@ -413,13 +413,8 @@ do { \ | |||
413 | /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */ | 413 | /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */ |
414 | #define NT_SPU 1 | 414 | #define NT_SPU 1 |
415 | 415 | ||
416 | extern int arch_notes_size(void); | ||
417 | extern void arch_write_notes(struct file *file); | ||
418 | |||
419 | #define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size() | ||
420 | #define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file) | ||
421 | |||
422 | #define ARCH_HAVE_EXTRA_ELF_NOTES | 416 | #define ARCH_HAVE_EXTRA_ELF_NOTES |
423 | #endif /* CONFIG_PPC_CELL */ | 417 | |
418 | #endif /* CONFIG_SPU_BASE */ | ||
424 | 419 | ||
425 | #endif /* _ASM_POWERPC_ELF_H */ | 420 | #endif /* _ASM_POWERPC_ELF_H */ |
diff --git a/include/asm-powerpc/exception.h b/include/asm-powerpc/exception.h new file mode 100644 index 000000000000..39abdb02fdef --- /dev/null +++ b/include/asm-powerpc/exception.h | |||
@@ -0,0 +1,311 @@ | |||
1 | #ifndef _ASM_POWERPC_EXCEPTION_H | ||
2 | #define _ASM_POWERPC_EXCEPTION_H | ||
3 | /* | ||
4 | * Extracted from head_64.S | ||
5 | * | ||
6 | * PowerPC version | ||
7 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
8 | * | ||
9 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | ||
10 | * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu> | ||
11 | * Adapted for Power Macintosh by Paul Mackerras. | ||
12 | * Low-level exception handlers and MMU support | ||
13 | * rewritten by Paul Mackerras. | ||
14 | * Copyright (C) 1996 Paul Mackerras. | ||
15 | * | ||
16 | * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and | ||
17 | * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com | ||
18 | * | ||
19 | * This file contains the low-level support and setup for the | ||
20 | * PowerPC-64 platform, including trap and interrupt dispatch. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or | ||
23 | * modify it under the terms of the GNU General Public License | ||
24 | * as published by the Free Software Foundation; either version | ||
25 | * 2 of the License, or (at your option) any later version. | ||
26 | */ | ||
27 | /* | ||
28 | * The following macros define the code that appears as | ||
29 | * the prologue to each of the exception handlers. They | ||
30 | * are split into two parts to allow a single kernel binary | ||
31 | * to be used for pSeries and iSeries. | ||
32 | * | ||
33 | * We make as much of the exception code common between native | ||
34 | * exception handlers (including pSeries LPAR) and iSeries LPAR | ||
35 | * implementations as possible. | ||
36 | */ | ||
37 | |||
38 | #define EX_R9 0 | ||
39 | #define EX_R10 8 | ||
40 | #define EX_R11 16 | ||
41 | #define EX_R12 24 | ||
42 | #define EX_R13 32 | ||
43 | #define EX_SRR0 40 | ||
44 | #define EX_DAR 48 | ||
45 | #define EX_DSISR 56 | ||
46 | #define EX_CCR 60 | ||
47 | #define EX_R3 64 | ||
48 | #define EX_LR 72 | ||
49 | |||
50 | /* | ||
51 | * We're short on space and time in the exception prolog, so we can't | ||
52 | * use the normal SET_REG_IMMEDIATE macro. Normally we just need the | ||
53 | * low halfword of the address, but for Kdump we need the whole low | ||
54 | * word. | ||
55 | */ | ||
56 | #ifdef CONFIG_CRASH_DUMP | ||
57 | #define LOAD_HANDLER(reg, label) \ | ||
58 | oris reg,reg,(label)@h; /* virt addr of handler ... */ \ | ||
59 | ori reg,reg,(label)@l; /* .. and the rest */ | ||
60 | #else | ||
61 | #define LOAD_HANDLER(reg, label) \ | ||
62 | ori reg,reg,(label)@l; /* virt addr of handler ... */ | ||
63 | #endif | ||
64 | |||
65 | #define EXCEPTION_PROLOG_1(area) \ | ||
66 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
67 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
68 | std r10,area+EX_R10(r13); \ | ||
69 | std r11,area+EX_R11(r13); \ | ||
70 | std r12,area+EX_R12(r13); \ | ||
71 | mfspr r9,SPRN_SPRG1; \ | ||
72 | std r9,area+EX_R13(r13); \ | ||
73 | mfcr r9 | ||
74 | |||
75 | /* | ||
76 | * Equal to EXCEPTION_PROLOG_PSERIES, except that it forces 64bit mode. | ||
77 | * The firmware calls the registered system_reset_fwnmi and | ||
78 | * machine_check_fwnmi handlers in 32bit mode if the cpu happens to run | ||
79 | * a 32bit application at the time of the event. | ||
80 | * This firmware bug is present on POWER4 and JS20. | ||
81 | */ | ||
82 | #define EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(area, label) \ | ||
83 | EXCEPTION_PROLOG_1(area); \ | ||
84 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
85 | mfmsr r10; \ | ||
86 | /* force 64bit mode */ \ | ||
87 | li r11,5; /* MSR_SF_LG|MSR_ISF_LG */ \ | ||
88 | rldimi r10,r11,61,0; /* insert into top 3 bits */ \ | ||
89 | /* done 64bit mode */ \ | ||
90 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
91 | LOAD_HANDLER(r12,label) \ | ||
92 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
93 | mtspr SPRN_SRR0,r12; \ | ||
94 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
95 | mtspr SPRN_SRR1,r10; \ | ||
96 | rfid; \ | ||
97 | b . /* prevent speculative execution */ | ||
98 | |||
99 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | ||
100 | EXCEPTION_PROLOG_1(area); \ | ||
101 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
102 | mfmsr r10; \ | ||
103 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
104 | LOAD_HANDLER(r12,label) \ | ||
105 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
106 | mtspr SPRN_SRR0,r12; \ | ||
107 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
108 | mtspr SPRN_SRR1,r10; \ | ||
109 | rfid; \ | ||
110 | b . /* prevent speculative execution */ | ||
111 | |||
112 | /* | ||
113 | * The common exception prolog is used for all except a few exceptions | ||
114 | * such as a segment miss on a kernel address. We have to be prepared | ||
115 | * to take another exception from the point where we first touch the | ||
116 | * kernel stack onwards. | ||
117 | * | ||
118 | * On entry r13 points to the paca, r9-r13 are saved in the paca, | ||
119 | * r9 contains the saved CR, r11 and r12 contain the saved SRR0 and | ||
120 | * SRR1, and relocation is on. | ||
121 | */ | ||
122 | #define EXCEPTION_PROLOG_COMMON(n, area) \ | ||
123 | andi. r10,r12,MSR_PR; /* See if coming from user */ \ | ||
124 | mr r10,r1; /* Save r1 */ \ | ||
125 | subi r1,r1,INT_FRAME_SIZE; /* alloc frame on kernel stack */ \ | ||
126 | beq- 1f; \ | ||
127 | ld r1,PACAKSAVE(r13); /* kernel stack to use */ \ | ||
128 | 1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ | ||
129 | bge- cr1,2f; /* abort if it is */ \ | ||
130 | b 3f; \ | ||
131 | 2: li r1,(n); /* will be reloaded later */ \ | ||
132 | sth r1,PACA_TRAP_SAVE(r13); \ | ||
133 | b bad_stack; \ | ||
134 | 3: std r9,_CCR(r1); /* save CR in stackframe */ \ | ||
135 | std r11,_NIP(r1); /* save SRR0 in stackframe */ \ | ||
136 | std r12,_MSR(r1); /* save SRR1 in stackframe */ \ | ||
137 | std r10,0(r1); /* make stack chain pointer */ \ | ||
138 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | ||
139 | std r10,GPR1(r1); /* save r1 in stackframe */ \ | ||
140 | ACCOUNT_CPU_USER_ENTRY(r9, r10); \ | ||
141 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | ||
142 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | ||
143 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | ||
144 | ld r9,area+EX_R9(r13); /* move r9, r10 to stackframe */ \ | ||
145 | ld r10,area+EX_R10(r13); \ | ||
146 | std r9,GPR9(r1); \ | ||
147 | std r10,GPR10(r1); \ | ||
148 | ld r9,area+EX_R11(r13); /* move r11 - r13 to stackframe */ \ | ||
149 | ld r10,area+EX_R12(r13); \ | ||
150 | ld r11,area+EX_R13(r13); \ | ||
151 | std r9,GPR11(r1); \ | ||
152 | std r10,GPR12(r1); \ | ||
153 | std r11,GPR13(r1); \ | ||
154 | ld r2,PACATOC(r13); /* get kernel TOC into r2 */ \ | ||
155 | mflr r9; /* save LR in stackframe */ \ | ||
156 | std r9,_LINK(r1); \ | ||
157 | mfctr r10; /* save CTR in stackframe */ \ | ||
158 | std r10,_CTR(r1); \ | ||
159 | lbz r10,PACASOFTIRQEN(r13); \ | ||
160 | mfspr r11,SPRN_XER; /* save XER in stackframe */ \ | ||
161 | std r10,SOFTE(r1); \ | ||
162 | std r11,_XER(r1); \ | ||
163 | li r9,(n)+1; \ | ||
164 | std r9,_TRAP(r1); /* set trap number */ \ | ||
165 | li r10,0; \ | ||
166 | ld r11,exception_marker@toc(r2); \ | ||
167 | std r10,RESULT(r1); /* clear regs->result */ \ | ||
168 | std r11,STACK_FRAME_OVERHEAD-16(r1); /* mark the frame */ | ||
169 | |||
170 | /* | ||
171 | * Exception vectors. | ||
172 | */ | ||
173 | #define STD_EXCEPTION_PSERIES(n, label) \ | ||
174 | . = n; \ | ||
175 | .globl label##_pSeries; \ | ||
176 | label##_pSeries: \ | ||
177 | HMT_MEDIUM; \ | ||
178 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
179 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | ||
180 | |||
181 | #define HSTD_EXCEPTION_PSERIES(n, label) \ | ||
182 | . = n; \ | ||
183 | .globl label##_pSeries; \ | ||
184 | label##_pSeries: \ | ||
185 | HMT_MEDIUM; \ | ||
186 | mtspr SPRN_SPRG1,r20; /* save r20 */ \ | ||
187 | mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ | ||
188 | mtspr SPRN_SRR0,r20; \ | ||
189 | mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ | ||
190 | mtspr SPRN_SRR1,r20; \ | ||
191 | mfspr r20,SPRN_SPRG1; /* restore r20 */ \ | ||
192 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
193 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) | ||
194 | |||
195 | |||
196 | #define MASKABLE_EXCEPTION_PSERIES(n, label) \ | ||
197 | . = n; \ | ||
198 | .globl label##_pSeries; \ | ||
199 | label##_pSeries: \ | ||
200 | HMT_MEDIUM; \ | ||
201 | mtspr SPRN_SPRG1,r13; /* save r13 */ \ | ||
202 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
203 | std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \ | ||
204 | std r10,PACA_EXGEN+EX_R10(r13); \ | ||
205 | lbz r10,PACASOFTIRQEN(r13); \ | ||
206 | mfcr r9; \ | ||
207 | cmpwi r10,0; \ | ||
208 | beq masked_interrupt; \ | ||
209 | mfspr r10,SPRN_SPRG1; \ | ||
210 | std r10,PACA_EXGEN+EX_R13(r13); \ | ||
211 | std r11,PACA_EXGEN+EX_R11(r13); \ | ||
212 | std r12,PACA_EXGEN+EX_R12(r13); \ | ||
213 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
214 | mfmsr r10; \ | ||
215 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
216 | LOAD_HANDLER(r12,label##_common) \ | ||
217 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
218 | mtspr SPRN_SRR0,r12; \ | ||
219 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
220 | mtspr SPRN_SRR1,r10; \ | ||
221 | rfid; \ | ||
222 | b . /* prevent speculative execution */ | ||
223 | |||
224 | #ifdef CONFIG_PPC_ISERIES | ||
225 | #define DISABLE_INTS \ | ||
226 | li r11,0; \ | ||
227 | stb r11,PACASOFTIRQEN(r13); \ | ||
228 | BEGIN_FW_FTR_SECTION; \ | ||
229 | stb r11,PACAHARDIRQEN(r13); \ | ||
230 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES); \ | ||
231 | BEGIN_FW_FTR_SECTION; \ | ||
232 | mfmsr r10; \ | ||
233 | ori r10,r10,MSR_EE; \ | ||
234 | mtmsrd r10,1; \ | ||
235 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
236 | |||
237 | #else | ||
238 | #define DISABLE_INTS \ | ||
239 | li r11,0; \ | ||
240 | stb r11,PACASOFTIRQEN(r13); \ | ||
241 | stb r11,PACAHARDIRQEN(r13) | ||
242 | |||
243 | #endif /* CONFIG_PPC_ISERIES */ | ||
244 | |||
245 | #define ENABLE_INTS \ | ||
246 | ld r12,_MSR(r1); \ | ||
247 | mfmsr r11; \ | ||
248 | rlwimi r11,r12,0,MSR_EE; \ | ||
249 | mtmsrd r11,1 | ||
250 | |||
251 | #define STD_EXCEPTION_COMMON(trap, label, hdlr) \ | ||
252 | .align 7; \ | ||
253 | .globl label##_common; \ | ||
254 | label##_common: \ | ||
255 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
256 | DISABLE_INTS; \ | ||
257 | bl .save_nvgprs; \ | ||
258 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
259 | bl hdlr; \ | ||
260 | b .ret_from_except | ||
261 | |||
262 | /* | ||
263 | * Like STD_EXCEPTION_COMMON, but for exceptions that can occur | ||
264 | * in the idle task and therefore need the special idle handling. | ||
265 | */ | ||
266 | #define STD_EXCEPTION_COMMON_IDLE(trap, label, hdlr) \ | ||
267 | .align 7; \ | ||
268 | .globl label##_common; \ | ||
269 | label##_common: \ | ||
270 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
271 | FINISH_NAP; \ | ||
272 | DISABLE_INTS; \ | ||
273 | bl .save_nvgprs; \ | ||
274 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
275 | bl hdlr; \ | ||
276 | b .ret_from_except | ||
277 | |||
278 | #define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr) \ | ||
279 | .align 7; \ | ||
280 | .globl label##_common; \ | ||
281 | label##_common: \ | ||
282 | EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ | ||
283 | FINISH_NAP; \ | ||
284 | DISABLE_INTS; \ | ||
285 | BEGIN_FTR_SECTION \ | ||
286 | bl .ppc64_runlatch_on; \ | ||
287 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) \ | ||
288 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
289 | bl hdlr; \ | ||
290 | b .ret_from_except_lite | ||
291 | |||
292 | /* | ||
293 | * When the idle code in power4_idle puts the CPU into NAP mode, | ||
294 | * it has to do so in a loop, and relies on the external interrupt | ||
295 | * and decrementer interrupt entry code to get it out of the loop. | ||
296 | * It sets the _TLF_NAPPING bit in current_thread_info()->local_flags | ||
297 | * to signal that it is in the loop and needs help to get out. | ||
298 | */ | ||
299 | #ifdef CONFIG_PPC_970_NAP | ||
300 | #define FINISH_NAP \ | ||
301 | BEGIN_FTR_SECTION \ | ||
302 | clrrdi r11,r1,THREAD_SHIFT; \ | ||
303 | ld r9,TI_LOCAL_FLAGS(r11); \ | ||
304 | andi. r10,r9,_TLF_NAPPING; \ | ||
305 | bnel power4_fixup_nap; \ | ||
306 | END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) | ||
307 | #else | ||
308 | #define FINISH_NAP | ||
309 | #endif | ||
310 | |||
311 | #endif /* _ASM_POWERPC_EXCEPTION_H */ | ||
diff --git a/include/asm-powerpc/highmem.h b/include/asm-powerpc/highmem.h new file mode 100644 index 000000000000..f7b21ee302b4 --- /dev/null +++ b/include/asm-powerpc/highmem.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * highmem.h: virtual kernel memory mappings for high memory | ||
3 | * | ||
4 | * PowerPC version, stolen from the i386 version. | ||
5 | * | ||
6 | * Used in CONFIG_HIGHMEM systems for memory pages which | ||
7 | * are not addressable by direct kernel virtual addresses. | ||
8 | * | ||
9 | * Copyright (C) 1999 Gerhard Wichert, Siemens AG | ||
10 | * Gerhard.Wichert@pdb.siemens.de | ||
11 | * | ||
12 | * | ||
13 | * Redesigned the x86 32-bit VM architecture to deal with | ||
14 | * up to 16 Terrabyte physical memory. With current x86 CPUs | ||
15 | * we now support up to 64 Gigabytes physical RAM. | ||
16 | * | ||
17 | * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com> | ||
18 | */ | ||
19 | |||
20 | #ifndef _ASM_HIGHMEM_H | ||
21 | #define _ASM_HIGHMEM_H | ||
22 | |||
23 | #ifdef __KERNEL__ | ||
24 | |||
25 | #include <linux/init.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <asm/kmap_types.h> | ||
28 | #include <asm/tlbflush.h> | ||
29 | #include <asm/page.h> | ||
30 | |||
31 | /* undef for production */ | ||
32 | #define HIGHMEM_DEBUG 1 | ||
33 | |||
34 | extern pte_t *kmap_pte; | ||
35 | extern pgprot_t kmap_prot; | ||
36 | extern pte_t *pkmap_page_table; | ||
37 | |||
38 | /* | ||
39 | * Right now we initialize only a single pte table. It can be extended | ||
40 | * easily, subsequent pte tables have to be allocated in one physical | ||
41 | * chunk of RAM. | ||
42 | */ | ||
43 | #define PKMAP_BASE CONFIG_HIGHMEM_START | ||
44 | #define LAST_PKMAP (1 << PTE_SHIFT) | ||
45 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) | ||
46 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) | ||
47 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | ||
48 | |||
49 | #define KMAP_FIX_BEGIN (PKMAP_BASE + 0x00400000UL) | ||
50 | |||
51 | extern void *kmap_high(struct page *page); | ||
52 | extern void kunmap_high(struct page *page); | ||
53 | |||
54 | static inline void *kmap(struct page *page) | ||
55 | { | ||
56 | might_sleep(); | ||
57 | if (!PageHighMem(page)) | ||
58 | return page_address(page); | ||
59 | return kmap_high(page); | ||
60 | } | ||
61 | |||
62 | static inline void kunmap(struct page *page) | ||
63 | { | ||
64 | BUG_ON(in_interrupt()); | ||
65 | if (!PageHighMem(page)) | ||
66 | return; | ||
67 | kunmap_high(page); | ||
68 | } | ||
69 | |||
70 | /* | ||
71 | * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap | ||
72 | * gives a more generic (and caching) interface. But kmap_atomic can | ||
73 | * be used in IRQ contexts, so in some (very limited) cases we need | ||
74 | * it. | ||
75 | */ | ||
76 | static inline void *kmap_atomic(struct page *page, enum km_type type) | ||
77 | { | ||
78 | unsigned int idx; | ||
79 | unsigned long vaddr; | ||
80 | |||
81 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ | ||
82 | pagefault_disable(); | ||
83 | if (!PageHighMem(page)) | ||
84 | return page_address(page); | ||
85 | |||
86 | idx = type + KM_TYPE_NR*smp_processor_id(); | ||
87 | vaddr = KMAP_FIX_BEGIN + idx * PAGE_SIZE; | ||
88 | #ifdef HIGHMEM_DEBUG | ||
89 | BUG_ON(!pte_none(*(kmap_pte+idx))); | ||
90 | #endif | ||
91 | set_pte_at(&init_mm, vaddr, kmap_pte+idx, mk_pte(page, kmap_prot)); | ||
92 | flush_tlb_page(NULL, vaddr); | ||
93 | |||
94 | return (void*) vaddr; | ||
95 | } | ||
96 | |||
97 | static inline void kunmap_atomic(void *kvaddr, enum km_type type) | ||
98 | { | ||
99 | #ifdef HIGHMEM_DEBUG | ||
100 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; | ||
101 | unsigned int idx = type + KM_TYPE_NR*smp_processor_id(); | ||
102 | |||
103 | if (vaddr < KMAP_FIX_BEGIN) { // FIXME | ||
104 | pagefault_enable(); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | BUG_ON(vaddr != KMAP_FIX_BEGIN + idx * PAGE_SIZE); | ||
109 | |||
110 | /* | ||
111 | * force other mappings to Oops if they'll try to access | ||
112 | * this pte without first remap it | ||
113 | */ | ||
114 | pte_clear(&init_mm, vaddr, kmap_pte+idx); | ||
115 | flush_tlb_page(NULL, vaddr); | ||
116 | #endif | ||
117 | pagefault_enable(); | ||
118 | } | ||
119 | |||
120 | static inline struct page *kmap_atomic_to_page(void *ptr) | ||
121 | { | ||
122 | unsigned long idx, vaddr = (unsigned long) ptr; | ||
123 | |||
124 | if (vaddr < KMAP_FIX_BEGIN) | ||
125 | return virt_to_page(ptr); | ||
126 | |||
127 | idx = (vaddr - KMAP_FIX_BEGIN) >> PAGE_SHIFT; | ||
128 | return pte_page(kmap_pte[idx]); | ||
129 | } | ||
130 | |||
131 | #define flush_cache_kmaps() flush_cache_all() | ||
132 | |||
133 | #endif /* __KERNEL__ */ | ||
134 | |||
135 | #endif /* _ASM_HIGHMEM_H */ | ||
diff --git a/include/asm-powerpc/hydra.h b/include/asm-powerpc/hydra.h new file mode 100644 index 000000000000..1ad4eed07fbe --- /dev/null +++ b/include/asm-powerpc/hydra.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/hydra.h -- Mac I/O `Hydra' definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | ||
5 | * | ||
6 | * This file is based on the following documentation: | ||
7 | * | ||
8 | * Macintosh Technology in the Common Hardware Reference Platform | ||
9 | * Apple Computer, Inc. | ||
10 | * | ||
11 | * © Copyright 1995 Apple Computer, Inc. All rights reserved. | ||
12 | * | ||
13 | * It's available online from http://chrp.apple.com/MacTech.pdf. | ||
14 | * You can obtain paper copies of this book from computer bookstores or by | ||
15 | * writing Morgan Kaufmann Publishers, Inc., 340 Pine Street, Sixth Floor, San | ||
16 | * Francisco, CA 94104. Reference ISBN 1-55860-393-X. | ||
17 | * | ||
18 | * This file is subject to the terms and conditions of the GNU General Public | ||
19 | * License. See the file COPYING in the main directory of this archive | ||
20 | * for more details. | ||
21 | */ | ||
22 | |||
23 | #ifndef _ASMPPC_HYDRA_H | ||
24 | #define _ASMPPC_HYDRA_H | ||
25 | |||
26 | #ifdef __KERNEL__ | ||
27 | |||
28 | struct Hydra { | ||
29 | /* DBDMA Controller Register Space */ | ||
30 | char Pad1[0x30]; | ||
31 | u_int CachePD; | ||
32 | u_int IDs; | ||
33 | u_int Feature_Control; | ||
34 | char Pad2[0x7fc4]; | ||
35 | /* DBDMA Channel Register Space */ | ||
36 | char SCSI_DMA[0x100]; | ||
37 | char Pad3[0x300]; | ||
38 | char SCCA_Tx_DMA[0x100]; | ||
39 | char SCCA_Rx_DMA[0x100]; | ||
40 | char SCCB_Tx_DMA[0x100]; | ||
41 | char SCCB_Rx_DMA[0x100]; | ||
42 | char Pad4[0x7800]; | ||
43 | /* Device Register Space */ | ||
44 | char SCSI[0x1000]; | ||
45 | char ADB[0x1000]; | ||
46 | char SCC_Legacy[0x1000]; | ||
47 | char SCC[0x1000]; | ||
48 | char Pad9[0x2000]; | ||
49 | char VIA[0x2000]; | ||
50 | char Pad10[0x28000]; | ||
51 | char OpenPIC[0x40000]; | ||
52 | }; | ||
53 | |||
54 | extern volatile struct Hydra __iomem *Hydra; | ||
55 | |||
56 | |||
57 | /* | ||
58 | * Feature Control Register | ||
59 | */ | ||
60 | |||
61 | #define HYDRA_FC_SCC_CELL_EN 0x00000001 /* Enable SCC Clock */ | ||
62 | #define HYDRA_FC_SCSI_CELL_EN 0x00000002 /* Enable SCSI Clock */ | ||
63 | #define HYDRA_FC_SCCA_ENABLE 0x00000004 /* Enable SCC A Lines */ | ||
64 | #define HYDRA_FC_SCCB_ENABLE 0x00000008 /* Enable SCC B Lines */ | ||
65 | #define HYDRA_FC_ARB_BYPASS 0x00000010 /* Bypass Internal Arbiter */ | ||
66 | #define HYDRA_FC_RESET_SCC 0x00000020 /* Reset SCC */ | ||
67 | #define HYDRA_FC_MPIC_ENABLE 0x00000040 /* Enable OpenPIC */ | ||
68 | #define HYDRA_FC_SLOW_SCC_PCLK 0x00000080 /* 1=15.6672, 0=25 MHz */ | ||
69 | #define HYDRA_FC_MPIC_IS_MASTER 0x00000100 /* OpenPIC Master Mode */ | ||
70 | |||
71 | |||
72 | /* | ||
73 | * OpenPIC Interrupt Sources | ||
74 | */ | ||
75 | |||
76 | #define HYDRA_INT_SIO 0 | ||
77 | #define HYDRA_INT_SCSI_DMA 1 | ||
78 | #define HYDRA_INT_SCCA_TX_DMA 2 | ||
79 | #define HYDRA_INT_SCCA_RX_DMA 3 | ||
80 | #define HYDRA_INT_SCCB_TX_DMA 4 | ||
81 | #define HYDRA_INT_SCCB_RX_DMA 5 | ||
82 | #define HYDRA_INT_SCSI 6 | ||
83 | #define HYDRA_INT_SCCA 7 | ||
84 | #define HYDRA_INT_SCCB 8 | ||
85 | #define HYDRA_INT_VIA 9 | ||
86 | #define HYDRA_INT_ADB 10 | ||
87 | #define HYDRA_INT_ADB_NMI 11 | ||
88 | #define HYDRA_INT_EXT1 12 /* PCI IRQW */ | ||
89 | #define HYDRA_INT_EXT2 13 /* PCI IRQX */ | ||
90 | #define HYDRA_INT_EXT3 14 /* PCI IRQY */ | ||
91 | #define HYDRA_INT_EXT4 15 /* PCI IRQZ */ | ||
92 | #define HYDRA_INT_EXT5 16 /* IDE Primay/Secondary */ | ||
93 | #define HYDRA_INT_EXT6 17 /* IDE Secondary */ | ||
94 | #define HYDRA_INT_EXT7 18 /* Power Off Request */ | ||
95 | #define HYDRA_INT_SPARE 19 | ||
96 | |||
97 | extern int hydra_init(void); | ||
98 | extern void macio_adb_init(void); | ||
99 | |||
100 | #endif /* __KERNEL__ */ | ||
101 | |||
102 | #endif /* _ASMPPC_HYDRA_H */ | ||
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index 0f66f0f82c32..1644e44c8757 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
@@ -67,7 +67,7 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
67 | #define ide_init_default_irq(base) ide_default_irq(base) | 67 | #define ide_init_default_irq(base) ide_default_irq(base) |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #if (defined CONFIG_APUS || defined CONFIG_BLK_DEV_MPC8xx_IDE ) | 70 | #ifdef CONFIG_BLK_DEV_MPC8xx_IDE |
71 | #define IDE_ARCH_ACK_INTR 1 | 71 | #define IDE_ARCH_ACK_INTR 1 |
72 | #define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) | 72 | #define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) |
73 | #endif | 73 | #endif |
diff --git a/include/asm-powerpc/immap_86xx.h b/include/asm-powerpc/immap_86xx.h index 59b9e07b8e99..c83d7ad16606 100644 --- a/include/asm-powerpc/immap_86xx.h +++ b/include/asm-powerpc/immap_86xx.h | |||
@@ -1,124 +1,65 @@ | |||
1 | /* | 1 | /** |
2 | * MPC86xx Internal Memory Map | 2 | * MPC86xx Internal Memory Map |
3 | * | 3 | * |
4 | * Author: Jeff Brown | 4 | * Authors: Jeff Brown |
5 | * Timur Tabi <timur@freescale.com> | ||
5 | * | 6 | * |
6 | * Copyright 2004 Freescale Semiconductor, Inc | 7 | * Copyright 2004,2007 Freescale Semiconductor, Inc |
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 12 | * option) any later version. |
12 | * | 13 | * |
14 | * This header file defines structures for various 86xx SOC devices that are | ||
15 | * used by multiple source files. | ||
13 | */ | 16 | */ |
14 | 17 | ||
15 | #ifndef __ASM_POWERPC_IMMAP_86XX_H__ | 18 | #ifndef __ASM_POWERPC_IMMAP_86XX_H__ |
16 | #define __ASM_POWERPC_IMMAP_86XX_H__ | 19 | #define __ASM_POWERPC_IMMAP_86XX_H__ |
17 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
18 | 21 | ||
19 | /* Eventually this should define all the IO block registers in 86xx */ | ||
20 | |||
21 | /* PCI Registers */ | ||
22 | typedef struct ccsr_pci { | ||
23 | uint cfg_addr; /* 0x.000 - PCI Configuration Address Register */ | ||
24 | uint cfg_data; /* 0x.004 - PCI Configuration Data Register */ | ||
25 | uint int_ack; /* 0x.008 - PCI Interrupt Acknowledge Register */ | ||
26 | char res1[3060]; | ||
27 | uint potar0; /* 0x.c00 - PCI Outbound Transaction Address Register 0 */ | ||
28 | uint potear0; /* 0x.c04 - PCI Outbound Translation Extended Address Register 0 */ | ||
29 | uint powbar0; /* 0x.c08 - PCI Outbound Window Base Address Register 0 */ | ||
30 | char res2[4]; | ||
31 | uint powar0; /* 0x.c10 - PCI Outbound Window Attributes Register 0 */ | ||
32 | char res3[12]; | ||
33 | uint potar1; /* 0x.c20 - PCI Outbound Transaction Address Register 1 */ | ||
34 | uint potear1; /* 0x.c24 - PCI Outbound Translation Extended Address Register 1 */ | ||
35 | uint powbar1; /* 0x.c28 - PCI Outbound Window Base Address Register 1 */ | ||
36 | char res4[4]; | ||
37 | uint powar1; /* 0x.c30 - PCI Outbound Window Attributes Register 1 */ | ||
38 | char res5[12]; | ||
39 | uint potar2; /* 0x.c40 - PCI Outbound Transaction Address Register 2 */ | ||
40 | uint potear2; /* 0x.c44 - PCI Outbound Translation Extended Address Register 2 */ | ||
41 | uint powbar2; /* 0x.c48 - PCI Outbound Window Base Address Register 2 */ | ||
42 | char res6[4]; | ||
43 | uint powar2; /* 0x.c50 - PCI Outbound Window Attributes Register 2 */ | ||
44 | char res7[12]; | ||
45 | uint potar3; /* 0x.c60 - PCI Outbound Transaction Address Register 3 */ | ||
46 | uint potear3; /* 0x.c64 - PCI Outbound Translation Extended Address Register 3 */ | ||
47 | uint powbar3; /* 0x.c68 - PCI Outbound Window Base Address Register 3 */ | ||
48 | char res8[4]; | ||
49 | uint powar3; /* 0x.c70 - PCI Outbound Window Attributes Register 3 */ | ||
50 | char res9[12]; | ||
51 | uint potar4; /* 0x.c80 - PCI Outbound Transaction Address Register 4 */ | ||
52 | uint potear4; /* 0x.c84 - PCI Outbound Translation Extended Address Register 4 */ | ||
53 | uint powbar4; /* 0x.c88 - PCI Outbound Window Base Address Register 4 */ | ||
54 | char res10[4]; | ||
55 | uint powar4; /* 0x.c90 - PCI Outbound Window Attributes Register 4 */ | ||
56 | char res11[268]; | ||
57 | uint pitar3; /* 0x.da0 - PCI Inbound Translation Address Register 3 */ | ||
58 | char res12[4]; | ||
59 | uint piwbar3; /* 0x.da8 - PCI Inbound Window Base Address Register 3 */ | ||
60 | uint piwbear3; /* 0x.dac - PCI Inbound Window Base Extended Address Register 3 */ | ||
61 | uint piwar3; /* 0x.db0 - PCI Inbound Window Attributes Register 3 */ | ||
62 | char res13[12]; | ||
63 | uint pitar2; /* 0x.dc0 - PCI Inbound Translation Address Register 2 */ | ||
64 | char res14[4]; | ||
65 | uint piwbar2; /* 0x.dc8 - PCI Inbound Window Base Address Register 2 */ | ||
66 | uint piwbear2; /* 0x.dcc - PCI Inbound Window Base Extended Address Register 2 */ | ||
67 | uint piwar2; /* 0x.dd0 - PCI Inbound Window Attributes Register 2 */ | ||
68 | char res15[12]; | ||
69 | uint pitar1; /* 0x.de0 - PCI Inbound Translation Address Register 1 */ | ||
70 | char res16[4]; | ||
71 | uint piwbar1; /* 0x.de8 - PCI Inbound Window Base Address Register 1 */ | ||
72 | char res17[4]; | ||
73 | uint piwar1; /* 0x.df0 - PCI Inbound Window Attributes Register 1 */ | ||
74 | char res18[12]; | ||
75 | uint err_dr; /* 0x.e00 - PCI Error Detect Register */ | ||
76 | uint err_cap_dr; /* 0x.e04 - PCI Error Capture Disable Register */ | ||
77 | uint err_en; /* 0x.e08 - PCI Error Enable Register */ | ||
78 | uint err_attrib; /* 0x.e0c - PCI Error Attributes Capture Register */ | ||
79 | uint err_addr; /* 0x.e10 - PCI Error Address Capture Register */ | ||
80 | uint err_ext_addr; /* 0x.e14 - PCI Error Extended Address Capture Register */ | ||
81 | uint err_dl; /* 0x.e18 - PCI Error Data Low Capture Register */ | ||
82 | uint err_dh; /* 0x.e1c - PCI Error Data High Capture Register */ | ||
83 | uint gas_timr; /* 0x.e20 - PCI Gasket Timer Register */ | ||
84 | uint pci_timr; /* 0x.e24 - PCI Timer Register */ | ||
85 | char res19[472]; | ||
86 | } ccsr_pci_t; | ||
87 | |||
88 | /* Global Utility Registers */ | 22 | /* Global Utility Registers */ |
89 | typedef struct ccsr_guts { | 23 | struct ccsr_guts { |
90 | uint porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ | 24 | __be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ |
91 | uint porbmsr; /* 0x.0004 - POR Boot Mode Status Register */ | 25 | __be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */ |
92 | uint porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */ | 26 | __be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */ |
93 | uint pordevsr; /* 0x.000c - POR I/O Device Status Register */ | 27 | __be32 pordevsr; /* 0x.000c - POR I/O Device Status Register */ |
94 | uint pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */ | 28 | __be32 pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */ |
95 | char res1[12]; | 29 | u8 res1[0x20 - 0x14]; |
96 | uint gpporcr; /* 0x.0020 - General-Purpose POR Configuration Register */ | 30 | __be32 porcir; /* 0x.0020 - POR Configuration Information Register */ |
97 | char res2[12]; | 31 | u8 res2[0x30 - 0x24]; |
98 | uint gpiocr; /* 0x.0030 - GPIO Control Register */ | 32 | __be32 gpiocr; /* 0x.0030 - GPIO Control Register */ |
99 | char res3[12]; | 33 | u8 res3[0x40 - 0x34]; |
100 | uint gpoutdr; /* 0x.0040 - General-Purpose Output Data Register */ | 34 | __be32 gpoutdr; /* 0x.0040 - General-Purpose Output Data Register */ |
101 | char res4[12]; | 35 | u8 res4[0x50 - 0x44]; |
102 | uint gpindr; /* 0x.0050 - General-Purpose Input Data Register */ | 36 | __be32 gpindr; /* 0x.0050 - General-Purpose Input Data Register */ |
103 | char res5[12]; | 37 | u8 res5[0x60 - 0x54]; |
104 | uint pmuxcr; /* 0x.0060 - Alternate Function Signal Multiplex Control */ | 38 | __be32 pmuxcr; /* 0x.0060 - Alternate Function Signal Multiplex Control */ |
105 | char res6[12]; | 39 | u8 res6[0x70 - 0x64]; |
106 | uint devdisr; /* 0x.0070 - Device Disable Control */ | 40 | __be32 devdisr; /* 0x.0070 - Device Disable Control */ |
107 | char res7[12]; | 41 | u8 res7[0x80 - 0x74]; |
108 | uint powmgtcsr; /* 0x.0080 - Power Management Status and Control Register */ | 42 | __be32 powmgtcsr; /* 0x.0080 - Power Management Status and Control Register */ |
109 | char res8[12]; | 43 | u8 res8[0x90 - 0x84]; |
110 | uint mcpsumr; /* 0x.0090 - Machine Check Summary Register */ | 44 | __be32 mcpsumr; /* 0x.0090 - Machine Check Summary Register */ |
111 | char res9[12]; | 45 | __be32 rstrscr; /* 0x.0094 - Reset Request Status and Control Register */ |
112 | uint pvr; /* 0x.00a0 - Processor Version Register */ | 46 | u8 res9[0xA0 - 0x98]; |
113 | uint svr; /* 0x.00a4 - System Version Register */ | 47 | __be32 pvr; /* 0x.00a0 - Processor Version Register */ |
114 | char res10[3416]; | 48 | __be32 svr; /* 0x.00a4 - System Version Register */ |
115 | uint clkocr; /* 0x.0e00 - Clock Out Select Register */ | 49 | u8 res10[0xB0 - 0xA8]; |
116 | char res11[12]; | 50 | __be32 rstcr; /* 0x.00b0 - Reset Control Register */ |
117 | uint ddrdllcr; /* 0x.0e10 - DDR DLL Control Register */ | 51 | u8 res11[0xB20 - 0xB4]; |
118 | char res12[12]; | 52 | __be32 ddr1clkdr; /* 0x.0b20 - DDRC1 Clock Disable Register */ |
119 | uint lbcdllcr; /* 0x.0e20 - LBC DLL Control Register */ | 53 | __be32 ddr2clkdr; /* 0x.0b24 - DDRC2 Clock Disable Register */ |
120 | char res13[61916]; | 54 | u8 res12[0xE00 - 0xB28]; |
121 | } ccsr_guts_t; | 55 | __be32 clkocr; /* 0x.0e00 - Clock Out Select Register */ |
56 | u8 res13[0xF04 - 0xE04]; | ||
57 | __be32 srds1cr0; /* 0x.0f04 - SerDes1 Control Register 0 */ | ||
58 | __be32 srds1cr1; /* 0x.0f08 - SerDes1 Control Register 0 */ | ||
59 | u8 res14[0xF40 - 0xF0C]; | ||
60 | __be32 srds2cr0; /* 0x.0f40 - SerDes1 Control Register 0 */ | ||
61 | __be32 srds2cr1; /* 0x.0f44 - SerDes1 Control Register 0 */ | ||
62 | }; | ||
122 | 63 | ||
123 | #endif /* __ASM_POWERPC_IMMAP_86XX_H__ */ | 64 | #endif /* __ASM_POWERPC_IMMAP_86XX_H__ */ |
124 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/immap_cpm2.h b/include/asm-powerpc/immap_cpm2.h new file mode 100644 index 000000000000..f316a91c628a --- /dev/null +++ b/include/asm-powerpc/immap_cpm2.h | |||
@@ -0,0 +1,648 @@ | |||
1 | /* | ||
2 | * CPM2 Internal Memory Map | ||
3 | * Copyright (c) 1999 Dan Malek (dmalek@jlc.net) | ||
4 | * | ||
5 | * The Internal Memory Map for devices with CPM2 on them. This | ||
6 | * is the superset of all CPM2 devices (8260, 8266, 8280, 8272, | ||
7 | * 8560). | ||
8 | */ | ||
9 | #ifdef __KERNEL__ | ||
10 | #ifndef __IMMAP_CPM2__ | ||
11 | #define __IMMAP_CPM2__ | ||
12 | |||
13 | /* System configuration registers. | ||
14 | */ | ||
15 | typedef struct sys_82xx_conf { | ||
16 | u32 sc_siumcr; | ||
17 | u32 sc_sypcr; | ||
18 | u8 res1[6]; | ||
19 | u16 sc_swsr; | ||
20 | u8 res2[20]; | ||
21 | u32 sc_bcr; | ||
22 | u8 sc_ppc_acr; | ||
23 | u8 res3[3]; | ||
24 | u32 sc_ppc_alrh; | ||
25 | u32 sc_ppc_alrl; | ||
26 | u8 sc_lcl_acr; | ||
27 | u8 res4[3]; | ||
28 | u32 sc_lcl_alrh; | ||
29 | u32 sc_lcl_alrl; | ||
30 | u32 sc_tescr1; | ||
31 | u32 sc_tescr2; | ||
32 | u32 sc_ltescr1; | ||
33 | u32 sc_ltescr2; | ||
34 | u32 sc_pdtea; | ||
35 | u8 sc_pdtem; | ||
36 | u8 res5[3]; | ||
37 | u32 sc_ldtea; | ||
38 | u8 sc_ldtem; | ||
39 | u8 res6[163]; | ||
40 | } sysconf_82xx_cpm2_t; | ||
41 | |||
42 | typedef struct sys_85xx_conf { | ||
43 | u32 sc_cear; | ||
44 | u16 sc_ceer; | ||
45 | u16 sc_cemr; | ||
46 | u8 res1[70]; | ||
47 | u32 sc_smaer; | ||
48 | u8 res2[4]; | ||
49 | u32 sc_smevr; | ||
50 | u32 sc_smctr; | ||
51 | u32 sc_lmaer; | ||
52 | u8 res3[4]; | ||
53 | u32 sc_lmevr; | ||
54 | u32 sc_lmctr; | ||
55 | u8 res4[144]; | ||
56 | } sysconf_85xx_cpm2_t; | ||
57 | |||
58 | typedef union sys_conf { | ||
59 | sysconf_82xx_cpm2_t siu_82xx; | ||
60 | sysconf_85xx_cpm2_t siu_85xx; | ||
61 | } sysconf_cpm2_t; | ||
62 | |||
63 | |||
64 | |||
65 | /* Memory controller registers. | ||
66 | */ | ||
67 | typedef struct mem_ctlr { | ||
68 | u32 memc_br0; | ||
69 | u32 memc_or0; | ||
70 | u32 memc_br1; | ||
71 | u32 memc_or1; | ||
72 | u32 memc_br2; | ||
73 | u32 memc_or2; | ||
74 | u32 memc_br3; | ||
75 | u32 memc_or3; | ||
76 | u32 memc_br4; | ||
77 | u32 memc_or4; | ||
78 | u32 memc_br5; | ||
79 | u32 memc_or5; | ||
80 | u32 memc_br6; | ||
81 | u32 memc_or6; | ||
82 | u32 memc_br7; | ||
83 | u32 memc_or7; | ||
84 | u32 memc_br8; | ||
85 | u32 memc_or8; | ||
86 | u32 memc_br9; | ||
87 | u32 memc_or9; | ||
88 | u32 memc_br10; | ||
89 | u32 memc_or10; | ||
90 | u32 memc_br11; | ||
91 | u32 memc_or11; | ||
92 | u8 res1[8]; | ||
93 | u32 memc_mar; | ||
94 | u8 res2[4]; | ||
95 | u32 memc_mamr; | ||
96 | u32 memc_mbmr; | ||
97 | u32 memc_mcmr; | ||
98 | u8 res3[8]; | ||
99 | u16 memc_mptpr; | ||
100 | u8 res4[2]; | ||
101 | u32 memc_mdr; | ||
102 | u8 res5[4]; | ||
103 | u32 memc_psdmr; | ||
104 | u32 memc_lsdmr; | ||
105 | u8 memc_purt; | ||
106 | u8 res6[3]; | ||
107 | u8 memc_psrt; | ||
108 | u8 res7[3]; | ||
109 | u8 memc_lurt; | ||
110 | u8 res8[3]; | ||
111 | u8 memc_lsrt; | ||
112 | u8 res9[3]; | ||
113 | u32 memc_immr; | ||
114 | u32 memc_pcibr0; | ||
115 | u32 memc_pcibr1; | ||
116 | u8 res10[16]; | ||
117 | u32 memc_pcimsk0; | ||
118 | u32 memc_pcimsk1; | ||
119 | u8 res11[52]; | ||
120 | } memctl_cpm2_t; | ||
121 | |||
122 | /* System Integration Timers. | ||
123 | */ | ||
124 | typedef struct sys_int_timers { | ||
125 | u8 res1[32]; | ||
126 | u16 sit_tmcntsc; | ||
127 | u8 res2[2]; | ||
128 | u32 sit_tmcnt; | ||
129 | u8 res3[4]; | ||
130 | u32 sit_tmcntal; | ||
131 | u8 res4[16]; | ||
132 | u16 sit_piscr; | ||
133 | u8 res5[2]; | ||
134 | u32 sit_pitc; | ||
135 | u32 sit_pitr; | ||
136 | u8 res6[94]; | ||
137 | u8 res7[390]; | ||
138 | } sit_cpm2_t; | ||
139 | |||
140 | #define PISCR_PIRQ_MASK ((u16)0xff00) | ||
141 | #define PISCR_PS ((u16)0x0080) | ||
142 | #define PISCR_PIE ((u16)0x0004) | ||
143 | #define PISCR_PTF ((u16)0x0002) | ||
144 | #define PISCR_PTE ((u16)0x0001) | ||
145 | |||
146 | /* PCI Controller. | ||
147 | */ | ||
148 | typedef struct pci_ctlr { | ||
149 | u32 pci_omisr; | ||
150 | u32 pci_omimr; | ||
151 | u8 res1[8]; | ||
152 | u32 pci_ifqpr; | ||
153 | u32 pci_ofqpr; | ||
154 | u8 res2[8]; | ||
155 | u32 pci_imr0; | ||
156 | u32 pci_imr1; | ||
157 | u32 pci_omr0; | ||
158 | u32 pci_omr1; | ||
159 | u32 pci_odr; | ||
160 | u8 res3[4]; | ||
161 | u32 pci_idr; | ||
162 | u8 res4[20]; | ||
163 | u32 pci_imisr; | ||
164 | u32 pci_imimr; | ||
165 | u8 res5[24]; | ||
166 | u32 pci_ifhpr; | ||
167 | u8 res6[4]; | ||
168 | u32 pci_iftpr; | ||
169 | u8 res7[4]; | ||
170 | u32 pci_iphpr; | ||
171 | u8 res8[4]; | ||
172 | u32 pci_iptpr; | ||
173 | u8 res9[4]; | ||
174 | u32 pci_ofhpr; | ||
175 | u8 res10[4]; | ||
176 | u32 pci_oftpr; | ||
177 | u8 res11[4]; | ||
178 | u32 pci_ophpr; | ||
179 | u8 res12[4]; | ||
180 | u32 pci_optpr; | ||
181 | u8 res13[8]; | ||
182 | u32 pci_mucr; | ||
183 | u8 res14[8]; | ||
184 | u32 pci_qbar; | ||
185 | u8 res15[12]; | ||
186 | u32 pci_dmamr0; | ||
187 | u32 pci_dmasr0; | ||
188 | u32 pci_dmacdar0; | ||
189 | u8 res16[4]; | ||
190 | u32 pci_dmasar0; | ||
191 | u8 res17[4]; | ||
192 | u32 pci_dmadar0; | ||
193 | u8 res18[4]; | ||
194 | u32 pci_dmabcr0; | ||
195 | u32 pci_dmandar0; | ||
196 | u8 res19[86]; | ||
197 | u32 pci_dmamr1; | ||
198 | u32 pci_dmasr1; | ||
199 | u32 pci_dmacdar1; | ||
200 | u8 res20[4]; | ||
201 | u32 pci_dmasar1; | ||
202 | u8 res21[4]; | ||
203 | u32 pci_dmadar1; | ||
204 | u8 res22[4]; | ||
205 | u32 pci_dmabcr1; | ||
206 | u32 pci_dmandar1; | ||
207 | u8 res23[88]; | ||
208 | u32 pci_dmamr2; | ||
209 | u32 pci_dmasr2; | ||
210 | u32 pci_dmacdar2; | ||
211 | u8 res24[4]; | ||
212 | u32 pci_dmasar2; | ||
213 | u8 res25[4]; | ||
214 | u32 pci_dmadar2; | ||
215 | u8 res26[4]; | ||
216 | u32 pci_dmabcr2; | ||
217 | u32 pci_dmandar2; | ||
218 | u8 res27[88]; | ||
219 | u32 pci_dmamr3; | ||
220 | u32 pci_dmasr3; | ||
221 | u32 pci_dmacdar3; | ||
222 | u8 res28[4]; | ||
223 | u32 pci_dmasar3; | ||
224 | u8 res29[4]; | ||
225 | u32 pci_dmadar3; | ||
226 | u8 res30[4]; | ||
227 | u32 pci_dmabcr3; | ||
228 | u32 pci_dmandar3; | ||
229 | u8 res31[344]; | ||
230 | u32 pci_potar0; | ||
231 | u8 res32[4]; | ||
232 | u32 pci_pobar0; | ||
233 | u8 res33[4]; | ||
234 | u32 pci_pocmr0; | ||
235 | u8 res34[4]; | ||
236 | u32 pci_potar1; | ||
237 | u8 res35[4]; | ||
238 | u32 pci_pobar1; | ||
239 | u8 res36[4]; | ||
240 | u32 pci_pocmr1; | ||
241 | u8 res37[4]; | ||
242 | u32 pci_potar2; | ||
243 | u8 res38[4]; | ||
244 | u32 pci_pobar2; | ||
245 | u8 res39[4]; | ||
246 | u32 pci_pocmr2; | ||
247 | u8 res40[50]; | ||
248 | u32 pci_ptcr; | ||
249 | u32 pci_gpcr; | ||
250 | u32 pci_gcr; | ||
251 | u32 pci_esr; | ||
252 | u32 pci_emr; | ||
253 | u32 pci_ecr; | ||
254 | u32 pci_eacr; | ||
255 | u8 res41[4]; | ||
256 | u32 pci_edcr; | ||
257 | u8 res42[4]; | ||
258 | u32 pci_eccr; | ||
259 | u8 res43[44]; | ||
260 | u32 pci_pitar1; | ||
261 | u8 res44[4]; | ||
262 | u32 pci_pibar1; | ||
263 | u8 res45[4]; | ||
264 | u32 pci_picmr1; | ||
265 | u8 res46[4]; | ||
266 | u32 pci_pitar0; | ||
267 | u8 res47[4]; | ||
268 | u32 pci_pibar0; | ||
269 | u8 res48[4]; | ||
270 | u32 pci_picmr0; | ||
271 | u8 res49[4]; | ||
272 | u32 pci_cfg_addr; | ||
273 | u32 pci_cfg_data; | ||
274 | u32 pci_int_ack; | ||
275 | u8 res50[756]; | ||
276 | } pci_cpm2_t; | ||
277 | |||
278 | /* Interrupt Controller. | ||
279 | */ | ||
280 | typedef struct interrupt_controller { | ||
281 | u16 ic_sicr; | ||
282 | u8 res1[2]; | ||
283 | u32 ic_sivec; | ||
284 | u32 ic_sipnrh; | ||
285 | u32 ic_sipnrl; | ||
286 | u32 ic_siprr; | ||
287 | u32 ic_scprrh; | ||
288 | u32 ic_scprrl; | ||
289 | u32 ic_simrh; | ||
290 | u32 ic_simrl; | ||
291 | u32 ic_siexr; | ||
292 | u8 res2[88]; | ||
293 | } intctl_cpm2_t; | ||
294 | |||
295 | /* Clocks and Reset. | ||
296 | */ | ||
297 | typedef struct clk_and_reset { | ||
298 | u32 car_sccr; | ||
299 | u8 res1[4]; | ||
300 | u32 car_scmr; | ||
301 | u8 res2[4]; | ||
302 | u32 car_rsr; | ||
303 | u32 car_rmr; | ||
304 | u8 res[104]; | ||
305 | } car_cpm2_t; | ||
306 | |||
307 | /* Input/Output Port control/status registers. | ||
308 | * Names consistent with processor manual, although they are different | ||
309 | * from the original 8xx names....... | ||
310 | */ | ||
311 | typedef struct io_port { | ||
312 | u32 iop_pdira; | ||
313 | u32 iop_ppara; | ||
314 | u32 iop_psora; | ||
315 | u32 iop_podra; | ||
316 | u32 iop_pdata; | ||
317 | u8 res1[12]; | ||
318 | u32 iop_pdirb; | ||
319 | u32 iop_pparb; | ||
320 | u32 iop_psorb; | ||
321 | u32 iop_podrb; | ||
322 | u32 iop_pdatb; | ||
323 | u8 res2[12]; | ||
324 | u32 iop_pdirc; | ||
325 | u32 iop_pparc; | ||
326 | u32 iop_psorc; | ||
327 | u32 iop_podrc; | ||
328 | u32 iop_pdatc; | ||
329 | u8 res3[12]; | ||
330 | u32 iop_pdird; | ||
331 | u32 iop_ppard; | ||
332 | u32 iop_psord; | ||
333 | u32 iop_podrd; | ||
334 | u32 iop_pdatd; | ||
335 | u8 res4[12]; | ||
336 | } iop_cpm2_t; | ||
337 | |||
338 | /* Communication Processor Module Timers | ||
339 | */ | ||
340 | typedef struct cpm_timers { | ||
341 | u8 cpmt_tgcr1; | ||
342 | u8 res1[3]; | ||
343 | u8 cpmt_tgcr2; | ||
344 | u8 res2[11]; | ||
345 | u16 cpmt_tmr1; | ||
346 | u16 cpmt_tmr2; | ||
347 | u16 cpmt_trr1; | ||
348 | u16 cpmt_trr2; | ||
349 | u16 cpmt_tcr1; | ||
350 | u16 cpmt_tcr2; | ||
351 | u16 cpmt_tcn1; | ||
352 | u16 cpmt_tcn2; | ||
353 | u16 cpmt_tmr3; | ||
354 | u16 cpmt_tmr4; | ||
355 | u16 cpmt_trr3; | ||
356 | u16 cpmt_trr4; | ||
357 | u16 cpmt_tcr3; | ||
358 | u16 cpmt_tcr4; | ||
359 | u16 cpmt_tcn3; | ||
360 | u16 cpmt_tcn4; | ||
361 | u16 cpmt_ter1; | ||
362 | u16 cpmt_ter2; | ||
363 | u16 cpmt_ter3; | ||
364 | u16 cpmt_ter4; | ||
365 | u8 res3[584]; | ||
366 | } cpmtimer_cpm2_t; | ||
367 | |||
368 | /* DMA control/status registers. | ||
369 | */ | ||
370 | typedef struct sdma_csr { | ||
371 | u8 res0[24]; | ||
372 | u8 sdma_sdsr; | ||
373 | u8 res1[3]; | ||
374 | u8 sdma_sdmr; | ||
375 | u8 res2[3]; | ||
376 | u8 sdma_idsr1; | ||
377 | u8 res3[3]; | ||
378 | u8 sdma_idmr1; | ||
379 | u8 res4[3]; | ||
380 | u8 sdma_idsr2; | ||
381 | u8 res5[3]; | ||
382 | u8 sdma_idmr2; | ||
383 | u8 res6[3]; | ||
384 | u8 sdma_idsr3; | ||
385 | u8 res7[3]; | ||
386 | u8 sdma_idmr3; | ||
387 | u8 res8[3]; | ||
388 | u8 sdma_idsr4; | ||
389 | u8 res9[3]; | ||
390 | u8 sdma_idmr4; | ||
391 | u8 res10[707]; | ||
392 | } sdma_cpm2_t; | ||
393 | |||
394 | /* Fast controllers | ||
395 | */ | ||
396 | typedef struct fcc { | ||
397 | u32 fcc_gfmr; | ||
398 | u32 fcc_fpsmr; | ||
399 | u16 fcc_ftodr; | ||
400 | u8 res1[2]; | ||
401 | u16 fcc_fdsr; | ||
402 | u8 res2[2]; | ||
403 | u16 fcc_fcce; | ||
404 | u8 res3[2]; | ||
405 | u16 fcc_fccm; | ||
406 | u8 res4[2]; | ||
407 | u8 fcc_fccs; | ||
408 | u8 res5[3]; | ||
409 | u8 fcc_ftirr_phy[4]; | ||
410 | } fcc_t; | ||
411 | |||
412 | /* Fast controllers continued | ||
413 | */ | ||
414 | typedef struct fcc_c { | ||
415 | u32 fcc_firper; | ||
416 | u32 fcc_firer; | ||
417 | u32 fcc_firsr_hi; | ||
418 | u32 fcc_firsr_lo; | ||
419 | u8 fcc_gfemr; | ||
420 | u8 res1[15]; | ||
421 | } fcc_c_t; | ||
422 | |||
423 | /* TC Layer | ||
424 | */ | ||
425 | typedef struct tclayer { | ||
426 | u16 tc_tcmode; | ||
427 | u16 tc_cdsmr; | ||
428 | u16 tc_tcer; | ||
429 | u16 tc_rcc; | ||
430 | u16 tc_tcmr; | ||
431 | u16 tc_fcc; | ||
432 | u16 tc_ccc; | ||
433 | u16 tc_icc; | ||
434 | u16 tc_tcc; | ||
435 | u16 tc_ecc; | ||
436 | u8 res1[12]; | ||
437 | } tclayer_t; | ||
438 | |||
439 | |||
440 | /* I2C | ||
441 | */ | ||
442 | typedef struct i2c { | ||
443 | u8 i2c_i2mod; | ||
444 | u8 res1[3]; | ||
445 | u8 i2c_i2add; | ||
446 | u8 res2[3]; | ||
447 | u8 i2c_i2brg; | ||
448 | u8 res3[3]; | ||
449 | u8 i2c_i2com; | ||
450 | u8 res4[3]; | ||
451 | u8 i2c_i2cer; | ||
452 | u8 res5[3]; | ||
453 | u8 i2c_i2cmr; | ||
454 | u8 res6[331]; | ||
455 | } i2c_cpm2_t; | ||
456 | |||
457 | typedef struct scc { /* Serial communication channels */ | ||
458 | u32 scc_gsmrl; | ||
459 | u32 scc_gsmrh; | ||
460 | u16 scc_psmr; | ||
461 | u8 res1[2]; | ||
462 | u16 scc_todr; | ||
463 | u16 scc_dsr; | ||
464 | u16 scc_scce; | ||
465 | u8 res2[2]; | ||
466 | u16 scc_sccm; | ||
467 | u8 res3; | ||
468 | u8 scc_sccs; | ||
469 | u8 res4[8]; | ||
470 | } scc_t; | ||
471 | |||
472 | typedef struct smc { /* Serial management channels */ | ||
473 | u8 res1[2]; | ||
474 | u16 smc_smcmr; | ||
475 | u8 res2[2]; | ||
476 | u8 smc_smce; | ||
477 | u8 res3[3]; | ||
478 | u8 smc_smcm; | ||
479 | u8 res4[5]; | ||
480 | } smc_t; | ||
481 | |||
482 | /* Serial Peripheral Interface. | ||
483 | */ | ||
484 | typedef struct spi_ctrl { | ||
485 | u16 spi_spmode; | ||
486 | u8 res1[4]; | ||
487 | u8 spi_spie; | ||
488 | u8 res2[3]; | ||
489 | u8 spi_spim; | ||
490 | u8 res3[2]; | ||
491 | u8 spi_spcom; | ||
492 | u8 res4[82]; | ||
493 | } spictl_cpm2_t; | ||
494 | |||
495 | /* CPM Mux. | ||
496 | */ | ||
497 | typedef struct cpmux { | ||
498 | u8 cmx_si1cr; | ||
499 | u8 res1; | ||
500 | u8 cmx_si2cr; | ||
501 | u8 res2; | ||
502 | u32 cmx_fcr; | ||
503 | u32 cmx_scr; | ||
504 | u8 cmx_smr; | ||
505 | u8 res3; | ||
506 | u16 cmx_uar; | ||
507 | u8 res4[16]; | ||
508 | } cpmux_t; | ||
509 | |||
510 | /* SIRAM control | ||
511 | */ | ||
512 | typedef struct siram { | ||
513 | u16 si_amr; | ||
514 | u16 si_bmr; | ||
515 | u16 si_cmr; | ||
516 | u16 si_dmr; | ||
517 | u8 si_gmr; | ||
518 | u8 res1; | ||
519 | u8 si_cmdr; | ||
520 | u8 res2; | ||
521 | u8 si_str; | ||
522 | u8 res3; | ||
523 | u16 si_rsr; | ||
524 | } siramctl_t; | ||
525 | |||
526 | typedef struct mcc { | ||
527 | u16 mcc_mcce; | ||
528 | u8 res1[2]; | ||
529 | u16 mcc_mccm; | ||
530 | u8 res2[2]; | ||
531 | u8 mcc_mccf; | ||
532 | u8 res3[7]; | ||
533 | } mcc_t; | ||
534 | |||
535 | typedef struct comm_proc { | ||
536 | u32 cp_cpcr; | ||
537 | u32 cp_rccr; | ||
538 | u8 res1[14]; | ||
539 | u16 cp_rter; | ||
540 | u8 res2[2]; | ||
541 | u16 cp_rtmr; | ||
542 | u16 cp_rtscr; | ||
543 | u8 res3[2]; | ||
544 | u32 cp_rtsr; | ||
545 | u8 res4[12]; | ||
546 | } cpm_cpm2_t; | ||
547 | |||
548 | /* USB Controller. | ||
549 | */ | ||
550 | typedef struct usb_ctlr { | ||
551 | u8 usb_usmod; | ||
552 | u8 usb_usadr; | ||
553 | u8 usb_uscom; | ||
554 | u8 res1[1]; | ||
555 | u16 usb_usep1; | ||
556 | u16 usb_usep2; | ||
557 | u16 usb_usep3; | ||
558 | u16 usb_usep4; | ||
559 | u8 res2[4]; | ||
560 | u16 usb_usber; | ||
561 | u8 res3[2]; | ||
562 | u16 usb_usbmr; | ||
563 | u8 usb_usbs; | ||
564 | u8 res4[7]; | ||
565 | } usb_cpm2_t; | ||
566 | |||
567 | /* ...and the whole thing wrapped up.... | ||
568 | */ | ||
569 | |||
570 | typedef struct immap { | ||
571 | /* Some references are into the unique and known dpram spaces, | ||
572 | * others are from the generic base. | ||
573 | */ | ||
574 | #define im_dprambase im_dpram1 | ||
575 | u8 im_dpram1[16*1024]; | ||
576 | u8 res1[16*1024]; | ||
577 | u8 im_dpram2[4*1024]; | ||
578 | u8 res2[8*1024]; | ||
579 | u8 im_dpram3[4*1024]; | ||
580 | u8 res3[16*1024]; | ||
581 | |||
582 | sysconf_cpm2_t im_siu_conf; /* SIU Configuration */ | ||
583 | memctl_cpm2_t im_memctl; /* Memory Controller */ | ||
584 | sit_cpm2_t im_sit; /* System Integration Timers */ | ||
585 | pci_cpm2_t im_pci; /* PCI Controller */ | ||
586 | intctl_cpm2_t im_intctl; /* Interrupt Controller */ | ||
587 | car_cpm2_t im_clkrst; /* Clocks and reset */ | ||
588 | iop_cpm2_t im_ioport; /* IO Port control/status */ | ||
589 | cpmtimer_cpm2_t im_cpmtimer; /* CPM timers */ | ||
590 | sdma_cpm2_t im_sdma; /* SDMA control/status */ | ||
591 | |||
592 | fcc_t im_fcc[3]; /* Three FCCs */ | ||
593 | u8 res4z[32]; | ||
594 | fcc_c_t im_fcc_c[3]; /* Continued FCCs */ | ||
595 | |||
596 | u8 res4[32]; | ||
597 | |||
598 | tclayer_t im_tclayer[8]; /* Eight TCLayers */ | ||
599 | u16 tc_tcgsr; | ||
600 | u16 tc_tcger; | ||
601 | |||
602 | /* First set of baud rate generators. | ||
603 | */ | ||
604 | u8 res[236]; | ||
605 | u32 im_brgc5; | ||
606 | u32 im_brgc6; | ||
607 | u32 im_brgc7; | ||
608 | u32 im_brgc8; | ||
609 | |||
610 | u8 res5[608]; | ||
611 | |||
612 | i2c_cpm2_t im_i2c; /* I2C control/status */ | ||
613 | cpm_cpm2_t im_cpm; /* Communication processor */ | ||
614 | |||
615 | /* Second set of baud rate generators. | ||
616 | */ | ||
617 | u32 im_brgc1; | ||
618 | u32 im_brgc2; | ||
619 | u32 im_brgc3; | ||
620 | u32 im_brgc4; | ||
621 | |||
622 | scc_t im_scc[4]; /* Four SCCs */ | ||
623 | smc_t im_smc[2]; /* Couple of SMCs */ | ||
624 | spictl_cpm2_t im_spi; /* A SPI */ | ||
625 | cpmux_t im_cpmux; /* CPM clock route mux */ | ||
626 | siramctl_t im_siramctl1; /* First SI RAM Control */ | ||
627 | mcc_t im_mcc1; /* First MCC */ | ||
628 | siramctl_t im_siramctl2; /* Second SI RAM Control */ | ||
629 | mcc_t im_mcc2; /* Second MCC */ | ||
630 | usb_cpm2_t im_usb; /* USB Controller */ | ||
631 | |||
632 | u8 res6[1153]; | ||
633 | |||
634 | u16 im_si1txram[256]; | ||
635 | u8 res7[512]; | ||
636 | u16 im_si1rxram[256]; | ||
637 | u8 res8[512]; | ||
638 | u16 im_si2txram[256]; | ||
639 | u8 res9[512]; | ||
640 | u16 im_si2rxram[256]; | ||
641 | u8 res10[512]; | ||
642 | u8 res11[4096]; | ||
643 | } cpm2_map_t; | ||
644 | |||
645 | extern cpm2_map_t *cpm2_immr; | ||
646 | |||
647 | #endif /* __IMMAP_CPM2__ */ | ||
648 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index bb8d965f96c6..affba7052fb6 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -86,7 +86,7 @@ extern unsigned long pci_dram_offset; | |||
86 | */ | 86 | */ |
87 | 87 | ||
88 | #ifdef CONFIG_PPC64 | 88 | #ifdef CONFIG_PPC64 |
89 | #define IO_SET_SYNC_FLAG() do { get_paca()->io_sync = 1; } while(0) | 89 | #define IO_SET_SYNC_FLAG() do { local_paca->io_sync = 1; } while(0) |
90 | #else | 90 | #else |
91 | #define IO_SET_SYNC_FLAG() | 91 | #define IO_SET_SYNC_FLAG() |
92 | #endif | 92 | #endif |
@@ -734,6 +734,32 @@ static inline void * bus_to_virt(unsigned long address) | |||
734 | #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) | 734 | #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) |
735 | #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) | 735 | #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) |
736 | 736 | ||
737 | #define setbits8(_addr, _v) out_8((_addr), in_8(_addr) | (_v)) | ||
738 | #define clrbits8(_addr, _v) out_8((_addr), in_8(_addr) & ~(_v)) | ||
739 | |||
740 | /* Clear and set bits in one shot. These macros can be used to clear and | ||
741 | * set multiple bits in a register using a single read-modify-write. These | ||
742 | * macros can also be used to set a multiple-bit bit pattern using a mask, | ||
743 | * by specifying the mask in the 'clear' parameter and the new bit pattern | ||
744 | * in the 'set' parameter. | ||
745 | */ | ||
746 | |||
747 | #define clrsetbits(type, addr, clear, set) \ | ||
748 | out_##type((addr), (in_##type(addr) & ~(clear)) | (set)) | ||
749 | |||
750 | #ifdef __powerpc64__ | ||
751 | #define clrsetbits_be64(addr, clear, set) clrsetbits(be64, addr, clear, set) | ||
752 | #define clrsetbits_le64(addr, clear, set) clrsetbits(le64, addr, clear, set) | ||
753 | #endif | ||
754 | |||
755 | #define clrsetbits_be32(addr, clear, set) clrsetbits(be32, addr, clear, set) | ||
756 | #define clrsetbits_le32(addr, clear, set) clrsetbits(le32, addr, clear, set) | ||
757 | |||
758 | #define clrsetbits_be16(addr, clear, set) clrsetbits(be16, addr, clear, set) | ||
759 | #define clrsetbits_le16(addr, clear, set) clrsetbits(le32, addr, clear, set) | ||
760 | |||
761 | #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set) | ||
762 | |||
737 | #endif /* __KERNEL__ */ | 763 | #endif /* __KERNEL__ */ |
738 | 764 | ||
739 | #endif /* _ASM_POWERPC_IO_H */ | 765 | #endif /* _ASM_POWERPC_IO_H */ |
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 0485c53db2b5..1392db456523 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -124,6 +124,9 @@ struct irq_host { | |||
124 | struct irq_host_ops *ops; | 124 | struct irq_host_ops *ops; |
125 | void *host_data; | 125 | void *host_data; |
126 | irq_hw_number_t inval_irq; | 126 | irq_hw_number_t inval_irq; |
127 | |||
128 | /* Optional device node pointer */ | ||
129 | struct device_node *of_node; | ||
127 | }; | 130 | }; |
128 | 131 | ||
129 | /* The main irq map itself is an array of NR_IRQ entries containing the | 132 | /* The main irq map itself is an array of NR_IRQ entries containing the |
@@ -142,7 +145,7 @@ extern irq_hw_number_t virq_to_hw(unsigned int virq); | |||
142 | 145 | ||
143 | /** | 146 | /** |
144 | * irq_alloc_host - Allocate a new irq_host data structure | 147 | * irq_alloc_host - Allocate a new irq_host data structure |
145 | * @node: device-tree node of the interrupt controller | 148 | * @of_node: optional device-tree node of the interrupt controller |
146 | * @revmap_type: type of reverse mapping to use | 149 | * @revmap_type: type of reverse mapping to use |
147 | * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map | 150 | * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map |
148 | * @ops: map/unmap host callbacks | 151 | * @ops: map/unmap host callbacks |
@@ -156,7 +159,8 @@ extern irq_hw_number_t virq_to_hw(unsigned int virq); | |||
156 | * later during boot automatically (the reverse mapping will use the slow path | 159 | * later during boot automatically (the reverse mapping will use the slow path |
157 | * until that happens). | 160 | * until that happens). |
158 | */ | 161 | */ |
159 | extern struct irq_host *irq_alloc_host(unsigned int revmap_type, | 162 | extern struct irq_host *irq_alloc_host(struct device_node *of_node, |
163 | unsigned int revmap_type, | ||
160 | unsigned int revmap_arg, | 164 | unsigned int revmap_arg, |
161 | struct irq_host_ops *ops, | 165 | struct irq_host_ops *ops, |
162 | irq_hw_number_t inval_irq); | 166 | irq_hw_number_t inval_irq); |
diff --git a/include/asm-powerpc/iseries/lpar_map.h b/include/asm-powerpc/iseries/lpar_map.h index 2ec384d66abb..5e9f3e128ee2 100644 --- a/include/asm-powerpc/iseries/lpar_map.h +++ b/include/asm-powerpc/iseries/lpar_map.h | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | 24 | ||
25 | #endif | ||
26 | |||
25 | /* | 27 | /* |
26 | * The iSeries hypervisor will set up mapping for one or more | 28 | * The iSeries hypervisor will set up mapping for one or more |
27 | * ESID/VSID pairs (in SLB/segment registers) and will set up | 29 | * ESID/VSID pairs (in SLB/segment registers) and will set up |
@@ -56,6 +58,7 @@ | |||
56 | /* Hypervisor initially maps 32MB of the load area */ | 58 | /* Hypervisor initially maps 32MB of the load area */ |
57 | #define HvPagesToMap 8192 | 59 | #define HvPagesToMap 8192 |
58 | 60 | ||
61 | #ifndef __ASSEMBLY__ | ||
59 | struct LparMap { | 62 | struct LparMap { |
60 | u64 xNumberEsids; // Number of ESID/VSID pairs | 63 | u64 xNumberEsids; // Number of ESID/VSID pairs |
61 | u64 xNumberRanges; // Number of VA ranges to map | 64 | u64 xNumberRanges; // Number of VA ranges to map |
diff --git a/include/asm-powerpc/kgdb.h b/include/asm-powerpc/kgdb.h new file mode 100644 index 000000000000..b617dac82969 --- /dev/null +++ b/include/asm-powerpc/kgdb.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * kgdb.h: Defines and declarations for serial line source level | ||
3 | * remote debugging of the Linux kernel using gdb. | ||
4 | * | ||
5 | * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) | ||
6 | * | ||
7 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
8 | */ | ||
9 | #ifdef __KERNEL__ | ||
10 | #ifndef _PPC_KGDB_H | ||
11 | #define _PPC_KGDB_H | ||
12 | |||
13 | #ifndef __ASSEMBLY__ | ||
14 | |||
15 | /* Things specific to the gen550 backend. */ | ||
16 | struct uart_port; | ||
17 | |||
18 | extern void gen550_progress(char *, unsigned short); | ||
19 | extern void gen550_kgdb_map_scc(void); | ||
20 | extern void gen550_init(int, struct uart_port *); | ||
21 | |||
22 | /* Things specific to the pmac backend. */ | ||
23 | extern void zs_kgdb_hook(int tty_num); | ||
24 | |||
25 | /* To init the kgdb engine. (called by serial hook)*/ | ||
26 | extern void set_debug_traps(void); | ||
27 | |||
28 | /* To enter the debugger explicitly. */ | ||
29 | extern void breakpoint(void); | ||
30 | |||
31 | /* For taking exceptions | ||
32 | * these are defined in traps.c | ||
33 | */ | ||
34 | extern int (*debugger)(struct pt_regs *regs); | ||
35 | extern int (*debugger_bpt)(struct pt_regs *regs); | ||
36 | extern int (*debugger_sstep)(struct pt_regs *regs); | ||
37 | extern int (*debugger_iabr_match)(struct pt_regs *regs); | ||
38 | extern int (*debugger_dabr_match)(struct pt_regs *regs); | ||
39 | extern void (*debugger_fault_handler)(struct pt_regs *regs); | ||
40 | |||
41 | /* What we bring to the party */ | ||
42 | int kgdb_bpt(struct pt_regs *regs); | ||
43 | int kgdb_sstep(struct pt_regs *regs); | ||
44 | void kgdb(struct pt_regs *regs); | ||
45 | int kgdb_iabr_match(struct pt_regs *regs); | ||
46 | int kgdb_dabr_match(struct pt_regs *regs); | ||
47 | |||
48 | /* | ||
49 | * external low-level support routines (ie macserial.c) | ||
50 | */ | ||
51 | extern void kgdb_interruptible(int); /* control interrupts from serial */ | ||
52 | extern void putDebugChar(char); /* write a single character */ | ||
53 | extern char getDebugChar(void); /* read and return a single char */ | ||
54 | |||
55 | #endif /* !(__ASSEMBLY__) */ | ||
56 | #endif /* !(_PPC_KGDB_H) */ | ||
57 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/lmb.h b/include/asm-powerpc/lmb.h index 0c5880f70225..b5f9f4c9c294 100644 --- a/include/asm-powerpc/lmb.h +++ b/include/asm-powerpc/lmb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _PPC64_LMB_H | 1 | #ifndef _ASM_POWERPC_LMB_H |
2 | #define _PPC64_LMB_H | 2 | #define _ASM_POWERPC_LMB_H |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | /* | 5 | /* |
@@ -77,4 +77,4 @@ lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | #endif /* __KERNEL__ */ | 79 | #endif /* __KERNEL__ */ |
80 | #endif /* _PPC64_LMB_H */ | 80 | #endif /* _ASM_POWERPC_LMB_H */ |
diff --git a/include/asm-powerpc/mmu-40x.h b/include/asm-powerpc/mmu-40x.h new file mode 100644 index 000000000000..7d37f77043ac --- /dev/null +++ b/include/asm-powerpc/mmu-40x.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef _ASM_POWERPC_MMU_40X_H_ | ||
2 | #define _ASM_POWERPC_MMU_40X_H_ | ||
3 | |||
4 | /* | ||
5 | * PPC40x support | ||
6 | */ | ||
7 | |||
8 | #define PPC40X_TLB_SIZE 64 | ||
9 | |||
10 | /* | ||
11 | * TLB entries are defined by a "high" tag portion and a "low" data | ||
12 | * portion. On all architectures, the data portion is 32-bits. | ||
13 | * | ||
14 | * TLB entries are managed entirely under software control by reading, | ||
15 | * writing, and searchoing using the 4xx-specific tlbre, tlbwr, and tlbsx | ||
16 | * instructions. | ||
17 | */ | ||
18 | |||
19 | #define TLB_LO 1 | ||
20 | #define TLB_HI 0 | ||
21 | |||
22 | #define TLB_DATA TLB_LO | ||
23 | #define TLB_TAG TLB_HI | ||
24 | |||
25 | /* Tag portion */ | ||
26 | |||
27 | #define TLB_EPN_MASK 0xFFFFFC00 /* Effective Page Number */ | ||
28 | #define TLB_PAGESZ_MASK 0x00000380 | ||
29 | #define TLB_PAGESZ(x) (((x) & 0x7) << 7) | ||
30 | #define PAGESZ_1K 0 | ||
31 | #define PAGESZ_4K 1 | ||
32 | #define PAGESZ_16K 2 | ||
33 | #define PAGESZ_64K 3 | ||
34 | #define PAGESZ_256K 4 | ||
35 | #define PAGESZ_1M 5 | ||
36 | #define PAGESZ_4M 6 | ||
37 | #define PAGESZ_16M 7 | ||
38 | #define TLB_VALID 0x00000040 /* Entry is valid */ | ||
39 | |||
40 | /* Data portion */ | ||
41 | |||
42 | #define TLB_RPN_MASK 0xFFFFFC00 /* Real Page Number */ | ||
43 | #define TLB_PERM_MASK 0x00000300 | ||
44 | #define TLB_EX 0x00000200 /* Instruction execution allowed */ | ||
45 | #define TLB_WR 0x00000100 /* Writes permitted */ | ||
46 | #define TLB_ZSEL_MASK 0x000000F0 | ||
47 | #define TLB_ZSEL(x) (((x) & 0xF) << 4) | ||
48 | #define TLB_ATTR_MASK 0x0000000F | ||
49 | #define TLB_W 0x00000008 /* Caching is write-through */ | ||
50 | #define TLB_I 0x00000004 /* Caching is inhibited */ | ||
51 | #define TLB_M 0x00000002 /* Memory is coherent */ | ||
52 | #define TLB_G 0x00000001 /* Memory is guarded from prefetch */ | ||
53 | |||
54 | #ifndef __ASSEMBLY__ | ||
55 | |||
56 | typedef unsigned long phys_addr_t; | ||
57 | |||
58 | typedef struct { | ||
59 | unsigned long id; | ||
60 | unsigned long vdso_base; | ||
61 | } mm_context_t; | ||
62 | |||
63 | #endif /* !__ASSEMBLY__ */ | ||
64 | |||
65 | #endif /* _ASM_POWERPC_MMU_40X_H_ */ | ||
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h index 3112ad14ad95..b22b0d20e157 100644 --- a/include/asm-powerpc/mmu-hash64.h +++ b/include/asm-powerpc/mmu-hash64.h | |||
@@ -256,6 +256,7 @@ extern void hpte_init_native(void); | |||
256 | extern void hpte_init_lpar(void); | 256 | extern void hpte_init_lpar(void); |
257 | extern void hpte_init_iSeries(void); | 257 | extern void hpte_init_iSeries(void); |
258 | extern void hpte_init_beat(void); | 258 | extern void hpte_init_beat(void); |
259 | extern void hpte_init_beat_v3(void); | ||
259 | 260 | ||
260 | extern void stabs_alloc(void); | 261 | extern void stabs_alloc(void); |
261 | extern void slb_initialize(void); | 262 | extern void slb_initialize(void); |
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index d44d211e7588..4c0e1b4f975c 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -8,6 +8,9 @@ | |||
8 | #elif defined(CONFIG_PPC_STD_MMU) | 8 | #elif defined(CONFIG_PPC_STD_MMU) |
9 | /* 32-bit classic hash table MMU */ | 9 | /* 32-bit classic hash table MMU */ |
10 | # include <asm/mmu-hash32.h> | 10 | # include <asm/mmu-hash32.h> |
11 | #elif defined(CONFIG_40x) | ||
12 | /* 40x-style software loaded TLB */ | ||
13 | # include <asm/mmu-40x.h> | ||
11 | #elif defined(CONFIG_44x) | 14 | #elif defined(CONFIG_44x) |
12 | /* 44x-style software loaded TLB */ | 15 | /* 44x-style software loaded TLB */ |
13 | # include <asm/mmu-44x.h> | 16 | # include <asm/mmu-44x.h> |
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h index c4631f6dd4f9..1a3dbb743a3f 100644 --- a/include/asm-powerpc/mpc52xx.h +++ b/include/asm-powerpc/mpc52xx.h | |||
@@ -262,6 +262,16 @@ struct mpc52xx_suspend { | |||
262 | extern struct mpc52xx_suspend mpc52xx_suspend; | 262 | extern struct mpc52xx_suspend mpc52xx_suspend; |
263 | extern int __init mpc52xx_pm_init(void); | 263 | extern int __init mpc52xx_pm_init(void); |
264 | extern int mpc52xx_set_wakeup_gpio(u8 pin, u8 level); | 264 | extern int mpc52xx_set_wakeup_gpio(u8 pin, u8 level); |
265 | |||
266 | #ifdef CONFIG_PPC_LITE5200 | ||
267 | extern int __init lite5200_pm_init(void); | ||
268 | |||
269 | /* lite5200 calls mpc5200 suspend functions, so here they are */ | ||
270 | extern int mpc52xx_pm_prepare(suspend_state_t); | ||
271 | extern int mpc52xx_pm_enter(suspend_state_t); | ||
272 | extern int mpc52xx_pm_finish(suspend_state_t); | ||
273 | extern char saved_sram[0x4000]; /* reuse buffer from mpc52xx suspend */ | ||
274 | #endif | ||
265 | #endif /* CONFIG_PM */ | 275 | #endif /* CONFIG_PM */ |
266 | 276 | ||
267 | #endif /* __ASM_POWERPC_MPC52xx_H__ */ | 277 | #endif /* __ASM_POWERPC_MPC52xx_H__ */ |
diff --git a/include/asm-powerpc/mpc52xx_psc.h b/include/asm-powerpc/mpc52xx_psc.h new file mode 100644 index 000000000000..26690d2b32f5 --- /dev/null +++ b/include/asm-powerpc/mpc52xx_psc.h | |||
@@ -0,0 +1,191 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/mpc52xx_psc.h | ||
3 | * | ||
4 | * Definitions of consts/structs to drive the Freescale MPC52xx OnChip | ||
5 | * PSCs. Theses are shared between multiple drivers since a PSC can be | ||
6 | * UART, AC97, IR, I2S, ... So this header is in asm-ppc. | ||
7 | * | ||
8 | * | ||
9 | * Maintainer : Sylvain Munaut <tnt@246tNt.com> | ||
10 | * | ||
11 | * Based/Extracted from some header of the 2.4 originally written by | ||
12 | * Dale Farnsworth <dfarnsworth@mvista.com> | ||
13 | * | ||
14 | * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com> | ||
15 | * Copyright (C) 2003 MontaVista, Software, Inc. | ||
16 | * | ||
17 | * This file is licensed under the terms of the GNU General Public License | ||
18 | * version 2. This program is licensed "as is" without any warranty of any | ||
19 | * kind, whether express or implied. | ||
20 | */ | ||
21 | |||
22 | #ifndef __ASM_MPC52xx_PSC_H__ | ||
23 | #define __ASM_MPC52xx_PSC_H__ | ||
24 | |||
25 | #include <asm/types.h> | ||
26 | |||
27 | /* Max number of PSCs */ | ||
28 | #define MPC52xx_PSC_MAXNUM 6 | ||
29 | |||
30 | /* Programmable Serial Controller (PSC) status register bits */ | ||
31 | #define MPC52xx_PSC_SR_CDE 0x0080 | ||
32 | #define MPC52xx_PSC_SR_RXRDY 0x0100 | ||
33 | #define MPC52xx_PSC_SR_RXFULL 0x0200 | ||
34 | #define MPC52xx_PSC_SR_TXRDY 0x0400 | ||
35 | #define MPC52xx_PSC_SR_TXEMP 0x0800 | ||
36 | #define MPC52xx_PSC_SR_OE 0x1000 | ||
37 | #define MPC52xx_PSC_SR_PE 0x2000 | ||
38 | #define MPC52xx_PSC_SR_FE 0x4000 | ||
39 | #define MPC52xx_PSC_SR_RB 0x8000 | ||
40 | |||
41 | /* PSC Command values */ | ||
42 | #define MPC52xx_PSC_RX_ENABLE 0x0001 | ||
43 | #define MPC52xx_PSC_RX_DISABLE 0x0002 | ||
44 | #define MPC52xx_PSC_TX_ENABLE 0x0004 | ||
45 | #define MPC52xx_PSC_TX_DISABLE 0x0008 | ||
46 | #define MPC52xx_PSC_SEL_MODE_REG_1 0x0010 | ||
47 | #define MPC52xx_PSC_RST_RX 0x0020 | ||
48 | #define MPC52xx_PSC_RST_TX 0x0030 | ||
49 | #define MPC52xx_PSC_RST_ERR_STAT 0x0040 | ||
50 | #define MPC52xx_PSC_RST_BRK_CHG_INT 0x0050 | ||
51 | #define MPC52xx_PSC_START_BRK 0x0060 | ||
52 | #define MPC52xx_PSC_STOP_BRK 0x0070 | ||
53 | |||
54 | /* PSC TxRx FIFO status bits */ | ||
55 | #define MPC52xx_PSC_RXTX_FIFO_ERR 0x0040 | ||
56 | #define MPC52xx_PSC_RXTX_FIFO_UF 0x0020 | ||
57 | #define MPC52xx_PSC_RXTX_FIFO_OF 0x0010 | ||
58 | #define MPC52xx_PSC_RXTX_FIFO_FR 0x0008 | ||
59 | #define MPC52xx_PSC_RXTX_FIFO_FULL 0x0004 | ||
60 | #define MPC52xx_PSC_RXTX_FIFO_ALARM 0x0002 | ||
61 | #define MPC52xx_PSC_RXTX_FIFO_EMPTY 0x0001 | ||
62 | |||
63 | /* PSC interrupt mask bits */ | ||
64 | #define MPC52xx_PSC_IMR_TXRDY 0x0100 | ||
65 | #define MPC52xx_PSC_IMR_RXRDY 0x0200 | ||
66 | #define MPC52xx_PSC_IMR_DB 0x0400 | ||
67 | #define MPC52xx_PSC_IMR_IPC 0x8000 | ||
68 | |||
69 | /* PSC input port change bit */ | ||
70 | #define MPC52xx_PSC_CTS 0x01 | ||
71 | #define MPC52xx_PSC_DCD 0x02 | ||
72 | #define MPC52xx_PSC_D_CTS 0x10 | ||
73 | #define MPC52xx_PSC_D_DCD 0x20 | ||
74 | |||
75 | /* PSC mode fields */ | ||
76 | #define MPC52xx_PSC_MODE_5_BITS 0x00 | ||
77 | #define MPC52xx_PSC_MODE_6_BITS 0x01 | ||
78 | #define MPC52xx_PSC_MODE_7_BITS 0x02 | ||
79 | #define MPC52xx_PSC_MODE_8_BITS 0x03 | ||
80 | #define MPC52xx_PSC_MODE_BITS_MASK 0x03 | ||
81 | #define MPC52xx_PSC_MODE_PAREVEN 0x00 | ||
82 | #define MPC52xx_PSC_MODE_PARODD 0x04 | ||
83 | #define MPC52xx_PSC_MODE_PARFORCE 0x08 | ||
84 | #define MPC52xx_PSC_MODE_PARNONE 0x10 | ||
85 | #define MPC52xx_PSC_MODE_ERR 0x20 | ||
86 | #define MPC52xx_PSC_MODE_FFULL 0x40 | ||
87 | #define MPC52xx_PSC_MODE_RXRTS 0x80 | ||
88 | |||
89 | #define MPC52xx_PSC_MODE_ONE_STOP_5_BITS 0x00 | ||
90 | #define MPC52xx_PSC_MODE_ONE_STOP 0x07 | ||
91 | #define MPC52xx_PSC_MODE_TWO_STOP 0x0f | ||
92 | |||
93 | #define MPC52xx_PSC_RFNUM_MASK 0x01ff | ||
94 | |||
95 | |||
96 | /* Structure of the hardware registers */ | ||
97 | struct mpc52xx_psc { | ||
98 | u8 mode; /* PSC + 0x00 */ | ||
99 | u8 reserved0[3]; | ||
100 | union { /* PSC + 0x04 */ | ||
101 | u16 status; | ||
102 | u16 clock_select; | ||
103 | } sr_csr; | ||
104 | #define mpc52xx_psc_status sr_csr.status | ||
105 | #define mpc52xx_psc_clock_select sr_csr.clock_select | ||
106 | u16 reserved1; | ||
107 | u8 command; /* PSC + 0x08 */ | ||
108 | u8 reserved2[3]; | ||
109 | union { /* PSC + 0x0c */ | ||
110 | u8 buffer_8; | ||
111 | u16 buffer_16; | ||
112 | u32 buffer_32; | ||
113 | } buffer; | ||
114 | #define mpc52xx_psc_buffer_8 buffer.buffer_8 | ||
115 | #define mpc52xx_psc_buffer_16 buffer.buffer_16 | ||
116 | #define mpc52xx_psc_buffer_32 buffer.buffer_32 | ||
117 | union { /* PSC + 0x10 */ | ||
118 | u8 ipcr; | ||
119 | u8 acr; | ||
120 | } ipcr_acr; | ||
121 | #define mpc52xx_psc_ipcr ipcr_acr.ipcr | ||
122 | #define mpc52xx_psc_acr ipcr_acr.acr | ||
123 | u8 reserved3[3]; | ||
124 | union { /* PSC + 0x14 */ | ||
125 | u16 isr; | ||
126 | u16 imr; | ||
127 | } isr_imr; | ||
128 | #define mpc52xx_psc_isr isr_imr.isr | ||
129 | #define mpc52xx_psc_imr isr_imr.imr | ||
130 | u16 reserved4; | ||
131 | u8 ctur; /* PSC + 0x18 */ | ||
132 | u8 reserved5[3]; | ||
133 | u8 ctlr; /* PSC + 0x1c */ | ||
134 | u8 reserved6[3]; | ||
135 | u16 ccr; /* PSC + 0x20 */ | ||
136 | u8 reserved7[14]; | ||
137 | u8 ivr; /* PSC + 0x30 */ | ||
138 | u8 reserved8[3]; | ||
139 | u8 ip; /* PSC + 0x34 */ | ||
140 | u8 reserved9[3]; | ||
141 | u8 op1; /* PSC + 0x38 */ | ||
142 | u8 reserved10[3]; | ||
143 | u8 op0; /* PSC + 0x3c */ | ||
144 | u8 reserved11[3]; | ||
145 | u32 sicr; /* PSC + 0x40 */ | ||
146 | u8 ircr1; /* PSC + 0x44 */ | ||
147 | u8 reserved13[3]; | ||
148 | u8 ircr2; /* PSC + 0x44 */ | ||
149 | u8 reserved14[3]; | ||
150 | u8 irsdr; /* PSC + 0x4c */ | ||
151 | u8 reserved15[3]; | ||
152 | u8 irmdr; /* PSC + 0x50 */ | ||
153 | u8 reserved16[3]; | ||
154 | u8 irfdr; /* PSC + 0x54 */ | ||
155 | u8 reserved17[3]; | ||
156 | u16 rfnum; /* PSC + 0x58 */ | ||
157 | u16 reserved18; | ||
158 | u16 tfnum; /* PSC + 0x5c */ | ||
159 | u16 reserved19; | ||
160 | u32 rfdata; /* PSC + 0x60 */ | ||
161 | u16 rfstat; /* PSC + 0x64 */ | ||
162 | u16 reserved20; | ||
163 | u8 rfcntl; /* PSC + 0x68 */ | ||
164 | u8 reserved21[5]; | ||
165 | u16 rfalarm; /* PSC + 0x6e */ | ||
166 | u16 reserved22; | ||
167 | u16 rfrptr; /* PSC + 0x72 */ | ||
168 | u16 reserved23; | ||
169 | u16 rfwptr; /* PSC + 0x76 */ | ||
170 | u16 reserved24; | ||
171 | u16 rflrfptr; /* PSC + 0x7a */ | ||
172 | u16 reserved25; | ||
173 | u16 rflwfptr; /* PSC + 0x7e */ | ||
174 | u32 tfdata; /* PSC + 0x80 */ | ||
175 | u16 tfstat; /* PSC + 0x84 */ | ||
176 | u16 reserved26; | ||
177 | u8 tfcntl; /* PSC + 0x88 */ | ||
178 | u8 reserved27[5]; | ||
179 | u16 tfalarm; /* PSC + 0x8e */ | ||
180 | u16 reserved28; | ||
181 | u16 tfrptr; /* PSC + 0x92 */ | ||
182 | u16 reserved29; | ||
183 | u16 tfwptr; /* PSC + 0x96 */ | ||
184 | u16 reserved30; | ||
185 | u16 tflrfptr; /* PSC + 0x9a */ | ||
186 | u16 reserved31; | ||
187 | u16 tflwfptr; /* PSC + 0x9e */ | ||
188 | }; | ||
189 | |||
190 | |||
191 | #endif /* __ASM_MPC52xx_PSC_H__ */ | ||
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 262db6b8da73..ae84dde3bc7f 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -224,8 +224,6 @@ struct mpic_reg_bank { | |||
224 | u32 __iomem *base; | 224 | u32 __iomem *base; |
225 | #ifdef CONFIG_PPC_DCR | 225 | #ifdef CONFIG_PPC_DCR |
226 | dcr_host_t dhost; | 226 | dcr_host_t dhost; |
227 | unsigned int dbase; | ||
228 | unsigned int doff; | ||
229 | #endif /* CONFIG_PPC_DCR */ | 227 | #endif /* CONFIG_PPC_DCR */ |
230 | }; | 228 | }; |
231 | 229 | ||
@@ -240,9 +238,6 @@ struct mpic_irq_save { | |||
240 | /* The instance data of a given MPIC */ | 238 | /* The instance data of a given MPIC */ |
241 | struct mpic | 239 | struct mpic |
242 | { | 240 | { |
243 | /* The device node of the interrupt controller */ | ||
244 | struct device_node *of_node; | ||
245 | |||
246 | /* The remapper for this MPIC */ | 241 | /* The remapper for this MPIC */ |
247 | struct irq_host *irqhost; | 242 | struct irq_host *irqhost; |
248 | 243 | ||
@@ -292,10 +287,6 @@ struct mpic | |||
292 | struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS]; | 287 | struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS]; |
293 | struct mpic_reg_bank isus[MPIC_MAX_ISU]; | 288 | struct mpic_reg_bank isus[MPIC_MAX_ISU]; |
294 | 289 | ||
295 | #ifdef CONFIG_PPC_DCR | ||
296 | unsigned int dcr_base; | ||
297 | #endif | ||
298 | |||
299 | /* Protected sources */ | 290 | /* Protected sources */ |
300 | unsigned long *protected; | 291 | unsigned long *protected; |
301 | 292 | ||
@@ -309,6 +300,10 @@ struct mpic | |||
309 | unsigned long *hwirq_bitmap; | 300 | unsigned long *hwirq_bitmap; |
310 | #endif | 301 | #endif |
311 | 302 | ||
303 | #ifdef CONFIG_MPIC_BROKEN_REGREAD | ||
304 | u32 isu_reg0_shadow[MPIC_MAX_IRQ_SOURCES]; | ||
305 | #endif | ||
306 | |||
312 | /* link */ | 307 | /* link */ |
313 | struct mpic *next; | 308 | struct mpic *next; |
314 | 309 | ||
diff --git a/include/asm-powerpc/nvram.h b/include/asm-powerpc/nvram.h index f3563e11e260..9877982508bf 100644 --- a/include/asm-powerpc/nvram.h +++ b/include/asm-powerpc/nvram.h | |||
@@ -63,8 +63,10 @@ struct nvram_partition { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | 65 | ||
66 | extern int nvram_write_error_log(char * buff, int length, unsigned int err_type); | 66 | extern int nvram_write_error_log(char * buff, int length, |
67 | extern int nvram_read_error_log(char * buff, int length, unsigned int * err_type); | 67 | unsigned int err_type, unsigned int err_seq); |
68 | extern int nvram_read_error_log(char * buff, int length, | ||
69 | unsigned int * err_type, unsigned int *err_seq); | ||
68 | extern int nvram_clear_error_log(void); | 70 | extern int nvram_clear_error_log(void); |
69 | extern struct nvram_partition *nvram_find_partition(int sig, const char *name); | 71 | extern struct nvram_partition *nvram_find_partition(int sig, const char *name); |
70 | 72 | ||
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index c6a5b1735666..fcd7b428ed0b 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -21,7 +21,18 @@ | |||
21 | #include <asm/mmu.h> | 21 | #include <asm/mmu.h> |
22 | 22 | ||
23 | register struct paca_struct *local_paca asm("r13"); | 23 | register struct paca_struct *local_paca asm("r13"); |
24 | |||
25 | #if defined(CONFIG_DEBUG_PREEMPT) && defined(CONFIG_SMP) | ||
26 | extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */ | ||
27 | /* | ||
28 | * Add standard checks that preemption cannot occur when using get_paca(): | ||
29 | * otherwise the paca_struct it points to may be the wrong one just after. | ||
30 | */ | ||
31 | #define get_paca() ((void) debug_smp_processor_id(), local_paca) | ||
32 | #else | ||
24 | #define get_paca() local_paca | 33 | #define get_paca() local_paca |
34 | #endif | ||
35 | |||
25 | #define get_lppaca() (get_paca()->lppaca_ptr) | 36 | #define get_lppaca() (get_paca()->lppaca_ptr) |
26 | #define get_slb_shadow() (get_paca()->slb_shadow_ptr) | 37 | #define get_slb_shadow() (get_paca()->slb_shadow_ptr) |
27 | 38 | ||
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 3448a3d4bc64..56a2df0f6836 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | /* Segment size */ | 29 | /* Segment size */ |
30 | #define SID_SHIFT 28 | 30 | #define SID_SHIFT 28 |
31 | #define SID_MASK 0xfffffffffUL | 31 | #define SID_MASK ASM_CONST(0xfffffffff) |
32 | #define ESID_MASK 0xfffffffff0000000UL | 32 | #define ESID_MASK 0xfffffffff0000000UL |
33 | #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK) | 33 | #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK) |
34 | 34 | ||
@@ -121,6 +121,7 @@ extern unsigned int get_slice_psize(struct mm_struct *mm, | |||
121 | 121 | ||
122 | extern void slice_init_context(struct mm_struct *mm, unsigned int psize); | 122 | extern void slice_init_context(struct mm_struct *mm, unsigned int psize); |
123 | extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize); | 123 | extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize); |
124 | #define slice_mm_new_context(mm) ((mm)->context.id == 0) | ||
124 | 125 | ||
125 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE | 126 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE |
126 | extern int is_hugepage_only_range(struct mm_struct *m, | 127 | extern int is_hugepage_only_range(struct mm_struct *m, |
@@ -130,6 +131,12 @@ extern int is_hugepage_only_range(struct mm_struct *m, | |||
130 | #endif /* __ASSEMBLY__ */ | 131 | #endif /* __ASSEMBLY__ */ |
131 | #else | 132 | #else |
132 | #define slice_init() | 133 | #define slice_init() |
134 | #define slice_set_user_psize(mm, psize) \ | ||
135 | do { \ | ||
136 | (mm)->context.user_psize = (psize); \ | ||
137 | (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ | ||
138 | } while (0) | ||
139 | #define slice_mm_new_context(mm) 1 | ||
133 | #endif /* CONFIG_PPC_MM_SLICES */ | 140 | #endif /* CONFIG_PPC_MM_SLICES */ |
134 | 141 | ||
135 | #ifdef CONFIG_HUGETLB_PAGE | 142 | #ifdef CONFIG_HUGETLB_PAGE |
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index 73dc8ba4010d..6b229626d3ff 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h | |||
@@ -28,7 +28,7 @@ | |||
28 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) | 29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) |
30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) | 30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) |
31 | #define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) | 31 | #define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, local_paca->data_offset)) |
32 | 32 | ||
33 | /* A macro to avoid #include hell... */ | 33 | /* A macro to avoid #include hell... */ |
34 | #define percpu_modcopy(pcpudst, src, size) \ | 34 | #define percpu_modcopy(pcpudst, src, size) \ |
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index add5481fd7c7..818e2abc81e2 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -10,10 +10,12 @@ | |||
10 | #define PUD_INDEX_SIZE 7 | 10 | #define PUD_INDEX_SIZE 7 |
11 | #define PGD_INDEX_SIZE 9 | 11 | #define PGD_INDEX_SIZE 9 |
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | ||
13 | #define PTE_TABLE_SIZE (sizeof(pte_t) << PTE_INDEX_SIZE) | 14 | #define PTE_TABLE_SIZE (sizeof(pte_t) << PTE_INDEX_SIZE) |
14 | #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) | 15 | #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) |
15 | #define PUD_TABLE_SIZE (sizeof(pud_t) << PUD_INDEX_SIZE) | 16 | #define PUD_TABLE_SIZE (sizeof(pud_t) << PUD_INDEX_SIZE) |
16 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) | 17 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) |
18 | #endif /* __ASSEMBLY__ */ | ||
17 | 19 | ||
18 | #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) | 20 | #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) |
19 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) | 21 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) |
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h index 33ae9018fe72..bd54b772fbc6 100644 --- a/include/asm-powerpc/pgtable-64k.h +++ b/include/asm-powerpc/pgtable-64k.h | |||
@@ -9,9 +9,11 @@ | |||
9 | #define PUD_INDEX_SIZE 0 | 9 | #define PUD_INDEX_SIZE 0 |
10 | #define PGD_INDEX_SIZE 4 | 10 | #define PGD_INDEX_SIZE 4 |
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | ||
12 | #define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE) | 13 | #define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE) |
13 | #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) | 14 | #define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE) |
14 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) | 15 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) |
16 | #endif /* __ASSEMBLY__ */ | ||
15 | 17 | ||
16 | #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) | 18 | #define PTRS_PER_PTE (1 << PTE_INDEX_SIZE) |
17 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) | 19 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) |
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index 65325721446d..2dbd4e7884fa 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h | |||
@@ -155,6 +155,20 @@ name: \ | |||
155 | .type GLUE(.,name),@function; \ | 155 | .type GLUE(.,name),@function; \ |
156 | GLUE(.,name): | 156 | GLUE(.,name): |
157 | 157 | ||
158 | #define _INIT_GLOBAL(name) \ | ||
159 | .section ".text.init.refok"; \ | ||
160 | .align 2 ; \ | ||
161 | .globl name; \ | ||
162 | .globl GLUE(.,name); \ | ||
163 | .section ".opd","aw"; \ | ||
164 | name: \ | ||
165 | .quad GLUE(.,name); \ | ||
166 | .quad .TOC.@tocbase; \ | ||
167 | .quad 0; \ | ||
168 | .previous; \ | ||
169 | .type GLUE(.,name),@function; \ | ||
170 | GLUE(.,name): | ||
171 | |||
158 | #define _KPROBE(name) \ | 172 | #define _KPROBE(name) \ |
159 | .section ".kprobes.text","a"; \ | 173 | .section ".kprobes.text","a"; \ |
160 | .align 2 ; \ | 174 | .align 2 ; \ |
@@ -195,6 +209,10 @@ GLUE(.,name): | |||
195 | 209 | ||
196 | #else /* 32-bit */ | 210 | #else /* 32-bit */ |
197 | 211 | ||
212 | #define _ENTRY(n) \ | ||
213 | .globl n; \ | ||
214 | n: | ||
215 | |||
198 | #define _GLOBAL(n) \ | 216 | #define _GLOBAL(n) \ |
199 | .text; \ | 217 | .text; \ |
200 | .stabs __stringify(n:F-1),N_FUN,0,0,n;\ | 218 | .stabs __stringify(n:F-1),N_FUN,0,0,n;\ |
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index e28b10805159..dba7c948189d 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -145,9 +145,9 @@ struct thread_struct { | |||
145 | unsigned long dabr; /* Data address breakpoint register */ | 145 | unsigned long dabr; /* Data address breakpoint register */ |
146 | #ifdef CONFIG_ALTIVEC | 146 | #ifdef CONFIG_ALTIVEC |
147 | /* Complete AltiVec register set */ | 147 | /* Complete AltiVec register set */ |
148 | vector128 vr[32] __attribute((aligned(16))); | 148 | vector128 vr[32] __attribute__((aligned(16))); |
149 | /* AltiVec status */ | 149 | /* AltiVec status */ |
150 | vector128 vscr __attribute((aligned(16))); | 150 | vector128 vscr __attribute__((aligned(16))); |
151 | unsigned long vrsave; | 151 | unsigned long vrsave; |
152 | int used_vr; /* set if process has used altivec */ | 152 | int used_vr; /* set if process has used altivec */ |
153 | #endif /* CONFIG_ALTIVEC */ | 153 | #endif /* CONFIG_ALTIVEC */ |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 672083787a1d..925e2d384bb3 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 | 24 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 |
25 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 | 25 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 |
26 | 26 | ||
27 | #define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l)) | 27 | #define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) |
28 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) | 28 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) |
29 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) | 29 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) |
30 | 30 | ||
@@ -145,7 +145,6 @@ extern void of_detach_node(struct device_node *); | |||
145 | extern void finish_device_tree(void); | 145 | extern void finish_device_tree(void); |
146 | extern void unflatten_device_tree(void); | 146 | extern void unflatten_device_tree(void); |
147 | extern void early_init_devtree(void *); | 147 | extern void early_init_devtree(void *); |
148 | #define device_is_compatible(d, c) of_device_is_compatible((d), (c)) | ||
149 | extern int machine_is_compatible(const char *compat); | 148 | extern int machine_is_compatible(const char *compat); |
150 | extern void print_properties(struct device_node *node); | 149 | extern void print_properties(struct device_node *node); |
151 | extern int prom_n_intr_cells(struct device_node* np); | 150 | extern int prom_n_intr_cells(struct device_node* np); |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index a6f3f5ee7ca7..f577a16c6728 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -229,6 +229,9 @@ enum lv1_result { | |||
229 | LV1_INVALID_CLASS_ID = -21, | 229 | LV1_INVALID_CLASS_ID = -21, |
230 | LV1_CONSTRAINT_NOT_SATISFIED = -22, | 230 | LV1_CONSTRAINT_NOT_SATISFIED = -22, |
231 | LV1_ALIGNMENT_ERROR = -23, | 231 | LV1_ALIGNMENT_ERROR = -23, |
232 | LV1_HARDWARE_ERROR = -24, | ||
233 | LV1_INVALID_DATA_FORMAT = -25, | ||
234 | LV1_INVALID_OPERATION = -26, | ||
232 | LV1_INTERNAL_ERROR = -32768, | 235 | LV1_INTERNAL_ERROR = -32768, |
233 | }; | 236 | }; |
234 | 237 | ||
@@ -284,6 +287,12 @@ static inline const char* ps3_result(int result) | |||
284 | return "LV1_CONSTRAINT_NOT_SATISFIED (-22)"; | 287 | return "LV1_CONSTRAINT_NOT_SATISFIED (-22)"; |
285 | case LV1_ALIGNMENT_ERROR: | 288 | case LV1_ALIGNMENT_ERROR: |
286 | return "LV1_ALIGNMENT_ERROR (-23)"; | 289 | return "LV1_ALIGNMENT_ERROR (-23)"; |
290 | case LV1_HARDWARE_ERROR: | ||
291 | return "LV1_HARDWARE_ERROR (-24)"; | ||
292 | case LV1_INVALID_DATA_FORMAT: | ||
293 | return "LV1_INVALID_DATA_FORMAT (-25)"; | ||
294 | case LV1_INVALID_OPERATION: | ||
295 | return "LV1_INVALID_OPERATION (-26)"; | ||
287 | case LV1_INTERNAL_ERROR: | 296 | case LV1_INTERNAL_ERROR: |
288 | return "LV1_INTERNAL_ERROR (-32768)"; | 297 | return "LV1_INTERNAL_ERROR (-32768)"; |
289 | default: | 298 | default: |
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h index 9d304b1f1608..ad23c580631c 100644 --- a/include/asm-powerpc/qe.h +++ b/include/asm-powerpc/qe.h | |||
@@ -32,6 +32,9 @@ | |||
32 | extern void qe_reset(void); | 32 | extern void qe_reset(void); |
33 | extern int par_io_init(struct device_node *np); | 33 | extern int par_io_init(struct device_node *np); |
34 | extern int par_io_of_config(struct device_node *np); | 34 | extern int par_io_of_config(struct device_node *np); |
35 | extern int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain, | ||
36 | int assignment, int has_irq); | ||
37 | extern int par_io_data_set(u8 port, u8 pin, u8 val); | ||
35 | 38 | ||
36 | /* QE internal API */ | 39 | /* QE internal API */ |
37 | int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); | 40 | int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 281011e953ec..e775ff1ca413 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -102,12 +102,8 @@ | |||
102 | #else /* 32-bit */ | 102 | #else /* 32-bit */ |
103 | /* Default MSR for kernel mode. */ | 103 | /* Default MSR for kernel mode. */ |
104 | #ifndef MSR_KERNEL /* reg_booke.h also defines this */ | 104 | #ifndef MSR_KERNEL /* reg_booke.h also defines this */ |
105 | #ifdef CONFIG_APUS_FAST_EXCEPT | ||
106 | #define MSR_KERNEL (MSR_ME|MSR_IP|MSR_RI|MSR_IR|MSR_DR) | ||
107 | #else | ||
108 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) | 105 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) |
109 | #endif | 106 | #endif |
110 | #endif | ||
111 | 107 | ||
112 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) | 108 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) |
113 | #endif | 109 | #endif |
@@ -518,21 +514,47 @@ | |||
518 | #define PA6T_MMCR1_ES4 0x0000000000ff0000UL | 514 | #define PA6T_MMCR1_ES4 0x0000000000ff0000UL |
519 | #define PA6T_MMCR1_ES5 0x00000000ff000000UL | 515 | #define PA6T_MMCR1_ES5 0x00000000ff000000UL |
520 | 516 | ||
521 | #define SPRN_PA6T_SIAR 780 | 517 | #define SPRN_PA6T_UPMC0 771 /* User PerfMon Counter 0 */ |
522 | #define SPRN_PA6T_UPMC0 771 | 518 | #define SPRN_PA6T_UPMC1 772 /* ... */ |
523 | #define SPRN_PA6T_UPMC1 772 | ||
524 | #define SPRN_PA6T_UPMC2 773 | 519 | #define SPRN_PA6T_UPMC2 773 |
525 | #define SPRN_PA6T_UPMC3 774 | 520 | #define SPRN_PA6T_UPMC3 774 |
526 | #define SPRN_PA6T_UPMC4 775 | 521 | #define SPRN_PA6T_UPMC4 775 |
527 | #define SPRN_PA6T_UPMC5 776 | 522 | #define SPRN_PA6T_UPMC5 776 |
528 | #define SPRN_PA6T_UMMCR0 779 | 523 | #define SPRN_PA6T_UMMCR0 779 /* User Monitor Mode Control Register 0 */ |
529 | #define SPRN_PA6T_UMMCR1 782 | 524 | #define SPRN_PA6T_SIAR 780 /* Sampled Instruction Address */ |
530 | #define SPRN_PA6T_PMC0 787 | 525 | #define SPRN_PA6T_UMMCR1 782 /* User Monitor Mode Control Register 1 */ |
531 | #define SPRN_PA6T_PMC1 788 | 526 | #define SPRN_PA6T_SIER 785 /* Sampled Instruction Event Register */ |
532 | #define SPRN_PA6T_PMC2 789 | 527 | #define SPRN_PA6T_PMC0 787 |
533 | #define SPRN_PA6T_PMC3 790 | 528 | #define SPRN_PA6T_PMC1 788 |
534 | #define SPRN_PA6T_PMC4 791 | 529 | #define SPRN_PA6T_PMC2 789 |
535 | #define SPRN_PA6T_PMC5 792 | 530 | #define SPRN_PA6T_PMC3 790 |
531 | #define SPRN_PA6T_PMC4 791 | ||
532 | #define SPRN_PA6T_PMC5 792 | ||
533 | #define SPRN_PA6T_TSR0 793 /* Timestamp Register 0 */ | ||
534 | #define SPRN_PA6T_TSR1 794 /* Timestamp Register 1 */ | ||
535 | #define SPRN_PA6T_TSR2 799 /* Timestamp Register 2 */ | ||
536 | #define SPRN_PA6T_TSR3 784 /* Timestamp Register 3 */ | ||
537 | |||
538 | #define SPRN_PA6T_IER 981 /* Icache Error Register */ | ||
539 | #define SPRN_PA6T_DER 982 /* Dcache Error Register */ | ||
540 | #define SPRN_PA6T_BER 862 /* BIU Error Address Register */ | ||
541 | #define SPRN_PA6T_MER 849 /* MMU Error Register */ | ||
542 | |||
543 | #define SPRN_PA6T_IMA0 880 /* Instruction Match Array 0 */ | ||
544 | #define SPRN_PA6T_IMA1 881 /* ... */ | ||
545 | #define SPRN_PA6T_IMA2 882 | ||
546 | #define SPRN_PA6T_IMA3 883 | ||
547 | #define SPRN_PA6T_IMA4 884 | ||
548 | #define SPRN_PA6T_IMA5 885 | ||
549 | #define SPRN_PA6T_IMA6 886 | ||
550 | #define SPRN_PA6T_IMA7 887 | ||
551 | #define SPRN_PA6T_IMA8 888 | ||
552 | #define SPRN_PA6T_IMA9 889 | ||
553 | #define SPRN_PA6T_BTCR 978 /* Breakpoint and Tagging Control Register */ | ||
554 | #define SPRN_PA6T_IMAAT 979 /* Instruction Match Array Action Table */ | ||
555 | #define SPRN_PA6T_PCCR 1019 /* Power Counter Control Register */ | ||
556 | #define SPRN_PA6T_RPCCR 1021 /* Retire PC Trace Control Register */ | ||
557 | |||
536 | 558 | ||
537 | #else /* 32-bit */ | 559 | #else /* 32-bit */ |
538 | #define SPRN_MMCR0 952 /* Monitor Mode Control Register 0 */ | 560 | #define SPRN_MMCR0 952 /* Monitor Mode Control Register 0 */ |
diff --git a/include/asm-powerpc/rwsem.h b/include/asm-powerpc/rwsem.h index e929145e1e46..cefc14728cc5 100644 --- a/include/asm-powerpc/rwsem.h +++ b/include/asm-powerpc/rwsem.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef _ASM_POWERPC_RWSEM_H | 1 | #ifndef _ASM_POWERPC_RWSEM_H |
2 | #define _ASM_POWERPC_RWSEM_H | 2 | #define _ASM_POWERPC_RWSEM_H |
3 | 3 | ||
4 | #ifndef _LINUX_RWSEM_H | ||
5 | #error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead." | ||
6 | #endif | ||
7 | |||
4 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
5 | 9 | ||
6 | /* | 10 | /* |
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h index d037f50580e2..19102bfc14ca 100644 --- a/include/asm-powerpc/smp.h +++ b/include/asm-powerpc/smp.h | |||
@@ -45,7 +45,7 @@ void generic_mach_cpu_die(void); | |||
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #ifdef CONFIG_PPC64 | 47 | #ifdef CONFIG_PPC64 |
48 | #define raw_smp_processor_id() (get_paca()->paca_index) | 48 | #define raw_smp_processor_id() (local_paca->paca_index) |
49 | #define hard_smp_processor_id() (get_paca()->hw_cpu_id) | 49 | #define hard_smp_processor_id() (get_paca()->hw_cpu_id) |
50 | #else | 50 | #else |
51 | /* 32-bit */ | 51 | /* 32-bit */ |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 5bde3980bf49..b1accce77bb5 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -238,19 +238,14 @@ extern long spu_sys_callback(struct spu_syscall_block *s); | |||
238 | 238 | ||
239 | /* syscalls implemented in spufs */ | 239 | /* syscalls implemented in spufs */ |
240 | struct file; | 240 | struct file; |
241 | extern struct spufs_calls { | 241 | struct spufs_calls { |
242 | asmlinkage long (*create_thread)(const char __user *name, | 242 | long (*create_thread)(const char __user *name, |
243 | unsigned int flags, mode_t mode, | 243 | unsigned int flags, mode_t mode, |
244 | struct file *neighbor); | 244 | struct file *neighbor); |
245 | asmlinkage long (*spu_run)(struct file *filp, __u32 __user *unpc, | 245 | long (*spu_run)(struct file *filp, __u32 __user *unpc, |
246 | __u32 __user *ustatus); | 246 | __u32 __user *ustatus); |
247 | struct module *owner; | 247 | int (*coredump_extra_notes_size)(void); |
248 | } spufs_calls; | 248 | int (*coredump_extra_notes_write)(struct file *file, loff_t *foffset); |
249 | |||
250 | /* coredump calls implemented in spufs */ | ||
251 | struct spu_coredump_calls { | ||
252 | asmlinkage int (*arch_notes_size)(void); | ||
253 | asmlinkage void (*arch_write_notes)(struct file *file); | ||
254 | struct module *owner; | 249 | struct module *owner; |
255 | }; | 250 | }; |
256 | 251 | ||
@@ -274,21 +269,8 @@ struct spu_coredump_calls { | |||
274 | #define SPU_CREATE_FLAG_ALL 0x003f /* mask of all valid flags */ | 269 | #define SPU_CREATE_FLAG_ALL 0x003f /* mask of all valid flags */ |
275 | 270 | ||
276 | 271 | ||
277 | #ifdef CONFIG_SPU_FS_MODULE | ||
278 | int register_spu_syscalls(struct spufs_calls *calls); | 272 | int register_spu_syscalls(struct spufs_calls *calls); |
279 | void unregister_spu_syscalls(struct spufs_calls *calls); | 273 | void unregister_spu_syscalls(struct spufs_calls *calls); |
280 | #else | ||
281 | static inline int register_spu_syscalls(struct spufs_calls *calls) | ||
282 | { | ||
283 | return 0; | ||
284 | } | ||
285 | static inline void unregister_spu_syscalls(struct spufs_calls *calls) | ||
286 | { | ||
287 | } | ||
288 | #endif /* MODULE */ | ||
289 | |||
290 | int register_arch_coredump_calls(struct spu_coredump_calls *calls); | ||
291 | void unregister_arch_coredump_calls(struct spu_coredump_calls *calls); | ||
292 | 274 | ||
293 | int spu_add_sysdev_attr(struct sysdev_attribute *attr); | 275 | int spu_add_sysdev_attr(struct sysdev_attribute *attr); |
294 | void spu_remove_sysdev_attr(struct sysdev_attribute *attr); | 276 | void spu_remove_sysdev_attr(struct sysdev_attribute *attr); |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 41520b7a7b76..d10e99bf5001 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -189,6 +189,9 @@ extern int mem_init_done; /* set on boot once kmalloc can be called */ | |||
189 | extern unsigned long memory_limit; | 189 | extern unsigned long memory_limit; |
190 | extern unsigned long klimit; | 190 | extern unsigned long klimit; |
191 | 191 | ||
192 | extern void *alloc_maybe_bootmem(size_t size, gfp_t mask); | ||
193 | extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); | ||
194 | |||
192 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ | 195 | extern int powersave_nap; /* set if nap mode can be used in idle loop */ |
193 | 196 | ||
194 | /* | 197 | /* |
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index c104c15c6625..fa331dad97cb 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -179,7 +179,7 @@ static inline unsigned int get_dec(void) | |||
179 | static inline void set_dec(int val) | 179 | static inline void set_dec(int val) |
180 | { | 180 | { |
181 | #if defined(CONFIG_40x) | 181 | #if defined(CONFIG_40x) |
182 | return; /* Have to let it auto-reload */ | 182 | mtspr(SPRN_PIT, val); |
183 | #elif defined(CONFIG_8xx_CPU6) | 183 | #elif defined(CONFIG_8xx_CPU6) |
184 | set_dec_cpu6(val); | 184 | set_dec_cpu6(val); |
185 | #else | 185 | #else |
diff --git a/include/asm-powerpc/tlb.h b/include/asm-powerpc/tlb.h index 66714042e438..e20ff7541f36 100644 --- a/include/asm-powerpc/tlb.h +++ b/include/asm-powerpc/tlb.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <asm/mmu.h> | 23 | #include <asm/mmu.h> |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #include <linux/pagemap.h> | ||
27 | |||
26 | struct mmu_gather; | 28 | struct mmu_gather; |
27 | 29 | ||
28 | #define tlb_start_vma(tlb, vma) do { } while (0) | 30 | #define tlb_start_vma(tlb, vma) do { } while (0) |
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h index 3b363757a2bb..a584341c87e3 100644 --- a/include/asm-powerpc/types.h +++ b/include/asm-powerpc/types.h | |||
@@ -48,7 +48,7 @@ typedef unsigned long long __u64; | |||
48 | 48 | ||
49 | typedef struct { | 49 | typedef struct { |
50 | __u32 u[4]; | 50 | __u32 u[4]; |
51 | } __attribute((aligned(16))) __vector128; | 51 | } __attribute__((aligned(16))) __vector128; |
52 | 52 | ||
53 | #endif /* __ASSEMBLY__ */ | 53 | #endif /* __ASSEMBLY__ */ |
54 | 54 | ||
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 3a0975e2adad..598d111e8098 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h | |||
@@ -63,7 +63,6 @@ struct vio_driver { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | extern struct dma_mapping_ops vio_dma_ops; | 65 | extern struct dma_mapping_ops vio_dma_ops; |
66 | extern struct bus_type vio_bus_type; | ||
67 | 66 | ||
68 | extern int vio_register_driver(struct vio_driver *drv); | 67 | extern int vio_register_driver(struct vio_driver *drv); |
69 | extern void vio_unregister_driver(struct vio_driver *drv); | 68 | extern void vio_unregister_driver(struct vio_driver *drv); |
diff --git a/include/asm-ppc/amigahw.h b/include/asm-ppc/amigahw.h deleted file mode 100644 index 90fd1274d727..000000000000 --- a/include/asm-ppc/amigahw.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | #ifndef __ASMPPC_AMIGAHW_H | ||
3 | #define __ASMPPC_AMIGAHW_H | ||
4 | |||
5 | #include <asm-m68k/amigahw.h> | ||
6 | |||
7 | #undef CHIP_PHYSADDR | ||
8 | #ifdef CONFIG_APUS_FAST_EXCEPT | ||
9 | #define CHIP_PHYSADDR (0x000000) | ||
10 | #else | ||
11 | #define CHIP_PHYSADDR (0x004000) | ||
12 | #endif | ||
13 | |||
14 | |||
15 | #endif /* __ASMPPC_AMIGAHW_H */ | ||
16 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc/amigaints.h b/include/asm-ppc/amigaints.h deleted file mode 100644 index aa3ff6349e81..000000000000 --- a/include/asm-ppc/amigaints.h +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | ** amigaints.h -- Amiga Linux interrupt handling structs and prototypes | ||
3 | ** | ||
4 | ** Copyright 1992 by Greg Harp | ||
5 | ** | ||
6 | ** This file is subject to the terms and conditions of the GNU General Public | ||
7 | ** License. See the file COPYING in the main directory of this archive | ||
8 | ** for more details. | ||
9 | ** | ||
10 | ** Created 10/2/92 by Greg Harp | ||
11 | */ | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #ifndef _ASMm68k_AMIGAINTS_H_ | ||
15 | #define _ASMm68k_AMIGAINTS_H_ | ||
16 | |||
17 | /* | ||
18 | ** Amiga Interrupt sources. | ||
19 | ** | ||
20 | */ | ||
21 | |||
22 | #define AUTO_IRQS (8) | ||
23 | #define AMI_STD_IRQS (14) | ||
24 | #define CIA_IRQS (5) | ||
25 | #define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */ | ||
26 | |||
27 | /* vertical blanking interrupt */ | ||
28 | #define IRQ_AMIGA_VERTB 0 | ||
29 | |||
30 | /* copper interrupt */ | ||
31 | #define IRQ_AMIGA_COPPER 1 | ||
32 | |||
33 | /* Audio interrupts */ | ||
34 | #define IRQ_AMIGA_AUD0 2 | ||
35 | #define IRQ_AMIGA_AUD1 3 | ||
36 | #define IRQ_AMIGA_AUD2 4 | ||
37 | #define IRQ_AMIGA_AUD3 5 | ||
38 | |||
39 | /* Blitter done interrupt */ | ||
40 | #define IRQ_AMIGA_BLIT 6 | ||
41 | |||
42 | /* floppy disk interrupts */ | ||
43 | #define IRQ_AMIGA_DSKSYN 7 | ||
44 | #define IRQ_AMIGA_DSKBLK 8 | ||
45 | |||
46 | /* builtin serial port interrupts */ | ||
47 | #define IRQ_AMIGA_RBF 9 | ||
48 | #define IRQ_AMIGA_TBE 10 | ||
49 | |||
50 | /* software interrupts */ | ||
51 | #define IRQ_AMIGA_SOFT 11 | ||
52 | |||
53 | /* interrupts from external hardware */ | ||
54 | #define IRQ_AMIGA_PORTS 12 | ||
55 | #define IRQ_AMIGA_EXTER 13 | ||
56 | |||
57 | /* CIA interrupt sources */ | ||
58 | #define IRQ_AMIGA_CIAA 14 | ||
59 | #define IRQ_AMIGA_CIAA_TA 14 | ||
60 | #define IRQ_AMIGA_CIAA_TB 15 | ||
61 | #define IRQ_AMIGA_CIAA_ALRM 16 | ||
62 | #define IRQ_AMIGA_CIAA_SP 17 | ||
63 | #define IRQ_AMIGA_CIAA_FLG 18 | ||
64 | #define IRQ_AMIGA_CIAB 19 | ||
65 | #define IRQ_AMIGA_CIAB_TA 19 | ||
66 | #define IRQ_AMIGA_CIAB_TB 20 | ||
67 | #define IRQ_AMIGA_CIAB_ALRM 21 | ||
68 | #define IRQ_AMIGA_CIAB_SP 22 | ||
69 | #define IRQ_AMIGA_CIAB_FLG 23 | ||
70 | |||
71 | /* auto-vector interrupts */ | ||
72 | #define IRQ_AMIGA_AUTO 24 | ||
73 | #define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */ | ||
74 | #define IRQ_AMIGA_AUTO_1 25 | ||
75 | #define IRQ_AMIGA_AUTO_2 26 | ||
76 | #define IRQ_AMIGA_AUTO_3 27 | ||
77 | #define IRQ_AMIGA_AUTO_4 28 | ||
78 | #define IRQ_AMIGA_AUTO_5 29 | ||
79 | #define IRQ_AMIGA_AUTO_6 30 | ||
80 | #define IRQ_AMIGA_AUTO_7 31 | ||
81 | |||
82 | #define IRQ_FLOPPY IRQ_AMIGA_DSKBLK | ||
83 | |||
84 | /* INTREQR masks */ | ||
85 | #define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */ | ||
86 | #define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */ | ||
87 | #define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */ | ||
88 | #define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */ | ||
89 | #define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */ | ||
90 | #define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */ | ||
91 | #define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */ | ||
92 | |||
93 | #define IF_SETCLR 0x8000 /* set/clr bit */ | ||
94 | #define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */ | ||
95 | #define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */ | ||
96 | #define IF_DSKSYN 0x1000 /* disk sync interrupt */ | ||
97 | #define IF_RBF 0x0800 /* serial receive buffer full interrupt */ | ||
98 | #define IF_AUD3 0x0400 /* audio channel 3 done interrupt */ | ||
99 | #define IF_AUD2 0x0200 /* audio channel 2 done interrupt */ | ||
100 | #define IF_AUD1 0x0100 /* audio channel 1 done interrupt */ | ||
101 | #define IF_AUD0 0x0080 /* audio channel 0 done interrupt */ | ||
102 | #define IF_BLIT 0x0040 /* blitter done interrupt */ | ||
103 | #define IF_VERTB 0x0020 /* vertical blanking interrupt */ | ||
104 | #define IF_COPER 0x0010 /* copper interrupt */ | ||
105 | #define IF_PORTS 0x0008 /* external level 2 and CIA A interrupt */ | ||
106 | #define IF_SOFT 0x0004 /* software initiated interrupt */ | ||
107 | #define IF_DSKBLK 0x0002 /* diskblock DMA finished */ | ||
108 | #define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */ | ||
109 | |||
110 | extern void amiga_do_irq(int irq, struct pt_regs *fp); | ||
111 | extern void amiga_do_irq_list(int irq, struct pt_regs *fp); | ||
112 | |||
113 | /* CIA interrupt control register bits */ | ||
114 | |||
115 | #define CIA_ICR_TA 0x01 | ||
116 | #define CIA_ICR_TB 0x02 | ||
117 | #define CIA_ICR_ALRM 0x04 | ||
118 | #define CIA_ICR_SP 0x08 | ||
119 | #define CIA_ICR_FLG 0x10 | ||
120 | #define CIA_ICR_ALL 0x1f | ||
121 | #define CIA_ICR_SETCLR 0x80 | ||
122 | |||
123 | /* to access the interrupt control registers of CIA's use only | ||
124 | ** these functions, they behave exactly like the amiga os routines | ||
125 | */ | ||
126 | |||
127 | extern struct ciabase ciaa_base, ciab_base; | ||
128 | |||
129 | extern unsigned char cia_set_irq(unsigned int irq, int set); | ||
130 | extern unsigned char cia_able_irq(unsigned int irq, int enable); | ||
131 | |||
132 | #endif /* asm-m68k/amigaints.h */ | ||
133 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc/amigappc.h b/include/asm-ppc/amigappc.h deleted file mode 100644 index 35114ce5135f..000000000000 --- a/include/asm-ppc/amigappc.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | ** asm-ppc/amigappc.h -- This header defines some values and pointers for | ||
3 | ** the Phase 5 PowerUp card. | ||
4 | ** | ||
5 | ** Copyright 1997, 1998 by Phase5, Germany. | ||
6 | ** | ||
7 | ** This file is subject to the terms and conditions of the GNU General Public | ||
8 | ** License. See the file COPYING in the main directory of this archive | ||
9 | ** for more details. | ||
10 | ** | ||
11 | ** Created: 7/22/97 by Jesper Skov | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef _M68K_AMIGAPPC_H | ||
16 | #define _M68K_AMIGAPPC_H | ||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
20 | /* #include <asm/system.h> */ | ||
21 | #define mb() __asm__ __volatile__ ("sync" : : : "memory") | ||
22 | |||
23 | #define APUS_WRITE(_a_, _v_) \ | ||
24 | do { \ | ||
25 | (*((volatile unsigned char *)(_a_)) = (_v_)); \ | ||
26 | mb(); \ | ||
27 | } while (0) | ||
28 | |||
29 | #define APUS_READ(_a_, _v_) \ | ||
30 | do { \ | ||
31 | (_v_) = (*((volatile unsigned char *)(_a_))); \ | ||
32 | mb(); \ | ||
33 | } while (0) | ||
34 | #endif /* ndef __ASSEMBLY__ */ | ||
35 | |||
36 | /* Maybe add a [#ifdef WANT_ZTWOBASE] condition to amigahw.h? */ | ||
37 | #define zTwoBase (0x80000000) | ||
38 | |||
39 | #define APUS_IPL_BASE (zTwoBase + 0x00f60000) | ||
40 | #define APUS_REG_RESET (APUS_IPL_BASE + 0x00) | ||
41 | #define APUS_REG_WAITSTATE (APUS_IPL_BASE + 0x10) | ||
42 | #define APUS_REG_SHADOW (APUS_IPL_BASE + 0x18) | ||
43 | #define APUS_REG_LOCK (APUS_IPL_BASE + 0x20) | ||
44 | #define APUS_REG_INT (APUS_IPL_BASE + 0x28) | ||
45 | #define APUS_IPL_EMU (APUS_IPL_BASE + 0x30) | ||
46 | #define APUS_INT_LVL (APUS_IPL_BASE + 0x38) | ||
47 | |||
48 | #define REGSHADOW_SETRESET (0x80) | ||
49 | #define REGSHADOW_SELFRESET (0x40) | ||
50 | |||
51 | #define REGLOCK_SETRESET (0x80) | ||
52 | #define REGLOCK_BLACKMAGICK1 (0x40) | ||
53 | #define REGLOCK_BLACKMAGICK2 (0x20) | ||
54 | #define REGLOCK_BLACKMAGICK3 (0x10) | ||
55 | |||
56 | #define REGWAITSTATE_SETRESET (0x80) | ||
57 | #define REGWAITSTATE_PPCW (0x08) | ||
58 | #define REGWAITSTATE_PPCR (0x04) | ||
59 | |||
60 | #define REGRESET_SETRESET (0x80) | ||
61 | #define REGRESET_PPCRESET (0x10) | ||
62 | #define REGRESET_M68KRESET (0x08) | ||
63 | #define REGRESET_AMIGARESET (0x04) | ||
64 | #define REGRESET_AUXRESET (0x02) | ||
65 | #define REGRESET_SCSIRESET (0x01) | ||
66 | |||
67 | #define REGINT_SETRESET (0x80) | ||
68 | #define REGINT_ENABLEIPL (0x02) | ||
69 | #define REGINT_INTMASTER (0x01) | ||
70 | |||
71 | #define IPLEMU_SETRESET (0x80) | ||
72 | #define IPLEMU_DISABLEINT (0x40) | ||
73 | #define IPLEMU_IPL2 (0x20) | ||
74 | #define IPLEMU_IPL1 (0x10) | ||
75 | #define IPLEMU_IPL0 (0x08) | ||
76 | #define IPLEMU_PPCIPL2 (0x04) | ||
77 | #define IPLEMU_PPCIPL1 (0x02) | ||
78 | #define IPLEMU_PPCIPL0 (0x01) | ||
79 | #define IPLEMU_IPLMASK (IPLEMU_PPCIPL2|IPLEMU_PPCIPL1|IPLEMU_PPCIPL0) | ||
80 | |||
81 | #define INTLVL_SETRESET (0x80) | ||
82 | #define INTLVL_MASK (0x7f) | ||
83 | |||
84 | #endif /* _M68k_AMIGAPPC_H */ | ||
85 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc/bootinfo.h b/include/asm-ppc/bootinfo.h index 2ace4a74f263..f6ed77aee328 100644 --- a/include/asm-ppc/bootinfo.h +++ b/include/asm-ppc/bootinfo.h | |||
@@ -11,10 +11,6 @@ | |||
11 | 11 | ||
12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
13 | 13 | ||
14 | #if defined(CONFIG_APUS) && !defined(__BOOTER__) | ||
15 | #include <asm-m68k/bootinfo.h> | ||
16 | #else | ||
17 | |||
18 | struct bi_record { | 14 | struct bi_record { |
19 | unsigned long tag; /* tag ID */ | 15 | unsigned long tag; /* tag ID */ |
20 | unsigned long size; /* size of record (in bytes) */ | 16 | unsigned long size; /* size of record (in bytes) */ |
@@ -44,7 +40,6 @@ bootinfo_addr(unsigned long offset) | |||
44 | return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1, | 40 | return (struct bi_record *)_ALIGN((offset) + (1 << 20) - 1, |
45 | (1 << 20)); | 41 | (1 << 20)); |
46 | } | 42 | } |
47 | #endif /* CONFIG_APUS */ | ||
48 | 43 | ||
49 | 44 | ||
50 | #endif /* _PPC_BOOTINFO_H */ | 45 | #endif /* _PPC_BOOTINFO_H */ |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 95d590423cf2..8f58231a8bc6 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/mpc8xx.h> | 30 | #include <asm/mpc8xx.h> |
31 | #elif defined(CONFIG_8260) | 31 | #elif defined(CONFIG_8260) |
32 | #include <asm/mpc8260.h> | 32 | #include <asm/mpc8260.h> |
33 | #elif defined(CONFIG_APUS) || !defined(CONFIG_PCI) | 33 | #elif !defined(CONFIG_PCI) |
34 | #define _IO_BASE 0 | 34 | #define _IO_BASE 0 |
35 | #define _ISA_MEM_BASE 0 | 35 | #define _ISA_MEM_BASE 0 |
36 | #define PCI_DRAM_OFFSET 0 | 36 | #define PCI_DRAM_OFFSET 0 |
@@ -145,24 +145,7 @@ static inline void writeb(__u8 b, volatile void __iomem *addr) | |||
145 | } | 145 | } |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | #if defined(CONFIG_APUS) | 148 | #if defined (CONFIG_8260_PCI9) |
149 | static inline __u16 readw(const volatile void __iomem *addr) | ||
150 | { | ||
151 | return *(__force volatile __u16 *)(addr); | ||
152 | } | ||
153 | static inline __u32 readl(const volatile void __iomem *addr) | ||
154 | { | ||
155 | return *(__force volatile __u32 *)(addr); | ||
156 | } | ||
157 | static inline void writew(__u16 b, volatile void __iomem *addr) | ||
158 | { | ||
159 | *(__force volatile __u16 *)(addr) = b; | ||
160 | } | ||
161 | static inline void writel(__u32 b, volatile void __iomem *addr) | ||
162 | { | ||
163 | *(__force volatile __u32 *)(addr) = b; | ||
164 | } | ||
165 | #elif defined (CONFIG_8260_PCI9) | ||
166 | /* Use macros if PCI9 workaround enabled */ | 149 | /* Use macros if PCI9 workaround enabled */ |
167 | #define readw(addr) in_le16((volatile u16 *)(addr)) | 150 | #define readw(addr) in_le16((volatile u16 *)(addr)) |
168 | #define readl(addr) in_le32((volatile u32 *)(addr)) | 151 | #define readl(addr) in_le32((volatile u32 *)(addr)) |
@@ -185,7 +168,7 @@ static inline void writel(__u32 b, volatile void __iomem *addr) | |||
185 | { | 168 | { |
186 | out_le32(addr, b); | 169 | out_le32(addr, b); |
187 | } | 170 | } |
188 | #endif /* CONFIG_APUS */ | 171 | #endif /* CONFIG_8260_PCI9 */ |
189 | 172 | ||
190 | #define readb_relaxed(addr) readb(addr) | 173 | #define readb_relaxed(addr) readb(addr) |
191 | #define readw_relaxed(addr) readw(addr) | 174 | #define readw_relaxed(addr) readw(addr) |
@@ -300,13 +283,7 @@ extern __inline__ void name(unsigned int val, unsigned int port) \ | |||
300 | } | 283 | } |
301 | 284 | ||
302 | __do_out_asm(outb, "stbx") | 285 | __do_out_asm(outb, "stbx") |
303 | #ifdef CONFIG_APUS | 286 | #if defined (CONFIG_8260_PCI9) |
304 | __do_in_asm(inb, "lbzx") | ||
305 | __do_in_asm(inw, "lhz%U1%X1") | ||
306 | __do_in_asm(inl, "lwz%U1%X1") | ||
307 | __do_out_asm(outl,"stw%U0%X0") | ||
308 | __do_out_asm(outw, "sth%U0%X0") | ||
309 | #elif defined (CONFIG_8260_PCI9) | ||
310 | /* in asm cannot be defined if PCI9 workaround is used */ | 287 | /* in asm cannot be defined if PCI9 workaround is used */ |
311 | #define inb(port) in_8((port)+___IO_BASE) | 288 | #define inb(port) in_8((port)+___IO_BASE) |
312 | #define inw(port) in_le16((port)+___IO_BASE) | 289 | #define inw(port) in_le16((port)+___IO_BASE) |
@@ -371,7 +348,6 @@ extern void __iomem *ioremap64(unsigned long long address, unsigned long size); | |||
371 | #define ioremap_nocache(addr, size) ioremap((addr), (size)) | 348 | #define ioremap_nocache(addr, size) ioremap((addr), (size)) |
372 | extern void iounmap(volatile void __iomem *addr); | 349 | extern void iounmap(volatile void __iomem *addr); |
373 | extern unsigned long iopa(unsigned long addr); | 350 | extern unsigned long iopa(unsigned long addr); |
374 | extern unsigned long mm_ptov(unsigned long addr) __attribute_const__; | ||
375 | extern void io_block_mapping(unsigned long virt, phys_addr_t phys, | 351 | extern void io_block_mapping(unsigned long virt, phys_addr_t phys, |
376 | unsigned int size, int flags); | 352 | unsigned int size, int flags); |
377 | 353 | ||
@@ -384,24 +360,16 @@ extern void io_block_mapping(unsigned long virt, phys_addr_t phys, | |||
384 | */ | 360 | */ |
385 | extern inline unsigned long virt_to_bus(volatile void * address) | 361 | extern inline unsigned long virt_to_bus(volatile void * address) |
386 | { | 362 | { |
387 | #ifndef CONFIG_APUS | ||
388 | if (address == (void *)0) | 363 | if (address == (void *)0) |
389 | return 0; | 364 | return 0; |
390 | return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET; | 365 | return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET; |
391 | #else | ||
392 | return iopa ((unsigned long) address); | ||
393 | #endif | ||
394 | } | 366 | } |
395 | 367 | ||
396 | extern inline void * bus_to_virt(unsigned long address) | 368 | extern inline void * bus_to_virt(unsigned long address) |
397 | { | 369 | { |
398 | #ifndef CONFIG_APUS | ||
399 | if (address == 0) | 370 | if (address == 0) |
400 | return NULL; | 371 | return NULL; |
401 | return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE); | 372 | return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE); |
402 | #else | ||
403 | return (void*) mm_ptov (address); | ||
404 | #endif | ||
405 | } | 373 | } |
406 | 374 | ||
407 | /* | 375 | /* |
@@ -410,20 +378,12 @@ extern inline void * bus_to_virt(unsigned long address) | |||
410 | */ | 378 | */ |
411 | extern inline unsigned long virt_to_phys(volatile void * address) | 379 | extern inline unsigned long virt_to_phys(volatile void * address) |
412 | { | 380 | { |
413 | #ifndef CONFIG_APUS | ||
414 | return (unsigned long) address - KERNELBASE; | 381 | return (unsigned long) address - KERNELBASE; |
415 | #else | ||
416 | return iopa ((unsigned long) address); | ||
417 | #endif | ||
418 | } | 382 | } |
419 | 383 | ||
420 | extern inline void * phys_to_virt(unsigned long address) | 384 | extern inline void * phys_to_virt(unsigned long address) |
421 | { | 385 | { |
422 | #ifndef CONFIG_APUS | ||
423 | return (void *) (address + KERNELBASE); | 386 | return (void *) (address + KERNELBASE); |
424 | #else | ||
425 | return (void*) mm_ptov (address); | ||
426 | #endif | ||
427 | } | 387 | } |
428 | 388 | ||
429 | /* | 389 | /* |
@@ -553,4 +513,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
553 | #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) | 513 | #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) |
554 | #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) | 514 | #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) |
555 | 515 | ||
516 | #define setbits8(_addr, _v) out_8((_addr), in_8(_addr) | (_v)) | ||
517 | #define clrbits8(_addr, _v) out_8((_addr), in_8(_addr) & ~(_v)) | ||
518 | |||
556 | #endif /* __KERNEL__ */ | 519 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h index 293a444a1d77..a20b499b0186 100644 --- a/include/asm-ppc/machdep.h +++ b/include/asm-ppc/machdep.h | |||
@@ -8,10 +8,6 @@ | |||
8 | #include <asm/setup.h> | 8 | #include <asm/setup.h> |
9 | #include <asm/page.h> | 9 | #include <asm/page.h> |
10 | 10 | ||
11 | #ifdef CONFIG_APUS | ||
12 | #include <asm-m68k/machdep.h> | ||
13 | #endif | ||
14 | |||
15 | struct pt_regs; | 11 | struct pt_regs; |
16 | struct pci_bus; | 12 | struct pci_bus; |
17 | struct pci_dev; | 13 | struct pci_dev; |
diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h index 16dbc7d17450..1379a4f76de3 100644 --- a/include/asm-ppc/ocp.h +++ b/include/asm-ppc/ocp.h | |||
@@ -27,10 +27,10 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/device.h> | 29 | #include <linux/device.h> |
30 | #include <linux/rwsem.h> | ||
30 | 31 | ||
31 | #include <asm/mmu.h> | 32 | #include <asm/mmu.h> |
32 | #include <asm/ocp_ids.h> | 33 | #include <asm/ocp_ids.h> |
33 | #include <asm/rwsem.h> | ||
34 | #include <asm/semaphore.h> | 34 | #include <asm/semaphore.h> |
35 | 35 | ||
36 | #ifdef CONFIG_PPC_OCP | 36 | #ifdef CONFIG_PPC_OCP |
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h index fe95c8258cf9..ad4c5a1bc9d6 100644 --- a/include/asm-ppc/page.h +++ b/include/asm-ppc/page.h | |||
@@ -97,62 +97,22 @@ extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg); | |||
97 | extern void copy_user_page(void *to, void *from, unsigned long vaddr, | 97 | extern void copy_user_page(void *to, void *from, unsigned long vaddr, |
98 | struct page *pg); | 98 | struct page *pg); |
99 | 99 | ||
100 | #ifndef CONFIG_APUS | ||
101 | #define PPC_MEMSTART 0 | 100 | #define PPC_MEMSTART 0 |
102 | #define PPC_PGSTART 0 | ||
103 | #define PPC_MEMOFFSET PAGE_OFFSET | 101 | #define PPC_MEMOFFSET PAGE_OFFSET |
104 | #else | ||
105 | extern unsigned long ppc_memstart; | ||
106 | extern unsigned long ppc_pgstart; | ||
107 | extern unsigned long ppc_memoffset; | ||
108 | #define PPC_MEMSTART ppc_memstart | ||
109 | #define PPC_PGSTART ppc_pgstart | ||
110 | #define PPC_MEMOFFSET ppc_memoffset | ||
111 | #endif | ||
112 | 102 | ||
113 | #if defined(CONFIG_APUS) && !defined(MODULE) | ||
114 | /* map phys->virtual and virtual->phys for RAM pages */ | ||
115 | static inline unsigned long ___pa(unsigned long v) | ||
116 | { | ||
117 | unsigned long p; | ||
118 | asm volatile ("1: addis %0, %1, %2;" | ||
119 | ".section \".vtop_fixup\",\"aw\";" | ||
120 | ".align 1;" | ||
121 | ".long 1b;" | ||
122 | ".previous;" | ||
123 | : "=r" (p) | ||
124 | : "b" (v), "K" (((-PAGE_OFFSET) >> 16) & 0xffff)); | ||
125 | |||
126 | return p; | ||
127 | } | ||
128 | static inline void* ___va(unsigned long p) | ||
129 | { | ||
130 | unsigned long v; | ||
131 | asm volatile ("1: addis %0, %1, %2;" | ||
132 | ".section \".ptov_fixup\",\"aw\";" | ||
133 | ".align 1;" | ||
134 | ".long 1b;" | ||
135 | ".previous;" | ||
136 | : "=r" (v) | ||
137 | : "b" (p), "K" (((PAGE_OFFSET) >> 16) & 0xffff)); | ||
138 | |||
139 | return (void*) v; | ||
140 | } | ||
141 | #else | ||
142 | #define ___pa(vaddr) ((vaddr)-PPC_MEMOFFSET) | 103 | #define ___pa(vaddr) ((vaddr)-PPC_MEMOFFSET) |
143 | #define ___va(paddr) ((paddr)+PPC_MEMOFFSET) | 104 | #define ___va(paddr) ((paddr)+PPC_MEMOFFSET) |
144 | #endif | ||
145 | 105 | ||
146 | extern int page_is_ram(unsigned long pfn); | 106 | extern int page_is_ram(unsigned long pfn); |
147 | 107 | ||
148 | #define __pa(x) ___pa((unsigned long)(x)) | 108 | #define __pa(x) ___pa((unsigned long)(x)) |
149 | #define __va(x) ((void *)(___va((unsigned long)(x)))) | 109 | #define __va(x) ((void *)(___va((unsigned long)(x)))) |
150 | 110 | ||
151 | #define ARCH_PFN_OFFSET (PPC_PGSTART) | 111 | #define ARCH_PFN_OFFSET 0 |
152 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 112 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
153 | #define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT) | 113 | #define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT) |
154 | 114 | ||
155 | #define pfn_valid(pfn) (((pfn) - PPC_PGSTART) < max_mapnr) | 115 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
156 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 116 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
157 | 117 | ||
158 | /* Pure 2^n version of get_order */ | 118 | /* Pure 2^n version of get_order */ |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index c159315d2c8f..063ad91cbbcc 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -765,14 +765,6 @@ extern void paging_init(void); | |||
765 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) | 765 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) |
766 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) | 766 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) |
767 | 767 | ||
768 | /* CONFIG_APUS */ | ||
769 | /* For virtual address to physical address conversion */ | ||
770 | extern void cache_clear(__u32 addr, int length); | ||
771 | extern void cache_push(__u32 addr, int length); | ||
772 | extern int mm_end_of_chunk (unsigned long addr, int len); | ||
773 | extern unsigned long iopa(unsigned long addr); | ||
774 | extern unsigned long mm_ptov(unsigned long addr) __attribute_const__; | ||
775 | |||
776 | /* Values for nocacheflag and cmode */ | 768 | /* Values for nocacheflag and cmode */ |
777 | /* These are not used by the APUS kernel_map, but prevents | 769 | /* These are not used by the APUS kernel_map, but prevents |
778 | compilation errors. */ | 770 | compilation errors. */ |
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h index 901f7fa8b2d7..71f4c996fe75 100644 --- a/include/asm-ppc/prom.h +++ b/include/asm-ppc/prom.h | |||
@@ -35,7 +35,6 @@ extern unsigned long sub_reloc_offset(unsigned long); | |||
35 | #define machine_is_compatible(x) 0 | 35 | #define machine_is_compatible(x) 0 |
36 | #define of_find_compatible_node(f, t, c) NULL | 36 | #define of_find_compatible_node(f, t, c) NULL |
37 | #define of_get_property(p, n, l) NULL | 37 | #define of_get_property(p, n, l) NULL |
38 | #define get_property(a, b, c) of_get_property((a), (b), (c)) | ||
39 | 38 | ||
40 | #endif /* _PPC_PROM_H */ | 39 | #endif /* _PPC_PROM_H */ |
41 | #endif /* __KERNEL__ */ | 40 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 8b17ffe222c4..d2da84acf45d 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -389,12 +389,14 @@ extern Elf64_Dyn _DYNAMIC []; | |||
389 | 389 | ||
390 | #endif | 390 | #endif |
391 | 391 | ||
392 | /* Optional callbacks to write extra ELF notes. */ | ||
392 | #ifndef ARCH_HAVE_EXTRA_ELF_NOTES | 393 | #ifndef ARCH_HAVE_EXTRA_ELF_NOTES |
393 | static inline int arch_notes_size(void) { return 0; } | 394 | static inline int elf_coredump_extra_notes_size(void) { return 0; } |
394 | static inline void arch_write_notes(struct file *file) { } | 395 | static inline int elf_coredump_extra_notes_write(struct file *file, |
395 | 396 | loff_t *foffset) { return 0; } | |
396 | #define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size() | 397 | #else |
397 | #define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file) | 398 | extern int elf_coredump_extra_notes_size(void); |
398 | #endif /* ARCH_HAVE_EXTRA_ELF_NOTES */ | 399 | extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); |
400 | #endif | ||
399 | 401 | ||
400 | #endif /* _LINUX_ELF_H */ | 402 | #endif /* _LINUX_ELF_H */ |
diff --git a/include/linux/of.h b/include/linux/of.h index 47734ffd9745..6df80e985914 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -54,7 +54,6 @@ extern int of_device_is_compatible(const struct device_node *device, | |||
54 | extern const void *of_get_property(const struct device_node *node, | 54 | extern const void *of_get_property(const struct device_node *node, |
55 | const char *name, | 55 | const char *name, |
56 | int *lenp); | 56 | int *lenp); |
57 | #define get_property(a, b, c) of_get_property((a), (b), (c)) | ||
58 | extern int of_n_addr_cells(struct device_node *np); | 57 | extern int of_n_addr_cells(struct device_node *np); |
59 | extern int of_n_size_cells(struct device_node *np); | 58 | extern int of_n_size_cells(struct device_node *np); |
60 | 59 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 55f307ffbf96..545f24ce2638 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2100,6 +2100,8 @@ | |||
2100 | #define PCI_DEVICE_ID_MPC8533 0x0031 | 2100 | #define PCI_DEVICE_ID_MPC8533 0x0031 |
2101 | #define PCI_DEVICE_ID_MPC8544E 0x0032 | 2101 | #define PCI_DEVICE_ID_MPC8544E 0x0032 |
2102 | #define PCI_DEVICE_ID_MPC8544 0x0033 | 2102 | #define PCI_DEVICE_ID_MPC8544 0x0033 |
2103 | #define PCI_DEVICE_ID_MPC8572E 0x0040 | ||
2104 | #define PCI_DEVICE_ID_MPC8572 0x0041 | ||
2103 | #define PCI_DEVICE_ID_MPC8641 0x7010 | 2105 | #define PCI_DEVICE_ID_MPC8641 0x7010 |
2104 | #define PCI_DEVICE_ID_MPC8641D 0x7011 | 2106 | #define PCI_DEVICE_ID_MPC8641D 0x7011 |
2105 | 2107 | ||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 495863a500cd..39fc6ae173b9 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -167,7 +167,7 @@ config SLUB_DEBUG_ON | |||
167 | 167 | ||
168 | config DEBUG_PREEMPT | 168 | config DEBUG_PREEMPT |
169 | bool "Debug preemptible kernel" | 169 | bool "Debug preemptible kernel" |
170 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT | 170 | depends on DEBUG_KERNEL && PREEMPT && (TRACE_IRQFLAGS_SUPPORT || PPC64) |
171 | default y | 171 | default y |
172 | help | 172 | help |
173 | If you say Y here then the kernel will use a debug variant of the | 173 | If you say Y here then the kernel will use a debug variant of the |