Commit Graph

51 Commits

Author SHA1 Message Date
Lukas Bulwahn 5c49b6a4a4 vt: remove superfluous CONFIG_HW_CONSOLE
The config HW_CONSOLE is always identical to the config VT and is not
visible in the kernel's build menuconfig. So, CONFIG_HW_CONSOLE is
redundant.

Replace all references to CONFIG_HW_CONSOLE with CONFIG_VT and remove
CONFIG_HW_CONSOLE.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20240108134102.601-1-lukas.bulwahn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-27 19:03:51 -08:00
Geert Uytterhoeven 090c65639a m68k: amiga: Add and use "amiga.h"
When building with W=1:

    arch/m68k/amiga/amisound.c:48:13: warning: no previous prototype for ‘amiga_init_sound’ [-Wmissing-prototypes]
       48 | void __init amiga_init_sound(void)
	  |             ^~~~~~~~~~~~~~~~
    arch/m68k/amiga/amisound.c:71:6: warning: no previous prototype for ‘amiga_mksound’ [-Wmissing-prototypes]
       71 | void amiga_mksound( unsigned int hz, unsigned int ticks )
	  |      ^~~~~~~~~~~~~

Fix this by introducing a new header file "amiga.h" for holding the
prototypes of functions implemented in arch/m68k/amiga/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/7e9395e1de1c9a34d16ea40a522057f05bbee400.1694613528.git.geert@linux-m68k.org
2023-10-06 10:03:02 +02:00
Laurent Vivier 91d7b75a58 m68k: Add asm/config.h
To avoid 'warning: no previous prototype for' errors, declare all the
parse_bootinfo and config function prototypes into asm/config.h and
include it in arch/m68k/kernel/setup_mm.c and arch/m68k/*/config.c.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Link: https://lore.kernel.org/r/20220121200738.2577697-2-laurent@vivier.eu
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2022-02-21 12:00:20 +01:00
Linus Torvalds 7a932e5702 asm-generic: cross-architecture timer cleanup
This cleans up two ancient timer features that were never completed in
 the past, CONFIG_GENERIC_CLOCKEVENTS and CONFIG_ARCH_USES_GETTIMEOFFSET.
 
 There was only one user left for the ARCH_USES_GETTIMEOFFSET variant
 of clocksource implementations, the ARM EBSA110 platform. Rather than
 changing to use modern timekeeping, we remove the platform entirely as
 Russell no longer uses his machine and nobody else seems to have one
 any more.
 
 The conditional code for using arch_gettimeoffset() is removed as
 a result.
 
 For CONFIG_GENERIC_CLOCKEVENTS, there are still a couple of platforms
 not using clockevent drivers: parisc, ia64, most of m68k, and one
 Arm platform. These all do timer ticks slighly differently, and this
 gets cleaned up to the point they at least all call the same helper
 function. Instead of most platforms using 'select GENERIC_CLOCKEVENTS'
 in Kconfig, the polarity is now reversed, with the few remaining ones
 selecting LEGACY_TIMER_TICK instead.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAl/Y1v8ACgkQmmx57+YA
 GNmCvQ/9EDlgCt92r8SB+LGafDtgB8TUQZeIrs9S2mByzdxwnw0lxObIXFCnhQgh
 RpG3dR+ONRDnC5eI149B377JOEFMZWe2+BtYHUHkFARtUEWatslQcz7yAGvVRK/l
 TS/qReb6piKltlzuanF1bMZbjy2OhlaDRcm+OlC3y5mALR33M4emb+rJ6cSdfk3K
 v1iZhrxtfQT77ztesh/oPkPiyQ6kNcz7SfpyYOb6f5VLlml2BZ7YwBSVyGY7urHk
 RL3XqOUP4KKlMEAI8w0E2nvft6Fk+luziBhrMYWK0GvbmI1OESENuX/c6tgT2OQ1
 DRaVHvcPG/EAY8adOKxxVyHhEJDSoz5GJV/EtjlOegsJk6RomczR1uuiT3Kvm7Ah
 PktMKv4xQht1E15KPSKbOvNIEP18w2s5z6gw+jVDv8pw42pVEQManm1D+BICqrhl
 fcpw6T1drf9UxAjwX4+zXtmNs+a+mqiFG8puU4VVgT4GpQ8umHvunXz2WUjZO0jc
 3m8ErJHBvtJwW5TOHGyXnjl9SkwPzHOfF6IcXTYWEDU4/gQIK9TwUvCjLc0lE27t
 FMCV2ds7/K1CXwRgpa5IrefSkb8yOXSbRZ56NqqF7Ekxw4J5bYRSaY7jb+qD/e+3
 5O1y+iPxFrpH+16hSahvzrtcdFNbLQvBBuRtEQOYuHLt2UJrNoU=
 =QpNs
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-timers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic cross-architecture timer cleanup from Arnd Bergmann:
 "This cleans up two ancient timer features that were never completed in
  the past, CONFIG_GENERIC_CLOCKEVENTS and CONFIG_ARCH_USES_GETTIMEOFFSET.

  There was only one user left for the ARCH_USES_GETTIMEOFFSET variant
  of clocksource implementations, the ARM EBSA110 platform. Rather than
  changing to use modern timekeeping, we remove the platform entirely as
  Russell no longer uses his machine and nobody else seems to have one
  any more.

  The conditional code for using arch_gettimeoffset() is removed as a
  result.

  For CONFIG_GENERIC_CLOCKEVENTS, there are still a couple of platforms
  not using clockevent drivers: parisc, ia64, most of m68k, and one Arm
  platform. These all do timer ticks slighly differently, and this gets
  cleaned up to the point they at least all call the same helper
  function.

  Instead of most platforms using 'select GENERIC_CLOCKEVENTS' in
  Kconfig, the polarity is now reversed, with the few remaining ones
  selecting LEGACY_TIMER_TICK instead"

* tag 'asm-generic-timers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  timekeeping: default GENERIC_CLOCKEVENTS to enabled
  timekeeping: remove xtime_update
  m68k: remove timer_interrupt() function
  m68k: change remaining timers to legacy_timer_tick
  m68k: m68328: use legacy_timer_tick()
  m68k: sun3/sun3c: use legacy_timer_tick
  m68k: split heartbeat out of timer function
  m68k: coldfire: use legacy_timer_tick()
  parisc: use legacy_timer_tick
  ARM: rpc: use legacy_timer_tick
  ia64: convert to legacy_timer_tick
  timekeeping: add CONFIG_LEGACY_TIMER_TICK
  timekeeping: remove arch_gettimeoffset
  net: remove am79c961a driver
  ARM: remove ebsa110 platform
2020-12-16 00:07:17 -08:00
Laurent Vivier 1fe9bacab2 m68k: Remove unused mach_max_dma_address
This information is unused since the discontinuous memory support
has been introduced in 2007.

Fixes: 12d810c1b8 ("m68k: discontinuous memory support")
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Link: https://lore.kernel.org/r/20201009095621.833192-1-laurent@vivier.eu
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-11-02 12:05:21 +01:00
Arnd Bergmann f9a015391e m68k: remove timer_interrupt() function
This gets passed to a number of init functions, but is
ignored everywhere, so remove the function and change the
mach_sched_init callback to take no arguments.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-10-30 21:57:06 +01:00
Arnd Bergmann 42f1d57f05 m68k: change remaining timers to legacy_timer_tick
There are nine more machines that each have their own timer interrupt
calling the m68k timer_interrupt() function through an indirect pointer.

This function is now the same as legacy_timer_tick, so just call that
directly and select the corresponding Kconfig symbol.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-10-30 21:57:06 +01:00
Arnd Bergmann d644409404 m68k: split heartbeat out of timer function
The heartbeat functionality is mostly separate from the
actual timer interrupt handling, and it is only used on
five platforms.

Split it out into a separate function and call that directly
from the timer irq on those platforms.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-10-30 21:57:05 +01:00
Geert Uytterhoeven d473de0f88 m68k: amiga: Clean up Amiga hardware configuration
Move the generic Amiga hardware configuration section out of the
switch statement, which allows to replace all ugly jumps by break
statements.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200826125124.23863-1-geert@linux-m68k.org
2020-09-07 10:56:08 +02:00
Geert Uytterhoeven 3b0950af21 m68k: amiga: Fix Denise detection on OCS
The "default" statement for detecting an original Denise chip seems to
be misplaced, causing original Denise chips not being detected.

Fix this by moving it from the outer to the inner "switch" statement.

Fortunately no code relies on this, but the detected version is printed
during boot, and available through /proc/hardware.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200112171705.22600-1-geert@linux-m68k.org
2020-08-26 13:26:52 +02:00
Mike Rapoport e31cf2f4ca mm: don't include asm/pgtable.h if linux/mm.h is already included
Patch series "mm: consolidate definitions of page table accessors", v2.

The low level page table accessors (pXY_index(), pXY_offset()) are
duplicated across all architectures and sometimes more than once.  For
instance, we have 31 definition of pgd_offset() for 25 supported
architectures.

Most of these definitions are actually identical and typically it boils
down to, e.g.

static inline unsigned long pmd_index(unsigned long address)
{
        return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
}

static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
{
        return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
}

These definitions can be shared among 90% of the arches provided
XYZ_SHIFT, PTRS_PER_XYZ and xyz_page_vaddr() are defined.

For architectures that really need a custom version there is always
possibility to override the generic version with the usual ifdefs magic.

These patches introduce include/linux/pgtable.h that replaces
include/asm-generic/pgtable.h and add the definitions of the page table
accessors to the new header.

This patch (of 12):

The linux/mm.h header includes <asm/pgtable.h> to allow inlining of the
functions involving page table manipulations, e.g.  pte_alloc() and
pmd_alloc().  So, there is no point to explicitly include <asm/pgtable.h>
in the files that include <linux/mm.h>.

The include statements in such cases are remove with a simple loop:

	for f in $(git grep -l "include <linux/mm.h>") ; do
		sed -i -e '/include <asm\/pgtable.h>/ d' $f
	done

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Cain <bcain@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nick Hu <nickhu@andestech.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/20200514170327.31389-1-rppt@kernel.org
Link: http://lkml.kernel.org/r/20200514170327.31389-2-rppt@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-09 09:39:13 -07:00
Gustavo A. R. Silva 366b8149fb m68k: amiga: config: Replace zero-length array with flexible-array member
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 7649773293 ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/20200420181401.GA32172@embeddedor
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-04-27 11:51:08 +02:00
Gustavo A. R. Silva e09a744040 m68k: amiga: config: Mark expected switch fall-through
Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: allmodconfig m68k):

arch/m68k/amiga/config.c: In function ‘amiga_identify’:
./arch/m68k/include/asm/amigahw.h:42:50: warning: this statement may fall through [-Wimplicit-fallthrough=]
 #define AMIGAHW_SET(name) (amiga_hw_present.name = 1)
                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~
arch/m68k/amiga/config.c:223:3: note: in expansion of macro ‘AMIGAHW_SET’
   AMIGAHW_SET(PCMCIA);
   ^~~~~~~~~~~
arch/m68k/amiga/config.c:224:2: note: here
  case AMI_500:
  ^~~~

Replace the existing /* fall through */ comments and fix the issue above
by using the new pseudo-keyword fallthrough;

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/14ff577604d25243c8a897f851b436ba87ae87cb.1585264062.git.gustavo@embeddedor.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-04-20 12:04:55 +02:00
Finn Thain 5afd3d06e5 m68k: amiga: Convert to clocksource API
Add a platform clocksource by adapting the existing arch_gettimeoffset
implementation.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2019-03-25 10:22:24 +01:00
Finn Thain 7d6ca23554 m68k: Drop ARCH_USES_GETTIMEOFFSET
The functions that implement arch_gettimeoffset are re-used by
new clocksource drivers in subsequent patches.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2019-03-25 10:22:24 +01:00
Markus Elfring f2a0c53402 m68k/amiga: Use seq_puts() in amiga_get_hardware_list()
A string which did not contain a data format specification should be put
into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2016-12-09 08:52:29 +01:00
Geert Uytterhoeven a1a9e88f70 m68k: Use IS_ENABLED() instead of checking for built-in or module
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2016-09-19 11:29:45 +02:00
Arnd Bergmann 084b3600e2 char/genrtc: remove m68k support
The asm/rtc.h header is only used for the old gen_rtc driver
that has been replaced by rtc-generic. According to Geert
Uytterhoeven, nobody has used the old driver on m68k for
a long time, so we can now just remove the header file
and disallow the driver in Kconfig.

