Commit graph

57908 commits

Author SHA1 Message Date
David Woodhouse 665f5600cb [POWERPC] Enable arbitary speed tty ioctls and split input/output speed
Adding the defines/macros activates the existing code in the tty layer and
allows this platform to use the arbitary speed ioctl setting layer

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:03:29 +10:00
Adrian Bunk 5605d4def1 [POWERPC] Make drivers/char/hvc_console.c:khvcd() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:03:27 +10:00
Robert P. J. Day 32efddf852 [POWERPC] Remove dead code for preventing pread() and pwrite() calls
Remove the deactivated code for checking for pread() and pwrite()
calls on the PPC-based BRIQ.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:03:26 +10:00
Mathieu Desnoyers 1f945a86a8 [POWERPC] Remove unnecessary #undef printk from prom.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:03:25 +10:00
Li Yang 8203c17e5b [POWERPC] Fix typo in Ebony default DTS
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:03:16 +10:00
Sonny Rao 70584578ab [POWERPC] Check for NULL ppc_md.init_IRQ() before calling
Check to make sure ppc_md.init_IRQ has been set before calling it.

Signed-off-by: Sonny Rao <sonny@burdell.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:03:14 +10:00
Manish Ahuja b3e998ee05 [POWERPC] Remove extra return statement
Found 2 instances of return one right after each other in
arch_add_memory().  This removes the superfluous one.

Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:01:01 +10:00
Olof Johansson bc6b73e14e [POWERPC] pasemi: Don't auto-select CONFIG_EMBEDDED
Disable auto-select of CONFIG_EMBEDDED.  ELECTRA_IDE selects
PATA_PLATFORM which should be sufficient.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:01:00 +10:00
Olof Johansson d4875a217b [POWERPC] pasemi: Rename platform
Rename the pasemi platform to "pasemi" to be in line with the
platform's directory name.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:00:59 +10:00
Johannes Berg 12654f7764 [POWERPC] arch/powerpc/kernel/sysfs.c: Move NUMA exports
With !CONFIG_NUMA, these are static inlines in the header file so
don't generate exports for them in that case.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:00:57 +10:00
Tony Breeds bd67fcf9ba [POWERPC] Add __read_mostly support for powerpc
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:00:56 +10:00
Tony Breeds fc9069fe56 [POWERPC] Modify sched_clock() to make CONFIG_PRINTK_TIME more sane
When booting a current kernel with CONFIG_PRINTK_TIME enabled you'll
see messages like:

[    0.000000] time_init: decrementer frequency = 188.044000 MHz
[    0.000000] time_init: processor frequency   = 1504.352000 MHz
[3712914.436297] Console: colour dummy device 80x25

This cause by the initialisation of tb_to_ns_scale in time_init(), suddenly the
multiplication in sched_clock() now does something :).  This patch modifies
sched_clock() to report the offset since the machine booted so the same
printk's now look like:

[    0.000000] time_init: decrementer frequency = 188.044000 MHz
[    0.000000] time_init: processor frequency   = 1504.352000 MHz
[    0.000135] Console: colour dummy device 80x25

Effectivly including the uptime in printk()s.

This patch makes tb_to_ns_scale and tb_to_ns_shift static and
read_mostly for good measure.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:00:54 +10:00
Tony Breeds 4bb092811c [POWERPC] Create a dummy zImage if no valid platform has been selected
This simply prevents a build error if no platform is selected.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 22:00:52 +10:00
Geoff Levand bafdb64577 [POWERPC] PS3: Bootwrapper support.
Add support to build the PS3 flash rom image and remove some unneeded
lmb calls.

The PS3's lv1 loader supports loading gzipped binary images from flash
rom to addr zero. The loader enters the image at addr 0x100.

