openwrt/staging/blogic.git
17 years ago[POWERPC] fsl_soc: Fix trivial printk typo.
Peter Korsgaard [Thu, 20 Sep 2007 10:42:12 +0000 (12:42 +0200)]
[POWERPC] fsl_soc: Fix trivial printk typo.

Fix a trivial printk typo in fsl_soc.

Cc: G. Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: Move softemu8xx.c from arch/ppc
Scott Wood [Tue, 18 Sep 2007 20:29:35 +0000 (15:29 -0500)]
[POWERPC] 8xx: Move softemu8xx.c from arch/ppc

Previously, Soft_emulate_8xx was called with no implementation, resulting in
build failures whenever building 8xx without math emulation.  The
implementation is copied from arch/ppc to resolve this issue.

However, this sort of minimal emulation is not a very good idea other than
for compatibility with existing userspaces, as it's less efficient than
soft-float and can mislead users into believing they have soft-float.  Thus,
it is made a configurable option, off by default.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] bootwrapper: adds cuboot for MPC7448HPC2 platform
Roy Zang [Mon, 24 Sep 2007 10:31:55 +0000 (18:31 +0800)]
[POWERPC] bootwrapper: adds cuboot for MPC7448HPC2 platform

This patch adds cuboot support for MPC7448HPC2 platform.
The cuImage can be used with legacy u-boot without FDT support.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] mpc82xx: Add pq2fads board support.
Scott Wood [Wed, 5 Sep 2007 19:00:54 +0000 (14:00 -0500)]
[POWERPC] mpc82xx: Add pq2fads board support.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] mpc82xx: Update mpc8272ads, and factor out PCI and reset.
Scott Wood [Fri, 14 Sep 2007 20:41:56 +0000 (15:41 -0500)]
[POWERPC] mpc82xx: Update mpc8272ads, and factor out PCI and reset.

1. PCI and reset are factored out into pq2.c.  I renamed them from m82xx
to pq2 because they won't work on the Integrated Host Processor line of
82xx chips (i.e. 8240, 8245, and such).

2. The PCI PIC, which is nominally board-specific, is used on multiple
boards, and thus is used into pq2ads-pci-pic.c.

3. The new CPM binding is used.

4. General cleanup.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx/wrapper: Embedded Planet EP88xC support
Scott Wood [Fri, 14 Sep 2007 19:58:25 +0000 (14:58 -0500)]
[POWERPC] 8xx/wrapper: Embedded Planet EP88xC support

This board is also resold by Freescale under the names
"QUICCStart MPC885 Evaluation System" and "CWH-PPC-885XN-VE".

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: mpc885ads cleanup
Scott Wood [Fri, 14 Sep 2007 19:38:16 +0000 (14:38 -0500)]
[POWERPC] 8xx: mpc885ads cleanup

It now uses the new CPM binding and the generic pin/clock functions, and
has assorted fixes and cleanup.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Document local bus nodes in the device tree, and update cuboot-pq2.
Scott Wood [Fri, 14 Sep 2007 18:24:02 +0000 (13:24 -0500)]
[POWERPC] Document local bus nodes in the device tree, and update cuboot-pq2.

The localbus node is used to describe devices that are connected via a chip
select or similar mechanism.  The advantages over placing the devices under
the root node are that it can be probed without probing other random things
under the root, and that the description of which chip select a given device
uses can be used to set up mappings if the firmware failed to do so in a
useful manner.

cuboot-pq2 is updated to match the binding; previously, it called itself
chipselect rather than localbus, and used phandle linkage between the
actual bus node and the control node (the current agreement is to simply use
the fully-qualified address of the control registers, and ignore the overlap
with the IMMR node).

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] mpc8272ads: Change references from 82xx_ADS to 8272_ADS.
Scott Wood [Thu, 26 Jul 2007 18:52:28 +0000 (13:52 -0500)]
[POWERPC] mpc8272ads: Change references from 82xx_ADS to 8272_ADS.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] mpc82xx: Rename mpc82xx_ads to mpc8272_ads.
Scott Wood [Thu, 26 Jul 2007 18:51:42 +0000 (13:51 -0500)]
[POWERPC] mpc82xx: Rename mpc82xx_ads to mpc8272_ads.

This is just a rename patch; internal references to mpc82xx_ads will be
changed in the next one.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] mpc82xx: Remove a bunch of cruft that duplicates generic functionality.
Scott Wood [Mon, 27 Aug 2007 21:56:43 +0000 (16:56 -0500)]
[POWERPC] mpc82xx: Remove a bunch of cruft that duplicates generic functionality.

m82xx_calibrate_decr(), mpc82xx_ads_show_cpuinfo(), and mpc82xx_halt() do
anything useful beyond what the generic code does.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] mpc82xx: Define CPU_FTR_NEED_COHERENT
Scott Wood [Fri, 14 Sep 2007 20:32:14 +0000 (15:32 -0500)]
[POWERPC] mpc82xx: Define CPU_FTR_NEED_COHERENT

The 8272 (and presumably other PCI PQ2 chips) appear to have the
same issue as the 83xx regarding PCI streaming DMA.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm2: Add cpm2_set_pin().
Scott Wood [Mon, 16 Jul 2007 18:32:24 +0000 (13:32 -0500)]
[POWERPC] cpm2: Add cpm2_set_pin().

