Commit Graph

40 Commits

Author SHA1 Message Date
Arun Sharma 60063497a9 atomic: use <linux/atomic.h>
This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-26 16:49:47 -07:00
Thomas Gleixner ec775d0e70 powerpc: Convert to new irq_* function names
Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:12 +02:00
Linus Torvalds d17abcd541 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask:
  oprofile: Thou shalt not call __exit functions from __init functions
  cpumask: remove the now-obsoleted pcibus_to_cpumask(): generic
  cpumask: remove cpumask_t from core
  cpumask: convert rcutorture.c
  cpumask: use new cpumask_ functions in core code.
  cpumask: remove references to struct irqaction's mask field.
  cpumask: use mm_cpumask() wrapper: kernel/fork.c
  cpumask: use set_cpu_active in init/main.c
  cpumask: remove node_to_first_cpu
  cpumask: fix seq_bitmap_*() functions.
  cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL
2009-03-30 18:00:26 -07:00
Rusty Russell 1a8a51004a cpumask: remove references to struct irqaction's mask field.
Impact: cleanup

It's unused, since about 1995.  So remove all initialization of it in
preparation for actually removing the field.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2009-03-30 22:05:14 +10:30
Anton Vorontsov 84ba4a5899 powerpc/85xx: Move gianfar mdio nodes under the ethernet nodes
Currently it doesn't matter where the mdio nodes are placed, but with
power management support (i.e. when sleep = <> properties will take
effect), mdio nodes placement will become important: mdio controller
is a part of the ethernet block, so the mdio nodes should be placed
correctly. Otherwise we may wrongly assume that MDIO controllers are
available during sleep.

Suggested-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-03-24 08:35:13 -05:00
Becky Bruce f465df81a8 powerpc: Move memory size print into common show_cpuinfo for 32-bit
Most of the platforms were printing the size of the memory
in their show_cpuinfo implementations. This moves that to
the common show_cpuinfo, so that all 32-bit platforms will
now print the size of memory.  I also update the code
to deal with the fact that total_memory is now a phys_addr_t.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-10-22 11:00:25 +11:00
Dave Jiang a64887eb0a powerpc/85xx: publish of device for cds platforms
Publish the devices listed in dts under SOC as of_device for 85xx_cds
platform. The devices are needed by the 85xx EDAC driver.

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-14 07:55:43 -05:00
Kumar Gala 277982e2d8 [POWERPC] 85xx: convert boards to use machine_device_initcall
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-23 19:32:37 -06:00
Kumar Gala 0bfd5df53a [POWERPC] 85xx: Killed <asm/mpc85xx.h>
asm-powerpc/mpc85xx.h was really a hold over from arch/ppc.  Now that
more decoupling has occurred we can remove <asm/mpc85xx.h> and some of
its legacy.

As part of this we moved the definition of CPM_MAP_ADDR into cpm2.h
for 85xx platforms.  This is a stop gap until drivers stop using
CPM_MAP_ADDR.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-10-11 09:14:31 -05:00
Kumar Gala e1c1575f83 [POWERPC] 85xx/86xx: refactor RSTCR reset code
On the majority of 85xx & 86xx we have a register that's ability to
assert HRESET_REQ to reset the board.  We refactored that code so it
can be shared between both platforms into fsl_soc.c and removed all
the duplication in each platform directory.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-10-08 08:38:47 -05:00
Kumar Gala c9438affcb [POWERPC] Use for_each_ matching routinues for pci PHBs
On the Freescale embedded (83xx, 85xx, 86xx) and a few of the discrete
bridges (mpc10x, tsi108) use the new for_each_compatible_node() or
for_each_node_by_type() to provide more exact matching when looking for
PHBs in the device tree.