In this implementation a bootwrapper overlay is use to arrange for the
kernel to be loaded to addr zero and to have a suitable bootwrapper
entry at 0x100.  To construct the rom image, 0x100 bytes from offset
0x100 in the kernel is copied to the bootwrapper symbol
__system_reset_kernel.  The 0x100 bytes at the bootwrapper symbol
__system_reset_overlay is then copied to offset 0x100.  At runtime the
bootwrapper program copies the 0x100 bytes at __system_reset_kernel to
addr 0x100.

zImage.ps3 is a wrapped image that contains a flat device tree, an lv1
compatible entry point, and an optional initrd.  otheros.bld is the gzip
compresed rom image built from zImage.ps3.  otheros.bld is suitable for
programming into the PS3 boot flash memory.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:56:40 +10:00
Johannes Berg 76a5b8bb35 [POWERPC] powermac i2c: Use mutex
Convert the semaphores in low_i2c that are used as mutexes to real
mutexes.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:55:54 +10:00
Josh Boyer 0b7dbfbf13 [POWERPC] Schedule removal of arch/ppc
The arch/ppc tree has been in a semi-nebulous "bug fix only" state for a
few kernel releases now.  The patch below officially declares this as of
the 2.6.22 kernel release and schedules arch/ppc for removal in June of
2008.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:55:52 +10:00
Josh Boyer b6f41cc830 [POWERPC] Consolidate PowerPC 750 cputable features
The 750 CPU_FTR macros have quite a bit of duplication in them.  Consolidate
them to use CPU_FTRS_750 and only list the unique features for derivatives.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:55:50 +10:00
will schmidt 078f194045 [POWERPC] Oprofile enhanced instruction sampling support
Oprofile enhanced instruction sampling support.

When performing instruction sampling, the mmcra[SLOT] field can be used to
more accurately identify the address of the sampled instruction.

Tested on power4, js20, power5 and power5+.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
cc: Maynard Johnson <maynardj@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:55:48 +10:00
Olaf Hering f5e6a280d1 [POWERPC] Make two xmon variables static
xmon_early and xmon_off are only used in this file.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:55:46 +10:00
Michael Ellerman 94a3807c2a [POWERPC] Make the debugfs "powerpc" dir globally accessible
The prom.c debugging code creates a "powerpc" directory in debugfs,
which is nice, but doesn't allow any other debugging code to stick things
under "powerpc" in debugfs. So make it global.

While we're there we should make the prom.c debugging code depend on
CONFIG_DEBUG_FS, because it doesn't work otherwise.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:50 +10:00
Wade Farnsworth db0dbae9d9 [POWERPC] Add a check for keyboard/mouse device nodes in check_legacy_ioport()
The device tree for the MPC8641 HPCN does not implement the device type
property for I8042 nodes.

In addition to checking the I8042 node's device type, also match the
keyboard and/or mouse nodes' compatible property.

Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:49 +10:00
Michael Ellerman 6a281856c0 [POWERPC] Add a warning to help trackdown device_node refcounting bugs
When the refcount for a device node goes to 0, we call the
destructor - of_node_release(). This should only happen if we've
already detached the node from the device tree.

