aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/alchemy/common
AgeCommit message (Collapse)AuthorFilesLines
2014-07-30MIPS: Alchemy: introduce helpers to access SYS register block.Manuel Lauss5-34/+28
This patch changes all absolute SYS_XY registers to offsets from the SYS block base, prefixes them with AU1000 to avoid silent failures due to changed addresses, and introduces helper functions to read/write them. No functional changes, comparing assembly of a few select functions shows no differences. Signed-off-by: Manuel Lauss <[email protected]> Cc: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/7464/ Signed-off-by: Ralf Baechle <[email protected]>
2014-05-28MIPS: Alchemy: Default to noncoherent IO on Au1200 ABManuel Lauss2-24/+8
CONFIG_DMA_COHERENT is no longer set; default to noncoherent io on Au1200 revision AB to make USB work. Signed-off-by: Manuel Lauss <[email protected]> Cc: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/6745/ Signed-off-by: Ralf Baechle <[email protected]>
2014-03-31MIPS: Fix gigaton of warning building with microMIPS.Ralf Baechle1-3/+3
With binutils 2.24 the attempt to switch with microMIPS mode to MIPS III mode through .set mips3 results in *lots* of warnings like {standard input}: Assembler messages: {standard input}:397: Warning: the 64-bit MIPS architecture does not support the `smartmips' extension during a kernel build. Fixed by using .set arch=r4000 instead. This breaks support for building the kernel with binutils 2.13 which was supported for 32 bit kernels only anyway and 2.14 which was a bad vintage for MIPS anyway. Signed-off-by: Ralf Baechle <[email protected]>
2014-03-26MIPS: Alchemy: Determine cohereny at runtime based on cpu typeManuel Lauss1-0/+10
All Alchemy chips have coherent DMA, but for example the USB or AC97 peripherals on the Au1000/1500/1100 are not. This patch uses DMA_MAYBE_COHERENT on Alchemy and sets coherentio based on CPU type. Signed-off-by: Manuel Lauss <[email protected]> Cc: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/6576/ Signed-off-by: Ralf Baechle <[email protected]>
2014-01-24mips: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/6320/
2013-09-18MIPS: Cleanup CP0 PRId and CP1 FPIR register access masksMaciej W. Rozycki1-1/+2
Replace hardcoded CP0 PRId and CP1 FPIR register access masks throughout. The change does not touch places that use shifted or partial masks. Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5838/ Signed-off-by: Ralf Baechle <[email protected]>
2013-05-22MIPS: Idle: Consolidate all declarations in <asm/idle.h>.Ralf Baechle1-0/+1
Signed-off-by: Ralf Baechle <[email protected]>
2013-02-01MIPS: Whitespace cleanup.Ralf Baechle8-118/+118
Having received another series of whitespace patches I decided to do this once and for all rather than dealing with this kind of patches trickling in forever. Signed-off-by: Ralf Baechle <[email protected]>
2012-12-27MIPS: Alchemy: Make 32kHz and r4k timer coexist peacefullyManuel Lauss1-20/+5
Now that the r4k timer is registered no matter what, bump the rating of the Alchemy 32kHz timer so that it gets used when it is working, and fall back on the r4k when it isn't. This fixes a timer-related hang on platform with a working 32kHz timer (the better rated c0 timer stops while executing 'wait' leading to (almost) eternal sleep) and an oops on boot on platforms without a working 32kHz timer (due to double registration of the r4k timer). Signed-off-by: Manuel Lauss <[email protected]> Cc: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/4728/ Signed-off-by: Ralf Baechle <[email protected]>
2012-10-22USB: move common alchemy USB routines to arch/mips/alchemy/common.cFlorian Fainelli2-1/+615
A previous patch converted the Alchemy platform to use the OHCI and EHCI platform drivers. As a result, all the common logic to handle USB present in drivers/usb/host/alchemy-common.c has no reason to remain here, so we move it to arch/mips/alchemy/common/usb.c which is a more appropriate place. This change was suggested by Manuel Lauss. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-22MIPS: Alchemy: use the OHCI platform driverFlorian Fainelli1-2/+33
Convert the Alchemy platform to register the ohci-platform driver, now that the ohci-platform driver properly handles the specific ohci-au1xxx resume from suspend case. This also greatly simplifies the power_{on,off} callbacks and make them work on platform device id instead of checking the OHCI controller base address like what was done in ohci-au1xxx.c. Impacted defconfigs are also updated accordingly to select the OHCI platform driver. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-22MIPS: Alchemy: use the ehci platform driverFlorian Fainelli1-1/+22
Use the ehci platform driver power_{on,suspend,off} callbacks to perform the USB block gate enabling/disabling as what the ehci-au1xxx.c driver does. Update the db1200 and db1300 defconfigs to now select the EHCI platform driver. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-23MIPS: Alchemy: Use kmemdup rather than duplicating its implementationThomas Meyer1-6/+4
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3058/ Signed-off-by: Ralf Baechle <[email protected]>
2012-02-20MIPS: Alchemy: Increase minimum timeout for 32kHz timer.Manuel Lauss1-1/+1
Since a clocksource change post 3.2-rc1, tasks on my DB1500 board hang after random amounts of time (from a few minutes to a few hours), regardless of load. Debugging showed that the compare-match register value is a few seconds lower than the current counter value. The minimum value of 8 was initialy determined by a trial-and-error approach. Currently it is sufficient for all Alchemys (without PCI apparently), independent of CPU clock; only the DB1500 and DB1550 boards experience these timer-related tasks hangs now. This patch increases the minimum timeout by 1 (to 9 counter ticks) which seems sufficient since the systems are still working perfectly fine after over 24 hours. Signed-off-by: Manuel Lauss <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3214/ Signed-off-by: Ralf Baechle <[email protected]>
2012-01-11Merge branch 'next/alchemy' into mips-for-linux-nextRalf Baechle9-267/+892
2011-12-08MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.Manuel Lauss3-587/+550
With a generic plat_irq_dispatch (for Alchemy at least) code for both interrupt controller types can coexist in a single kernel image and be autodetected at runtime. Signed-off-by: Manuel Lauss <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2935/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-08MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controllerManuel Lauss2-49/+39
IC and GPIC are now chain handlers of the traditional MIPS IRQ controller. Signed-off-by: Manuel Lauss <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2933/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-08MIPS: Alchemy: irq: register pm at irq init timeManuel Lauss2-96/+91
No need for a device_initcall. Signed-off-by: Manuel Lauss <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2934/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: irq: Remove IRQF_DISABLEDYong Zhang2-3/+2
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. [[email protected]: Fixed up conflicts in arch/mips/alchemy/common/dbdma.c, arch/mips/cavium-octeon/smp.c and arch/mips/kernel/perf_event.c.] Signed-off-by: Yong Zhang <[email protected]> To: [email protected] Cc: [email protected] [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2835/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: Alchemy: Au1300 SoC supportManuel Lauss9-3/+691
Add basic support for the Au1300 variant(s): - New GPIO/Interrupt controller - DBDMA ids - USB setup - MMC support - enable various PSC drivers - detection code. Signed-off-by: Manuel Lauss <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2866/ Signed-off-by: Ralf Baechle <[email protected]>
2011-12-07MIPS: Alchemy: remove PB1000 supportManuel Lauss1-11/+0
Noone seems to have test hardware or care anymore. Drop PB1000 support and along with it the old Alchemy PCMCIA socket driver. Signed-off-by: Manuel Lauss <[email protected]> To: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2881/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24MIPS: Alchemy: remove all CONFIG_SOC_AU1??? definesManuel Lauss1-173/+2
Now that no driver any longer depends on the CONFIG_SOC_AU1??? symbols, it's time to get rid of them: Move some of the platform devices to the boards which can use them, Rename a few (unused) constants in the header, Replace them with MIPS_ALCHEMY in the various Kconfig files. Finally delete them altogether from the Alchemy Kconfig file. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2707/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24MIPS: Alchemy: kill au1xxx.h headerManuel Lauss1-1/+1
No longer required Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2705/ Signed-off-by: Ralf Baechle <[email protected]> delete mode 100644 arch/mips/include/asm/mach-au1x00/au1xxx.h
2011-10-24MIPS: Alchemy: clean DMA code of CONFIG_SOC_AU1??? definesManuel Lauss3-152/+127
This patch gets rid of all CONFIG_SOC_AU1XXX defines in DMA/DBDMA-related code. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2704/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24MIPS: Alchemy: Redo PCI as platform driverManuel Lauss3-109/+3
- Rewrite Alchemy PCI support as a platform driver. - Fixup boards which have PCI. Run-tested on DB1500 and DB1550. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2706/ Signed-off-by: Ralf Baechle <[email protected]> delete mode 100644 arch/mips/alchemy/common/pci.c delete mode 100644 arch/mips/pci/fixup-au1000.c delete mode 100644 arch/mips/pci/ops-au1000.c create mode 100644 arch/mips/pci/pci-alchemy.c
2011-10-24MIPS: Alchemy: more base address cleanupManuel Lauss1-6/+6
remove all redundant peripheral base address defines, fix all affected boards and drivers. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2700/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24MIPS: Alchemy: rewrite USB platform setup.Manuel Lauss1-108/+75
Use runtime CPU detection to setup all USB parts. Remove the Au1200 OTG and UDC platform devices since there are no drivers for them anyway. Clean up the USB address mess in the au1000 header. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2703/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24MIPS: Alchemy: abstract USB block control register accessManuel Lauss2-48/+6
Alchemy chips have one or more registers which control access to the usb blocks as well as PHY configuration. I don't want the OHCI/EHCI glues to know about the different registers and bits; new code hides the gory details of USB configuration from them. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: [email protected] Acked-by: Greg Kroah-Hartman <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2709/ Signed-off-by: Ralf Baechle <[email protected]> create mode 100644 drivers/usb/host/alchemy-common.c
2011-10-24MIPS: Alchemy: support multiple GPIO styles in one kernelManuel Lauss2-17/+22
For GPIOLIB=y decide at runtime which gpiochips to register; in the GPIOLIB=n case, the gpio headers need to be reshuffled a bit to make multiple implementations coexist peacefully. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2679/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24MIPS: Alchemy: Always build power codeManuel Lauss1-4/+0
No reason NOT to build it Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2678/ Signed-off-by: Ralf Baechle <[email protected]>
2011-10-24NET: au1000_eth: Pass MACDMA address through platform resource info.Manuel Lauss1-9/+21
This patch removes the last hardcoded base address from the au1000_eth driver. The base address of the MACDMA unit was derived from the platform device id; if someone registered the MACs in inverse order both would not work. So instead pass the base address of the DMA unit to the driver with the other platform resource information. Signed-off-by: Manuel Lauss <[email protected]> Acked-by: David S. Miller <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2674/ Signed-off-by: Ralf Baechle <[email protected]>
2011-09-21MIPS: Alchemy: Include Au1100 in PM code.Manuel Lauss1-8/+14
The current code forgets the Au1100 when looking for the correct method to suspend the chip. Signed-off-by: Manuel Lauss <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2675/ Signed-off-by: Ralf Baechle <[email protected]>
2011-09-21MIPS: Alchemy: Fix typo in MAC0 registrationManuel Lauss1-1/+1
Harmless typo which prints an error message although MAC0 was registered successfully. Signed-off-by: Manuel Lauss <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2672/ Signed-off-by: Ralf Baechle <[email protected]>
2011-05-19Merge branch 'timers-clocksource-for-linus' of ↵Linus Torvalds1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: clocksource: convert mips to generic i8253 clocksource clocksource: convert x86 to generic i8253 clocksource clocksource: convert footbridge to generic i8253 clocksource clocksource: add common i8253 PIT clocksource blackfin: convert to clocksource_register_hz mips: convert to clocksource_register_hz/khz sparc: convert to clocksource_register_hz/khz alpha: convert to clocksource_register_hz microblaze: convert to clocksource_register_hz/khz ia64: convert to clocksource_register_hz/khz x86: Convert remaining x86 clocksources to clocksource_register_hz/khz Make clocksource name const
2011-05-19MIPS: Alchemy: Cleanup DMA addressesManuel Lauss2-25/+29
According to the databooks, the Au1000 DMA engine must be programmed with the physical FIFO addresses. This patch does that; furthermore this opened the possibility to get rid of a lot of now unnecessary address defines. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2348/ Signed-off-by: Ralf Baechle <[email protected]
2011-05-19MIPS: Alchemy: Rewrite ethernet platform setupManuel Lauss1-50/+101
Rewrite ethernet setup to use runtime cpu detection, and also clean up the ethernet base address mess as far as possible. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2353/ Signed-off-by: Ralf Baechle <[email protected]
2011-05-19MIPS: Alchemy: Rewrite UART setup and constants.Manuel Lauss1-42/+51
Detect CPU type at runtime and setup uarts accordingly; also clean up the uart base address mess in the process as far as possible. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2352/ Signed-off-by: Ralf Baechle <[email protected]
2011-05-19MIPS: Alchemy: Convert dbdma.c to syscore_opsManuel Lauss1-78/+45
Convert the PM sysdev to syscore_ops and clean up the ddma addresses a bit. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2351/ Signed-off-by: Ralf Baechle <[email protected]>
2011-05-19MIPS: Alchemy: Convert irq.c to syscore_ops.Manuel Lauss1-60/+41
Convert the PM sysdev to use syscore_ops instead. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2350/ Signed-off-by: Ralf Baechle <[email protected]>
2011-05-19MIPS: Alchemy: irq code and constant cleanupManuel Lauss1-115/+135
replace au_readl/au_writel with __raw_readl/__raw_writel, and clean up IC-related stuff from the headers. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2354/ Signed-off-by: Ralf Baechle <[email protected]>
2011-05-19MIPS: DB1200: Set Config[OD] for improved stability.Manuel Lauss1-2/+2
Setting Config[OD] gets rid of a _LOT_ of spurious CPLD interrupts, but also decreases overall performance a bit. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Wolfgang Grandegger <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/2347/ Signed-off-by: Ralf Baechle <[email protected]>
2011-05-14Merge branch 'consolidate-clksrc-i8253' of ↵Thomas Gleixner2-49/+51
master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource Conflicts: arch/ia64/kernel/cyclone.c arch/mips/kernel/i8253.c arch/x86/kernel/i8253.c Reason: Resolve conflicts so further cleanups do not conflict further Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <[email protected]>
2011-03-25MIPS: Alchemy: Convert to new irq chip functionsThomas Gleixner1-48/+50
Fix the deadlock in set_type() while at it: The code called set_irq_chip_and_handler_name() resp. set_irq_chip() from the set_type() callback. That only works on UP and lock debugging disabled. Otherwise it would dead lock on desc->lock. __irq_set_chip_handler_name_locked() avoids that. Signed-off-by: Thomas Gleixner <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/2173/ Signed-off-by: Ralf Baechle <[email protected]>
2011-02-21mips: convert to clocksource_register_hz/khzJohn Stultz1-2/+1
This converts the mips clocksources to use clocksource_register_hz/khz CC: Ralf Baechle <[email protected]> CC: Thomas Gleixner <[email protected]> Signed-off-by: John Stultz <[email protected]>
2010-12-22Merge branch 'master' into for-nextJiri Kosina1-0/+2
Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated.
2010-12-16MIPS: Alchemy: fix build with SERIAL_8250=nManuel Lauss1-0/+2
In commit 7d172bfe ("Alchemy: Add UART PM methods") I introduced platform PM methods which call a function of the 8250 driver; this patch works around link failures when the kernel is built without 8250 support. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/1737/ Signed-off-by: Ralf Baechle <[email protected]>
2010-11-01tree-wide: fix comment/printk typosUwe Kleine-König1-1/+1
"gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-10-22Alchemy: Add UART PM methods.Manuel Lauss2-35/+28
Custom UART PM hook for Alchemy chips: do standard UART pm and additionally en/disable uart block clocks as needed. This allows to get rid of a debug port PM hack in the Alchemy pm code. Tested on Db1200. Signed-off-by: Manuel Lauss <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-10-04MIPS: Alchemy: Resolve prom section mismatchesManuel Lauss1-3/+2
The function prom_init_cmdline() references the variable __initdata arcs_cmdline. The function prom_get_ethernet_addr() references the variable __initdata arcs_cmdline. Annotate prom_init_cmdline() as __init, unexport and annotate prom_get_ethernet_addr() since it's no longer called from within driver code. Signed-off-by: Manuel Lauss <[email protected]> To: Linux-MIPS <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/1547/ Signed-off-by: Ralf Baechle <[email protected]>