This provides a generic way for board code to set up CPM pins, rather
than directly poking magic values into registers.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm2: Add SCCs to cpm2_clk_setup(), and cpm2_smc_clk_setup().
Scott Wood [Mon, 16 Jul 2007 18:26:35 +0000 (13:26 -0500)]
[POWERPC] cpm2: Add SCCs to cpm2_clk_setup(), and cpm2_smc_clk_setup().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm2: Infrastructure code cleanup.
Scott Wood [Fri, 14 Sep 2007 20:30:44 +0000 (15:30 -0500)]
[POWERPC] cpm2: Infrastructure code cleanup.

Mostly sparse fixes (__iomem annotations, etc); also, cpm2_immr
is used rather than creating many temporary mappings.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: Set initial memory limit.
John Traill [Tue, 17 Jul 2007 01:17:23 +0000 (05:17 +0400)]
[POWERPC] 8xx: Set initial memory limit.

The 8xx can only support a max of 8M during early boot (it seems a lot of
8xx boards only have 8M so the bug was never triggered), but the early
allocator isn't aware of this.  The following change makes it able to run
with larger memory.

Signed-off-by: John Traill <john.traill@freescale.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: Work around CPU15 erratum.
Scott Wood [Mon, 25 Jun 2007 19:50:41 +0000 (14:50 -0500)]
[POWERPC] 8xx: Work around CPU15 erratum.

The CPU15 erratum on MPC8xx chips can cause incorrect code execution
under certain circumstances, where there is a conditional or indirect
branch in the last word of a page, with a target in the last cache line
of the next page.  This patch implements one of the suggested
workarounds, by forcing a TLB miss whenever execution crosses a page
boundary.  This is done by invalidating the pages before and after the
one being loaded into the TLB in the ITLB miss handler.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: Add pin and clock setting functions.
Scott Wood [Mon, 16 Jul 2007 22:22:01 +0000 (17:22 -0500)]
[POWERPC] 8xx: Add pin and clock setting functions.

These let board code set up pins and clocks without having to
put magic numbers directly into the registers.

The clock function is mostly duplicated from the cpm2 version;
hopefully this stuff can be merged at some point.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: Infrastructure code cleanup.
Scott Wood [Fri, 14 Sep 2007 19:22:36 +0000 (14:22 -0500)]
[POWERPC] 8xx: Infrastructure code cleanup.

1. Keep a global mpc8xx_immr mapping, rather than constantly
creating temporary mappings.
2. Look for new fsl,cpm1 and fsl,cpm1-pic names.
3. Always reset the CPM when not using the udbg console;
this is required in case the firmware initialized a device
that is incompatible with one that the kernel is about to
use.
4. Remove some superfluous casts and header includes.
5. Change a usage of IMAP_ADDR to get_immrbase().
6. Use phys_addr_t, not uint, for dpram_pbase.
7. Various sparse-related fixes, such as __iomem annotations.
8. Remove mpc8xx_show_cpuinfo, which doesn't provide anything
useful beyond the generic cpuinfo handler.
9. Move prototypes for 8xx support functions from board files
to sysdev/commproc.h.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 8xx: Fix CONFIG_PIN_TLB.
Scott Wood [Mon, 16 Jul 2007 16:28:18 +0000 (11:28 -0500)]
[POWERPC] 8xx: Fix CONFIG_PIN_TLB.

1. Move CONSISTENT_START on 8xx so that it doesn't overlap the IMMR mapping.
2. The wrong register was being loaded into SPRN_MD_RPN.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm_uart: Issue STOP_TX command before initializing console.
Scott Wood [Tue, 17 Jul 2007 23:09:33 +0000 (18:09 -0500)]
[POWERPC] cpm_uart: Issue STOP_TX command before initializing console.

This prevents some bootloader/bootwrapper characters from being lost.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm_uart: sparse fixes
Scott Wood [Tue, 24 Jul 2007 20:53:07 +0000 (15:53 -0500)]
[POWERPC] cpm_uart: sparse fixes

Mostly a bunch of direct access to in/out conversions, plus a few
cast removals, __iomem annotations, and miscellaneous cleanup.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] cpm_uart: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.
Scott Wood [Tue, 17 Jul 2007 22:59:06 +0000 (17:59 -0500)]
[POWERPC] cpm_uart: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.

The existing OF glue code was crufty and broken.  Rather than fix it,
it has been removed, and the serial driver now talks to the device tree
directly.

The non-CONFIG_PPC_CPM_NEW_BINDING code can go away once CPM platforms
are dropped from arch/ppc (which will hopefully be soon), and existing
arch/powerpc boards that I wasn't able to test on for this patchset get
converted (which should be even sooner).

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] bootwrapper: Use fsl_get_immr() in cuboot-pq2.c.
Scott Wood [Fri, 31 Aug 2007 22:18:28 +0000 (17:18 -0500)]
[POWERPC] bootwrapper: Use fsl_get_immr() in cuboot-pq2.c.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] bootwrapper: Add fsl_get_immr() and 8xx/pq2 clock functions.
Scott Wood [Mon, 27 Aug 2007 18:46:38 +0000 (13:46 -0500)]
[POWERPC] bootwrapper: Add fsl_get_immr() and 8xx/pq2 clock functions.

