aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k/platform
AgeCommit message (Collapse)Author
2014-09-29m68k: remove the unused arch/m68k/platform directoryGreg Ungerer
The non-mmu platform/machine directories have been move up one level. We no longer need arch/m68k/platform, or its Makefile, so remove them. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-09-29m68k: move non-mmu 68360 platform codeGreg Ungerer
The non-mmu 68360 specific code is inconsistently placed under a directory named "platform". Move it to arch/m68k/ along with the other platform and board directories. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-09-29m68k: move non-mmu 68000 platform codeGreg Ungerer
The non-mmu 68000 specific code is inconsistently placed under a directory named "platform". Move it to arch/m68k/ along with the other platform and machine directories. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-09-29m68k: move coldfire platform codeGreg Ungerer
Move the m68k ColdFire platform support code directory to be with the existing m68k platforms. Although the ColdFire is not a platform as such, we have always kept all its support together. No reason to change that as this time. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-26m68knommu: Make everything thats not exported, static.Steven King
Singed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26m68knommu: setting the gpio data direction register to output doesn't ↵Steven King
dependent upon the value to output! Singed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26m68knommu: add to_irq function so we can map gpios to external interrupts.Steven King
Singed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26m68knommu: qspi declutter.Steven King
Move the check for the QSPI config option inside the function body. If the option is not enabled, the compiler will optimize away the empty function body so we can remove the other check for the config option. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26m68knommu: Add qspi clk for Coldfire SoCs without real clks.Steven King
Since we now have fake clks on devices without real clocks, we need clks defined for qspi for the qspi driver to work on those devices. Signed-off-by: Steven King <sfking@fdwdc.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2014-05-26m68knommu: Fix mach_sched_init for EZ and VZ DragonBall chipsDaniel Palmer
Signed-off-by: Daniel Palmer <danieruru@gmail.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2013-11-13m68k: Simplify low level interrupt handling codeThomas Gleixner
The low level interrupt entry code of m68k contains the following: add_preempt_count(HARDIRQ_OFFSET); do_IRQ(); irq_enter(); add_preempt_count(HARDIRQ_OFFSET); handle_interrupt(); irq_exit(); sub_preempt_count(HARDIRQ_OFFSET); if (in_interrupt()) return; <---- On m68k always taken! if (local_softirq_pending()) do_softirq(); sub_preempt_count(HARDIRQ_OFFSET); if (in_hardirq()) return; if (status_on_stack_has_interrupt_priority_mask > 0) return; if (local_softirq_pending()) do_softirq(); ret_from_exception: if (interrupted_context_is_kernel) return: .... I tried to find a proper explanation for this, but the changelog is sparse and there are no mails explaining it further. But obviously this relates to the interrupt priority levels of the m68k and tries to be extra clever with nested interrupts. Though this cleverness just adds code bloat to the interrupt hotpath. For the common case of non nested interrupts the code runs through two extra conditionals to the only important one, which checks whether the return is to kernel or user space. For the nested case the checks for in_hardirq() and the priority mask value on stack catch only the case where the nested interrupt happens inside the hard irq context of the first interrupt. If the nested interrupt happens while the first interrupt handles soft interrupts, then these extra checks buy nothing. The nested interrupt will fall through to the final kernel/user space return check at ret_from_exception. Changing the code flow in the following way: do_IRQ(); irq_enter(); add_preempt_count(HARDIRQ_OFFSET); handle_interrupt(); irq_exit(); sub_preempt_count(HARDIRQ_OFFSET); if (in_interrupt()) return; if (local_softirq_pending()) do_softirq(); ret_from_exception: if (interrupted_context_is_kernel) return: makes the region protected by the hardirq count slightly smaller and the softirq handling is invoked with a minimal deeper stack. But otherwise it's completely functional equivalent and saves 104 bytes of text in arch/m68k/kernel/entry.o. This modification allows us further to get rid of the limitations which m68k puts on the preempt_count layout, so we can make the preempt count bits completely generic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Linux/m68k <linux-m68k@vger.kernel.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311112052360.30673@ionos.tec.linutronix.de
2013-11-11Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: "Summary: - __put_user_unaligned may/will be used by btrfs - m68k part of a global cleanup" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Remove deprecated IRQF_DISABLED m68k/m68knommu: Implement __get_user_unaligned/__put_user_unaligned()
2013-09-26m68k: Remove deprecated IRQF_DISABLEDMichael Opdenacker
This patch proposes to remove the IRQF_DISABLED flag from m68k architecture code. It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-09-09Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu fixes from Greg Ungerer: "Just a small collection of cleanups and fixes this time, no big changes. The most interresting are to make the m68k and m68knommu consistently use CONFIG_IOMAP, clean out some unused board config options and flush the cache on signal stack creation" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: remove 16 unused boards in Kconfig.machine m68k: define 'VM_DATA_DEFAULT_FLAGS' no matter whether has 'NOMMU' or not m68knommu: user generic iomap to support ioread*/iowrite* m68k/coldfire: flush cache when creating the signal stack frame m68knommu: Mark functions only called from setup_arch() __init
2013-08-26m68knommu: Mark functions only called from setup_arch() __initGeert Uytterhoeven
Some functions that are only called (indirectly) from setup_arch() lack __init annotations. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2013-07-25PCI: Delay enabling bridges until they're neededYinghai Lu
We currently enable PCI bridges after scanning a bus and assigning resources. This is often done in arch code. This patch changes this so we don't enable a bridge until necessary, i.e., until we enable a PCI device behind the bridge. We do this in the generic pci_enable_device() path, so this also removes the arch-specific code to enable bridges. [bhelgaas: changelog] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2013-06-14m68k/PCI: Remove redundant call of pci_bus_add_devices()Jiang Liu
pci_scan_bus() has called pci_bus_add_devices() already, so remove the redundant call of pci_bus_add_devices(). subsys_init() callbacks will be invoked before device_init() callbacks, so it should be safe to remove the redundant calls. [bhelgaas: split unicore32 into a separate patch] Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Greg Ungerer <gerg@uclinux.org>
2013-04-29m68knommu: enable Timer on coldfire 532xGreg Ungerer
This patch enables the initial Timer on coldfire 532x systems. Without this, the scheduler will not be triggered and the system hangs, after all sequential code is executed. It should also apply on later kernel versions. Signed-off-by: Christian Gieseler <christiangieseler@yahoo.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2013-04-29m68knommu: make ColdFire M532x platform support more v3 genericGreg Ungerer
The M532x CPU platform support can be used on more ColdFire CPU families than just the 532x types. So rename and reconfigure it to reflect that. The ColdFire 537x family has virtualy identical internals to the 532x, and so it will be able to share this code when we add support for them. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2013-04-29m68knommu: create and use a common M53xx ColdFire class of CPUsGreg Ungerer
The current CONFIG_M532x support definitions are actually common to a larger set of version 3 ColdFire CPU types. In the future we want to add support for the 537x family. It is very similar to the 532x internally, and will be able to use most of the same definitions. Create a CONFIG_M53xx option that is enabled to support any of the common 532x and 537x CPU types. Convert the current users of CONFIG_M532x to use CONFIG_M53xx instead. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2013-03-04m68knommu: fix misnamed GPIO pin definition for ColdFire 528x CPUGreg Ungerer
Compiling for a ColdFire 528x CPU will result in: arch/m68k/platform/coldfire/m528x.c: In function ‘m528x_uarts_init’: arch/m68k/platform/coldfire/m528x.c:72: error: ‘MCF5282_GPIO_PUAPAR’ undeclared (first use in this function) arch/m68k/platform/coldfire/m528x.c:72: error: (Each undeclared identifier is reported only once arch/m68k/platform/coldfire/m528x.c:72: error: for each function it appears in.) The MCF5282_GPIO_PUAPAR definition changed names in the ColdFire definitions cleanup. It is now MCFGPIO_PUAPAR, so change it. Not sure how this one got missed, 2 lines below it is the correct use of this definition. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: modify clock code so it can be used by all ColdFire CPU typesGreg Ungerer
The existing clk.c code for ColdFire CPUs has one set of functions to support those CPU types that have selectable clocks (those with a PPMCR register), and a duplicate simpler set for those with static clocks. Modify the clk.c code so there is just one set of support functions. All CPU types now define a list of clocks (in "struct clk"s), so we only need a single set of clock functions. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 54xx ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 54xx ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 5407 ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 5407 ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 5307 ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 5307 ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 528x ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 528x ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 527x ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 527x ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 5272 ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 5272 ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 525x ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 525x ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 5249 ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 5249 ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 523x ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 523x ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: add clock definitions for 5206 ColdFire CPU typesGreg Ungerer
Add a base set of clocks for the 5206 ColdFire CPU types. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: merge ColdFire 5249 and 525x definitionsGreg Ungerer
The ColdFire 5249 and 525x family of SoCs are very similar. Most of the internals are the same, and are mapped the same. We can use a single set of peripheral definitions for all of them. So merge the current m5249sim.h and m525xsim.h definitions into a single file. The 5249 is now obsolete, and the 525x parts are current, so I have chosen to move everything into the existing m525xsim.h file. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-12-05m68knommu: platform code merge for 68000 core cpusLuis Alves
This patch merges all 68000 core cpus into one directory. There is a lot of common code in the 68328, 68EZ328 and 68VZ328 directories. This will also facilitate easy development of support for original stand alone MC68000 CPU machines. Signed-off-by: Luis Alves <ljalvs@gmail.com> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: clean up ColdFire 54xx General Timer definitionsGreg Ungerer
Convert the ColdFire 54xx CPU General Timer register address definitions to include the MCF_MBAR peripheral region offset. This makes them consistent with all other 54xx address register definitions (in m54xxsim.h). The goal is to reduce different definitions used (some including offsets and others not) causing bugs when used incorrectly. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: clean up Pin Assignment definitions for the 54xx ColdFire CPUGreg Ungerer
The Pin Assignment register definitions for the ColdFire 54xx CPU family are inconsistently named and defined compared to the other ColdFire part definitions. Rename them with the same prefix as used on other parts, MCFGPIO_PAR_, and make their definitions include the MCF_MBAR periphperal region offset. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: fix multi-function pin setup for FEC module on ColdFire 523xGreg Ungerer
The multi-function pin setup code for the FEC ethernet module is using just plain wrong. Looks like it was cut-and-pasted from other init code. It has hard coded register addresses that are incorrect for the 523x, and it is manipulating bits that don't make sense. Add proper register definitions for the Pin Assignment registers of the 532x, and then use them to fix the setup code for the FEC hardware module. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: move ColdFire slice timer address defiens to 54xx headerGreg Ungerer
Move the base address defines of the ColdFire 54xx CPU slice timers into the 54xx specific header (m54xxsim.h). They are CPU specific, and belong with the CPU specific defines. Also make them relative to the MBAR peripheral region, making the define the absolute address. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: use read/write IO access functions in ColdFire m532x setup codeGreg Ungerer
Get rid of the use of local IO access macros and switch to using the standard read*/write* family of access functions for the ColdFire m532x setup code. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: modify ColdFire 532x GPIO register definitions to be consistentGreg Ungerer
The ColdFire 532x CPU register definitions for the multi-function setup pins are inconsistently defined compared with other ColdFire parts. Modify the register defintions to be just the addresses, not pointers. This also fixes the erroneous use in one case of using these values in the UART setup code for the 532x. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: use definitions for the ColdFire 528x FEC multi-function pinsGreg Ungerer
Currently the setup code for the FEC multi-function pins on the ColdFire 528x has the addresses hard coded in the code. Use the register defines that already exist for this. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: remove address offsets relative to IPSBAR for ColdFire 527xGreg Ungerer
Remove the last address definitions relative to the IPSBAR peripheral region for the ColdFire 527x family. This involved cleaning up some magic numbers used in the code part, and making them proper register definitions in the 527x specific header. This is part of the process of cleaning up the ColdFire register definitions to make them consistently use absolute addresses for the primary registers. This will reduce the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: fix wrong register offsets used for ColdFire 5272 multi-function pinsGreg Ungerer
The registers used to configure and set the multifunction pins on the 5272 ColdFire are defined as absolute addresses. So the use of them does not need to be offset relative to the peripheral region address. Fix two cases of incorrect usage of these addresses. Both affect UART initialization, one in the common UART pin setup code, the other in the NETtel board specific UART signal handling. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make ColdFire 5249 MBAR2 register definitions absolute addressesGreg Ungerer
Make the ColdFire 5249 MBAR peripheral register definitions absolute addresses, instead of offsets into the region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the absolute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make remaining ColdFire 5272 register definitions absolute addressesGreg Ungerer
Make the remaining definitions of the 5272 ColdFire registers absolute addresses. Currently some are relative to the MBAR peripheral region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the absolute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make ColdFire Chip Select register definitions absolute addressesGreg Ungerer
Make all definitions of the ColdFire Chip Select registers absolute addresses. Currently some are relative to the MBAR peripheral region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the absolute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make ColdFire Interrupt Source register definitions absolute ↵Greg Ungerer
addresses Make all definitions of the ColdFire Interrupt Source registers absolute addresses. Currently some are relative to the MBAR peripheral region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the absolute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make ColdFire watchdog register definitions absolute addressesGreg Ungerer
Make all definitions of the ColdFire Software watchdog registers absolute addresses. Currently some are relative to the MBAR peripheral region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the absolute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make ColdFire SYPCR and RSR register definitions absolute addressesGreg Ungerer
Make all definitions of the ColdFire Reset and System registers absolute addresses. Currently some are relative to the MBAR peripheral region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the abolsute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-09-27m68knommu: make ColdFire IMR and IPR register definitions absolute addressesGreg Ungerer
Make all definitions of the ColdFire Interrupt Mask and Pending registers absolute addresses. Currently some are relative to the MBAR peripheral region. The various ColdFire parts use different methods to address the internal registers, some are absolute, some are relative to peripheral regions which can be mapped at different address ranges (such as the MBAR and IPSBAR registers). We don't want to deal with this in the code when we are accessing these registers, so make all register definitions the absolute address - factoring out whether it is an offset into a peripheral region. This makes them all consistently defined, and reduces the occasional bugs caused by inconsistent definition of the register addresses. Signed-off-by: Greg Ungerer <gerg@uclinux.org>