summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/52xx
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2010-08-064-40/+36Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (63 commits) of/platform: Register of_platform_drivers with an "of:" prefix of/address: Clean up function declarations of/spi: call of_register_spi_devices() from spi core code of: Provide default of_node_to_nid() implementation. of/device: Make of_device_make_bus_id() usable by other code. of/irq: Fix endian issues in parsing interrupt specifiers of: Fix phandle endian issues of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string of: remove of_default_bus_ids of: make of_find_device_by_node generic microblaze: remove references to of_device and to_of_device sparc: remove references to of_device and to_of_device powerpc: remove references to of_device and to_of_device of/device: Replace of_device with platform_device in includes and core code of/device: Protect against binding of_platform_drivers to non-OF devices of: remove asm/of_device.h of: remove asm/of_platform.h of/platform: remove all of_bus_type and of_platform_bus_type references of: Merge of_platform_bus_type with platform_bus_type drivercore/of: Add OF style matching to platform bus ... Fix up trivial conflicts in arch/microblaze/kernel/Makefile due to just some obj-y removals by the devicetree branch, while the microblaze updates added a new file.
| * of/address: Clean up function declarationsGrant Likely2010-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch moves the declaration of of_get_address(), of_get_pci_address(), and of_pci_address_to_resource() out of arch code and into the common linux/of_address header file. This patch also fixes some of the asm/prom.h ordering issues. It still includes some header files that it ideally shouldn't be, but at least the ordering is consistent now so that of_* overrides work. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc: remove references to of_device and to_of_deviceGrant Likely2010-07-243-8/+8
| | | | | | | | | | | | | | of_device is just a #define alias to platform_device. This patch replaces all references to it with platform_device. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * of/gpio: add default of_xlate function if device has a node pointerAnton Vorontsov2010-07-062-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement generic OF gpio hooks and thus make device-enabled GPIO chips (i.e. the ones that have gpio_chip->dev specified) automatically attach to the OpenFirmware subsystem. Which means that now we can handle I2C and SPI GPIO chips almost* transparently. * "Almost" because some chips still require platform data, and for these chips OF-glue is still needed, though with this change the glue will be much smaller. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Bill Gatliff <bgat@billgatliff.com> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jean Delvare <khali@linux-fr.org> Cc: Andrew Morton <akpm@linux-foundation.org> CC: linux-kernel@vger.kernel.org CC: devicetree-discuss@lists.ozlabs.org
| * of/gpio: stop using device_node data pointer to find gpio_chipGrant Likely2010-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the kernel uses the struct device_node.data pointer to resolve a struct gpio_chip pointer from a device tree node. However, the .data member doesn't provide any type checking and there aren't any rules enforced on what it should be used for. There's no guarantee that the data stored in it actually points to an gpio_chip pointer. Instead of relying on the .data pointer, this patch modifies the code to add a lookup function which scans through the registered gpio_chips and returns the gpio_chip that has a pointer to the specified device_node. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> CC: Andrew Morton <akpm@linux-foundation.org> CC: Anton Vorontsov <avorontsov@ru.mvista.com> CC: Grant Likely <grant.likely@secretlab.ca> CC: David Brownell <dbrownell@users.sourceforge.net> CC: Bill Gatliff <bgat@billgatliff.com> CC: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Jean Delvare <khali@linux-fr.org> CC: linux-kernel@vger.kernel.org CC: devicetree-discuss@lists.ozlabs.org
| * of/gpio: Kill of_gpio_chip and add members directly to gpio_chipAnton Vorontsov2010-07-062-31/+30Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OF gpio infrastructure is great for describing GPIO connections within the device tree. However, using a GPIO binding still requires changes to the gpio controller just to add an of_gpio structure. In most cases, the gpio controller doesn't actually need any special support and the simple OF gpio mapping function is more than sufficient. Additional, the current scheme of using of_gpio_chip requires a convoluted scheme to maintain 1:1 mappings between of_gpio_chip and gpio_chip instances. If the struct of_gpio_chip data members were moved into struct gpio_chip, then it would simplify the processing of OF gpio bindings, and it would make it trivial to use device tree OF connections on existing gpiolib controller drivers. This patch eliminates the of_gpio_chip structure and moves the relevant fields into struct gpio_chip (conditional on CONFIG_OF_GPIO). This move simplifies the existing code and prepares for adding automatic device tree support to existing drivers. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Bill Gatliff <bgat@billgatliff.com> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jean Delvare <khali@linux-fr.org>
* | powerpc: Clean up obsolete code relating to decrementer and timebasePaul Mackerras2010-07-092-6/+0Star
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Since the decrementer and timekeeping code was moved over to using the generic clockevents and timekeeping infrastructure, several variables and functions have been obsolete and effectively unused. This deletes them. In particular, wakeup_decrementer() is no longer needed since the generic code reprograms the decrementer as part of the process of resuming the timekeeping code, which happens during sysdev resume. Thus the wakeup_decrementer calls in the suspend_enter methods for 52xx platforms have been removed. The call in the powermac cpu frequency change code has been replaced by set_dec(1), which will cause a timer interrupt as soon as interrupts are enabled, and the generic code will then reprogram the decrementer with the correct value. This also simplifies the generic_suspend_en/disable_irqs functions and makes them static since they are not referenced outside time.c. The preempt_enable/disable calls are removed because the generic code has disabled all but the boot cpu at the point where these functions are called, so we can't be moved to another cpu. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/5200: fix oops during going to standbyDmitry Baryshkov2010-06-151-1/+10
| | | | | | | | | | | | When going to standby mode mpc code maps the whole soc5200 node to access warious MBAR registers. However as of_iomap uses 'reg' property of device node, only small part of MBAR is getting mapped. Thus pm code gets oops when trying to access high parts of MBAR. As a way to overcome this, make mpc52xx_pm_prepare() explicitly map whole MBAR (0xc0000). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* of: Remove duplicate fields from of_platform_driverGrant Likely2010-05-223-9/+20
| | | | | | | | | | | | | | | | .name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
* of: Always use 'struct device.of_node' to get device node pointer.Grant Likely2010-05-193-13/+13
| | | | | | | | | | | | The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* Merge branch 'master' into export-slabhTejun Heo2010-04-051-0/+2
|\
| * powerpc/5200: in lpbfifo, flag DMA irqs as enabled after requesting themRoman Fietze2010-03-271-0/+2
| | | | | | | | | | | | | | | | | | This patch avoids unbalanced enable/disable messages for the DMA interrupts when running the 5200 platform SCLPC/BestComm driver in DMA mode. Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-302-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* powerpc/5200: Build fix for mpc52xx watchdog timer codeGrant Likely2010-03-181-1/+5
| | | | | | | | | | | | mpc52xx_gpt_wdt_setup is defined as 0, which causes the following build failure with gcc 4.5, since it's built with -Werror. arch/powerpc/platforms/52xx/mpc52xx_gpt.c:761:3: error: statement with no effect Changing it to a static inline fixes the problem. Reported-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* [WATCHDOG] watchdog_info constifyWim Van Sebroeck2010-03-071-1/+1
| | | | | | | make the watchdog_info struct const where possible. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Merge branch 'for-33' of git://repo.or.cz/linux-kbuildLinus Torvalds2009-12-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits) net: fix for utsrelease.h moving to generated gen_init_cpio: fixed fwrite warning kbuild: fix make clean after mismerge kbuild: generate modules.builtin genksyms: properly consider EXPORT_UNUSED_SYMBOL{,_GPL}() score: add asm/asm-offsets.h wrapper unifdef: update to upstream revision 1.190 kbuild: specify absolute paths for cscope kbuild: create include/generated in silentoldconfig scripts/package: deb-pkg: use fakeroot if available scripts/package: add KBUILD_PKG_ROOTCMD variable scripts/package: tar-pkg: use tar --owner=root Kbuild: clean up marker net: add net_tstamp.h to headers_install kbuild: move utsrelease.h to include/generated kbuild: move autoconf.h to include/generated drop explicit include of autoconf.h kbuild: move compile.h to include/generated kbuild: drop include/asm kbuild: do not check for include/asm-$ARCH ... Fixed non-conflicting clean merge of modpost.c as per comments from Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h that needed to be changed to generated/autoconf.h)
| * kbuild: move utsrelease.h to include/generatedSam Ravnborg2009-12-121-1/+1
| | | | | | | | | | | | | | Fix up all users of utsrelease.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | genirq: Convert irq_desc.lock to raw_spinlockThomas Gleixner2009-12-141-4/+4
| | | | | | | | | | | | | | | | | | Convert locks which cannot be sleeping locks in preempt-rt to raw_spinlocks. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Ingo Molnar <mingo@elte.hu>
* | Merge branch 'next' of ↵Linus Torvalds2009-12-126-23/+991
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (151 commits) powerpc: Fix usage of 64-bit instruction in 32-bit altivec code MAINTAINERS: Add PowerPC patterns powerpc/pseries: Track previous CPPR values to correctly EOI interrupts powerpc/pseries: Correct pseries/dlpar.c build break without CONFIG_SMP powerpc: Make "intspec" pointers in irq_host->xlate() const powerpc/8xx: DTLB Miss cleanup powerpc/8xx: Remove DIRTY pte handling in DTLB Error. powerpc/8xx: Start using dcbX instructions in various copy routines powerpc/8xx: Restore _PAGE_WRITETHRU powerpc/8xx: Add missing Guarded setting in DTLB Error. powerpc/8xx: Fixup DAR from buggy dcbX instructions. powerpc/8xx: Tag DAR with 0x00f0 to catch buggy instructions. powerpc/8xx: Update TLB asm so it behaves as linux mm expects. powerpc/8xx: Invalidate non present TLBs powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate pseries/pseries: Add code to online/offline CPUs of a DLPAR node powerpc: stop_this_cpu: remove the cpu from the online map. powerpc/pseries: Add kernel based CPU DLPAR handling sysfs/cpu: Add probe/release files powerpc/pseries: Kernel DLPAR Infrastructure ...
| * powerpc: Make "intspec" pointers in irq_host->xlate() constRoman Fietze2009-12-093-3/+3
| | | | | | | | | | | | | | | | | | | | Writing a driver using SCLPC on the MPC5200B I detected, that the intspec arrays to map irqs to Linux virq cannot be const, because the mapping and xlate functions only take non const pointers. All those functions do not modify the intspec, so a const pointer could be used. Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * Merge commit 'gcl/next' into nextBenjamin Herrenschmidt2009-12-094-13/+981
| |\
| | * mpc52xx/wdt: merge WDT code into the GPT driverAlbrecht Dreß2009-11-131-16/+305
| | | | | | | | | | | | | | | | | | | | | Merge the WDT code into the GPT interface. Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * mpc5200/gpt: tiny fix for gpt period limitationAlbrecht Dreß2009-11-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch changes the period parameter of mpc52xx_gpt_start_timer to a u64 to support larger timeout periods. Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * powerpc/5200: add LocalPlus bus FIFO device driverJohn Bonesio2009-11-053-0/+566
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a driver for the FIFO device on the LocalPlus bus on an mpc5200 system. The driver supports programmed I/O through the FIFO as well as setting up DMA via the BestComm engine through the FIFO. Signed-off-by: John Bonesio <bones@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * powerpc/5200: add general purpose timer API for the MPC5200Grant Likely2009-11-051-10/+123
| | | | | | | | | | | | | | | | | | | | | This patch adds an interface for controlling the timer function of the MPC5200 GPT devices. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | powerpc: Fixup last users of irq_chip->typenameThomas Gleixner2009-11-243-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typename member of struct irq_chip was kept for migration purposes and is obsolete since more than 2 years. Fix up the leftovers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linuxppc-dev@ozlabs.org Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc: Remove get_irq_desc()Michael Ellerman2009-10-301-1/+1
| |/ | | | | | | | | | | | | | | | | | | get_irq_desc() is a powerpc-specific version of irq_to_desc(). That is reason enough to remove it, but it also doesn't know about sparse irq_desc support which irq_to_desc() does (when we enable it). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* / tree-wide: fix assorted typos all over the placeAndré Goddard Rosa2009-12-041-1/+1
|/ | | | | | | | | | That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* mpc5200: support for the MAN mpc5200 based board mucmc52Heiko Schocher2009-10-151-0/+1
| | | | | | | | | | | | - serial Console on PSC1 - 64MB SDRAM - MTD CFI Flash - Ethernet FEC - IDE support Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* mpc5200: support for the MAN mpc5200 based board uc101Heiko Schocher2009-10-151-0/+1
| | | | | | | | | | | | | - serial Console on PSC1 - 64MB SDRAM - MTD CFI Flash - Ethernet FEC - I2C with PCF8563 and Temp. Sensor ADM9240 - IDE support Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() functionWolfgang Denk2009-06-171-31/+1Star
| | | | | | | | | | | So far, MPC512x used mpc512x_find_ips_freq() to get the bus frequency, while MPC52xx used mpc52xx_find_ipb_freq(). Despite the different clock names (IPS vs. IPB) the code was identical. Use common code for both processor families. Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/pci: Clean up direct access to sysdata by 52xx platformsKumar Gala2009-05-212-4/+4
| | | | | | | | | | We shouldn't directly access sysdata to get the pci_controller. Instead use pci_bus_to_host() for this purpose. In the future we might have sysdata be a device_node to match ppc64 and unify the code between ppc32 & ppc64. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Merge commit 'gcl/next' into nextBenjamin Herrenschmidt2009-03-204-40/+40
|\
| * powerpc/5200: add Phytec phyCORE-MPC5200B-IO board (pcm032)Wolfram Sang2009-03-112-1/+3
| | | | | | | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/5200: add function to return external clock frequencyWolfgang Grandegger2009-03-111-0/+37
| | | | | | | | | | | | | | | | | | | | | | This patch adds the utility function mpc52xx_get_xtal_freq() to get the frequency of the external oscillator clock connected to the pin SYS_XTAL_IN. The MSCAN may us it as clock source. Unfortunately, this value is not available from the FDT blob, but it can be determined from the IPB frequency. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/5200: remove sysfs debug file from GPT driverGrant Likely2009-03-111-39/+0Star
| | | | | | | | | | | | | | Remove poorly designed debug sysfs attribute entry from the GPT driver. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
* | powerpc/kconfig: Kill PPC_MULTIPLATFORMBenjamin Herrenschmidt2009-03-111-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | CONFIG_PPC_MULTIPLATFORM is a remain of the pre-powerpc days and isn't really meaningful anymore. It was basically equivalent to PPC64 || 6xx. This removes it along with the following changes: - 32-bit platforms that relied on PPC32 && PPC_MULTIPLATFORM now rely on 6xx which is what they want anyway. - A new symbol, PPC_BOOK3S, is defined that represent compliance with the "Server" variant of the architecture. This is set when either 6xx or PPC64 is set and open the door for future BOOK3E 64-bit. - 64-bit platforms that relied on PPC64 && PPC_MULTIPLATFORM now use PPC64 && PPC_BOOK3S - A separate and selectable CONFIG_PPC_OF_BOOT_TRAMPOLINE option is now used to control the use of prom_init.c Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/5200: Add 'simple-bus' to the of_platform probe list.Grant Likely2009-02-271-1/+2
| | | | | | | To better match the ePAPR specification, device nodes which claim "simple-bus" compatibility should be probed by default. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/5200: Add support for the digsy MTC board.Grzegorz Bernacki2009-02-042-1/+7
| | | | | | | Board support for the InterControl Digsy-MTC device based on the MPC5200B SoC. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/5200: Add support for the Media5200 board from FreescaleGrant Likely2009-02-043-0/+279
| | | | | | | | | | | | This patch adds board support for the Media5200 platform. Changes are: - add the media5200 device tree - add the media5200 platform support code and cascaded interrupt controller - add media5200 to the build targets. Note: this patch also includes a minor tweak to the lite5200(b) target images list to add the .dtb files to the image list. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/5200: Rework GPT driver to also be an IRQ controllerGrant Likely2009-02-043-86/+436
| | | | | | | | | | | | | | | | | | | | | | | This patch adds IRQ controller support to the MPC5200 General Purpose Timer (GPT) device driver. With this patch the mpc5200-gpt driver supports both GPIO and IRQ functions. The GPT driver was contained within the mpc52xx_gpio.c file, but this patch moves it out into a new file (mpc52xx_gpt.c) since it has more than just GPIO functionality now and it was only grouped with the mpc52xx-gpio drivers as a matter of convenience before. Also, this driver will most likely get extended again to also provide support for the timer function. Implementation note: Alternately, I could have tried to implement the IRQ support as a separate driver and left the GPIO portion alone. However, multiple functions of this device (ie. GPIO input+interrupt controller, or timer+GPIO) can be active at the same time and the registers are shared so it is safer to contain all functionality within a single driver. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
* powerpc/5200: Refactor mpc5200 interrupt controller driverGrant Likely2009-02-041-88/+59Star
| | | | | | | | | | | Rework the mpc5200-pic driver to simplify it and fix up the setting of desc->status when set_type is called for internal IRQs (so they are reported as level, not edge). The simplification is due to splitting off the handling of external IRQs into a separate block so they don't need to be handled as exceptions in the normal CRIT, MAIN and PERP paths. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/5200: Remove pr_debug() from hot paths in irq driverGrant Likely2009-02-041-23/+0Star
| | | | | | | | | pr_debug() calls in the 'hot' *_mask(), *_unmask(), *_ack() and get_irq() makes adding #define DEBUG pretty much useless. Remove these calls because they completely swamp the output. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
* powerpc/5200: Bugfix for PCI mapping of memory and IMMRGrant Likely2009-01-301-14/+10Star
| | | | | | | | | | | | | | | | | | This patch ensures that memory gets properly mapped into the PCI address space. Without this patch, the memory window BAR is left at whatever value happened to be loaded into the BAR when Linux was booted. Without this patch, memory could end up getting mapped at any of the 1G address boundaries instead of at '0' where Linux expects it. Similarly, this patch also ensures that the internally memory mapped registers (IMMR) are mapped to the correct PCI address range. Without this patch, PCI appears to work correctly until a PCI device is inserted which DMAs into memory. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
* powerpc/mpc52xx: remove dead code from GPIO driverWolfram Sang2009-01-091-3/+0Star
| | | | | | | Eliminate duplicate return statements Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/mpc52xx: Properly update irq_desc when set_type() is called.Grant Likely2009-01-091-1/+7
| | | | | | | | | | | The MPC5200 PIC driver doesn't correctly update the .status field of the irq_desc structure when the set_type hook is called. This patch adds the required code. Also cleans up the external IRQ typename field to be something easier to read (very minor). Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/52xx: Use DEFINE_SPINLOCKJulia Lawall2009-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | SPIN_LOCK_UNLOCKED is deprecated. The following makes the change suggested in Documentation/spinlocks.txt The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ declarer name DEFINE_SPINLOCK; identifier xxx_lock; @@ - spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED; + DEFINE_SPINLOCK(xxx_lock); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/mpc5200: Make internal 5200 PIC the default interrupt controllerGrant Likely2008-12-211-0/+2
| | | | | | | | | | The MPC5200 internal interrupt controller setup function needs to set the default interrupt controller when it is called. Without this irq_create_of_mapping() cannot be called without first determining the pointer to the irq controller (ie. call with controller = NULL). Reported-by: Steven Cavanagh <scavanagh@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/mpc5200: Document and tidy irq driverGrant Likely2008-12-214-122/+170
| | | | | | | | | | | | This patch adds documentation to the mpc5200 interrupt controller driver and cleans up some minor coding conventions. It also moves the contents of mpc52xx_pic.h into the driver proper (except for a small common bit that is moved to the common mpc52xx.h) because the information encoded there is not required by any other part of kernel code. Finally for code readability sake, the L2_OFFSET shift value is removed because the code using it resolves to a noop. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc: Introduce ppc_pci_flags accessorsJosh Boyer2008-12-161-1/+1
| | | | | | | | | | | | | Currently there are a number of platforms that open code access to the ppc_pci_flags global variable. However, that variable is not present if CONFIG_PCI is not set, which can lead to a build break. This introduces a number of accessor functions that are defined to be empty in the case of CONFIG_PCI being disabled. The various platform files in the kernel are updated to use these. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>