fsl_get_immr() uses /soc/ranges to determine the immr.

mpc885_get_clock() transforms a crystal frequency into a system frequency
according to the PLL register settings.

pq2_get_clocks() does the same as the above for the PowerQUICC II,
except that it produces several different clocks.

The mpc8xx/pq2 set_clocks() functions modify common properties in
the device tree based on the given clock data.

The mpc885/pq2 fixup_clocks() functions call get_clocks(), and
pass the results to set_clocks().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] bootwrapper: Support all-in-one PCI nodes in cuboot-pq2.
Scott Wood [Thu, 30 Aug 2007 17:06:21 +0000 (12:06 -0500)]
[POWERPC] bootwrapper: Support all-in-one PCI nodes in cuboot-pq2.

Consensus was reached to put PCI nodes at the root of the tree (and not
under /soc), but the phandle to a control node was rejected in favor of
simply not worrying about /pci/reg overlapping /soc/ranges.

This updates cuboot-82xx to not look for the phandle.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Add early debug console for CPM serial ports.
Scott Wood [Mon, 16 Jul 2007 16:43:43 +0000 (11:43 -0500)]
[POWERPC] Add early debug console for CPM serial ports.

This code assumes that the ports have been previously set up, with
buffers in DPRAM.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Introduce new CPM device bindings.
Scott Wood [Fri, 14 Sep 2007 18:04:54 +0000 (13:04 -0500)]
[POWERPC] Introduce new CPM device bindings.

This introduces a new device binding for the CPM and other devices on
these boards.  Some of the changes include:

1. Proper namespace scoping for Freescale compatibles and properties.

2. Use compatible rather than things like device_type and model
to determine which particular variant of a device is present.

3. Give the drivers the relevant CPM command word directly, rather than
requiring it to have a lookup table based on device-id, SCC v. SMC, and
CPM version.

4. Specify the CPCR and the usable DPRAM region in the CPM's reg property.

Boards that do not require the legacy bindings should select
CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
all existing boards are converted and tested, the config option can
become default y to prevent new boards from using the old model.  Once
arch/ppc is gone, the config option can be removed altogether.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] CPM: Change from fsl,brg-frequency to brg/clock-frequency
Scott Wood [Wed, 29 Aug 2007 20:08:40 +0000 (15:08 -0500)]
[POWERPC] CPM: Change from fsl,brg-frequency to brg/clock-frequency

As suggested by David Gibson, now that we have a separate node
for the baud rate generators, it's better to use the standard
clock-frequency property than a cpm-node-level fsl,brg-frequency
property.

This patch updates existing places where fsl,brg-frequency is
used.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[PPC] Use cpu setup routines from cpu_setup_44x.S for ARCH=ppc
Paul Mackerras [Thu, 4 Oct 2007 01:02:09 +0000 (11:02 +1000)]
[PPC] Use cpu setup routines from cpu_setup_44x.S for ARCH=ppc

Commit 8112753bb2c0045398c89d0647792b39805f6d40 made 44x in
ARCH=powerpc builds use cpu setup routines in cpu_setup_44x.S,
but didn't make a similar change for ARCH=ppc, and consequently
the ARCH=ppc builds fail with undefined symbols (since both use
the same cputable.c).

This fixes it by including cpu_setup_44x.S in the ARCH=ppc builds,
and by taking out the now-redundant FPU initialization in
arch/ppc/kernel/head_44x.S.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Uartlite: Revert register io access changes
Grant Likely [Tue, 2 Oct 2007 16:47:02 +0000 (02:47 +1000)]
[POWERPC] Uartlite: Revert register io access changes

Reverts commit a15da8eff3627b8368db7f5dd260e5643213d918

This driver is used by devices other than the xilinx opb-uartlite which
depend on bytewise access to the registers.  The change to 32 bit access
does not work on these devices.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Add macros for register names
Grant Likely [Tue, 2 Oct 2007 16:44:15 +0000 (02:44 +1000)]
[POWERPC] Uartlite: Add macros for register names

Add macros to define register names to improve readability.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Setup default eth addr in embed_config for Xilinx Virtex platforms
Grant Likely [Sun, 30 Sep 2007 21:47:05 +0000 (07:47 +1000)]
[POWERPC] Setup default eth addr in embed_config for Xilinx Virtex platforms

This simply adds the boilerplate default Ethernet address to embed_config
for the Xilinx platform (bug fix).

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] XilinxFB: Move xilinxfb_platform_data definition to a shared header file
Grant Likely [Sun, 30 Sep 2007 21:47:00 +0000 (07:47 +1000)]
[POWERPC] XilinxFB: Move xilinxfb_platform_data definition to a shared header file

XilnixFB can be used by more than just arch/ppc.  Move the data structure
definition into include/linux/xilinxfb.h so it can be used by microblaze
and arch/powerpc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Flush RX fifo in bootwrapper
Grant Likely [Sun, 30 Sep 2007 21:46:55 +0000 (07:46 +1000)]
[POWERPC] Uartlite: Flush RX fifo in bootwrapper