All files that used to include asm/rtc.h are now changed so
they include the headers that were used implicitly through
asm/rtc.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-04 00:23:28 +02:00
Fabian Frederick f296401b04 m68k/amiga: Convert printk(foo to pr_foo()
-no level printk converted to pr_warn/pr_info
-fixed a small identation problem

This is untested

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:54 +02:00
Geert Uytterhoeven 8a09cec25f m68k/amiga,atari: Fix specifying multiple debug= parameters
Since commit d6713b4091 ("m68k: early
parameter support"), the user can specify multiple debug consoles using the
"debug=" kernel command line parameter.
However, as there's only a single struct console object, which is reused,
it would actually register the same console object multiple times, causing
the following warning:

WARNING: CPU: 0 PID: 0 at kernel/printk/printk.c:2233 register_console+0x36/
console 'debug0' already registered

Make sure to register the console object only once, to avoid the warning.

Note that still only one console (the one corresponding to the last
"debug=" parameter) will be active at the same time, as the .write() method
of the already registered console object is overwritten by a subsequent
"debug=" parameter.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-12-08 11:03:21 +01:00
Geert Uytterhoeven 50190edb2a m68k/amiga: Provide mach_random_get_entropy()
Use the beam position registers, which provide at least 17 bits of data
changing at 1.79 MHz.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:25 +01:00
Geert Uytterhoeven abe48101c1 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:21 +01:00
Geert Uytterhoeven 4c3c522bce m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h
Export the bootinfo definitions that are used by bootstrap loaders, and
split them up in generic and platform-specific parts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:15 +01:00
Geert Uytterhoeven bd9ba8f40e zorro/UAPI: Use proper types (endianness/size) in <linux/zorro.h>
Fix member definitions for non-native userspace handling:
  - All multi-byte values are big-endian, hence use __be*,
  - All pointers are 32-bit pointers under AmigaOS, but unused (except for
    cd_BoardAddr) under Linux, hence use __be32.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:09 +01:00
Geert Uytterhoeven 6112ea0862 zorro: ZTWO_VADDR() should return "void __iomem *"
ZTWO_VADDR() converts from physical to virtual I/O addresses, so it should
return "void __iomem *" instead of "unsigned long".

This allows to drop several casts, but requires adding a few casts to
accomodate legacy driver frameworks that store "unsigned long" I/O
addresses.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:07 +01:00
Geert Uytterhoeven c293738e6d zorro: Do not allocate zorro_autocon[] statically
Currently the array of Zorro devices is allocated statically, wasting
up to 4.5 KiB when running an Amiga or multi-platform kernel on a machine
with no or a handful of Zorro expansion cards. Convert it to conditional
dynamic memory allocation to fix this.

amiga_parse_bootinfo() still needs to store some information about the
detected Zorro devices, at a time even the bootmem allocator is not yet
available.  This is now handled using a much smaller array (typically less
than 0.5 KiB), which is __initdata and thus freed later.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:03 +01:00
Geert Uytterhoeven a4df02a217 m68k: Mark functions only called from setup_arch() __init
Some functions that are only called (indirectly) from setup_arch() lack
__init annotations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:08:54 +01:00
Stephen Warren c8d5ba1891 m68k: set arch_gettimeoffset directly
remove m68k's mach_gettimeoffset function pointer, and instead directly
set the arch_gettimeoffset function pointer. This requires multiplying
all function results by 1000, since the removed m68k_gettimeoffset() did
this. Also, s/unsigned long/u32/ just to make the function prototypes
exactly match that of arch_gettimeoffset.

Cc: Joshua Thompson <funaho@jurai.org>
Cc: Sam Creasey <sammy@sammy.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-12-24 09:36:34 -07:00
David Howells 803f69144f Disintegrate asm/system.h for M68K
Disintegrate asm/system.h for M68K.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
cc: linux-m68k@lists.linux-m68k.org
2012-03-28 18:30:02 +01:00
Joe Perches ff2d8b19a3 treewide: convert uses of ATTRIB_NORETURN to __noreturn
Use the more commonly used __noreturn instead of ATTRIB_NORETURN.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-12 20:13:03 -08:00
Joe Perches 9402c95f34 treewide: remove useless NORET_TYPE macro and uses
It's a very old and now unused prototype marking so just delete it.

Neaten panic pointer argument style to keep checkpatch quiet.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-12 20:13:03 -08:00
Geert Uytterhoeven 5df1abdbd3 m68k/amiga: Fix "debug=mem"
`debug=mem' on Amiga has been broken for a while.
early_param() processing is done very/too early, i.e. before
amiga_identify() / amiga_chip_init(), causing amiga_savekmsg_setup() not
to find any Chip RAM.

As we don't plan to free this memory anyway, just steal it from the initial
Chip RAM memory block instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-23 11:24:42 +01:00
Geert Uytterhoeven 0779c862e4 m68k: amiga - RTC platform device conversion
The A2000 TOD is an Oki MSM6242B, while the A3000 TOD is a Ricoh RP5C01.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:10 +02:00
Julia Lawall 1a0caf41c0 m68k: Use DIV_ROUND_CLOSEST
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

@depends on haskernel@
expression x,__divisor;
@@

- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-02-27 18:27:14 +01:00
Roel Kluin dd9b3e84f2 m68k: cnt reaches -1, not 0
With the postfix decrement cnt reaches -1 rather than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-08-26 23:14:49 +02:00
Geert Uytterhoeven 66acd25812 m68k: amiga core - Kill warn_unused_result warnings
warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2009-01-12 20:56:35 +01:00
Alexey Dobriyan 813dcf7a6e proc: move /proc/hardware to m68k-specific code
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2008-10-23 14:24:03 +04:00
Geert Uytterhoeven 39d2d99d98 m68k: Modular Amiga keyboard needs key_maps
| ERROR: "key_maps" [drivers/input/keyboard/amikbd.ko] undefined!

Export key_maps in the Amiga core code, as its defined in an autogenerated
file (drivers/char/defkeymap.c)

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-14 10:23:26 -07:00
Adrian Bunk 0795dbcc4c m68k/amiga/: possible cleanups
This patch contains the following possible cleanups:
- amiints.c: add a proper prototype for amiga_init_IRQ() in
             include/asm-m68k/amigaints.h
- make the following needlessly global code static:
  - config.c: amiga_model
  - config.c: amiga_psfreq
  - config.c: amiga_serial_console_write()
- #if 0 the following unused functions:
  - config.c: amiga_serial_puts()
  - config.c: amiga_serial_console_wait_key()
  - config.c: amiga_serial_gets()
- remove the following unused variable:
  - config.c: amiga_masterclock

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Adrian Bunk 8468afc039 export amiga_vblank
This patch fixes the following build error:

<--  snip  -->

..
  Building modules, stage 2.
  MODPOST 1203 modules
ERROR: "amiga_vblank" [drivers/video/amifb.ko] undefined!
..
make[2]: *** [__modpost] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Adrian Bunk 8b169fa2c9 m68k: kill arch/m68k/amiga/amiga_ksyms.c
EXPORT_SYMBOL's belong to the actual code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:23 -08:00
Roman Zippel d6713b4091 m68k: early parameter support
Add early parameter support and convert current users to it.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04 17:59:06 -07:00
Roman Zippel 6ff5801acb m68k: reformat various m68k files
Reformat various m68k files, so they actually look like Linux sources.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04 17:59:06 -07:00
David Howells 40220c1a19 IRQ: Use the new typedef for interrupt handler function pointers
Use the new typedef for interrupt handler function pointers rather than
actually spelling out the full thing each time.  This was scripted with the
following small shell script:

#!/bin/sh
egrep -nHrl -e 'irqreturn_t[ 	]*[(][*]' $* |
while read i
do
    echo $i
    perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
done

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-10-09 12:19:47 +01:00
Al Viro 2850bc2737 [PATCH] m68k pt_regs fixes
m68k_handle_int() split in two functions: __m68k_handle_int() takes
pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
*.

Places where we used to call m68k_handle_int() recursively with the same
pt_regs have simply lost the second argument, the rest is switched to
__m68k_handle_int().

The rest of patch is just dropping pt_regs * where needed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-07 10:51:14 -07:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Roman Zippel 74be8d0835 [PATCH] m68k: convert amiga irq code
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-25 10:00:57 -07:00
Al Viro 639074354b [PATCH] m68k: kill mach_floppy_setup, convert to proper __setup() in drivers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:05 -08:00
Al Viro 0c79358b87 [PATCH] m68k: Moved initialisation of conswitchp from subarches to global arch setup
Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:05 -08:00
Al Viro b4290a23cf [PATCH] m68k: namespace pollution fix (custom->amiga_custom)
in amigahw.h custom renamed to amiga_custom, in drivers with few instances the
same replacement, in the rest - #define custom amiga_custom in driver itself

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12 09:09:00 -08:00