summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/mpc832x_mds.c
AgeCommit message (Collapse)Author
2017-12-04powerpc: Use of for_each_node_by_name() instead of open-coding itDmitry Torokhov
Instead of manually coding the loop with of_find_node_by_name(), let's switch to the standard macro for iterating over nodes with given name. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [mpe: Fix build failures due to typo in mpc832x_mds.c] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-09-25powerpc/83xx: factor out the common codes of setup arch functionsKevin Hao
Factor out the common codes of setup arch functions to a separate function. It does make no sense to print a board specific info in setup arch functions, so use a more general one. For ASP8347E board, there is no pci device node. So it is safe to invoke mpc83xx_setup_pci() in its setup arch function even there is no such invocation in its original setup arch function. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Scott Wood <oss@buserror.net>
2016-07-21powerpc: Move 32-bit probe() machine to later in the boot processBenjamin Herrenschmidt
This converts all the 32-bit platforms to use the expanded device-tree which is a pretty mechanical change. Unlike 64-bit, the 32-bit kernel didn't rely on platform initializations to setup the MMU since it sets it up entirely before probe_machine() so the move has comparatively less consequences though it's a bigger patch. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-12-22QE: Move QE from arch/powerpc to drivers/socZhao Qiang
ls1 has qe and ls1 has arm cpu. move qe from arch/powerpc to drivers/soc/fsl to adapt to powerpc and arm Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2015-12-22QE: use subsys_initcall to init qeZhao Qiang
Use subsys_initcall to init qe to adapt ARM architecture. Remove qe_reset from PowerPC platform file. Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-11-15powerpc: Fix typos in Freescale copyright claimsYang Li
There are many cases that Semiconductor is misspelled. The patch fix these typos. Signed-off-by: Li Yang <leoli@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-03-28Disintegrate asm/system.h for PowerPCDavid Howells
Disintegrate asm/system.h for PowerPC. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> cc: linuxppc-dev@lists.ozlabs.org
2011-11-24powerpc/83xx: merge PCI bridge additionsDmitry Eremin-Solenikov
Nearly all mpc83xx-based boards have a common piece of code - one that loops over all pci/pcie bridges and registers them. Merge that code into a special function common to all boards. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-24powerpc/83xx: consolidate of_platform_bus_probe callsDmitry Eremin-Solenikov
83xx board files have a lot of duplication in *_declare_of_platform_devices() functions. Merge that into a single function common to most of the boards. The only leftover is mpc834x_itx.c board file which explicitly asks for fsl,pq2pro-localbus, as corresponding bindings don't provide "simple-bus" compatibility in localbus node. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-24powerpc/83xx: consolidate init_IRQ functionsDmitry Eremin-Solenikov
On mpc83xx platform nearly all _init_IRQ functions look alike. They either just setup ipic, or setup ipic and QE PIC. Separate this to special functions to be either referenced from ppc_md, or called from board file. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-07-26atomic: use <linux/atomic.h>Arun Sharma
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-06-10treewide: Convert uses of struct resource to resource_size(ptr)Joe Perches
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-12-30powerpc/83xx: Fix sparse warnings in board filesAnton Vorontsov
This patch fixes following sparse warnings: CHECK 83xx/usb.c 83xx/usb.c:205:5: warning: symbol 'mpc837x_usb_cfg' was not declared. Should it be static? CHECK 83xx/mpc831x_rdb.c 83xx/mpc831x_rdb.c:45:13: warning: symbol 'mpc831x_rdb_init_IRQ' was not declared. Should it be static? CHECK 83xx/mpc832x_rdb.c 83xx/mpc832x_rdb.c:133:13: warning: symbol 'mpc832x_rdb_init_IRQ' was not declared. Should it be static? CHECK 83xx/mpc832x_mds.c 83xx/mpc832x_mds.c:68:12: warning: Using plain integer as NULL pointer 83xx/mpc832x_mds.c:72:13: warning: incorrect type in assignment (different address spaces) 83xx/mpc832x_mds.c:72:13: expected unsigned char [usertype] *static [toplevel] bcsr_regs 83xx/mpc832x_mds.c:72:13: got void [noderef] <asn:2>* 83xx/mpc832x_mds.c:99:11: warning: incorrect type in argument 1 (different address spaces) 83xx/mpc832x_mds.c:99:11: expected void volatile [noderef] <asn:2>*addr 83xx/mpc832x_mds.c:99:11: got unsigned char [usertype] *static [toplevel] bcsr_regs Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-29powerpc/fsl: proliferate simple-bus compatibility to soc nodesKim Phillips
add simple-bus compatible property to soc nodes for 83xx/85xx platforms that were missing them. Add same to platform probe code. This fixes SoC device drivers (such as talitos) to succeed in matching devices present in the soc node. also update mpc836x_rdk dts to new SEC bindings (overlooked in commit 3fd4473: powerpc/fsl: update crypto node definition and device tree instances). Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-16powerpc: Move mpc83xx_add_bridge to fsl_pci.cJohn Rigby
This allows other platforms with the same pci block like MPC5121 to use it. Signed-off-by: John Rigby <jrigby@freescale.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-28[POWERPC] QE: get rid of most device_types and modelAnton Vorontsov
Now we're searching for "fsl,qe", "fsl,qe-muram", "fsl,qe-muram-data" and "fsl,qe-ic". Unfortunately it's still impossible to remove device_type = "qe" from the existing device trees because older u-boots are looking for it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-23[POWERPC] 83xx: convert boards to use machine_device_initcallKumar Gala
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11[POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into ↵Jon Loeliger
linux/of_{platform, device}.h. Signed-off-by: Jon Loeliger <jdl@freescale.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-20[POWERPC] 8xxx: MDS board RTC fixesKim Phillips
Now the rtc class ds1374 driver has been added, remove the old rtc driver hookup code, add rtc node to device trees, and turn on the new driver in the defconfigs. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-19[POWERPC] 83xx: mpc832x mds: Fix board PHY reset codeKim Phillips
currently the board-level PHY reset code for the mpc832x MDS messes with reset configuration words source settings which is plain wrong (it looks like this board code was cut-n-pasted from the mpc8360 mds code, which has the PHY reset bits in a different BCSR); this patch points the PHY reset code to the proper mpc832x mds PHY reset bits in the BCSR. Signed-off-by: Peter Van Ackeren <peter.vanackeren@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-10-08[POWERPC] QEIC: Implement pluggable handlers, fix MPIC cascadingAnton Vorontsov
set_irq_chained_handler overwrites MPIC's handle_irq function (handle_fasteoi_irq) thus MPIC never gets eoi event from the cascaded IRQ. This situation hangs MPIC on MPC8568E. To solve this problem efficiently, QEIC needs pluggable handlers, specific to the underlaying interrupt controller. Patch extends qe_ic_init() function to accept low and high interrupt handlers. To avoid #ifdefs, stack of interrupt handlers specified in the header file and functions are marked 'static inline', thus handlers are compiled-in only if actually used (in the board file). Another option would be to lookup for parent controller and automatically detect handlers (will waste text size because of never used handlers, so this option abolished). qe_ic_init() also changed in regard to support multiplexed high/low lines as found in MPC8568E-MDS, plus qe_ic_cascade_muxed_mpic() handler implemented appropriately. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-10-08[POWERPC] Use for_each_ matching routinues for pci PHBsKumar Gala
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-09-14[POWERPC] 83xx: Removed PCI exclude of PHBKumar Gala
Now that the generic code doesn't assign resources for Freescale PHBs we dont have to explicitly exclude it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-08-22[POWERPC] Remove old includes from arch/ppcKumar Gala
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-10[POWERPC] Revert "[POWERPC] Add 'mdio' to bus scan id list for platforms ↵Kim Phillips
with QE UEC" This reverts commit 3baee955953957be5496cd28e9c544d9db214262. That commit was a mistake from the start; I added mdio type to the bus scan list early on in my ucc_geth migrate to phylib development, which is just pure wrong (the ucc_geth_mii driver creates the mii bus and the PHY layer handles PHY enumeration without translation). This follows on from commit 77926826f301fbd8ed96d3cd9ff17a5b59560dfb: Revert "[POWERPC] Don't complain if size-cells == 0 in prom_parse()" which was basically trying to hide a symptom of the original mistake this revert fixes. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-29[POWERPC] kill isa_{io,mem}_base definitions for !PCIArnd Bergmann
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[POWERPC] rename add_bridge to avoid namespace clashesArnd Bergmann
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-05-02[POWERPC] Add 'mdio' to bus scan id list for platforms with QE UECKim Phillips
Add 'mdio' to bus scan id list for platforms with QE UEC as a consequence of converting UEC mdio driver to an of_platform driver in the ucc_geth phylib conversion patch. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-26[POWERPC] 83xx: Removed dead headerKumar Gala
mpc832x_mds.h was exporting a function that didn't exist anymore. Once removed the header had no purpose. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17[POWERPC] 83xx: Use of_platform_bus_probe to setup QE devicesKumar Gala
Use of_platform_bus_probe to setup devices on the of_platform_bus since its much cleaner. We explicitly specify the bus ids since the we want to get rid of the default mechanism in the future. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17[POWERPC] 83xx: use default value of loops_per_jiffyKumar Gala
Use the default value setup by initialization of loops_per_jiffy, its close enough for 83xx and will get fixed up by calibrate_delay(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17[POWERPC] 83xx: Remove obsolete setting of ROOT_DEV.Kumar Gala
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17[POWERPC] 83xx: Cleaning up machine probing and board initcallsKumar Gala
Cleaned up the probing functionality to be more consistent across all 83xx boards and added machine_is() protection around board initcalls to ensure they only do something if we are actually running on that board. Additionally, removed some dead code on mpc832x_mds. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-30[POWERPC] 83xx: Fix compiler warnings on 836x and 832xLi Yang
Some prototypes are separated from of_device.h into of_platform.h. Add the new include to fix warning. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-26[POWERPC] 83xx: Make platform *_init_IRQ() staticKumar Gala
Make the various 83xx *_init_IRQ() functions static Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-22[POWERPC] Fix OF node refcnt underflow in 836x and 832x platform codeLi Yang
Incorrect use of of_find_node_by_name() causes of_node_put() on a node which has already been put. It causes the refcount of the node to underflow, which triggers the WARN_ON in kref_get for 836x and 832x. This fixes it. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04[POWERPC] Remove ppc_md.pci_map_irq & ppc_swizzle for ARCH=powerpcBenjamin Herrenschmidt
These were inherited from ARCH=ppc, but are not needed since parsing of interrupts should be done via the of_* functions (who can do swizzling). If we ever need to do non-standard swizzling on bridges without a device-node, then we might add back a slightly different version of ppc_md.pci_swizzle but for now, that is not the case. I removed the couple of calls for these in 83xx. If that breaks something, then there is a problem with the device-tree on these. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-11-22[POWERPC] Fix ucc_geth of_device discovery on mpc832xKim Phillips
mpc832x, as in mpc8360, needs to explicitly find and create the platform device for ucc_geth in 2.6.19. This code will likely be readapted to Benh's new of_ methods for 2.6.20. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-04[POWERPC] Add support for the mpc832x mds boardKim Phillips
Add support for MPC832x MDS evaluation board. This patch depends on the 8360+QE lib patches by Leo. The MPC832x processors (MPC8323E, MPC8323, MPC8321E, MPC8321) sport the e300c2 core plus a QUICC Engine (QE). This patch adds support for the 832x MDS evaluation board. The 832x MDS dts and defconfig files are pending more tests. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>