Flush the uartlite RX fifo so that characters typed before entry into
the zImage wrapper do not muck up the kernel command line.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Add treeImage to .gitignore
Josh Boyer [Tue, 2 Oct 2007 12:33:22 +0000 (07:33 -0500)]
[POWERPC] Add treeImage to .gitignore

Tell git to ignore the generated treeImage.* files in arch/powerpc/boot

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Let the console be initialized earlier
Grant Likely [Tue, 2 Oct 2007 02:16:09 +0000 (12:16 +1000)]
[POWERPC] Uartlite: Let the console be initialized earlier

By configuring it earlier we get console output sooner which is helpful
for debugging when the kernel crashes before the serial drivers are
initialized.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Add of-platform-bus binding
Grant Likely [Tue, 2 Oct 2007 02:16:04 +0000 (12:16 +1000)]
[POWERPC] Uartlite: Add of-platform-bus binding

Add of_platform bus binding so this driver can be used with arch/powerpc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Comment block tidy
Grant Likely [Tue, 2 Oct 2007 02:15:59 +0000 (12:15 +1000)]
[POWERPC] Uartlite: Comment block tidy

Tidy the comments to split the driver into logical section; the main driver,
the console driver, the platform bus binding, and module initialization
and teardown.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Separate the bus binding from the driver proper
Grant Likely [Tue, 2 Oct 2007 02:15:54 +0000 (12:15 +1000)]
[POWERPC] Uartlite: Separate the bus binding from the driver proper

Separate the bus binding code from the driver structure allocation code in
preparation for adding the of_platform_bus bindings needed by arch/powerpc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Add macro for uartlite device name
Grant Likely [Tue, 2 Oct 2007 02:15:49 +0000 (12:15 +1000)]
[POWERPC] Uartlite: Add macro for uartlite device name

Changed to make the following OF_platform bus binding patch a wee bit cleaner

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: change name of ports to ulite_ports
Grant Likely [Tue, 2 Oct 2007 02:15:44 +0000 (12:15 +1000)]
[POWERPC] Uartlite: change name of ports to ulite_ports

Changed to match naming convention used in the rest of the module

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Uartlite: Fix reg io to access documented register size
Grant Likely [Tue, 2 Oct 2007 02:15:39 +0000 (12:15 +1000)]
[POWERPC] Uartlite: Fix reg io to access documented register size

The Uartlite data sheet defines the registers as 32 bit wide.  This
patch changes the register access to use 32 bit transfers and eliminates
the magic +3 offset which is currently required to make the device
work.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: John Williams <jwilliams@itee.uq.edu.au>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Add PowerPC Xilinx Virtex entry to maintainers
Grant Likely [Tue, 2 Oct 2007 02:15:34 +0000 (12:15 +1000)]
[POWERPC] Add PowerPC Xilinx Virtex entry to maintainers

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Virtex: Add generic Xilinx Virtex board support
Grant Likely [Tue, 2 Oct 2007 02:15:29 +0000 (12:15 +1000)]
[POWERPC] Virtex: Add generic Xilinx Virtex board support

Adds support for generic Xilinx Virtex boards.  Any board which specifies
"xilinx,virtex" in the compatible property will make use of this board
support.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Virtex: add xilinx interrupt controller driver
Grant Likely [Tue, 2 Oct 2007 02:15:23 +0000 (12:15 +1000)]
[POWERPC] Virtex: add xilinx interrupt controller driver

Adds support for the Xilinx opb-intc interrupt controller

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Virtex: Add Kconfig macros for Xilinx Virtex board support
Grant Likely [Tue, 2 Oct 2007 02:15:18 +0000 (12:15 +1000)]
[POWERPC] Virtex: Add Kconfig macros for Xilinx Virtex board support

Add the needed kconfig macros to enable Xilinx Virtex board support

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Virtex: Add uartlite bootwrapper driver
Grant Likely [Tue, 2 Oct 2007 02:15:13 +0000 (12:15 +1000)]
[POWERPC] Virtex: Add uartlite bootwrapper driver

Allows the bootwrapper to use the uartlite device for console output.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] 4xx: 440EPx/GRx incorrect write to DDR SDRAM errata workaround
Valentine Barshak [Fri, 21 Sep 2007 14:50:09 +0000 (00:50 +1000)]
[POWERPC] 4xx: 440EPx/GRx incorrect write to DDR SDRAM errata workaround

Add a workaround for PowerPC 440EPx/GRx incorrect write to
DDR SDRAM errata. Data can be written to wrong address
in SDRAM when write pipelining enabled on plb0. We disable
it in the cpu_setup for these processors at early init.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] 4xx: Move 440EP(x) FPU setup from head_44x to cpu_setup_4xx
Valentine Barshak [Fri, 21 Sep 2007 14:46:57 +0000 (00:46 +1000)]
[POWERPC] 4xx: Move 440EP(x) FPU setup from head_44x to cpu_setup_4xx

The PowerPC 440EP(x) FPU init is currently done in head_44x
under ifdefs. Since we should support more then one board
in the same kernel, we move FPU initialization code from head_44x
to cpu_setup_44x and add cpu_setup callbacks for 440EP(x).

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] 4xx: Introduce cpu_setup functionality to 44x platform
Valentine Barshak [Fri, 21 Sep 2007 14:44:38 +0000 (00:44 +1000)]
[POWERPC] 4xx: Introduce cpu_setup functionality to 44x platform