So add a flag OF_DETACHED which tracks detached-ness, and if we
find ourselves in of_node_release() without it set, issue a
warning and don't free the device_node. To avoid warning
continuously reinitialise the kref to a sane value.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:47 +10:00
Michael Ellerman d3b814bb1e [POWERPC] Generalise device_node flag interface
The struct device_node currently has a _flags variable, although
it's only used for one flag - OF_DYNAMIC.  Generalise the flag
accessors so we can use them with other flags in future.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:46 +10:00
Michael Ellerman 972d17c9db [POWERPC] Check for the root node in of_detach_node()
It's not sensible to call of_detach_node() on the root node,
but we should check for it just to be safe.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:45 +10:00
Roland Dreier 333e615483 [POWERPC] Add cputable entry for PowerPC 440SPe Rev. B
When adding the cputable entry for 440SPe Rev. B, we also need to
adjust the existing entries for 440SP Rev. A and 440SPe Rev. B so that
they look more bits of the PVR.  The 440SPe Rev. B has PVR 53421891,
which would match the current 440SP Rev. A pattern of 53xxx891.  To
distinguish between 440SP and 440SPe, we need to use the first three
digits of the PVR, which are respectively 532 and 534.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:44 +10:00
Wade Farnsworth 57cc705f39 [POWERPC] Fix drivers/rtc/Kconfig for powerpc
The powerpc arch uses CONFIG_PPC instead of CONFIG_POWERPC.  This fixes
drivers/rtc/Kconfig to use the correct config option.

Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:43 +10:00
Ishizaki Kou e34b9c94b6 [POWERPC] of_serial: add port type checking
Currently, of_serial driver supports only 8250 compatible ports, but
prepares that others can easily be added.  Yet unregister routine
assumes port is 8250.  This corrects unregister routine to check
port type.

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>
2007-07-10 21:53:42 +10:00
Ishizaki Kou 1558f9b44e [POWERPC] of_serial: Ignore unknown serial port
Current of_serial driver assumes unknown serial port to be 8250.  But
this behavior may cause fatal problems when the serial port is not
8250.  This corrects probe routine to ignore unknown serial port.

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>
2007-07-10 21:53:41 +10:00
Robert P. J. Day f716a425c1 [POWERPC] VIOTAPE: Use designated initializers for fops member structures.
Replace the old-style member initializers with the newer designated
initializers.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:39 +10:00
Christoph Hellwig ca747ddf29 [POWERPC] Remove unused do_signal export
do_signal is never used in modular code (obviously), and no other
architecture exports it either.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:53:36 +10:00
Stephen Rothwell 36a700307e [POWERPC] Fix viodasd geometry calculations
Commit a885c8c431 that introduced the
getgeo block device method changed the fallback number of sectors and
introduced a bug into the fallback cylinder number calculation.

Thanks to Rusty Russell for noticing this.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-07-10 21:40:28 +10:00
Vitaly Bordug b8ce2272be [POWERPC] dts: kill hardcoded phandles
Removed explicit linux,phandle usage.  Using references and labels now in PQ
and PQ2 boards currently supported in arch/powerpc.

Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:34:08 -05:00
Vitaly Bordug 80128ff79d [POWERPC] 8xx: mpc885ads pcmcia support
Adds support for PowerQuicc on-chip PCMCIA.  The driver is implemented as
of_device, so only arch/powerpc stuff is capable to use it, which now implies
only mpc885ads reference board.

To cope with the code that should be hooked inside driver, but is really board
specific (like set_voltage), global structure mpc8xx_pcmcia_ops holds
necessary function pointers that are filled in the BSP code.

[akpm@linux-foundation.org: whitespace diddles]
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Olof Johansson <olof@lixom.net>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:33:51 -05:00
Kumar Gala 90faf4fa79 [POWERPC] CPM_UART: Use inline function form of eieio
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:33:19 -05:00
Kumar Gala 74a0ba61b1 [POWERPC] Move inline asm eieio to using eieio inline function
Use the eieio function so we can redefine what eieio does rather
than direct inline asm.  This is part code clean up and partially
because not all PPCs have eieio (book-e has mbar that maps to eieio).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:33:14 -05:00
Laurent Pinchart cef1a3a5b8 [PPC] Add linux/pagemap.h to arch/ppc/mm/tlb.c
When compiled without swap support, arch/mm/tlb.c complains about missing
function declarations. This patch fixes the warnings.