With the previous code it was possible to match on pci bridges since
we were only matching on device_type.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-10-08 08:38:40 -05:00
Jon Loeliger 683d00b03e [POWERPC] 85xx: Remove unnecessary loops_per_jiffy initialization code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:36 -05:00
Paul Mackerras b2315372ea Merge branch 'linux-2.6' into for-2.6.24 2007-09-14 01:24:25 +10:00
Kumar Gala 2af8569dc9 [POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI
We needed some ifdef CONFIG_PCI protection for pcibios_fixup so we
can build !CONFIG_PCI.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-10 16:00:09 -05:00
Kumar Gala ed16c20da6 [POWERPC] Remove old includes from arch/ppc
Remove includes of files that existed in arch/ppc that we dont need in
arch/powerpc anymore.  The following includes were removed:

 <asm/amigappc.h>
 <asm/bootinfo.h>
 <asm/ppcboot.h>
 <asm/ppc_sys.h>
 <asm/residual.h>
 <asm/m8260_pci.h>

This also caused platforms/embedded6xx/mpc7448_hpc2.h to no longer be
needed and thus removed.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-08-22 22:39:35 -05:00
Randy Vinson 8d7bc8f9d1 [POWERPC] 85xxCDS: Misc 8548 PCI Corrections.
Setting the host bridge @8000 as primary. Also fixing a bug in
setting the USB interrupt numbers.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-24 10:31:49 -05:00
Randy Vinson bca03c6bdd [POWERPC] 85xxCDS: Delay 8259 cascade hookup.
The interrupts of an E100 card inserted in PCI slot 4 may be on at bootup.
The resulting interrupt flood interacts with the 8259 cascade handler and
prevents proper boot up. There is a quirk for the E100 that will disable
the E100's interrupts but to use it, the 8259 cascade hookup must be
delayed until after the quirk has run. This patch delays the 8259 cascade
hookup by registering a device_initcall() which runs after the PCI quirk
for the E100.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-24 10:31:34 -05:00
Randy Vinson 637e9e13a1 [POWERPC] 85xxCDS: Make sure restart resets the PCI bus.
The current 85xxCDS restart code fails to reset the PCI bus which can
lead to odd behavior after the restart. This patch uses the VIA Super
Southbridge to perform a PCI reset which will reset the entire system.
NOTE: Since the VIA chip is behind a PCI-to-PCI bridge which can be
disabled with a switch setting, it may not be possible to perform the
PCI bus reset. In this case, the code defaults to the previous restart
mechanism.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-23 22:35:12 -05:00
Randy Vinson 3620fc1da2 [POWERPC] 85xxCDS: Allow 8259 cascade to share an MPIC interrupt line.
The Freescale MPC8555CDS and MPC8548CDS reference hardware has a legacy
8259 interrupt controller pair contained within a VIA VT82C686B Southbridge
on the main carrier board. The processor complex plugs into the carrier
card using a PCI slot which limits the available interrupts to the
INTA-INTD PCI interrupts. The output of the 8259 cascade pair is routed
through a gate array and connected to the PCI INTA interrupt line.
The normal interrupt chaining hook (set_irq_chained_handler) does
not allow sharing of the chained interrupt which prevents the
use of PCI INTA by PCI devices. This patch allows the 8259 cascade
pair to share their interrupt line with PCI devices.

NOTE: The addition of the .end routine for the MPIC is not strictly
necessary for this patch. It's there so this code will run from within
the threaded interrupt context used by the Real Time patch.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-23 22:34:40 -05:00
Kumar Gala 4e7982115e [POWERPC] 85xx: Add quirk to ignore bogus FPGA on CDS
The newer Arcadia boards for CDS have an FPGA that shows up on PCI
however isn't a real PCI device.  Add a quirk to just ignore the
FPGA.

This is based on the following patch from Andy & York:

http://ozlabs.org/pipermail/linuxppc-dev/2007-February/032042.html

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-23 10:27:08 -05:00
Kumar Gala 6c0a11c118 [POWERPC] Fixup resources on pci_bus for PCIe PHB when no device is connected
On the 85xx/86xx PCIe controllers if there is no device connected to the
PHB we will still allocate a pci_bus for downstream bus of the virtual
P2P bridge. However the resources allocated to the downstream bus are not
correct and so we just mimic the resources from the upstream pci_bus.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-23 10:27:08 -05:00
Roy Zang 3f6c5dae27 [POWERPC] Use Freescale pci/pcie common code for 85xx boards
Switch the 85xx platform over to using the FSL generic PCI code.  This
gets ups PCIe support in addition to base PCI support.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-07-23 10:27:08 -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 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
Kumar Gala 5229ee1852 [POWERPC] Remove hack to determine the 2nd PHBs bus number
Now that we have the pci_controller in the exclude function we can easy
figure out if the bus number is the PHB or not.  The old style of using a
variable setup at init time was actually broken and would only work in
specific cases.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-06-29 01:57:29 -05:00
Kumar Gala 7d52c7b0cd [POWERPC] Pass the pci_controller into pci_exclude_device
There are times that we need to know which controller we are on to decide
how to exclude devices properly.  We now pass the pci_controller that we
are going to use down to the pci_exclude_device function. This will
greatly simplify being able to exclude the PHBs in multiple controller
setups.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-06-29 01:57:22 -05:00
Arnd Bergmann 3dfaa762b5 [POWERPC] kill isa_{io,mem}_base definitions for !PCI
When CONFIG_PCI is disabled, the definitions for isa_io_base,
isa_mem_base and pci_dram_offset are entirely unused, but they
can result in link failure because they are defined in multiple
places.

The easiest fix is to just remove all these definitions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2007-06-29 01:56:43 -05:00
Arnd Bergmann 09b55f76c9 [POWERPC] rename add_bridge to avoid namespace clashes
Many platforms currently define their own add_bridge function, some
of them globally. This breaks some multiplatform configurations.
Prefixing each of these functions with the platform name avoids
this problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2007-06-29 01:56:23 -05:00
Stephen Rothwell 55b61fec22 [POWERPC] Rename device_is_compatible to of_device_is_compatible
for consistency with other Open Firmware interfaces (and Sparc).

This is just a straight replacement.

This leaves the compatibility define in place.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-07 20:31:14 +10:00
Stephen Rothwell e2eb63927b [POWERPC] Rename get_property to of_get_property: arch/powerpc
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 03:55:19 +10:00
Kumar Gala 6936c62571 [POWERPC] 85xx: Cleaning up machine probing
Cleaned up the probing functionality to be more consistent across all 85xx
boards and actually check to see if we should be running on a given board.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17 16:19:34 -06:00
Jon Loeliger 578f8f20f3 [POWERPC] 8[56]xx: Remove obsolete setting of ROOT_DEV for 85xx and 86xx platforms.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-16 18:14:08 -06:00
Kumar Gala 27630bec94 [POWERPC] 85xx: Marked functions static
Marked a number of functions in 85xx board code as static.  Also, some minor
whitespace cleanup

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-09 09:30:45 -06:00
Olaf Hering 35a84c2f56 [POWERPC] Fix up after irq changes
Remove struct pt_regs * from all handlers.
Also remove the regs argument from get_irq() functions.
Compile tested with arch/powerpc/config/* and
arch/ppc/configs/prep_defconfig

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-07 22:08:26 +10:00
Olof Johansson 49f19ce401 [PATCH] powerpc: irq change build breaks
Fix up some of the buildbreaks from the irq handler changes.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-05 18:39:04 -07:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Paul Mackerras ea0763a7e6 Merge branch 'merge' 2006-08-25 14:56:07 +10:00
Andy Fleming ddd64159eb [POWERPC] Fix CDS IRQ handling and PCI code
* Fix IRQ support in the 85xx CDS boards so it uses the new
  generic stuff
* Fix PCI IRQ mapping to use the device tree
* Disabled i8259 support to allow the CDS to boot.  This will be
  fixed soon, but the current code doesn't even compile, so this
  is a vast improvement

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23 15:51:18 +10:00
Jeremy Kerr 8efca49329 [POWERPC] mpc: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.

mpc* platform changes.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-07-31 15:55:04 +10:00
Andy Fleming 591f0a4287 Add 85xx CDS to arch/powerpc
This patch adds support for 85xx CDS support to arch/powerpc

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2006-04-04 16:09:18 -05:00