This adds cpu_setup functionality for ppc44x platform.
Low level cpu-spefic initialization routines should be
placed in cpu_setup_44x.S and a callback should be
added to cputable. The cpu_setup is invoked
by identify_cpu() function at early init.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] 4xx: Fix Walnut wrapper compile errors
Josh Boyer [Mon, 24 Sep 2007 12:32:15 +0000 (07:32 -0500)]
[POWERPC] 4xx: Fix Walnut wrapper compile errors

Pass the appropriate -mcpu flag to the treeboot-walnut.o object to prevent
some toolchains from erroring out with unknown opcodes

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years ago[POWERPC] Enable tickless idle and high res timers for powerpc
Tony Breeds [Fri, 21 Sep 2007 03:26:03 +0000 (13:26 +1000)]
[POWERPC] Enable tickless idle and high res timers for powerpc

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Implement clockevents driver for powerpc
Tony Breeds [Fri, 21 Sep 2007 03:26:03 +0000 (13:26 +1000)]
[POWERPC] Implement clockevents driver for powerpc

This registers a clock event structure for the decrementer and turns
on CONFIG_GENERIC_CLOCKEVENTS, which means that we now don't need
most of timer_interrupt(), since the work is done in generic code.
For secondary CPUs, their decrementer clockevent is registered when
the CPU comes up (the generic code automatically removes the
clockevent when the CPU goes down).

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMerge branch 'ppc-fixes' of git://git.bocc.de/dbox2 into for-2.6.24
Paul Mackerras [Wed, 3 Oct 2007 05:33:38 +0000 (15:33 +1000)]
Merge branch 'ppc-fixes' of git://git.bocc.de/dbox2 into for-2.6.24

17 years agoMerge branch 'linux-2.6' into for-2.6.24
Paul Mackerras [Wed, 3 Oct 2007 05:33:17 +0000 (15:33 +1000)]
Merge branch 'linux-2.6' into for-2.6.24

17 years ago[POWERPC] Fix panic in RTAS code
Tony Breeds [Wed, 3 Oct 2007 01:19:09 +0000 (11:19 +1000)]
[POWERPC] Fix panic in RTAS code

Some older pSeries machines were panicking in pSeries_log_error
because it was getting called before it was ready.  This is a result
of commit "[POWERPC] pseries: Fix jumbled no_logging flag."
(79c0108d1b9db4864ab77b2a95dfa04f2dcf264c).

This fixes it by explicitly enabling RTAS error logging when it has
been initialized, and also makes the code clearer by renaming the
"no_more_logging" variable to "logging_enabled".

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Use alloc_maybe_bootmem() in pcibios_alloc_controller
Linas Vepstas [Tue, 2 Oct 2007 21:40:12 +0000 (07:40 +1000)]
[POWERPC] Use alloc_maybe_bootmem() in pcibios_alloc_controller

Use alloc_maybe_bootmem() which wraps the if (mem_init_done)
malloc clause.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Celleb: update for PCI
Ishizaki Kou [Tue, 2 Oct 2007 08:26:53 +0000 (18:26 +1000)]
[POWERPC] Celleb: update for PCI

This adds support for the PCI bus on Celleb with new "I/O routines
for PowerPC."  External PCI on Celleb must do explicit synchronization
with devices (Bus has no automatic synchronization feature).

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Celleb: Serial I/O update
Ishizaki Kou [Tue, 2 Oct 2007 08:25:16 +0000 (18:25 +1000)]
[POWERPC] Celleb: Serial I/O update

This is an update for Serial I/O on Celleb.
  - Detection algorithm has been changed

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Celleb: New HTAB Guest OS Interface on Beat
Ishizaki Kou [Tue, 2 Oct 2007 08:23:46 +0000 (18:23 +1000)]
[POWERPC] Celleb: New HTAB Guest OS Interface on Beat

This changes the Celleb code to work with new Guest OS Interface
to tweak HTAB on Beat. It detects old and new Guest OS Interfaces
automatically.

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Celleb: Support for Power/Reset buttons
Ishizaki Kou [Tue, 2 Oct 2007 08:21:21 +0000 (18:21 +1000)]
[POWERPC] Celleb: Support for Power/Reset buttons

This supports Power/Reset buttons on Beat on Celleb.

On Beat, we have an event from Beat if Power button or Reset button
is pressed. This patch catches the event and convert it to a signal
to INIT process by calling ctrl_alt_del() function.

/sbin/inittab have no entry to turn the machine power off so we have
to detect if power button is pressed or not internally in our driver.
This idea is taken from PS3's event handling subsystem.

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Celleb: Move pause, kexec_cpu_down to beat.c
Ishizaki Kou [Tue, 2 Oct 2007 08:18:46 +0000 (18:18 +1000)]
[POWERPC] Celleb: Move pause, kexec_cpu_down to beat.c

This is an update for "Beat on Celleb"
  - Move beat_pause(), beat_kexec_cpu_down() from setup.c to beat.c