Signed-off-by: Laurent Pinchart <laurent.pinchart@technotrade.biz>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:33:07 -05:00
Domen Puncer d3e0e02804 [POWERPC] 52xx: sparse fixes
sparse caught these static functions / __iomem annotations
under arch/powerpc/platform/52xx/

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:33:01 -05:00
Grant Likely c03ac582fe [POWERPC] 83xx: Add USB support to mpc8349-mitx board port
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:32:54 -05:00
Li Yang e5a94af847 [POWERPC] 83xx: USB platform code rework
Add 831x USB platform setup code and rework 834x USB platform setup code.
Move USB platform code to usb.c for different boards with CPU of the same
series to share the USB initialization code.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-10 00:30:04 -05:00
Roy Zang 749e80810d [POWERPC] Remove redundant pci_read_irq_line() function for 85xx platform
Remove redundant pci_read_irq_line() function for 85xx CDS board.
This function has been realized in common ppc pci code.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-09 23:24:50 -05:00
Kumar Gala 80a7cc6cf1 [POWERPC] Merge asm-ppc/mmu_context.h into asm-power/mmu_context.h
Just did a directly merge from asm-ppc into asm-powerpc.  This is the last
header that we directly include from asm-powerpc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 03:22:05 -05:00
Kumar Gala 58fe255f63 [POWERPC] Fix up interrupt senses for MPC85xx boards
The PHY is active-low on the MPC85xx CDS and the 8560 ADS just had
the wrong sense for the internal PCI and CPM interrupts.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 03:05:58 -05:00
David Gibson 3120234551 [POWERPC] Split out asm-ppc/mmu.h portions for PowerPC 8xx
arch/powerpc still relies on asm-ppc/mmu.h for some 32-bit MMU types.
This patch is another step towards fixing this.  It takes the portions
of asm-ppc/mmu.h related to 8xx embedded CPUs which are still relevant
in arch/powerpc and puts them in a new asm-powerpc/mmu-8xx.h,
included when appropriate from asm-powerpc/mmu.h.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 03:00:28 -05:00
David Gibson 67f74c9d22 [POWERPC] Split out asm-ppc/mmu.h portions for Freescale Book-E
arch/powerpc still relies on asm-ppc/mmu.h for some 32-bit MMU types.
This patch is another step towards fixing this.  It takes the portions
of asm-ppc/mmu.h related to Freescale Book-E which are still relevant
in arch/powerpc and puts them in a new asm-powerpc/mmu-fsl-booke.h,
included when appropriate from asm-powerpc/mmu.h.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 03:00:16 -05:00
Kumar Gala b3710f5a18 [POWERPC] Kill pcibios_enable_resources()
pcibios_enable_resources isn't used anywhere and not exported.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 02:51:24 -05:00
Jon Loeliger 327e22df9f [POWERPC] Replace use of GET_64BIT(prop, i) with of_read_number().
Remove uses of hack GET_64BIT() property macro and use
the more general of_read_number() function from prom.h
as suggested by Milton.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 02:48:17 -05:00
Kumar Gala b533f8ae79 [POWERPC] Reworked interrupt numbers for OpenPIC based Freescale chips
Make the interrupt numbers match the OpenPIC spec intead of the
Freescale docs which distinguish between internal and external interrupts.

Now we can use the interrupt number directly to find the register offset
associated with it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 02:35:35 -05:00
Timur Tabi eae98266e7 [POWERPC] Fix MAC address entries for 83xx, 85xx, and 86xx device trees
For the 83xx, 85xx, and 86xx device trees, add a "local-mac-address" property
to every Ethernet node that didn't have one.  Add a comment indicating that
the "address" and/or "mac-address" properties are deprecated in DTS files
and will be removed at a later time.  Change all MAC address properties to
have a zero MAC address value.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 02:05:41 -05:00
Li Yang 65482ccf9d [POWERPC] qe_lib: export symbols for QE driver to compile as module
Export symbols of qe_lib to be used by QE driver.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Selvamuthukumar V <vsmkumar.84@gmail.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 02:04:51 -05:00
Roy Zang 68fb0d203f [POWERPC] 85xx: Fix 8548CDS reset bug
Begin with MPC8548 a new reset control register is added that asserts
HRESET_REQ to board logic.

This register is used for chip reset.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-03 02:04:29 -05:00