Signed-off-by: <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] ibmebus: More descriptive error return code in ibmebus_store_probe()
Joachim Fenkes [Wed, 26 Sep 2007 09:46:34 +0000 (19:46 +1000)]
[POWERPC] ibmebus: More descriptive error return code in ibmebus_store_probe()

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Update axon_msi to use dcr_host_t.base
Michael Ellerman [Mon, 17 Sep 2007 06:05:02 +0000 (16:05 +1000)]
[POWERPC] Update axon_msi to use dcr_host_t.base

Now that dcr_host_t contains the base address, we can use that in the
axon_msi code, rather than storing it separately.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Update mpic to use dcr_host_t.base
Michael Ellerman [Mon, 17 Sep 2007 06:05:01 +0000 (16:05 +1000)]
[POWERPC] Update mpic to use dcr_host_t.base

Now that dcr_host_t contains the base address, we can use that in the mpic
code, rather than storing it separately.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Store the base address in dcr_host_t
Michael Ellerman [Mon, 17 Sep 2007 06:05:00 +0000 (16:05 +1000)]
[POWERPC] Store the base address in dcr_host_t

In its current form, dcr_map() doesn't remember the base address you passed
it, which means you need to store it somewhere else.  Rather than adding the
base to another struct it seems simpler to store it in the dcr_host_t.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Select proper defconfig for crosscompiles
Adrian Bunk [Tue, 2 Oct 2007 20:30:09 +0000 (13:30 -0700)]
[POWERPC] Select proper defconfig for crosscompiles

The trick for finding the right defconfig is neat, but you forgot to
provide an i686_defconfig.  ;-)

More seriously, cross compiling the defconfig is often useful, e.g. for
testing the compilation of patches that touch multiple architectures,
and this patch therefore chooses g5_defconfig if $(CROSS_COMPILE) is
non-empty.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Sky Cpu and Nexus: use seq_file/single_open on proc interface
Cyrill Gorcunov [Tue, 2 Oct 2007 20:30:09 +0000 (13:30 -0700)]
[POWERPC] Sky Cpu and Nexus: use seq_file/single_open on proc interface

This patch changes proc interface to be used with single_file/seq_open
calls.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Sky Cpu: use C99 style for struct init
Cyrill Gorcunov [Tue, 2 Oct 2007 20:30:08 +0000 (13:30 -0700)]
[POWERPC] Sky Cpu: use C99 style for struct init

This changes structure item init format to C99, and removes useless
structure items init.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Brian Waite <waite@skycomputers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Sky Cpu and Nexus: check for create_proc_entry ret code
Cyrill Gorcunov [Tue, 2 Oct 2007 20:30:07 +0000 (13:30 -0700)]
[POWERPC] Sky Cpu and Nexus: check for create_proc_entry ret code

Adds checking of create_proc_entry call to prevent possible NULL
pointer usage.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Brian Waite <waite@skycomputers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Sky Cpu and Nexus: check for platform_get_resource retcode
Cyrill Gorcunov [Tue, 2 Oct 2007 20:30:06 +0000 (13:30 -0700)]
[POWERPC] Sky Cpu and Nexus: check for platform_get_resource retcode

Add adds checking for platform_get_resource() return code to prevent
possible NULL pointer usage.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Brian Waite <waite@skycomputers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Sky Cpu and Nexus: include io.h
Cyrill Gorcunov [Tue, 2 Oct 2007 20:30:06 +0000 (13:30 -0700)]
[POWERPC] Sky Cpu and Nexus: include io.h

Add #include <asm/io.h> directive to properly declare ioremap() and
writel().

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Brian Waite <waite@skycomputers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Sky Cpu and Nexus: code style improvement
Cyrill Gorcunov [Tue, 2 Oct 2007 20:30:05 +0000 (13:30 -0700)]
[POWERPC] Sky Cpu and Nexus: code style improvement

Remove useless spaces and adds some empty lines to make code more
readable.  Also marker for printk is added.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Brian Waite <waite@skycomputers.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] powerpc vDSO: install unstripped copies on disk
Roland McGrath [Tue, 2 Oct 2007 20:30:04 +0000 (13:30 -0700)]
[POWERPC] powerpc vDSO: install unstripped copies on disk

This keeps an unstripped copy of the vDSO images built before they are
stripped and embedded in the kernel.  The unstripped copies get installed in
$(MODLIB)/vdso/ by "make install".  These files can be useful when they
contain source-level debugging information.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Include pagemap.h in asm/powerpc/tlb.h
Mathieu Desnoyers [Tue, 2 Oct 2007 20:30:04 +0000 (13:30 -0700)]
[POWERPC] Include pagemap.h in asm/powerpc/tlb.h

Fixes this powerpc build error in 2.6.22-rc6-mm1 for powerpc 64 with
CONFIG_SWAP=n :

In file included from include2/asm/tlb.h:60,
                 from /home/compudj/git/linux-2.6-lttng/arch/powerpc/mm/init_64.
c:56:
/home/compudj/git/linux-2.6-lttng/include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
/home/compudj/git/linux-2.6-lttng/include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
/home/compudj/git/linux-2.6-lttng/include/asm-generic/tlb.h: In function 'tlb_remove_page':
/home/compudj/git/linux-2.6-lttng/include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
make[2]: *** [arch/powerpc/mm/init_64.o] Error 1

release_pages is declared in linux/pagemap.h, but cannot be included in
linux/swap.h because of a sparc related comment:

/* only sparc can not include linux/pagemap.h in this file
 * so leave page_cache_release and release_pages undeclared... */
#define free_page_and_swap_cache(page) \
        page_cache_release(page)
#define free_pages_and_swap_cache(pages, nr) \
        release_pages((pages), (nr), 0);

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] ppc64: support CONFIG_DEBUG_PREEMPT
Hugh Dickins [Tue, 31 Oct 2006 18:44:54 +0000 (05:44 +1100)]
[POWERPC] ppc64: support CONFIG_DEBUG_PREEMPT

Add CONFIG_DEBUG_PREEMPT support to ppc64: it was useful for testing
get_paca() preemption.  Cheat a little, just use debug_smp_processor_id()
in the debug version of get_paca(): it contains all the right checks and
reporting, though get_paca() doesn't really use smp_processor_id().

Use local_paca for what might have been called __raw_get_paca().
Silence harmless warnings from io.h and lparcfg.c with local_paca -
it is okay for iseries_lparcfg_data to be referencing shared_proc
with preemption enabled: all cpus should show the same value for
shared_proc.

Why do other architectures need TRACE_IRQFLAGS_SUPPORT for DEBUG_PREEMPT?
I don't know, ppc64 appears to get along fine without it.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Limit range of __init_ref_ok somewhat
Stephen Rothwell [Tue, 2 Oct 2007 03:37:53 +0000 (13:37 +1000)]
[POWERPC] Limit range of __init_ref_ok somewhat

This patch introduces zalloc_maybe_bootmem and uses it so that we don't
have to mark a whole (largish) routine as __init_ref_ok.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] MAINTAINERS shouldn't reference linuxppc-embedded
Mark A. Greer [Tue, 2 Oct 2007 00:24:08 +0000 (10:24 +1000)]
[POWERPC] MAINTAINERS shouldn't reference linuxppc-embedded

Powerpc patches should be posted to linuxppc-dev@ozlabs.org, so modify
MAINTAINERS to no longer reference linuxppc-embedded@ozlabs.org.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Make instruction dumping work in real mode
Scott Wood [Thu, 27 Sep 2007 18:38:55 +0000 (04:38 +1000)]
[POWERPC] Make instruction dumping work in real mode

On non-book-E, exceptions execute in real mode.  If a fault happens
that leads to a register dump, the kernel currently prints XXXXXXXX
because it doesn't realize that PC is a physical address.

This patch checks whether instruction address translation is turned
on, and if not converts PC into a virtual address.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix pci domain detection
Arnd Bergmann [Wed, 26 Sep 2007 14:02:05 +0000 (00:02 +1000)]
[POWERPC] Fix pci domain detection

The /proc/bus/pci/* files list PCI domain numbers only for
devices that claim to be on a multi-domain system. The check
for this is broken on powerpc, because the buid value is
truncated to 32 bits.

There is at least one machine (IBM QS21) that only uses
the high-order bits of the buid, so the return value
of pci_proc_domain() ends up being always zero, which
makes /proc/bus/pci useless.

Change the logic to always return '1' for a nonzero
buid value.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add CHECK_FULL_REGS in several places in ptrace code
Roland McGrath [Mon, 24 Sep 2007 23:50:52 +0000 (09:50 +1000)]
[POWERPC] Add CHECK_FULL_REGS in several places in ptrace code

This restores the CHECK_FULL_REGS sanity check to every place that can
access the nonvolatile GPRs for ptrace.  This is already done for
native-bitwidth PTRACE_PEEKUSR, but was omitted for many other cases
(32-bit ptrace, PTRACE_GETREGS, etc.); I think there may have been more
uniform checks before that were lost in the recent cleanup of GETREGS et al.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Add PlanetCore firmware support
Scott Wood [Mon, 24 Sep 2007 20:09:49 +0000 (06:09 +1000)]
[POWERPC] bootwrapper: Add PlanetCore firmware support

This is a library that board code can use to extract information from the
PlanetCore configuration keys.  PlanetCore is used on various boards from
Embedded Planet.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Factor out dt_set_mac_address()
Scott Wood [Mon, 24 Sep 2007 20:09:11 +0000 (06:09 +1000)]
[POWERPC] bootwrapper: Factor out dt_set_mac_address()

This allows callers to set addresses one at a time when that would be more
convenient.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] boot: Simplify gunzip_finish
Milton Miller [Fri, 21 Sep 2007 23:03:52 +0000 (09:03 +1000)]
[POWERPC] boot: Simplify gunzip_finish

Call gunzip_partial to calculate the remaining length and copy the
data to the user buffer.  This makes it shorter and reduces
duplication.

Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] boot: Record header bytes in gunzip_start
Milton Miller [Fri, 21 Sep 2007 23:03:34 +0000 (09:03 +1000)]
[POWERPC] boot: Record header bytes in gunzip_start

Record the number of header bytes skipped in the total bytes read field.

This is needed for the initramfs parsing code to find the end of the zip file.

Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Make vio_bus_type static
Stephen Rothwell [Fri, 21 Sep 2007 04:32:05 +0000 (14:32 +1000)]
[POWERPC] Make vio_bus_type static

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Simplify vio_bus_init a little for legacy iSeries
Stephen Rothwell [Fri, 21 Sep 2007 04:31:02 +0000 (14:31 +1000)]
[POWERPC] Simplify vio_bus_init a little for legacy iSeries

iSeries_vio_dev was already statically initialised and we can remove
one set of #ifdef CONFIG_PPC_ISERIES guards.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove debug printk from vio_bus_init
Stephen Rothwell [Fri, 21 Sep 2007 04:29:28 +0000 (14:29 +1000)]
[POWERPC] Remove debug printk from vio_bus_init

As it just adds noise to the boot messages.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Implement generic time of day clocksource for powerpc
Tony Breeds [Fri, 21 Sep 2007 21:35:52 +0000 (07:35 +1000)]
[POWERPC] Implement generic time of day clocksource for powerpc

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Implement {read,update}_persistent_clock
Tony Breeds [Fri, 21 Sep 2007 03:26:02 +0000 (13:26 +1000)]
[POWERPC] Implement {read,update}_persistent_clock

With these functions implemented we cooperate better with the generic
timekeeping code.  This obsoletes the need for the timer sysdev as a bonus.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add memory regions to the kcore list for 32-bit machines
Ed Swarthout [Fri, 21 Sep 2007 02:53:02 +0000 (12:53 +1000)]
[POWERPC] Add memory regions to the kcore list for 32-bit machines

The entries are only 32-bit, so restrict the virtual address to stay
below 0xffff_ffff.  With KERNELBASE set to 0xc000_0000, this in effect
restricts access to the first 1GB of real memory.

Make setup_kcore conditional on CONFIG_PROC_KCORE for both 32/64.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Disable power management for arch/ppc
Paul Mackerras [Fri, 21 Sep 2007 01:52:36 +0000 (11:52 +1000)]
[POWERPC] Disable power management for arch/ppc

Currently the prep_defconfig in arch/ppc won't build due to swsusp
being broken.  This patch avoids the problem by essentially disabling
all power management on those platforms left in arch/ppc.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Create and use CONFIG_WORD_SIZE
Stephen Rothwell [Fri, 21 Sep 2007 00:16:20 +0000 (10:16 +1000)]
[POWERPC] Create and use CONFIG_WORD_SIZE

Linus made this suggestion for the x86 merge and this starts the process
for powerpc.  We assume that CONFIG_PPC64 implies CONFIG_PPC_MERGE and
CONFIG_PPC_STD_MMU_32 implies CONFIG_PPC_STD_MMU.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Separate out legacy machine check exception parsers
Olof Johansson [Thu, 20 Sep 2007 19:11:20 +0000 (05:11 +1000)]
[POWERPC] Separate out legacy machine check exception parsers

Move out the old-style exception parsers to a separate function, and
don't call it on platforms that have a platform-specific handler.

It would make sense to move out the generic versions into their platforms
instead, but that can be done gradually down the road.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] clk.h interface for platforms
Domen Puncer [Thu, 20 Sep 2007 14:00:11 +0000 (00:00 +1000)]
[POWERPC] clk.h interface for platforms

This provides an implementation of the <linux/clk.h> interface for
arch/powerpc using a set of function pointers in clk_functions.
Platforms that want to support this interface should fill
clk_functions and select CONFIG_PPC_CLOCK in Kconfig.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Inline u3msi_compose_msi_msg()
Michael Ellerman [Thu, 20 Sep 2007 06:36:51 +0000 (16:36 +1000)]
[POWERPC] Inline u3msi_compose_msi_msg()

In the MPIC U3 MSI code, we call u3msi_compose_msi_msg() once for each MSI.
This is overkill, as the address is per pci device, not per MSI. So setup
the address once, and just set the data per MSI.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Simplify rtas_change_msi() error semantics
Michael Ellerman [Thu, 20 Sep 2007 06:36:50 +0000 (16:36 +1000)]
[POWERPC] Simplify rtas_change_msi() error semantics

Currently rtas_change_msi() returns either the error code from RTAS, or if
the RTAS call succeeded the number of irqs that were configured by RTAS.
This makes checking the return value more complicated than it needs to be.

Instead, have rtas_change_msi() check that the number of irqs configured by
RTAS is equal to what we requested - and return an error otherwise. This makes
the return semantics match the usual 0 for success, something else for error.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Simplify error logic in rtas_setup_msi_irqs()
Michael Ellerman [Thu, 20 Sep 2007 06:36:48 +0000 (16:36 +1000)]
[POWERPC] Simplify error logic in rtas_setup_msi_irqs()

rtas_setup_msi_irqs() doesn't need to call teardown() itself, the
generic code will do this for us as long as we return a non-zero
value.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Simplify error logic in u3msi_setup_msi_irqs()
Michael Ellerman [Thu, 20 Sep 2007 06:36:47 +0000 (16:36 +1000)]
[POWERPC] Simplify error logic in u3msi_setup_msi_irqs()

u3msi_setup_msi_irqs() doesn't need to call teardown() itself,
the generic code will do this for us as long as we return a non
zero value.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>