diff options
Diffstat (limited to 'arch/m68k')
397 files changed, 31171 insertions, 15135 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index bc9271b8575..87b7c7581b1 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -1,13 +1,28 @@  config M68K  	bool  	default y -	select HAVE_AOUT +	select ARCH_MIGHT_HAVE_PC_PARPORT if ISA  	select HAVE_IDE +	select HAVE_AOUT if MMU +	select HAVE_DEBUG_BUGVERBOSE +	select GENERIC_IRQ_SHOW  	select GENERIC_ATOMIC64 - -config MMU -	bool -	default y +	select HAVE_UID16 +	select VIRT_TO_BUS +	select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS +	select GENERIC_CPU_DEVICES +	select GENERIC_IOMAP +	select GENERIC_STRNCPY_FROM_USER if MMU +	select GENERIC_STRNLEN_USER if MMU +	select FPU if MMU +	select ARCH_WANT_IPC_PARSE_VERSION +	select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE +	select HAVE_FUTEX_CMPXCHG if MMU && FUTEX +	select HAVE_MOD_ARCH_SPECIFIC +	select MODULES_USE_ELF_REL +	select MODULES_USE_ELF_RELA +	select OLD_SIGSUSPEND3 +	select OLD_SIGACTION  config RWSEM_GENERIC_SPINLOCK  	bool @@ -18,11 +33,9 @@ config RWSEM_XCHGADD_ALGORITHM  config ARCH_HAS_ILOG2_U32  	bool -	default n  config ARCH_HAS_ILOG2_U64  	bool -	default n  config GENERIC_HWEIGHT  	bool @@ -32,579 +45,115 @@ config GENERIC_CALIBRATE_DELAY  	bool  	default y -config TIME_LOW_RES +config GENERIC_CSUM  	bool -	default y -config GENERIC_IOMAP -	bool -	default y - -config ARCH_MAY_HAVE_PC_FDC +config TIME_LOW_RES  	bool -	depends on BROKEN && (Q40 || SUN3X)  	default y -config NO_IOPORT +config NO_IOPORT_MAP  	def_bool y  config NO_DMA -	def_bool SUN3 +	def_bool (MMU && SUN3) || (!MMU && !COLDFIRE) + +config ZONE_DMA +	bool +	default y  config HZ  	int +	default 1000 if CLEOPATRA  	default 100 -config ARCH_USES_GETTIMEOFFSET -	def_bool y -  source "init/Kconfig"  source "kernel/Kconfig.freezer" -menu "Platform dependent setup" - -config EISA -	bool -	---help--- -	  The Extended Industry Standard Architecture (EISA) bus was -	  developed as an open alternative to the IBM MicroChannel bus. - -	  The EISA bus provided some of the features of the IBM MicroChannel -	  bus while maintaining backward compatibility with cards made for -	  the older ISA bus.  The EISA bus saw limited use between 1988 and -	  1995 when it was made obsolete by the PCI bus. - -	  Say Y here if you are building a kernel for an EISA-based machine. - -	  Otherwise, say N. - -config MCA -	bool -	help -	  MicroChannel Architecture is found in some IBM PS/2 machines and -	  laptops.  It is a bus system similar to PCI or ISA. See -	  <file:Documentation/mca.txt> (and especially the web page given -	  there) before attempting to build an MCA bus kernel. - -config PCMCIA -	tristate -	---help--- -	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux -	  computer.  These are credit-card size devices such as network cards, -	  modems or hard drives often used with laptops computers.  There are -	  actually two varieties of these cards: the older 16 bit PCMCIA cards -	  and the newer 32 bit CardBus cards.  If you want to use CardBus -	  cards, you need to say Y here and also to "CardBus support" below. - -	  To use your PC-cards, you will need supporting software from David -	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes> -	  for location).  Please also read the PCMCIA-HOWTO, available from -	  <http://www.tldp.org/docs.html#howto>. - -	  To compile this driver as modules, choose M here: the -	  modules will be called pcmcia_core and ds. - -config AMIGA -	bool "Amiga support" -	select MMU_MOTOROLA if MMU -	help -	  This option enables support for the Amiga series of computers. If -	  you plan to use this kernel on an Amiga, say Y here and browse the -	  material available in <file:Documentation/m68k>; otherwise say N. - -config ATARI -	bool "Atari support" -	select MMU_MOTOROLA if MMU -	help -	  This option enables support for the 68000-based Atari series of -	  computers (including the TT, Falcon and Medusa). If you plan to use -	  this kernel on an Atari, say Y here and browse the material -	  available in <file:Documentation/m68k>; otherwise say N. - -config MAC -	bool "Macintosh support" -	select MMU_MOTOROLA if MMU +config MMU +	bool "MMU-based Paged Memory Management Support" +	default y  	help -	  This option enables support for the Apple Macintosh series of -	  computers (yes, there is experimental support now, at least for part -	  of the series). +	  Select if you want MMU-based virtualised addressing space +	  support by paged memory management. If unsure, say 'Y'. -	  Say N unless you're willing to code the remaining necessary support. -	  ;) +config MMU_MOTOROLA +	bool -config NUBUS +config MMU_COLDFIRE  	bool -	depends on MAC -	default y -config M68K_L2_CACHE +config MMU_SUN3  	bool -	depends on MAC -	default y +	depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE -config APOLLO -	bool "Apollo support" -	select MMU_MOTOROLA if MMU +config KEXEC +	bool "kexec system call" +	depends on M68KCLASSIC  	help -	  Say Y here if you want to run Linux on an MC680x0-based Apollo -	  Domain workstation such as the DN3500. +	  kexec is a system call that implements the ability to shutdown your +	  current kernel, and to start another kernel.  It is like a reboot +	  but it is independent of the system firmware.   And like a reboot +	  you can start any kernel with it, not just Linux. -config VME -	bool "VME (Motorola and BVM) support" -	select MMU_MOTOROLA if MMU -	help -	  Say Y here if you want to build a kernel for a 680x0 based VME -	  board.  Boards currently supported include Motorola boards MVME147, -	  MVME162, MVME166, MVME167, MVME172, and MVME177.  BVME4000 and -	  BVME6000 boards from BVM Ltd are also supported. - -config MVME147 -	bool "MVME147 support" -	depends on VME -	help -	  Say Y to include support for early Motorola VME boards.  This will -	  build a kernel which can run on MVME147 single-board computers.  If -	  you select this option you will have to select the appropriate -	  drivers for SCSI, Ethernet and serial ports later on. - -config MVME16x -	bool "MVME162, 166 and 167 support" -	depends on VME -	help -	  Say Y to include support for Motorola VME boards.  This will build a -	  kernel which can run on MVME162, MVME166, MVME167, MVME172, and -	  MVME177 boards.  If you select this option you will have to select -	  the appropriate drivers for SCSI, Ethernet and serial ports later -	  on. - -config BVME6000 -	bool "BVME4000 and BVME6000 support" -	depends on VME -	help -	  Say Y to include support for VME boards from BVM Ltd.  This will -	  build a kernel which can run on BVME4000 and BVME6000 boards.  If -	  you select this option you will have to select the appropriate -	  drivers for SCSI, Ethernet and serial ports later on. - -config HP300 -	bool "HP9000/300 and HP9000/400 support" -	select MMU_MOTOROLA if MMU -	help -	  This option enables support for the HP9000/300 and HP9000/400 series -	  of workstations. Support for these machines is still somewhat -	  experimental. If you plan to try to use the kernel on such a machine -	  say Y here. -	  Everybody else says N. - -config DIO -	bool "DIO bus support" -	depends on HP300 -	default y -	help -	  Say Y here to enable support for the "DIO" expansion bus used in -	  HP300 machines. If you are using such a system you almost certainly -	  want this. - -config SUN3X -	bool "Sun3x support" -	select MMU_MOTOROLA if MMU -	select M68030 -	help -	  This option enables support for the Sun 3x series of workstations. -	  Be warned that this support is very experimental. -	  Note that Sun 3x kernels are not compatible with Sun 3 hardware. -	  General Linux information on the Sun 3x series (now discontinued) -	  is at <http://www.angelfire.com/ca2/tech68k/sun3.html>. +	  The name comes from the similarity to the exec system call. -	  If you don't want to compile a kernel for a Sun 3x, say N. +	  It is an ongoing process to be certain the hardware in a machine +	  is properly shutdown, so do not be surprised if this code does not +	  initially work for you.  As of this writing the exact hardware +	  interface is strongly in flux, so no good recommendation can be +	  made. -config Q40 -	bool "Q40/Q60 support" -	select MMU_MOTOROLA if MMU -	help -	  The Q40 is a Motorola 68040-based successor to the Sinclair QL -	  manufactured in Germany.  There is an official Q40 home page at -	  <http://www.q40.de/>.  This option enables support for the Q40 and -	  Q60. Select your CPU below.  For 68LC060 don't forget to enable FPU -	  emulation. - -config SUN3 -	bool "Sun3 support" -	depends on !MMU_MOTOROLA -	select MMU_SUN3 if MMU -	select M68020 +config BOOTINFO_PROC +	bool "Export bootinfo in procfs" +	depends on KEXEC && M68KCLASSIC  	help -	  This option enables support for the Sun 3 series of workstations -	  (3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires -	  that all other hardware types must be disabled, as Sun 3 kernels -	  are incompatible with all other m68k targets (including Sun 3x!). +	  Say Y to export the bootinfo used to boot the kernel in a +	  "bootinfo" file in procfs.  This is useful with kexec. -	  If you don't want to compile a kernel exclusively for a Sun 3, say N. +menu "Platform setup" -comment "Processor type" +source arch/m68k/Kconfig.cpu -config M68020 -	bool "68020 support" -	help -	  If you anticipate running this kernel on a computer with a MC68020 -	  processor, say Y. Otherwise, say N. Note that the 68020 requires a -	  68851 MMU (Memory Management Unit) to run Linux/m68k, except on the -	  Sun 3, which provides its own version. - -config M68030 -	bool "68030 support" -	depends on !MMU_SUN3 -	help -	  If you anticipate running this kernel on a computer with a MC68030 -	  processor, say Y. Otherwise, say N. Note that a MC68EC030 will not -	  work, as it does not include an MMU (Memory Management Unit). +source arch/m68k/Kconfig.machine -config M68040 -	bool "68040 support" -	depends on !MMU_SUN3 -	help -	  If you anticipate running this kernel on a computer with a MC68LC040 -	  or MC68040 processor, say Y. Otherwise, say N. Note that an -	  MC68EC040 will not work, as it does not include an MMU (Memory -	  Management Unit). - -config M68060 -	bool "68060 support" -	depends on !MMU_SUN3 -	help -	  If you anticipate running this kernel on a computer with a MC68060 -	  processor, say Y. Otherwise, say N. +source arch/m68k/Kconfig.bus -config MMU_MOTOROLA -	bool +endmenu -config MMU_SUN3 -	bool -	depends on MMU && !MMU_MOTOROLA +menu "Kernel Features" -config M68KFPU_EMU -	bool "Math emulation support (EXPERIMENTAL)" -	depends on EXPERIMENTAL -	help -	  At some point in the future, this will cause floating-point math -	  instructions to be emulated by the kernel on machines that lack a -	  floating-point math coprocessor.  Thrill-seekers and chronically -	  sleep-deprived psychotic hacker types can say Y now, everyone else -	  should probably wait a while. - -config M68KFPU_EMU_EXTRAPREC -	bool "Math emulation extra precision" -	depends on M68KFPU_EMU -	help -	  The fpu uses normally a few bit more during calculations for -	  correct rounding, the emulator can (often) do the same but this -	  extra calculation can cost quite some time, so you can disable -	  it here. The emulator will then "only" calculate with a 64 bit -	  mantissa and round slightly incorrect, what is more than enough -	  for normal usage. - -config M68KFPU_EMU_ONLY -	bool "Math emulation only kernel" -	depends on M68KFPU_EMU -	help -	  This option prevents any floating-point instructions from being -	  compiled into the kernel, thereby the kernel doesn't save any -	  floating point context anymore during task switches, so this -	  kernel will only be usable on machines without a floating-point -	  math coprocessor. This makes the kernel a bit faster as no tests -	  needs to be executed whether a floating-point instruction in the -	  kernel should be executed or not. - -config ADVANCED -	bool "Advanced configuration options" -	---help--- -	  This gives you access to some advanced options for the CPU. The -	  defaults should be fine for most users, but these options may make -	  it possible for you to improve performance somewhat if you know what -	  you are doing. - -	  Note that the answer to this question won't directly affect the -	  kernel: saying N will just cause the configurator to skip all -	  the questions about these options. - -	  Most users should say N to this question. - -config RMW_INSNS -	bool "Use read-modify-write instructions" -	depends on ADVANCED -	---help--- -	  This allows to use certain instructions that work with indivisible -	  read-modify-write bus cycles. While this is faster than the -	  workaround of disabling interrupts, it can conflict with DMA -	  ( = direct memory access) on many Amiga systems, and it is also said -	  to destabilize other machines. It is very likely that this will -	  cause serious problems on any Amiga or Atari Medusa if set. The only -	  configuration where it should work are 68030-based Ataris, where it -	  apparently improves performance. But you've been warned! Unless you -	  really know what you are doing, say N. Try Y only if you're quite -	  adventurous. - -config SINGLE_MEMORY_CHUNK -	bool "Use one physical chunk of memory only" if ADVANCED && !SUN3 -	default y if SUN3 -	select NEED_MULTIPLE_NODES -	help -	  Ignore all but the first contiguous chunk of physical memory for VM -	  purposes.  This will save a few bytes kernel size and may speed up -	  some operations.  Say N if not sure. - -config 060_WRITETHROUGH -	bool "Use write-through caching for 68060 supervisor accesses" -	depends on ADVANCED && M68060 -	---help--- -	  The 68060 generally uses copyback caching of recently accessed data. -	  Copyback caching means that memory writes will be held in an on-chip -	  cache and only written back to memory some time later.  Saying Y -	  here will force supervisor (kernel) accesses to use writethrough -	  caching.  Writethrough caching means that data is written to memory -	  straight away, so that cache and memory data always agree. -	  Writethrough caching is less efficient, but is needed for some -	  drivers on 68060 based systems where the 68060 bus snooping signal -	  is hardwired on.  The 53c710 SCSI driver is known to suffer from -	  this problem. - -config ARCH_DISCONTIGMEM_ENABLE -	def_bool !SINGLE_MEMORY_CHUNK - -config NODES_SHIFT -	int -	default "3" -	depends on !SINGLE_MEMORY_CHUNK +if COLDFIRE +source "kernel/Kconfig.preempt" +endif  source "mm/Kconfig"  endmenu -menu "General setup" +menu "Executable file formats"  source "fs/Kconfig.binfmt" -config ZORRO -	bool "Amiga Zorro (AutoConfig) bus support" -	depends on AMIGA -	help -	  This enables support for the Zorro bus in the Amiga. If you have -	  expansion cards in your Amiga that conform to the Amiga -	  AutoConfig(tm) specification, say Y, otherwise N. Note that even -	  expansion cards that do not fit in the Zorro slots but fit in e.g. -	  the CPU slot may fall in this category, so you have to say Y to let -	  Linux use these. - -config AMIGA_PCMCIA -	bool "Amiga 1200/600 PCMCIA support (EXPERIMENTAL)" -	depends on AMIGA && EXPERIMENTAL -	help -	  Include support in the kernel for pcmcia on Amiga 1200 and Amiga -	  600. If you intend to use pcmcia cards say Y; otherwise say N. - -config STRAM_PROC -	bool "ST-RAM statistics in /proc" -	depends on ATARI -	help -	  Say Y here to report ST-RAM usage statistics in /proc/stram. +endmenu -config HEARTBEAT -	bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40 -	default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300 -	help -	  Use the power-on LED on your machine as a load meter.  The exact -	  behavior is platform-dependent, but normally the flash frequency is -	  a hyperbolic function of the 5-minute load average. +if !MMU +menu "Power management options" -# We have a dedicated heartbeat LED. :-) -config PROC_HARDWARE -	bool "/proc/hardware support" +config PM +	bool "Power Management support"  	help -	  Say Y here to support the /proc/hardware file, which gives you -	  access to information about the machine you're running on, -	  including the model, CPU, MMU, clock speed, BogoMIPS rating, -	  and memory size. - -config ISA -	bool -	depends on Q40 || AMIGA_PCMCIA -	default y -	help -	  Find out whether you have ISA slots on your motherboard.  ISA is the -	  name of a bus system, i.e. the way the CPU talks to the other stuff -	  inside your box.  Other bus systems are PCI, EISA, MicroChannel -	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI; -	  newer boards don't support it.  If you have ISA, say Y, otherwise N. - -config GENERIC_ISA_DMA -	bool -	depends on Q40 || AMIGA_PCMCIA -	default y - -config ZONE_DMA -	bool -	default y - -source "drivers/pci/Kconfig" - -source "drivers/zorro/Kconfig" +	  Support processor power management modes  endmenu +endif  source "net/Kconfig"  source "drivers/Kconfig" -menu "Character devices" - -config ATARI_MFPSER -	tristate "Atari MFP serial support" -	depends on ATARI -	---help--- -	  If you like to use the MFP serial ports ("Modem1", "Serial1") under -	  Linux, say Y. The driver equally supports all kinds of MFP serial -	  ports and automatically detects whether Serial1 is available. - -	  To compile this driver as a module, choose M here. - -	  Note for Falcon users: You also have an MFP port, it's just not -	  wired to the outside... But you could use the port under Linux. - -config ATARI_MIDI -	tristate "Atari MIDI serial support" -	depends on ATARI -	help -	  If you want to use your Atari's MIDI port in Linux, say Y. - -	  To compile this driver as a module, choose M here. - -config ATARI_DSP56K -	tristate "Atari DSP56k support (EXPERIMENTAL)" -	depends on ATARI && EXPERIMENTAL -	help -	  If you want to be able to use the DSP56001 in Falcons, say Y. This -	  driver is still experimental, and if you don't know what it is, or -	  if you don't have this processor, just say N. - -	  To compile this driver as a module, choose M here. - -config AMIGA_BUILTIN_SERIAL -	tristate "Amiga builtin serial support" -	depends on AMIGA -	help -	  If you want to use your Amiga's built-in serial port in Linux, -	  answer Y. - -	  To compile this driver as a module, choose M here. - -config MULTIFACE_III_TTY -	tristate "Multiface Card III serial support" -	depends on AMIGA -	help -	  If you want to use a Multiface III card's serial port in Linux, -	  answer Y. - -	  To compile this driver as a module, choose M here. - -config GVPIOEXT -	tristate "GVP IO-Extender support" -	depends on PARPORT=n && ZORRO -	help -	  If you want to use a GVP IO-Extender serial card in Linux, say Y. -	  Otherwise, say N. - -config GVPIOEXT_LP -	tristate "GVP IO-Extender parallel printer support" -	depends on GVPIOEXT -	help -	  Say Y to enable driving a printer from the parallel port on your -	  GVP IO-Extender card, N otherwise. - -config GVPIOEXT_PLIP -	tristate "GVP IO-Extender PLIP support" -	depends on GVPIOEXT -	help -	  Say Y to enable doing IP over the parallel port on your GVP -	  IO-Extender card, N otherwise. - -config MAC_HID -	bool -	depends on INPUT_ADBHID -	default y - -config HPDCA -	tristate "HP DCA serial support" -	depends on DIO && SERIAL_8250 -	help -	  If you want to use the internal "DCA" serial ports on an HP300 -	  machine, say Y here. - -config HPAPCI -	tristate "HP APCI serial support" -	depends on HP300 && SERIAL_8250 && EXPERIMENTAL -	help -	  If you want to use the internal "APCI" serial ports on an HP400 -	  machine, say Y here. - -config MVME147_SCC -	bool "SCC support for MVME147 serial ports" -	depends on MVME147 && BROKEN -	help -	  This is the driver for the serial ports on the Motorola MVME147 -	  boards.  Everyone using one of these boards should say Y here. - -config SERIAL167 -	bool "CD2401 support for MVME166/7 serial ports" -	depends on MVME16x -	help -	  This is the driver for the serial ports on the Motorola MVME166, -	  167, and 172 boards.  Everyone using one of these boards should say -	  Y here. - -config MVME162_SCC -	bool "SCC support for MVME162 serial ports" -	depends on MVME16x && BROKEN -	help -	  This is the driver for the serial ports on the Motorola MVME162 and -	  172 boards.  Everyone using one of these boards should say Y here. - -config BVME6000_SCC -	bool "SCC support for BVME6000 serial ports" -	depends on BVME6000 && BROKEN -	help -	  This is the driver for the serial ports on the BVME4000 and BVME6000 -	  boards from BVM Ltd.  Everyone using one of these boards should say -	  Y here. - -config DN_SERIAL -	bool "Support for DN serial port (dummy)" -	depends on APOLLO - -config SERIAL_CONSOLE -	bool "Support for serial port console" -	depends on (AMIGA || ATARI || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_MIDI=y || AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || SERIAL=y || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL) -	---help--- -	  If you say Y here, it will be possible to use a serial port as the -	  system console (the system console is the device which receives all -	  kernel messages and warnings and which allows logins in single user -	  mode). This could be useful if some terminal or printer is connected -	  to that serial port. - -	  Even if you say Y here, the currently visible virtual console -	  (/dev/tty0) will still be used as the system console by default, but -	  you can alter that using a kernel command line option such as -	  "console=ttyS1". (Try "man bootparam" or see the documentation of -	  your boot loader (lilo or loadlin) about how to pass options to the -	  kernel at boot time.) - -	  If you don't have a VGA card installed and you say Y here, the -	  kernel will automatically use the first serial line, /dev/ttyS0, as -	  system console. - -	  If unsure, say N. - -endmenu +source "arch/m68k/Kconfig.devices"  source "fs/Kconfig" diff --git a/arch/m68k/Kconfig.bus b/arch/m68k/Kconfig.bus new file mode 100644 index 00000000000..675b087198f --- /dev/null +++ b/arch/m68k/Kconfig.bus @@ -0,0 +1,81 @@ +if MMU + +comment "Bus Support" + +config DIO +	bool "DIO bus support" +	depends on HP300 +	default y +	help +	  Say Y here to enable support for the "DIO" expansion bus used in +	  HP300 machines. If you are using such a system you almost certainly +	  want this. + +config NUBUS +	bool +	depends on MAC +	default y + +config ZORRO +	bool "Amiga Zorro (AutoConfig) bus support" +	depends on AMIGA +	help +	  This enables support for the Zorro bus in the Amiga. If you have +	  expansion cards in your Amiga that conform to the Amiga +	  AutoConfig(tm) specification, say Y, otherwise N. Note that even +	  expansion cards that do not fit in the Zorro slots but fit in e.g. +	  the CPU slot may fall in this category, so you have to say Y to let +	  Linux use these. + +config AMIGA_PCMCIA +	bool "Amiga 1200/600 PCMCIA support" +	depends on AMIGA +	help +	  Include support in the kernel for pcmcia on Amiga 1200 and Amiga +	  600. If you intend to use pcmcia cards say Y; otherwise say N. + +config ISA +	bool +	depends on Q40 || AMIGA_PCMCIA +	default y +	help +	  Find out whether you have ISA slots on your motherboard.  ISA is the +	  name of a bus system, i.e. the way the CPU talks to the other stuff +	  inside your box.  Other bus systems are PCI, EISA, MicroChannel +	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI; +	  newer boards don't support it.  If you have ISA, say Y, otherwise N. + +config ATARI_ROM_ISA +	bool "Atari ROM port ISA adapter support" +	depends on ATARI +	help +	  This option enables support for the ROM port ISA adapter used to +	  operate ISA cards on Atari. Only 8  bit cards are supported, and +	  no interrupt lines are connected. +	  The only driver currently using this adapter is the EtherNEC +	  driver for RTL8019AS based NE2000 compatible network cards. + +config GENERIC_ISA_DMA +	def_bool ISA + +config PCI +	bool "PCI support" +	depends on M54xx +	help +	  Enable the PCI bus. Support for the PCI bus hardware built into the +	  ColdFire 547x and 548x processors. + +source "drivers/pci/Kconfig" + +source "drivers/zorro/Kconfig" + +endif + +if !MMU + +config ISA_DMA_API +        def_bool !M5272 + +source "drivers/pcmcia/Kconfig" + +endif diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu new file mode 100644 index 00000000000..33013dfcd3e --- /dev/null +++ b/arch/m68k/Kconfig.cpu @@ -0,0 +1,490 @@ +comment "Processor Type" + +choice +	prompt "CPU family support" +	default M68KCLASSIC if MMU +	default COLDFIRE if !MMU +	help +	  The Freescale (was Motorola) M68K family of processors implements +	  the full 68000 processor instruction set. +	  The Freescale ColdFire family of processors is a modern derivative +	  of the 68000 processor family. They are mainly targeted at embedded +	  applications, and are all System-On-Chip (SOC) devices, as opposed +	  to stand alone CPUs. They implement a subset of the original 68000 +	  processor instruction set. +	  If you anticipate running this kernel on a computer with a classic +	  MC68xxx processor, select M68KCLASSIC. +	  If you anticipate running this kernel on a computer with a ColdFire +	  processor, select COLDFIRE. + +config M68KCLASSIC +	bool "Classic M68K CPU family support" + +config COLDFIRE +	bool "Coldfire CPU family support" +	select ARCH_REQUIRE_GPIOLIB +	select ARCH_HAVE_CUSTOM_GPIO_H +	select CPU_HAS_NO_BITFIELDS +	select CPU_HAS_NO_MULDIV64 +	select GENERIC_CSUM +	select HAVE_CLK + +endchoice + +if M68KCLASSIC + +config M68000 +	bool "MC68000" +	depends on !MMU +	select CPU_HAS_NO_BITFIELDS +	select CPU_HAS_NO_MULDIV64 +	select CPU_HAS_NO_UNALIGNED +	select GENERIC_CSUM +	help +	  The Freescale (was Motorola) 68000 CPU is the first generation of +	  the well known M68K family of processors. The CPU core as well as +	  being available as a stand alone CPU was also used in many +	  System-On-Chip devices (eg 68328, 68302, etc). It does not contain +	  a paging MMU. + +config MCPU32 +	bool +	select CPU_HAS_NO_BITFIELDS +	select CPU_HAS_NO_UNALIGNED +	help +	  The Freescale (was then Motorola) CPU32 is a CPU core that is +	  based on the 68020 processor. For the most part it is used in +	  System-On-Chip parts, and does not contain a paging MMU. + +config M68020 +	bool "68020 support" +	depends on MMU +	select CPU_HAS_ADDRESS_SPACES +	help +	  If you anticipate running this kernel on a computer with a MC68020 +	  processor, say Y. Otherwise, say N. Note that the 68020 requires a +	  68851 MMU (Memory Management Unit) to run Linux/m68k, except on the +	  Sun 3, which provides its own version. + +config M68030 +	bool "68030 support" +	depends on MMU && !MMU_SUN3 +	select CPU_HAS_ADDRESS_SPACES +	help +	  If you anticipate running this kernel on a computer with a MC68030 +	  processor, say Y. Otherwise, say N. Note that a MC68EC030 will not +	  work, as it does not include an MMU (Memory Management Unit). + +config M68040 +	bool "68040 support" +	depends on MMU && !MMU_SUN3 +	select CPU_HAS_ADDRESS_SPACES +	help +	  If you anticipate running this kernel on a computer with a MC68LC040 +	  or MC68040 processor, say Y. Otherwise, say N. Note that an +	  MC68EC040 will not work, as it does not include an MMU (Memory +	  Management Unit). + +config M68060 +	bool "68060 support" +	depends on MMU && !MMU_SUN3 +	select CPU_HAS_ADDRESS_SPACES +	help +	  If you anticipate running this kernel on a computer with a MC68060 +	  processor, say Y. Otherwise, say N. + +config M68328 +	bool "MC68328" +	depends on !MMU +	select M68000 +	help +	  Motorola 68328 processor support. + +config M68EZ328 +	bool "MC68EZ328" +	depends on !MMU +	select M68000 +	help +	  Motorola 68EX328 processor support. + +config M68VZ328 +	bool "MC68VZ328" +	depends on !MMU +	select M68000 +	help +	  Motorola 68VZ328 processor support. + +config M68360 +	bool "MC68360" +	depends on !MMU +	select MCPU32 +	help +	  Motorola 68360 processor support. + +endif # M68KCLASSIC + +if COLDFIRE + +config M5206 +	bool "MCF5206" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_MBAR +	help +	  Motorola ColdFire 5206 processor support. + +config M5206e +	bool "MCF5206e" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_MBAR +	help +	  Motorola ColdFire 5206e processor support. + +config M520x +	bool "MCF520x" +	depends on !MMU +	select GENERIC_CLOCKEVENTS +	select HAVE_CACHE_SPLIT +	help +	   Freescale Coldfire 5207/5208 processor support. + +config M523x +	bool "MCF523x" +	depends on !MMU +	select GENERIC_CLOCKEVENTS +	select HAVE_CACHE_SPLIT +	select HAVE_IPSBAR +	help +	  Freescale Coldfire 5230/1/2/4/5 processor support + +config M5249 +	bool "MCF5249" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_MBAR +	help +	  Motorola ColdFire 5249 processor support. + +config M525x +	bool "MCF525x" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_MBAR +	help +	  Freescale (Motorola) Coldfire 5251/5253 processor support. + +config M527x +	bool + +config M5271 +	bool "MCF5271" +	depends on !MMU +	select M527x +	select HAVE_CACHE_SPLIT +	select HAVE_IPSBAR +	select GENERIC_CLOCKEVENTS +	help +	  Freescale (Motorola) ColdFire 5270/5271 processor support. + +config M5272 +	bool "MCF5272" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_MBAR +	help +	  Motorola ColdFire 5272 processor support. + +config M5275 +	bool "MCF5275" +	depends on !MMU +	select M527x +	select HAVE_CACHE_SPLIT +	select HAVE_IPSBAR +	select GENERIC_CLOCKEVENTS +	help +	  Freescale (Motorola) ColdFire 5274/5275 processor support. + +config M528x +	bool "MCF528x" +	depends on !MMU +	select GENERIC_CLOCKEVENTS +	select HAVE_CACHE_SPLIT +	select HAVE_IPSBAR +	help +	  Motorola ColdFire 5280/5282 processor support. + +config M5307 +	bool "MCF5307" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_CACHE_CB +	select HAVE_MBAR +	help +	  Motorola ColdFire 5307 processor support. + +config M53xx +	bool + +config M532x +	bool "MCF532x" +	depends on !MMU +	select M53xx +	select HAVE_CACHE_CB +	help +	  Freescale (Motorola) ColdFire 532x processor support. + +config M537x +	bool "MCF537x" +	depends on !MMU +	select M53xx +	select HAVE_CACHE_CB +	help +	  Freescale ColdFire 537x processor support. + +config M5407 +	bool "MCF5407" +	depends on !MMU +	select COLDFIRE_SW_A7 +	select HAVE_CACHE_CB +	select HAVE_MBAR +	help +	  Motorola ColdFire 5407 processor support. + +config M54xx +	bool + +config M547x +	bool "MCF547x" +	select M54xx +	select MMU_COLDFIRE if MMU +	select HAVE_CACHE_CB +	select HAVE_MBAR +	help +	  Freescale ColdFire 5470/5471/5472/5473/5474/5475 processor support. + +config M548x +	bool "MCF548x" +	select MMU_COLDFIRE if MMU +	select M54xx +	select HAVE_CACHE_CB +	select HAVE_MBAR +	help +	  Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. + +config M5441x +	bool "MCF5441x" +	depends on !MMU +	select GENERIC_CLOCKEVENTS +	select HAVE_CACHE_CB +	help +	  Freescale Coldfire 54410/54415/54416/54417/54418 processor support. + +endif # COLDFIRE + + +comment "Processor Specific Options" + +config M68KFPU_EMU +	bool "Math emulation support" +	depends on MMU +	help +	  At some point in the future, this will cause floating-point math +	  instructions to be emulated by the kernel on machines that lack a +	  floating-point math coprocessor.  Thrill-seekers and chronically +	  sleep-deprived psychotic hacker types can say Y now, everyone else +	  should probably wait a while. + +config M68KFPU_EMU_EXTRAPREC +	bool "Math emulation extra precision" +	depends on M68KFPU_EMU +	help +	  The fpu uses normally a few bit more during calculations for +	  correct rounding, the emulator can (often) do the same but this +	  extra calculation can cost quite some time, so you can disable +	  it here. The emulator will then "only" calculate with a 64 bit +	  mantissa and round slightly incorrect, what is more than enough +	  for normal usage. + +config M68KFPU_EMU_ONLY +	bool "Math emulation only kernel" +	depends on M68KFPU_EMU +	help +	  This option prevents any floating-point instructions from being +	  compiled into the kernel, thereby the kernel doesn't save any +	  floating point context anymore during task switches, so this +	  kernel will only be usable on machines without a floating-point +	  math coprocessor. This makes the kernel a bit faster as no tests +	  needs to be executed whether a floating-point instruction in the +	  kernel should be executed or not. + +config ADVANCED +	bool "Advanced configuration options" +	depends on MMU +	---help--- +	  This gives you access to some advanced options for the CPU. The +	  defaults should be fine for most users, but these options may make +	  it possible for you to improve performance somewhat if you know what +	  you are doing. + +	  Note that the answer to this question won't directly affect the +	  kernel: saying N will just cause the configurator to skip all +	  the questions about these options. + +	  Most users should say N to this question. + +config RMW_INSNS +	bool "Use read-modify-write instructions" +	depends on ADVANCED +	---help--- +	  This allows to use certain instructions that work with indivisible +	  read-modify-write bus cycles. While this is faster than the +	  workaround of disabling interrupts, it can conflict with DMA +	  ( = direct memory access) on many Amiga systems, and it is also said +	  to destabilize other machines. It is very likely that this will +	  cause serious problems on any Amiga or Atari Medusa if set. The only +	  configuration where it should work are 68030-based Ataris, where it +	  apparently improves performance. But you've been warned! Unless you +	  really know what you are doing, say N. Try Y only if you're quite +	  adventurous. + +config SINGLE_MEMORY_CHUNK +	bool "Use one physical chunk of memory only" if ADVANCED && !SUN3 +	depends on MMU +	default y if SUN3 +	select NEED_MULTIPLE_NODES +	help +	  Ignore all but the first contiguous chunk of physical memory for VM +	  purposes.  This will save a few bytes kernel size and may speed up +	  some operations.  Say N if not sure. + +config ARCH_DISCONTIGMEM_ENABLE +	def_bool MMU && !SINGLE_MEMORY_CHUNK + +config 060_WRITETHROUGH +	bool "Use write-through caching for 68060 supervisor accesses" +	depends on ADVANCED && M68060 +	---help--- +	  The 68060 generally uses copyback caching of recently accessed data. +	  Copyback caching means that memory writes will be held in an on-chip +	  cache and only written back to memory some time later.  Saying Y +	  here will force supervisor (kernel) accesses to use writethrough +	  caching.  Writethrough caching means that data is written to memory +	  straight away, so that cache and memory data always agree. +	  Writethrough caching is less efficient, but is needed for some +	  drivers on 68060 based systems where the 68060 bus snooping signal +	  is hardwired on.  The 53c710 SCSI driver is known to suffer from +	  this problem. + +config M68K_L2_CACHE +	bool +	depends on MAC +	default y + +config NODES_SHIFT +	int +	default "3" +	depends on !SINGLE_MEMORY_CHUNK + +config CPU_HAS_NO_BITFIELDS +	bool + +config CPU_HAS_NO_MULDIV64 +	bool + +config CPU_HAS_NO_UNALIGNED +	bool + +config CPU_HAS_ADDRESS_SPACES +	bool + +config FPU +	bool + +config COLDFIRE_SW_A7 +	bool + +config HAVE_CACHE_SPLIT +	bool + +config HAVE_CACHE_CB +	bool + +config HAVE_MBAR +	bool + +config HAVE_IPSBAR +	bool + +config CLOCK_SET +	bool "Enable setting the CPU clock frequency" +	depends on COLDFIRE +	default n +	help +	  On some CPU's you do not need to know what the core CPU clock +	  frequency is. On these you can disable clock setting. On some +	  traditional 68K parts, and on all ColdFire parts you need to set +	  the appropriate CPU clock frequency. On these devices many of the +	  onboard peripherals derive their timing from the master CPU clock +	  frequency. + +config CLOCK_FREQ +	int "Set the core clock frequency" +	default "66666666" +	depends on CLOCK_SET +	help +	  Define the CPU clock frequency in use. This is the core clock +	  frequency, it may or may not be the same as the external clock +	  crystal fitted to your board. Some processors have an internal +	  PLL and can have their frequency programmed at run time, others +	  use internal dividers. In general the kernel won't setup a PLL +	  if it is fitted (there are some exceptions). This value will be +	  specific to the exact CPU that you are using. + +config OLDMASK +	bool "Old mask 5307 (1H55J) silicon" +	depends on M5307 +	help +	  Build support for the older revision ColdFire 5307 silicon. +	  Specifically this is the 1H55J mask revision. + +if HAVE_CACHE_SPLIT +choice +	prompt "Split Cache Configuration" +	default CACHE_I + +config CACHE_I +	bool "Instruction" +	help +	  Use all of the ColdFire CPU cache memory as an instruction cache. + +config CACHE_D +	bool "Data" +	help +	  Use all of the ColdFire CPU cache memory as a data cache. + +config CACHE_BOTH +	bool "Both" +	help +	  Split the ColdFire CPU cache, and use half as an instruction cache +	  and half as a data cache. +endchoice +endif + +if HAVE_CACHE_CB +choice +	prompt "Data cache mode" +	default CACHE_WRITETHRU + +config CACHE_WRITETHRU +	bool "Write-through" +	help +	  The ColdFire CPU cache is set into Write-through mode. + +config CACHE_COPYBACK +	bool "Copy-back" +	help +	  The ColdFire CPU cache is set into Copy-back mode. +endchoice +endif + diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug index f53b6d5300e..64776d7ac19 100644 --- a/arch/m68k/Kconfig.debug +++ b/arch/m68k/Kconfig.debug @@ -2,4 +2,53 @@ menu "Kernel hacking"  source "lib/Kconfig.debug" +config BOOTPARAM +	bool 'Compiled-in Kernel Boot Parameter' + +config BOOTPARAM_STRING +	string 'Kernel Boot Parameter' +	default 'console=ttyS0,19200' +	depends on BOOTPARAM + +config EARLY_PRINTK +	bool "Early printk" +	depends on !(SUN3 || M68360 || M68000 || COLDFIRE) +	help +          Write kernel log output directly to a serial port. +          Where implemented, output goes to the framebuffer as well. +          PROM console functionality on Sun 3x is not affected by this option. + +          Pass "earlyprintk" on the kernel command line to get a +          boot console. + +          This is useful for kernel debugging when your machine crashes very +          early, i.e. before the normal console driver is loaded. +          You should normally say N here, unless you want to debug such a crash. + +if !MMU + +config FULLDEBUG +	bool "Full Symbolic/Source Debugging support" +	help +	  Enable debugging symbols on kernel build. + +config HIGHPROFILE +	bool "Use fast second timer for profiling" +	depends on COLDFIRE +	help +	  Use a fast secondary clock to produce profiling information. + +config NO_KERNEL_MSG +	bool "Suppress Kernel BUG Messages" +	help +	  Do not output any debug BUG messages within the kernel. + +config BDM_DISABLE +	bool "Disable BDM signals" +	depends on COLDFIRE +	help +	  Disable the ColdFire CPU's BDM signals. + +endif +  endmenu diff --git a/arch/m68k/Kconfig.devices b/arch/m68k/Kconfig.devices new file mode 100644 index 00000000000..d163991c571 --- /dev/null +++ b/arch/m68k/Kconfig.devices @@ -0,0 +1,144 @@ +if MMU + +config ARCH_MAY_HAVE_PC_FDC +	bool +	depends on BROKEN && (Q40 || SUN3X) +	default y + +menu "Platform devices" + +config HEARTBEAT +	bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || Q40 +	default y if !AMIGA && !APOLLO && !ATARI && !Q40 && HP300 +	help +	  Use the power-on LED on your machine as a load meter.  The exact +	  behavior is platform-dependent, but normally the flash frequency is +	  a hyperbolic function of the 5-minute load average. + +# We have a dedicated heartbeat LED. :-) +config PROC_HARDWARE +	bool "/proc/hardware support" +	help +	  Say Y here to support the /proc/hardware file, which gives you +	  access to information about the machine you're running on, +	  including the model, CPU, MMU, clock speed, BogoMIPS rating, +	  and memory size. + +config NATFEAT +	bool "ARAnyM emulator support" +	depends on ATARI +	help +	  This option enables support for ARAnyM native features, such as +	  access to a disk image as /dev/hda. + +config NFBLOCK +	tristate "NatFeat block device support" +	depends on BLOCK && NATFEAT +	help +	  Say Y to include support for the ARAnyM NatFeat block device +	  which allows direct access to the hard drives without using +	  the hardware emulation. + +config NFCON +	tristate "NatFeat console driver" +	depends on TTY && NATFEAT +	help +	  Say Y to include support for the ARAnyM NatFeat console driver +	  which allows the console output to be redirected to the stderr +	  output of ARAnyM. + +config NFETH +	tristate "NatFeat Ethernet support" +	depends on ETHERNET && NATFEAT +	help +	  Say Y to include support for the ARAnyM NatFeat network device +	  which will emulate a regular ethernet device while presenting an +	  ethertap device to the host system. + +config ATARI_ETHERNAT +	bool "Atari EtherNAT Ethernet support" +	depends on ATARI +	---help--- +	  Say Y to include support for the EtherNAT network adapter for the +	  CT/60 extension port. + +	  To compile the actual ethernet driver, choose Y or M for the SMC91X +	  option in the network device section; the module will be called smc91x. + +config ATARI_ETHERNEC +	bool "Atari EtherNEC Ethernet support" +	depends on ATARI_ROM_ISA +	---help--- +	  Say Y to include support for the EtherNEC network adapter for the +	  ROM port. The driver works by polling instead of interrupts, so it +	  is quite slow. + +	  This driver also suppports the ethernet part of the NetUSBee ROM +	  port combined Ethernet/USB adapter. + +	  To compile the actual ethernet driver, choose Y or M in for the NE2000 +	  option in the network device section; the module will be called ne. + +endmenu + +menu "Character devices" + +config ATARI_DSP56K +	tristate "Atari DSP56k support" +	depends on ATARI +	help +	  If you want to be able to use the DSP56001 in Falcons, say Y. This +	  driver is still experimental, and if you don't know what it is, or +	  if you don't have this processor, just say N. + +	  To compile this driver as a module, choose M here. + +config AMIGA_BUILTIN_SERIAL +	tristate "Amiga builtin serial support" +	depends on AMIGA +	help +	  If you want to use your Amiga's built-in serial port in Linux, +	  answer Y. + +	  To compile this driver as a module, choose M here. + +config HPDCA +	tristate "HP DCA serial support" +	depends on DIO && SERIAL_8250 +	help +	  If you want to use the internal "DCA" serial ports on an HP300 +	  machine, say Y here. + +config HPAPCI +	tristate "HP APCI serial support" +	depends on HP300 && SERIAL_8250 +	help +	  If you want to use the internal "APCI" serial ports on an HP400 +	  machine, say Y here. + +config SERIAL_CONSOLE +	bool "Support for serial port console" +	depends on AMIGA_BUILTIN_SERIAL=y +	---help--- +	  If you say Y here, it will be possible to use a serial port as the +	  system console (the system console is the device which receives all +	  kernel messages and warnings and which allows logins in single user +	  mode). This could be useful if some terminal or printer is connected +	  to that serial port. + +	  Even if you say Y here, the currently visible virtual console +	  (/dev/tty0) will still be used as the system console by default, but +	  you can alter that using a kernel command line option such as +	  "console=ttyS1". (Try "man bootparam" or see the documentation of +	  your boot loader about how to pass options to the kernel at boot +	  time.) + +	  If you don't have a graphical console and you say Y here, the +	  kernel will automatically use the first serial line, /dev/ttyS0, as +	  system console. + +	  If unsure, say N. + +endmenu + +endif diff --git a/arch/m68k/Kconfig.machine b/arch/m68k/Kconfig.machine new file mode 100644 index 00000000000..61dc643c0b0 --- /dev/null +++ b/arch/m68k/Kconfig.machine @@ -0,0 +1,450 @@ +comment "Machine Types" + +if M68KCLASSIC + +config AMIGA +	bool "Amiga support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  This option enables support for the Amiga series of computers. If +	  you plan to use this kernel on an Amiga, say Y here and browse the +	  material available in <file:Documentation/m68k>; otherwise say N. + +config ATARI +	bool "Atari support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  This option enables support for the 68000-based Atari series of +	  computers (including the TT, Falcon and Medusa). If you plan to use +	  this kernel on an Atari, say Y here and browse the material +	  available in <file:Documentation/m68k>; otherwise say N. + +config MAC +	bool "Macintosh support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  This option enables support for the Apple Macintosh series of +	  computers (yes, there is experimental support now, at least for part +	  of the series). + +	  Say N unless you're willing to code the remaining necessary support. +	  ;) + +config APOLLO +	bool "Apollo support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  Say Y here if you want to run Linux on an MC680x0-based Apollo +	  Domain workstation such as the DN3500. + +config VME +	bool "VME (Motorola and BVM) support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  Say Y here if you want to build a kernel for a 680x0 based VME +	  board.  Boards currently supported include Motorola boards MVME147, +	  MVME162, MVME166, MVME167, MVME172, and MVME177.  BVME4000 and +	  BVME6000 boards from BVM Ltd are also supported. + +config MVME147 +	bool "MVME147 support" +	depends on MMU +	depends on VME +	help +	  Say Y to include support for early Motorola VME boards.  This will +	  build a kernel which can run on MVME147 single-board computers.  If +	  you select this option you will have to select the appropriate +	  drivers for SCSI, Ethernet and serial ports later on. + +config MVME16x +	bool "MVME162, 166 and 167 support" +	depends on MMU +	depends on VME +	help +	  Say Y to include support for Motorola VME boards.  This will build a +	  kernel which can run on MVME162, MVME166, MVME167, MVME172, and +	  MVME177 boards.  If you select this option you will have to select +	  the appropriate drivers for SCSI, Ethernet and serial ports later +	  on. + +config BVME6000 +	bool "BVME4000 and BVME6000 support" +	depends on MMU +	depends on VME +	help +	  Say Y to include support for VME boards from BVM Ltd.  This will +	  build a kernel which can run on BVME4000 and BVME6000 boards.  If +	  you select this option you will have to select the appropriate +	  drivers for SCSI, Ethernet and serial ports later on. + +config HP300 +	bool "HP9000/300 and HP9000/400 support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  This option enables support for the HP9000/300 and HP9000/400 series +	  of workstations. Support for these machines is still somewhat +	  experimental. If you plan to try to use the kernel on such a machine +	  say Y here. +	  Everybody else says N. + +config SUN3X +	bool "Sun3x support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	select M68030 +	help +	  This option enables support for the Sun 3x series of workstations. +	  Be warned that this support is very experimental. +	  Note that Sun 3x kernels are not compatible with Sun 3 hardware. +	  General Linux information on the Sun 3x series (now discontinued) +	  is at <http://www.angelfire.com/ca2/tech68k/sun3.html>. + +	  If you don't want to compile a kernel for a Sun 3x, say N. + +config Q40 +	bool "Q40/Q60 support" +	depends on MMU +	select MMU_MOTOROLA if MMU +	help +	  The Q40 is a Motorola 68040-based successor to the Sinclair QL +	  manufactured in Germany.  There is an official Q40 home page at +	  <http://www.q40.de/>.  This option enables support for the Q40 and +	  Q60. Select your CPU below.  For 68LC060 don't forget to enable FPU +	  emulation. + +config SUN3 +	bool "Sun3 support" +	depends on MMU +	depends on !MMU_MOTOROLA +	select MMU_SUN3 if MMU +	select M68020 +	help +	  This option enables support for the Sun 3 series of workstations +	  (3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires +	  that all other hardware types must be disabled, as Sun 3 kernels +	  are incompatible with all other m68k targets (including Sun 3x!). + +	  If you don't want to compile a kernel exclusively for a Sun 3, say N. + +endif # M68KCLASSIC + +config PILOT +	bool + +config PILOT3 +	bool "Pilot 1000/5000, PalmPilot Personal/Pro, or PalmIII support" +	depends on M68328 +	select PILOT +	help +	  Support for the Palm Pilot 1000/5000, Personal/Pro and PalmIII. + +config XCOPILOT_BUGS +	bool "(X)Copilot support" +	depends on PILOT3 +	help +	  Support the bugs of Xcopilot. + +config UCSIMM +	bool "uCsimm module support" +	depends on M68EZ328 +	help +	  Support for the Arcturus Networks uCsimm module. + +config UCDIMM +	bool "uDsimm module support" +	depends on M68VZ328 +	help +	  Support for the Arcturus Networks uDsimm module. + +config DRAGEN2 +	bool "DragenEngine II board support" +	depends on M68VZ328 +	help +	  Support for the DragenEngine II board. + +config DIRECT_IO_ACCESS +	bool "Allow user to access IO directly" +	depends on (UCSIMM || UCDIMM || DRAGEN2) +	help +	  Disable the CPU internal registers protection in user mode, +	  to allow a user application to read/write them. + +config INIT_LCD +	bool "Initialize LCD" +	depends on (UCSIMM || UCDIMM || DRAGEN2) +	help +	  Initialize the LCD controller of the 68x328 processor. + +config MEMORY_RESERVE +	int "Memory reservation (MiB)" +	depends on (UCSIMM || UCDIMM) +	help +	  Reserve certain memory regions on 68x328 based boards. + +config UCQUICC +	bool "Lineo uCquicc board support" +	depends on M68360 +	help +	  Support for the Lineo uCquicc board. + +config ARN5206 +	bool "Arnewsh 5206 board support" +	depends on M5206 +	help +	  Support for the Arnewsh 5206 board. + +config M5206eC3 +	bool "Motorola M5206eC3 board support" +	depends on M5206e +	help +	  Support for the Motorola M5206eC3 board. + +config ELITE +	bool "Motorola M5206eLITE board support" +	depends on M5206e +	help +	  Support for the Motorola M5206eLITE board. + +config M5235EVB +	bool "Freescale M5235EVB support" +	depends on M523x +	help +	  Support for the Freescale M5235EVB board. + +config M5249C3 +	bool "Motorola M5249C3 board support" +	depends on M5249 +	help +	  Support for the Motorola M5249C3 board. + +config M5272C3 +	bool "Motorola M5272C3 board support" +	depends on M5272 +	help +	  Support for the Motorola M5272C3 board. + +config WILDFIRE +	bool "Intec Automation Inc. WildFire board support" +	depends on M528x +	help +	  Support for the Intec Automation Inc. WildFire. + +config WILDFIREMOD +	bool "Intec Automation Inc. WildFire module support" +	depends on M528x +	help +	  Support for the Intec Automation Inc. WildFire module. + +config ARN5307 +	bool "Arnewsh 5307 board support" +	depends on M5307 +	help +	  Support for the Arnewsh 5307 board. + +config M5307C3 +	bool "Motorola M5307C3 board support" +	depends on M5307 +	help +	  Support for the Motorola M5307C3 board. + +config SECUREEDGEMP3 +	bool "SnapGear SecureEdge/MP3 platform support" +	depends on M5307 +	help +	  Support for the SnapGear SecureEdge/MP3 platform. + +config M5407C3 +	bool "Motorola M5407C3 board support" +	depends on M5407 +	help +	  Support for the Motorola M5407C3 board. + +config FIREBEE +	bool "FireBee board support" +	depends on M547x +	help +	  Support for the FireBee ColdFire 5475 based board. + +config CLEOPATRA +	bool "Feith CLEOPATRA board support" +	depends on (M5307 || M5407) +	help +	  Support for the Feith Cleopatra boards. + +config CANCam +	bool "Feith CANCam board support" +	depends on M5272 +	help +	  Support for the Feith CANCam board. + +config SCALES +	bool "Feith SCALES board support" +	depends on M5272 +	help +	  Support for the Feith SCALES board. + +config NETtel +	bool "SecureEdge/NETtel board support" +	depends on (M5206e || M5272 || M5307) +	help +	  Support for the SnapGear NETtel/SecureEdge/SnapGear boards. + +config MOD5272 +	bool "Netburner MOD-5272 board support" +	depends on M5272 +	help +	  Support for the Netburner MOD-5272 board. + +if !MMU || COLDFIRE + +comment "Machine Options" + +config UBOOT +	bool "Support for U-Boot command line parameters" +	help +	  If you say Y here kernel will try to collect command +	  line parameters from the initial u-boot stack. +	default n + +config 4KSTACKS +	bool "Use 4Kb for kernel stacks instead of 8Kb" +	default y +	help +	  If you say Y here the kernel will use a 4Kb stacksize for the +	  kernel stack attached to each process/thread. This facilitates +	  running more threads on a system and also reduces the pressure +	  on the VM subsystem for higher order allocations. + +comment "RAM configuration" + +config RAMBASE +	hex "Address of the base of RAM" +	default "0" +	help +	  Define the address that RAM starts at. On many platforms this is +	  0, the base of the address space. And this is the default. Some +	  platforms choose to setup their RAM at other addresses within the +	  processor address space. + +config RAMSIZE +	hex "Size of RAM (in bytes), or 0 for automatic" +	default "0x400000" +	help +	  Define the size of the system RAM. If you select 0 then the +	  kernel will try to probe the RAM size at runtime. This is not +	  supported on all CPU types. + +config VECTORBASE +	hex "Address of the base of system vectors" +	default "0" +	help +	  Define the address of the system vectors. Commonly this is +	  put at the start of RAM, but it doesn't have to be. On ColdFire +	  platforms this address is programmed into the VBR register, thus +	  actually setting the address to use. + +config MBAR +	hex "Address of the MBAR (internal peripherals)" +	default "0x10000000" +	depends on HAVE_MBAR +	help +	  Define the address of the internal system peripherals. This value +	  is set in the processors MBAR register. This is generally setup by +	  the boot loader, and will not be written by the kernel. By far most +	  ColdFire boards use the default 0x10000000 value, so if unsure then +	  use this. + +config IPSBAR +	hex "Address of the IPSBAR (internal peripherals)" +	default "0x40000000" +	depends on HAVE_IPSBAR +	help +	  Define the address of the internal system peripherals. This value +	  is set in the processors IPSBAR register. This is generally setup by +	  the boot loader, and will not be written by the kernel. By far most +	  ColdFire boards use the default 0x40000000 value, so if unsure then +	  use this. + +config KERNELBASE +	hex "Address of the base of kernel code" +	default "0x400" +	help +	  Typically on m68k systems the kernel will not start at the base +	  of RAM, but usually some small offset from it. Define the start +	  address of the kernel here. The most common setup will have the +	  processor vectors at the base of RAM and then the start of the +	  kernel. On some platforms some RAM is reserved for boot loaders +	  and the kernel starts after that. The 0x400 default was based on +	  a system with the RAM based at address 0, and leaving enough room +	  for the theoretical maximum number of 256 vectors. + +comment "ROM configuration" + +config ROM +	bool "Specify ROM linker regions" +	default n +	help +	  Define a ROM region for the linker script. This creates a kernel +	  that can be stored in flash, with possibly the text, and data +	  regions being copied out to RAM at startup. + +config ROMBASE +	hex "Address of the base of ROM device" +	default "0" +	depends on ROM +	help +	  Define the address that the ROM region starts at. Some platforms +	  use this to set their chip select region accordingly for the boot +	  device. + +config ROMVEC +	hex "Address of the base of the ROM vectors" +	default "0" +	depends on ROM +	help +	  This is almost always the same as the base of the ROM. Since on all +	  68000 type variants the vectors are at the base of the boot device +	  on system startup. + +config ROMSTART +	hex "Address of the base of system image in ROM" +	default "0x400" +	depends on ROM +	help +	  Define the start address of the system image in ROM. Commonly this +	  is strait after the ROM vectors. + +config ROMSIZE +	hex "Size of the ROM device" +	default "0x100000" +	depends on ROM +	help +	  Size of the ROM device. On some platforms this is used to setup +	  the chip select that controls the boot ROM device. + +choice +	prompt "Kernel executes from" +	---help--- +	  Choose the memory type that the kernel will be running in. + +config RAMKERNEL +	bool "RAM" +	help +	  The kernel will be resident in RAM when running. + +config ROMKERNEL +	bool "ROM" +	help +	  The kernel will be resident in FLASH/ROM when running. This is +	  often referred to as Execute-in-Place (XIP), since the kernel +	  code executes from the position it is stored in the FLASH/ROM. + +endchoice + +endif diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index b06a7e3cbcd..7f7830f2c5b 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -11,14 +11,11 @@  # for more details.  #  # Copyright (C) 1994 by Hamish Macdonald +# Copyright (C) 2002,2011 Greg Ungerer <gerg@snapgear.com>  #  KBUILD_DEFCONFIG := multi_defconfig -# override top level makefile -AS += -m68020 -LDFLAGS := -m m68kelf -KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds  ifneq ($(SUBARCH),$(ARCH))  	ifeq ($(CROSS_COMPILE),)  		CROSS_COMPILE := $(call cc-cross-prefix, \ @@ -26,29 +23,62 @@ ifneq ($(SUBARCH),$(ARCH))  	endif  endif -ifdef CONFIG_SUN3 -LDFLAGS_vmlinux = -N +# +#	Enable processor type. Ordering of these is important - we want to +#	use the minimum processor type of the range we support. The logic +#	for 680x0 will only allow use of the -m68060 or -m68040 if no other +#	680x0 type is specified - and no option is specified for 68030 or +#	68020. The other m68k/ColdFire types always specify some type of +#	compiler cpu type flag. +# +ifndef CONFIG_M68040 +cpuflags-$(CONFIG_M68060)	:= -m68060  endif - -CHECKFLAGS += -D__mc68000__ - +ifndef CONFIG_M68060 +cpuflags-$(CONFIG_M68040)	:= -m68040 +endif +cpuflags-$(CONFIG_M68030)	:= +cpuflags-$(CONFIG_M68020)	:= +cpuflags-$(CONFIG_M68360)	:= -m68332 +cpuflags-$(CONFIG_M68000)	:= -m68000 +cpuflags-$(CONFIG_M5441x)	:= $(call cc-option,-mcpu=54455,-mcfv4e) +cpuflags-$(CONFIG_M54xx)	:= $(call cc-option,-mcpu=5475,-m5200) +cpuflags-$(CONFIG_M5407)	:= $(call cc-option,-mcpu=5407,-m5200) +cpuflags-$(CONFIG_M532x)	:= $(call cc-option,-mcpu=532x,-m5307) +cpuflags-$(CONFIG_M537x)	:= $(call cc-option,-mcpu=537x,-m5307) +cpuflags-$(CONFIG_M5307)	:= $(call cc-option,-mcpu=5307,-m5200) +cpuflags-$(CONFIG_M528x)	:= $(call cc-option,-mcpu=528x,-m5307) +cpuflags-$(CONFIG_M5275)	:= $(call cc-option,-mcpu=5275,-m5307) +cpuflags-$(CONFIG_M5272)	:= $(call cc-option,-mcpu=5272,-m5307) +cpuflags-$(CONFIG_M5271)	:= $(call cc-option,-mcpu=5271,-m5307) +cpuflags-$(CONFIG_M523x)	:= $(call cc-option,-mcpu=523x,-m5307) +cpuflags-$(CONFIG_M525x)	:= $(call cc-option,-mcpu=5253,-m5200) +cpuflags-$(CONFIG_M5249)	:= $(call cc-option,-mcpu=5249,-m5200) +cpuflags-$(CONFIG_M520x)	:= $(call cc-option,-mcpu=5208,-m5200) +cpuflags-$(CONFIG_M5206e)	:= $(call cc-option,-mcpu=5206e,-m5200) +cpuflags-$(CONFIG_M5206)	:= $(call cc-option,-mcpu=5206,-m5200) + +KBUILD_AFLAGS += $(cpuflags-y) +KBUILD_CFLAGS += $(cpuflags-y) -pipe +ifdef CONFIG_MMU  # without -fno-strength-reduce the 53c7xx.c driver fails ;-( -KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 +KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2 +else +# we can use a m68k-linux-gcc toolchain with these in place +KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" +KBUILD_CFLAGS += -D__uClinux__ +KBUILD_AFLAGS += -D__uClinux__ +endif -# enable processor switch if compiled only for a single cpu -ifndef CONFIG_M68020 -ifndef CONFIG_M68030 +LDFLAGS := -m m68kelf +KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds -ifndef CONFIG_M68060 -KBUILD_CFLAGS += -m68040 +ifdef CONFIG_SUN3 +LDFLAGS_vmlinux = -N  endif -ifndef CONFIG_M68040 -KBUILD_CFLAGS += -m68060 -endif +CHECKFLAGS += -D__mc68000__ -endif -endif  ifdef CONFIG_KGDB  # If configured for kgdb support, include debugging infos and keep the @@ -56,11 +86,15 @@ ifdef CONFIG_KGDB  KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g  endif -ifndef CONFIG_SUN3 -head-y := arch/m68k/kernel/head.o -else -head-y := arch/m68k/kernel/sun3-head.o -endif +# +# Select the assembler head startup code. Order is important. The default +# head code is first, processor specific selections can override it after. +# +head-y				:= arch/m68k/kernel/head.o +head-$(CONFIG_SUN3)		:= arch/m68k/kernel/sun3-head.o +head-$(CONFIG_M68360)		:= arch/m68k/platform/68360/head.o +head-$(CONFIG_M68000)		:= arch/m68k/platform/68000/head.o +head-$(CONFIG_COLDFIRE)		:= arch/m68k/platform/coldfire/head.o  core-y				+= arch/m68k/kernel/	arch/m68k/mm/  libs-y				+= arch/m68k/lib/ @@ -76,9 +110,14 @@ core-$(CONFIG_MVME16x)		+= arch/m68k/mvme16x/  core-$(CONFIG_BVME6000)		+= arch/m68k/bvme6000/  core-$(CONFIG_SUN3X)		+= arch/m68k/sun3x/	arch/m68k/sun3/  core-$(CONFIG_SUN3)		+= arch/m68k/sun3/	arch/m68k/sun3/prom/ +core-$(CONFIG_NATFEAT)		+= arch/m68k/emu/  core-$(CONFIG_M68040)		+= arch/m68k/fpsp040/  core-$(CONFIG_M68060)		+= arch/m68k/ifpsp060/  core-$(CONFIG_M68KFPU_EMU)	+= arch/m68k/math-emu/ +core-$(CONFIG_M68360)		+= arch/m68k/platform/68360/ +core-$(CONFIG_M68000)		+= arch/m68k/platform/68000/ +core-$(CONFIG_COLDFIRE)		+= arch/m68k/platform/coldfire/ +  all:	zImage diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index c5b5212cc3f..47b5f90002a 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c @@ -1,43 +1,15 @@  /* - * linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code + * Amiga Linux interrupt handling code   *   * This file is subject to the terms and conditions of the GNU General Public   * License.  See the file COPYING in the main directory of this archive   * for more details. - * - * 11/07/96: rewritten interrupt handling, irq lists are exists now only for - *           this sources where it makes sense (VERTB/PORTS/EXTER) and you must - *           be careful that dev_id for this sources is unique since this the - *           only possibility to distinguish between different handlers for - *           free_irq. irq lists also have different irq flags: - *           - IRQ_FLG_FAST: handler is inserted at top of list (after other - *                           fast handlers) - *           - IRQ_FLG_SLOW: handler is inserted at bottom of list and before - *                           they're executed irq level is set to the previous - *                           one, but handlers don't need to be reentrant, if - *                           reentrance occurred, slow handlers will be just - *                           called again. - *           The whole interrupt handling for CIAs is moved to cia.c - *           /Roman Zippel - * - * 07/08/99: rewamp of the interrupt handling - we now have two types of - *           interrupts, normal and fast handlers, fast handlers being - *           marked with IRQF_DISABLED and runs with all other interrupts - *           disabled. Normal interrupts disable their own source but - *           run with all other interrupt sources enabled. - *           PORTS and EXTER interrupts are always shared even if the - *           drivers do not explicitly mark this when calling - *           request_irq which they really should do. - *           This is similar to the way interrupts are handled on all - *           other architectures and makes a ton of sense besides - *           having the advantage of making it easier to share - *           drivers. - *           /Jes   */  #include <linux/init.h>  #include <linux/interrupt.h>  #include <linux/errno.h> +#include <linux/irq.h>  #include <asm/irq.h>  #include <asm/traps.h> @@ -45,56 +17,6 @@  #include <asm/amigaints.h>  #include <asm/amipcmcia.h> -static void amiga_enable_irq(unsigned int irq); -static void amiga_disable_irq(unsigned int irq); -static irqreturn_t ami_int1(int irq, void *dev_id); -static irqreturn_t ami_int3(int irq, void *dev_id); -static irqreturn_t ami_int4(int irq, void *dev_id); -static irqreturn_t ami_int5(int irq, void *dev_id); - -static struct irq_controller amiga_irq_controller = { -	.name		= "amiga", -	.lock		= __SPIN_LOCK_UNLOCKED(amiga_irq_controller.lock), -	.enable		= amiga_enable_irq, -	.disable	= amiga_disable_irq, -}; - -/* - * void amiga_init_IRQ(void) - * - * Parameters:	None - * - * Returns:	Nothing - * - * This function should be called during kernel startup to initialize - * the amiga IRQ handling routines. - */ - -void __init amiga_init_IRQ(void) -{ -	if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL)) -		pr_err("Couldn't register int%d\n", 1); -	if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL)) -		pr_err("Couldn't register int%d\n", 3); -	if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL)) -		pr_err("Couldn't register int%d\n", 4); -	if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL)) -		pr_err("Couldn't register int%d\n", 5); - -	m68k_setup_irq_controller(&amiga_irq_controller, IRQ_USER, AMI_STD_IRQS); - -	/* turn off PCMCIA interrupts */ -	if (AMIGAHW_PRESENT(PCMCIA)) -		gayle.inten = GAYLE_IRQ_IDE; - -	/* turn off all interrupts and enable the master interrupt bit */ -	amiga_custom.intena = 0x7fff; -	amiga_custom.intreq = 0x7fff; -	amiga_custom.intena = IF_SETCLR | IF_INTEN; - -	cia_init_IRQ(&ciaa_base); -	cia_init_IRQ(&ciab_base); -}  /*   * Enable/disable a particular machine specific interrupt source. @@ -103,112 +25,150 @@ void __init amiga_init_IRQ(void)   * internal data, that may not be changed by the interrupt at the same time.   */ -static void amiga_enable_irq(unsigned int irq) +static void amiga_irq_enable(struct irq_data *data)  { -	amiga_custom.intena = IF_SETCLR | (1 << (irq - IRQ_USER)); +	amiga_custom.intena = IF_SETCLR | (1 << (data->irq - IRQ_USER));  } -static void amiga_disable_irq(unsigned int irq) +static void amiga_irq_disable(struct irq_data *data)  { -	amiga_custom.intena = 1 << (irq - IRQ_USER); +	amiga_custom.intena = 1 << (data->irq - IRQ_USER);  } +static struct irq_chip amiga_irq_chip = { +	.name		= "amiga", +	.irq_enable	= amiga_irq_enable, +	.irq_disable	= amiga_irq_disable, +}; + +  /*   * The builtin Amiga hardware interrupt handlers.   */ -static irqreturn_t ami_int1(int irq, void *dev_id) +static void ami_int1(unsigned int irq, struct irq_desc *desc)  {  	unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;  	/* if serial transmit buffer empty, interrupt */  	if (ints & IF_TBE) {  		amiga_custom.intreq = IF_TBE; -		m68k_handle_int(IRQ_AMIGA_TBE); +		generic_handle_irq(IRQ_AMIGA_TBE);  	}  	/* if floppy disk transfer complete, interrupt */  	if (ints & IF_DSKBLK) {  		amiga_custom.intreq = IF_DSKBLK; -		m68k_handle_int(IRQ_AMIGA_DSKBLK); +		generic_handle_irq(IRQ_AMIGA_DSKBLK);  	}  	/* if software interrupt set, interrupt */  	if (ints & IF_SOFT) {  		amiga_custom.intreq = IF_SOFT; -		m68k_handle_int(IRQ_AMIGA_SOFT); +		generic_handle_irq(IRQ_AMIGA_SOFT);  	} -	return IRQ_HANDLED;  } -static irqreturn_t ami_int3(int irq, void *dev_id) +static void ami_int3(unsigned int irq, struct irq_desc *desc)  {  	unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;  	/* if a blitter interrupt */  	if (ints & IF_BLIT) {  		amiga_custom.intreq = IF_BLIT; -		m68k_handle_int(IRQ_AMIGA_BLIT); +		generic_handle_irq(IRQ_AMIGA_BLIT);  	}  	/* if a copper interrupt */  	if (ints & IF_COPER) {  		amiga_custom.intreq = IF_COPER; -		m68k_handle_int(IRQ_AMIGA_COPPER); +		generic_handle_irq(IRQ_AMIGA_COPPER);  	}  	/* if a vertical blank interrupt */  	if (ints & IF_VERTB) {  		amiga_custom.intreq = IF_VERTB; -		m68k_handle_int(IRQ_AMIGA_VERTB); +		generic_handle_irq(IRQ_AMIGA_VERTB);  	} -	return IRQ_HANDLED;  } -static irqreturn_t ami_int4(int irq, void *dev_id) +static void ami_int4(unsigned int irq, struct irq_desc *desc)  {  	unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;  	/* if audio 0 interrupt */  	if (ints & IF_AUD0) {  		amiga_custom.intreq = IF_AUD0; -		m68k_handle_int(IRQ_AMIGA_AUD0); +		generic_handle_irq(IRQ_AMIGA_AUD0);  	}  	/* if audio 1 interrupt */  	if (ints & IF_AUD1) {  		amiga_custom.intreq = IF_AUD1; -		m68k_handle_int(IRQ_AMIGA_AUD1); +		generic_handle_irq(IRQ_AMIGA_AUD1);  	}  	/* if audio 2 interrupt */  	if (ints & IF_AUD2) {  		amiga_custom.intreq = IF_AUD2; -		m68k_handle_int(IRQ_AMIGA_AUD2); +		generic_handle_irq(IRQ_AMIGA_AUD2);  	}  	/* if audio 3 interrupt */  	if (ints & IF_AUD3) {  		amiga_custom.intreq = IF_AUD3; -		m68k_handle_int(IRQ_AMIGA_AUD3); +		generic_handle_irq(IRQ_AMIGA_AUD3);  	} -	return IRQ_HANDLED;  } -static irqreturn_t ami_int5(int irq, void *dev_id) +static void ami_int5(unsigned int irq, struct irq_desc *desc)  {  	unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;  	/* if serial receive buffer full interrupt */  	if (ints & IF_RBF) {  		/* acknowledge of IF_RBF must be done by the serial interrupt */ -		m68k_handle_int(IRQ_AMIGA_RBF); +		generic_handle_irq(IRQ_AMIGA_RBF);  	}  	/* if a disk sync interrupt */  	if (ints & IF_DSKSYN) {  		amiga_custom.intreq = IF_DSKSYN; -		m68k_handle_int(IRQ_AMIGA_DSKSYN); +		generic_handle_irq(IRQ_AMIGA_DSKSYN);  	} -	return IRQ_HANDLED; +} + + +/* + * void amiga_init_IRQ(void) + * + * Parameters:	None + * + * Returns:	Nothing + * + * This function should be called during kernel startup to initialize + * the amiga IRQ handling routines. + */ + +void __init amiga_init_IRQ(void) +{ +	m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER, +				  AMI_STD_IRQS); + +	irq_set_chained_handler(IRQ_AUTO_1, ami_int1); +	irq_set_chained_handler(IRQ_AUTO_3, ami_int3); +	irq_set_chained_handler(IRQ_AUTO_4, ami_int4); +	irq_set_chained_handler(IRQ_AUTO_5, ami_int5); + +	/* turn off PCMCIA interrupts */ +	if (AMIGAHW_PRESENT(PCMCIA)) +		gayle.inten = GAYLE_IRQ_IDE; + +	/* turn off all interrupts and enable the master interrupt bit */ +	amiga_custom.intena = 0x7fff; +	amiga_custom.intreq = 0x7fff; +	amiga_custom.intena = IF_SETCLR | IF_INTEN; + +	cia_init_IRQ(&ciaa_base); +	cia_init_IRQ(&ciab_base);  } diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c index 61e5c54625a..90a60d758f8 100644 --- a/arch/m68k/amiga/amisound.c +++ b/arch/m68k/amiga/amisound.c @@ -14,7 +14,6 @@  #include <linux/string.h>  #include <linux/module.h> -#include <asm/system.h>  #include <asm/amigahw.h>  static unsigned short *snd_data; @@ -52,7 +51,7 @@ void __init amiga_init_sound(void)  	snd_data = amiga_chip_alloc_res(sizeof(sine_data), &beep_res);  	if (!snd_data) { -		printk (KERN_CRIT "amiga init_sound: failed to allocate chipmem\n"); +		pr_crit("amiga init_sound: failed to allocate chipmem\n");  		return;  	}  	memcpy (snd_data, sine_data, sizeof(sine_data)); diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c index 61df1d33c05..ba03cec3f71 100644 --- a/arch/m68k/amiga/chipram.c +++ b/arch/m68k/amiga/chipram.c @@ -16,6 +16,7 @@  #include <linux/string.h>  #include <linux/module.h> +#include <asm/atomic.h>  #include <asm/page.h>  #include <asm/amigahw.h> @@ -23,115 +24,100 @@ unsigned long amiga_chip_size;  EXPORT_SYMBOL(amiga_chip_size);  static struct resource chipram_res = { -    .name = "Chip RAM", .start = CHIP_PHYSADDR +	.name = "Chip RAM", .start = CHIP_PHYSADDR  }; -static unsigned long chipavail; +static atomic_t chipavail;  void __init amiga_chip_init(void)  { -    if (!AMIGAHW_PRESENT(CHIP_RAM)) -	return; +	if (!AMIGAHW_PRESENT(CHIP_RAM)) +		return; -    /* -     *  Remove the first 4 pages where PPC exception handlers will be located -     */ -    amiga_chip_size -= 0x4000; -    chipram_res.end = amiga_chip_size-1; -    request_resource(&iomem_resource, &chipram_res); +	chipram_res.end = CHIP_PHYSADDR + amiga_chip_size - 1; +	request_resource(&iomem_resource, &chipram_res); -    chipavail = amiga_chip_size; +	atomic_set(&chipavail, amiga_chip_size);  }  void *amiga_chip_alloc(unsigned long size, const char *name)  { -    struct resource *res; +	struct resource *res; +	void *p; -    /* round up */ -    size = PAGE_ALIGN(size); +	res = kzalloc(sizeof(struct resource), GFP_KERNEL); +	if (!res) +		return NULL; -#ifdef DEBUG -    printk("amiga_chip_alloc: allocate %ld bytes\n", size); -#endif -    res = kzalloc(sizeof(struct resource), GFP_KERNEL); -    if (!res) -	return NULL; -    res->name = name; +	res->name = name; +	p = amiga_chip_alloc_res(size, res); +	if (!p) { +		kfree(res); +		return NULL; +	} -    if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { -	kfree(res); -	return NULL; -    } -    chipavail -= size; -#ifdef DEBUG -    printk("amiga_chip_alloc: returning %lx\n", res->start); -#endif -    return (void *)ZTWO_VADDR(res->start); +	return p;  }  EXPORT_SYMBOL(amiga_chip_alloc); -    /* -     *  Warning: -     *  amiga_chip_alloc_res is meant only for drivers that need to allocate -     *  Chip RAM before kmalloc() is functional. As a consequence, those -     *  drivers must not free that Chip RAM afterwards. -     */ +	/* +	 *  Warning: +	 *  amiga_chip_alloc_res is meant only for drivers that need to +	 *  allocate Chip RAM before kmalloc() is functional. As a consequence, +	 *  those drivers must not free that Chip RAM afterwards. +	 */ -void * __init amiga_chip_alloc_res(unsigned long size, struct resource *res) +void *amiga_chip_alloc_res(unsigned long size, struct resource *res)  { -    unsigned long start; - -    /* round up */ -    size = PAGE_ALIGN(size); -    /* dmesg into chipmem prefers memory at the safe end */ -    start = CHIP_PHYSADDR + chipavail - size; - -#ifdef DEBUG -    printk("amiga_chip_alloc_res: allocate %ld bytes\n", size); -#endif -    if (allocate_resource(&chipram_res, res, size, start, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { -	printk("amiga_chip_alloc_res: first alloc failed!\n"); -	if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) -	    return NULL; -    } -    chipavail -= size; -#ifdef DEBUG -    printk("amiga_chip_alloc_res: returning %lx\n", res->start); -#endif -    return (void *)ZTWO_VADDR(res->start); +	int error; + +	/* round up */ +	size = PAGE_ALIGN(size); + +	pr_debug("amiga_chip_alloc_res: allocate %lu bytes\n", size); +	error = allocate_resource(&chipram_res, res, size, 0, UINT_MAX, +				  PAGE_SIZE, NULL, NULL); +	if (error < 0) { +		pr_err("amiga_chip_alloc_res: allocate_resource() failed %d!\n", +		       error); +		return NULL; +	} + +	atomic_sub(size, &chipavail); +	pr_debug("amiga_chip_alloc_res: returning %pR\n", res); +	return ZTWO_VADDR(res->start);  }  void amiga_chip_free(void *ptr)  { -    unsigned long start = ZTWO_PADDR(ptr); -    struct resource **p, *res; -    unsigned long size; - -    for (p = &chipram_res.child; (res = *p); p = &res->sibling) { -	if (res->start != start) -	    continue; -	*p = res->sibling; -	size = res->end-start; -#ifdef DEBUG -	printk("amiga_chip_free: free %ld bytes at %p\n", size, ptr); -#endif -	chipavail += size; +	unsigned long start = ZTWO_PADDR(ptr); +	struct resource *res; +	unsigned long size; + +	res = lookup_resource(&chipram_res, start); +	if (!res) { +		pr_err("amiga_chip_free: trying to free nonexistent region at " +		       "%p\n", ptr); +		return; +	} + +	size = resource_size(res); +	pr_debug("amiga_chip_free: free %lu bytes at %p\n", size, ptr); +	atomic_add(size, &chipavail); +	release_resource(res);  	kfree(res); -	return; -    } -    printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr);  }  EXPORT_SYMBOL(amiga_chip_free);  unsigned long amiga_chip_avail(void)  { -#ifdef DEBUG -	printk("amiga_chip_avail : %ld bytes\n", chipavail); -#endif -	return chipavail; +	unsigned long n = atomic_read(&chipavail); + +	pr_debug("amiga_chip_avail : %lu bytes\n", n); +	return n;  }  EXPORT_SYMBOL(amiga_chip_avail); diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index ecd0f7ca6f0..2081b8cd559 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c @@ -18,6 +18,7 @@  #include <linux/init.h>  #include <linux/seq_file.h>  #include <linux/interrupt.h> +#include <linux/irq.h>  #include <asm/irq.h>  #include <asm/amigahw.h> @@ -93,13 +94,14 @@ static irqreturn_t cia_handler(int irq, void *dev_id)  	amiga_custom.intreq = base->int_mask;  	for (; ints; mach_irq++, ints >>= 1) {  		if (ints & 1) -			m68k_handle_int(mach_irq); +			generic_handle_irq(mach_irq);  	}  	return IRQ_HANDLED;  } -static void cia_enable_irq(unsigned int irq) +static void cia_irq_enable(struct irq_data *data)  { +	unsigned int irq = data->irq;  	unsigned char mask;  	if (irq >= IRQ_AMIGA_CIAB) { @@ -113,19 +115,20 @@ static void cia_enable_irq(unsigned int irq)  	}  } -static void cia_disable_irq(unsigned int irq) +static void cia_irq_disable(struct irq_data *data)  { +	unsigned int irq = data->irq; +  	if (irq >= IRQ_AMIGA_CIAB)  		cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB));  	else  		cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA));  } -static struct irq_controller cia_irq_controller = { +static struct irq_chip cia_irq_chip = {  	.name		= "cia", -	.lock		= __SPIN_LOCK_UNLOCKED(cia_irq_controller.lock), -	.enable		= cia_enable_irq, -	.disable	= cia_disable_irq, +	.irq_enable	= cia_irq_enable, +	.irq_disable	= cia_irq_disable,  };  /* @@ -134,9 +137,9 @@ static struct irq_controller cia_irq_controller = {   * into this chain.   */ -static void auto_enable_irq(unsigned int irq) +static void auto_irq_enable(struct irq_data *data)  { -	switch (irq) { +	switch (data->irq) {  	case IRQ_AUTO_2:  		amiga_custom.intena = IF_SETCLR | IF_PORTS;  		break; @@ -146,9 +149,9 @@ static void auto_enable_irq(unsigned int irq)  	}  } -static void auto_disable_irq(unsigned int irq) +static void auto_irq_disable(struct irq_data *data)  { -	switch (irq) { +	switch (data->irq) {  	case IRQ_AUTO_2:  		amiga_custom.intena = IF_PORTS;  		break; @@ -158,24 +161,25 @@ static void auto_disable_irq(unsigned int irq)  	}  } -static struct irq_controller auto_irq_controller = { +static struct irq_chip auto_irq_chip = {  	.name		= "auto", -	.lock		= __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock), -	.enable		= auto_enable_irq, -	.disable	= auto_disable_irq, +	.irq_enable	= auto_irq_enable, +	.irq_disable	= auto_irq_disable,  };  void __init cia_init_IRQ(struct ciabase *base)  { -	m68k_setup_irq_controller(&cia_irq_controller, base->cia_irq, CIA_IRQS); +	m68k_setup_irq_controller(&cia_irq_chip, handle_simple_irq, +				  base->cia_irq, CIA_IRQS);  	/* clear any pending interrupt and turn off all interrupts */  	cia_set_irq(base, CIA_ICR_ALL);  	cia_able_irq(base, CIA_ICR_ALL);  	/* override auto int and install CIA handler */ -	m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1); -	m68k_irq_startup(base->handler_irq); +	m68k_setup_irq_controller(&auto_irq_chip, handle_simple_irq, +				  base->handler_irq, 1); +	m68k_irq_startup_irq(base->handler_irq);  	if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED,  			base->name, base))  		pr_err("Couldn't register %s interrupt\n", base->name); diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index b1577f741fa..01693df7f2f 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c @@ -28,8 +28,9 @@  #include <linux/keyboard.h>  #include <asm/bootinfo.h> +#include <asm/bootinfo-amiga.h> +#include <asm/byteorder.h>  #include <asm/setup.h> -#include <asm/system.h>  #include <asm/pgtable.h>  #include <asm/amigahw.h>  #include <asm/amigaints.h> @@ -96,7 +97,7 @@ static void amiga_sched_init(irq_handler_t handler);  static void amiga_get_model(char *model);  static void amiga_get_hardware_list(struct seq_file *m);  /* amiga specific timer functions */ -static unsigned long amiga_gettimeoffset(void); +static u32 amiga_gettimeoffset(void);  extern void amiga_mksound(unsigned int count, unsigned int ticks);  static void amiga_reset(void);  extern void amiga_init_sound(void); @@ -141,48 +142,48 @@ static struct resource ram_resource[NUM_MEMINFO];       *  Parse an Amiga-specific record in the bootinfo       */ -int amiga_parse_bootinfo(const struct bi_record *record) +int __init amiga_parse_bootinfo(const struct bi_record *record)  {  	int unknown = 0; -	const unsigned long *data = record->data; +	const void *data = record->data; -	switch (record->tag) { +	switch (be16_to_cpu(record->tag)) {  	case BI_AMIGA_MODEL: -		amiga_model = *data; +		amiga_model = be32_to_cpup(data);  		break;  	case BI_AMIGA_ECLOCK: -		amiga_eclock = *data; +		amiga_eclock = be32_to_cpup(data);  		break;  	case BI_AMIGA_CHIPSET: -		amiga_chipset = *data; +		amiga_chipset = be32_to_cpup(data);  		break;  	case BI_AMIGA_CHIP_SIZE: -		amiga_chip_size = *(const int *)data; +		amiga_chip_size = be32_to_cpup(data);  		break;  	case BI_AMIGA_VBLANK: -		amiga_vblank = *(const unsigned char *)data; +		amiga_vblank = *(const __u8 *)data;  		break;  	case BI_AMIGA_PSFREQ: -		amiga_psfreq = *(const unsigned char *)data; +		amiga_psfreq = *(const __u8 *)data;  		break;  	case BI_AMIGA_AUTOCON:  #ifdef CONFIG_ZORRO  		if (zorro_num_autocon < ZORRO_NUM_AUTO) { -			const struct ConfigDev *cd = (struct ConfigDev *)data; -			struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++]; +			const struct ConfigDev *cd = data; +			struct zorro_dev_init *dev = &zorro_autocon_init[zorro_num_autocon++];  			dev->rom = cd->cd_Rom; -			dev->slotaddr = cd->cd_SlotAddr; -			dev->slotsize = cd->cd_SlotSize; -			dev->resource.start = (unsigned long)cd->cd_BoardAddr; -			dev->resource.end = dev->resource.start + cd->cd_BoardSize - 1; +			dev->slotaddr = be16_to_cpu(cd->cd_SlotAddr); +			dev->slotsize = be16_to_cpu(cd->cd_SlotSize); +			dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr); +			dev->boardsize = be32_to_cpu(cd->cd_BoardSize);  		} else -			printk("amiga_parse_bootinfo: too many AutoConfig devices\n"); +			pr_warn("amiga_parse_bootinfo: too many AutoConfig devices\n");  #endif /* CONFIG_ZORRO */  		break; @@ -208,9 +209,9 @@ static void __init amiga_identify(void)  	memset(&amiga_hw_present, 0, sizeof(amiga_hw_present)); -	printk("Amiga hardware found: "); +	pr_info("Amiga hardware found: ");  	if (amiga_model >= AMI_500 && amiga_model <= AMI_DRACO) { -		printk("[%s] ", amiga_models[amiga_model-AMI_500]); +		pr_cont("[%s] ", amiga_models[amiga_model-AMI_500]);  		strcat(amiga_model_name, amiga_models[amiga_model-AMI_500]);  	} @@ -321,7 +322,7 @@ static void __init amiga_identify(void)  #define AMIGAHW_ANNOUNCE(name, str)		\  	if (AMIGAHW_PRESENT(name))		\ -		printk(str) +		pr_cont(str)  	AMIGAHW_ANNOUNCE(AMI_VIDEO, "VIDEO ");  	AMIGAHW_ANNOUNCE(AMI_BLITTER, "BLITTER "); @@ -353,12 +354,20 @@ static void __init amiga_identify(void)  	AMIGAHW_ANNOUNCE(MAGIC_REKICK, "MAGIC_REKICK ");  	AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA ");  	if (AMIGAHW_PRESENT(ZORRO)) -		printk("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : ""); -	printk("\n"); +		pr_cont("ZORRO%s ", AMIGAHW_PRESENT(ZORRO3) ? "3" : ""); +	pr_cont("\n");  #undef AMIGAHW_ANNOUNCE  } + +static unsigned long amiga_random_get_entropy(void) +{ +	/* VPOSR/VHPOSR provide at least 17 bits of data changing at 1.79 MHz */ +	return *(unsigned long *)&amiga_custom.vposr; +} + +      /*       *  Setup the Amiga configuration info       */ @@ -378,7 +387,7 @@ void __init config_amiga(void)  	mach_init_IRQ        = amiga_init_IRQ;  	mach_get_model       = amiga_get_model;  	mach_get_hardware_list = amiga_get_hardware_list; -	mach_gettimeoffset   = amiga_gettimeoffset; +	arch_gettimeoffset   = amiga_gettimeoffset;  	/*  	 * default MAX_DMA=0xffffffff on all machines. If we don't do so, the SCSI @@ -396,6 +405,8 @@ void __init config_amiga(void)  	mach_heartbeat = amiga_heartbeat;  #endif +	mach_random_get_entropy = amiga_random_get_entropy; +  	/* Fill in the clock value (based on the 700 kHz E-Clock) */  	amiga_colorclock = 5*amiga_eclock;	/* 3.5 MHz */ @@ -413,7 +424,7 @@ void __init config_amiga(void)  			if (m68k_memory[i].addr < 16*1024*1024) {  				if (i == 0) {  					/* don't cut off the branch we're sitting on */ -					printk("Warning: kernel runs in Zorro II memory\n"); +					pr_warn("Warning: kernel runs in Zorro II memory\n");  					continue;  				}  				disabled_z2mem += m68k_memory[i].size; @@ -424,8 +435,8 @@ void __init config_amiga(void)  			}  		}  		if (disabled_z2mem) -		printk("%dK of Zorro II memory will not be used as system memory\n", -		disabled_z2mem>>10); +			pr_info("%dK of Zorro II memory will not be used as system memory\n", +				disabled_z2mem>>10);  	}  	/* request all RAM */ @@ -464,7 +475,7 @@ static void __init amiga_sched_init(irq_handler_t timer_routine)  	jiffy_ticks = DIV_ROUND_CLOSEST(amiga_eclock, HZ);  	if (request_resource(&mb_resources._ciab, &sched_res)) -		printk("Cannot allocate ciab.ta{lo,hi}\n"); +		pr_warn("Cannot allocate ciab.ta{lo,hi}\n");  	ciab.cra &= 0xC0;   /* turn off timer A, continuous mode, from Eclk */  	ciab.talo = jiffy_ticks % 256;  	ciab.tahi = jiffy_ticks / 256; @@ -483,10 +494,10 @@ static void __init amiga_sched_init(irq_handler_t timer_routine)  #define TICK_SIZE 10000  /* This is always executed with interrupts disabled.  */ -static unsigned long amiga_gettimeoffset(void) +static u32 amiga_gettimeoffset(void)  {  	unsigned short hi, lo, hi2; -	unsigned long ticks, offset = 0; +	u32 ticks, offset = 0;  	/* read CIA B timer A current value */  	hi  = ciab.tahi; @@ -508,11 +519,10 @@ static unsigned long amiga_gettimeoffset(void)  	ticks = jiffy_ticks - ticks;  	ticks = (10000 * ticks) / jiffy_ticks; -	return ticks + offset; +	return (ticks + offset) * 1000;  } -static NORET_TYPE void amiga_reset(void) -    ATTRIB_NORET; +static void amiga_reset(void)  __noreturn;  static void amiga_reset(void)  { @@ -610,26 +620,28 @@ static void amiga_mem_console_write(struct console *co, const char *s,  static int __init amiga_savekmsg_setup(char *arg)  { -	static struct resource debug_res = { .name = "Debug" }; +	bool registered;  	if (!MACH_IS_AMIGA || strcmp(arg, "mem")) -		goto done; +		return 0; -	if (!AMIGAHW_PRESENT(CHIP_RAM)) { -		printk("Warning: no chipram present for debugging\n"); -		goto done; +	if (amiga_chip_size < SAVEKMSG_MAXMEM) { +		pr_err("Not enough chipram for debugging\n"); +		return -ENOMEM;  	} -	savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res); +	/* Just steal the block, the chipram allocator isn't functional yet */ +	amiga_chip_size -= SAVEKMSG_MAXMEM; +	savekmsg = ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);  	savekmsg->magic1 = SAVEKMSG_MAGIC1;  	savekmsg->magic2 = SAVEKMSG_MAGIC2;  	savekmsg->magicptr = ZTWO_PADDR(savekmsg);  	savekmsg->size = 0; +	registered = !!amiga_console_driver.write;  	amiga_console_driver.write = amiga_mem_console_write; -	register_console(&amiga_console_driver); - -done: +	if (!registered) +		register_console(&amiga_console_driver);  	return 0;  } @@ -711,11 +723,16 @@ void amiga_serial_gets(struct console *co, char *s, int len)  static int __init amiga_debug_setup(char *arg)  { -	if (MACH_IS_AMIGA && !strcmp(arg, "ser")) { -		/* no initialization required (?) */ -		amiga_console_driver.write = amiga_serial_console_write; +	bool registered; + +	if (!MACH_IS_AMIGA || strcmp(arg, "ser")) +		return 0; + +	/* no initialization required (?) */ +	registered = !!amiga_console_driver.write; +	amiga_console_driver.write = amiga_serial_console_write; +	if (!registered)  		register_console(&amiga_console_driver); -	}  	return 0;  } diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c index 7fd8b41723e..d34029d7b05 100644 --- a/arch/m68k/amiga/platform.c +++ b/arch/m68k/amiga/platform.c @@ -6,12 +6,14 @@   * for more details.   */ +#include <linux/err.h>  #include <linux/init.h>  #include <linux/platform_device.h>  #include <linux/zorro.h>  #include <asm/amigahw.h>  #include <asm/amigayle.h> +#include <asm/byteorder.h>  #ifdef CONFIG_ZORRO @@ -46,25 +48,31 @@ static const struct resource zorro_resources[] __initconst = {  static int __init amiga_init_bus(void)  { +	struct platform_device *pdev; +	unsigned int n; +  	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO))  		return -ENODEV; -	platform_device_register_simple("amiga-zorro", -1, zorro_resources, -					AMIGAHW_PRESENT(ZORRO3) ? 4 : 2); -	return 0; +	n = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2; +	pdev = platform_device_register_simple("amiga-zorro", -1, +					       zorro_resources, n); +	return PTR_ERR_OR_ZERO(pdev);  }  subsys_initcall(amiga_init_bus); -static int z_dev_present(zorro_id id) +static int __init z_dev_present(zorro_id id)  {  	unsigned int i; -	for (i = 0; i < zorro_num_autocon; i++) -		if (zorro_autocon[i].rom.er_Manufacturer == ZORRO_MANUF(id) && -		    zorro_autocon[i].rom.er_Product == ZORRO_PROD(id)) +	for (i = 0; i < zorro_num_autocon; i++) { +		const struct ExpansionRom *rom = &zorro_autocon_init[i].rom; +		if (be16_to_cpu(rom->er_Manufacturer) == ZORRO_MANUF(id) && +		    rom->er_Product == ZORRO_PROD(id))  			return 1; +	}  	return 0;  } @@ -126,72 +134,122 @@ static const struct resource amiga_rtc_resource __initconst = {  static int __init amiga_init_devices(void)  {  	struct platform_device *pdev; +	int error;  	if (!MACH_IS_AMIGA)  		return -ENODEV;  	/* video hardware */ -	if (AMIGAHW_PRESENT(AMI_VIDEO)) -		platform_device_register_simple("amiga-video", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_VIDEO)) { +		pdev = platform_device_register_simple("amiga-video", -1, NULL, +						       0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	}  	/* sound hardware */ -	if (AMIGAHW_PRESENT(AMI_AUDIO)) -		platform_device_register_simple("amiga-audio", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_AUDIO)) { +		pdev = platform_device_register_simple("amiga-audio", -1, NULL, +						       0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	}  	/* storage interfaces */ -	if (AMIGAHW_PRESENT(AMI_FLOPPY)) -		platform_device_register_simple("amiga-floppy", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_FLOPPY)) { +		pdev = platform_device_register_simple("amiga-floppy", -1, +						       NULL, 0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	} -	if (AMIGAHW_PRESENT(A3000_SCSI)) -		platform_device_register_simple("amiga-a3000-scsi", -1, -						&a3000_scsi_resource, 1); +	if (AMIGAHW_PRESENT(A3000_SCSI)) { +		pdev = platform_device_register_simple("amiga-a3000-scsi", -1, +						       &a3000_scsi_resource, 1); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	} -	if (AMIGAHW_PRESENT(A4000_SCSI)) -		platform_device_register_simple("amiga-a4000t-scsi", -1, -						&a4000t_scsi_resource, 1); +	if (AMIGAHW_PRESENT(A4000_SCSI)) { +		pdev = platform_device_register_simple("amiga-a4000t-scsi", -1, +						       &a4000t_scsi_resource, +						       1); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	}  	if (AMIGAHW_PRESENT(A1200_IDE) ||  	    z_dev_present(ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE)) {  		pdev = platform_device_register_simple("amiga-gayle-ide", -1,  						       &a1200_ide_resource, 1); -		platform_device_add_data(pdev, &a1200_ide_pdata, -					 sizeof(a1200_ide_pdata)); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +		error = platform_device_add_data(pdev, &a1200_ide_pdata, +						 sizeof(a1200_ide_pdata)); +		if (error) +			return error;  	}  	if (AMIGAHW_PRESENT(A4000_IDE)) {  		pdev = platform_device_register_simple("amiga-gayle-ide", -1,  						       &a4000_ide_resource, 1); -		platform_device_add_data(pdev, &a4000_ide_pdata, -					 sizeof(a4000_ide_pdata)); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +		error = platform_device_add_data(pdev, &a4000_ide_pdata, +						 sizeof(a4000_ide_pdata)); +		if (error) +			return error;  	}  	/* other I/O hardware */ -	if (AMIGAHW_PRESENT(AMI_KEYBOARD)) -		platform_device_register_simple("amiga-keyboard", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_KEYBOARD)) { +		pdev = platform_device_register_simple("amiga-keyboard", -1, +						       NULL, 0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	} -	if (AMIGAHW_PRESENT(AMI_MOUSE)) -		platform_device_register_simple("amiga-mouse", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_MOUSE)) { +		pdev = platform_device_register_simple("amiga-mouse", -1, NULL, +						       0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	} -	if (AMIGAHW_PRESENT(AMI_SERIAL)) -		platform_device_register_simple("amiga-serial", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_SERIAL)) { +		pdev = platform_device_register_simple("amiga-serial", -1, +						       NULL, 0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	} -	if (AMIGAHW_PRESENT(AMI_PARALLEL)) -		platform_device_register_simple("amiga-parallel", -1, NULL, 0); +	if (AMIGAHW_PRESENT(AMI_PARALLEL)) { +		pdev = platform_device_register_simple("amiga-parallel", -1, +						       NULL, 0); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	}  	/* real time clocks */ -	if (AMIGAHW_PRESENT(A2000_CLK)) -		platform_device_register_simple("rtc-msm6242", -1, -						&amiga_rtc_resource, 1); +	if (AMIGAHW_PRESENT(A2000_CLK)) { +		pdev = platform_device_register_simple("rtc-msm6242", -1, +						       &amiga_rtc_resource, 1); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	} -	if (AMIGAHW_PRESENT(A3000_CLK)) -		platform_device_register_simple("rtc-rp5c01", -1, -						&amiga_rtc_resource, 1); +	if (AMIGAHW_PRESENT(A3000_CLK)) { +		pdev = platform_device_register_simple("rtc-rp5c01", -1, +						       &amiga_rtc_resource, 1); +		if (IS_ERR(pdev)) +			return PTR_ERR(pdev); +	}  	return 0;  } -device_initcall(amiga_init_devices); +arch_initcall(amiga_init_devices); diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c index 8d3eafab1ff..6e62d66c396 100644 --- a/arch/m68k/apollo/config.c +++ b/arch/m68k/apollo/config.c @@ -1,3 +1,4 @@ +#include <linux/init.h>  #include <linux/types.h>  #include <linux/kernel.h>  #include <linux/mm.h> @@ -9,7 +10,8 @@  #include <asm/setup.h>  #include <asm/bootinfo.h> -#include <asm/system.h> +#include <asm/bootinfo-apollo.h> +#include <asm/byteorder.h>  #include <asm/pgtable.h>  #include <asm/apollohw.h>  #include <asm/irq.h> @@ -27,7 +29,7 @@ u_long apollo_model;  extern void dn_sched_init(irq_handler_t handler);  extern void dn_init_IRQ(void); -extern unsigned long dn_gettimeoffset(void); +extern u32 dn_gettimeoffset(void);  extern int dn_dummy_hwclk(int, struct rtc_time *);  extern int dn_dummy_set_clock_mmss(unsigned long);  extern void dn_dummy_reset(void); @@ -44,28 +46,27 @@ static const char *apollo_models[] = {  	[APOLLO_DN4500-APOLLO_DN3000] = "DN4500 (Roadrunner)"  }; -int apollo_parse_bootinfo(const struct bi_record *record) { - +int __init apollo_parse_bootinfo(const struct bi_record *record) +{  	int unknown = 0; -	const unsigned long *data = record->data; +	const void *data = record->data; -	switch(record->tag) { -		case BI_APOLLO_MODEL: -			apollo_model=*data; -			break; +	switch (be16_to_cpu(record->tag)) { +	case BI_APOLLO_MODEL: +		apollo_model = be32_to_cpup(data); +		break; -		default: -			 unknown=1; +	default: +		 unknown=1;  	}  	return unknown;  } -void dn_setup_model(void) { - - -	printk("Apollo hardware found: "); -	printk("[%s]\n", apollo_models[apollo_model - APOLLO_DN3000]); +static void __init dn_setup_model(void) +{ +	pr_info("Apollo hardware found: [%s]\n", +		apollo_models[apollo_model - APOLLO_DN3000]);  	switch(apollo_model) {  		case APOLLO_UNKNOWN: @@ -152,7 +153,7 @@ void __init config_apollo(void)  	mach_sched_init=dn_sched_init; /* */  	mach_init_IRQ=dn_init_IRQ; -	mach_gettimeoffset   = dn_gettimeoffset; +	arch_gettimeoffset   = dn_gettimeoffset;  	mach_max_dma_address = 0xffffffff;  	mach_hwclk           = dn_dummy_hwclk; /* */  	mach_set_clock_mmss  = dn_dummy_set_clock_mmss; /* */ @@ -178,8 +179,8 @@ irqreturn_t dn_timer_int(int irq, void *dev_id)  	timer_handler(irq, dev_id); -	x=*(volatile unsigned char *)(timer+3); -	x=*(volatile unsigned char *)(timer+5); +	x = *(volatile unsigned char *)(apollo_timer + 3); +	x = *(volatile unsigned char *)(apollo_timer + 5);  	return IRQ_HANDLED;  } @@ -187,27 +188,28 @@ irqreturn_t dn_timer_int(int irq, void *dev_id)  void dn_sched_init(irq_handler_t timer_routine)  {  	/* program timer 1 */ -	*(volatile unsigned char *)(timer+3)=0x01; -	*(volatile unsigned char *)(timer+1)=0x40; -	*(volatile unsigned char *)(timer+5)=0x09; -	*(volatile unsigned char *)(timer+7)=0xc4; +	*(volatile unsigned char *)(apollo_timer + 3) = 0x01; +	*(volatile unsigned char *)(apollo_timer + 1) = 0x40; +	*(volatile unsigned char *)(apollo_timer + 5) = 0x09; +	*(volatile unsigned char *)(apollo_timer + 7) = 0xc4;  	/* enable IRQ of PIC B */  	*(volatile unsigned char *)(pica+1)&=(~8);  #if 0 -	printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); -	printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); +	pr_info("*(0x10803) %02x\n", +		*(volatile unsigned char *)(apollo_timer + 0x3)); +	pr_info("*(0x10803) %02x\n", +		*(volatile unsigned char *)(apollo_timer + 0x3));  #endif  	if (request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine))  		pr_err("Couldn't register timer interrupt\n");  } -unsigned long dn_gettimeoffset(void) { - +u32 dn_gettimeoffset(void) +{  	return 0xdeadbeef; -  }  int dn_dummy_hwclk(int op, struct rtc_time *t) { @@ -236,12 +238,10 @@ int dn_dummy_hwclk(int op, struct rtc_time *t) {  } -int dn_dummy_set_clock_mmss(unsigned long nowtime) { - -  printk("set_clock_mmss\n"); - -  return 0; - +int dn_dummy_set_clock_mmss(unsigned long nowtime) +{ +	pr_info("set_clock_mmss\n"); +	return 0;  }  void dn_dummy_reset(void) { diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c index 5d47f3aa381..17be1e7e2df 100644 --- a/arch/m68k/apollo/dn_ints.c +++ b/arch/m68k/apollo/dn_ints.c @@ -1,19 +1,13 @@  #include <linux/interrupt.h> +#include <linux/irq.h> -#include <asm/irq.h>  #include <asm/traps.h>  #include <asm/apollohw.h> -void dn_process_int(unsigned int irq, struct pt_regs *fp) +unsigned int apollo_irq_startup(struct irq_data *data)  { -	__m68k_handle_int(irq, fp); +	unsigned int irq = data->irq; -	*(volatile unsigned char *)(pica)=0x20; -	*(volatile unsigned char *)(picb)=0x20; -} - -int apollo_irq_startup(unsigned int irq) -{  	if (irq < 8)  		*(volatile unsigned char *)(pica+1) &= ~(1 << irq);  	else @@ -21,24 +15,33 @@ int apollo_irq_startup(unsigned int irq)  	return 0;  } -void apollo_irq_shutdown(unsigned int irq) +void apollo_irq_shutdown(struct irq_data *data)  { +	unsigned int irq = data->irq; +  	if (irq < 8)  		*(volatile unsigned char *)(pica+1) |= (1 << irq);  	else  		*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));  } -static struct irq_controller apollo_irq_controller = { +void apollo_irq_eoi(struct irq_data *data) +{ +	*(volatile unsigned char *)(pica) = 0x20; +	*(volatile unsigned char *)(picb) = 0x20; +} + +static struct irq_chip apollo_irq_chip = {  	.name           = "apollo", -	.lock           = __SPIN_LOCK_UNLOCKED(apollo_irq_controller.lock), -	.startup        = apollo_irq_startup, -	.shutdown       = apollo_irq_shutdown, +	.irq_startup    = apollo_irq_startup, +	.irq_shutdown   = apollo_irq_shutdown, +	.irq_eoi	= apollo_irq_eoi,  };  void __init dn_init_IRQ(void)  { -	m68k_setup_user_interrupt(VEC_USER + 96, 16, dn_process_int); -	m68k_setup_irq_controller(&apollo_irq_controller, IRQ_APOLLO, 16); +	m68k_setup_user_interrupt(VEC_USER + 96, 16); +	m68k_setup_irq_controller(&apollo_irq_chip, handle_fasteoi_irq, +				  IRQ_APOLLO, 16);  } diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 39478dd08e6..3d2b63bedf0 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -41,8 +41,8 @@  #include <linux/init.h>  #include <linux/seq_file.h>  #include <linux/module.h> +#include <linux/irq.h> -#include <asm/system.h>  #include <asm/traps.h>  #include <asm/atarihw.h> @@ -50,6 +50,7 @@  #include <asm/atari_stdma.h>  #include <asm/irq.h>  #include <asm/entry.h> +#include <asm/io.h>  /* @@ -60,243 +61,7 @@   * <asm/atariints.h>): Autovector interrupts are 1..7, then follow ST-MFP,   * TT-MFP, SCC, and finally VME interrupts. Vector numbers for the latter can   * be allocated by atari_register_vme_int(). - * - * Each interrupt can be of three types: - * - *  - SLOW: The handler runs with all interrupts enabled, except the one it - *    was called by (to avoid reentering). This should be the usual method. - *    But it is currently possible only for MFP ints, since only the MFP - *    offers an easy way to mask interrupts. - * - *  - FAST: The handler runs with all interrupts disabled. This should be used - *    only for really fast handlers, that just do actions immediately - *    necessary, and let the rest do a bottom half or task queue. - * - *  - PRIORITIZED: The handler can be interrupted by higher-level ints - *    (greater IPL, no MFP priorities!). This is the method of choice for ints - *    which should be slow, but are not from a MFP. - * - * The feature of more than one handler for one int source is still there, but - * only applicable if all handers are of the same type. To not slow down - * processing of ints with only one handler by the chaining feature, the list - * calling function atari_call_irq_list() is only plugged in at the time the - * second handler is registered. - * - * Implementation notes: For fast-as-possible int handling, there are separate - * entry points for each type (slow/fast/prio). The assembler handler calls - * the irq directly in the usual case, no C wrapper is involved. In case of - * multiple handlers, atari_call_irq_list() is registered as handler and calls - * in turn the real irq's. To ease access from assembler level to the irq - * function pointer and accompanying data, these two are stored in a separate - * array, irq_handler[]. The rest of data (type, name) are put into a second - * array, irq_param, that is accessed from C only. For each slow interrupt (32 - * in all) there are separate handler functions, which makes it possible to - * hard-code the MFP register address and value, are necessary to mask the - * int. If there'd be only one generic function, lots of calculations would be - * needed to determine MFP register and int mask from the vector number :-( - * - * Furthermore, slow ints may not lower the IPL below its previous value - * (before the int happened). This is needed so that an int of class PRIO, on - * that this int may be stacked, cannot be reentered. This feature is - * implemented as follows: If the stack frame format is 1 (throwaway), the int - * is not stacked, and the IPL is anded with 0xfbff, resulting in a new level - * 2, which still blocks the HSYNC, but no interrupts of interest. If the - * frame format is 0, the int is nested, and the old IPL value can be found in - * the sr copy in the frame. - */ - -#if 0 - -#define	NUM_INT_SOURCES	(8 + NUM_ATARI_SOURCES) - -typedef void (*asm_irq_handler)(void); - -struct irqhandler { -	irqreturn_t (*handler)(int, void *, struct pt_regs *); -	void	*dev_id; -}; - -struct irqparam { -	unsigned long	flags; -	const char	*devname; -}; - -/* - * Array with irq's and their parameter data. This array is accessed from low - * level assembler code, so an element size of 8 allows usage of index scaling - * addressing mode.   */ -static struct irqhandler irq_handler[NUM_INT_SOURCES]; - -/* - * This array hold the rest of parameters of int handlers: type - * (slow,fast,prio) and the name of the handler. These values are only - * accessed from C - */ -static struct irqparam irq_param[NUM_INT_SOURCES]; - -/* check for valid int number (complex, sigh...) */ -#define	IS_VALID_INTNO(n)											\ -	((n) > 0 &&														\ -	 /* autovec and ST-MFP ok anyway */								\ -	 (((n) < TTMFP_SOURCE_BASE) ||									\ -	  /* TT-MFP ok if present */									\ -	  ((n) >= TTMFP_SOURCE_BASE && (n) < SCC_SOURCE_BASE &&			\ -	   ATARIHW_PRESENT(TT_MFP)) ||									\ -	  /* SCC ok if present and number even */						\ -	  ((n) >= SCC_SOURCE_BASE && (n) < VME_SOURCE_BASE &&			\ -	   !((n) & 1) && ATARIHW_PRESENT(SCC)) ||						\ -	  /* greater numbers ok if they are registered VME vectors */		\ -	  ((n) >= VME_SOURCE_BASE && (n) < VME_SOURCE_BASE + VME_MAX_SOURCES && \ -		  free_vme_vec_bitmap & (1 << ((n) - VME_SOURCE_BASE))))) - - -/* - * Here start the assembler entry points for interrupts - */ - -#define IRQ_NAME(nr) atari_slow_irq_##nr##_handler(void) - -#define	BUILD_SLOW_IRQ(n)						   \ -asmlinkage void IRQ_NAME(n);						   \ -/* Dummy function to allow asm with operands.  */			   \ -void atari_slow_irq_##n##_dummy (void) {				   \ -__asm__ (__ALIGN_STR "\n"						   \ -"atari_slow_irq_" #n "_handler:\t"					   \ -"	addl	%6,%5\n"	/* preempt_count() += HARDIRQ_OFFSET */	   \ -	SAVE_ALL_INT "\n"						   \ -	GET_CURRENT(%%d0) "\n"						   \ -"	andb	#~(1<<(%c3&7)),%a4:w\n"	/* mask this interrupt */	   \ -	/* get old IPL from stack frame */				   \ -"	bfextu	%%sp@(%c2){#5,#3},%%d0\n"				   \ -"	movew	%%sr,%%d1\n"						   \ -"	bfins	%%d0,%%d1{#21,#3}\n"					   \ -"	movew	%%d1,%%sr\n"		/* set IPL = previous value */	   \ -"	addql	#1,%a0\n"						   \ -"	lea	%a1,%%a0\n"						   \ -"	pea	%%sp@\n"		/* push addr of frame */	   \ -"	movel	%%a0@(4),%%sp@-\n"	/* push handler data */		   \ -"	pea	(%c3+8)\n"		/* push int number */		   \ -"	movel	%%a0@,%%a0\n"						   \ -"	jbsr	%%a0@\n"		/* call the handler */		   \ -"	addql	#8,%%sp\n"						   \ -"	addql	#4,%%sp\n"						   \ -"	orw	#0x0600,%%sr\n"						   \ -"	andw	#0xfeff,%%sr\n"		/* set IPL = 6 again */		   \ -"	orb	#(1<<(%c3&7)),%a4:w\n"	/* now unmask the int again */	   \ -"	jbra	ret_from_interrupt\n"					   \ -	 : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]),	   \ -	     "n" (PT_OFF_SR), "n" (n),					   \ -	     "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &st_mfp.int_mk_a)   \ -		        : (n & 16 ? &tt_mfp.int_mk_b : &st_mfp.int_mk_b)), \ -	     "m" (preempt_count()), "di" (HARDIRQ_OFFSET)		   \ -);									   \ -	for (;;);			/* fake noreturn */		   \ -} - -BUILD_SLOW_IRQ(0); -BUILD_SLOW_IRQ(1); -BUILD_SLOW_IRQ(2); -BUILD_SLOW_IRQ(3); -BUILD_SLOW_IRQ(4); -BUILD_SLOW_IRQ(5); -BUILD_SLOW_IRQ(6); -BUILD_SLOW_IRQ(7); -BUILD_SLOW_IRQ(8); -BUILD_SLOW_IRQ(9); -BUILD_SLOW_IRQ(10); -BUILD_SLOW_IRQ(11); -BUILD_SLOW_IRQ(12); -BUILD_SLOW_IRQ(13); -BUILD_SLOW_IRQ(14); -BUILD_SLOW_IRQ(15); -BUILD_SLOW_IRQ(16); -BUILD_SLOW_IRQ(17); -BUILD_SLOW_IRQ(18); -BUILD_SLOW_IRQ(19); -BUILD_SLOW_IRQ(20); -BUILD_SLOW_IRQ(21); -BUILD_SLOW_IRQ(22); -BUILD_SLOW_IRQ(23); -BUILD_SLOW_IRQ(24); -BUILD_SLOW_IRQ(25); -BUILD_SLOW_IRQ(26); -BUILD_SLOW_IRQ(27); -BUILD_SLOW_IRQ(28); -BUILD_SLOW_IRQ(29); -BUILD_SLOW_IRQ(30); -BUILD_SLOW_IRQ(31); - -asm_irq_handler slow_handlers[32] = { -	[0]	= atari_slow_irq_0_handler, -	[1]	= atari_slow_irq_1_handler, -	[2]	= atari_slow_irq_2_handler, -	[3]	= atari_slow_irq_3_handler, -	[4]	= atari_slow_irq_4_handler, -	[5]	= atari_slow_irq_5_handler, -	[6]	= atari_slow_irq_6_handler, -	[7]	= atari_slow_irq_7_handler, -	[8]	= atari_slow_irq_8_handler, -	[9]	= atari_slow_irq_9_handler, -	[10]	= atari_slow_irq_10_handler, -	[11]	= atari_slow_irq_11_handler, -	[12]	= atari_slow_irq_12_handler, -	[13]	= atari_slow_irq_13_handler, -	[14]	= atari_slow_irq_14_handler, -	[15]	= atari_slow_irq_15_handler, -	[16]	= atari_slow_irq_16_handler, -	[17]	= atari_slow_irq_17_handler, -	[18]	= atari_slow_irq_18_handler, -	[19]	= atari_slow_irq_19_handler, -	[20]	= atari_slow_irq_20_handler, -	[21]	= atari_slow_irq_21_handler, -	[22]	= atari_slow_irq_22_handler, -	[23]	= atari_slow_irq_23_handler, -	[24]	= atari_slow_irq_24_handler, -	[25]	= atari_slow_irq_25_handler, -	[26]	= atari_slow_irq_26_handler, -	[27]	= atari_slow_irq_27_handler, -	[28]	= atari_slow_irq_28_handler, -	[29]	= atari_slow_irq_29_handler, -	[30]	= atari_slow_irq_30_handler, -	[31]	= atari_slow_irq_31_handler -}; - -asmlinkage void atari_fast_irq_handler( void ); -asmlinkage void atari_prio_irq_handler( void ); - -/* Dummy function to allow asm with operands.  */ -void atari_fast_prio_irq_dummy (void) { -__asm__ (__ALIGN_STR "\n" -"atari_fast_irq_handler:\n\t" -	"orw	#0x700,%%sr\n"		/* disable all interrupts */ -"atari_prio_irq_handler:\n\t" -	"addl	%3,%2\n\t"		/* preempt_count() += HARDIRQ_OFFSET */ -	SAVE_ALL_INT "\n\t" -	GET_CURRENT(%%d0) "\n\t" -	/* get vector number from stack frame and convert to source */ -	"bfextu	%%sp@(%c1){#4,#10},%%d0\n\t" -	"subw	#(0x40-8),%%d0\n\t" -	"jpl	1f\n\t" -	"addw	#(0x40-8-0x18),%%d0\n" -    "1:\tlea	%a0,%%a0\n\t" -	"addql	#1,%%a0@(%%d0:l:4)\n\t" -	"lea	irq_handler,%%a0\n\t" -	"lea	%%a0@(%%d0:l:8),%%a0\n\t" -	"pea	%%sp@\n\t"		/* push frame address */ -	"movel	%%a0@(4),%%sp@-\n\t"	/* push handler data */ -	"movel	%%d0,%%sp@-\n\t"	/* push int number */ -	"movel	%%a0@,%%a0\n\t" -	"jsr	%%a0@\n\t"		/* and call the handler */ -	"addql	#8,%%sp\n\t" -	"addql	#4,%%sp\n\t" -	"jbra	ret_from_interrupt" -	 : : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC), -	     "m" (preempt_count()), "di" (HARDIRQ_OFFSET) -); -	for (;;); -} -#endif  /*   * Bitmap for free interrupt vector numbers @@ -318,33 +83,174 @@ __ALIGN_STR "\n\t"  extern void atari_microwire_cmd(int cmd); -extern int atari_SCC_reset_done; - -static int atari_startup_irq(unsigned int irq) +static unsigned int atari_irq_startup(struct irq_data *data)  { -	m68k_irq_startup(irq); +	unsigned int irq = data->irq; + +	m68k_irq_startup(data);  	atari_turnon_irq(irq);  	atari_enable_irq(irq);  	return 0;  } -static void atari_shutdown_irq(unsigned int irq) +static void atari_irq_shutdown(struct irq_data *data)  { +	unsigned int irq = data->irq; +  	atari_disable_irq(irq);  	atari_turnoff_irq(irq); -	m68k_irq_shutdown(irq); +	m68k_irq_shutdown(data);  	if (irq == IRQ_AUTO_4)  	    vectors[VEC_INT4] = falcon_hblhandler;  } -static struct irq_controller atari_irq_controller = { +static void atari_irq_enable(struct irq_data *data) +{ +	atari_enable_irq(data->irq); +} + +static void atari_irq_disable(struct irq_data *data) +{ +	atari_disable_irq(data->irq); +} + +static struct irq_chip atari_irq_chip = {  	.name		= "atari", -	.lock		= __SPIN_LOCK_UNLOCKED(atari_irq_controller.lock), -	.startup	= atari_startup_irq, -	.shutdown	= atari_shutdown_irq, -	.enable		= atari_enable_irq, -	.disable	= atari_disable_irq, +	.irq_startup	= atari_irq_startup, +	.irq_shutdown	= atari_irq_shutdown, +	.irq_enable	= atari_irq_enable, +	.irq_disable	= atari_irq_disable, +}; + +/* + * ST-MFP timer D chained interrupts - each driver gets its own timer + * interrupt instance. + */ + +struct mfptimerbase { +	volatile struct MFP *mfp; +	unsigned char mfp_mask, mfp_data; +	unsigned short int_mask; +	int handler_irq, mfptimer_irq, server_irq; +	char *name; +} stmfp_base = { +	.mfp		= &st_mfp, +	.int_mask	= 0x0, +	.handler_irq	= IRQ_MFP_TIMD, +	.mfptimer_irq	= IRQ_MFP_TIMER1, +	.name		= "MFP Timer D" +}; + +static irqreturn_t mfptimer_handler(int irq, void *dev_id) +{ +	struct mfptimerbase *base = dev_id; +	int mach_irq; +	unsigned char ints; + +	mach_irq = base->mfptimer_irq; +	ints = base->int_mask; +	for (; ints; mach_irq++, ints >>= 1) { +		if (ints & 1) +			generic_handle_irq(mach_irq); +	} +	return IRQ_HANDLED; +} + + +static void atari_mfptimer_enable(struct irq_data *data) +{ +	int mfp_num = data->irq - IRQ_MFP_TIMER1; +	stmfp_base.int_mask |= 1 << mfp_num; +	atari_enable_irq(IRQ_MFP_TIMD); +} + +static void atari_mfptimer_disable(struct irq_data *data) +{ +	int mfp_num = data->irq - IRQ_MFP_TIMER1; +	stmfp_base.int_mask &= ~(1 << mfp_num); +	if (!stmfp_base.int_mask) +		atari_disable_irq(IRQ_MFP_TIMD); +} + +static struct irq_chip atari_mfptimer_chip = { +	.name		= "timer_d", +	.irq_enable	= atari_mfptimer_enable, +	.irq_disable	= atari_mfptimer_disable, +}; + + +/* + * EtherNAT CPLD interrupt handling + * CPLD interrupt register is at phys. 0x80000023 + * Need this mapped in at interrupt startup time + * Possibly need this mapped on demand anyway - + * EtherNAT USB driver needs to disable IRQ before + * startup! + */ + +static unsigned char *enat_cpld; + +static unsigned int atari_ethernat_startup(struct irq_data *data) +{ +	int enat_num = 140 - data->irq + 1; + +	m68k_irq_startup(data); +	/* +	* map CPLD interrupt register +	*/ +	if (!enat_cpld) +		enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2); +	/* +	 * do _not_ enable the USB chip interrupt here - causes interrupt storm +	 * and triggers dead interrupt watchdog +	 * Need to reset the USB chip to a sane state in early startup before +	 * removing this hack +	 */ +	if (enat_num == 1) +		*enat_cpld |= 1 << enat_num; + +	return 0; +} + +static void atari_ethernat_enable(struct irq_data *data) +{ +	int enat_num = 140 - data->irq + 1; +	/* +	* map CPLD interrupt register +	*/ +	if (!enat_cpld) +		enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2); +	*enat_cpld |= 1 << enat_num; +} + +static void atari_ethernat_disable(struct irq_data *data) +{ +	int enat_num = 140 - data->irq + 1; +	/* +	* map CPLD interrupt register +	*/ +	if (!enat_cpld) +		enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2); +	*enat_cpld &= ~(1 << enat_num); +} + +static void atari_ethernat_shutdown(struct irq_data *data) +{ +	int enat_num = 140 - data->irq + 1; +	if (enat_cpld) { +		*enat_cpld &= ~(1 << enat_num); +		iounmap(enat_cpld); +		enat_cpld = NULL; +	} +} + +static struct irq_chip atari_ethernat_chip = { +	.name		= "ethernat", +	.irq_startup	= atari_ethernat_startup, +	.irq_shutdown	= atari_ethernat_shutdown, +	.irq_enable	= atari_ethernat_enable, +	.irq_disable	= atari_ethernat_disable,  };  /* @@ -360,8 +266,9 @@ static struct irq_controller atari_irq_controller = {  void __init atari_init_IRQ(void)  { -	m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL); -	m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); +	m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER); +	m68k_setup_irq_controller(&atari_irq_chip, handle_simple_irq, 1, +				  NUM_ATARI_SOURCES - 1);  	/* Initialize the MFP(s) */ @@ -388,9 +295,9 @@ void __init atari_init_IRQ(void)  	}  	if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) { -		scc.cha_a_ctrl = 9; +		atari_scc.cha_a_ctrl = 9;  		MFPDELAY(); -		scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */ +		atari_scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */  	}  	if (ATARIHW_PRESENT(SCU)) { @@ -423,6 +330,30 @@ void __init atari_init_IRQ(void)  	/* Initialize the PSG: all sounds off, both ports output */  	sound_ym.rd_data_reg_sel = 7;  	sound_ym.wd_data = 0xff; + +	m68k_setup_irq_controller(&atari_mfptimer_chip, handle_simple_irq, +				  IRQ_MFP_TIMER1, 8); + +	irq_set_status_flags(IRQ_MFP_TIMER1, IRQ_IS_POLLED); +	irq_set_status_flags(IRQ_MFP_TIMER2, IRQ_IS_POLLED); + +	/* prepare timer D data for use as poll interrupt */ +	/* set Timer D data Register - needs to be > 0 */ +	st_mfp.tim_dt_d = 254;	/* < 100 Hz */ +	/* start timer D, div = 1:100 */ +	st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 0xf0) | 0x6; + +	/* request timer D dispatch handler */ +	if (request_irq(IRQ_MFP_TIMD, mfptimer_handler, IRQF_SHARED, +			stmfp_base.name, &stmfp_base)) +		pr_err("Couldn't register %s interrupt\n", stmfp_base.name); + +	/* +	 * EtherNAT ethernet / USB interrupt handlers +	 */ + +	m68k_setup_irq_controller(&atari_ethernat_chip, handle_simple_irq, +				  139, 2);  } @@ -431,7 +362,7 @@ void __init atari_init_IRQ(void)   * hardware with a programmable int vector (probably a VME board).   */ -unsigned long atari_register_vme_int(void) +unsigned int atari_register_vme_int(void)  {  	int i; @@ -448,7 +379,7 @@ unsigned long atari_register_vme_int(void)  EXPORT_SYMBOL(atari_register_vme_int); -void atari_unregister_vme_int(unsigned long irq) +void atari_unregister_vme_int(unsigned int irq)  {  	if (irq >= VME_SOURCE_BASE && irq < VME_SOURCE_BASE + VME_MAX_SOURCES) {  		irq -= VME_SOURCE_BASE; diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index 5890897d28b..95022b04b62 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c @@ -36,13 +36,10 @@  /* Hook for MIDI serial driver */  void (*atari_MIDI_interrupt_hook) (void); -/* Hook for mouse driver */ -void (*atari_mouse_interrupt_hook) (char *);  /* Hook for keyboard inputdev  driver */  void (*atari_input_keyboard_interrupt_hook) (unsigned char, char);  /* Hook for mouse inputdev  driver */  void (*atari_input_mouse_interrupt_hook) (char *); -EXPORT_SYMBOL(atari_mouse_interrupt_hook);  EXPORT_SYMBOL(atari_input_keyboard_interrupt_hook);  EXPORT_SYMBOL(atari_input_mouse_interrupt_hook); @@ -130,7 +127,7 @@ KEYBOARD_STATE kb_state;   * it's really hard to decide whether they're mouse or keyboard bytes. Since   * overruns usually occur when moving the Atari mouse rapidly, they're seen as   * mouse bytes here. If this is wrong, only a make code of the keyboard gets - * lost, which isn't too bad. Loosing a break code would be disastrous, + * lost, which isn't too bad. Losing a break code would be disastrous,   * because then the keyboard repeat strikes...   */ @@ -263,8 +260,8 @@ repeat:  			kb_state.buf[kb_state.len++] = scancode;  			if (kb_state.len == 3) {  				kb_state.state = KEYBOARD; -				if (atari_mouse_interrupt_hook) -					atari_mouse_interrupt_hook(kb_state.buf); +				if (atari_input_mouse_interrupt_hook) +					atari_input_mouse_interrupt_hook(kb_state.buf);  			}  			break; @@ -575,7 +572,7 @@ int atari_keyb_init(void)  	kb_state.len = 0;  	error = request_irq(IRQ_MFP_ACIA, atari_keyboard_interrupt, -			    IRQ_TYPE_SLOW, "keyboard/mouse/MIDI", +			    IRQ_TYPE_SLOW, "keyboard,mouse,MIDI",  			    atari_keyboard_interrupt);  	if (error)  		return error; diff --git a/arch/m68k/atari/atasound.c b/arch/m68k/atari/atasound.c index d266fe89c12..1c1181ebb94 100644 --- a/arch/m68k/atari/atasound.c +++ b/arch/m68k/atari/atasound.c @@ -25,7 +25,6 @@  #include <linux/module.h>  #include <asm/atarihw.h> -#include <asm/system.h>  #include <asm/irq.h>  #include <asm/pgtable.h>  #include <asm/atariints.h> diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index ae2d96e5d61..01a62161b08 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c @@ -31,15 +31,18 @@  #include <linux/init.h>  #include <linux/delay.h>  #include <linux/ioport.h> +#include <linux/platform_device.h> +#include <linux/usb/isp116x.h>  #include <linux/vt_kern.h>  #include <linux/module.h>  #include <asm/bootinfo.h> +#include <asm/bootinfo-atari.h> +#include <asm/byteorder.h>  #include <asm/setup.h>  #include <asm/atarihw.h>  #include <asm/atariints.h>  #include <asm/atari_stram.h> -#include <asm/system.h>  #include <asm/machdep.h>  #include <asm/hwtest.h>  #include <asm/io.h> @@ -75,7 +78,7 @@ static void atari_heartbeat(int on);  /* atari specific timer functions (in time.c) */  extern void atari_sched_init(irq_handler_t); -extern unsigned long atari_gettimeoffset (void); +extern u32 atari_gettimeoffset(void);  extern int atari_mste_hwclk (int, struct rtc_time *);  extern int atari_tt_hwclk (int, struct rtc_time *);  extern int atari_mste_set_clock_mmss (unsigned long); @@ -128,14 +131,14 @@ static int __init scc_test(volatile char *ctla)  int __init atari_parse_bootinfo(const struct bi_record *record)  {  	int unknown = 0; -	const u_long *data = record->data; +	const void *data = record->data; -	switch (record->tag) { +	switch (be16_to_cpu(record->tag)) {  	case BI_ATARI_MCH_COOKIE: -		atari_mch_cookie = *data; +		atari_mch_cookie = be32_to_cpup(data);  		break;  	case BI_ATARI_MCH_TYPE: -		atari_mch_type = *data; +		atari_mch_type = be32_to_cpup(data);  		break;  	default:  		unknown = 1; @@ -205,7 +208,7 @@ void __init config_atari(void)  	mach_init_IRQ        = atari_init_IRQ;  	mach_get_model	 = atari_get_model;  	mach_get_hardware_list = atari_get_hardware_list; -	mach_gettimeoffset   = atari_gettimeoffset; +	arch_gettimeoffset   = atari_gettimeoffset;  	mach_reset           = atari_reset;  	mach_max_dma_address = 0xffffff;  #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) @@ -315,7 +318,7 @@ void __init config_atari(void)  		ATARIHW_SET(SCC_DMA);  		printk("SCC_DMA ");  	} -	if (scc_test(&scc.cha_a_ctrl)) { +	if (scc_test(&atari_scc.cha_a_ctrl)) {  		ATARIHW_SET(SCC);  		printk("SCC ");  	} @@ -414,9 +417,9 @@ void __init config_atari(void)  					 * FDC val = 4 -> Supervisor only */  		asm volatile ("\n"  			"	.chip	68030\n" -			"	pmove	%0@,%/tt1\n" +			"	pmove	%0,%/tt1\n"  			"	.chip	68k" -			: : "a" (&tt1_val)); +			: : "m" (tt1_val));  	} else {  	        asm volatile ("\n"  			"	.chip	68040\n" @@ -569,10 +572,10 @@ static void atari_reset(void)  			: "d0");  	} else  		asm volatile ("\n" -			"	pmove	%0@,%%tc\n" +			"	pmove	%0,%%tc\n"  			"	jmp	%1@"  			: /* no outputs */ -			: "a" (&tc_val), "a" (reset_addr)); +			: "m" (tc_val), "a" (reset_addr));  } @@ -656,3 +659,240 @@ static void atari_get_hardware_list(struct seq_file *m)  	ATARIHW_ANNOUNCE(VME, "VME Bus");  	ATARIHW_ANNOUNCE(DSP56K, "DSP56001 processor");  } + +/* + * MSch: initial platform device support for Atari, + * required for EtherNAT/EtherNEC/NetUSBee drivers + */ + +#if defined(CONFIG_ATARI_ETHERNAT) || defined(CONFIG_ATARI_ETHERNEC) +static void isp1160_delay(struct device *dev, int delay) +{ +	ndelay(delay); +} +#endif + +#ifdef CONFIG_ATARI_ETHERNAT +/* + * EtherNAT: SMC91C111 Ethernet chipset, handled by smc91x driver + */ + +#define ATARI_ETHERNAT_IRQ		140 + +static struct resource smc91x_resources[] = { +	[0] = { +		.name	= "smc91x-regs", +		.start	= ATARI_ETHERNAT_PHYS_ADDR, +		.end	= ATARI_ETHERNAT_PHYS_ADDR + 0xfffff, +		.flags	= IORESOURCE_MEM, +	}, +	[1] = { +		.name	= "smc91x-irq", +		.start	= ATARI_ETHERNAT_IRQ, +		.end	= ATARI_ETHERNAT_IRQ, +		.flags	= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device smc91x_device = { +	.name		= "smc91x", +	.id		= -1, +	.num_resources	= ARRAY_SIZE(smc91x_resources), +	.resource	= smc91x_resources, +}; + +/* + * ISP 1160 - using the isp116x-hcd module + */ + +#define ATARI_USB_PHYS_ADDR	0x80000012 +#define ATARI_USB_IRQ		139 + +static struct resource isp1160_resources[] = { +	[0] = { +		.name	= "isp1160-data", +		.start	= ATARI_USB_PHYS_ADDR, +		.end	= ATARI_USB_PHYS_ADDR + 0x1, +		.flags	= IORESOURCE_MEM, +	}, +	[1] = { +		.name	= "isp1160-regs", +		.start	= ATARI_USB_PHYS_ADDR + 0x4, +		.end	= ATARI_USB_PHYS_ADDR + 0x5, +		.flags	= IORESOURCE_MEM, +	}, +	[2] = { +		.name	= "isp1160-irq", +		.start	= ATARI_USB_IRQ, +		.end	= ATARI_USB_IRQ, +		.flags	= IORESOURCE_IRQ, +	}, +}; + +/* (DataBusWidth16|AnalogOCEnable|DREQOutputPolarity|DownstreamPort15KRSel ) */ +static struct isp116x_platform_data isp1160_platform_data = { +	/* Enable internal resistors on downstream ports */ +	.sel15Kres		= 1, +	/* On-chip overcurrent protection */ +	.oc_enable		= 1, +	/* INT output polarity */ +	.int_act_high		= 1, +	/* INT edge or level triggered */ +	.int_edge_triggered	= 0, + +	/* WAKEUP pin connected - NOT SUPPORTED  */ +	/* .remote_wakeup_connected = 0, */ +	/* Wakeup by devices on usb bus enabled */ +	.remote_wakeup_enable	= 0, +	.delay			= isp1160_delay, +}; + +static struct platform_device isp1160_device = { +	.name		= "isp116x-hcd", +	.id		= 0, +	.num_resources	= ARRAY_SIZE(isp1160_resources), +	.resource	= isp1160_resources, +	.dev			= { +		.platform_data	= &isp1160_platform_data, +	}, +}; + +static struct platform_device *atari_ethernat_devices[] __initdata = { +	&smc91x_device, +	&isp1160_device +}; +#endif /* CONFIG_ATARI_ETHERNAT */ + +#ifdef CONFIG_ATARI_ETHERNEC +/* + * EtherNEC: RTL8019 (NE2000 compatible) Ethernet chipset, + * handled by ne.c driver + */ + +#define ATARI_ETHERNEC_PHYS_ADDR	0xfffa0000 +#define ATARI_ETHERNEC_BASE		0x300 +#define ATARI_ETHERNEC_IRQ		IRQ_MFP_TIMER1 + +static struct resource rtl8019_resources[] = { +	[0] = { +		.name	= "rtl8019-regs", +		.start	= ATARI_ETHERNEC_BASE, +		.end	= ATARI_ETHERNEC_BASE + 0x20 - 1, +		.flags	= IORESOURCE_IO, +	}, +	[1] = { +		.name	= "rtl8019-irq", +		.start	= ATARI_ETHERNEC_IRQ, +		.end	= ATARI_ETHERNEC_IRQ, +		.flags	= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device rtl8019_device = { +	.name		= "ne", +	.id		= -1, +	.num_resources	= ARRAY_SIZE(rtl8019_resources), +	.resource	= rtl8019_resources, +}; + +/* + * NetUSBee: ISP1160 USB host adapter via ROM-port adapter + */ + +#define ATARI_NETUSBEE_PHYS_ADDR	0xfffa8000 +#define ATARI_NETUSBEE_BASE		0x340 +#define ATARI_NETUSBEE_IRQ		IRQ_MFP_TIMER2 + +static struct resource netusbee_resources[] = { +	[0] = { +		.name	= "isp1160-data", +		.start	= ATARI_NETUSBEE_BASE, +		.end	= ATARI_NETUSBEE_BASE + 0x1, +		.flags	= IORESOURCE_MEM, +	}, +	[1] = { +		.name	= "isp1160-regs", +		.start	= ATARI_NETUSBEE_BASE + 0x20, +		.end	= ATARI_NETUSBEE_BASE + 0x21, +		.flags	= IORESOURCE_MEM, +	}, +	[2] = { +		.name	= "isp1160-irq", +		.start	= ATARI_NETUSBEE_IRQ, +		.end	= ATARI_NETUSBEE_IRQ, +		.flags	= IORESOURCE_IRQ, +	}, +}; + +/* (DataBusWidth16|AnalogOCEnable|DREQOutputPolarity|DownstreamPort15KRSel ) */ +static struct isp116x_platform_data netusbee_platform_data = { +	/* Enable internal resistors on downstream ports */ +	.sel15Kres		= 1, +	/* On-chip overcurrent protection */ +	.oc_enable		= 1, +	/* INT output polarity */ +	.int_act_high		= 1, +	/* INT edge or level triggered */ +	.int_edge_triggered	= 0, + +	/* WAKEUP pin connected - NOT SUPPORTED  */ +	/* .remote_wakeup_connected = 0, */ +	/* Wakeup by devices on usb bus enabled */ +	.remote_wakeup_enable	= 0, +	.delay			= isp1160_delay, +}; + +static struct platform_device netusbee_device = { +	.name		= "isp116x-hcd", +	.id		= 1, +	.num_resources	= ARRAY_SIZE(netusbee_resources), +	.resource	= netusbee_resources, +	.dev			= { +		.platform_data	= &netusbee_platform_data, +	}, +}; + +static struct platform_device *atari_netusbee_devices[] __initdata = { +	&rtl8019_device, +	&netusbee_device +}; +#endif /* CONFIG_ATARI_ETHERNEC */ + +int __init atari_platform_init(void) +{ +	int rv = 0; + +	if (!MACH_IS_ATARI) +		return -ENODEV; + +#ifdef CONFIG_ATARI_ETHERNAT +	{ +		unsigned char *enatc_virt; +		enatc_virt = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0xf); +		if (hwreg_present(enatc_virt)) { +			rv = platform_add_devices(atari_ethernat_devices, +						ARRAY_SIZE(atari_ethernat_devices)); +		} +		iounmap(enatc_virt); +	} +#endif + +#ifdef CONFIG_ATARI_ETHERNEC +	{ +		int error; +		unsigned char *enec_virt; +		enec_virt = (unsigned char *)ioremap((ATARI_ETHERNEC_PHYS_ADDR), 0xf); +		if (hwreg_present(enec_virt)) { +			error = platform_add_devices(atari_netusbee_devices, +						ARRAY_SIZE(atari_netusbee_devices)); +			if (error && !rv) +				rv = error; +		} +		iounmap(enec_virt); +	} +#endif + +	return rv; +} + +arch_initcall(atari_platform_init); diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c index 28efdc33c1a..03cb5e08d7c 100644 --- a/arch/m68k/atari/debug.c +++ b/arch/m68k/atari/debug.c @@ -53,9 +53,9 @@ static inline void ata_scc_out(char c)  {  	do {  		MFPDELAY(); -	} while (!(scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */ +	} while (!(atari_scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */  	MFPDELAY(); -	scc.cha_b_data = c; +	atari_scc.cha_b_data = c;  }  static void atari_scc_console_write(struct console *co, const char *str, @@ -140,9 +140,9 @@ int atari_scc_console_wait_key(struct console *co)  {  	do {  		MFPDELAY(); -	} while (!(scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */ +	} while (!(atari_scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */  	MFPDELAY(); -	return scc.cha_b_data; +	return atari_scc.cha_b_data;  }  int atari_midi_console_wait_key(struct console *co) @@ -185,9 +185,9 @@ static void __init atari_init_mfp_port(int cflag)  #define SCC_WRITE(reg, val)				\  	do {						\ -		scc.cha_b_ctrl = (reg);			\ +		atari_scc.cha_b_ctrl = (reg);		\  		MFPDELAY();				\ -		scc.cha_b_ctrl = (val);			\ +		atari_scc.cha_b_ctrl = (val);		\  		MFPDELAY();				\  	} while (0) @@ -202,7 +202,6 @@ static void __init atari_init_mfp_port(int cflag)  static void __init atari_init_scc_port(int cflag)  { -	extern int atari_SCC_reset_done;  	static int clksrc_table[9] =  		/* reg 11: 0x50 = BRG, 0x00 = RTxC, 0x28 = TRxC */  		{ 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00 }; @@ -240,7 +239,7 @@ static void __init atari_init_scc_port(int cflag)  	reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40;  	reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */; -	(void)scc.cha_b_ctrl;		/* reset reg pointer */ +	(void)atari_scc.cha_b_ctrl;	/* reset reg pointer */  	SCC_WRITE(9, 0xc0);		/* reset */  	LONG_DELAY();			/* extra delay after WR9 access */  	SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03) @@ -288,6 +287,8 @@ static void __init atari_init_midi_port(int cflag)  static int __init atari_debug_setup(char *arg)  { +	bool registered; +  	if (!MACH_IS_ATARI)  		return 0; @@ -295,6 +296,7 @@ static int __init atari_debug_setup(char *arg)  		/* defaults to ser2 for a Falcon and ser1 otherwise */  		arg = MACH_IS_FALCON ? "ser2" : "ser1"; +	registered = !!atari_console_driver.write;  	if (!strcmp(arg, "ser1")) {  		/* ST-MFP Modem1 serial port */  		atari_init_mfp_port(B9600|CS8); @@ -318,7 +320,7 @@ static int __init atari_debug_setup(char *arg)  		sound_ym.wd_data = sound_ym.rd_data_reg_sel | 0x20; /* strobe H */  		atari_console_driver.write = atari_par_console_write;  	} -	if (atari_console_driver.write) +	if (atari_console_driver.write && !registered)  		register_console(&atari_console_driver);  	return 0; diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c index 604329fafbb..ddbf43ca885 100644 --- a/arch/m68k/atari/stdma.c +++ b/arch/m68k/atari/stdma.c @@ -180,7 +180,7 @@ void __init stdma_init(void)  {  	stdma_isr = NULL;  	if (request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | IRQF_SHARED, -			"ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int)) +			"ST-DMA floppy,ACSI,IDE,Falcon-SCSI", stdma_int))  		pr_err("Couldn't register ST-DMA interrupt\n");  } diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c index 6ec3b7f3377..5f8cb5a234d 100644 --- a/arch/m68k/atari/stram.c +++ b/arch/m68k/atari/stram.c @@ -1,5 +1,5 @@  /* - * arch/m68k/atari/stram.c: Functions for ST-RAM allocations + * Functions for ST-RAM allocations   *   * Copyright 1994-97 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>   * @@ -30,91 +30,36 @@  #include <asm/atari_stram.h>  #include <asm/io.h> -#undef DEBUG - -#ifdef DEBUG -#define	DPRINTK(fmt,args...) printk( fmt, ##args ) -#else -#define DPRINTK(fmt,args...) -#endif - -#if defined(CONFIG_PROC_FS) && defined(CONFIG_STRAM_PROC) -/* abbrev for the && above... */ -#define DO_PROC -#include <linux/proc_fs.h> -#include <linux/seq_file.h> -#endif  /* - * ++roman: - * - * New version of ST-Ram buffer allocation. Instead of using the - * 1 MB - 4 KB that remain when the ST-Ram chunk starts at $1000 - * (1 MB granularity!), such buffers are reserved like this: - * - *  - If the kernel resides in ST-Ram anyway, we can take the buffer - *    from behind the current kernel data space the normal way - *    (incrementing start_mem). - * - *  - If the kernel is in TT-Ram, stram_init() initializes start and - *    end of the available region. Buffers are allocated from there - *    and mem_init() later marks the such used pages as reserved. - *    Since each TT-Ram chunk is at least 4 MB in size, I hope there - *    won't be an overrun of the ST-Ram region by normal kernel data - *    space. - * - * For that, ST-Ram may only be allocated while kernel initialization - * is going on, or exactly: before mem_init() is called. There is also - * no provision now for freeing ST-Ram buffers. It seems that isn't - * really needed. - * + * The ST-RAM allocator allocates memory from a pool of reserved ST-RAM of + * configurable size, set aside on ST-RAM init. + * As long as this pool is not exhausted, allocation of real ST-RAM can be + * guaranteed.   */ -/* Start and end (virtual) of ST-RAM */ -static void *stram_start, *stram_end; - -/* set after memory_init() executed and allocations via start_mem aren't - * possible anymore */ -static int mem_init_done; -  /* set if kernel is in ST-RAM */  static int kernel_in_stram; -typedef struct stram_block { -	struct stram_block *next; -	void *start; -	unsigned long size; -	unsigned flags; -	const char *owner; -} BLOCK; - -/* values for flags field */ -#define BLOCK_FREE	0x01	/* free structure in the BLOCKs pool */ -#define BLOCK_KMALLOCED	0x02	/* structure allocated by kmalloc() */ -#define BLOCK_GFP	0x08	/* block allocated with __get_dma_pages() */ +static struct resource stram_pool = { +	.name = "ST-RAM Pool" +}; -/* list of allocated blocks */ -static BLOCK *alloc_list; +static unsigned long pool_size = 1024*1024; -/* We can't always use kmalloc() to allocate BLOCK structures, since - * stram_alloc() can be called rather early. So we need some pool of - * statically allocated structures. 20 of them is more than enough, so in most - * cases we never should need to call kmalloc(). */ -#define N_STATIC_BLOCKS	20 -static BLOCK static_blocks[N_STATIC_BLOCKS]; +static unsigned long stram_virt_offset; -/***************************** Prototypes *****************************/ +static int __init atari_stram_setup(char *arg) +{ +	if (!MACH_IS_ATARI) +		return 0; -static BLOCK *add_region( void *addr, unsigned long size ); -static BLOCK *find_region( void *addr ); -static int remove_region( BLOCK *block ); +	pool_size = memparse(arg, NULL); +	return 0; +} -/************************* End of Prototypes **************************/ +early_param("stram_pool", atari_stram_setup); - -/* ------------------------------------------------------------------------ */ -/*							   Public Interface								*/ -/* ------------------------------------------------------------------------ */  /*   * This init function is called very early by atari/config.c @@ -124,253 +69,129 @@ void __init atari_stram_init(void)  {  	int i; -	/* initialize static blocks */ -	for( i = 0; i < N_STATIC_BLOCKS; ++i ) -		static_blocks[i].flags = BLOCK_FREE; +	/* +	 * determine whether kernel code resides in ST-RAM +	 * (then ST-RAM is the first memory block at virtual 0x0) +	 */ +	kernel_in_stram = (m68k_memory[0].addr == 0); -	/* determine whether kernel code resides in ST-RAM (then ST-RAM is the -	 * first memory block at virtual 0x0) */ -	stram_start = phys_to_virt(0); -	kernel_in_stram = (stram_start == 0); - -	for( i = 0; i < m68k_num_memory; ++i ) { +	for (i = 0; i < m68k_num_memory; ++i) {  		if (m68k_memory[i].addr == 0) { -			/* skip first 2kB or page (supervisor-only!) */ -			stram_end = stram_start + m68k_memory[i].size;  			return;  		}  	} +  	/* Should never come here! (There is always ST-Ram!) */ -	panic( "atari_stram_init: no ST-RAM found!" ); +	panic("atari_stram_init: no ST-RAM found!");  }  /*   * This function is called from setup_arch() to reserve the pages needed for - * ST-RAM management. + * ST-RAM management, if the kernel resides in ST-RAM.   */  void __init atari_stram_reserve_pages(void *start_mem)  { -	/* always reserve first page of ST-RAM, the first 2 kB are -	 * supervisor-only! */ -	if (!kernel_in_stram) -		reserve_bootmem(0, PAGE_SIZE, BOOTMEM_DEFAULT); - -} - -void atari_stram_mem_init_hook (void) -{ -	mem_init_done = 1; +	if (kernel_in_stram) { +		pr_debug("atari_stram pool: kernel in ST-RAM, using alloc_bootmem!\n"); +		stram_pool.start = (resource_size_t)alloc_bootmem_low_pages(pool_size); +		stram_pool.end = stram_pool.start + pool_size - 1; +		request_resource(&iomem_resource, &stram_pool); +		stram_virt_offset = 0; +		pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n", +			pool_size, &stram_pool); +		pr_debug("atari_stram pool: stram_virt_offset = %lx\n", +			stram_virt_offset); +	}  }  /* - * This is main public interface: somehow allocate a ST-RAM block - * - *  - If we're before mem_init(), we have to make a static allocation. The - *    region is taken in the kernel data area (if the kernel is in ST-RAM) or - *    from the start of ST-RAM (if the kernel is in TT-RAM) and added to the - *    rsvd_stram_* region. The ST-RAM is somewhere in the middle of kernel - *    address space in the latter case. - * - *  - If mem_init() already has been called, try with __get_dma_pages(). - *    This has the disadvantage that it's very hard to get more than 1 page, - *    and it is likely to fail :-( - * + * This function is called as arch initcall to reserve the pages needed for + * ST-RAM management, if the kernel does not reside in ST-RAM.   */ -void *atari_stram_alloc(long size, const char *owner) +int __init atari_stram_map_pages(void)  { -	void *addr = NULL; -	BLOCK *block; -	int flags; - -	DPRINTK("atari_stram_alloc(size=%08lx,owner=%s)\n", size, owner); - -	if (!mem_init_done) -		return alloc_bootmem_low(size); -	else { -		/* After mem_init(): can only resort to __get_dma_pages() */ -		addr = (void *)__get_dma_pages(GFP_KERNEL, get_order(size)); -		flags = BLOCK_GFP; -		DPRINTK( "atari_stram_alloc: after mem_init, " -				 "get_pages=%p\n", addr ); -	} - -	if (addr) { -		if (!(block = add_region( addr, size ))) { -			/* out of memory for BLOCK structure :-( */ -			DPRINTK( "atari_stram_alloc: out of mem for BLOCK -- " -					 "freeing again\n" ); -			free_pages((unsigned long)addr, get_order(size)); -			return( NULL ); -		} -		block->owner = owner; -		block->flags |= flags; +	if (!kernel_in_stram) { +		/* +		 * Skip page 0, as the fhe first 2 KiB are supervisor-only! +		 */ +		pr_debug("atari_stram pool: kernel not in ST-RAM, using ioremap!\n"); +		stram_pool.start = PAGE_SIZE; +		stram_pool.end = stram_pool.start + pool_size - 1; +		request_resource(&iomem_resource, &stram_pool); +		stram_virt_offset = (unsigned long) ioremap(stram_pool.start, +				resource_size(&stram_pool)) - stram_pool.start; +		pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n", +			pool_size, &stram_pool); +		pr_debug("atari_stram pool: stram_virt_offset = %lx\n", +			stram_virt_offset);  	} -	return( addr ); +	return 0;  } -EXPORT_SYMBOL(atari_stram_alloc); +arch_initcall(atari_stram_map_pages); -void atari_stram_free( void *addr ) +void *atari_stram_to_virt(unsigned long phys)  { -	BLOCK *block; - -	DPRINTK( "atari_stram_free(addr=%p)\n", addr ); - -	if (!(block = find_region( addr ))) { -		printk( KERN_ERR "Attempt to free non-allocated ST-RAM block at %p " -				"from %p\n", addr, __builtin_return_address(0) ); -		return; -	} -	DPRINTK( "atari_stram_free: found block (%p): size=%08lx, owner=%s, " -			 "flags=%02x\n", block, block->size, block->owner, block->flags ); - -	if (!(block->flags & BLOCK_GFP)) -		goto fail; - -	DPRINTK("atari_stram_free: is kmalloced, order_size=%d\n", -		get_order(block->size)); -	free_pages((unsigned long)addr, get_order(block->size)); -	remove_region( block ); -	return; - -  fail: -	printk( KERN_ERR "atari_stram_free: cannot free block at %p " -			"(called from %p)\n", addr, __builtin_return_address(0) ); +	return (void *)(phys + stram_virt_offset);  } -EXPORT_SYMBOL(atari_stram_free); - - -/* ------------------------------------------------------------------------ */ -/*							  Region Management								*/ -/* ------------------------------------------------------------------------ */ +EXPORT_SYMBOL(atari_stram_to_virt); -/* insert a region into the alloced list (sorted) */ -static BLOCK *add_region( void *addr, unsigned long size ) +unsigned long atari_stram_to_phys(void *virt)  { -	BLOCK **p, *n = NULL; -	int i; - -	for( i = 0; i < N_STATIC_BLOCKS; ++i ) { -		if (static_blocks[i].flags & BLOCK_FREE) { -			n = &static_blocks[i]; -			n->flags = 0; -			break; -		} -	} -	if (!n && mem_init_done) { -		/* if statics block pool exhausted and we can call kmalloc() already -		 * (after mem_init()), try that */ -		n = kmalloc( sizeof(BLOCK), GFP_KERNEL ); -		if (n) -			n->flags = BLOCK_KMALLOCED; -	} -	if (!n) { -		printk( KERN_ERR "Out of memory for ST-RAM descriptor blocks\n" ); -		return( NULL ); -	} -	n->start = addr; -	n->size  = size; - -	for( p = &alloc_list; *p; p = &((*p)->next) ) -		if ((*p)->start > addr) break; -	n->next = *p; -	*p = n; - -	return( n ); +	return (unsigned long)(virt - stram_virt_offset);  } +EXPORT_SYMBOL(atari_stram_to_phys); -/* find a region (by start addr) in the alloced list */ -static BLOCK *find_region( void *addr ) +void *atari_stram_alloc(unsigned long size, const char *owner)  { -	BLOCK *p; - -	for( p = alloc_list; p; p = p->next ) { -		if (p->start == addr) -			return( p ); -		if (p->start > addr) -			break; +	struct resource *res; +	int error; + +	pr_debug("atari_stram_alloc: allocate %lu bytes\n", size); + +	/* round up */ +	size = PAGE_ALIGN(size); + +	res = kzalloc(sizeof(struct resource), GFP_KERNEL); +	if (!res) +		return NULL; + +	res->name = owner; +	error = allocate_resource(&stram_pool, res, size, 0, UINT_MAX, +				  PAGE_SIZE, NULL, NULL); +	if (error < 0) { +		pr_err("atari_stram_alloc: allocate_resource() failed %d!\n", +		       error); +		kfree(res); +		return NULL;  	} -	return( NULL ); -} - -/* remove a block from the alloced list */ -static int remove_region( BLOCK *block ) -{ -	BLOCK **p; - -	for( p = &alloc_list; *p; p = &((*p)->next) ) -		if (*p == block) break; -	if (!*p) -		return( 0 ); - -	*p = block->next; -	if (block->flags & BLOCK_KMALLOCED) -		kfree( block ); -	else -		block->flags |= BLOCK_FREE; -	return( 1 ); +	pr_debug("atari_stram_alloc: returning %pR\n", res); +	return atari_stram_to_virt(res->start);  } +EXPORT_SYMBOL(atari_stram_alloc); - -/* ------------------------------------------------------------------------ */ -/*						 /proc statistics file stuff						*/ -/* ------------------------------------------------------------------------ */ - -#ifdef DO_PROC - -#define	PRINT_PROC(fmt,args...) seq_printf( m, fmt, ##args ) - -static int stram_proc_show(struct seq_file *m, void *v) -{ -	BLOCK *p; - -	PRINT_PROC("Total ST-RAM:      %8u kB\n", -			   (stram_end - stram_start) >> 10); -	PRINT_PROC( "Allocated regions:\n" ); -	for( p = alloc_list; p; p = p->next ) { -		PRINT_PROC("0x%08lx-0x%08lx: %s (", -			   virt_to_phys(p->start), -			   virt_to_phys(p->start+p->size-1), -			   p->owner); -		if (p->flags & BLOCK_GFP) -			PRINT_PROC( "page-alloced)\n" ); -		else -			PRINT_PROC( "??)\n" ); -	} - -	return 0; -} - -static int stram_proc_open(struct inode *inode, struct file *file) +void atari_stram_free(void *addr)  { -	return single_open(file, stram_proc_show, NULL); -} +	unsigned long start = atari_stram_to_phys(addr); +	struct resource *res; +	unsigned long size; -static const struct file_operations stram_proc_fops = { -	.open		= stram_proc_open, -	.read		= seq_read, -	.llseek		= seq_lseek, -	.release	= single_release, -}; +	res = lookup_resource(&stram_pool, start); +	if (!res) { +		pr_err("atari_stram_free: trying to free nonexistent region " +		       "at %p\n", addr); +		return; +	} -static int __init proc_stram_init(void) -{ -	proc_create("stram", 0, NULL, &stram_proc_fops); -	return 0; +	size = resource_size(res); +	pr_debug("atari_stram_free: free %lu bytes at %p\n", size, addr); +	release_resource(res); +	kfree(res);  } -module_init(proc_stram_init); -#endif - - -/* - * Local variables: - *  c-indent-level: 4 - *  tab-width: 4 - * End: - */ +EXPORT_SYMBOL(atari_stram_free); diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index a0531f34c61..da8f981c36d 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c @@ -17,6 +17,7 @@  #include <linux/rtc.h>  #include <linux/bcd.h>  #include <linux/delay.h> +#include <linux/export.h>  #include <asm/atariints.h> @@ -41,9 +42,9 @@ atari_sched_init(irq_handler_t timer_routine)  #define TICK_SIZE 10000  /* This is always executed with interrupts disabled.  */ -unsigned long atari_gettimeoffset (void) +u32 atari_gettimeoffset(void)  { -  unsigned long ticks, offset = 0; +  u32 ticks, offset = 0;    /* read MFP timer C current value */    ticks = st_mfp.tim_dt_c; @@ -56,7 +57,7 @@ unsigned long atari_gettimeoffset (void)    ticks = INT_TICKS - ticks;    ticks = ticks * 10000L / INT_TICKS; -  return ticks + offset; +  return (ticks + offset) * 1000;  } diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index 9fe6fefb5e1..478623dbb20 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c @@ -28,7 +28,8 @@  #include <linux/bcd.h>  #include <asm/bootinfo.h> -#include <asm/system.h> +#include <asm/bootinfo-vme.h> +#include <asm/byteorder.h>  #include <asm/pgtable.h>  #include <asm/setup.h>  #include <asm/irq.h> @@ -39,21 +40,21 @@  static void bvme6000_get_model(char *model);  extern void bvme6000_sched_init(irq_handler_t handler); -extern unsigned long bvme6000_gettimeoffset (void); +extern u32 bvme6000_gettimeoffset(void);  extern int bvme6000_hwclk (int, struct rtc_time *);  extern int bvme6000_set_clock_mmss (unsigned long);  extern void bvme6000_reset (void);  void bvme6000_set_vectors (void); -/* Save tick handler routine pointer, will point to do_timer() in - * kernel/sched.c, called via bvme6000_process_int() */ +/* Save tick handler routine pointer, will point to xtime_update() in + * kernel/timer/timekeeping.c, called via bvme6000_process_int() */  static irq_handler_t tick_handler; -int bvme6000_parse_bootinfo(const struct bi_record *bi) +int __init bvme6000_parse_bootinfo(const struct bi_record *bi)  { -	if (bi->tag == BI_VME_TYPE) +	if (be16_to_cpu(bi->tag) == BI_VME_TYPE)  		return 0;  	else  		return 1; @@ -86,7 +87,7 @@ static void bvme6000_get_model(char *model)   */  static void __init bvme6000_init_IRQ(void)  { -	m68k_setup_user_interrupt(VEC_USER, 192, NULL); +	m68k_setup_user_interrupt(VEC_USER, 192);  }  void __init config_bvme6000(void) @@ -111,7 +112,7 @@ void __init config_bvme6000(void)      mach_max_dma_address = 0xffffffff;      mach_sched_init      = bvme6000_sched_init;      mach_init_IRQ        = bvme6000_init_IRQ; -    mach_gettimeoffset   = bvme6000_gettimeoffset; +    arch_gettimeoffset   = bvme6000_gettimeoffset;      mach_hwclk           = bvme6000_hwclk;      mach_set_clock_mmss	 = bvme6000_set_clock_mmss;      mach_reset		 = bvme6000_reset; @@ -217,13 +218,13 @@ void bvme6000_sched_init (irq_handler_t timer_routine)   * results...   */ -unsigned long bvme6000_gettimeoffset (void) +u32 bvme6000_gettimeoffset(void)  {      volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;      volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE;      unsigned char msr = rtc->msr & 0xc0;      unsigned char t1int, t1op; -    unsigned long v = 800000, ov; +    u32 v = 800000, ov;      rtc->msr = 0;	/* Ensure timer registers accessible */ @@ -247,7 +248,7 @@ unsigned long bvme6000_gettimeoffset (void)  	v += 10000;			/* Int pending, + 10ms */      rtc->msr = msr; -    return v; +    return v * 1000;  }  /* diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index 1c4d4c7bf4d..cf12a17dc28 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c @@ -21,7 +21,6 @@  #include <asm/io.h>  #include <asm/uaccess.h> -#include <asm/system.h>  #include <asm/setup.h>  /* diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index dbb49fc6463..d7eac833a94 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig @@ -1,55 +1,79 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-amiga"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_AMIGA=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68020=y  CONFIG_M68030=y  CONFIG_M68040=y  CONFIG_M68060=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m +CONFIG_AMIGA=y  CONFIG_ZORRO=y  CONFIG_AMIGA_PCMCIA=y -CONFIG_HEARTBEAT=y -CONFIG_PROC_HARDWARE=y  CONFIG_ZORRO_NAMES=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -57,36 +81,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -94,28 +147,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -125,7 +195,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -134,18 +205,36 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_PARPORT=m  CONFIG_PARPORT_AMIGA=m @@ -155,11 +244,14 @@ CONFIG_AMIGA_FLOPPY=y  CONFIG_AMIGA_Z2RAM=y  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_IDE=y +CONFIG_IDE_GD_ATAPI=y  CONFIG_BLK_DEV_IDECD=y  CONFIG_BLK_DEV_GAYLE=y  CONFIG_BLK_DEV_BUDDHA=y @@ -173,57 +265,80 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_A3000_SCSI=y  CONFIG_A2091_SCSI=y  CONFIG_GVP11_SCSI=y  CONFIG_SCSI_A4000T=y  CONFIG_SCSI_ZORRO7XX=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y -CONFIG_ARIADNE=y +# CONFIG_NET_VENDOR_3COM is not set  CONFIG_A2065=y +CONFIG_ARIADNE=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set  CONFIG_HYDRA=y -CONFIG_ZORRO8390=y  CONFIG_APNE=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +CONFIG_ZORRO8390=y +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  CONFIG_KEYBOARD_AMIGA=y  # CONFIG_KEYBOARD_ATKBD is not set  # CONFIG_MOUSE_PS2 is not set @@ -233,12 +348,14 @@ CONFIG_JOYSTICK_AMIGA=m  CONFIG_INPUT_MISC=y  CONFIG_INPUT_M68K_BEEP=m  # CONFIG_SERIO is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  CONFIG_PRINTER=m  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_PARPORT=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FB_CIRRUS=y @@ -253,49 +370,60 @@ CONFIG_SOUND=m  CONFIG_DMASOUND_PAULA=m  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_MSM6242=m +CONFIG_RTC_DRV_RP5C01=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y  CONFIG_AMIGA_BUILTIN_SERIAL=y -CONFIG_MULTIFACE_III_TTY=m  CONFIG_SERIAL_CONSOLE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y +CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -334,11 +462,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -347,19 +488,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -374,7 +512,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index 562b221f695..650ee75de6c 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig @@ -1,55 +1,77 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-apollo"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_APOLLO=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68020=y  CONFIG_M68030=y  CONFIG_M68040=y  CONFIG_M68060=y +CONFIG_APOLLO=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_HEARTBEAT=y -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -57,36 +79,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -94,28 +145,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -125,7 +193,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -134,25 +203,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -163,57 +252,77 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m  CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FRAMEBUFFER_CONSOLE=y @@ -222,49 +331,57 @@ CONFIG_LOGO=y  # CONFIG_LOGO_LINUX_CLUT224 is not set  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_DN_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -303,11 +420,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -316,19 +446,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -343,7 +470,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index 82978df637f..3142e69342f 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig @@ -1,53 +1,76 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-atari"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_ATARI=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68020=y  CONFIG_M68030=y  CONFIG_M68040=y  CONFIG_M68060=y +CONFIG_ATARI=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_STRAM_PROC=y -CONFIG_HEARTBEAT=y -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -55,36 +78,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -92,28 +144,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -123,7 +192,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -132,18 +202,36 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_PARPORT=m  CONFIG_PARPORT_ATARI=m @@ -151,11 +239,14 @@ CONFIG_PARPORT_1284=y  CONFIG_ATARI_FLOPPY=y  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_IDE=y +CONFIG_IDE_GD_ATAPI=y  CONFIG_BLK_DEV_IDECD=y  CONFIG_BLK_DEV_FALCON_IDE=y  CONFIG_RAID_ATTRS=m @@ -168,63 +259,83 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_ATARI_SCSI=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y -CONFIG_MII=y  CONFIG_ATARILANCE=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  CONFIG_KEYBOARD_ATARI=y  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_ATARI=m  CONFIG_INPUT_MISC=y  CONFIG_INPUT_M68K_BEEP=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIO is not set +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  CONFIG_PRINTER=m  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_PARPORT=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FB_ATARI=y @@ -234,50 +345,60 @@ CONFIG_SOUND=m  CONFIG_DMASOUND_ATARI=m  CONFIG_HID=m  CONFIG_HIDRAW=y -# CONFIG_USB_SUPPORT is not set -CONFIG_ATARI_MFPSER=y -CONFIG_ATARI_MIDI=y +CONFIG_UHID=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y +CONFIG_NATFEAT=y +CONFIG_NFBLOCK=y +CONFIG_NFCON=y +CONFIG_NFETH=y  CONFIG_ATARI_DSP56K=m -CONFIG_SERIAL_CONSOLE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y +CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -316,11 +437,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -329,19 +463,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -356,7 +487,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=y -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index 67bb6fc117f..0daa8a172f3 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig @@ -1,53 +1,75 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-bvme6000"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_VME=y -CONFIG_BVME6000=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68040=y  CONFIG_M68060=y +CONFIG_VME=y +CONFIG_BVME6000=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -55,36 +77,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -92,28 +143,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -123,7 +191,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -132,25 +201,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -161,103 +250,131 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_BVME6000_SCSI=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set  CONFIG_BVME6000_NET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_SERIAL=m -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set +# CONFIG_MOUSE_PS2 is not set +# CONFIG_SERIO is not set  CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -296,11 +413,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -309,19 +439,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -336,8 +463,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC32=m +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index 3e35ce5fa46..88af78f7bad 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig @@ -1,54 +1,77 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-hp300"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_HP300=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68020=y  CONFIG_M68030=y  CONFIG_M68040=y  CONFIG_M68060=y +CONFIG_HP300=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -56,36 +79,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -93,28 +145,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -124,7 +193,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -133,25 +203,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -162,59 +252,80 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y  CONFIG_HPLANCE=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m  CONFIG_INPUT_MISC=y  CONFIG_HP_SDC_RTC=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FRAMEBUFFER_CONSOLE=y @@ -223,47 +334,56 @@ CONFIG_LOGO=y  # CONFIG_LOGO_LINUX_VGA16 is not set  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -302,11 +422,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -315,19 +448,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -342,7 +472,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/m5208evb_defconfig b/arch/m68k/configs/m5208evb_defconfig new file mode 100644 index 00000000000..e7292f460af --- /dev/null +++ b/arch/m68k/configs/m5208evb_defconfig @@ -0,0 +1,75 @@ +# CONFIG_MMU is not set +CONFIG_EXPERIMENTAL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_M520x=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=166666666 +CONFIG_CLOCK_DIV=2 +CONFIG_M5208EVB=y +# CONFIG_4KSTACKS is not set +CONFIG_RAMBASE=0x40000000 +CONFIG_RAMSIZE=0x2000000 +CONFIG_VECTORBASE=0x40000000 +CONFIG_KERNELBASE=0x40020000 +CONFIG_RAM16BIT=y +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_MISC_DEVICES is not set +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_FEC=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_BAUDRATE=115200 +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +# CONFIG_SYSFS is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_FULLDEBUG=y +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" diff --git a/arch/m68k/configs/m5249evb_defconfig b/arch/m68k/configs/m5249evb_defconfig new file mode 100644 index 00000000000..0cd4b39f325 --- /dev/null +++ b/arch/m68k/configs/m5249evb_defconfig @@ -0,0 +1,68 @@ +# CONFIG_MMU is not set +CONFIG_EXPERIMENTAL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_SLUB_DEBUG is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_M5249=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=140000000 +CONFIG_CLOCK_DIV=2 +CONFIG_M5249C3=y +CONFIG_RAMBASE=0x00000000 +CONFIG_RAMSIZE=0x00800000 +CONFIG_VECTORBASE=0x00000000 +CONFIG_KERNELBASE=0x00020000 +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_MISC_DEVICES is not set +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_PPP=y +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_FILE_LOCKING is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" +# CONFIG_CRC32 is not set diff --git a/arch/m68k/configs/m5272c3_defconfig b/arch/m68k/configs/m5272c3_defconfig new file mode 100644 index 00000000000..a60cb350913 --- /dev/null +++ b/arch/m68k/configs/m5272c3_defconfig @@ -0,0 +1,66 @@ +# CONFIG_MMU is not set +CONFIG_EXPERIMENTAL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_SLUB_DEBUG is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_M5272=y +CONFIG_CLOCK_SET=y +CONFIG_M5272C3=y +CONFIG_RAMBASE=0x00000000 +CONFIG_RAMSIZE=0x00800000 +CONFIG_VECTORBASE=0x00000000 +CONFIG_KERNELBASE=0x00020000 +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_MISC_DEVICES is not set +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_FEC=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" diff --git a/arch/m68k/configs/m5275evb_defconfig b/arch/m68k/configs/m5275evb_defconfig new file mode 100644 index 00000000000..e6502ab7cb2 --- /dev/null +++ b/arch/m68k/configs/m5275evb_defconfig @@ -0,0 +1,72 @@ +# CONFIG_MMU is not set +CONFIG_EXPERIMENTAL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_SLUB_DEBUG is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_M5275=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=150000000 +CONFIG_CLOCK_DIV=2 +CONFIG_M5275EVB=y +# CONFIG_4KSTACKS is not set +CONFIG_RAMBASE=0x00000000 +CONFIG_RAMSIZE=0x00000000 +CONFIG_VECTORBASE=0x00000000 +CONFIG_KERNELBASE=0x00020000 +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_MISC_DEVICES is not set +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_FEC=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_PPP=y +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" +# CONFIG_CRC32 is not set diff --git a/arch/m68k/configs/m5307c3_defconfig b/arch/m68k/configs/m5307c3_defconfig new file mode 100644 index 00000000000..023812abd2e --- /dev/null +++ b/arch/m68k/configs/m5307c3_defconfig @@ -0,0 +1,76 @@ +# CONFIG_MMU is not set +CONFIG_EXPERIMENTAL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_SLUB_DEBUG is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_M5307=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=90000000 +CONFIG_CLOCK_DIV=2 +CONFIG_M5307C3=y +CONFIG_RAMBASE=0x00000000 +CONFIG_RAMSIZE=0x00800000 +CONFIG_VECTORBASE=0x00000000 +CONFIG_KERNELBASE=0x00020000 +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_MISC_DEVICES is not set +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_PPP=y +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_HID_SUPPORT is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_FULLDEBUG=y +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" +# CONFIG_CRC32 is not set diff --git a/arch/m68k/configs/m5407c3_defconfig b/arch/m68k/configs/m5407c3_defconfig new file mode 100644 index 00000000000..557b39f3be9 --- /dev/null +++ b/arch/m68k/configs/m5407c3_defconfig @@ -0,0 +1,70 @@ +# CONFIG_MMU is not set +CONFIG_EXPERIMENTAL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_VM_EVENT_COUNTERS is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_M5407=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=50000000 +CONFIG_M5407C3=y +CONFIG_RAMBASE=0x00000000 +CONFIG_RAMSIZE=0x00000000 +CONFIG_VECTORBASE=0x00000000 +CONFIG_KERNELBASE=0x00020000 +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_MISC_DEVICES is not set +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_PPP=y +# CONFIG_INPUT is not set +# CONFIG_VT is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_UNIX98_PTYS is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" +# CONFIG_CRC32 is not set diff --git a/arch/m68k/configs/m5475evb_defconfig b/arch/m68k/configs/m5475evb_defconfig new file mode 100644 index 00000000000..c5018a68819 --- /dev/null +++ b/arch/m68k/configs/m5475evb_defconfig @@ -0,0 +1,62 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_SWAP is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +# CONFIG_HOTPLUG is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_SHMEM is not set +# CONFIG_AIO is not set +CONFIG_EMBEDDED=y +CONFIG_MODULES=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_COLDFIRE=y +CONFIG_M547x=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=266000000 +# CONFIG_4KSTACKS is not set +CONFIG_RAMBASE=0x0 +CONFIG_RAMSIZE=0x2000000 +CONFIG_VECTORBASE=0x0 +CONFIG_MBAR=0xff000000 +CONFIG_KERNELBASE=0x20000 +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_RAM=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_UCLINUX=y +CONFIG_BLK_DEV_RAM=y +# CONFIG_INPUT is not set +# CONFIG_VT is not set +# CONFIG_UNIX98_PTYS is not set +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_MTD=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="root=/dev/mtdblock0" diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index ae81e2d190c..66f915574a8 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig @@ -1,49 +1,76 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-mac"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_MAC=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68020=y  CONFIG_M68030=y  CONFIG_M68040=y +CONFIG_M68KFPU_EMU=y +CONFIG_MAC=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -51,36 +78,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -88,28 +144,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -119,7 +192,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -128,31 +202,51 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m  CONFIG_DEV_APPLETALK=m  CONFIG_IPDDP=m  CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m -CONFIG_BLK_DEV_SWIM=y +CONFIG_BLK_DEV_SWIM=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_IDE=y +CONFIG_IDE_GD_ATAPI=y  CONFIG_BLK_DEV_IDECD=y  CONFIG_BLK_DEV_MAC_IDE=y  CONFIG_RAID_ATTRS=m @@ -165,29 +259,31 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_MAC_SCSI=y  CONFIG_SCSI_MAC_ESP=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_ADB=y  CONFIG_ADB_MACII=y -CONFIG_ADB_MACIISI=y  CONFIG_ADB_IOP=y  CONFIG_ADB_PMU68K=y  CONFIG_ADB_CUDA=y @@ -195,46 +291,63 @@ CONFIG_INPUT_ADBHID=y  CONFIG_MAC_EMUMOUSEBTN=y  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y -CONFIG_MAC8390=y -CONFIG_MAC89x0=m -CONFIG_MACSONIC=m  CONFIG_MACMACE=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +CONFIG_MAC89x0=y +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +CONFIG_MACSONIC=y +CONFIG_MAC8390=y +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m  CONFIG_INPUT_MISC=y  CONFIG_INPUT_M68K_BEEP=m  CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  CONFIG_SERIAL_PMACZILOG=y  CONFIG_SERIAL_PMACZILOG_TTYS=y  CONFIG_SERIAL_PMACZILOG_CONSOLE=y  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FB_VALKYRIE=y @@ -243,46 +356,56 @@ CONFIG_FRAMEBUFFER_CONSOLE=y  CONFIG_LOGO=y  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m -CONFIG_HFS_FS=y -CONFIG_HFSPLUS_FS=y +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_FS=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y +CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -321,11 +444,25 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_EARLY_PRINTK=y +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -334,19 +471,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -361,7 +495,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index ad9e85760e3..5eaa49924fa 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig @@ -1,15 +1,31 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-multi"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +# CONFIG_EFI_PARTITION is not set +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y +CONFIG_M68020=y +CONFIG_M68040=y +CONFIG_M68060=y +CONFIG_M68KFPU_EMU=y  CONFIG_AMIGA=y  CONFIG_ATARI=y  CONFIG_MAC=y @@ -21,48 +37,49 @@ CONFIG_BVME6000=y  CONFIG_HP300=y  CONFIG_SUN3X=y  CONFIG_Q40=y -CONFIG_M68020=y -CONFIG_M68040=y -CONFIG_M68060=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m  CONFIG_ZORRO=y  CONFIG_AMIGA_PCMCIA=y -CONFIG_STRAM_PROC=y -CONFIG_HEARTBEAT=y -CONFIG_PROC_HARDWARE=y  CONFIG_ZORRO_NAMES=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=m  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -70,36 +87,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -107,28 +153,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -138,7 +201,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -147,39 +211,60 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m  CONFIG_DEV_APPLETALK=m  CONFIG_IPDDP=m  CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m  CONFIG_PARPORT_AMIGA=m  CONFIG_PARPORT_MFC3=m  CONFIG_PARPORT_ATARI=m  CONFIG_PARPORT_1284=y  CONFIG_AMIGA_FLOPPY=y  CONFIG_ATARI_FLOPPY=y -CONFIG_BLK_DEV_SWIM=y +CONFIG_BLK_DEV_SWIM=m  CONFIG_AMIGA_Z2RAM=y  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_IDE=y +CONFIG_IDE_GD_ATAPI=y  CONFIG_BLK_DEV_IDECD=y  CONFIG_BLK_DEV_GAYLE=y  CONFIG_BLK_DEV_BUDDHA=y @@ -196,11 +281,9 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_A3000_SCSI=y  CONFIG_A2091_SCSI=y  CONFIG_GVP11_SCSI=y @@ -214,21 +297,25 @@ CONFIG_MVME16x_SCSI=y  CONFIG_BVME6000_SCSI=y  CONFIG_SUN3X_ESP=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_ADB=y  CONFIG_ADB_MACII=y -CONFIG_ADB_MACIISI=y  CONFIG_ADB_IOP=y  CONFIG_ADB_PMU68K=y  CONFIG_ADB_CUDA=y @@ -236,49 +323,66 @@ CONFIG_INPUT_ADBHID=y  CONFIG_MAC_EMUMOUSEBTN=y  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_ARIADNE=y +# CONFIG_NET_VENDOR_3COM is not set  CONFIG_A2065=y -CONFIG_HYDRA=y -CONFIG_ZORRO8390=y -CONFIG_APNE=y -CONFIG_MAC8390=y -CONFIG_MAC89x0=y -CONFIG_MACSONIC=y -CONFIG_MACMACE=y -CONFIG_MVME147_NET=y -CONFIG_MVME16x_NET=y -CONFIG_BVME6000_NET=y +CONFIG_ARIADNE=y  CONFIG_ATARILANCE=y -CONFIG_SUN3LANCE=y  CONFIG_HPLANCE=y +CONFIG_MVME147_NET=y +CONFIG_SUN3LANCE=y +CONFIG_MACMACE=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +CONFIG_MAC89x0=y +# CONFIG_NET_VENDOR_HP is not set +CONFIG_BVME6000_NET=y +CONFIG_MVME16x_NET=y +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +CONFIG_MACSONIC=y +CONFIG_HYDRA=y +CONFIG_MAC8390=y  CONFIG_NE2000=m -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +CONFIG_APNE=y +CONFIG_ZORRO8390=y +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PLIP=m  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  CONFIG_KEYBOARD_AMIGA=y  CONFIG_KEYBOARD_ATARI=y  # CONFIG_KEYBOARD_ATKBD is not set  CONFIG_KEYBOARD_SUNKBD=y -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m  CONFIG_MOUSE_AMIGA=m  CONFIG_MOUSE_ATARI=m @@ -286,18 +390,19 @@ CONFIG_INPUT_JOYSTICK=y  CONFIG_JOYSTICK_AMIGA=m  CONFIG_INPUT_MISC=y  CONFIG_INPUT_M68K_BEEP=m -CONFIG_HP_SDC_RTC=y -# CONFIG_SERIO_SERPORT is not set +CONFIG_HP_SDC_RTC=m  CONFIG_SERIO_Q40KBD=y -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  CONFIG_SERIAL_PMACZILOG=y  CONFIG_SERIAL_PMACZILOG_TTYS=y  CONFIG_SERIAL_PMACZILOG_CONSOLE=y  CONFIG_PRINTER=m  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=y -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_PARPORT=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FB_CIRRUS=y @@ -317,55 +422,66 @@ CONFIG_DMASOUND_PAULA=m  CONFIG_DMASOUND_Q40=m  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_ATARI_MFPSER=y -CONFIG_ATARI_MIDI=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_MSM6242=m +CONFIG_RTC_DRV_RP5C01=m +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y +CONFIG_NATFEAT=y +CONFIG_NFBLOCK=y +CONFIG_NFCON=y +CONFIG_NFETH=y  CONFIG_ATARI_DSP56K=m  CONFIG_AMIGA_BUILTIN_SERIAL=y -CONFIG_MULTIFACE_III_TTY=m -CONFIG_SERIAL167=y -CONFIG_DN_SERIAL=y  CONFIG_SERIAL_CONSOLE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m -CONFIG_HFS_FS=y -CONFIG_HFSPLUS_FS=y +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -404,11 +520,25 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_EARLY_PRINTK=y +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -417,19 +547,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -444,7 +571,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=y -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index af773743ee1..324d0b4d835 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig @@ -1,52 +1,74 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-mvme147"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y +CONFIG_M68030=y  CONFIG_VME=y  CONFIG_MVME147=y -CONFIG_M68030=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -54,36 +76,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -91,28 +142,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -122,7 +190,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -131,25 +200,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -160,103 +249,132 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_MVME147_SCSI=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y  CONFIG_MVME147_NET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_SERIAL=m -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set +# CONFIG_MOUSE_PS2 is not set +# CONFIG_SERIO is not set  CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -295,11 +413,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -308,19 +439,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -335,7 +463,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index c45aaf3b816..f0cb4338952 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig @@ -1,53 +1,75 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-mvme16x"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_VME=y -CONFIG_MVME16x=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68040=y  CONFIG_M68060=y +CONFIG_VME=y +CONFIG_MVME16x=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -55,36 +77,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -92,28 +143,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -123,7 +191,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -132,25 +201,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -161,105 +250,131 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_MVME16x_SCSI=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set  CONFIG_MVME16x_NET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_SERIAL=m -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set +# CONFIG_MOUSE_PS2 is not set +# CONFIG_SERIO is not set  CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_SERIAL167=y -CONFIG_SERIAL_CONSOLE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -298,11 +413,25 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_EARLY_PRINTK=y +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -311,19 +440,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -338,7 +464,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index 46bed78d065..d6cf0880c46 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig @@ -1,49 +1,75 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-q40"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y -CONFIG_Q40=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SUN_PARTITION=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_M68040=y  CONFIG_M68060=y +CONFIG_Q40=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_HEARTBEAT=y -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -51,36 +77,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -88,28 +143,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -119,7 +191,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -128,26 +201,50 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_1284=y  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_IDE=y +CONFIG_IDE_GD_ATAPI=y  CONFIG_BLK_DEV_IDECD=y  CONFIG_BLK_DEV_Q40IDE=y  CONFIG_RAID_ATTRS=m @@ -160,61 +257,87 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set  CONFIG_NE2000=m -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PLIP=m  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m  CONFIG_INPUT_MISC=y  CONFIG_INPUT_M68K_BEEP=m -CONFIG_SERIO=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_Q40KBD=m -CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_SERIO_Q40KBD=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set +CONFIG_PRINTER=m  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_PARPORT=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FRAMEBUFFER_CONSOLE=y @@ -223,46 +346,57 @@ CONFIG_SOUND=m  CONFIG_DMASOUND_Q40=m  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_HEARTBEAT=y +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y +CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -301,11 +435,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -314,19 +461,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -341,7 +485,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index 86f7772bafb..f4e88d1c747 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig @@ -1,50 +1,72 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-sun3"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_SUN3=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -52,36 +74,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -89,28 +140,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -120,7 +188,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -129,25 +198,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -158,107 +247,135 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_SUN3_SCSI=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y  CONFIG_SUN3LANCE=y +# CONFIG_NET_VENDOR_ARC is not set  CONFIG_SUN3_82586=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set  CONFIG_KEYBOARD_SUNKBD=y -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FRAMEBUFFER_CONSOLE=y  CONFIG_LOGO=y  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -297,11 +414,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -310,19 +440,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -337,7 +464,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index 288261456e1..49f4032c1ad 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig @@ -1,50 +1,72 @@ -CONFIG_EXPERIMENTAL=y  CONFIG_LOCALVERSION="-sun3x"  CONFIG_SYSVIPC=y  CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y  CONFIG_BSD_PROCESS_ACCT=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_RELAY=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set  CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set  CONFIG_SLAB=y  CONFIG_MODULES=y  CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +# CONFIG_EFI_PARTITION is not set +CONFIG_SYSV68_PARTITION=y +CONFIG_IOSCHED_DEADLINE=m +CONFIG_KEXEC=y +CONFIG_BOOTINFO_PROC=y  CONFIG_SUN3X=y +# CONFIG_COMPACTION is not set +CONFIG_CLEANCACHE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set  CONFIG_BINFMT_AOUT=m  CONFIG_BINFMT_MISC=m -CONFIG_PROC_HARDWARE=y  CONFIG_NET=y  CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m  CONFIG_UNIX=y +CONFIG_UNIX_DIAG=m +CONFIG_XFRM_MIGRATE=y  CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y  CONFIG_INET=y  CONFIG_IP_PNP=y  CONFIG_IP_PNP_DHCP=y  CONFIG_IP_PNP_BOOTP=y  CONFIG_IP_PNP_RARP=y  CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m  CONFIG_NET_IPGRE=m -CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m  CONFIG_INET_AH=m  CONFIG_INET_ESP=m  CONFIG_INET_IPCOMP=m  CONFIG_INET_XFRM_MODE_TRANSPORT=m  CONFIG_INET_XFRM_MODE_TUNNEL=m  CONFIG_INET_XFRM_MODE_BEET=m +# CONFIG_INET_LRO is not set  CONFIG_INET_DIAG=m -CONFIG_IPV6_PRIVACY=y +CONFIG_INET_UDP_DIAG=m  CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y  CONFIG_INET6_AH=m  CONFIG_INET6_ESP=m  CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_GRE=m  CONFIG_NETFILTER=y -CONFIG_NETFILTER_NETLINK_QUEUE=m  CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_ZONES=y +# CONFIG_NF_CONNTRACK_PROCFS is not set  # CONFIG_NF_CT_PROTO_DCCP is not set  CONFIG_NF_CT_PROTO_UDPLITE=m  CONFIG_NF_CONNTRACK_AMANDA=m @@ -52,36 +74,65 @@ CONFIG_NF_CONNTRACK_FTP=m  CONFIG_NF_CONNTRACK_H323=m  CONFIG_NF_CONNTRACK_IRC=m  CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m  CONFIG_NF_CONNTRACK_PPTP=m  CONFIG_NF_CONNTRACK_SANE=m  CONFIG_NF_CONNTRACK_SIP=m  CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=m +CONFIG_NFT_EXTHDR=m +CONFIG_NFT_META=m +CONFIG_NFT_CT=m +CONFIG_NFT_RBTREE=m +CONFIG_NFT_HASH=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m  CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m  CONFIG_NETFILTER_XT_TARGET_CONNMARK=m  CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LOG=m  CONFIG_NETFILTER_XT_TARGET_MARK=m  CONFIG_NETFILTER_XT_TARGET_NFLOG=m  CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m  CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m  CONFIG_NETFILTER_XT_TARGET_TRACE=m  CONFIG_NETFILTER_XT_TARGET_TCPMSS=m  CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m  CONFIG_NETFILTER_XT_MATCH_CLUSTER=m  CONFIG_NETFILTER_XT_MATCH_COMMENT=m  CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m  CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m  CONFIG_NETFILTER_XT_MATCH_CONNMARK=m  CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m  CONFIG_NETFILTER_XT_MATCH_DSCP=m  CONFIG_NETFILTER_XT_MATCH_ESP=m  CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m  CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m  CONFIG_NETFILTER_XT_MATCH_IPRANGE=m  CONFIG_NETFILTER_XT_MATCH_LENGTH=m  CONFIG_NETFILTER_XT_MATCH_LIMIT=m  CONFIG_NETFILTER_XT_MATCH_MAC=m  CONFIG_NETFILTER_XT_MATCH_MARK=m  CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m  CONFIG_NETFILTER_XT_MATCH_OWNER=m  CONFIG_NETFILTER_XT_MATCH_POLICY=m  CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m @@ -89,28 +140,45 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m  CONFIG_NETFILTER_XT_MATCH_RATEEST=m  CONFIG_NETFILTER_XT_MATCH_REALM=m  CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m  CONFIG_NETFILTER_XT_MATCH_STATE=m  CONFIG_NETFILTER_XT_MATCH_STATISTIC=m  CONFIG_NETFILTER_XT_MATCH_STRING=m  CONFIG_NETFILTER_XT_MATCH_TCPMSS=m  CONFIG_NETFILTER_XT_MATCH_TIME=m  CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m  CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV4=m +CONFIG_NFT_CHAIN_NAT_IPV4=m +CONFIG_NF_TABLES_ARP=m  CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m  CONFIG_IP_NF_MATCH_AH=m  CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m  CONFIG_IP_NF_MATCH_TTL=m  CONFIG_IP_NF_FILTER=m  CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_SYNPROXY=m  CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m +CONFIG_NF_NAT_IPV4=m  CONFIG_IP_NF_TARGET_MASQUERADE=m  CONFIG_IP_NF_TARGET_NETMAP=m  CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_NF_NAT_SNMP_BASIC=m  CONFIG_IP_NF_MANGLE=m  CONFIG_IP_NF_TARGET_CLUSTERIP=m  CONFIG_IP_NF_TARGET_ECN=m @@ -120,7 +188,8 @@ CONFIG_IP_NF_ARPTABLES=m  CONFIG_IP_NF_ARPFILTER=m  CONFIG_IP_NF_ARP_MANGLE=m  CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m +CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m  CONFIG_IP6_NF_IPTABLES=m  CONFIG_IP6_NF_MATCH_AH=m  CONFIG_IP6_NF_MATCH_EUI64=m @@ -129,25 +198,45 @@ CONFIG_IP6_NF_MATCH_OPTS=m  CONFIG_IP6_NF_MATCH_HL=m  CONFIG_IP6_NF_MATCH_IPV6HEADER=m  CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m  CONFIG_IP6_NF_MATCH_RT=m  CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m  CONFIG_IP6_NF_FILTER=m  CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m  CONFIG_IP6_NF_MANGLE=m  CONFIG_IP6_NF_RAW=m +CONFIG_NF_NAT_IPV6=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m  CONFIG_IP_DCCP=m  # CONFIG_IP_DCCP_CCID3 is not set +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_RDS=m +CONFIG_RDS_TCP=m +CONFIG_L2TP=m  CONFIG_ATALK=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_DAT=y +CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y +CONFIG_NETLINK_DIAG=m +CONFIG_NET_MPLS_GSO=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y  # CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER is not set  CONFIG_CONNECTOR=m  CONFIG_BLK_DEV_LOOP=y  CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m  CONFIG_BLK_DEV_NBD=m  CONFIG_BLK_DEV_RAM=y  CONFIG_CDROM_PKTCDVD=m  CONFIG_ATA_OVER_ETH=m +CONFIG_DUMMY_IRQ=m  CONFIG_RAID_ATTRS=m  CONFIG_SCSI=y  CONFIG_SCSI_TGT=m @@ -158,106 +247,135 @@ CONFIG_BLK_DEV_SR=y  CONFIG_BLK_DEV_SR_VENDOR=y  CONFIG_CHR_DEV_SG=m  CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_SAS_LIBSAS=m -# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set -CONFIG_SCSI_SRP_ATTRS=m -CONFIG_SCSI_SRP_TGT_ATTRS=y +CONFIG_SCSI_SAS_ATTRS=m  CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m  CONFIG_SUN3X_ESP=y  CONFIG_MD=y -CONFIG_BLK_DEV_MD=m  CONFIG_MD_LINEAR=m  CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID456=m  CONFIG_BLK_DEV_DM=m  CONFIG_DM_CRYPT=m  CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m  CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m  CONFIG_DM_ZERO=m  CONFIG_DM_MULTIPATH=m  CONFIG_DM_UEVENT=y +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m  CONFIG_NETDEVICES=y  CONFIG_DUMMY=m -CONFIG_MACVLAN=m  CONFIG_EQUALIZER=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y  CONFIG_VETH=m -CONFIG_NET_ETHERNET=y  CONFIG_SUN3LANCE=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set  CONFIG_PPP=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m  CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y  CONFIG_PPP_MPPE=m  CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m  CONFIG_SLIP=m  CONFIG_SLIP_COMPRESSED=y  CONFIG_SLIP_SMART=y  CONFIG_SLIP_MODE_SLIP6=y -CONFIG_NETCONSOLE=m -CONFIG_NETCONSOLE_DYNAMIC=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=m  # CONFIG_KEYBOARD_ATKBD is not set  CONFIG_KEYBOARD_SUNKBD=y -CONFIG_MOUSE_PS2=m +# CONFIG_MOUSE_PS2 is not set  CONFIG_MOUSE_SERIAL=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set  # CONFIG_DEVKMEM is not set  # CONFIG_HW_RANDOM is not set -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y +CONFIG_NTP_PPS=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PTP_1588_CLOCK=m  # CONFIG_HWMON is not set  CONFIG_FB=y  CONFIG_FRAMEBUFFER_CONSOLE=y  CONFIG_LOGO=y  CONFIG_HID=m  CONFIG_HIDRAW=y +CONFIG_UHID=m +# CONFIG_HID_GENERIC is not set  # CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -# CONFIG_EXT3_FS_XATTR is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_PROC_HARDWARE=y +CONFIG_EXT4_FS=y  CONFIG_REISERFS_FS=m  CONFIG_JFS_FS=m  CONFIG_XFS_FS=m  CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_FS_STATS is not set  # CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_FANOTIFY=y  CONFIG_QUOTA_NETLINK_INTERFACE=y  # CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS_FS=m  CONFIG_AUTOFS4_FS=m  CONFIG_FUSE_FS=m +CONFIG_CUSE=m  CONFIG_ISO9660_FS=y  CONFIG_JOLIET=y  CONFIG_ZISOFS=y  CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=y +CONFIG_MSDOS_FS=m  CONFIG_VFAT_FS=m  CONFIG_PROC_KCORE=y  CONFIG_TMPFS=y  CONFIG_AFFS_FS=m +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y  CONFIG_HFS_FS=m  CONFIG_HFSPLUS_FS=m  CONFIG_CRAMFS=m  CONFIG_SQUASHFS=m -CONFIG_MINIX_FS=y +CONFIG_SQUASHFS_LZO=y +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m  CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_QNX6FS_FS=m  CONFIG_SYSV_FS=m  CONFIG_UFS_FS=m  CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y  CONFIG_ROOT_NFS=y  CONFIG_NFSD=m  CONFIG_NFSD_V3=y -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG is not set  CONFIG_CODA_FS=m  CONFIG_NLS_CODEPAGE_437=y  CONFIG_NLS_CODEPAGE_737=m @@ -296,11 +414,24 @@ CONFIG_NLS_ISO8859_14=m  CONFIG_NLS_ISO8859_15=m  CONFIG_NLS_KOI8_R=m  CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m  CONFIG_DLM=m  CONFIG_MAGIC_SYSRQ=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_CRYPTO_NULL=m +CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_STRING_HELPERS=m +CONFIG_ENCRYPTED_KEYS=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_USER=m  CONFIG_CRYPTO_CRYPTD=m  CONFIG_CRYPTO_TEST=m  CONFIG_CRYPTO_CCM=m @@ -309,19 +440,16 @@ CONFIG_CRYPTO_CTS=m  CONFIG_CRYPTO_LRW=m  CONFIG_CRYPTO_PCBC=m  CONFIG_CRYPTO_XTS=m -CONFIG_CRYPTO_HMAC=y  CONFIG_CRYPTO_XCBC=m -CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_VMAC=m  CONFIG_CRYPTO_MICHAEL_MIC=m  CONFIG_CRYPTO_RMD128=m  CONFIG_CRYPTO_RMD160=m  CONFIG_CRYPTO_RMD256=m  CONFIG_CRYPTO_RMD320=m -CONFIG_CRYPTO_SHA256=m  CONFIG_CRYPTO_SHA512=m  CONFIG_CRYPTO_TGR192=m  CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_AES=m  CONFIG_CRYPTO_ANUBIS=m  CONFIG_CRYPTO_BLOWFISH=m  CONFIG_CRYPTO_CAMELLIA=m @@ -336,7 +464,16 @@ CONFIG_CRYPTO_TEA=m  CONFIG_CRYPTO_TWOFISH=m  CONFIG_CRYPTO_ZLIB=m  CONFIG_CRYPTO_LZO=m +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_LZ4HC=m  # CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m  # CONFIG_CRYPTO_HW is not set -CONFIG_CRC16=m -CONFIG_CRC_T10DIF=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_TEST=m diff --git a/arch/m68k/emu/Makefile b/arch/m68k/emu/Makefile new file mode 100644 index 00000000000..7dc20108030 --- /dev/null +++ b/arch/m68k/emu/Makefile @@ -0,0 +1,9 @@ +# +# Makefile for Linux arch/m68k/emu source directory +# + +obj-y			+= natfeat.o + +obj-$(CONFIG_NFBLOCK)	+= nfblock.o +obj-$(CONFIG_NFCON)	+= nfcon.o +obj-$(CONFIG_NFETH)	+= nfeth.o diff --git a/arch/m68k/emu/natfeat.c b/arch/m68k/emu/natfeat.c new file mode 100644 index 00000000000..71b78ecee75 --- /dev/null +++ b/arch/m68k/emu/natfeat.c @@ -0,0 +1,94 @@ +/* + * natfeat.c - ARAnyM hardware support via Native Features (natfeats) + * + * Copyright (c) 2005 Petr Stehlik of ARAnyM dev team + * + * Reworked for Linux by Roman Zippel <zippel@linux-m68k.org> + * + * This software may be used and distributed according to the terms of + * the GNU General Public License (GPL), incorporated herein by reference. + */ + +#include <linux/init.h> +#include <linux/types.h> +#include <linux/console.h> +#include <linux/string.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/natfeat.h> + +extern long nf_get_id_phys(unsigned long feature_name); + +asm("\n" +"	.global nf_get_id_phys,nf_call\n" +"nf_get_id_phys:\n" +"	.short	0x7300\n" +"	rts\n" +"nf_call:\n" +"	.short	0x7301\n" +"	rts\n" +"1:	moveq.l	#0,%d0\n" +"	rts\n" +"	.section __ex_table,\"a\"\n" +"	.long	nf_get_id_phys,1b\n" +"	.long	nf_call,1b\n" +"	.previous"); +EXPORT_SYMBOL_GPL(nf_call); + +long nf_get_id(const char *feature_name) +{ +	/* feature_name may be in vmalloc()ed memory, so make a copy */ +	char name_copy[32]; +	size_t n; + +	n = strlcpy(name_copy, feature_name, sizeof(name_copy)); +	if (n >= sizeof(name_copy)) +		return 0; + +	return nf_get_id_phys(virt_to_phys(name_copy)); +} +EXPORT_SYMBOL_GPL(nf_get_id); + +void nfprint(const char *fmt, ...) +{ +	static char buf[256]; +	va_list ap; +	int n; + +	va_start(ap, fmt); +	n = vsnprintf(buf, 256, fmt, ap); +	nf_call(nf_get_id("NF_STDERR"), virt_to_phys(buf)); +	va_end(ap); +} + +static void nf_poweroff(void) +{ +	long id = nf_get_id("NF_SHUTDOWN"); + +	if (id) +		nf_call(id); +} + +void __init nf_init(void) +{ +	unsigned long id, version; +	char buf[256]; + +	id = nf_get_id("NF_VERSION"); +	if (!id) +		return; +	version = nf_call(id); + +	id = nf_get_id("NF_NAME"); +	if (!id) +		return; +	nf_call(id, virt_to_phys(buf), 256); +	buf[255] = 0; + +	pr_info("NatFeats found (%s, %lu.%lu)\n", buf, version >> 16, +		version & 0xffff); + +	mach_power_off = nf_poweroff; +} diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c new file mode 100644 index 00000000000..2d75ae24616 --- /dev/null +++ b/arch/m68k/emu/nfblock.c @@ -0,0 +1,195 @@ +/* + * ARAnyM block device driver + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/init.h> + +#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/types.h> +#include <linux/genhd.h> +#include <linux/blkdev.h> +#include <linux/hdreg.h> +#include <linux/slab.h> + +#include <asm/natfeat.h> + +static long nfhd_id; + +enum { +	/* emulation entry points */ +	NFHD_READ_WRITE = 10, +	NFHD_GET_CAPACITY = 14, + +	/* skip ACSI devices */ +	NFHD_DEV_OFFSET = 8, +}; + +static inline s32 nfhd_read_write(u32 major, u32 minor, u32 rwflag, u32 recno, +				  u32 count, u32 buf) +{ +	return nf_call(nfhd_id + NFHD_READ_WRITE, major, minor, rwflag, recno, +		       count, buf); +} + +static inline s32 nfhd_get_capacity(u32 major, u32 minor, u32 *blocks, +				    u32 *blocksize) +{ +	return nf_call(nfhd_id + NFHD_GET_CAPACITY, major, minor, +		       virt_to_phys(blocks), virt_to_phys(blocksize)); +} + +static LIST_HEAD(nfhd_list); + +static int major_num; +module_param(major_num, int, 0); + +struct nfhd_device { +	struct list_head list; +	int id; +	u32 blocks, bsize; +	int bshift; +	struct request_queue *queue; +	struct gendisk *disk; +}; + +static void nfhd_make_request(struct request_queue *queue, struct bio *bio) +{ +	struct nfhd_device *dev = queue->queuedata; +	struct bio_vec bvec; +	struct bvec_iter iter; +	int dir, len, shift; +	sector_t sec = bio->bi_iter.bi_sector; + +	dir = bio_data_dir(bio); +	shift = dev->bshift; +	bio_for_each_segment(bvec, bio, iter) { +		len = bvec.bv_len; +		len >>= 9; +		nfhd_read_write(dev->id, 0, dir, sec >> shift, len >> shift, +				bvec_to_phys(&bvec)); +		sec += len; +	} +	bio_endio(bio, 0); +} + +static int nfhd_getgeo(struct block_device *bdev, struct hd_geometry *geo) +{ +	struct nfhd_device *dev = bdev->bd_disk->private_data; + +	geo->cylinders = dev->blocks >> (6 - dev->bshift); +	geo->heads = 4; +	geo->sectors = 16; + +	return 0; +} + +static const struct block_device_operations nfhd_ops = { +	.owner	= THIS_MODULE, +	.getgeo	= nfhd_getgeo, +}; + +static int __init nfhd_init_one(int id, u32 blocks, u32 bsize) +{ +	struct nfhd_device *dev; +	int dev_id = id - NFHD_DEV_OFFSET; + +	pr_info("nfhd%u: found device with %u blocks (%u bytes)\n", dev_id, +		blocks, bsize); + +	if (bsize < 512 || (bsize & (bsize - 1))) { +		pr_warn("nfhd%u: invalid block size\n", dev_id); +		return -EINVAL; +	} + +	dev = kmalloc(sizeof(struct nfhd_device), GFP_KERNEL); +	if (!dev) +		goto out; + +	dev->id = id; +	dev->blocks = blocks; +	dev->bsize = bsize; +	dev->bshift = ffs(bsize) - 10; + +	dev->queue = blk_alloc_queue(GFP_KERNEL); +	if (dev->queue == NULL) +		goto free_dev; + +	dev->queue->queuedata = dev; +	blk_queue_make_request(dev->queue, nfhd_make_request); +	blk_queue_logical_block_size(dev->queue, bsize); + +	dev->disk = alloc_disk(16); +	if (!dev->disk) +		goto free_queue; + +	dev->disk->major = major_num; +	dev->disk->first_minor = dev_id * 16; +	dev->disk->fops = &nfhd_ops; +	dev->disk->private_data = dev; +	sprintf(dev->disk->disk_name, "nfhd%u", dev_id); +	set_capacity(dev->disk, (sector_t)blocks * (bsize / 512)); +	dev->disk->queue = dev->queue; + +	add_disk(dev->disk); + +	list_add_tail(&dev->list, &nfhd_list); + +	return 0; + +free_queue: +	blk_cleanup_queue(dev->queue); +free_dev: +	kfree(dev); +out: +	return -ENOMEM; +} + +static int __init nfhd_init(void) +{ +	u32 blocks, bsize; +	int i; + +	nfhd_id = nf_get_id("XHDI"); +	if (!nfhd_id) +		return -ENODEV; + +	major_num = register_blkdev(major_num, "nfhd"); +	if (major_num <= 0) { +		pr_warn("nfhd: unable to get major number\n"); +		return major_num; +	} + +	for (i = NFHD_DEV_OFFSET; i < 24; i++) { +		if (nfhd_get_capacity(i, 0, &blocks, &bsize)) +			continue; +		nfhd_init_one(i, blocks, bsize); +	} + +	return 0; +} + +static void __exit nfhd_exit(void) +{ +	struct nfhd_device *dev, *next; + +	list_for_each_entry_safe(dev, next, &nfhd_list, list) { +		list_del(&dev->list); +		del_gendisk(dev->disk); +		put_disk(dev->disk); +		blk_cleanup_queue(dev->queue); +		kfree(dev); +	} +	unregister_blkdev(major_num, "nfhd"); +} + +module_init(nfhd_init); +module_exit(nfhd_exit); + +MODULE_LICENSE("GPL"); diff --git a/arch/m68k/emu/nfcon.c b/arch/m68k/emu/nfcon.c new file mode 100644 index 00000000000..57e8c8fb5eb --- /dev/null +++ b/arch/m68k/emu/nfcon.c @@ -0,0 +1,169 @@ +/* + * ARAnyM console driver + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/module.h> +#include <linux/init.h> +#include <linux/console.h> +#include <linux/tty.h> +#include <linux/tty_driver.h> +#include <linux/tty_flip.h> +#include <linux/slab.h> +#include <linux/err.h> +#include <linux/uaccess.h> +#include <linux/io.h> + +#include <asm/natfeat.h> + +static int stderr_id; +static struct tty_port nfcon_tty_port; +static struct tty_driver *nfcon_tty_driver; + +static void nfputs(const char *str, unsigned int count) +{ +	char buf[68]; +	unsigned long phys = virt_to_phys(buf); + +	buf[64] = 0; +	while (count > 64) { +		memcpy(buf, str, 64); +		nf_call(stderr_id, phys); +		str += 64; +		count -= 64; +	} +	memcpy(buf, str, count); +	buf[count] = 0; +	nf_call(stderr_id, phys); +} + +static void nfcon_write(struct console *con, const char *str, +			unsigned int count) +{ +	nfputs(str, count); +} + +static struct tty_driver *nfcon_device(struct console *con, int *index) +{ +	*index = 0; +	return (con->flags & CON_ENABLED) ? nfcon_tty_driver : NULL; +} + +static struct console nf_console = { +	.name	= "nfcon", +	.write	= nfcon_write, +	.device	= nfcon_device, +	.flags	= CON_PRINTBUFFER, +	.index	= -1, +}; + + +static int nfcon_tty_open(struct tty_struct *tty, struct file *filp) +{ +	return 0; +} + +static void nfcon_tty_close(struct tty_struct *tty, struct file *filp) +{ +} + +static int nfcon_tty_write(struct tty_struct *tty, const unsigned char *buf, +			   int count) +{ +	nfputs(buf, count); +	return count; +} + +static int nfcon_tty_put_char(struct tty_struct *tty, unsigned char ch) +{ +	char temp[2] = { ch, 0 }; + +	nf_call(stderr_id, virt_to_phys(temp)); +	return 1; +} + +static int nfcon_tty_write_room(struct tty_struct *tty) +{ +	return 64; +} + +static const struct tty_operations nfcon_tty_ops = { +	.open		= nfcon_tty_open, +	.close		= nfcon_tty_close, +	.write		= nfcon_tty_write, +	.put_char	= nfcon_tty_put_char, +	.write_room	= nfcon_tty_write_room, +}; + +#ifndef MODULE + +static int __init nf_debug_setup(char *arg) +{ +	if (strcmp(arg, "nfcon")) +		return 0; + +	stderr_id = nf_get_id("NF_STDERR"); +	if (stderr_id) { +		nf_console.flags |= CON_ENABLED; +		register_console(&nf_console); +	} + +	return 0; +} + +early_param("debug", nf_debug_setup); + +#endif /* !MODULE */ + +static int __init nfcon_init(void) +{ +	int res; + +	stderr_id = nf_get_id("NF_STDERR"); +	if (!stderr_id) +		return -ENODEV; + +	nfcon_tty_driver = alloc_tty_driver(1); +	if (!nfcon_tty_driver) +		return -ENOMEM; + +	tty_port_init(&nfcon_tty_port); + +	nfcon_tty_driver->driver_name = "nfcon"; +	nfcon_tty_driver->name = "nfcon"; +	nfcon_tty_driver->type = TTY_DRIVER_TYPE_SYSTEM; +	nfcon_tty_driver->subtype = SYSTEM_TYPE_TTY; +	nfcon_tty_driver->init_termios = tty_std_termios; +	nfcon_tty_driver->flags = TTY_DRIVER_REAL_RAW; + +	tty_set_operations(nfcon_tty_driver, &nfcon_tty_ops); +	tty_port_link_device(&nfcon_tty_port, nfcon_tty_driver, 0); +	res = tty_register_driver(nfcon_tty_driver); +	if (res) { +		pr_err("failed to register nfcon tty driver\n"); +		put_tty_driver(nfcon_tty_driver); +		tty_port_destroy(&nfcon_tty_port); +		return res; +	} + +	if (!(nf_console.flags & CON_ENABLED)) +		register_console(&nf_console); + +	return 0; +} + +static void __exit nfcon_exit(void) +{ +	unregister_console(&nf_console); +	tty_unregister_driver(nfcon_tty_driver); +	put_tty_driver(nfcon_tty_driver); +	tty_port_destroy(&nfcon_tty_port); +} + +module_init(nfcon_init); +module_exit(nfcon_exit); + +MODULE_LICENSE("GPL"); diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c new file mode 100644 index 00000000000..a0985fd088d --- /dev/null +++ b/arch/m68k/emu/nfeth.c @@ -0,0 +1,271 @@ +/* + * atari_nfeth.c - ARAnyM ethernet card driver for GNU/Linux + * + * Copyright (c) 2005 Milan Jurik, Petr Stehlik of ARAnyM dev team + * + * Based on ARAnyM driver for FreeMiNT written by Standa Opichal + * + * This software may be used and distributed according to the terms of + * the GNU General Public License (GPL), incorporated herein by reference. + */ + +#define DRV_VERSION	"0.3" +#define DRV_RELDATE	"10/12/2005" + +#define pr_fmt(fmt)	KBUILD_MODNAME ": " fmt + +#include <linux/netdevice.h> +#include <linux/etherdevice.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <asm/natfeat.h> +#include <asm/virtconvert.h> + +enum { +	GET_VERSION = 0,/* no parameters, return NFAPI_VERSION in d0 */ +	XIF_INTLEVEL,	/* no parameters, return Interrupt Level in d0 */ +	XIF_IRQ,	/* acknowledge interrupt from host */ +	XIF_START,	/* (ethX), called on 'ifup', start receiver thread */ +	XIF_STOP,	/* (ethX), called on 'ifdown', stop the thread */ +	XIF_READLENGTH,	/* (ethX), return size of network data block to read */ +	XIF_READBLOCK,	/* (ethX, buffer, size), read block of network data */ +	XIF_WRITEBLOCK,	/* (ethX, buffer, size), write block of network data */ +	XIF_GET_MAC,	/* (ethX, buffer, size), return MAC HW addr in buffer */ +	XIF_GET_IPHOST,	/* (ethX, buffer, size), return IP address of host */ +	XIF_GET_IPATARI,/* (ethX, buffer, size), return IP address of atari */ +	XIF_GET_NETMASK	/* (ethX, buffer, size), return IP netmask */ +}; + +#define MAX_UNIT	8 + +/* These identify the driver base version and may not be removed. */ +static const char version[] = +	KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE +	" S.Opichal, M.Jurik, P.Stehlik\n" +	KERN_INFO " http://aranym.org/\n"; + +MODULE_AUTHOR("Milan Jurik"); +MODULE_DESCRIPTION("Atari NFeth driver"); +MODULE_LICENSE("GPL"); +/* +MODULE_PARM(nfeth_debug, "i"); +MODULE_PARM_DESC(nfeth_debug, "nfeth_debug level (1-2)"); +*/ + + +static long nfEtherID; +static int nfEtherIRQ; + +struct nfeth_private { +	int ethX; +}; + +static struct net_device *nfeth_dev[MAX_UNIT]; + +static int nfeth_open(struct net_device *dev) +{ +	struct nfeth_private *priv = netdev_priv(dev); +	int res; + +	res = nf_call(nfEtherID + XIF_START, priv->ethX); +	netdev_dbg(dev, "%s: %d\n", __func__, res); + +	/* Ready for data */ +	netif_start_queue(dev); + +	return 0; +} + +static int nfeth_stop(struct net_device *dev) +{ +	struct nfeth_private *priv = netdev_priv(dev); + +	/* No more data */ +	netif_stop_queue(dev); + +	nf_call(nfEtherID + XIF_STOP, priv->ethX); + +	return 0; +} + +/* + * Read a packet out of the adapter and pass it to the upper layers + */ +static inline void recv_packet(struct net_device *dev) +{ +	struct nfeth_private *priv = netdev_priv(dev); +	unsigned short pktlen; +	struct sk_buff *skb; + +	/* read packet length (excluding 32 bit crc) */ +	pktlen = nf_call(nfEtherID + XIF_READLENGTH, priv->ethX); + +	netdev_dbg(dev, "%s: %u\n", __func__, pktlen); + +	if (!pktlen) { +		netdev_dbg(dev, "%s: pktlen == 0\n", __func__); +		dev->stats.rx_errors++; +		return; +	} + +	skb = dev_alloc_skb(pktlen + 2); +	if (!skb) { +		netdev_dbg(dev, "%s: out of mem (buf_alloc failed)\n", +			   __func__); +		dev->stats.rx_dropped++; +		return; +	} + +	skb->dev = dev; +	skb_reserve(skb, 2);		/* 16 Byte align  */ +	skb_put(skb, pktlen);		/* make room */ +	nf_call(nfEtherID + XIF_READBLOCK, priv->ethX, virt_to_phys(skb->data), +		pktlen); + +	skb->protocol = eth_type_trans(skb, dev); +	netif_rx(skb); +	dev->last_rx = jiffies; +	dev->stats.rx_packets++; +	dev->stats.rx_bytes += pktlen; + +	/* and enqueue packet */ +	return; +} + +static irqreturn_t nfeth_interrupt(int irq, void *dev_id) +{ +	int i, m, mask; + +	mask = nf_call(nfEtherID + XIF_IRQ, 0); +	for (i = 0, m = 1; i < MAX_UNIT; m <<= 1, i++) { +		if (mask & m && nfeth_dev[i]) { +			recv_packet(nfeth_dev[i]); +			nf_call(nfEtherID + XIF_IRQ, m); +		} +	} +	return IRQ_HANDLED; +} + +static int nfeth_xmit(struct sk_buff *skb, struct net_device *dev) +{ +	unsigned int len; +	char *data, shortpkt[ETH_ZLEN]; +	struct nfeth_private *priv = netdev_priv(dev); + +	data = skb->data; +	len = skb->len; +	if (len < ETH_ZLEN) { +		memset(shortpkt, 0, ETH_ZLEN); +		memcpy(shortpkt, data, len); +		data = shortpkt; +		len = ETH_ZLEN; +	} + +	netdev_dbg(dev, "%s: send %u bytes\n", __func__, len); +	nf_call(nfEtherID + XIF_WRITEBLOCK, priv->ethX, virt_to_phys(data), +		len); + +	dev->stats.tx_packets++; +	dev->stats.tx_bytes += len; + +	dev_kfree_skb(skb); +	return 0; +} + +static void nfeth_tx_timeout(struct net_device *dev) +{ +	dev->stats.tx_errors++; +	netif_wake_queue(dev); +} + +static const struct net_device_ops nfeth_netdev_ops = { +	.ndo_open		= nfeth_open, +	.ndo_stop		= nfeth_stop, +	.ndo_start_xmit		= nfeth_xmit, +	.ndo_tx_timeout		= nfeth_tx_timeout, +	.ndo_validate_addr	= eth_validate_addr, +	.ndo_change_mtu		= eth_change_mtu, +	.ndo_set_mac_address	= eth_mac_addr, +}; + +static struct net_device * __init nfeth_probe(int unit) +{ +	struct net_device *dev; +	struct nfeth_private *priv; +	char mac[ETH_ALEN], host_ip[32], local_ip[32]; +	int err; + +	if (!nf_call(nfEtherID + XIF_GET_MAC, unit, virt_to_phys(mac), +		     ETH_ALEN)) +		return NULL; + +	dev = alloc_etherdev(sizeof(struct nfeth_private)); +	if (!dev) +		return NULL; + +	dev->irq = nfEtherIRQ; +	dev->netdev_ops = &nfeth_netdev_ops; + +	memcpy(dev->dev_addr, mac, ETH_ALEN); + +	priv = netdev_priv(dev); +	priv->ethX = unit; + +	err = register_netdev(dev); +	if (err) { +		free_netdev(dev); +		return NULL; +	} + +	nf_call(nfEtherID + XIF_GET_IPHOST, unit, +		virt_to_phys(host_ip), sizeof(host_ip)); +	nf_call(nfEtherID + XIF_GET_IPATARI, unit, +		virt_to_phys(local_ip), sizeof(local_ip)); + +	netdev_info(dev, KBUILD_MODNAME " addr:%s (%s) HWaddr:%pM\n", host_ip, +		    local_ip, mac); + +	return dev; +} + +static int __init nfeth_init(void) +{ +	long ver; +	int error, i; + +	nfEtherID = nf_get_id("ETHERNET"); +	if (!nfEtherID) +		return -ENODEV; + +	ver = nf_call(nfEtherID + GET_VERSION); +	pr_info("API %lu\n", ver); + +	nfEtherIRQ = nf_call(nfEtherID + XIF_INTLEVEL); +	error = request_irq(nfEtherIRQ, nfeth_interrupt, IRQF_SHARED, +			    "eth emu", nfeth_interrupt); +	if (error) { +		pr_err("request for irq %d failed %d", nfEtherIRQ, error); +		return error; +	} + +	for (i = 0; i < MAX_UNIT; i++) +		nfeth_dev[i] = nfeth_probe(i); + +	return 0; +} + +static void __exit nfeth_cleanup(void) +{ +	int i; + +	for (i = 0; i < MAX_UNIT; i++) { +		if (nfeth_dev[i]) { +			unregister_netdev(nfeth_dev[0]); +			free_netdev(nfeth_dev[0]); +		} +	} +	free_irq(nfEtherIRQ, nfeth_interrupt); +} + +module_init(nfeth_init); +module_exit(nfeth_cleanup); diff --git a/arch/m68k/fpsp040/bindec.S b/arch/m68k/fpsp040/bindec.S index 72f1159cb80..f2e79523104 100644 --- a/arch/m68k/fpsp040/bindec.S +++ b/arch/m68k/fpsp040/bindec.S @@ -609,7 +609,7 @@ do_fint:  |      A6.  This test occurs only on the first pass.  If the  |      result is exactly 10^LEN, decrement ILOG and divide  |      the mantissa by 10.  The calculation of 10^LEN cannot -|      be inexact, since all powers of ten upto 10^27 are exact +|      be inexact, since all powers of ten up to 10^27 are exact  |      in extended precision, so the use of a previous power-of-ten  |      table will introduce no error.  | diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c index 1c05a626054..a9befe65adc 100644 --- a/arch/m68k/hp300/config.c +++ b/arch/m68k/hp300/config.c @@ -14,6 +14,8 @@  #include <linux/console.h>  #include <asm/bootinfo.h> +#include <asm/bootinfo-hp300.h> +#include <asm/byteorder.h>  #include <asm/machdep.h>  #include <asm/blinken.h>  #include <asm/io.h>                               /* readb() and writeb() */ @@ -24,7 +26,8 @@  unsigned long hp300_model;  unsigned long hp300_uart_scode = -1; -unsigned char ledstate; +unsigned char hp300_ledstate; +EXPORT_SYMBOL(hp300_ledstate);  static char s_hp330[] __initdata = "330";  static char s_hp340[] __initdata = "340"; @@ -69,22 +72,22 @@ extern int hp300_setup_serial_console(void) __init;  int __init hp300_parse_bootinfo(const struct bi_record *record)  {  	int unknown = 0; -	const unsigned long *data = record->data; +	const void *data = record->data; -	switch (record->tag) { +	switch (be16_to_cpu(record->tag)) {  	case BI_HP300_MODEL: -		hp300_model = *data; +		hp300_model = be32_to_cpup(data);  		break;  	case BI_HP300_UART_SCODE: -		hp300_uart_scode = *data; +		hp300_uart_scode = be32_to_cpup(data);  		break;  	case BI_HP300_UART_ADDR:  		/* serial port address: ignored here */  		break; -        default: +	default:  		unknown = 1;  	} @@ -250,7 +253,7 @@ void __init config_hp300(void)  	mach_sched_init      = hp300_sched_init;  	mach_init_IRQ        = hp300_init_IRQ;  	mach_get_model       = hp300_get_model; -	mach_gettimeoffset   = hp300_gettimeoffset; +	arch_gettimeoffset   = hp300_gettimeoffset;  	mach_hwclk	     = hp300_hwclk;  	mach_get_ss	     = hp300_get_ss;  	mach_reset           = hp300_reset; @@ -259,11 +262,12 @@ void __init config_hp300(void)  #endif  	mach_max_dma_address = 0xffffffff; -	if (hp300_model >= HP_330 && hp300_model <= HP_433S && hp300_model != HP_350) { -		printk(KERN_INFO "Detected HP9000 model %s\n", hp300_models[hp300_model-HP_320]); +	if (hp300_model >= HP_330 && hp300_model <= HP_433S && +	    hp300_model != HP_350) { +		pr_info("Detected HP9000 model %s\n", +			hp300_models[hp300_model-HP_320]);  		strcat(hp300_model_name, hp300_models[hp300_model-HP_320]); -	} -	else { +	} else {  		panic("Unknown HP9000 Model");  	}  #ifdef CONFIG_SERIAL_8250_CONSOLE diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c index f6312c7d872..749543b425a 100644 --- a/arch/m68k/hp300/time.c +++ b/arch/m68k/hp300/time.c @@ -15,7 +15,6 @@  #include <asm/machdep.h>  #include <asm/irq.h>  #include <asm/io.h> -#include <asm/system.h>  #include <asm/traps.h>  #include <asm/blinken.h> @@ -47,7 +46,7 @@ static irqreturn_t hp300_tick(int irq, void *dev_id)  	return vector(irq, NULL);  } -unsigned long hp300_gettimeoffset(void) +u32 hp300_gettimeoffset(void)  {    /* Read current timer 1 value */    unsigned char lsb, msb1, msb2; @@ -60,7 +59,7 @@ unsigned long hp300_gettimeoffset(void)      /* A carry happened while we were reading.  Read it again */      lsb = in_8(CLOCKBASE + 7);    ticks = INTVAL - ((msb2 << 8) | lsb); -  return (USECS_PER_JIFFY * ticks) / INTVAL; +  return ((USECS_PER_JIFFY * ticks) / INTVAL) * 1000;  }  void __init hp300_sched_init(irq_handler_t vector) @@ -70,7 +69,7 @@ void __init hp300_sched_init(irq_handler_t vector)    asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE)); -  if (request_irq(IRQ_AUTO_6, hp300_tick, IRQ_FLG_STD, "timer tick", vector)) +  if (request_irq(IRQ_AUTO_6, hp300_tick, 0, "timer tick", vector))      pr_err("Couldn't register timer interrupt\n");    out_8(CLOCKBASE + CLKCR2, 0x1);		/* select CR1 */ diff --git a/arch/m68k/hp300/time.h b/arch/m68k/hp300/time.h index 7b98242960d..f5583ec4033 100644 --- a/arch/m68k/hp300/time.h +++ b/arch/m68k/hp300/time.h @@ -1,2 +1,2 @@  extern void hp300_sched_init(irq_handler_t vector); -extern unsigned long hp300_gettimeoffset(void); +extern u32 hp300_gettimeoffset(void); diff --git a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S index 73613b5f1ee..78cb60f5bb4 100644 --- a/arch/m68k/ifpsp060/src/fpsp.S +++ b/arch/m68k/ifpsp060/src/fpsp.S @@ -3881,7 +3881,7 @@ _fpsp_fline:  # FP Unimplemented Instruction stack frame and jump to that entry  # point.  # -# but, if the FPU is disabled, then we need to jump to the FPU diabled +# but, if the FPU is disabled, then we need to jump to the FPU disabled  # entry point.  	movc		%pcr,%d0  	btst		&0x1,%d0 @@ -11813,7 +11813,7 @@ fmul_unfl_ena:  	bne.b		fmul_unfl_ena_sd	# no, sgl or dbl  # if the rnd mode is anything but RZ, then we have to re-do the above -# multiplication becuase we used RZ for all. +# multiplication because we used RZ for all.  	fmov.l		L_SCR3(%a6),%fpcr	# set FPCR  fmul_unfl_ena_cont: @@ -18095,7 +18095,7 @@ fscc_mem_op:  	rts -# addresing mode is post-increment. write the result byte. if the write +# addressing mode is post-increment. write the result byte. if the write  # fails then don't update the address register. if write passes then  # call inc_areg() to update the address register.  fscc_mem_inc: @@ -20876,7 +20876,7 @@ dst_get_dupper:  	swap		%d0			# d0 now in upper word  	lsl.l		&0x4,%d0		# d0 in proper place for dbl prec exp  	tst.b		FTEMP_EX(%a0)		# test sign -	bpl.b		dst_get_dman		# if postive, go process mantissa +	bpl.b		dst_get_dman		# if positive, go process mantissa  	bset		&0x1f,%d0		# if negative, set sign  dst_get_dman:  	mov.l		FTEMP_HI(%a0),%d1	# get ms mantissa @@ -22943,7 +22943,7 @@ tbl_ovfl_result:  #	FP_SRC(a6) = packed operand now as a binary FP number		#  #									#  # ALGORITHM ***********************************************************	# -#	Get the correct <ea> whihc is the value on the exception stack	# +#	Get the correct <ea> which is the value on the exception stack	#  # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+.	#  # Then, fetch the operand from memory. If the fetch fails, exit		#  # through facc_in_x().							# @@ -24096,7 +24096,7 @@ do_fint12:  #      A6.  This test occurs only on the first pass.  If the  #      result is exactly 10^LEN, decrement ILOG and divide  #      the mantissa by 10.  The calculation of 10^LEN cannot -#      be inexact, since all powers of ten upto 10^27 are exact +#      be inexact, since all powers of ten up to 10^27 are exact  #      in extended precision, so the use of a previous power-of-ten  #      table will introduce no error.  # diff --git a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S index e71ba0ab013..4aedef973cf 100644 --- a/arch/m68k/ifpsp060/src/pfpsp.S +++ b/arch/m68k/ifpsp060/src/pfpsp.S @@ -7777,7 +7777,7 @@ dst_get_dupper:  	swap		%d0			# d0 now in upper word  	lsl.l		&0x4,%d0		# d0 in proper place for dbl prec exp  	tst.b		FTEMP_EX(%a0)		# test sign -	bpl.b		dst_get_dman		# if postive, go process mantissa +	bpl.b		dst_get_dman		# if positive, go process mantissa  	bset		&0x1f,%d0		# if negative, set sign  dst_get_dman:  	mov.l		FTEMP_HI(%a0),%d1	# get ms mantissa @@ -8244,7 +8244,7 @@ fmul_unfl_ena:  	bne.b		fmul_unfl_ena_sd	# no, sgl or dbl  # if the rnd mode is anything but RZ, then we have to re-do the above -# multiplication becuase we used RZ for all. +# multiplication because we used RZ for all.  	fmov.l		L_SCR3(%a6),%fpcr	# set FPCR  fmul_unfl_ena_cont: @@ -12903,7 +12903,7 @@ store_fpreg_7:  #	FP_SRC(a6) = packed operand now as a binary FP number		#  #									#  # ALGORITHM ***********************************************************	# -#	Get the correct <ea> whihc is the value on the exception stack	# +#	Get the correct <ea> which is the value on the exception stack	#  # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+.	#  # Then, fetch the operand from memory. If the fetch fails, exit		#  # through facc_in_x().							# @@ -14056,7 +14056,7 @@ do_fint12:  #      A6.  This test occurs only on the first pass.  If the  #      result is exactly 10^LEN, decrement ILOG and divide  #      the mantissa by 10.  The calculation of 10^LEN cannot -#      be inexact, since all powers of ten upto 10^27 are exact +#      be inexact, since all powers of ten up to 10^27 are exact  #      in extended precision, so the use of a previous power-of-ten  #      table will introduce no error.  # diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 1a922fad76f..c67c94a2d67 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -1,2 +1,36 @@ -include include/asm-generic/Kbuild.asm -header-y += cachectl.h +generic-y += barrier.h +generic-y += bitsperlong.h +generic-y += clkdev.h +generic-y += cputime.h +generic-y += device.h +generic-y += emergency-restart.h +generic-y += errno.h +generic-y += exec.h +generic-y += hash.h +generic-y += hw_irq.h +generic-y += ioctl.h +generic-y += ipcbuf.h +generic-y += irq_regs.h +generic-y += kdebug.h +generic-y += kmap_types.h +generic-y += kvm_para.h +generic-y += local.h +generic-y += local64.h +generic-y += mcs_spinlock.h +generic-y += mman.h +generic-y += mutex.h +generic-y += percpu.h +generic-y += preempt.h +generic-y += resource.h +generic-y += scatterlist.h +generic-y += sections.h +generic-y += shmparam.h +generic-y += siginfo.h +generic-y += spinlock.h +generic-y += statfs.h +generic-y += termios.h +generic-y += topology.h +generic-y += trace_clock.h +generic-y += types.h +generic-y += word-at-a-time.h +generic-y += xor.h diff --git a/arch/m68k/include/asm/MC68328.h b/arch/m68k/include/asm/MC68328.h index a337e56d09b..4ebf098b8a1 100644 --- a/arch/m68k/include/asm/MC68328.h +++ b/arch/m68k/include/asm/MC68328.h @@ -293,7 +293,7 @@  /*   * Here go the bitmasks themselves   */ -#define IMR_MSPIM 	(1 << SPIM _IRQ_NUM)	/* Mask SPI Master interrupt */ +#define IMR_MSPIM 	(1 << SPIM_IRQ_NUM)	/* Mask SPI Master interrupt */  #define	IMR_MTMR2	(1 << TMR2_IRQ_NUM)	/* Mask Timer 2 interrupt */  #define IMR_MUART	(1 << UART_IRQ_NUM)	/* Mask UART interrupt */	  #define	IMR_MWDT	(1 << WDT_IRQ_NUM)	/* Mask Watchdog Timer interrupt */ @@ -327,7 +327,7 @@  #define IWR_ADDR	0xfffff308  #define IWR		LONG_REF(IWR_ADDR) -#define IWR_SPIM 	(1 << SPIM _IRQ_NUM)	/* SPI Master interrupt */ +#define IWR_SPIM 	(1 << SPIM_IRQ_NUM)	/* SPI Master interrupt */  #define	IWR_TMR2	(1 << TMR2_IRQ_NUM)	/* Timer 2 interrupt */  #define IWR_UART	(1 << UART_IRQ_NUM)	/* UART interrupt */	  #define	IWR_WDT		(1 << WDT_IRQ_NUM)	/* Watchdog Timer interrupt */ @@ -357,7 +357,7 @@  #define ISR_ADDR	0xfffff30c  #define ISR		LONG_REF(ISR_ADDR) -#define ISR_SPIM 	(1 << SPIM _IRQ_NUM)	/* SPI Master interrupt */ +#define ISR_SPIM 	(1 << SPIM_IRQ_NUM)	/* SPI Master interrupt */  #define	ISR_TMR2	(1 << TMR2_IRQ_NUM)	/* Timer 2 interrupt */  #define ISR_UART	(1 << UART_IRQ_NUM)	/* UART interrupt */	  #define	ISR_WDT		(1 << WDT_IRQ_NUM)	/* Watchdog Timer interrupt */ @@ -391,7 +391,7 @@  #define IPR_ADDR	0xfffff310  #define IPR		LONG_REF(IPR_ADDR) -#define IPR_SPIM 	(1 << SPIM _IRQ_NUM)	/* SPI Master interrupt */ +#define IPR_SPIM 	(1 << SPIM_IRQ_NUM)	/* SPI Master interrupt */  #define	IPR_TMR2	(1 << TMR2_IRQ_NUM)	/* Timer 2 interrupt */  #define IPR_UART	(1 << UART_IRQ_NUM)	/* UART interrupt */	  #define	IPR_WDT		(1 << WDT_IRQ_NUM)	/* Watchdog Timer interrupt */ @@ -757,7 +757,7 @@  /* 'EZ328-compatible definitions */  #define TCN_ADDR	TCN1_ADDR -#define TCN		TCN +#define TCN		TCN1  /*   * Timer Unit 1 and 2 Status Registers diff --git a/arch/m68k/include/asm/MC68332.h b/arch/m68k/include/asm/MC68332.h deleted file mode 100644 index 6bb8f02685a..00000000000 --- a/arch/m68k/include/asm/MC68332.h +++ /dev/null @@ -1,152 +0,0 @@ - -/* include/asm-m68knommu/MC68332.h: '332 control registers - * - * Copyright (C) 1998  Kenneth Albanowski <kjahds@kjahds.com>, - * - */ - -#ifndef _MC68332_H_ -#define _MC68332_H_ - -#define BYTE_REF(addr) (*((volatile unsigned char*)addr)) -#define WORD_REF(addr) (*((volatile unsigned short*)addr)) - -#define PORTE_ADDR	0xfffa11 -#define PORTE	BYTE_REF(PORTE_ADDR) -#define DDRE_ADDR	0xfffa15 -#define DDRE	BYTE_REF(DDRE_ADDR) -#define PEPAR_ADDR	0xfffa17 -#define PEPAR	BYTE_REF(PEPAR_ADDR) - -#define PORTF_ADDR	0xfffa19 -#define PORTF	BYTE_REF(PORTF_ADDR) -#define DDRF_ADDR	0xfffa1d -#define DDRF	BYTE_REF(DDRF_ADDR) -#define PFPAR_ADDR	0xfffa1f -#define PFPAR	BYTE_REF(PFPAR_ADDR) - -#define PORTQS_ADDR	0xfffc15 -#define PORTQS	BYTE_REF(PORTQS_ADDR) -#define DDRQS_ADDR	0xfffc17 -#define DDRQS	BYTE_REF(DDRQS_ADDR) -#define PQSPAR_ADDR	0xfffc16 -#define PQSPAR	BYTE_REF(PQSPAR_ADDR) - -#define CSPAR0_ADDR 0xFFFA44 -#define CSPAR0 WORD_REF(CSPAR0_ADDR) -#define CSPAR1_ADDR 0xFFFA46 -#define CSPAR1 WORD_REF(CSPAR1_ADDR) -#define CSARBT_ADDR 0xFFFA48 -#define CSARBT WORD_REF(CSARBT_ADDR) -#define CSOPBT_ADDR 0xFFFA4A -#define CSOPBT WORD_REF(CSOPBT_ADDR) -#define CSBAR0_ADDR 0xFFFA4C -#define CSBAR0 WORD_REF(CSBAR0_ADDR) -#define CSOR0_ADDR 0xFFFA4E -#define CSOR0 WORD_REF(CSOR0_ADDR) -#define CSBAR1_ADDR 0xFFFA50 -#define CSBAR1 WORD_REF(CSBAR1_ADDR) -#define CSOR1_ADDR 0xFFFA52 -#define CSOR1 WORD_REF(CSOR1_ADDR) -#define CSBAR2_ADDR 0xFFFA54 -#define CSBAR2 WORD_REF(CSBAR2_ADDR) -#define CSOR2_ADDR 0xFFFA56 -#define CSOR2 WORD_REF(CSOR2_ADDR) -#define CSBAR3_ADDR 0xFFFA58 -#define CSBAR3 WORD_REF(CSBAR3_ADDR) -#define CSOR3_ADDR 0xFFFA5A -#define CSOR3 WORD_REF(CSOR3_ADDR) -#define CSBAR4_ADDR 0xFFFA5C -#define CSBAR4 WORD_REF(CSBAR4_ADDR) -#define CSOR4_ADDR 0xFFFA5E -#define CSOR4 WORD_REF(CSOR4_ADDR) -#define CSBAR5_ADDR 0xFFFA60 -#define CSBAR5 WORD_REF(CSBAR5_ADDR) -#define CSOR5_ADDR 0xFFFA62 -#define CSOR5 WORD_REF(CSOR5_ADDR) -#define CSBAR6_ADDR 0xFFFA64 -#define CSBAR6 WORD_REF(CSBAR6_ADDR) -#define CSOR6_ADDR 0xFFFA66 -#define CSOR6 WORD_REF(CSOR6_ADDR) -#define CSBAR7_ADDR 0xFFFA68 -#define CSBAR7 WORD_REF(CSBAR7_ADDR) -#define CSOR7_ADDR 0xFFFA6A -#define CSOR7 WORD_REF(CSOR7_ADDR) -#define CSBAR8_ADDR 0xFFFA6C -#define CSBAR8 WORD_REF(CSBAR8_ADDR) -#define CSOR8_ADDR 0xFFFA6E -#define CSOR8 WORD_REF(CSOR8_ADDR) -#define CSBAR9_ADDR 0xFFFA70 -#define CSBAR9 WORD_REF(CSBAR9_ADDR) -#define CSOR9_ADDR 0xFFFA72 -#define CSOR9 WORD_REF(CSOR9_ADDR) -#define CSBAR10_ADDR 0xFFFA74 -#define CSBAR10 WORD_REF(CSBAR10_ADDR) -#define CSOR10_ADDR 0xFFFA76 -#define CSOR10 WORD_REF(CSOR10_ADDR) - -#define CSOR_MODE_ASYNC	0x0000 -#define CSOR_MODE_SYNC	0x8000 -#define CSOR_MODE_MASK	0x8000 -#define CSOR_BYTE_DISABLE	0x0000 -#define CSOR_BYTE_UPPER		0x4000 -#define CSOR_BYTE_LOWER		0x2000 -#define CSOR_BYTE_BOTH		0x6000 -#define CSOR_BYTE_MASK		0x6000 -#define CSOR_RW_RSVD		0x0000 -#define CSOR_RW_READ		0x0800 -#define CSOR_RW_WRITE		0x1000 -#define CSOR_RW_BOTH		0x1800 -#define CSOR_RW_MASK		0x1800 -#define CSOR_STROBE_DS		0x0400 -#define CSOR_STROBE_AS		0x0000 -#define CSOR_STROBE_MASK	0x0400 -#define CSOR_DSACK_WAIT(x)	(wait << 6) -#define CSOR_DSACK_FTERM	(14 << 6) -#define CSOR_DSACK_EXTERNAL	(15 << 6) -#define CSOR_DSACK_MASK		0x03c0 -#define CSOR_SPACE_CPU		0x0000 -#define CSOR_SPACE_USER		0x0010 -#define CSOR_SPACE_SU		0x0020 -#define CSOR_SPACE_BOTH		0x0030 -#define CSOR_SPACE_MASK		0x0030 -#define CSOR_IPL_ALL		0x0000 -#define CSOR_IPL_PRIORITY(x)	(x << 1) -#define CSOR_IPL_MASK		0x000e -#define CSOR_AVEC_ON		0x0001 -#define CSOR_AVEC_OFF		0x0000 -#define CSOR_AVEC_MASK		0x0001 - -#define CSBAR_ADDR(x)		((addr >> 11) << 3)  -#define CSBAR_ADDR_MASK		0xfff8 -#define CSBAR_BLKSIZE_2K	0x0000 -#define CSBAR_BLKSIZE_8K	0x0001 -#define CSBAR_BLKSIZE_16K	0x0002 -#define CSBAR_BLKSIZE_64K	0x0003 -#define CSBAR_BLKSIZE_128K	0x0004 -#define CSBAR_BLKSIZE_256K	0x0005 -#define CSBAR_BLKSIZE_512K	0x0006 -#define CSBAR_BLKSIZE_1M	0x0007 -#define CSBAR_BLKSIZE_MASK	0x0007 - -#define CSPAR_DISC	0 -#define CSPAR_ALT	1 -#define CSPAR_CS8	2 -#define CSPAR_CS16	3 -#define CSPAR_MASK	3 - -#define CSPAR0_CSBOOT(x) (x << 0) -#define CSPAR0_CS0(x)	(x << 2) -#define CSPAR0_CS1(x)	(x << 4) -#define CSPAR0_CS2(x)	(x << 6) -#define CSPAR0_CS3(x)	(x << 8) -#define CSPAR0_CS4(x)	(x << 10) -#define CSPAR0_CS5(x)	(x << 12) - -#define CSPAR1_CS6(x)	(x << 0) -#define CSPAR1_CS7(x)	(x << 2) -#define CSPAR1_CS8(x)	(x << 4) -#define CSPAR1_CS9(x)	(x << 6) -#define CSPAR1_CS10(x)	(x << 8) - -#endif diff --git a/arch/m68k/include/asm/MC68EZ328.h b/arch/m68k/include/asm/MC68EZ328.h index 69b7f9139e5..d1bde58ab0d 100644 --- a/arch/m68k/include/asm/MC68EZ328.h +++ b/arch/m68k/include/asm/MC68EZ328.h @@ -1047,7 +1047,7 @@ typedef volatile struct {  #define WATCHDOG_EN	0x0001	/* Watchdog Enabled */  #define WATCHDOG_ISEL	0x0002	/* Select the watchdog interrupt */ -#define WATCHDOG_INTF	0x0080	/* Watchdog interrupt occcured */ +#define WATCHDOG_INTF	0x0080	/* Watchdog interrupt occurred */  #define WATCHDOG_CNT_MASK  0x0300	/* Watchdog Counter */  #define WATCHDOG_CNT_SHIFT 8 diff --git a/arch/m68k/include/asm/MC68VZ328.h b/arch/m68k/include/asm/MC68VZ328.h index 2b9bf626a0a..6bd1bf1f85e 100644 --- a/arch/m68k/include/asm/MC68VZ328.h +++ b/arch/m68k/include/asm/MC68VZ328.h @@ -1143,7 +1143,7 @@ typedef struct {  #define WATCHDOG_EN	0x0001	/* Watchdog Enabled */  #define WATCHDOG_ISEL	0x0002	/* Select the watchdog interrupt */ -#define WATCHDOG_INTF	0x0080	/* Watchdog interrupt occcured */ +#define WATCHDOG_INTF	0x0080	/* Watchdog interrupt occurred */  #define WATCHDOG_CNT_MASK  0x0300	/* Watchdog Counter */  #define WATCHDOG_CNT_SHIFT 8 diff --git a/arch/m68k/include/asm/amigahw.h b/arch/m68k/include/asm/amigahw.h index 7a19b5686a4..5ad568110f1 100644 --- a/arch/m68k/include/asm/amigahw.h +++ b/arch/m68k/include/asm/amigahw.h @@ -18,26 +18,7 @@  #include <linux/ioport.h> -    /* -     *  Different Amiga models -     */ - -#define AMI_UNKNOWN	(0) -#define AMI_500		(1) -#define AMI_500PLUS	(2) -#define AMI_600		(3) -#define AMI_1000	(4) -#define AMI_1200	(5) -#define AMI_2000	(6) -#define AMI_2500	(7) -#define AMI_3000	(8) -#define AMI_3000T	(9) -#define AMI_3000PLUS	(10) -#define AMI_4000	(11) -#define AMI_4000T	(12) -#define AMI_CDTV	(13) -#define AMI_CD32	(14) -#define AMI_DRACO	(15) +#include <asm/bootinfo-amiga.h>      /* @@ -46,11 +27,6 @@  extern unsigned long amiga_chipset; -#define CS_STONEAGE	(0) -#define CS_OCS		(1) -#define CS_ECS		(2) -#define CS_AGA		(3) -      /*       *  Miscellaneous @@ -266,7 +242,7 @@ struct CIA {  #define zTwoBase (0x80000000)  #define ZTWO_PADDR(x) (((unsigned long)(x))-zTwoBase) -#define ZTWO_VADDR(x) (((unsigned long)(x))+zTwoBase) +#define ZTWO_VADDR(x) ((void __iomem *)(((unsigned long)(x))+zTwoBase))  #define CUSTOM_PHYSADDR     (0xdff000)  #define amiga_custom ((*(volatile struct CUSTOM *)(zTwoBase+CUSTOM_PHYSADDR))) diff --git a/arch/m68k/include/asm/anchor.h b/arch/m68k/include/asm/anchor.h deleted file mode 100644 index 871c0d5cfc3..00000000000 --- a/arch/m68k/include/asm/anchor.h +++ /dev/null @@ -1,112 +0,0 @@ -/****************************************************************************/ - -/* - *	anchor.h -- Anchor CO-MEM Lite PCI host bridge part. - * - *	(C) Copyright 2000, Moreton Bay (www.moreton.com.au) - */ - -/****************************************************************************/ -#ifndef	anchor_h -#define	anchor_h -/****************************************************************************/ - -/* - *	Define basic addressing info. - */ -#if defined(CONFIG_M5407C3) -#define	COMEM_BASE	0xFFFF0000	/* Base of CO-MEM address space */ -#define	COMEM_IRQ	25		/* IRQ of anchor part */ -#else -#define	COMEM_BASE	0x80000000	/* Base of CO-MEM address space */ -#define	COMEM_IRQ	25		/* IRQ of anchor part */ -#endif - -/****************************************************************************/ - -/* - *	4-byte registers of CO-MEM, so adjust register addresses for - *	easy access. Handy macro for word access too. - */ -#define	LREG(a)		((a) >> 2) -#define	WREG(a)		((a) >> 1) - - -/* - *	Define base addresses within CO-MEM Lite register address space. - */ -#define	COMEM_I2O	0x0000		/* I2O registers */ -#define	COMEM_OPREGS	0x0400		/* Operation registers */ -#define	COMEM_PCIBUS	0x2000		/* Direct access to PCI bus */ -#define	COMEM_SHMEM	0x4000		/* Shared memory region */ - -#define	COMEM_SHMEMSIZE	0x4000		/* Size of shared memory */ - - -/* - *	Define CO-MEM Registers. - */ -#define	COMEM_I2OHISR	0x0030		/* I2O host interrupt status */ -#define	COMEM_I2OHIMR	0x0034		/* I2O host interrupt mask */ -#define	COMEM_I2OLISR	0x0038		/* I2O local interrupt status */ -#define	COMEM_I2OLIMR	0x003c		/* I2O local interrupt mask */ -#define	COMEM_IBFPFIFO	0x0040		/* I2O inbound free/post FIFO */ -#define	COMEM_OBPFFIFO	0x0044		/* I2O outbound post/free FIFO */ -#define	COMEM_IBPFFIFO	0x0048		/* I2O inbound post/free FIFO */ -#define	COMEM_OBFPFIFO	0x004c		/* I2O outbound free/post FIFO */ - -#define	COMEM_DAHBASE	0x0460		/* Direct access base address */ - -#define	COMEM_NVCMD	0x04a0		/* I2C serial command */ -#define	COMEM_NVREAD	0x04a4		/* I2C serial read */ -#define	COMEM_NVSTAT	0x04a8		/* I2C status */ - -#define	COMEM_DMALBASE	0x04b0		/* DMA local base address */ -#define	COMEM_DMAHBASE	0x04b4		/* DMA host base address */ -#define	COMEM_DMASIZE	0x04b8		/* DMA size */ -#define	COMEM_DMACTL	0x04bc		/* DMA control */ - -#define	COMEM_HCTL	0x04e0		/* Host control */ -#define	COMEM_HINT	0x04e4		/* Host interrupt control/status */ -#define	COMEM_HLDATA	0x04e8		/* Host to local data mailbox */ -#define	COMEM_LINT	0x04f4		/* Local interrupt contole status */ -#define	COMEM_LHDATA	0x04f8		/* Local to host data mailbox */ - -#define	COMEM_LBUSCFG	0x04fc		/* Local bus configuration */ - - -/* - *	Commands and flags for use with Direct Access Register. - */ -#define	COMEM_DA_IACK	0x00000000	/* Interrupt acknowledge (read) */ -#define	COMEM_DA_SPCL	0x00000010	/* Special cycle (write) */ -#define	COMEM_DA_MEMRD	0x00000004	/* Memory read cycle */ -#define	COMEM_DA_MEMWR	0x00000004	/* Memory write cycle */ -#define	COMEM_DA_IORD	0x00000002	/* I/O read cycle */ -#define	COMEM_DA_IOWR	0x00000002	/* I/O write cycle */ -#define	COMEM_DA_CFGRD	0x00000006	/* Configuration read cycle */ -#define	COMEM_DA_CFGWR	0x00000006	/* Configuration write cycle */ - -#define	COMEM_DA_ADDR(a)	((a) & 0xffffe000) - -#define	COMEM_DA_OFFSET(a)	((a) & 0x00001fff) - - -/* - *	The PCI bus will be limited in what slots will actually be used. - *	Define valid device numbers for different boards. - */ -#if defined(CONFIG_M5407C3) -#define	COMEM_MINDEV	14		/* Minimum valid DEVICE */ -#define	COMEM_MAXDEV	14		/* Maximum valid DEVICE */ -#define	COMEM_BRIDGEDEV	15		/* Slot bridge is in */ -#else -#define	COMEM_MINDEV	0		/* Minimum valid DEVICE */ -#define	COMEM_MAXDEV	3		/* Maximum valid DEVICE */ -#endif - -#define	COMEM_MAXPCI	(COMEM_MAXDEV+1)	/* Maximum PCI devices */ - - -/****************************************************************************/ -#endif	/* anchor_h */ diff --git a/arch/m68k/include/asm/apollodma.h b/arch/m68k/include/asm/apollodma.h deleted file mode 100644 index 954adc851ad..00000000000 --- a/arch/m68k/include/asm/apollodma.h +++ /dev/null @@ -1,248 +0,0 @@ -/* - * linux/include/asm/dma.h: Defines for using and allocating dma channels. - * Written by Hennus Bergman, 1992. - * High DMA channel support & info by Hannu Savolainen - * and John Boyd, Nov. 1992. - */ - -#ifndef _ASM_APOLLO_DMA_H -#define _ASM_APOLLO_DMA_H - -#include <asm/apollohw.h>		/* need byte IO */ -#include <linux/spinlock.h>		/* And spinlocks */ -#include <linux/delay.h> - - -#define dma_outb(val,addr) (*((volatile unsigned char *)(addr+IO_BASE)) = (val)) -#define dma_inb(addr)	   (*((volatile unsigned char *)(addr+IO_BASE))) - -/* - * NOTES about DMA transfers: - * - *  controller 1: channels 0-3, byte operations, ports 00-1F - *  controller 2: channels 4-7, word operations, ports C0-DF - * - *  - ALL registers are 8 bits only, regardless of transfer size - *  - channel 4 is not used - cascades 1 into 2. - *  - channels 0-3 are byte - addresses/counts are for physical bytes - *  - channels 5-7 are word - addresses/counts are for physical words - *  - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries - *  - transfer count loaded to registers is 1 less than actual count - *  - controller 2 offsets are all even (2x offsets for controller 1) - *  - page registers for 5-7 don't use data bit 0, represent 128K pages - *  - page registers for 0-3 use bit 0, represent 64K pages - * - * DMA transfers are limited to the lower 16MB of _physical_ memory. - * Note that addresses loaded into registers must be _physical_ addresses, - * not logical addresses (which may differ if paging is active). - * - *  Address mapping for channels 0-3: - * - *   A23 ... A16 A15 ... A8  A7 ... A0    (Physical addresses) - *    |  ...  |   |  ... |   |  ... | - *    |  ...  |   |  ... |   |  ... | - *    |  ...  |   |  ... |   |  ... | - *   P7  ...  P0  A7 ... A0  A7 ... A0 - * |    Page    | Addr MSB | Addr LSB |   (DMA registers) - * - *  Address mapping for channels 5-7: - * - *   A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0    (Physical addresses) - *    |  ...  |   \   \   ... \  \  \  ... \  \ - *    |  ...  |    \   \   ... \  \  \  ... \  (not used) - *    |  ...  |     \   \   ... \  \  \  ... \ - *   P7  ...  P1 (0) A7 A6  ... A0 A7 A6 ... A0 - * |      Page      |  Addr MSB   |  Addr LSB  |   (DMA registers) - * - * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses - * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at - * the hardware level, so odd-byte transfers aren't possible). - * - * Transfer count (_not # bytes_) is limited to 64K, represented as actual - * count - 1 : 64K => 0xFFFF, 1 => 0x0000.  Thus, count is always 1 or more, - * and up to 128K bytes may be transferred on channels 5-7 in one operation. - * - */ - -#define MAX_DMA_CHANNELS	8 - -/* The maximum address that we can perform a DMA transfer to on this platform */#define MAX_DMA_ADDRESS      (PAGE_OFFSET+0x1000000) - -/* 8237 DMA controllers */ -#define IO_DMA1_BASE	0x10C00	/* 8 bit slave DMA, channels 0..3 */ -#define IO_DMA2_BASE	0x10D00	/* 16 bit master DMA, ch 4(=slave input)..7 */ - -/* DMA controller registers */ -#define DMA1_CMD_REG		(IO_DMA1_BASE+0x08) /* command register (w) */ -#define DMA1_STAT_REG		(IO_DMA1_BASE+0x08) /* status register (r) */ -#define DMA1_REQ_REG            (IO_DMA1_BASE+0x09) /* request register (w) */ -#define DMA1_MASK_REG		(IO_DMA1_BASE+0x0A) /* single-channel mask (w) */ -#define DMA1_MODE_REG		(IO_DMA1_BASE+0x0B) /* mode register (w) */ -#define DMA1_CLEAR_FF_REG	(IO_DMA1_BASE+0x0C) /* clear pointer flip-flop (w) */ -#define DMA1_TEMP_REG           (IO_DMA1_BASE+0x0D) /* Temporary Register (r) */ -#define DMA1_RESET_REG		(IO_DMA1_BASE+0x0D) /* Master Clear (w) */ -#define DMA1_CLR_MASK_REG       (IO_DMA1_BASE+0x0E) /* Clear Mask */ -#define DMA1_MASK_ALL_REG       (IO_DMA1_BASE+0x0F) /* all-channels mask (w) */ - -#define DMA2_CMD_REG		(IO_DMA2_BASE+0x10) /* command register (w) */ -#define DMA2_STAT_REG		(IO_DMA2_BASE+0x10) /* status register (r) */ -#define DMA2_REQ_REG            (IO_DMA2_BASE+0x12) /* request register (w) */ -#define DMA2_MASK_REG		(IO_DMA2_BASE+0x14) /* single-channel mask (w) */ -#define DMA2_MODE_REG		(IO_DMA2_BASE+0x16) /* mode register (w) */ -#define DMA2_CLEAR_FF_REG	(IO_DMA2_BASE+0x18) /* clear pointer flip-flop (w) */ -#define DMA2_TEMP_REG           (IO_DMA2_BASE+0x1A) /* Temporary Register (r) */ -#define DMA2_RESET_REG		(IO_DMA2_BASE+0x1A) /* Master Clear (w) */ -#define DMA2_CLR_MASK_REG       (IO_DMA2_BASE+0x1C) /* Clear Mask */ -#define DMA2_MASK_ALL_REG       (IO_DMA2_BASE+0x1E) /* all-channels mask (w) */ - -#define DMA_ADDR_0              (IO_DMA1_BASE+0x00) /* DMA address registers */ -#define DMA_ADDR_1              (IO_DMA1_BASE+0x02) -#define DMA_ADDR_2              (IO_DMA1_BASE+0x04) -#define DMA_ADDR_3              (IO_DMA1_BASE+0x06) -#define DMA_ADDR_4              (IO_DMA2_BASE+0x00) -#define DMA_ADDR_5              (IO_DMA2_BASE+0x04) -#define DMA_ADDR_6              (IO_DMA2_BASE+0x08) -#define DMA_ADDR_7              (IO_DMA2_BASE+0x0C) - -#define DMA_CNT_0               (IO_DMA1_BASE+0x01)   /* DMA count registers */ -#define DMA_CNT_1               (IO_DMA1_BASE+0x03) -#define DMA_CNT_2               (IO_DMA1_BASE+0x05) -#define DMA_CNT_3               (IO_DMA1_BASE+0x07) -#define DMA_CNT_4               (IO_DMA2_BASE+0x02) -#define DMA_CNT_5               (IO_DMA2_BASE+0x06) -#define DMA_CNT_6               (IO_DMA2_BASE+0x0A) -#define DMA_CNT_7               (IO_DMA2_BASE+0x0E) - -#define DMA_MODE_READ	0x44	/* I/O to memory, no autoinit, increment, single mode */ -#define DMA_MODE_WRITE	0x48	/* memory to I/O, no autoinit, increment, single mode */ -#define DMA_MODE_CASCADE 0xC0   /* pass thru DREQ->HRQ, DACK<-HLDA only */ - -#define DMA_AUTOINIT	0x10 - -#define DMA_8BIT 0 -#define DMA_16BIT 1 -#define DMA_BUSMASTER 2 - -extern spinlock_t  dma_spin_lock; - -static __inline__ unsigned long claim_dma_lock(void) -{ -	unsigned long flags; -	spin_lock_irqsave(&dma_spin_lock, flags); -	return flags; -} - -static __inline__ void release_dma_lock(unsigned long flags) -{ -	spin_unlock_irqrestore(&dma_spin_lock, flags); -} - -/* enable/disable a specific DMA channel */ -static __inline__ void enable_dma(unsigned int dmanr) -{ -	if (dmanr<=3) -		dma_outb(dmanr,  DMA1_MASK_REG); -	else -		dma_outb(dmanr & 3,  DMA2_MASK_REG); -} - -static __inline__ void disable_dma(unsigned int dmanr) -{ -	if (dmanr<=3) -		dma_outb(dmanr | 4,  DMA1_MASK_REG); -	else -		dma_outb((dmanr & 3) | 4,  DMA2_MASK_REG); -} - -/* Clear the 'DMA Pointer Flip Flop'. - * Write 0 for LSB/MSB, 1 for MSB/LSB access. - * Use this once to initialize the FF to a known state. - * After that, keep track of it. :-) - * --- In order to do that, the DMA routines below should --- - * --- only be used while holding the DMA lock ! --- - */ -static __inline__ void clear_dma_ff(unsigned int dmanr) -{ -	if (dmanr<=3) -		dma_outb(0,  DMA1_CLEAR_FF_REG); -	else -		dma_outb(0,  DMA2_CLEAR_FF_REG); -} - -/* set mode (above) for a specific DMA channel */ -static __inline__ void set_dma_mode(unsigned int dmanr, char mode) -{ -	if (dmanr<=3) -		dma_outb(mode | dmanr,  DMA1_MODE_REG); -	else -		dma_outb(mode | (dmanr&3),  DMA2_MODE_REG); -} - -/* Set transfer address & page bits for specific DMA channel. - * Assumes dma flipflop is clear. - */ -static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) -{ -	if (dmanr <= 3)  { -	    dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); -            dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); -	}  else  { -	    dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); -	    dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); -	} -} - - -/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for - * a specific DMA channel. - * You must ensure the parameters are valid. - * NOTE: from a manual: "the number of transfers is one more - * than the initial word count"! This is taken into account. - * Assumes dma flip-flop is clear. - * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7. - */ -static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) -{ -        count--; -	if (dmanr <= 3)  { -	    dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); -	    dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); -        } else { -	    dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); -	    dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); -        } -} - - -/* Get DMA residue count. After a DMA transfer, this - * should return zero. Reading this while a DMA transfer is - * still in progress will return unpredictable results. - * If called before the channel has been used, it may return 1. - * Otherwise, it returns the number of _bytes_ left to transfer. - * - * Assumes DMA flip-flop is clear. - */ -static __inline__ int get_dma_residue(unsigned int dmanr) -{ -	unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE -					 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE; - -	/* using short to get 16-bit wrap around */ -	unsigned short count; - -	count = 1 + dma_inb(io_port); -	count += dma_inb(io_port) << 8; - -	return (dmanr<=3)? count : (count<<1); -} - - -/* These are in kernel/dma.c: */ -extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */ -extern void free_dma(unsigned int dmanr);	/* release it again */ - -/* These are in arch/m68k/apollo/dma.c: */ -extern unsigned short dma_map_page(unsigned long phys_addr,int count,int type); -extern void dma_unmap_page(unsigned short dma_addr); - -#endif /* _ASM_APOLLO_DMA_H */ diff --git a/arch/m68k/include/asm/apollohw.h b/arch/m68k/include/asm/apollohw.h index a1373b9aa28..87fc899d32e 100644 --- a/arch/m68k/include/asm/apollohw.h +++ b/arch/m68k/include/asm/apollohw.h @@ -5,18 +5,11 @@  #include <linux/types.h> -/* -   apollo models -*/ +#include <asm/bootinfo-apollo.h> +  extern u_long apollo_model; -#define APOLLO_UNKNOWN (0) -#define APOLLO_DN3000 (1) -#define APOLLO_DN3010 (2) -#define APOLLO_DN3500 (3) -#define APOLLO_DN4000 (4) -#define APOLLO_DN4500 (5)  /*     see scn2681 data sheet for more info. @@ -46,18 +39,6 @@ struct SCN2681 {  }; -#if 0 -struct mc146818 { - -	unsigned int second1:4, second2:4, alarm_second1:4, alarm_second2:4, -		     minute1:4, minute2:4, alarm_minute1:4, alarm_minute2:4; -	unsigned int hours1:4, hours2:4, alarm_hours1:4, alarm_hours2:4, -		     day_of_week1:4, day_of_week2:4, day_of_month1:4, day_of_month2:4; -	unsigned int month1:4, month2:4, year1:4, year2:4, :16; - -}; -#endif -  struct mc146818 {          unsigned char second, alarm_second;          unsigned char minute, alarm_minute; @@ -98,7 +79,7 @@ extern u_long timer_physaddr;  #define cpuctrl (*(volatile unsigned int *)(IO_BASE + cpuctrl_physaddr))  #define pica (IO_BASE + pica_physaddr)  #define picb (IO_BASE + picb_physaddr) -#define timer (IO_BASE + timer_physaddr) +#define apollo_timer (IO_BASE + timer_physaddr)  #define addr_xlat_map ((unsigned short *)(IO_BASE + 0x17000))  #define isaIO2mem(x) (((((x) & 0x3f8)  << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE) diff --git a/arch/m68k/include/asm/atari_stram.h b/arch/m68k/include/asm/atari_stram.h index 7546d13963b..4e771c22d6a 100644 --- a/arch/m68k/include/asm/atari_stram.h +++ b/arch/m68k/include/asm/atari_stram.h @@ -6,12 +6,13 @@   */  /* public interface */ -void *atari_stram_alloc(long size, const char *owner); +void *atari_stram_alloc(unsigned long size, const char *owner);  void atari_stram_free(void *); +void *atari_stram_to_virt(unsigned long phys); +unsigned long atari_stram_to_phys(void *);  /* functions called internally by other parts of the kernel */  void atari_stram_init(void);  void atari_stram_reserve_pages(void *start_mem); -void atari_stram_mem_init_hook (void);  #endif /*_M68K_ATARI_STRAM_H */ diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index a714e1aa072..972c8f33f05 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h @@ -21,7 +21,7 @@  #define _LINUX_ATARIHW_H_  #include <linux/types.h> -#include <asm/bootinfo.h> +#include <asm/bootinfo-atari.h>  #include <asm/raw_io.h>  extern u_long atari_mch_cookie; @@ -30,6 +30,8 @@ extern u_long atari_switches;  extern int atari_rtc_year_offset;  extern int atari_dont_touch_floppy_select; +extern int atari_SCC_reset_done; +  /* convenience macros for testing machine type */  #define MACH_IS_ST	((atari_mch_cookie >> 16) == ATARI_MCH_ST)  #define MACH_IS_STE	((atari_mch_cookie >> 16) == ATARI_MCH_STE && \ @@ -399,8 +401,8 @@ struct CODEC  #define CODEC_OVERFLOW_LEFT     2    u_char unused2, unused3, unused4, unused5;    u_char gpio_directions; -#define GPIO_IN                 0 -#define GPIO_OUT                1 +#define CODEC_GPIO_IN           0 +#define CODEC_GPIO_OUT          1    u_char unused6;    u_char gpio_data;  }; @@ -449,7 +451,7 @@ struct SCC    u_char char_dummy3;    u_char cha_b_data;   }; -# define scc ((*(volatile struct SCC*)SCC_BAS)) +# define atari_scc ((*(volatile struct SCC*)SCC_BAS))  /* The ESCC (Z85230) in an Atari ST. The channels are reversed! */  # define st_escc ((*(volatile struct SCC*)0xfffffa31)) @@ -803,5 +805,11 @@ struct MSTE_RTC {  #define mste_rtc ((*(volatile struct MSTE_RTC *)MSTE_RTC_BAS)) +/* +** EtherNAT add-on card for Falcon - combined ethernet and USB adapter +*/ + +#define ATARI_ETHERNAT_PHYS_ADDR	0x80000000 +  #endif /* linux/atarihw.h */ diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h index f597892e43a..953e0ac6855 100644 --- a/arch/m68k/include/asm/atariints.h +++ b/arch/m68k/include/asm/atariints.h @@ -32,7 +32,7 @@  #define VME_SOURCE_BASE    56  #define VME_MAX_SOURCES    16 -#define NUM_ATARI_SOURCES   (VME_SOURCE_BASE+VME_MAX_SOURCES-STMFP_SOURCE_BASE) +#define NUM_ATARI_SOURCES  141  /* convert vector number to int source number */  #define IRQ_VECTOR_TO_SOURCE(v)	((v) - ((v) < 0x20 ? 0x18 : (0x40-8))) @@ -94,6 +94,15 @@  #define IRQ_SCCA_RX	     (52)  #define IRQ_SCCA_SPCOND	     (54) +/* shared MFP timer D interrupts - hires timer for EtherNEC et al. */ +#define IRQ_MFP_TIMER1       (64) +#define IRQ_MFP_TIMER2       (65) +#define IRQ_MFP_TIMER3       (66) +#define IRQ_MFP_TIMER4       (67) +#define IRQ_MFP_TIMER5       (68) +#define IRQ_MFP_TIMER6       (69) +#define IRQ_MFP_TIMER7       (70) +#define IRQ_MFP_TIMER8       (71)  #define INT_CLK   24576	    /* CLK while int_clk =2.456MHz and divide = 100 */  #define INT_TICKS 246	    /* to make sched_time = 99.902... HZ */ @@ -146,7 +155,7 @@ static inline void clear_mfp_bit( unsigned irq, int type )  /*   * {en,dis}able_irq have the usual semantics of temporary blocking the - * interrupt, but not loosing requests that happen between disabling and + * interrupt, but not losing requests that happen between disabling and   * enabling. This is done with the MFP mask registers.   */ @@ -198,7 +207,7 @@ static inline int atari_irq_pending( unsigned irq )  	return( get_mfp_bit( irq, MFP_PENDING ) );  } -unsigned long atari_register_vme_int( void ); -void atari_unregister_vme_int( unsigned long ); +unsigned int atari_register_vme_int(void); +void atari_unregister_vme_int(unsigned int);  #endif /* linux/atariints.h */ diff --git a/arch/m68k/include/asm/atarikb.h b/arch/m68k/include/asm/atarikb.h index 546e7da5804..68f3622bf59 100644 --- a/arch/m68k/include/asm/atarikb.h +++ b/arch/m68k/include/asm/atarikb.h @@ -34,8 +34,6 @@ void ikbd_joystick_disable(void);  /* Hook for MIDI serial driver */  extern void (*atari_MIDI_interrupt_hook) (void); -/* Hook for mouse driver */ -extern void (*atari_mouse_interrupt_hook) (char *);  /* Hook for keyboard inputdev  driver */  extern void (*atari_input_keyboard_interrupt_hook) (unsigned char, char);  /* Hook for mouse inputdev  driver */ diff --git a/arch/m68k/include/asm/atomic.h b/arch/m68k/include/asm/atomic.h index 03ae3d14cd4..55695212a2a 100644 --- a/arch/m68k/include/asm/atomic.h +++ b/arch/m68k/include/asm/atomic.h @@ -2,7 +2,9 @@  #define __ARCH_M68K_ATOMIC__  #include <linux/types.h> -#include <asm/system.h> +#include <linux/irqflags.h> +#include <asm/cmpxchg.h> +#include <asm/barrier.h>  /*   * Atomic operations that C can't guarantee us.  Useful for @@ -55,6 +57,16 @@ static inline int atomic_dec_and_test(atomic_t *v)  	return c != 0;  } +static inline int atomic_dec_and_test_lt(atomic_t *v) +{ +	char c; +	__asm__ __volatile__( +		"subql #1,%1; slt %0" +		: "=d" (c), "=m" (*v) +		: "m" (*v)); +	return c != 0; +} +  static inline int atomic_inc_and_test(atomic_t *v)  {  	char c; @@ -169,21 +181,21 @@ static inline int atomic_add_negative(int i, atomic_t *v)  	char c;  	__asm__ __volatile__("addl %2,%1; smi %0"  			     : "=d" (c), "+m" (*v) -			     : "id" (i)); +			     : ASM_DI (i));  	return c != 0;  }  static inline void atomic_clear_mask(unsigned long mask, unsigned long *v)  { -	__asm__ __volatile__("andl %1,%0" : "+m" (*v) : "id" (~(mask))); +	__asm__ __volatile__("andl %1,%0" : "+m" (*v) : ASM_DI (~(mask)));  }  static inline void atomic_set_mask(unsigned long mask, unsigned long *v)  { -	__asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); +	__asm__ __volatile__("orl %1,%0" : "+m" (*v) : ASM_DI (mask));  } -static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) +static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)  {  	int c, old;  	c = atomic_read(v); @@ -195,17 +207,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)  			break;  		c = old;  	} -	return c != (u); +	return c;  } -#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) - -/* Atomic operations are already serializing */ -#define smp_mb__before_atomic_dec()	barrier() -#define smp_mb__after_atomic_dec()	barrier() -#define smp_mb__before_atomic_inc()	barrier() -#define smp_mb__after_atomic_inc()	barrier() - -#include <asm-generic/atomic-long.h> -#include <asm-generic/atomic64.h>  #endif /* __ARCH_M68K_ATOMIC __ */ diff --git a/arch/m68k/include/asm/auxvec.h b/arch/m68k/include/asm/auxvec.h deleted file mode 100644 index 844d6d52204..00000000000 --- a/arch/m68k/include/asm/auxvec.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __ASMm68k_AUXVEC_H -#define __ASMm68k_AUXVEC_H - -#endif diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h index ce163abddab..b4a9b0d5928 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -1,5 +1,525 @@ -#ifdef __uClinux__ -#include "bitops_no.h" +#ifndef _M68K_BITOPS_H +#define _M68K_BITOPS_H +/* + * Copyright 1992, Linus Torvalds. + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#ifndef _LINUX_BITOPS_H +#error only <linux/bitops.h> can be included directly +#endif + +#include <linux/compiler.h> +#include <asm/barrier.h> + +/* + *	Bit access functions vary across the ColdFire and 68k families. + *	So we will break them out here, and then macro in the ones we want. + * + *	ColdFire - supports standard bset/bclr/bchg with register operand only + *	68000    - supports standard bset/bclr/bchg with memory operand + *	>= 68020 - also supports the bfset/bfclr/bfchg instructions + * + *	Although it is possible to use only the bset/bclr/bchg with register + *	operands on all platforms you end up with larger generated code. + *	So we use the best form possible on a given platform. + */ + +static inline void bset_reg_set_bit(int nr, volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; + +	__asm__ __volatile__ ("bset %1,(%0)" +		: +		: "a" (p), "di" (nr & 7) +		: "memory"); +} + +static inline void bset_mem_set_bit(int nr, volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; + +	__asm__ __volatile__ ("bset %1,%0" +		: "+m" (*p) +		: "di" (nr & 7)); +} + +static inline void bfset_mem_set_bit(int nr, volatile unsigned long *vaddr) +{ +	__asm__ __volatile__ ("bfset %1{%0:#1}" +		: +		: "d" (nr ^ 31), "o" (*vaddr) +		: "memory"); +} + +#if defined(CONFIG_COLDFIRE) +#define	set_bit(nr, vaddr)	bset_reg_set_bit(nr, vaddr) +#elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#define	set_bit(nr, vaddr)	bset_mem_set_bit(nr, vaddr) +#else +#define set_bit(nr, vaddr)	(__builtin_constant_p(nr) ? \ +				bset_mem_set_bit(nr, vaddr) : \ +				bfset_mem_set_bit(nr, vaddr)) +#endif + +#define __set_bit(nr, vaddr)	set_bit(nr, vaddr) + + +static inline void bclr_reg_clear_bit(int nr, volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; + +	__asm__ __volatile__ ("bclr %1,(%0)" +		: +		: "a" (p), "di" (nr & 7) +		: "memory"); +} + +static inline void bclr_mem_clear_bit(int nr, volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; + +	__asm__ __volatile__ ("bclr %1,%0" +		: "+m" (*p) +		: "di" (nr & 7)); +} + +static inline void bfclr_mem_clear_bit(int nr, volatile unsigned long *vaddr) +{ +	__asm__ __volatile__ ("bfclr %1{%0:#1}" +		: +		: "d" (nr ^ 31), "o" (*vaddr) +		: "memory"); +} + +#if defined(CONFIG_COLDFIRE) +#define	clear_bit(nr, vaddr)	bclr_reg_clear_bit(nr, vaddr) +#elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#define	clear_bit(nr, vaddr)	bclr_mem_clear_bit(nr, vaddr) +#else +#define clear_bit(nr, vaddr)	(__builtin_constant_p(nr) ? \ +				bclr_mem_clear_bit(nr, vaddr) : \ +				bfclr_mem_clear_bit(nr, vaddr)) +#endif + +#define __clear_bit(nr, vaddr)	clear_bit(nr, vaddr) + + +static inline void bchg_reg_change_bit(int nr, volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; + +	__asm__ __volatile__ ("bchg %1,(%0)" +		: +		: "a" (p), "di" (nr & 7) +		: "memory"); +} + +static inline void bchg_mem_change_bit(int nr, volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; + +	__asm__ __volatile__ ("bchg %1,%0" +		: "+m" (*p) +		: "di" (nr & 7)); +} + +static inline void bfchg_mem_change_bit(int nr, volatile unsigned long *vaddr) +{ +	__asm__ __volatile__ ("bfchg %1{%0:#1}" +		: +		: "d" (nr ^ 31), "o" (*vaddr) +		: "memory"); +} + +#if defined(CONFIG_COLDFIRE) +#define	change_bit(nr, vaddr)	bchg_reg_change_bit(nr, vaddr) +#elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#define	change_bit(nr, vaddr)	bchg_mem_change_bit(nr, vaddr) +#else +#define change_bit(nr, vaddr)	(__builtin_constant_p(nr) ? \ +				bchg_mem_change_bit(nr, vaddr) : \ +				bfchg_mem_change_bit(nr, vaddr)) +#endif + +#define __change_bit(nr, vaddr)	change_bit(nr, vaddr) + + +static inline int test_bit(int nr, const unsigned long *vaddr) +{ +	return (vaddr[nr >> 5] & (1UL << (nr & 31))) != 0; +} + + +static inline int bset_reg_test_and_set_bit(int nr, +					    volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; +	char retval; + +	__asm__ __volatile__ ("bset %2,(%1); sne %0" +		: "=d" (retval) +		: "a" (p), "di" (nr & 7) +		: "memory"); +	return retval; +} + +static inline int bset_mem_test_and_set_bit(int nr, +					    volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; +	char retval; + +	__asm__ __volatile__ ("bset %2,%1; sne %0" +		: "=d" (retval), "+m" (*p) +		: "di" (nr & 7)); +	return retval; +} + +static inline int bfset_mem_test_and_set_bit(int nr, +					     volatile unsigned long *vaddr) +{ +	char retval; + +	__asm__ __volatile__ ("bfset %2{%1:#1}; sne %0" +		: "=d" (retval) +		: "d" (nr ^ 31), "o" (*vaddr) +		: "memory"); +	return retval; +} + +#if defined(CONFIG_COLDFIRE) +#define	test_and_set_bit(nr, vaddr)	bset_reg_test_and_set_bit(nr, vaddr) +#elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#define	test_and_set_bit(nr, vaddr)	bset_mem_test_and_set_bit(nr, vaddr) +#else +#define test_and_set_bit(nr, vaddr)	(__builtin_constant_p(nr) ? \ +					bset_mem_test_and_set_bit(nr, vaddr) : \ +					bfset_mem_test_and_set_bit(nr, vaddr)) +#endif + +#define __test_and_set_bit(nr, vaddr)	test_and_set_bit(nr, vaddr) + + +static inline int bclr_reg_test_and_clear_bit(int nr, +					      volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; +	char retval; + +	__asm__ __volatile__ ("bclr %2,(%1); sne %0" +		: "=d" (retval) +		: "a" (p), "di" (nr & 7) +		: "memory"); +	return retval; +} + +static inline int bclr_mem_test_and_clear_bit(int nr, +					      volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; +	char retval; + +	__asm__ __volatile__ ("bclr %2,%1; sne %0" +		: "=d" (retval), "+m" (*p) +		: "di" (nr & 7)); +	return retval; +} + +static inline int bfclr_mem_test_and_clear_bit(int nr, +					       volatile unsigned long *vaddr) +{ +	char retval; + +	__asm__ __volatile__ ("bfclr %2{%1:#1}; sne %0" +		: "=d" (retval) +		: "d" (nr ^ 31), "o" (*vaddr) +		: "memory"); +	return retval; +} + +#if defined(CONFIG_COLDFIRE) +#define	test_and_clear_bit(nr, vaddr)	bclr_reg_test_and_clear_bit(nr, vaddr) +#elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#define	test_and_clear_bit(nr, vaddr)	bclr_mem_test_and_clear_bit(nr, vaddr) +#else +#define test_and_clear_bit(nr, vaddr)	(__builtin_constant_p(nr) ? \ +					bclr_mem_test_and_clear_bit(nr, vaddr) : \ +					bfclr_mem_test_and_clear_bit(nr, vaddr)) +#endif + +#define __test_and_clear_bit(nr, vaddr)	test_and_clear_bit(nr, vaddr) + + +static inline int bchg_reg_test_and_change_bit(int nr, +					       volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; +	char retval; + +	__asm__ __volatile__ ("bchg %2,(%1); sne %0" +		: "=d" (retval) +		: "a" (p), "di" (nr & 7) +		: "memory"); +	return retval; +} + +static inline int bchg_mem_test_and_change_bit(int nr, +					       volatile unsigned long *vaddr) +{ +	char *p = (char *)vaddr + (nr ^ 31) / 8; +	char retval; + +	__asm__ __volatile__ ("bchg %2,%1; sne %0" +		: "=d" (retval), "+m" (*p) +		: "di" (nr & 7)); +	return retval; +} + +static inline int bfchg_mem_test_and_change_bit(int nr, +						volatile unsigned long *vaddr) +{ +	char retval; + +	__asm__ __volatile__ ("bfchg %2{%1:#1}; sne %0" +		: "=d" (retval) +		: "d" (nr ^ 31), "o" (*vaddr) +		: "memory"); +	return retval; +} + +#if defined(CONFIG_COLDFIRE) +#define	test_and_change_bit(nr, vaddr)	bchg_reg_test_and_change_bit(nr, vaddr) +#elif defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#define	test_and_change_bit(nr, vaddr)	bchg_mem_test_and_change_bit(nr, vaddr) +#else +#define test_and_change_bit(nr, vaddr)	(__builtin_constant_p(nr) ? \ +					bchg_mem_test_and_change_bit(nr, vaddr) : \ +					bfchg_mem_test_and_change_bit(nr, vaddr)) +#endif + +#define __test_and_change_bit(nr, vaddr) test_and_change_bit(nr, vaddr) + + +/* + *	The true 68020 and more advanced processors support the "bfffo" + *	instruction for finding bits. ColdFire and simple 68000 parts + *	(including CPU32) do not support this. They simply use the generic + *	functions. + */ +#if defined(CONFIG_CPU_HAS_NO_BITFIELDS) +#include <asm-generic/bitops/find.h> +#include <asm-generic/bitops/ffz.h> +#else + +static inline int find_first_zero_bit(const unsigned long *vaddr, +				      unsigned size) +{ +	const unsigned long *p = vaddr; +	int res = 32; +	unsigned int words; +	unsigned long num; + +	if (!size) +		return 0; + +	words = (size + 31) >> 5; +	while (!(num = ~*p++)) { +		if (!--words) +			goto out; +	} + +	__asm__ __volatile__ ("bfffo %1{#0,#0},%0" +			      : "=d" (res) : "d" (num & -num)); +	res ^= 31; +out: +	res += ((long)p - (long)vaddr - 4) * 8; +	return res < size ? res : size; +} +#define find_first_zero_bit find_first_zero_bit + +static inline int find_next_zero_bit(const unsigned long *vaddr, int size, +				     int offset) +{ +	const unsigned long *p = vaddr + (offset >> 5); +	int bit = offset & 31UL, res; + +	if (offset >= size) +		return size; + +	if (bit) { +		unsigned long num = ~*p++ & (~0UL << bit); +		offset -= bit; + +		/* Look for zero in first longword */ +		__asm__ __volatile__ ("bfffo %1{#0,#0},%0" +				      : "=d" (res) : "d" (num & -num)); +		if (res < 32) { +			offset += res ^ 31; +			return offset < size ? offset : size; +		} +		offset += 32; + +		if (offset >= size) +			return size; +	} +	/* No zero yet, search remaining full bytes for a zero */ +	return offset + find_first_zero_bit(p, size - offset); +} +#define find_next_zero_bit find_next_zero_bit + +static inline int find_first_bit(const unsigned long *vaddr, unsigned size) +{ +	const unsigned long *p = vaddr; +	int res = 32; +	unsigned int words; +	unsigned long num; + +	if (!size) +		return 0; + +	words = (size + 31) >> 5; +	while (!(num = *p++)) { +		if (!--words) +			goto out; +	} + +	__asm__ __volatile__ ("bfffo %1{#0,#0},%0" +			      : "=d" (res) : "d" (num & -num)); +	res ^= 31; +out: +	res += ((long)p - (long)vaddr - 4) * 8; +	return res < size ? res : size; +} +#define find_first_bit find_first_bit + +static inline int find_next_bit(const unsigned long *vaddr, int size, +				int offset) +{ +	const unsigned long *p = vaddr + (offset >> 5); +	int bit = offset & 31UL, res; + +	if (offset >= size) +		return size; + +	if (bit) { +		unsigned long num = *p++ & (~0UL << bit); +		offset -= bit; + +		/* Look for one in first longword */ +		__asm__ __volatile__ ("bfffo %1{#0,#0},%0" +				      : "=d" (res) : "d" (num & -num)); +		if (res < 32) { +			offset += res ^ 31; +			return offset < size ? offset : size; +		} +		offset += 32; + +		if (offset >= size) +			return size; +	} +	/* No one yet, search remaining full bytes for a one */ +	return offset + find_first_bit(p, size - offset); +} +#define find_next_bit find_next_bit + +/* + * ffz = Find First Zero in word. Undefined if no zero exists, + * so code should check against ~0UL first.. + */ +static inline unsigned long ffz(unsigned long word) +{ +	int res; + +	__asm__ __volatile__ ("bfffo %1{#0,#0},%0" +			      : "=d" (res) : "d" (~word & -~word)); +	return res ^ 31; +} + +#endif + +#ifdef __KERNEL__ + +#if defined(CONFIG_CPU_HAS_NO_BITFIELDS) + +/* + *	The newer ColdFire family members support a "bitrev" instruction + *	and we can use that to implement a fast ffs. Older Coldfire parts, + *	and normal 68000 parts don't have anything special, so we use the + *	generic functions for those. + */ +#if (defined(__mcfisaaplus__) || defined(__mcfisac__)) && \ +	!defined(CONFIG_M68000) && !defined(CONFIG_MCPU32) +static inline int __ffs(int x) +{ +	__asm__ __volatile__ ("bitrev %0; ff1 %0" +		: "=d" (x) +		: "0" (x)); +	return x; +} + +static inline int ffs(int x) +{ +	if (!x) +		return 0; +	return __ffs(x) + 1; +} + +#else +#include <asm-generic/bitops/ffs.h> +#include <asm-generic/bitops/__ffs.h> +#endif + +#include <asm-generic/bitops/fls.h> +#include <asm-generic/bitops/__fls.h> +  #else -#include "bitops_mm.h" + +/* + *	ffs: find first bit set. This is defined the same way as + *	the libc and compiler builtin ffs routines, therefore + *	differs in spirit from the above ffz (man ffs). + */ +static inline int ffs(int x) +{ +	int cnt; + +	__asm__ ("bfffo %1{#0:#0},%0" +		: "=d" (cnt) +		: "dm" (x & -x)); +	return 32 - cnt; +} +#define __ffs(x) (ffs(x) - 1) + +/* + *	fls: find last bit set. + */ +static inline int fls(int x) +{ +	int cnt; + +	__asm__ ("bfffo %1{#0,#0},%0" +		: "=d" (cnt) +		: "dm" (x)); +	return 32 - cnt; +} + +static inline int __fls(int x) +{ +	return fls(x) - 1; +} +  #endif + +#include <asm-generic/bitops/ext2-atomic.h> +#include <asm-generic/bitops/le.h> +#include <asm-generic/bitops/fls64.h> +#include <asm-generic/bitops/sched.h> +#include <asm-generic/bitops/hweight.h> +#include <asm-generic/bitops/lock.h> +#endif /* __KERNEL__ */ + +#endif /* _M68K_BITOPS_H */ diff --git a/arch/m68k/include/asm/bitops_mm.h b/arch/m68k/include/asm/bitops_mm.h deleted file mode 100644 index b4ecdaada52..00000000000 --- a/arch/m68k/include/asm/bitops_mm.h +++ /dev/null @@ -1,466 +0,0 @@ -#ifndef _M68K_BITOPS_H -#define _M68K_BITOPS_H -/* - * Copyright 1992, Linus Torvalds. - * - * This file is subject to the terms and conditions of the GNU General Public - * License.  See the file COPYING in the main directory of this archive - * for more details. - */ - -#ifndef _LINUX_BITOPS_H -#error only <linux/bitops.h> can be included directly -#endif - -#include <linux/compiler.h> - -/* - * Require 68020 or better. - * - * They use the standard big-endian m680x0 bit ordering. - */ - -#define test_and_set_bit(nr,vaddr) \ -  (__builtin_constant_p(nr) ? \ -   __constant_test_and_set_bit(nr, vaddr) : \ -   __generic_test_and_set_bit(nr, vaddr)) - -#define __test_and_set_bit(nr,vaddr) test_and_set_bit(nr,vaddr) - -static inline int __constant_test_and_set_bit(int nr, unsigned long *vaddr) -{ -	char *p = (char *)vaddr + (nr ^ 31) / 8; -	char retval; - -	__asm__ __volatile__ ("bset %2,%1; sne %0" -			: "=d" (retval), "+m" (*p) -			: "di" (nr & 7)); - -	return retval; -} - -static inline int __generic_test_and_set_bit(int nr, unsigned long *vaddr) -{ -	char retval; - -	__asm__ __volatile__ ("bfset %2{%1:#1}; sne %0" -			: "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory"); - -	return retval; -} - -#define set_bit(nr,vaddr) \ -  (__builtin_constant_p(nr) ? \ -   __constant_set_bit(nr, vaddr) : \ -   __generic_set_bit(nr, vaddr)) - -#define __set_bit(nr,vaddr) set_bit(nr,vaddr) - -static inline void __constant_set_bit(int nr, volatile unsigned long *vaddr) -{ -	char *p = (char *)vaddr + (nr ^ 31) / 8; -	__asm__ __volatile__ ("bset %1,%0" -			: "+m" (*p) : "di" (nr & 7)); -} - -static inline void __generic_set_bit(int nr, volatile unsigned long *vaddr) -{ -	__asm__ __volatile__ ("bfset %1{%0:#1}" -			: : "d" (nr^31), "o" (*vaddr) : "memory"); -} - -#define test_and_clear_bit(nr,vaddr) \ -  (__builtin_constant_p(nr) ? \ -   __constant_test_and_clear_bit(nr, vaddr) : \ -   __generic_test_and_clear_bit(nr, vaddr)) - -#define __test_and_clear_bit(nr,vaddr) test_and_clear_bit(nr,vaddr) - -static inline int __constant_test_and_clear_bit(int nr, unsigned long *vaddr) -{ -	char *p = (char *)vaddr + (nr ^ 31) / 8; -	char retval; - -	__asm__ __volatile__ ("bclr %2,%1; sne %0" -			: "=d" (retval), "+m" (*p) -			: "di" (nr & 7)); - -	return retval; -} - -static inline int __generic_test_and_clear_bit(int nr, unsigned long *vaddr) -{ -	char retval; - -	__asm__ __volatile__ ("bfclr %2{%1:#1}; sne %0" -			: "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory"); - -	return retval; -} - -/* - * clear_bit() doesn't provide any barrier for the compiler. - */ -#define smp_mb__before_clear_bit()	barrier() -#define smp_mb__after_clear_bit()	barrier() - -#define clear_bit(nr,vaddr) \ -  (__builtin_constant_p(nr) ? \ -   __constant_clear_bit(nr, vaddr) : \ -   __generic_clear_bit(nr, vaddr)) -#define __clear_bit(nr,vaddr) clear_bit(nr,vaddr) - -static inline void __constant_clear_bit(int nr, volatile unsigned long *vaddr) -{ -	char *p = (char *)vaddr + (nr ^ 31) / 8; -	__asm__ __volatile__ ("bclr %1,%0" -			: "+m" (*p) : "di" (nr & 7)); -} - -static inline void __generic_clear_bit(int nr, volatile unsigned long *vaddr) -{ -	__asm__ __volatile__ ("bfclr %1{%0:#1}" -			: : "d" (nr^31), "o" (*vaddr) : "memory"); -} - -#define test_and_change_bit(nr,vaddr) \ -  (__builtin_constant_p(nr) ? \ -   __constant_test_and_change_bit(nr, vaddr) : \ -   __generic_test_and_change_bit(nr, vaddr)) - -#define __test_and_change_bit(nr,vaddr) test_and_change_bit(nr,vaddr) -#define __change_bit(nr,vaddr) change_bit(nr,vaddr) - -static inline int __constant_test_and_change_bit(int nr, unsigned long *vaddr) -{ -	char *p = (char *)vaddr + (nr ^ 31) / 8; -	char retval; - -	__asm__ __volatile__ ("bchg %2,%1; sne %0" -			: "=d" (retval), "+m" (*p) -			: "di" (nr & 7)); - -	return retval; -} - -static inline int __generic_test_and_change_bit(int nr, unsigned long *vaddr) -{ -	char retval; - -	__asm__ __volatile__ ("bfchg %2{%1:#1}; sne %0" -			: "=d" (retval) : "d" (nr^31), "o" (*vaddr) : "memory"); - -	return retval; -} - -#define change_bit(nr,vaddr) \ -  (__builtin_constant_p(nr) ? \ -   __constant_change_bit(nr, vaddr) : \ -   __generic_change_bit(nr, vaddr)) - -static inline void __constant_change_bit(int nr, unsigned long *vaddr) -{ -	char *p = (char *)vaddr + (nr ^ 31) / 8; -	__asm__ __volatile__ ("bchg %1,%0" -			: "+m" (*p) : "di" (nr & 7)); -} - -static inline void __generic_change_bit(int nr, unsigned long *vaddr) -{ -	__asm__ __volatile__ ("bfchg %1{%0:#1}" -			: : "d" (nr^31), "o" (*vaddr) : "memory"); -} - -static inline int test_bit(int nr, const unsigned long *vaddr) -{ -	return (vaddr[nr >> 5] & (1UL << (nr & 31))) != 0; -} - -static inline int find_first_zero_bit(const unsigned long *vaddr, -				      unsigned size) -{ -	const unsigned long *p = vaddr; -	int res = 32; -	unsigned long num; - -	if (!size) -		return 0; - -	size = (size + 31) >> 5; -	while (!(num = ~*p++)) { -		if (!--size) -			goto out; -	} - -	__asm__ __volatile__ ("bfffo %1{#0,#0},%0" -			      : "=d" (res) : "d" (num & -num)); -	res ^= 31; -out: -	return ((long)p - (long)vaddr - 4) * 8 + res; -} - -static inline int find_next_zero_bit(const unsigned long *vaddr, int size, -				     int offset) -{ -	const unsigned long *p = vaddr + (offset >> 5); -	int bit = offset & 31UL, res; - -	if (offset >= size) -		return size; - -	if (bit) { -		unsigned long num = ~*p++ & (~0UL << bit); -		offset -= bit; - -		/* Look for zero in first longword */ -		__asm__ __volatile__ ("bfffo %1{#0,#0},%0" -				      : "=d" (res) : "d" (num & -num)); -		if (res < 32) -			return offset + (res ^ 31); -		offset += 32; -	} -	/* No zero yet, search remaining full bytes for a zero */ -	res = find_first_zero_bit(p, size - ((long)p - (long)vaddr) * 8); -	return offset + res; -} - -static inline int find_first_bit(const unsigned long *vaddr, unsigned size) -{ -	const unsigned long *p = vaddr; -	int res = 32; -	unsigned long num; - -	if (!size) -		return 0; - -	size = (size + 31) >> 5; -	while (!(num = *p++)) { -		if (!--size) -			goto out; -	} - -	__asm__ __volatile__ ("bfffo %1{#0,#0},%0" -			      : "=d" (res) : "d" (num & -num)); -	res ^= 31; -out: -	return ((long)p - (long)vaddr - 4) * 8 + res; -} - -static inline int find_next_bit(const unsigned long *vaddr, int size, -				int offset) -{ -	const unsigned long *p = vaddr + (offset >> 5); -	int bit = offset & 31UL, res; - -	if (offset >= size) -		return size; - -	if (bit) { -		unsigned long num = *p++ & (~0UL << bit); -		offset -= bit; - -		/* Look for one in first longword */ -		__asm__ __volatile__ ("bfffo %1{#0,#0},%0" -				      : "=d" (res) : "d" (num & -num)); -		if (res < 32) -			return offset + (res ^ 31); -		offset += 32; -	} -	/* No one yet, search remaining full bytes for a one */ -	res = find_first_bit(p, size - ((long)p - (long)vaddr) * 8); -	return offset + res; -} - -/* - * ffz = Find First Zero in word. Undefined if no zero exists, - * so code should check against ~0UL first.. - */ -static inline unsigned long ffz(unsigned long word) -{ -	int res; - -	__asm__ __volatile__ ("bfffo %1{#0,#0},%0" -			      : "=d" (res) : "d" (~word & -~word)); -	return res ^ 31; -} - -#ifdef __KERNEL__ - -/* - * ffs: find first bit set. This is defined the same way as - * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). - */ - -static inline int ffs(int x) -{ -	int cnt; - -	asm ("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x)); - -	return 32 - cnt; -} -#define __ffs(x) (ffs(x) - 1) - -/* - * fls: find last bit set. - */ - -static inline int fls(int x) -{ -	int cnt; - -	asm ("bfffo %1{#0,#0},%0" : "=d" (cnt) : "dm" (x)); - -	return 32 - cnt; -} - -static inline int __fls(int x) -{ -	return fls(x) - 1; -} - -#include <asm-generic/bitops/fls64.h> -#include <asm-generic/bitops/sched.h> -#include <asm-generic/bitops/hweight.h> -#include <asm-generic/bitops/lock.h> - -/* Bitmap functions for the minix filesystem */ - -static inline int minix_find_first_zero_bit(const void *vaddr, unsigned size) -{ -	const unsigned short *p = vaddr, *addr = vaddr; -	int res; -	unsigned short num; - -	if (!size) -		return 0; - -	size = (size >> 4) + ((size & 15) > 0); -	while (*p++ == 0xffff) -	{ -		if (--size == 0) -			return (p - addr) << 4; -	} - -	num = ~*--p; -	__asm__ __volatile__ ("bfffo %1{#16,#16},%0" -			      : "=d" (res) : "d" (num & -num)); -	return ((p - addr) << 4) + (res ^ 31); -} - -#define minix_test_and_set_bit(nr, addr)	__test_and_set_bit((nr) ^ 16, (unsigned long *)(addr)) -#define minix_set_bit(nr,addr)			__set_bit((nr) ^ 16, (unsigned long *)(addr)) -#define minix_test_and_clear_bit(nr, addr)	__test_and_clear_bit((nr) ^ 16, (unsigned long *)(addr)) - -static inline int minix_test_bit(int nr, const void *vaddr) -{ -	const unsigned short *p = vaddr; -	return (p[nr >> 4] & (1U << (nr & 15))) != 0; -} - -/* Bitmap functions for the ext2 filesystem. */ - -#define ext2_set_bit(nr, addr)			__test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) -#define ext2_set_bit_atomic(lock, nr, addr)	test_and_set_bit((nr) ^ 24, (unsigned long *)(addr)) -#define ext2_clear_bit(nr, addr)		__test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) -#define ext2_clear_bit_atomic(lock, nr, addr)	test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) -#define ext2_find_next_zero_bit(addr, size, offset) \ -	generic_find_next_zero_le_bit((unsigned long *)addr, size, offset) -#define ext2_find_next_bit(addr, size, offset) \ -	generic_find_next_le_bit((unsigned long *)addr, size, offset) - -static inline int ext2_test_bit(int nr, const void *vaddr) -{ -	const unsigned char *p = vaddr; -	return (p[nr >> 3] & (1U << (nr & 7))) != 0; -} - -static inline int ext2_find_first_zero_bit(const void *vaddr, unsigned size) -{ -	const unsigned long *p = vaddr, *addr = vaddr; -	int res; - -	if (!size) -		return 0; - -	size = (size >> 5) + ((size & 31) > 0); -	while (*p++ == ~0UL) -	{ -		if (--size == 0) -			return (p - addr) << 5; -	} - -	--p; -	for (res = 0; res < 32; res++) -		if (!ext2_test_bit (res, p)) -			break; -	return (p - addr) * 32 + res; -} - -static inline unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, -		unsigned long size, unsigned long offset) -{ -	const unsigned long *p = addr + (offset >> 5); -	int bit = offset & 31UL, res; - -	if (offset >= size) -		return size; - -	if (bit) { -		/* Look for zero in first longword */ -		for (res = bit; res < 32; res++) -			if (!ext2_test_bit (res, p)) -				return (p - addr) * 32 + res; -		p++; -	} -	/* No zero yet, search remaining full bytes for a zero */ -	res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); -	return (p - addr) * 32 + res; -} - -static inline int ext2_find_first_bit(const void *vaddr, unsigned size) -{ -	const unsigned long *p = vaddr, *addr = vaddr; -	int res; - -	if (!size) -		return 0; - -	size = (size >> 5) + ((size & 31) > 0); -	while (*p++ == 0UL) { -		if (--size == 0) -			return (p - addr) << 5; -	} - -	--p; -	for (res = 0; res < 32; res++) -		if (ext2_test_bit(res, p)) -			break; -	return (p - addr) * 32 + res; -} - -static inline unsigned long generic_find_next_le_bit(const unsigned long *addr, -		unsigned long size, unsigned long offset) -{ -	const unsigned long *p = addr + (offset >> 5); -	int bit = offset & 31UL, res; - -	if (offset >= size) -		return size; - -	if (bit) { -		/* Look for one in first longword */ -		for (res = bit; res < 32; res++) -			if (ext2_test_bit(res, p)) -				return (p - addr) * 32 + res; -		p++; -	} -	/* No set bit yet, search remaining full bytes for a set bit */ -	res = ext2_find_first_bit(p, size - 32 * (p - addr)); -	return (p - addr) * 32 + res; -} - -#endif /* __KERNEL__ */ - -#endif /* _M68K_BITOPS_H */ diff --git a/arch/m68k/include/asm/bitops_no.h b/arch/m68k/include/asm/bitops_no.h deleted file mode 100644 index 9d3cbe5fad1..00000000000 --- a/arch/m68k/include/asm/bitops_no.h +++ /dev/null @@ -1,337 +0,0 @@ -#ifndef _M68KNOMMU_BITOPS_H -#define _M68KNOMMU_BITOPS_H - -/* - * Copyright 1992, Linus Torvalds. - */ - -#include <linux/compiler.h> -#include <asm/byteorder.h>	/* swab32 */ - -#ifdef __KERNEL__ - -#ifndef _LINUX_BITOPS_H -#error only <linux/bitops.h> can be included directly -#endif - -#if defined (__mcfisaaplus__) || defined (__mcfisac__) -static inline int ffs(unsigned int val) -{ -        if (!val) -                return 0; - -        asm volatile( -                        "bitrev %0\n\t" -                        "ff1 %0\n\t" -                        : "=d" (val) -                        : "0" (val) -		    ); -        val++; -        return val; -} - -static inline int __ffs(unsigned int val) -{ -        asm volatile( -                        "bitrev %0\n\t" -                        "ff1 %0\n\t" -                        : "=d" (val) -                        : "0" (val) -		    ); -        return val; -} - -#else -#include <asm-generic/bitops/ffs.h> -#include <asm-generic/bitops/__ffs.h> -#endif - -#include <asm-generic/bitops/sched.h> -#include <asm-generic/bitops/ffz.h> - -static __inline__ void set_bit(int nr, volatile unsigned long * addr) -{ -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %0,%%a0; bset %1,(%%a0)" -	     : "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "d" (nr) -	     : "%a0", "cc"); -#else -	__asm__ __volatile__ ("bset %1,%0" -	     : "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "di" (nr) -	     : "cc"); -#endif -} - -#define __set_bit(nr, addr) set_bit(nr, addr) - -/* - * clear_bit() doesn't provide any barrier for the compiler. - */ -#define smp_mb__before_clear_bit()	barrier() -#define smp_mb__after_clear_bit()	barrier() - -static __inline__ void clear_bit(int nr, volatile unsigned long * addr) -{ -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %0,%%a0; bclr %1,(%%a0)" -	     : "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "d" (nr) -	     : "%a0", "cc"); -#else -	__asm__ __volatile__ ("bclr %1,%0" -	     : "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "di" (nr) -	     : "cc"); -#endif -} - -#define __clear_bit(nr, addr) clear_bit(nr, addr) - -static __inline__ void change_bit(int nr, volatile unsigned long * addr) -{ -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %0,%%a0; bchg %1,(%%a0)" -	     : "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "d" (nr) -	     : "%a0", "cc"); -#else -	__asm__ __volatile__ ("bchg %1,%0" -	     : "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "di" (nr) -	     : "cc"); -#endif -} - -#define __change_bit(nr, addr) change_bit(nr, addr) - -static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr) -{ -	char retval; - -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %1,%%a0; bset %2,(%%a0); sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "d" (nr) -	     : "%a0"); -#else -	__asm__ __volatile__ ("bset %2,%1; sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "di" (nr) -	     /* No clobber */); -#endif - -	return retval; -} - -#define __test_and_set_bit(nr, addr) test_and_set_bit(nr, addr) - -static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr) -{ -	char retval; - -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %1,%%a0; bclr %2,(%%a0); sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "d" (nr) -	     : "%a0"); -#else -	__asm__ __volatile__ ("bclr %2,%1; sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "di" (nr) -	     /* No clobber */); -#endif - -	return retval; -} - -#define __test_and_clear_bit(nr, addr) test_and_clear_bit(nr, addr) - -static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr) -{ -	char retval; - -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %1,%%a0\n\tbchg %2,(%%a0)\n\tsne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "d" (nr) -	     : "%a0"); -#else -	__asm__ __volatile__ ("bchg %2,%1; sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[(nr^31) >> 3]) -	     : "di" (nr) -	     /* No clobber */); -#endif - -	return retval; -} - -#define __test_and_change_bit(nr, addr) test_and_change_bit(nr, addr) - -/* - * This routine doesn't need to be atomic. - */ -static __inline__ int __constant_test_bit(int nr, const volatile unsigned long * addr) -{ -	return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline__ int __test_bit(int nr, const volatile unsigned long * addr) -{ -	int 	* a = (int *) addr; -	int	mask; - -	a += nr >> 5; -	mask = 1 << (nr & 0x1f); -	return ((mask & *a) != 0); -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - __constant_test_bit((nr),(addr)) : \ - __test_bit((nr),(addr))) - -#include <asm-generic/bitops/find.h> -#include <asm-generic/bitops/hweight.h> -#include <asm-generic/bitops/lock.h> - -static __inline__ int ext2_set_bit(int nr, volatile void * addr) -{ -	char retval; - -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %1,%%a0; bset %2,(%%a0); sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3]) -	     : "d" (nr) -	     : "%a0"); -#else -	__asm__ __volatile__ ("bset %2,%1; sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3]) -	     : "di" (nr) -	     /* No clobber */); -#endif - -	return retval; -} - -static __inline__ int ext2_clear_bit(int nr, volatile void * addr) -{ -	char retval; - -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %1,%%a0; bclr %2,(%%a0); sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3]) -	     : "d" (nr) -	     : "%a0"); -#else -	__asm__ __volatile__ ("bclr %2,%1; sne %0" -	     : "=d" (retval), "+m" (((volatile char *)addr)[nr >> 3]) -	     : "di" (nr) -	     /* No clobber */); -#endif - -	return retval; -} - -#define ext2_set_bit_atomic(lock, nr, addr)		\ -	({						\ -		int ret;				\ -		spin_lock(lock);			\ -		ret = ext2_set_bit((nr), (addr));	\ -		spin_unlock(lock);			\ -		ret;					\ -	}) - -#define ext2_clear_bit_atomic(lock, nr, addr)		\ -	({						\ -		int ret;				\ -		spin_lock(lock);			\ -		ret = ext2_clear_bit((nr), (addr));	\ -		spin_unlock(lock);			\ -		ret;					\ -	}) - -static __inline__ int ext2_test_bit(int nr, const volatile void * addr) -{ -	char retval; - -#ifdef CONFIG_COLDFIRE -	__asm__ __volatile__ ("lea %1,%%a0; btst %2,(%%a0); sne %0" -	     : "=d" (retval) -	     : "m" (((const volatile char *)addr)[nr >> 3]), "d" (nr) -	     : "%a0"); -#else -	__asm__ __volatile__ ("btst %2,%1; sne %0" -	     : "=d" (retval) -	     : "m" (((const volatile char *)addr)[nr >> 3]), "di" (nr) -	     /* No clobber */); -#endif - -	return retval; -} - -#define ext2_find_first_zero_bit(addr, size) \ -        ext2_find_next_zero_bit((addr), (size), 0) - -static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset) -{ -	unsigned long *p = ((unsigned long *) addr) + (offset >> 5); -	unsigned long result = offset & ~31UL; -	unsigned long tmp; - -	if (offset >= size) -		return size; -	size -= result; -	offset &= 31UL; -	if(offset) { -		/* We hold the little endian value in tmp, but then the -		 * shift is illegal. So we could keep a big endian value -		 * in tmp, like this: -		 * -		 * tmp = __swab32(*(p++)); -		 * tmp |= ~0UL >> (32-offset); -		 * -		 * but this would decrease performance, so we change the -		 * shift: -		 */ -		tmp = *(p++); -		tmp |= __swab32(~0UL >> (32-offset)); -		if(size < 32) -			goto found_first; -		if(~tmp) -			goto found_middle; -		size -= 32; -		result += 32; -	} -	while(size & ~31UL) { -		if(~(tmp = *(p++))) -			goto found_middle; -		result += 32; -		size -= 32; -	} -	if(!size) -		return result; -	tmp = *p; - -found_first: -	/* tmp is little endian, so we would have to swab the shift, -	 * see above. But then we have to swab tmp below for ffz, so -	 * we might as well do this here. -	 */ -	return result + ffz(__swab32(tmp) | (~0UL << size)); -found_middle: -	return result + ffz(__swab32(tmp)); -} - -#define ext2_find_next_bit(addr, size, off) \ -	generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) -#include <asm-generic/bitops/minix.h> - -#endif /* __KERNEL__ */ - -#include <asm-generic/bitops/fls.h> -#include <asm-generic/bitops/__fls.h> -#include <asm-generic/bitops/fls64.h> - -#endif /* _M68KNOMMU_BITOPS_H */ diff --git a/arch/m68k/include/asm/bitsperlong.h b/arch/m68k/include/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b..00000000000 --- a/arch/m68k/include/asm/bitsperlong.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/bitsperlong.h> diff --git a/arch/m68k/include/asm/blinken.h b/arch/m68k/include/asm/blinken.h index 1a749cf7b06..0626582a7db 100644 --- a/arch/m68k/include/asm/blinken.h +++ b/arch/m68k/include/asm/blinken.h @@ -17,15 +17,15 @@  #define HP300_LEDS		0xf001ffff -extern unsigned char ledstate; +extern unsigned char hp300_ledstate;  static __inline__ void blinken_leds(int on, int off)  {  	if (MACH_IS_HP300)  	{ -		ledstate |= on; -		ledstate &= ~off; -		out_8(HP300_LEDS, ~ledstate); +		hp300_ledstate |= on; +		hp300_ledstate &= ~off; +		out_8(HP300_LEDS, ~hp300_ledstate);  	}  } diff --git a/arch/m68k/include/asm/bootinfo.h b/arch/m68k/include/asm/bootinfo.h index 67e7a78ad96..8e213267f8e 100644 --- a/arch/m68k/include/asm/bootinfo.h +++ b/arch/m68k/include/asm/bootinfo.h @@ -6,373 +6,23 @@  ** This file is subject to the terms and conditions of the GNU General Public  ** License.  See the file COPYING in the main directory of this archive  ** for more details. -** -** Created 09/29/92 by Greg Harp -** -** 5/2/94 Roman Hodek: -**   Added bi_atari part of the machine dependent union bi_un; for now it -**   contains just a model field to distinguish between TT and Falcon. -** 26/7/96 Roman Zippel: -**   Renamed to setup.h; added some useful macros to allow gcc some -**   optimizations if possible. -** 5/10/96 Geert Uytterhoeven: -**   Redesign of the boot information structure; renamed to bootinfo.h again -** 27/11/96 Geert Uytterhoeven: -**   Backwards compatibility with bootinfo interface version 1.0  */  #ifndef _M68K_BOOTINFO_H  #define _M68K_BOOTINFO_H +#include <uapi/asm/bootinfo.h> -    /* -     *  Bootinfo definitions -     * -     *  This is an easily parsable and extendable structure containing all -     *  information to be passed from the bootstrap to the kernel. -     * -     *  This way I hope to keep all future changes back/forewards compatible. -     *  Thus, keep your fingers crossed... -     * -     *  This structure is copied right after the kernel bss by the bootstrap -     *  routine. -     */  #ifndef __ASSEMBLY__ -struct bi_record { -    unsigned short tag;			/* tag ID */ -    unsigned short size;		/* size of record (in bytes) */ -    unsigned long data[0];		/* data */ -}; - -#endif /* __ASSEMBLY__ */ - - -    /* -     *  Tag Definitions -     * -     *  Machine independent tags start counting from 0x0000 -     *  Machine dependent tags start counting from 0x8000 -     */ - -#define BI_LAST			0x0000	/* last record (sentinel) */ -#define BI_MACHTYPE		0x0001	/* machine type (u_long) */ -#define BI_CPUTYPE		0x0002	/* cpu type (u_long) */ -#define BI_FPUTYPE		0x0003	/* fpu type (u_long) */ -#define BI_MMUTYPE		0x0004	/* mmu type (u_long) */ -#define BI_MEMCHUNK		0x0005	/* memory chunk address and size */ -					/* (struct mem_info) */ -#define BI_RAMDISK		0x0006	/* ramdisk address and size */ -					/* (struct mem_info) */ -#define BI_COMMAND_LINE		0x0007	/* kernel command line parameters */ -					/* (string) */ - -    /* -     *  Amiga-specific tags -     */ - -#define BI_AMIGA_MODEL		0x8000	/* model (u_long) */ -#define BI_AMIGA_AUTOCON	0x8001	/* AutoConfig device */ -					/* (struct ConfigDev) */ -#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (u_long) */ -#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (u_char) */ -#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (u_char) */ -#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */ -#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */ -#define BI_AMIGA_SERPER		0x8007	/* serial port period (u_short) */ - -    /* -     *  Atari-specific tags -     */ - -#define BI_ATARI_MCH_COOKIE	0x8000	/* _MCH cookie from TOS (u_long) */ -#define BI_ATARI_MCH_TYPE	0x8001	/* special machine type (u_long) */ -					/* (values are ATARI_MACH_* defines */ - -/* mch_cookie values (upper word) */ -#define ATARI_MCH_ST		0 -#define ATARI_MCH_STE		1 -#define ATARI_MCH_TT		2 -#define ATARI_MCH_FALCON	3 - -/* mch_type values */ -#define ATARI_MACH_NORMAL	0	/* no special machine type */ -#define ATARI_MACH_MEDUSA	1	/* Medusa 040 */ -#define ATARI_MACH_HADES	2	/* Hades 040 or 060 */ -#define ATARI_MACH_AB40		3	/* Afterburner040 on Falcon */ - -    /* -     *  VME-specific tags -     */ - -#define BI_VME_TYPE		0x8000	/* VME sub-architecture (u_long) */ -#define BI_VME_BRDINFO		0x8001	/* VME board information (struct) */ - -/* BI_VME_TYPE codes */ -#define	VME_TYPE_TP34V		0x0034	/* Tadpole TP34V */ -#define VME_TYPE_MVME147	0x0147	/* Motorola MVME147 */ -#define VME_TYPE_MVME162	0x0162	/* Motorola MVME162 */ -#define VME_TYPE_MVME166	0x0166	/* Motorola MVME166 */ -#define VME_TYPE_MVME167	0x0167	/* Motorola MVME167 */ -#define VME_TYPE_MVME172	0x0172	/* Motorola MVME172 */ -#define VME_TYPE_MVME177	0x0177	/* Motorola MVME177 */ -#define VME_TYPE_BVME4000	0x4000	/* BVM Ltd. BVME4000 */ -#define VME_TYPE_BVME6000	0x6000	/* BVM Ltd. BVME6000 */ - -/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on - * Motorola VME boards.  Contains board number, Bug version, board - * configuration options, etc.  See include/asm/mvme16xhw.h for details. - */ - - -    /* -     *  Macintosh-specific tags (all u_long) -     */ - -#define BI_MAC_MODEL		0x8000	/* Mac Gestalt ID (model type) */ -#define BI_MAC_VADDR		0x8001	/* Mac video base address */ -#define BI_MAC_VDEPTH		0x8002	/* Mac video depth */ -#define BI_MAC_VROW		0x8003	/* Mac video rowbytes */ -#define BI_MAC_VDIM		0x8004	/* Mac video dimensions */ -#define BI_MAC_VLOGICAL		0x8005	/* Mac video logical base */ -#define BI_MAC_SCCBASE		0x8006	/* Mac SCC base address */ -#define BI_MAC_BTIME		0x8007	/* Mac boot time */ -#define BI_MAC_GMTBIAS		0x8008	/* Mac GMT timezone offset */ -#define BI_MAC_MEMSIZE		0x8009	/* Mac RAM size (sanity check) */ -#define BI_MAC_CPUID		0x800a	/* Mac CPU type (sanity check) */ -#define BI_MAC_ROMBASE		0x800b	/* Mac system ROM base address */ - -    /* -     *  Macintosh hardware profile data - unused, see macintosh.h for -     *  reasonable type values -     */ - -#define BI_MAC_VIA1BASE		0x8010	/* Mac VIA1 base address (always present) */ -#define BI_MAC_VIA2BASE		0x8011	/* Mac VIA2 base address (type varies) */ -#define BI_MAC_VIA2TYPE		0x8012	/* Mac VIA2 type (VIA, RBV, OSS) */ -#define BI_MAC_ADBTYPE		0x8013	/* Mac ADB interface type */ -#define BI_MAC_ASCBASE		0x8014	/* Mac Apple Sound Chip base address */ -#define BI_MAC_SCSI5380		0x8015	/* Mac NCR 5380 SCSI (base address, multi) */ -#define BI_MAC_SCSIDMA		0x8016	/* Mac SCSI DMA (base address) */ -#define BI_MAC_SCSI5396		0x8017	/* Mac NCR 53C96 SCSI (base address, multi) */ -#define BI_MAC_IDETYPE		0x8018	/* Mac IDE interface type */ -#define BI_MAC_IDEBASE		0x8019	/* Mac IDE interface base address */ -#define BI_MAC_NUBUS		0x801a	/* Mac Nubus type (none, regular, pseudo) */ -#define BI_MAC_SLOTMASK		0x801b	/* Mac Nubus slots present */ -#define BI_MAC_SCCTYPE		0x801c	/* Mac SCC serial type (normal, IOP) */ -#define BI_MAC_ETHTYPE		0x801d	/* Mac builtin ethernet type (Sonic, MACE */ -#define BI_MAC_ETHBASE		0x801e	/* Mac builtin ethernet base address */ -#define BI_MAC_PMU		0x801f	/* Mac power management / poweroff hardware */ -#define BI_MAC_IOP_SWIM		0x8020	/* Mac SWIM floppy IOP */ -#define BI_MAC_IOP_ADB		0x8021	/* Mac ADB IOP */ - -    /* -     * Mac: compatibility with old booter data format (temporarily) -     * Fields unused with the new bootinfo can be deleted now; instead of -     * adding new fields the struct might be splitted into a hardware address -     * part and a hardware type part -     */ - -#ifndef __ASSEMBLY__ - -struct mac_booter_data -{ -	unsigned long videoaddr; -	unsigned long videorow; -	unsigned long videodepth; -	unsigned long dimensions; -	unsigned long args; -	unsigned long boottime; -	unsigned long gmtbias; -	unsigned long bootver; -	unsigned long videological; -	unsigned long sccbase; -	unsigned long id; -	unsigned long memsize; -	unsigned long serialmf; -	unsigned long serialhsk; -	unsigned long serialgpi; -	unsigned long printmf; -	unsigned long printhsk; -	unsigned long printgpi; -	unsigned long cpuid; -	unsigned long rombase; -	unsigned long adbdelay; -	unsigned long timedbra; -}; - -extern struct mac_booter_data -	mac_bi_data; - +#ifdef CONFIG_BOOTINFO_PROC +extern void save_bootinfo(const struct bi_record *bi); +#else +static inline void save_bootinfo(const struct bi_record *bi) {}  #endif -    /* -     *  Apollo-specific tags -     */ - -#define BI_APOLLO_MODEL         0x8000  /* model (u_long) */ - -    /* -     *  HP300-specific tags -     */ - -#define BI_HP300_MODEL		0x8000	/* model (u_long) */ -#define BI_HP300_UART_SCODE	0x8001	/* UART select code (u_long) */ -#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (u_long) */ - -    /* -     * Stuff for bootinfo interface versioning -     * -     * At the start of kernel code, a 'struct bootversion' is located. -     * bootstrap checks for a matching version of the interface before booting -     * a kernel, to avoid user confusion if kernel and bootstrap don't work -     * together :-) -     * -     * If incompatible changes are made to the bootinfo interface, the major -     * number below should be stepped (and the minor reset to 0) for the -     * appropriate machine. If a change is backward-compatible, the minor -     * should be stepped. "Backwards-compatible" means that booting will work, -     * but certain features may not. -     */ - -#define BOOTINFOV_MAGIC			0x4249561A	/* 'BIV^Z' */ -#define MK_BI_VERSION(major,minor)	(((major)<<16)+(minor)) -#define BI_VERSION_MAJOR(v)		(((v) >> 16) & 0xffff) -#define BI_VERSION_MINOR(v)		((v) & 0xffff) - -#ifndef __ASSEMBLY__ - -struct bootversion { -    unsigned short branch; -    unsigned long magic; -    struct { -	unsigned long machtype; -	unsigned long version; -    } machversions[0]; -}; -  #endif /* __ASSEMBLY__ */ -#define AMIGA_BOOTI_VERSION    MK_BI_VERSION( 2, 0 ) -#define ATARI_BOOTI_VERSION    MK_BI_VERSION( 2, 1 ) -#define MAC_BOOTI_VERSION      MK_BI_VERSION( 2, 0 ) -#define MVME147_BOOTI_VERSION  MK_BI_VERSION( 2, 0 ) -#define MVME16x_BOOTI_VERSION  MK_BI_VERSION( 2, 0 ) -#define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 ) -#define Q40_BOOTI_VERSION      MK_BI_VERSION( 2, 0 ) -#define HP300_BOOTI_VERSION    MK_BI_VERSION( 2, 0 ) - -#ifdef BOOTINFO_COMPAT_1_0 - -    /* -     *  Backwards compatibility with bootinfo interface version 1.0 -     */ - -#define COMPAT_AMIGA_BOOTI_VERSION    MK_BI_VERSION( 1, 0 ) -#define COMPAT_ATARI_BOOTI_VERSION    MK_BI_VERSION( 1, 0 ) -#define COMPAT_MAC_BOOTI_VERSION      MK_BI_VERSION( 1, 0 ) - -#include <linux/zorro.h> - -#define COMPAT_NUM_AUTO    16 - -struct compat_bi_Amiga { -    int model; -    int num_autocon; -    struct ConfigDev autocon[COMPAT_NUM_AUTO]; -    unsigned long chip_size; -    unsigned char vblank; -    unsigned char psfreq; -    unsigned long eclock; -    unsigned long chipset; -    unsigned long hw_present; -}; - -struct compat_bi_Atari { -    unsigned long hw_present; -    unsigned long mch_cookie; -}; - -#ifndef __ASSEMBLY__ - -struct compat_bi_Macintosh -{ -	unsigned long videoaddr; -	unsigned long videorow; -	unsigned long videodepth; -	unsigned long dimensions; -	unsigned long args; -	unsigned long boottime; -	unsigned long gmtbias; -	unsigned long bootver; -	unsigned long videological; -	unsigned long sccbase; -	unsigned long id; -	unsigned long memsize; -	unsigned long serialmf; -	unsigned long serialhsk; -	unsigned long serialgpi; -	unsigned long printmf; -	unsigned long printhsk; -	unsigned long printgpi; -	unsigned long cpuid; -	unsigned long rombase; -	unsigned long adbdelay; -	unsigned long timedbra; -}; - -#endif - -struct compat_mem_info { -    unsigned long addr; -    unsigned long size; -}; - -#define COMPAT_NUM_MEMINFO  4 - -#define COMPAT_CPUB_68020 0 -#define COMPAT_CPUB_68030 1 -#define COMPAT_CPUB_68040 2 -#define COMPAT_CPUB_68060 3 -#define COMPAT_FPUB_68881 5 -#define COMPAT_FPUB_68882 6 -#define COMPAT_FPUB_68040 7 -#define COMPAT_FPUB_68060 8 - -#define COMPAT_CPU_68020    (1<<COMPAT_CPUB_68020) -#define COMPAT_CPU_68030    (1<<COMPAT_CPUB_68030) -#define COMPAT_CPU_68040    (1<<COMPAT_CPUB_68040) -#define COMPAT_CPU_68060    (1<<COMPAT_CPUB_68060) -#define COMPAT_CPU_MASK     (31) -#define COMPAT_FPU_68881    (1<<COMPAT_FPUB_68881) -#define COMPAT_FPU_68882    (1<<COMPAT_FPUB_68882) -#define COMPAT_FPU_68040    (1<<COMPAT_FPUB_68040) -#define COMPAT_FPU_68060    (1<<COMPAT_FPUB_68060) -#define COMPAT_FPU_MASK     (0xfe0) - -#define COMPAT_CL_SIZE      (256) - -struct compat_bootinfo { -    unsigned long machtype; -    unsigned long cputype; -    struct compat_mem_info memory[COMPAT_NUM_MEMINFO]; -    int num_memory; -    unsigned long ramdisk_size; -    unsigned long ramdisk_addr; -    char command_line[COMPAT_CL_SIZE]; -    union { -	struct compat_bi_Amiga     bi_ami; -	struct compat_bi_Atari     bi_ata; -	struct compat_bi_Macintosh bi_mac; -    } bi_un; -}; - -#define bi_amiga	bi_un.bi_ami -#define bi_atari	bi_un.bi_ata -#define bi_mac		bi_un.bi_mac - -#endif /* BOOTINFO_COMPAT_1_0 */ -  #endif /* _M68K_BOOTINFO_H */ diff --git a/arch/m68k/include/asm/bootstd.h b/arch/m68k/include/asm/bootstd.h index bdc1a4ac4fe..e518f5a575b 100644 --- a/arch/m68k/include/asm/bootstd.h +++ b/arch/m68k/include/asm/bootstd.h @@ -31,7 +31,7 @@  #define __BN_flash_write_range		20  /* Calling conventions compatible to (uC)linux/68k - * We use simmilar macros to call into the bootloader as for uClinux + * We use similar macros to call into the bootloader as for uClinux   */  #define __bsc_return(type, res) \ diff --git a/arch/m68k/include/asm/cacheflush.h b/arch/m68k/include/asm/cacheflush.h index a70d7319630..4fc738209bd 100644 --- a/arch/m68k/include/asm/cacheflush.h +++ b/arch/m68k/include/asm/cacheflush.h @@ -1,5 +1,5 @@  #ifdef __uClinux__ -#include "cacheflush_no.h" +#include <asm/cacheflush_no.h>  #else -#include "cacheflush_mm.h" +#include <asm/cacheflush_mm.h>  #endif diff --git a/arch/m68k/include/asm/cacheflush_mm.h b/arch/m68k/include/asm/cacheflush_mm.h index 73de7c89d8e..fa2c3d681d8 100644 --- a/arch/m68k/include/asm/cacheflush_mm.h +++ b/arch/m68k/include/asm/cacheflush_mm.h @@ -2,23 +2,130 @@  #define _M68K_CACHEFLUSH_H  #include <linux/mm.h> +#ifdef CONFIG_COLDFIRE +#include <asm/mcfsim.h> +#endif  /* cache code */  #define FLUSH_I_AND_D	(0x00000808)  #define FLUSH_I		(0x00000008) +#ifndef ICACHE_MAX_ADDR +#define ICACHE_MAX_ADDR	0 +#define ICACHE_SET_MASK	0 +#define DCACHE_MAX_ADDR	0 +#define DCACHE_SETMASK	0 +#endif +#ifndef CACHE_MODE +#define	CACHE_MODE	0 +#define	CACR_ICINVA	0 +#define	CACR_DCINVA	0 +#define	CACR_BCINVA	0 +#endif + +/* + * ColdFire architecture has no way to clear individual cache lines, so we + * are stuck invalidating all the cache entries when we want a clear operation. + */ +static inline void clear_cf_icache(unsigned long start, unsigned long end) +{ +	__asm__ __volatile__ ( +		"movec	%0,%%cacr\n\t" +		"nop" +		: +		: "r" (CACHE_MODE | CACR_ICINVA | CACR_BCINVA)); +} + +static inline void clear_cf_dcache(unsigned long start, unsigned long end) +{ +	__asm__ __volatile__ ( +		"movec	%0,%%cacr\n\t" +		"nop" +		: +		: "r" (CACHE_MODE | CACR_DCINVA)); +} + +static inline void clear_cf_bcache(unsigned long start, unsigned long end) +{ +	__asm__ __volatile__ ( +		"movec	%0,%%cacr\n\t" +		"nop" +		: +		: "r" (CACHE_MODE | CACR_ICINVA | CACR_BCINVA | CACR_DCINVA)); +} + +/* + * Use the ColdFire cpushl instruction to push (and invalidate) cache lines. + * The start and end addresses are cache line numbers not memory addresses. + */ +static inline void flush_cf_icache(unsigned long start, unsigned long end) +{ +	unsigned long set; + +	for (set = start; set <= end; set += (0x10 - 3)) { +		__asm__ __volatile__ ( +			"cpushl %%ic,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%ic,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%ic,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%ic,(%0)" +			: "=a" (set) +			: "a" (set)); +	} +} + +static inline void flush_cf_dcache(unsigned long start, unsigned long end) +{ +	unsigned long set; + +	for (set = start; set <= end; set += (0x10 - 3)) { +		__asm__ __volatile__ ( +			"cpushl %%dc,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%dc,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%dc,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%dc,(%0)" +			: "=a" (set) +			: "a" (set)); +	} +} + +static inline void flush_cf_bcache(unsigned long start, unsigned long end) +{ +	unsigned long set; + +	for (set = start; set <= end; set += (0x10 - 3)) { +		__asm__ __volatile__ ( +			"cpushl %%bc,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%bc,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%bc,(%0)\n\t" +			"addq%.l #1,%0\n\t" +			"cpushl %%bc,(%0)" +			: "=a" (set) +			: "a" (set)); +	} +} +  /*   * Cache handling functions   */  static inline void flush_icache(void)  { -	if (CPU_IS_040_OR_060) +	if (CPU_IS_COLDFIRE) { +		flush_cf_icache(0, ICACHE_MAX_ADDR); +	} else if (CPU_IS_040_OR_060) {  		asm volatile (	"nop\n"  			"	.chip	68040\n"  			"	cpusha	%bc\n"  			"	.chip	68k"); -	else { +	} else {  		unsigned long tmp;  		asm volatile (	"movec	%%cacr,%0\n"  			"	or.w	%1,%0\n" @@ -51,12 +158,14 @@ extern void cache_push_v(unsigned long vaddr, int len);     process changes.  */  #define __flush_cache_all()					\  ({								\ -	if (CPU_IS_040_OR_060)					\ +	if (CPU_IS_COLDFIRE) {					\ +		flush_cf_dcache(0, DCACHE_MAX_ADDR);		\ +	} else if (CPU_IS_040_OR_060) {				\  		__asm__ __volatile__("nop\n\t"			\  				     ".chip 68040\n\t"		\  				     "cpusha %dc\n\t"		\  				     ".chip 68k");		\ -	else {							\ +	} else {						\  		unsigned long _tmp;				\  		__asm__ __volatile__("movec %%cacr,%0\n\t"	\  				     "orw %1,%0\n\t"		\ @@ -112,7 +221,17 @@ static inline void flush_cache_page(struct vm_area_struct *vma, unsigned long vm  /* RZ: use cpush %bc instead of cpush %dc, cinv %ic */  static inline void __flush_page_to_ram(void *vaddr)  { -	if (CPU_IS_040_OR_060) { +	if (CPU_IS_COLDFIRE) { +		unsigned long addr, start, end; +		addr = ((unsigned long) vaddr) & ~(PAGE_SIZE - 1); +		start = addr & ICACHE_SET_MASK; +		end = (addr + PAGE_SIZE - 1) & ICACHE_SET_MASK; +		if (start > end) { +			flush_cf_bcache(0, end); +			end = ICACHE_MAX_ADDR; +		} +		flush_cf_bcache(start, end); +	} else if (CPU_IS_040_OR_060) {  		__asm__ __volatile__("nop\n\t"  				     ".chip 68040\n\t"  				     "cpushp %%bc,(%0)\n\t" diff --git a/arch/m68k/include/asm/cacheflush_no.h b/arch/m68k/include/asm/cacheflush_no.h index 7085bd51668..d2b3935ae14 100644 --- a/arch/m68k/include/asm/cacheflush_no.h +++ b/arch/m68k/include/asm/cacheflush_no.h @@ -2,21 +2,22 @@  #define _M68KNOMMU_CACHEFLUSH_H  /* - * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com> + * (C) Copyright 2000-2010, Greg Ungerer <gerg@snapgear.com>   */  #include <linux/mm.h> +#include <asm/mcfsim.h>  #define flush_cache_all()			__flush_cache_all()  #define flush_cache_mm(mm)			do { } while (0)  #define flush_cache_dup_mm(mm)			do { } while (0) -#define flush_cache_range(vma, start, end)	__flush_cache_all() +#define flush_cache_range(vma, start, end)	do { } while (0)  #define flush_cache_page(vma, vmaddr)		do { } while (0) -#define flush_dcache_range(start,len)		__flush_cache_all() +#define flush_dcache_range(start, len)		__flush_dcache_all()  #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0  #define flush_dcache_page(page)			do { } while (0)  #define flush_dcache_mmap_lock(mapping)		do { } while (0)  #define flush_dcache_mmap_unlock(mapping)	do { } while (0) -#define flush_icache_range(start,len)		__flush_cache_all() +#define flush_icache_range(start, len)		__flush_icache_all()  #define flush_icache_page(vma,pg)		do { } while (0)  #define flush_icache_user_range(vma,pg,adr,len)	do { } while (0)  #define flush_cache_vmap(start, end)		do { } while (0) @@ -27,66 +28,73 @@  #define copy_from_user_page(vma, page, vaddr, dst, src, len) \  	memcpy(dst, src, len) -static inline void __flush_cache_all(void) +void mcf_cache_push(void); + +static inline void __clear_cache_all(void)  { -#if defined(CONFIG_M5407) || defined(CONFIG_M548x) -	/* -	 *	Use cpushl to push and invalidate all cache lines. -	 *	Gas doesn't seem to know how to generate the ColdFire -	 *	cpushl instruction... Oh well, bit stuff it for now. -	 */ -	__asm__ __volatile__ ( -		"nop\n\t" -		"clrl	%%d0\n\t" -		"1:\n\t" -		"movel	%%d0,%%a0\n\t" -		"2:\n\t" -		".word	0xf468\n\t" -		"addl	#0x10,%%a0\n\t" -		"cmpl	#0x00000800,%%a0\n\t" -		"blt	2b\n\t" -		"addql	#1,%%d0\n\t" -		"cmpil	#4,%%d0\n\t" -		"bne	1b\n\t" -		"movel	#0xb6088500,%%d0\n\t" -		"movec	%%d0,%%CACR\n\t" -		: : : "d0", "a0" ); -#endif /* CONFIG_M5407 */ -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) -	__asm__ __volatile__ ( -		"movel	#0x81400100, %%d0\n\t" -		"movec	%%d0, %%CACR\n\t" -		"nop\n\t" -		: : : "d0" ); -#endif /* CONFIG_M523x || CONFIG_M527x */ -#if defined(CONFIG_M528x) -	__asm__ __volatile__ ( -		"movel	#0x81000200, %%d0\n\t" -		"movec	%%d0, %%CACR\n\t" -		"nop\n\t" -		: : : "d0" ); -#endif /* CONFIG_M528x */ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) +#ifdef CACHE_INVALIDATE  	__asm__ __volatile__ ( -		"movel	#0x81000100, %%d0\n\t" -		"movec	%%d0, %%CACR\n\t" +		"movec	%0, %%CACR\n\t"  		"nop\n\t" -		: : : "d0" ); -#endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ -#ifdef CONFIG_M5249 +		: : "r" (CACHE_INVALIDATE) ); +#endif +} + +static inline void __flush_cache_all(void) +{ +#ifdef CACHE_PUSH +	mcf_cache_push(); +#endif +	__clear_cache_all(); +} + +/* + * Some ColdFire parts implement separate instruction and data caches, + * on those we should just flush the appropriate cache. If we don't need + * to do any specific flushing then this will be optimized away. + */ +static inline void __flush_icache_all(void) +{ +#ifdef CACHE_INVALIDATEI  	__asm__ __volatile__ ( -		"movel	#0xa1000200, %%d0\n\t" -		"movec	%%d0, %%CACR\n\t" +		"movec	%0, %%CACR\n\t"  		"nop\n\t" -		: : : "d0" ); -#endif /* CONFIG_M5249 */ -#ifdef CONFIG_M532x +		: : "r" (CACHE_INVALIDATEI) ); +#endif +} + +static inline void __flush_dcache_all(void) +{ +#ifdef CACHE_PUSH +	mcf_cache_push(); +#endif +#ifdef CACHE_INVALIDATED  	__asm__ __volatile__ ( -		"movel	#0x81000200, %%d0\n\t" -		"movec	%%d0, %%CACR\n\t" +		"movec	%0, %%CACR\n\t"  		"nop\n\t" -		: : : "d0" ); -#endif /* CONFIG_M532x */ +		: : "r" (CACHE_INVALIDATED) ); +#else +	/* Flush the write buffer */ +	__asm__ __volatile__ ( "nop" ); +#endif +} + +/* + * Push cache entries at supplied address. We want to write back any dirty + * data and then invalidate the cache lines associated with this address. + */ +static inline void cache_push(unsigned long paddr, int len) +{ +	__flush_cache_all(); +} + +/* + * Clear cache entries at supplied address (that is don't write back any + * dirty data). + */ +static inline void cache_clear(unsigned long paddr, int len) +{ +	__clear_cache_all();  }  #endif /* _M68KNOMMU_CACHEFLUSH_H */ diff --git a/arch/m68k/include/asm/checksum.h b/arch/m68k/include/asm/checksum.h index ec514485c8b..2f88d867c71 100644 --- a/arch/m68k/include/asm/checksum.h +++ b/arch/m68k/include/asm/checksum.h @@ -3,6 +3,10 @@  #include <linux/in6.h> +#ifdef CONFIG_GENERIC_CSUM +#include <asm-generic/checksum.h> +#else +  /*   * computes the checksum of a memory block at buff, length len,   * and adds in "sum" (32-bit) @@ -34,30 +38,6 @@ extern __wsum csum_partial_copy_nocheck(const void *src,  					      void *dst, int len,  					      __wsum sum); - -#ifdef CONFIG_COLDFIRE - -/* - *	The ColdFire cores don't support all the 68k instructions used - *	in the optimized checksum code below. So it reverts back to using - *	more standard C coded checksums. The fast checksum code is - *	significantly larger than the optimized version, so it is not - *	inlined here. - */ -__sum16 ip_fast_csum(const void *iph, unsigned int ihl); - -static inline __sum16 csum_fold(__wsum sum) -{ -	unsigned int tmp = (__force u32)sum; - -	tmp = (tmp & 0xffff) + (tmp >> 16); -	tmp = (tmp & 0xffff) + (tmp >> 16); - -	return (__force __sum16)~tmp; -} - -#else -  /*   *	This is a version of ip_fast_csum() optimized for IP headers,   *	which always checksum on 4 octet boundaries. @@ -97,8 +77,6 @@ static inline __sum16 csum_fold(__wsum sum)  	return (__force __sum16)~sum;  } -#endif /* CONFIG_COLDFIRE */ -  static inline __wsum  csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,  		  unsigned short proto, __wsum sum) @@ -167,4 +145,5 @@ csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,  	return csum_fold(sum);  } +#endif /* CONFIG_GENERIC_CSUM */  #endif /* _M68K_CHECKSUM_H */ diff --git a/arch/m68k/include/asm/system_mm.h b/arch/m68k/include/asm/cmpxchg.h index 47b01f4726b..bc755bc620a 100644 --- a/arch/m68k/include/asm/system_mm.h +++ b/arch/m68k/include/asm/cmpxchg.h @@ -1,73 +1,13 @@ -#ifndef _M68K_SYSTEM_H -#define _M68K_SYSTEM_H +#ifndef __ARCH_M68K_CMPXCHG__ +#define __ARCH_M68K_CMPXCHG__ -#include <linux/linkage.h> -#include <linux/kernel.h>  #include <linux/irqflags.h> -#include <asm/segment.h> -#include <asm/entry.h> - -#ifdef __KERNEL__ - -/* - * switch_to(n) should switch tasks to task ptr, first checking that - * ptr isn't the current task, in which case it does nothing.  This - * also clears the TS-flag if the task we switched to has used the - * math co-processor latest. - */ -/* - * switch_to() saves the extra registers, that are not saved - * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and - * a0-a1. Some of these are used by schedule() and its predecessors - * and so we might get see unexpected behaviors when a task returns - * with unexpected register values. - * - * syscall stores these registers itself and none of them are used - * by syscall after the function in the syscall has been called. - * - * Beware that resume now expects *next to be in d1 and the offset of - * tss to be in a1. This saves a few instructions as we no longer have - * to push them onto the stack and read them back right after. - * - * 02/17/96 - Jes Sorensen (jds@kom.auc.dk) - * - * Changed 96/09/19 by Andreas Schwab - * pass prev in a0, next in a1 - */ -asmlinkage void resume(void); -#define switch_to(prev,next,last) do { \ -  register void *_prev __asm__ ("a0") = (prev); \ -  register void *_next __asm__ ("a1") = (next); \ -  register void *_last __asm__ ("d1"); \ -  __asm__ __volatile__("jbsr resume" \ -		       : "=a" (_prev), "=a" (_next), "=d" (_last) \ -		       : "0" (_prev), "1" (_next) \ -		       : "d0", "d2", "d3", "d4", "d5"); \ -  (last) = _last; \ -} while (0) - - -/* - * Force strict CPU ordering. - * Not really required on m68k... - */ -#define nop()		do { asm volatile ("nop"); barrier(); } while (0) -#define mb()		barrier() -#define rmb()		barrier() -#define wmb()		barrier() -#define read_barrier_depends()	((void)0) -#define set_mb(var, value)	({ (var) = (value); wmb(); }) - -#define smp_mb()	barrier() -#define smp_rmb()	barrier() -#define smp_wmb()	barrier() -#define smp_read_barrier_depends()	((void)0) - -#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))  struct __xchg_dummy { unsigned long a[100]; };  #define __xg(x) ((volatile struct __xchg_dummy *)(x)) +extern unsigned long __invalid_xchg_size(unsigned long, volatile void *, int); +  #ifndef CONFIG_RMW_INSNS  static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)  { @@ -92,7 +32,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz  		x = tmp;  		break;  	default: -		BUG(); +		tmp = __invalid_xchg_size(x, ptr, size); +		break;  	}  	local_irq_restore(flags); @@ -102,7 +43,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz  static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)  {  	switch (size) { -	    case 1: +	case 1:  		__asm__ __volatile__  			("moveb %2,%0\n\t"  			 "1:\n\t" @@ -110,7 +51,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz  			 "jne 1b"  			 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory");  		break; -	    case 2: +	case 2:  		__asm__ __volatile__  			("movew %2,%0\n\t"  			 "1:\n\t" @@ -118,7 +59,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz  			 "jne 1b"  			 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory");  		break; -	    case 4: +	case 4:  		__asm__ __volatile__  			("movel %2,%0\n\t"  			 "1:\n\t" @@ -126,15 +67,23 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz  			 "jne 1b"  			 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory");  		break; +	default: +		x = __invalid_xchg_size(x, ptr, size); +		break;  	}  	return x;  }  #endif +#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) +  #include <asm-generic/cmpxchg-local.h>  #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) +extern unsigned long __invalid_cmpxchg_size(volatile void *, +					    unsigned long, unsigned long, int); +  /*   * Atomic compare and exchange.  Compare OLD with MEM, if identical,   * store NEW in MEM.  Return the initial value in MEM.  Success is @@ -162,6 +111,9 @@ static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,  				      : "=d" (old), "=m" (*(int *)p)  				      : "d" (new), "0" (old), "m" (*(int *)p));  		break; +	default: +		old = __invalid_cmpxchg_size(p, old, new, size); +		break;  	}  	return old;  } @@ -172,6 +124,9 @@ static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,  #define cmpxchg_local(ptr, o, n)					    \  	((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o),	    \  			(unsigned long)(n), sizeof(*(ptr)))) + +#define cmpxchg64(ptr, o, n)	cmpxchg64_local((ptr), (o), (n)) +  #else  /* @@ -186,8 +141,4 @@ static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,  #endif -#define arch_align_stack(x) (x) - -#endif /* __KERNEL__ */ - -#endif /* _M68K_SYSTEM_H */ +#endif /* __ARCH_M68K_CMPXCHG__ */ diff --git a/arch/m68k/include/asm/coldfire.h b/arch/m68k/include/asm/coldfire.h index 3b0a34d0fe3..c94557b9144 100644 --- a/arch/m68k/include/asm/coldfire.h +++ b/arch/m68k/include/asm/coldfire.h @@ -14,39 +14,35 @@  /* - *	Define master clock frequency. This is essentially done at config - *	time now. No point enumerating dozens of possible clock options - *	here. Also the peripheral clock (bus clock) divide ratio is set - *	at config time too. + *	Define master clock frequency. This is done at config time now. + *	No point enumerating dozens of possible clock options here. And + *	in any case new boards come along from time to time that have yet + *	another different clocking frequency.   */  #ifdef CONFIG_CLOCK_SET  #define	MCF_CLK		CONFIG_CLOCK_FREQ -#define	MCF_BUSCLK	(CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV)  #else  #error "Don't know what your ColdFire CPU clock frequency is??"  #endif  /* - *	Define the processor support peripherals base address. - *	This is generally setup by the boards start up code. + *	Define the processor internal peripherals base address. + * + *	The majority of ColdFire parts use an MBAR register to set + *	the base address. Some have an IPSBAR register instead, and it + *	has slightly different rules on its size and alignment. Some + *	parts have fixed addresses and the internal peripherals cannot + *	be relocated in the CPU address space. + * + *	The value of MBAR or IPSBAR is config time selectable, we no + *	longer hard define it here. No MBAR or IPSBAR will be defined if + *	this part has a fixed peripheral address map.   */ -#define	MCF_MBAR	0x10000000 -#define	MCF_MBAR2	0x80000000 -#if defined(CONFIG_M548x) -#define	MCF_IPSBAR	MCF_MBAR -#elif defined(CONFIG_M520x) -#define	MCF_IPSBAR	0xFC000000 -#else -#define	MCF_IPSBAR	0x40000000 +#ifdef CONFIG_MBAR +#define	MCF_MBAR	CONFIG_MBAR  #endif - -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ -    defined(CONFIG_M520x) -#undef MCF_MBAR -#define	MCF_MBAR	MCF_IPSBAR -#elif defined(CONFIG_M532x) -#undef MCF_MBAR -#define MCF_MBAR	0x00000000 +#ifdef CONFIG_IPSBAR +#define	MCF_IPSBAR	CONFIG_IPSBAR  #endif  /****************************************************************************/ diff --git a/arch/m68k/include/asm/commproc.h b/arch/m68k/include/asm/commproc.h index edf5eb6c08d..66a36bd51aa 100644 --- a/arch/m68k/include/asm/commproc.h +++ b/arch/m68k/include/asm/commproc.h @@ -88,7 +88,7 @@ typedef struct cpm_buf_desc {  /* rx bd status/control bits */ -#define BD_SC_EMPTY	((ushort)0x8000)	/* Recieve is empty */ +#define BD_SC_EMPTY	((ushort)0x8000)	/* Receive is empty */  #define BD_SC_WRAP	((ushort)0x2000)	/* Last buffer descriptor in table */  #define BD_SC_INTRPT	((ushort)0x1000)	/* Interrupt on change */  #define BD_SC_LAST	((ushort)0x0800)	/* Last buffer in frame OR control char */ @@ -96,7 +96,7 @@ typedef struct cpm_buf_desc {  #define BD_SC_FIRST	((ushort)0x0400)	/* 1st buffer in an HDLC frame */  #define BD_SC_ADDR	((ushort)0x0400)	/* 1st byte is a multidrop address */ -#define BD_SC_CM	((ushort)0x0200)	/* Continous mode */ +#define BD_SC_CM	((ushort)0x0200)	/* Continuous mode */  #define BD_SC_ID	((ushort)0x0100)	/* Received too many idles */  #define BD_SC_AM	((ushort)0x0080)	/* Multidrop address match */ @@ -480,23 +480,6 @@ typedef struct scc_enet {  #define SICR_ENET_CLKRT	((uint)0x0000003d)  #endif -#ifdef CONFIG_RPXLITE -/* This ENET stuff is for the MPC850 with ethernet on SCC2.  Some of - * this may be unique to the RPX-Lite configuration. - * Note TENA is on Port B. - */ -#define PA_ENET_RXD	((ushort)0x0004) -#define PA_ENET_TXD	((ushort)0x0008) -#define PA_ENET_TCLK	((ushort)0x0200) -#define PA_ENET_RCLK	((ushort)0x0800) -#define PB_ENET_TENA	((uint)0x00002000) -#define PC_ENET_CLSN	((ushort)0x0040) -#define PC_ENET_RENA	((ushort)0x0080) - -#define SICR_ENET_MASK	((uint)0x0000ff00) -#define SICR_ENET_CLKRT	((uint)0x00003d00) -#endif -  #ifdef CONFIG_BSEIP  /* This ENET stuff is for the MPC823 with ethernet on SCC2.   * This is unique to the BSE ip-Engine board. diff --git a/arch/m68k/include/asm/cputime.h b/arch/m68k/include/asm/cputime.h deleted file mode 100644 index c79c5e89230..00000000000 --- a/arch/m68k/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __M68K_CPUTIME_H -#define __M68K_CPUTIME_H - -#include <asm-generic/cputime.h> - -#endif /* __M68K_CPUTIME_H */ diff --git a/arch/m68k/include/asm/dbg.h b/arch/m68k/include/asm/dbg.h deleted file mode 100644 index 27af3270f67..00000000000 --- a/arch/m68k/include/asm/dbg.h +++ /dev/null @@ -1,6 +0,0 @@ -#define DEBUG 1 -#ifdef CONFIG_COLDFIRE -#define	BREAK asm volatile ("halt") -#else -#define BREAK *(volatile unsigned char *)0xdeadbee0 = 0 -#endif diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h index d2598e3dd7b..d28fa8fe26f 100644 --- a/arch/m68k/include/asm/delay.h +++ b/arch/m68k/include/asm/delay.h @@ -1,5 +1,119 @@ -#ifdef __uClinux__ -#include "delay_no.h" +#ifndef _M68K_DELAY_H +#define _M68K_DELAY_H + +#include <asm/param.h> + +/* + * Copyright (C) 1994 Hamish Macdonald + * Copyright (C) 2004 Greg Ungerer <gerg@uclinux.com> + * + * Delay routines, using a pre-computed "loops_per_jiffy" value. + */ + +#if defined(CONFIG_COLDFIRE) +/* + * The ColdFire runs the delay loop at significantly different speeds + * depending upon long word alignment or not.  We'll pad it to + * long word alignment which is the faster version. + * The 0x4a8e is of course a 'tstl %fp' instruction.  This is better + * than using a NOP (0x4e71) instruction because it executes in one + * cycle not three and doesn't allow for an arbitrary delay waiting + * for bus cycles to finish.  Also fp/a6 isn't likely to cause a + * stall waiting for the register to become valid if such is added + * to the coldfire at some stage. + */ +#define	DELAY_ALIGN	".balignw 4, 0x4a8e\n\t"  #else -#include "delay_mm.h" +/* + * No instruction alignment required for other m68k types. + */ +#define	DELAY_ALIGN  #endif + +static inline void __delay(unsigned long loops) +{ +	__asm__ __volatile__ ( +		DELAY_ALIGN +		"1: subql #1,%0\n\t" +		"jcc 1b" +		: "=d" (loops) +		: "0" (loops)); +} + +extern void __bad_udelay(void); + + +#ifdef CONFIG_CPU_HAS_NO_MULDIV64 +/* + * The simpler m68k and ColdFire processors do not have a 32*32->64 + * multiply instruction. So we need to handle them a little differently. + * We use a bit of shifting and a single 32*32->32 multiply to get close. + * This is a macro so that the const version can factor out the first + * multiply and shift. + */ +#define	HZSCALE		(268435456 / (1000000 / HZ)) + +#define	__const_udelay(u) \ +	__delay(((((u) * HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6) + +#else + +static inline void __xdelay(unsigned long xloops) +{ +	unsigned long tmp; + +	__asm__ ("mulul %2,%0:%1" +		: "=d" (xloops), "=d" (tmp) +		: "d" (xloops), "1" (loops_per_jiffy)); +	__delay(xloops * HZ); +} + +/* + * The definition of __const_udelay is specifically made a macro so that + * the const factor (4295 = 2**32 / 1000000) can be optimized out when + * the delay is a const. + */ +#define	__const_udelay(n)	(__xdelay((n) * 4295)) + +#endif + +static inline void __udelay(unsigned long usecs) +{ +	__const_udelay(usecs); +} + +/* + * Use only for very small delays ( < 1 msec).  Should probably use a + * lookup table, really, as the multiplications take much too long with + * short delays.  This is a "reasonable" implementation, though (and the + * first constant multiplications gets optimized away if the delay is + * a constant) + */ +#define udelay(n) (__builtin_constant_p(n) ? \ +	((n) > 20000 ? __bad_udelay() : __const_udelay(n)) : __udelay(n)) + +/* + * nanosecond delay: + * + * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6) is the number of loops + * per microsecond + * + * 1000 / ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6) is the number of + * nanoseconds per loop + * + * So n / ( 1000 / ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6) ) would + * be the number of loops for n nanoseconds + */ + +/* + * The simpler m68k and ColdFire processors do not have a 32*32->64 + * multiply instruction. So we need to handle them a little differently. + * We use a bit of shifting and a single 32*32->32 multiply to get close. + * This is a macro so that the const version can factor out the first + * multiply and shift. + */ +#define	HZSCALE		(268435456 / (1000000 / HZ)) + +#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)); + +#endif /* defined(_M68K_DELAY_H) */ diff --git a/arch/m68k/include/asm/delay_mm.h b/arch/m68k/include/asm/delay_mm.h deleted file mode 100644 index 5ed92851bc6..00000000000 --- a/arch/m68k/include/asm/delay_mm.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _M68K_DELAY_H -#define _M68K_DELAY_H - -#include <asm/param.h> - -/* - * Copyright (C) 1994 Hamish Macdonald - * - * Delay routines, using a pre-computed "loops_per_jiffy" value. - */ - -static inline void __delay(unsigned long loops) -{ -	__asm__ __volatile__ ("1: subql #1,%0; jcc 1b" -		: "=d" (loops) : "0" (loops)); -} - -extern void __bad_udelay(void); - -/* - * Use only for very small delays ( < 1 msec).  Should probably use a - * lookup table, really, as the multiplications take much too long with - * short delays.  This is a "reasonable" implementation, though (and the - * first constant multiplications gets optimized away if the delay is - * a constant) - */ -static inline void __const_udelay(unsigned long xloops) -{ -	unsigned long tmp; - -	__asm__ ("mulul %2,%0:%1" -		: "=d" (xloops), "=d" (tmp) -		: "d" (xloops), "1" (loops_per_jiffy)); -	__delay(xloops * HZ); -} - -static inline void __udelay(unsigned long usecs) -{ -	__const_udelay(usecs * 4295);	/* 2**32 / 1000000 */ -} - -#define udelay(n) (__builtin_constant_p(n) ? \ -	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 4295)) : \ -	__udelay(n)) - -static inline unsigned long muldiv(unsigned long a, unsigned long b, -				   unsigned long c) -{ -	unsigned long tmp; - -	__asm__ ("mulul %2,%0:%1; divul %3,%0:%1" -		: "=d" (tmp), "=d" (a) -		: "d" (b), "d" (c), "1" (a)); -	return a; -} - -#endif /* defined(_M68K_DELAY_H) */ diff --git a/arch/m68k/include/asm/delay_no.h b/arch/m68k/include/asm/delay_no.h deleted file mode 100644 index 55cbd6294ab..00000000000 --- a/arch/m68k/include/asm/delay_no.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _M68KNOMMU_DELAY_H -#define _M68KNOMMU_DELAY_H - -/* - * Copyright (C) 1994 Hamish Macdonald - * Copyright (C) 2004 Greg Ungerer <gerg@snapgear.com> - */ - -#include <asm/param.h> - -static inline void __delay(unsigned long loops) -{ -#if defined(CONFIG_COLDFIRE) -	/* The coldfire runs this loop at significantly different speeds -	 * depending upon long word alignment or not.  We'll pad it to -	 * long word alignment which is the faster version. -	 * The 0x4a8e is of course a 'tstl %fp' instruction.  This is better -	 * than using a NOP (0x4e71) instruction because it executes in one -	 * cycle not three and doesn't allow for an arbitary delay waiting -	 * for bus cycles to finish.  Also fp/a6 isn't likely to cause a -	 * stall waiting for the register to become valid if such is added -	 * to the coldfire at some stage. -	 */ -	__asm__ __volatile__ (	".balignw 4, 0x4a8e\n\t" -				"1: subql #1, %0\n\t" -				"jcc 1b" -		: "=d" (loops) : "0" (loops)); -#else -	__asm__ __volatile__ (	"1: subql #1, %0\n\t" -				"jcc 1b" -		: "=d" (loops) : "0" (loops)); -#endif -} - -/* - *	Ideally we use a 32*32->64 multiply to calculate the number of - *	loop iterations, but the older standard 68k and ColdFire do not - *	have this instruction. So for them we have a clsoe approximation - *	loop using 32*32->32 multiplies only. This calculation based on - *	the ARM version of delay. - * - *	We want to implement: - * - *	loops = (usecs * 0x10c6 * HZ * loops_per_jiffy) / 2^32 - */ - -#define	HZSCALE		(268435456 / (1000000/HZ)) - -extern unsigned long loops_per_jiffy; - -static inline void _udelay(unsigned long usecs) -{ -#if defined(CONFIG_M68328) || defined(CONFIG_M68EZ328) || \ -    defined(CONFIG_M68VZ328) || defined(CONFIG_M68360) || \ -    defined(CONFIG_COLDFIRE) -	__delay((((usecs * HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6); -#else -	unsigned long tmp; - -	usecs *= 4295;		/* 2**32 / 1000000 */ -	__asm__ ("mulul %2,%0:%1" -		: "=d" (usecs), "=d" (tmp) -		: "d" (usecs), "1" (loops_per_jiffy*HZ)); -	__delay(usecs); -#endif -} - -/* - *	Moved the udelay() function into library code, no longer inlined. - *	I had to change the algorithm because we are overflowing now on - *	the faster ColdFire parts. The code is a little bigger, so it makes - *	sense to library it. - */ -extern void udelay(unsigned long usecs); - -#endif /* defined(_M68KNOMMU_DELAY_H) */ diff --git a/arch/m68k/include/asm/device.h b/arch/m68k/include/asm/device.h deleted file mode 100644 index d8f9872b0e2..00000000000 --- a/arch/m68k/include/asm/device.h +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Arch specific extensions to struct device - * - * This file is released under the GPLv2 - */ -#include <asm-generic/device.h> - diff --git a/arch/m68k/include/asm/div64.h b/arch/m68k/include/asm/div64.h index edb66148a71..ef881cfbbca 100644 --- a/arch/m68k/include/asm/div64.h +++ b/arch/m68k/include/asm/div64.h @@ -1,7 +1,9 @@  #ifndef _M68K_DIV64_H  #define _M68K_DIV64_H -#ifdef CONFIG_MMU +#ifdef CONFIG_CPU_HAS_NO_MULDIV64 +#include <asm-generic/div64.h> +#else  #include <linux/types.h> @@ -13,22 +15,21 @@  		unsigned long long n64;				\  	} __n;							\  	unsigned long __rem, __upper;				\ +	unsigned long __base = (base);				\  								\  	__n.n64 = (n);						\  	if ((__upper = __n.n32[0])) {				\  		asm ("divul.l %2,%1:%0"				\ -			: "=d" (__n.n32[0]), "=d" (__upper)	\ -			: "d" (base), "0" (__n.n32[0]));	\ +		     : "=d" (__n.n32[0]), "=d" (__upper)	\ +		     : "d" (__base), "0" (__n.n32[0]));		\  	}							\  	asm ("divu.l %2,%1:%0"					\ -		: "=d" (__n.n32[1]), "=d" (__rem)		\ -		: "d" (base), "1" (__upper), "0" (__n.n32[1]));	\ +	     : "=d" (__n.n32[1]), "=d" (__rem)			\ +	     : "d" (__base), "1" (__upper), "0" (__n.n32[1]));	\  	(n) = __n.n64;						\  	__rem;							\  }) -#else -#include <asm-generic/div64.h> -#endif /* CONFIG_MMU */ +#endif /* CONFIG_CPU_HAS_NO_MULDIV64 */  #endif /* _M68K_DIV64_H */ diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h index 17f7a45948e..05aa53594d4 100644 --- a/arch/m68k/include/asm/dma-mapping.h +++ b/arch/m68k/include/asm/dma-mapping.h @@ -5,7 +5,6 @@  struct scatterlist; -#ifndef CONFIG_MMU_SUN3  static inline int dma_supported(struct device *dev, u64 mask)  {  	return 1; @@ -21,6 +20,22 @@ extern void *dma_alloc_coherent(struct device *, size_t,  extern void dma_free_coherent(struct device *, size_t,  			      void *, dma_addr_t); +static inline void *dma_alloc_attrs(struct device *dev, size_t size, +				    dma_addr_t *dma_handle, gfp_t flag, +				    struct dma_attrs *attrs) +{ +	/* attrs is not supported and ignored */ +	return dma_alloc_coherent(dev, size, dma_handle, flag); +} + +static inline void dma_free_attrs(struct device *dev, size_t size, +				  void *cpu_addr, dma_addr_t dma_handle, +				  struct dma_attrs *attrs) +{ +	/* attrs is not supported and ignored */ +	dma_free_coherent(dev, size, cpu_addr, dma_handle); +} +  static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,  					  dma_addr_t *handle, gfp_t flag)  { @@ -95,8 +110,14 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t handle)  	return 0;  } -#else -#include <asm-generic/dma-mapping-broken.h> -#endif +/* drivers/base/dma-mapping.c */ +extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, +			   void *cpu_addr, dma_addr_t dma_addr, size_t size); +extern int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt, +				  void *cpu_addr, dma_addr_t dma_addr, +				  size_t size); + +#define dma_mmap_coherent(d, v, c, h, s) dma_common_mmap(d, v, c, h, s) +#define dma_get_sgtable(d, t, v, h, s) dma_common_get_sgtable(d, t, v, h, s)  #endif  /* _M68K_DMA_MAPPING_H */ diff --git a/arch/m68k/include/asm/dma.h b/arch/m68k/include/asm/dma.h index 6fbdfe89510..429fe26e320 100644 --- a/arch/m68k/include/asm/dma.h +++ b/arch/m68k/include/asm/dma.h @@ -33,11 +33,13 @@   * Set number of channels of DMA on ColdFire for different implementations.   */  #if defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) || \ -	defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) +	defined(CONFIG_M523x) || defined(CONFIG_M527x) || \ +	defined(CONFIG_M528x) || defined(CONFIG_M525x) +  #define MAX_M68K_DMA_CHANNELS 4  #elif defined(CONFIG_M5272)  #define MAX_M68K_DMA_CHANNELS 1 -#elif defined(CONFIG_M532x) +#elif defined(CONFIG_M53xx)  #define MAX_M68K_DMA_CHANNELS 0  #else  #define MAX_M68K_DMA_CHANNELS 2 @@ -486,6 +488,10 @@ static __inline__ int get_dma_residue(unsigned int dmanr)  extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */  extern void free_dma(unsigned int dmanr);	/* release it again */ +#ifdef CONFIG_PCI +extern int isa_dma_bridge_buggy; +#else  #define isa_dma_bridge_buggy    (0) +#endif  #endif /* _M68K_DMA_H */ diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h index 01c193d9141..b1c26de438b 100644 --- a/arch/m68k/include/asm/elf.h +++ b/arch/m68k/include/asm/elf.h @@ -59,10 +59,10 @@ typedef struct user_m68kfp_struct elf_fpregset_t;     is actually used on ASV.  */  #define ELF_PLAT_INIT(_r, load_addr)	_r->a1 = 0 -#ifndef CONFIG_SUN3 -#define ELF_EXEC_PAGESIZE	4096 -#else +#if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)  #define ELF_EXEC_PAGESIZE	8192 +#else +#define ELF_EXEC_PAGESIZE	4096  #endif  /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical @@ -113,6 +113,4 @@ typedef struct user_m68kfp_struct elf_fpregset_t;  #define ELF_PLATFORM  (NULL) -#define SET_PERSONALITY(ex) set_personality(PER_LINUX) -  #endif diff --git a/arch/m68k/include/asm/emergency-restart.h b/arch/m68k/include/asm/emergency-restart.h deleted file mode 100644 index 108d8c48e42..00000000000 --- a/arch/m68k/include/asm/emergency-restart.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_EMERGENCY_RESTART_H -#define _ASM_EMERGENCY_RESTART_H - -#include <asm-generic/emergency-restart.h> - -#endif /* _ASM_EMERGENCY_RESTART_H */ diff --git a/arch/m68k/include/asm/entry.h b/arch/m68k/include/asm/entry.h index 876eec6f2b5..d7de0f1a895 100644 --- a/arch/m68k/include/asm/entry.h +++ b/arch/m68k/include/asm/entry.h @@ -1,5 +1,260 @@ -#ifdef __uClinux__ -#include "entry_no.h" +#ifndef __M68K_ENTRY_H +#define __M68K_ENTRY_H + +#include <asm/setup.h> +#include <asm/page.h> +#ifdef __ASSEMBLY__ +#include <asm/thread_info.h> +#endif + +/* + * Stack layout in 'ret_from_exception': + * + *	This allows access to the syscall arguments in registers d1-d5 + * + *	 0(sp) - d1 + *	 4(sp) - d2 + *	 8(sp) - d3 + *	 C(sp) - d4 + *	10(sp) - d5 + *	14(sp) - a0 + *	18(sp) - a1 + *	1C(sp) - a2 + *	20(sp) - d0 + *	24(sp) - orig_d0 + *	28(sp) - stack adjustment + *	2C(sp) - [ sr              ] [ format & vector ] + *	2E(sp) - [ pc-hiword       ] [ sr              ] + *	30(sp) - [ pc-loword       ] [ pc-hiword       ] + *	32(sp) - [ format & vector ] [ pc-loword       ] + *		  ^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^ + *			M68K		  COLDFIRE + */ + +/* the following macro is used when enabling interrupts */ +#if defined(MACH_ATARI_ONLY) +	/* block out HSYNC = ipl 2 on the atari */ +#define ALLOWINT	(~0x500) +#else +	/* portable version */ +#define ALLOWINT	(~0x700) +#endif /* machine compilation types */ + +#ifdef __ASSEMBLY__ +/* + * This defines the normal kernel pt-regs layout. + * + * regs a3-a6 and d6-d7 are preserved by C code + * the kernel doesn't mess with usp unless it needs to + */ +#define SWITCH_STACK_SIZE	(6*4+4)	/* includes return address */ + +#ifdef CONFIG_COLDFIRE +#ifdef CONFIG_COLDFIRE_SW_A7 +/* + * This is made a little more tricky on older ColdFires. There is no + * separate supervisor and user stack pointers. Need to artificially + * construct a usp in software... When doing this we need to disable + * interrupts, otherwise bad things will happen. + */ +.globl sw_usp +.globl sw_ksp + +.macro SAVE_ALL_SYS +	move	#0x2700,%sr		/* disable intrs */ +	btst	#5,%sp@(2)		/* from user? */ +	bnes	6f			/* no, skip */ +	movel	%sp,sw_usp		/* save user sp */ +	addql	#8,sw_usp		/* remove exception */ +	movel	sw_ksp,%sp		/* kernel sp */ +	subql	#8,%sp			/* room for exception */ +	clrl	%sp@-			/* stkadj */ +	movel	%d0,%sp@-		/* orig d0 */ +	movel	%d0,%sp@-		/* d0 */ +	lea	%sp@(-32),%sp		/* space for 8 regs */ +	moveml	%d1-%d5/%a0-%a2,%sp@ +	movel	sw_usp,%a0		/* get usp */ +	movel	%a0@-,%sp@(PT_OFF_PC)	/* copy exception program counter */ +	movel	%a0@-,%sp@(PT_OFF_FORMATVEC)/*copy exception format/vector/sr */ +	bra	7f +	6: +	clrl	%sp@-			/* stkadj */ +	movel	%d0,%sp@-		/* orig d0 */ +	movel	%d0,%sp@-		/* d0 */ +	lea	%sp@(-32),%sp		/* space for 8 regs */ +	moveml	%d1-%d5/%a0-%a2,%sp@ +	7: +.endm + +.macro SAVE_ALL_INT +	SAVE_ALL_SYS +	moveq	#-1,%d0			/* not system call entry */ +	movel	%d0,%sp@(PT_OFF_ORIG_D0) +.endm + +.macro RESTORE_USER +	move	#0x2700,%sr		/* disable intrs */ +	movel	sw_usp,%a0		/* get usp */ +	movel	%sp@(PT_OFF_PC),%a0@-	/* copy exception program counter */ +	movel	%sp@(PT_OFF_FORMATVEC),%a0@-/*copy exception format/vector/sr */ +	moveml	%sp@,%d1-%d5/%a0-%a2 +	lea	%sp@(32),%sp		/* space for 8 regs */ +	movel	%sp@+,%d0 +	addql	#4,%sp			/* orig d0 */ +	addl	%sp@+,%sp		/* stkadj */ +	addql	#8,%sp			/* remove exception */ +	movel	%sp,sw_ksp		/* save ksp */ +	subql	#8,sw_usp		/* set exception */ +	movel	sw_usp,%sp		/* restore usp */ +	rte +.endm + +.macro RDUSP +	movel	sw_usp,%a3 +.endm + +.macro WRUSP +	movel	%a3,sw_usp +.endm + +#else /* !CONFIG_COLDFIRE_SW_A7 */ +/* + * Modern ColdFire parts have separate supervisor and user stack + * pointers. Simple load and restore macros for this case. + */ +.macro SAVE_ALL_SYS +	move	#0x2700,%sr		/* disable intrs */ +	clrl	%sp@-			/* stkadj */ +	movel	%d0,%sp@-		/* orig d0 */ +	movel	%d0,%sp@-		/* d0 */ +	lea	%sp@(-32),%sp		/* space for 8 regs */ +	moveml	%d1-%d5/%a0-%a2,%sp@ +.endm + +.macro SAVE_ALL_INT +	move	#0x2700,%sr		/* disable intrs */ +	clrl	%sp@-			/* stkadj */ +	pea	-1:w			/* orig d0 */ +	movel	%d0,%sp@-		/* d0 */ +	lea	%sp@(-32),%sp		/* space for 8 regs */ +	moveml	%d1-%d5/%a0-%a2,%sp@ +.endm + +.macro RESTORE_USER +	moveml	%sp@,%d1-%d5/%a0-%a2 +	lea	%sp@(32),%sp		/* space for 8 regs */ +	movel	%sp@+,%d0 +	addql	#4,%sp			/* orig d0 */ +	addl	%sp@+,%sp		/* stkadj */ +	rte +.endm + +.macro RDUSP +	/*move	%usp,%a3*/ +	.word	0x4e6b +.endm + +.macro WRUSP +	/*move	%a3,%usp*/ +	.word	0x4e63 +.endm + +#endif /* !CONFIG_COLDFIRE_SW_A7 */ + +.macro SAVE_SWITCH_STACK +	lea	%sp@(-24),%sp		/* 6 regs */ +	moveml	%a3-%a6/%d6-%d7,%sp@ +.endm + +.macro RESTORE_SWITCH_STACK +	moveml	%sp@,%a3-%a6/%d6-%d7 +	lea	%sp@(24),%sp		/* 6 regs */ +.endm + +#else /* !CONFIG_COLDFIRE */ + +/* + * All other types of m68k parts (68000, 680x0, CPU32) have the same + * entry and exit code. + */ + +/* + * a -1 in the orig_d0 field signifies + * that the stack frame is NOT for syscall + */ +.macro SAVE_ALL_INT +	clrl	%sp@-			/* stk_adj */ +	pea	-1:w			/* orig d0 */ +	movel	%d0,%sp@-		/* d0 */ +	moveml	%d1-%d5/%a0-%a2,%sp@- +.endm + +.macro SAVE_ALL_SYS +	clrl	%sp@-			/* stk_adj */ +	movel	%d0,%sp@-		/* orig d0 */ +	movel	%d0,%sp@-		/* d0 */ +	moveml	%d1-%d5/%a0-%a2,%sp@- +.endm + +.macro RESTORE_ALL +	moveml	%sp@+,%a0-%a2/%d1-%d5 +	movel	%sp@+,%d0 +	addql	#4,%sp			/* orig d0 */ +	addl	%sp@+,%sp		/* stk adj */ +	rte +.endm + + +.macro SAVE_SWITCH_STACK +	moveml	%a3-%a6/%d6-%d7,%sp@- +.endm + +.macro RESTORE_SWITCH_STACK +	moveml	%sp@+,%a3-%a6/%d6-%d7 +.endm + +#endif /* !CONFIG_COLDFIRE */ + +/* + * Register %a2 is reserved and set to current task on MMU enabled systems. + * Non-MMU systems do not reserve %a2 in this way, and this definition is + * not used for them. + */ +#ifdef CONFIG_MMU + +#define curptr a2 + +#define GET_CURRENT(tmp) get_current tmp +.macro get_current reg=%d0 +	movel	%sp,\reg +	andl	#-THREAD_SIZE,\reg +	movel	\reg,%curptr +	movel	%curptr@,%curptr +.endm +  #else -#include "entry_mm.h" + +#define GET_CURRENT(tmp) + +#endif /* CONFIG_MMU */ + +#else /* C source */ + +#define STR(X) STR1(X) +#define STR1(X) #X + +#define SAVE_ALL_INT				\ +	"clrl	%%sp@-;"    /* stk_adj */	\ +	"pea	-1:w;"	    /* orig d0 = -1 */	\ +	"movel	%%d0,%%sp@-;" /* d0 */		\ +	"moveml	%%d1-%%d5/%%a0-%%a2,%%sp@-" + +#define GET_CURRENT(tmp) \ +	"movel	%%sp,"#tmp"\n\t" \ +	"andw	#-"STR(THREAD_SIZE)","#tmp"\n\t" \ +	"movel	"#tmp",%%a2\n\t" \ +	"movel	%%a2@,%%a2" +  #endif + +#endif /* __M68K_ENTRY_H */ diff --git a/arch/m68k/include/asm/entry_mm.h b/arch/m68k/include/asm/entry_mm.h deleted file mode 100644 index 73b8c8fbed9..00000000000 --- a/arch/m68k/include/asm/entry_mm.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef __M68K_ENTRY_H -#define __M68K_ENTRY_H - -#include <asm/setup.h> -#include <asm/page.h> -#ifdef __ASSEMBLY__ -#include <asm/thread_info.h> -#endif - -/* - * Stack layout in 'ret_from_exception': - * - *	This allows access to the syscall arguments in registers d1-d5 - * - *	 0(sp) - d1 - *	 4(sp) - d2 - *	 8(sp) - d3 - *	 C(sp) - d4 - *	10(sp) - d5 - *	14(sp) - a0 - *	18(sp) - a1 - *	1C(sp) - a2 - *	20(sp) - d0 - *	24(sp) - orig_d0 - *	28(sp) - stack adjustment - *	2C(sp) - sr - *	2E(sp) - pc - *	32(sp) - format & vector - */ - -/* - * 97/05/14 Andreas: Register %a2 is now set to the current task throughout - *		     the whole kernel. - */ - -/* the following macro is used when enabling interrupts */ -#if defined(MACH_ATARI_ONLY) -	/* block out HSYNC on the atari */ -#define ALLOWINT	(~0x400) -#define	MAX_NOINT_IPL	3 -#else -	/* portable version */ -#define ALLOWINT	(~0x700) -#define	MAX_NOINT_IPL	0 -#endif /* machine compilation types */ - -#ifdef __ASSEMBLY__ - -#define curptr a2 - -LFLUSH_I_AND_D = 0x00000808 - -#define SAVE_ALL_INT save_all_int -#define SAVE_ALL_SYS save_all_sys -#define RESTORE_ALL restore_all -/* - * This defines the normal kernel pt-regs layout. - * - * regs a3-a6 and d6-d7 are preserved by C code - * the kernel doesn't mess with usp unless it needs to - */ - -/* - * a -1 in the orig_d0 field signifies - * that the stack frame is NOT for syscall - */ -.macro	save_all_int -	clrl	%sp@-		| stk_adj -	pea	-1:w		| orig d0 -	movel	%d0,%sp@-	| d0 -	moveml	%d1-%d5/%a0-%a1/%curptr,%sp@- -.endm - -.macro	save_all_sys -	clrl	%sp@-		| stk_adj -	movel	%d0,%sp@-	| orig d0 -	movel	%d0,%sp@-	| d0 -	moveml	%d1-%d5/%a0-%a1/%curptr,%sp@- -.endm - -.macro	restore_all -	moveml	%sp@+,%a0-%a1/%curptr/%d1-%d5 -	movel	%sp@+,%d0 -	addql	#4,%sp		| orig d0 -	addl	%sp@+,%sp	| stk adj -	rte -.endm - -#define SWITCH_STACK_SIZE (6*4+4)	/* includes return address */ - -#define SAVE_SWITCH_STACK save_switch_stack -#define RESTORE_SWITCH_STACK restore_switch_stack -#define GET_CURRENT(tmp) get_current tmp - -.macro	save_switch_stack -	moveml	%a3-%a6/%d6-%d7,%sp@- -.endm - -.macro	restore_switch_stack -	moveml	%sp@+,%a3-%a6/%d6-%d7 -.endm - -.macro	get_current reg=%d0 -	movel	%sp,\reg -	andw	#-THREAD_SIZE,\reg -	movel	\reg,%curptr -	movel	%curptr@,%curptr -.endm - -#else /* C source */ - -#define STR(X) STR1(X) -#define STR1(X) #X - -#define SAVE_ALL_INT				\ -	"clrl	%%sp@-;"    /* stk_adj */	\ -	"pea	-1:w;"	    /* orig d0 = -1 */	\ -	"movel	%%d0,%%sp@-;" /* d0 */		\ -	"moveml	%%d1-%%d5/%%a0-%%a2,%%sp@-" -#define GET_CURRENT(tmp) \ -	"movel	%%sp,"#tmp"\n\t" \ -	"andw	#-"STR(THREAD_SIZE)","#tmp"\n\t" \ -	"movel	"#tmp",%%a2\n\t" \ -	"movel	%%a2@,%%a2" - -#endif - -#endif /* __M68K_ENTRY_H */ diff --git a/arch/m68k/include/asm/entry_no.h b/arch/m68k/include/asm/entry_no.h deleted file mode 100644 index 26be277394f..00000000000 --- a/arch/m68k/include/asm/entry_no.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef __M68KNOMMU_ENTRY_H -#define __M68KNOMMU_ENTRY_H - -#include <asm/setup.h> -#include <asm/page.h> - -/* - * Stack layout in 'ret_from_exception': - * - * This allows access to the syscall arguments in registers d1-d5 - * - *	 0(sp) - d1 - *	 4(sp) - d2 - *	 8(sp) - d3 - *	 C(sp) - d4 - *	10(sp) - d5 - *	14(sp) - a0 - *	18(sp) - a1 - *	1C(sp) - a2 - *	20(sp) - d0 - *	24(sp) - orig_d0 - *	28(sp) - stack adjustment - *	2C(sp) - [ sr              ] [ format & vector ] - *	2E(sp) - [ pc-hiword       ] [ sr              ] - *	30(sp) - [ pc-loword       ] [ pc-hiword       ] - *	32(sp) - [ format & vector ] [ pc-loword       ] - *		  ^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^ - *			M68K		  COLDFIRE - */ - -#define ALLOWINT (~0x700) - -#ifdef __ASSEMBLY__ - -#define SWITCH_STACK_SIZE (6*4+4)	/* Includes return address */ - -/* - * This defines the normal kernel pt-regs layout. - * - * regs are a2-a6 and d6-d7 preserved by C code - * the kernel doesn't mess with usp unless it needs to - */ - -#ifdef CONFIG_COLDFIRE -/* - * This is made a little more tricky on the ColdFire. There is no - * separate kernel and user stack pointers. Need to artificially - * construct a usp in software... When doing this we need to disable - * interrupts, otherwise bad things could happen. - */ -.macro SAVE_ALL -	move	#0x2700,%sr		/* disable intrs */ -	btst	#5,%sp@(2)		/* from user? */ -	bnes	6f			/* no, skip */ -	movel	%sp,sw_usp		/* save user sp */ -	addql	#8,sw_usp		/* remove exception */ -	movel	sw_ksp,%sp		/* kernel sp */ -	subql	#8,%sp			/* room for exception */ -	clrl	%sp@-			/* stkadj */ -	movel	%d0,%sp@-		/* orig d0 */ -	movel	%d0,%sp@-		/* d0 */ -	lea	%sp@(-32),%sp		/* space for 8 regs */ -	moveml	%d1-%d5/%a0-%a2,%sp@ -	movel	sw_usp,%a0		/* get usp */ -	movel	%a0@-,%sp@(PT_OFF_PC)	/* copy exception program counter */ -	movel	%a0@-,%sp@(PT_OFF_FORMATVEC)/*copy exception format/vector/sr */ -	bra	7f -	6: -	clrl	%sp@-			/* stkadj */ -	movel	%d0,%sp@-		/* orig d0 */ -	movel	%d0,%sp@-		/* d0 */ -	lea	%sp@(-32),%sp		/* space for 8 regs */ -	moveml	%d1-%d5/%a0-%a2,%sp@ -	7: -.endm - -.macro RESTORE_ALL -	btst	#5,%sp@(PT_SR)		/* going user? */ -	bnes	8f			/* no, skip */ -	move	#0x2700,%sr		/* disable intrs */ -	movel	sw_usp,%a0		/* get usp */ -	movel	%sp@(PT_OFF_PC),%a0@-	/* copy exception program counter */ -	movel	%sp@(PT_OFF_FORMATVEC),%a0@-/*copy exception format/vector/sr */ -	moveml	%sp@,%d1-%d5/%a0-%a2 -	lea	%sp@(32),%sp		/* space for 8 regs */ -	movel	%sp@+,%d0 -	addql	#4,%sp			/* orig d0 */ -	addl	%sp@+,%sp		/* stkadj */ -	addql	#8,%sp			/* remove exception */ -	movel	%sp,sw_ksp		/* save ksp */ -	subql	#8,sw_usp		/* set exception */ -	movel	sw_usp,%sp		/* restore usp */ -	rte -	8: -	moveml	%sp@,%d1-%d5/%a0-%a2 -	lea	%sp@(32),%sp		/* space for 8 regs */ -	movel	%sp@+,%d0 -	addql	#4,%sp			/* orig d0 */ -	addl	%sp@+,%sp		/* stkadj */ -	rte -.endm - -/* - * Quick exception save, use current stack only. - */ -.macro SAVE_LOCAL -	move	#0x2700,%sr		/* disable intrs */ -	clrl	%sp@-			/* stkadj */ -	movel	%d0,%sp@-		/* orig d0 */ -	movel	%d0,%sp@-		/* d0 */ -	lea	%sp@(-32),%sp		/* space for 8 regs */ -	moveml	%d1-%d5/%a0-%a2,%sp@ -.endm - -.macro RESTORE_LOCAL -	moveml	%sp@,%d1-%d5/%a0-%a2 -	lea	%sp@(32),%sp		/* space for 8 regs */ -	movel	%sp@+,%d0 -	addql	#4,%sp			/* orig d0 */ -	addl	%sp@+,%sp		/* stkadj */ -	rte -.endm - -.macro SAVE_SWITCH_STACK -	lea	%sp@(-24),%sp		/* 6 regs */ -	moveml	%a3-%a6/%d6-%d7,%sp@ -.endm - -.macro RESTORE_SWITCH_STACK -	moveml	%sp@,%a3-%a6/%d6-%d7 -	lea	%sp@(24),%sp		/* 6 regs */ -.endm - -/* - * Software copy of the user and kernel stack pointers... Ugh... - * Need these to get around ColdFire not having separate kernel - * and user stack pointers. - */ -.globl sw_usp -.globl sw_ksp - -#else /* !CONFIG_COLDFIRE */ - -/* - * Standard 68k interrupt entry and exit macros. - */ -.macro SAVE_ALL -	clrl	%sp@-			/* stkadj */ -	movel	%d0,%sp@-		/* orig d0 */ -	movel	%d0,%sp@-		/* d0 */ -	moveml	%d1-%d5/%a0-%a2,%sp@- -.endm - -.macro RESTORE_ALL -	moveml	%sp@+,%a0-%a2/%d1-%d5 -	movel	%sp@+,%d0 -	addql	#4,%sp			/* orig d0 */ -	addl	%sp@+,%sp		/* stkadj */ -	rte -.endm - -.macro SAVE_SWITCH_STACK -	moveml	%a3-%a6/%d6-%d7,%sp@- -.endm - -.macro RESTORE_SWITCH_STACK -	moveml	%sp@+,%a3-%a6/%d6-%d7 -.endm - -#endif /* !CONFIG_COLDFIRE */ -#endif /* __ASSEMBLY__ */ -#endif /* __M68KNOMMU_ENTRY_H */ diff --git a/arch/m68k/include/asm/errno.h b/arch/m68k/include/asm/errno.h deleted file mode 100644 index 0d4e188d6ef..00000000000 --- a/arch/m68k/include/asm/errno.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_ERRNO_H -#define _M68K_ERRNO_H - -#include <asm-generic/errno.h> - -#endif /* _M68K_ERRNO_H */ diff --git a/arch/m68k/include/asm/flat.h b/arch/m68k/include/asm/flat.h index a0e29079397..f9454b89a51 100644 --- a/arch/m68k/include/asm/flat.h +++ b/arch/m68k/include/asm/flat.h @@ -11,6 +11,11 @@  #define	flat_get_addr_from_rp(rp, relval, flags, p)	get_unaligned(rp)  #define	flat_put_addr_at_rp(rp, val, relval)	put_unaligned(val,rp)  #define	flat_get_relocate_addr(rel)		(rel) -#define	flat_set_persistent(relval, p)		0 + +static inline int flat_set_persistent(unsigned long relval, +				      unsigned long *persistent) +{ +	return 0; +}  #endif /* __M68KNOMMU_FLAT_H__ */ diff --git a/arch/m68k/include/asm/floppy.h b/arch/m68k/include/asm/floppy.h index 697d50393dd..47365b1ccbe 100644 --- a/arch/m68k/include/asm/floppy.h +++ b/arch/m68k/include/asm/floppy.h @@ -85,7 +85,7 @@ static int fd_request_irq(void)  {  	if(MACH_IS_Q40)  		return request_irq(FLOPPY_IRQ, floppy_hardint, -				   IRQF_DISABLED, "floppy", floppy_hardint); +				   0, "floppy", floppy_hardint);  	else if(MACH_IS_SUN3X)  		return sun3xflop_request_irq();  	return -ENXIO; diff --git a/arch/m68k/include/asm/fpu.h b/arch/m68k/include/asm/fpu.h index ffb6b8cfc6d..526db9da9e4 100644 --- a/arch/m68k/include/asm/fpu.h +++ b/arch/m68k/include/asm/fpu.h @@ -12,6 +12,8 @@  #define FPSTATESIZE (96)  #elif defined(CONFIG_M68KFPU_EMU)  #define FPSTATESIZE (28) +#elif defined(CONFIG_COLDFIRE) && defined(CONFIG_MMU) +#define FPSTATESIZE (16)  #elif defined(CONFIG_M68060)  #define FPSTATESIZE (12)  #else diff --git a/arch/m68k/include/asm/futex.h b/arch/m68k/include/asm/futex.h index 6a332a9f099..bc868af10c9 100644 --- a/arch/m68k/include/asm/futex.h +++ b/arch/m68k/include/asm/futex.h @@ -1,6 +1,94 @@ -#ifndef _ASM_FUTEX_H -#define _ASM_FUTEX_H +#ifndef _ASM_M68K_FUTEX_H +#define _ASM_M68K_FUTEX_H +#ifdef __KERNEL__ +#if !defined(CONFIG_MMU)  #include <asm-generic/futex.h> +#else	/* CONFIG_MMU */ -#endif +#include <linux/futex.h> +#include <linux/uaccess.h> +#include <asm/errno.h> + +static inline int +futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, +			      u32 oldval, u32 newval) +{ +	u32 val; + +	if (unlikely(get_user(val, uaddr) != 0)) +		return -EFAULT; + +	if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) +		return -EFAULT; + +	*uval = val; + +	return 0; +} + +static inline int +futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) +{ +	int op = (encoded_op >> 28) & 7; +	int cmp = (encoded_op >> 24) & 15; +	int oparg = (encoded_op << 8) >> 20; +	int cmparg = (encoded_op << 20) >> 20; +	int oldval, ret; +	u32 tmp; + +	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) +		oparg = 1 << oparg; + +	pagefault_disable();	/* implies preempt_disable() */ + +	ret = -EFAULT; +	if (unlikely(get_user(oldval, uaddr) != 0)) +		goto out_pagefault_enable; + +	ret = 0; +	tmp = oldval; + +	switch (op) { +	case FUTEX_OP_SET: +		tmp = oparg; +		break; +	case FUTEX_OP_ADD: +		tmp += oparg; +		break; +	case FUTEX_OP_OR: +		tmp |= oparg; +		break; +	case FUTEX_OP_ANDN: +		tmp &= ~oparg; +		break; +	case FUTEX_OP_XOR: +		tmp ^= oparg; +		break; +	default: +		ret = -ENOSYS; +	} + +	if (ret == 0 && unlikely(put_user(tmp, uaddr) != 0)) +		ret = -EFAULT; + +out_pagefault_enable: +	pagefault_enable();	/* subsumes preempt_enable() */ + +	if (ret == 0) { +		switch (cmp) { +		case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; +		case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; +		case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; +		case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; +		case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; +		case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; +		default: ret = -ENOSYS; +		} +	} +	return ret; +} + +#endif /* CONFIG_MMU */ +#endif /* __KERNEL__ */ +#endif /* _ASM_M68K_FUTEX_H */ diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h index 1b57adbafad..2f6eec1e34b 100644 --- a/arch/m68k/include/asm/gpio.h +++ b/arch/m68k/include/asm/gpio.h @@ -17,170 +17,9 @@  #define coldfire_gpio_h  #include <linux/io.h> -#include <asm-generic/gpio.h>  #include <asm/coldfire.h>  #include <asm/mcfsim.h> - -/* - * The Freescale Coldfire family is quite varied in how they implement GPIO. - * Some parts have 8 bit ports, some have 16bit and some have 32bit; some have - * only one port, others have multiple ports; some have a single data latch - * for both input and output, others have a separate pin data register to read - * input; some require a read-modify-write access to change an output, others - * have set and clear registers for some of the outputs; Some have all the - * GPIOs in a single control area, others have some GPIOs implemented in - * different modules. - * - * This implementation attempts accomodate the differences while presenting - * a generic interface that will optimize to as few instructions as possible. - */ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ -    defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ -    defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ -    defined(CONFIG_M532x) || defined(CONFIG_M548x) - -/* These parts have GPIO organized by 8 bit ports */ - -#define MCFGPIO_PORTTYPE		u8 -#define MCFGPIO_PORTSIZE		8 -#define mcfgpio_read(port)		__raw_readb(port) -#define mcfgpio_write(data, port)	__raw_writeb(data, port) - -#elif defined(CONFIG_M5307) || defined(CONFIG_M5407) || defined(CONFIG_M5272) - -/* These parts have GPIO organized by 16 bit ports */ - -#define MCFGPIO_PORTTYPE		u16 -#define MCFGPIO_PORTSIZE		16 -#define mcfgpio_read(port)		__raw_readw(port) -#define mcfgpio_write(data, port)	__raw_writew(data, port) - -#elif defined(CONFIG_M5249) - -/* These parts have GPIO organized by 32 bit ports */ - -#define MCFGPIO_PORTTYPE		u32 -#define MCFGPIO_PORTSIZE		32 -#define mcfgpio_read(port)		__raw_readl(port) -#define mcfgpio_write(data, port)	__raw_writel(data, port) - -#endif - -#define mcfgpio_bit(gpio)		(1 << ((gpio) %  MCFGPIO_PORTSIZE)) -#define mcfgpio_port(gpio)		((gpio) / MCFGPIO_PORTSIZE) - -#if defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ -    defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x) -/* - * These parts have an 'Edge' Port module (external interrupt/GPIO) which uses - * read-modify-write to change an output and a GPIO module which has separate - * set/clr registers to directly change outputs with a single write access. - */ -#if defined(CONFIG_M528x) -/* - * The 528x also has GPIOs in other modules (GPT, QADC) which use - * read-modify-write as well as those controlled by the EPORT and GPIO modules. - */ -#define MCFGPIO_SCR_START		40 -#else -#define MCFGPIO_SCR_START		8 -#endif - -#define MCFGPIO_SETR_PORT(gpio)		(MCFGPIO_SETR + \ -					mcfgpio_port(gpio - MCFGPIO_SCR_START)) - -#define MCFGPIO_CLRR_PORT(gpio)		(MCFGPIO_CLRR + \ -					mcfgpio_port(gpio - MCFGPIO_SCR_START)) -#else - -#define MCFGPIO_SCR_START		MCFGPIO_PIN_MAX -/* with MCFGPIO_SCR == MCFGPIO_PIN_MAX, these will be optimized away */ -#define MCFGPIO_SETR_PORT(gpio)		0 -#define MCFGPIO_CLRR_PORT(gpio)		0 - -#endif -/* - * Coldfire specific helper functions - */ - -/* return the port pin data register for a gpio */ -static inline u32 __mcf_gpio_ppdr(unsigned gpio) -{ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ -    defined(CONFIG_M5307) || defined(CONFIG_M5407) -	return MCFSIM_PADAT; -#elif defined(CONFIG_M5272) -	if (gpio < 16) -		return MCFSIM_PADAT; -	else if (gpio < 32) -		return MCFSIM_PBDAT; -	else -		return MCFSIM_PCDAT; -#elif defined(CONFIG_M5249) -	if (gpio < 32) -		return MCFSIM2_GPIOREAD; -	else -		return MCFSIM2_GPIO1READ; -#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ -      defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x) -	if (gpio < 8) -		return MCFEPORT_EPPDR; -#if defined(CONFIG_M528x) -	else if (gpio < 16) -		return MCFGPTA_GPTPORT; -	else if (gpio < 24) -		return MCFGPTB_GPTPORT; -	else if (gpio < 32) -		return MCFQADC_PORTQA; -	else if (gpio < 40) -		return MCFQADC_PORTQB; -#endif -	else -		return MCFGPIO_PPDR + mcfgpio_port(gpio - MCFGPIO_SCR_START); -#else -	return 0; -#endif -} - -/* return the port output data register for a gpio */ -static inline u32 __mcf_gpio_podr(unsigned gpio) -{ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ -    defined(CONFIG_M5307) || defined(CONFIG_M5407) -	return MCFSIM_PADAT; -#elif defined(CONFIG_M5272) -	if (gpio < 16) -		return MCFSIM_PADAT; -	else if (gpio < 32) -		return MCFSIM_PBDAT; -	else -		return MCFSIM_PCDAT; -#elif defined(CONFIG_M5249) -	if (gpio < 32) -		return MCFSIM2_GPIOWRITE; -	else -		return MCFSIM2_GPIO1WRITE; -#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ -      defined(CONFIG_M527x) || defined(CONFIG_M528x) || defined(CONFIG_M532x) -	if (gpio < 8) -		return MCFEPORT_EPDR; -#if defined(CONFIG_M528x) -	else if (gpio < 16) -		return MCFGPTA_GPTPORT; -	else if (gpio < 24) -		return MCFGPTB_GPTPORT; -	else if (gpio < 32) -		return MCFQADC_PORTQA; -	else if (gpio < 40) -		return MCFQADC_PORTQB; -#endif -	else -		return MCFGPIO_PODR + mcfgpio_port(gpio - MCFGPIO_SCR_START); -#else -	return 0; -#endif -} - +#include <asm/mcfgpio.h>  /*   * The Generic GPIO functions   * @@ -191,7 +30,7 @@ static inline u32 __mcf_gpio_podr(unsigned gpio)  static inline int gpio_get_value(unsigned gpio)  {  	if (__builtin_constant_p(gpio) && gpio < MCFGPIO_PIN_MAX) -		return mcfgpio_read(__mcf_gpio_ppdr(gpio)) & mcfgpio_bit(gpio); +		return mcfgpio_read(__mcfgpio_ppdr(gpio)) & mcfgpio_bit(gpio);  	else  		return __gpio_get_value(gpio);  } @@ -204,12 +43,12 @@ static inline void gpio_set_value(unsigned gpio, int value)  			MCFGPIO_PORTTYPE data;  			local_irq_save(flags); -			data = mcfgpio_read(__mcf_gpio_podr(gpio)); +			data = mcfgpio_read(__mcfgpio_podr(gpio));  			if (value)  				data |= mcfgpio_bit(gpio);  			else  				data &= ~mcfgpio_bit(gpio); -			mcfgpio_write(data, __mcf_gpio_podr(gpio)); +			mcfgpio_write(data, __mcfgpio_podr(gpio));  			local_irq_restore(flags);  		} else {  			if (value) @@ -225,7 +64,14 @@ static inline void gpio_set_value(unsigned gpio, int value)  static inline int gpio_to_irq(unsigned gpio)  { -	return (gpio < MCFGPIO_IRQ_MAX) ? gpio + MCFGPIO_IRQ_VECBASE : -EINVAL; +#if defined(MCFGPIO_IRQ_MIN) +	if ((gpio >= MCFGPIO_IRQ_MIN) && (gpio < MCFGPIO_IRQ_MAX)) +#else +	if (gpio < MCFGPIO_IRQ_MAX) +#endif +		return gpio + MCFGPIO_IRQ_VECBASE; +	else +		return __gpio_to_irq(gpio);  }  static inline int irq_to_gpio(unsigned irq) @@ -240,4 +86,25 @@ static inline int gpio_cansleep(unsigned gpio)  	return gpio < MCFGPIO_PIN_MAX ? 0 : __gpio_cansleep(gpio);  } +#ifndef CONFIG_GPIOLIB +static inline int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) +{ +	int err; + +	err = gpio_request(gpio, label); +	if (err) +		return err; + +	if (flags & GPIOF_DIR_IN) +		err = gpio_direction_input(gpio); +	else +		err = gpio_direction_output(gpio, +			(flags & GPIOF_INIT_HIGH) ? 1 : 0); + +	if (err) +		gpio_free(gpio); + +	return err; +} +#endif /* !CONFIG_GPIOLIB */  #endif diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h index 56d0d5db231..6c618529d9b 100644 --- a/arch/m68k/include/asm/hardirq.h +++ b/arch/m68k/include/asm/hardirq.h @@ -1,5 +1,28 @@ -#ifdef __uClinux__ -#include "hardirq_no.h" +#ifndef __M68K_HARDIRQ_H +#define __M68K_HARDIRQ_H + +#include <linux/threads.h> +#include <linux/cache.h> +#include <asm/irq.h> + +#ifdef CONFIG_MMU + +static inline void ack_bad_irq(unsigned int irq) +{ +	pr_crit("unexpected IRQ trap at vector %02x\n", irq); +} + +/* entry.S is sensitive to the offsets of these fields */ +typedef struct { +	unsigned int __softirq_pending; +} ____cacheline_aligned irq_cpustat_t; + +#include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */ +  #else -#include "hardirq_mm.h" + +#include <asm-generic/hardirq.h> + +#endif /* !CONFIG_MMU */ +  #endif diff --git a/arch/m68k/include/asm/hardirq_mm.h b/arch/m68k/include/asm/hardirq_mm.h deleted file mode 100644 index 394ee946015..00000000000 --- a/arch/m68k/include/asm/hardirq_mm.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __M68K_HARDIRQ_H -#define __M68K_HARDIRQ_H - -#include <linux/threads.h> -#include <linux/cache.h> - -/* entry.S is sensitive to the offsets of these fields */ -typedef struct { -	unsigned int __softirq_pending; -} ____cacheline_aligned irq_cpustat_t; - -#include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */ - -#define HARDIRQ_BITS	8 - -#endif diff --git a/arch/m68k/include/asm/hardirq_no.h b/arch/m68k/include/asm/hardirq_no.h deleted file mode 100644 index b44b14be87d..00000000000 --- a/arch/m68k/include/asm/hardirq_no.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef __M68K_HARDIRQ_H -#define __M68K_HARDIRQ_H - -#include <asm/irq.h> - -#define HARDIRQ_BITS	8 - -/* - * The hardirq mask has to be large enough to have - * space for potentially all IRQ sources in the system - * nesting on a single CPU: - */ -#if (1 << HARDIRQ_BITS) < NR_IRQS -# error HARDIRQ_BITS is too low! -#endif - -#include <asm-generic/hardirq.h> - -#endif /* __M68K_HARDIRQ_H */ diff --git a/arch/m68k/include/asm/hp300hw.h b/arch/m68k/include/asm/hp300hw.h index d998ea67c19..64f5271dd7b 100644 --- a/arch/m68k/include/asm/hp300hw.h +++ b/arch/m68k/include/asm/hp300hw.h @@ -1,25 +1,9 @@  #ifndef _M68K_HP300HW_H  #define _M68K_HP300HW_H -extern unsigned long hp300_model; +#include <asm/bootinfo-hp300.h> -/* This information was taken from NetBSD */ -#define	HP_320		(0)	/* 16MHz 68020+HP MMU+16K external cache */ -#define	HP_330		(1)	/* 16MHz 68020+68851 MMU */ -#define	HP_340		(2)	/* 16MHz 68030 */ -#define	HP_345		(3)	/* 50MHz 68030+32K external cache */ -#define	HP_350		(4)	/* 25MHz 68020+HP MMU+32K external cache */ -#define	HP_360		(5)	/* 25MHz 68030 */ -#define	HP_370		(6)	/* 33MHz 68030+64K external cache */ -#define	HP_375		(7)	/* 50MHz 68030+32K external cache */ -#define	HP_380		(8)	/* 25MHz 68040 */ -#define	HP_385		(9)	/* 33MHz 68040 */ -#define	HP_400		(10)	/* 50MHz 68030+32K external cache */ -#define	HP_425T		(11)	/* 25MHz 68040 - model 425t */ -#define	HP_425S		(12)	/* 25MHz 68040 - model 425s */ -#define HP_425E		(13)	/* 25MHz 68040 - model 425e */ -#define HP_433T		(14)	/* 33MHz 68040 - model 433t */ -#define HP_433S		(15)	/* 33MHz 68040 - model 433s */ +extern unsigned long hp300_model;  #endif /* _M68K_HP300HW_H */ diff --git a/arch/m68k/include/asm/hw_irq.h b/arch/m68k/include/asm/hw_irq.h deleted file mode 100644 index eacef0951fb..00000000000 --- a/arch/m68k/include/asm/hw_irq.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_M68K_HW_IRQ_H -#define __ASM_M68K_HW_IRQ_H - -/* Dummy include. */ - -#endif diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h index c7210ba184e..c70cc915500 100644 --- a/arch/m68k/include/asm/io.h +++ b/arch/m68k/include/asm/io.h @@ -1,5 +1,5 @@  #ifdef __uClinux__ -#include "io_no.h" +#include <asm/io_no.h>  #else -#include "io_mm.h" +#include <asm/io_mm.h>  #endif diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h index 0fb3468000e..ffdf54f44bc 100644 --- a/arch/m68k/include/asm/io_mm.h +++ b/arch/m68k/include/asm/io_mm.h @@ -63,16 +63,80 @@  #endif  #endif /* AMIGA_PCMCIA */ +#ifdef CONFIG_ATARI_ROM_ISA +#define enec_isa_read_base  0xfffa0000 +#define enec_isa_write_base 0xfffb0000 -#ifdef CONFIG_ISA +#define ENEC_ISA_IO_B(ioaddr)	(enec_isa_read_base+((((unsigned long)(ioaddr))&0x7F)<<9)) +#define ENEC_ISA_IO_W(ioaddr)	(enec_isa_read_base+((((unsigned long)(ioaddr))&0x7F)<<9)) +#define ENEC_ISA_MEM_B(madr)	(enec_isa_read_base+((((unsigned long)(madr))&0x7F)<<9)) +#define ENEC_ISA_MEM_W(madr)	(enec_isa_read_base+((((unsigned long)(madr))&0x7F)<<9)) + +#ifndef MULTI_ISA +#define MULTI_ISA 0 +#else +#undef MULTI_ISA +#define MULTI_ISA 1 +#endif +#endif /* ATARI_ROM_ISA */ + + +#if defined(CONFIG_PCI) && defined(CONFIG_COLDFIRE) + +#define HAVE_ARCH_PIO_SIZE +#define PIO_OFFSET	0 +#define PIO_MASK	0xffff +#define PIO_RESERVED	0x10000 + +u8 mcf_pci_inb(u32 addr); +u16 mcf_pci_inw(u32 addr); +u32 mcf_pci_inl(u32 addr); +void mcf_pci_insb(u32 addr, u8 *buf, u32 len); +void mcf_pci_insw(u32 addr, u16 *buf, u32 len); +void mcf_pci_insl(u32 addr, u32 *buf, u32 len); + +void mcf_pci_outb(u8 v, u32 addr); +void mcf_pci_outw(u16 v, u32 addr); +void mcf_pci_outl(u32 v, u32 addr); +void mcf_pci_outsb(u32 addr, const u8 *buf, u32 len); +void mcf_pci_outsw(u32 addr, const u16 *buf, u32 len); +void mcf_pci_outsl(u32 addr, const u32 *buf, u32 len); + +#define	inb	mcf_pci_inb +#define	inb_p	mcf_pci_inb +#define	inw	mcf_pci_inw +#define	inw_p	mcf_pci_inw +#define	inl	mcf_pci_inl +#define	inl_p	mcf_pci_inl +#define	insb	mcf_pci_insb +#define	insw	mcf_pci_insw +#define	insl	mcf_pci_insl + +#define	outb	mcf_pci_outb +#define	outb_p	mcf_pci_outb +#define	outw	mcf_pci_outw +#define	outw_p	mcf_pci_outw +#define	outl	mcf_pci_outl +#define	outl_p	mcf_pci_outl +#define	outsb	mcf_pci_outsb +#define	outsw	mcf_pci_outsw +#define	outsl	mcf_pci_outsl + +#define readb(addr)	in_8(addr) +#define writeb(v, addr)	out_8((addr), (v)) +#define readw(addr)	in_le16(addr) +#define writew(v, addr)	out_le16((addr), (v)) + +#elif defined(CONFIG_ISA) || defined(CONFIG_ATARI_ROM_ISA)  #if MULTI_ISA == 0  #undef MULTI_ISA  #endif -#define ISA_TYPE_Q40 (1) -#define ISA_TYPE_AG  (2) +#define ISA_TYPE_Q40  (1) +#define ISA_TYPE_AG   (2) +#define ISA_TYPE_ENEC (3)  #if defined(CONFIG_Q40) && !defined(MULTI_ISA)  #define ISA_TYPE ISA_TYPE_Q40 @@ -82,6 +146,10 @@  #define ISA_TYPE ISA_TYPE_AG  #define ISA_SEX  1  #endif +#if defined(CONFIG_ATARI_ROM_ISA) && !defined(MULTI_ISA) +#define ISA_TYPE ISA_TYPE_ENEC +#define ISA_SEX  0 +#endif  #ifdef MULTI_ISA  extern int isa_type; @@ -106,6 +174,9 @@ static inline u8 __iomem *isa_itb(unsigned long addr)  #ifdef CONFIG_AMIGA_PCMCIA      case ISA_TYPE_AG: return (u8 __iomem *)AG_ISA_IO_B(addr);  #endif +#ifdef CONFIG_ATARI_ROM_ISA +    case ISA_TYPE_ENEC: return (u8 __iomem *)ENEC_ISA_IO_B(addr); +#endif      default: return NULL; /* avoid warnings, just in case */      }  } @@ -119,6 +190,9 @@ static inline u16 __iomem *isa_itw(unsigned long addr)  #ifdef CONFIG_AMIGA_PCMCIA      case ISA_TYPE_AG: return (u16 __iomem *)AG_ISA_IO_W(addr);  #endif +#ifdef CONFIG_ATARI_ROM_ISA +    case ISA_TYPE_ENEC: return (u16 __iomem *)ENEC_ISA_IO_W(addr); +#endif      default: return NULL; /* avoid warnings, just in case */      }  } @@ -142,6 +216,9 @@ static inline u8 __iomem *isa_mtb(unsigned long addr)  #ifdef CONFIG_AMIGA_PCMCIA      case ISA_TYPE_AG: return (u8 __iomem *)addr;  #endif +#ifdef CONFIG_ATARI_ROM_ISA +    case ISA_TYPE_ENEC: return (u8 __iomem *)ENEC_ISA_MEM_B(addr); +#endif      default: return NULL; /* avoid warnings, just in case */      }  } @@ -155,6 +232,9 @@ static inline u16 __iomem *isa_mtw(unsigned long addr)  #ifdef CONFIG_AMIGA_PCMCIA      case ISA_TYPE_AG: return (u16 __iomem *)addr;  #endif +#ifdef CONFIG_ATARI_ROM_ISA +    case ISA_TYPE_ENEC: return (u16 __iomem *)ENEC_ISA_MEM_W(addr); +#endif      default: return NULL; /* avoid warnings, just in case */      }  } @@ -176,6 +256,36 @@ static inline u16 __iomem *isa_mtw(unsigned long addr)  	(ISA_SEX ? out_be16(isa_mtw((unsigned long)(p)),(val))	\  		 : out_le16(isa_mtw((unsigned long)(p)),(val))) +#ifdef CONFIG_ATARI_ROM_ISA +#define isa_rom_inb(port)      rom_in_8(isa_itb(port)) +#define isa_rom_inw(port)	\ +	(ISA_SEX ? rom_in_be16(isa_itw(port))	\ +		 : rom_in_le16(isa_itw(port))) + +#define isa_rom_outb(val, port) rom_out_8(isa_itb(port), (val)) +#define isa_rom_outw(val, port)	\ +	(ISA_SEX ? rom_out_be16(isa_itw(port), (val))	\ +		 : rom_out_le16(isa_itw(port), (val))) + +#define isa_rom_readb(p)       rom_in_8(isa_mtb((unsigned long)(p))) +#define isa_rom_readw(p)       \ +	(ISA_SEX ? rom_in_be16(isa_mtw((unsigned long)(p)))	\ +		 : rom_in_le16(isa_mtw((unsigned long)(p)))) +#define isa_rom_readw_swap(p)       \ +	(ISA_SEX ? rom_in_le16(isa_mtw((unsigned long)(p)))	\ +		 : rom_in_be16(isa_mtw((unsigned long)(p)))) +#define isa_rom_readw_raw(p)   rom_in_be16(isa_mtw((unsigned long)(p))) + +#define isa_rom_writeb(val, p)  rom_out_8(isa_mtb((unsigned long)(p)), (val)) +#define isa_rom_writew(val, p)  \ +	(ISA_SEX ? rom_out_be16(isa_mtw((unsigned long)(p)), (val))	\ +		 : rom_out_le16(isa_mtw((unsigned long)(p)), (val))) +#define isa_rom_writew_swap(val, p)  \ +	(ISA_SEX ? rom_out_le16(isa_mtw((unsigned long)(p)), (val))	\ +		 : rom_out_be16(isa_mtw((unsigned long)(p)), (val))) +#define isa_rom_writew_raw(val, p)  rom_out_be16(isa_mtw((unsigned long)(p)), (val)) +#endif /* CONFIG_ATARI_ROM_ISA */ +  static inline void isa_delay(void)  {    switch(ISA_TYPE) @@ -186,6 +296,9 @@ static inline void isa_delay(void)  #ifdef CONFIG_AMIGA_PCMCIA      case ISA_TYPE_AG: break;  #endif +#ifdef CONFIG_ATARI_ROM_ISA +    case ISA_TYPE_ENEC: break; +#endif      default: break; /* avoid warnings */      }  } @@ -217,6 +330,29 @@ static inline void isa_delay(void)                    raw_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr)<<1)) +#ifdef CONFIG_ATARI_ROM_ISA +#define isa_rom_inb_p(p)	({ u8 _v = isa_rom_inb(p); isa_delay(); _v; }) +#define isa_rom_inw_p(p)	({ u16 _v = isa_rom_inw(p); isa_delay(); _v; }) +#define isa_rom_outb_p(v, p)	({ isa_rom_outb((v), (p)); isa_delay(); }) +#define isa_rom_outw_p(v, p)	({ isa_rom_outw((v), (p)); isa_delay(); }) + +#define isa_rom_insb(port, buf, nr) raw_rom_insb(isa_itb(port), (u8 *)(buf), (nr)) + +#define isa_rom_insw(port, buf, nr)     \ +       (ISA_SEX ? raw_rom_insw(isa_itw(port), (u16 *)(buf), (nr)) :    \ +		  raw_rom_insw_swapw(isa_itw(port), (u16 *)(buf), (nr))) + +#define isa_rom_outsb(port, buf, nr) raw_rom_outsb(isa_itb(port), (u8 *)(buf), (nr)) + +#define isa_rom_outsw(port, buf, nr)    \ +       (ISA_SEX ? raw_rom_outsw(isa_itw(port), (u16 *)(buf), (nr)) :  \ +		  raw_rom_outsw_swapw(isa_itw(port), (u16 *)(buf), (nr))) +#endif /* CONFIG_ATARI_ROM_ISA */ + +#endif  /* CONFIG_ISA || CONFIG_ATARI_ROM_ISA */ + + +#if defined(CONFIG_ISA) && !defined(CONFIG_ATARI_ROM_ISA)  #define inb     isa_inb  #define inb_p   isa_inb_p  #define outb    isa_outb @@ -239,9 +375,43 @@ static inline void isa_delay(void)  #define readw   isa_readw  #define writeb  isa_writeb  #define writew  isa_writew +#endif  /* CONFIG_ISA && !CONFIG_ATARI_ROM_ISA */ -#else  /* CONFIG_ISA */ - +#ifdef CONFIG_ATARI_ROM_ISA +/* + * kernel with both ROM port ISA and IDE compiled in, those have + * conflicting defs for in/out. Simply consider port < 1024 + * ROM port ISA and everything else regular ISA for IDE. read,write defined + * below. + */ +#define inb(port)	((port) < 1024 ? isa_rom_inb(port) : in_8(port)) +#define inb_p(port)	((port) < 1024 ? isa_rom_inb_p(port) : in_8(port)) +#define inw(port)	((port) < 1024 ? isa_rom_inw(port) : in_le16(port)) +#define inw_p(port)	((port) < 1024 ? isa_rom_inw_p(port) : in_le16(port)) +#define inl		isa_inl +#define inl_p		isa_inl_p + +#define outb(val, port)	((port) < 1024 ? isa_rom_outb((val), (port)) : out_8((port), (val))) +#define outb_p(val, port) ((port) < 1024 ? isa_rom_outb_p((val), (port)) : out_8((port), (val))) +#define outw(val, port)	((port) < 1024 ? isa_rom_outw((val), (port)) : out_le16((port), (val))) +#define outw_p(val, port) ((port) < 1024 ? isa_rom_outw_p((val), (port)) : out_le16((port), (val))) +#define outl		isa_outl +#define outl_p		isa_outl_p + +#define insb(port, buf, nr)	((port) < 1024 ? isa_rom_insb((port), (buf), (nr)) : isa_insb((port), (buf), (nr))) +#define insw(port, buf, nr)	((port) < 1024 ? isa_rom_insw((port), (buf), (nr)) : isa_insw((port), (buf), (nr))) +#define insl			isa_insl +#define outsb(port, buf, nr)	((port) < 1024 ? isa_rom_outsb((port), (buf), (nr)) : isa_outsb((port), (buf), (nr))) +#define outsw(port, buf, nr)	((port) < 1024 ? isa_rom_outsw((port), (buf), (nr)) : isa_outsw((port), (buf), (nr))) +#define outsl			isa_outsl + +#define readb(addr)		in_8(addr) +#define writeb(val, addr)	out_8((addr), (val)) +#define readw(addr)		in_le16(addr) +#define writew(val, addr)	out_le16((addr), (val)) +#endif /* CONFIG_ATARI_ROM_ISA */ + +#if !defined(CONFIG_ISA) && !defined(CONFIG_ATARI_ROM_ISA)  /*   * We need to define dummy functions for GENERIC_IOMAP support.   */ @@ -273,11 +443,18 @@ static inline void isa_delay(void)  #define readw(addr)      in_le16(addr)  #define writew(val,addr) out_le16((addr),(val)) -#endif /* CONFIG_ISA */ +#endif /* !CONFIG_ISA && !CONFIG_ATARI_ROM_ISA */  #define readl(addr)      in_le32(addr)  #define writel(val,addr) out_le32((addr),(val)) +#define readsb(port, buf, nr)     raw_insb((port), (u8 *)(buf), (nr)) +#define readsw(port, buf, nr)     raw_insw((port), (u16 *)(buf), (nr)) +#define readsl(port, buf, nr)     raw_insl((port), (u32 *)(buf), (nr)) +#define writesb(port, buf, nr)    raw_outsb((port), (u8 *)(buf), (nr)) +#define writesw(port, buf, nr)    raw_outsw((port), (u16 *)(buf), (nr)) +#define writesl(port, buf, nr)    raw_outsl((port), (u32 *)(buf), (nr)) +  #define mmiowb()  static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) @@ -333,4 +510,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int   */  #define xlate_dev_kmem_ptr(p)	p +#define ioport_map(port, nr)	((void __iomem *)(port)) +  #endif /* _IO_H */ diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h index 6e2413e518c..52f7e849917 100644 --- a/arch/m68k/include/asm/io_no.h +++ b/arch/m68k/include/asm/io_no.h @@ -4,6 +4,7 @@  #ifdef __KERNEL__  #include <asm/virtconvert.h> +#include <asm-generic/iomap.h>  /*   * These are for ISA/PCI shared memory _only_ and should never be used @@ -54,7 +55,7 @@ static inline unsigned int _swapl(volatile unsigned long v)  #define __raw_writew writew  #define __raw_writel writel -static inline void io_outsb(unsigned int addr, void *buf, int len) +static inline void io_outsb(unsigned int addr, const void *buf, int len)  {  	volatile unsigned char *ap = (volatile unsigned char *) addr;  	unsigned char *bp = (unsigned char *) buf; @@ -62,7 +63,7 @@ static inline void io_outsb(unsigned int addr, void *buf, int len)  		*ap = *bp++;  } -static inline void io_outsw(unsigned int addr, void *buf, int len) +static inline void io_outsw(unsigned int addr, const void *buf, int len)  {  	volatile unsigned short *ap = (volatile unsigned short *) addr;  	unsigned short *bp = (unsigned short *) buf; @@ -70,7 +71,7 @@ static inline void io_outsw(unsigned int addr, void *buf, int len)  		*ap = _swapw(*bp++);  } -static inline void io_outsl(unsigned int addr, void *buf, int len) +static inline void io_outsl(unsigned int addr, const void *buf, int len)  {  	volatile unsigned int *ap = (volatile unsigned int *) addr;  	unsigned int *bp = (unsigned int *) buf; @@ -144,9 +145,10 @@ static inline void io_insl(unsigned int addr, void *buf, int len)  #define IOMAP_NOCACHE_NONSER		2  #define IOMAP_WRITETHROUGH		3 -extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); -extern void __iounmap(void *addr, unsigned long size); - +static inline void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag) +{ +	return (void *) physaddr; +}  static inline void *ioremap(unsigned long physaddr, unsigned long size)  {  	return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); @@ -164,7 +166,7 @@ static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size  	return __ioremap(physaddr, size, IOMAP_FULL_CACHING);  } -extern void iounmap(void *addr); +#define	iounmap(addr)	do { } while(0)  /*   * Convert a physical pointer to a virtual kernel pointer for /dev/mem diff --git a/arch/m68k/include/asm/ioctl.h b/arch/m68k/include/asm/ioctl.h deleted file mode 100644 index b279fe06dfe..00000000000 --- a/arch/m68k/include/asm/ioctl.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/ioctl.h> diff --git a/arch/m68k/include/asm/ipcbuf.h b/arch/m68k/include/asm/ipcbuf.h deleted file mode 100644 index a623ea3f095..00000000000 --- a/arch/m68k/include/asm/ipcbuf.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __m68k_IPCBUF_H__ -#define __m68k_IPCBUF_H__ - -/* - * The user_ipc_perm structure for m68k architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ -	__kernel_key_t		key; -	__kernel_uid32_t	uid; -	__kernel_gid32_t	gid; -	__kernel_uid32_t	cuid; -	__kernel_gid32_t	cgid; -	__kernel_mode_t		mode; -	unsigned short		__pad1; -	unsigned short		seq; -	unsigned short		__pad2; -	unsigned long		__unused1; -	unsigned long		__unused2; -}; - -#endif /* __m68k_IPCBUF_H__ */ diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h index 907eff1edd2..81ca118d58a 100644 --- a/arch/m68k/include/asm/irq.h +++ b/arch/m68k/include/asm/irq.h @@ -6,12 +6,16 @@   * different m68k hosts compiled into the kernel.   * Currently the Atari has 72 and the Amiga 24, but if both are   * supported in the kernel it is better to make room for 72. + * With EtherNAT add-on card on Atari, the highest interrupt + * number is 140 so NR_IRQS needs to be 141.   */  #if defined(CONFIG_COLDFIRE)  #define NR_IRQS 256  #elif defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X)  #define NR_IRQS 200 -#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) +#elif defined(CONFIG_ATARI) +#define NR_IRQS 141 +#elif defined(CONFIG_MAC)  #define NR_IRQS 72  #elif defined(CONFIG_Q40)  #define NR_IRQS	43 @@ -25,21 +29,8 @@  #define NR_IRQS	0  #endif -#ifdef CONFIG_MMU - -#include <linux/linkage.h> -#include <linux/hardirq.h> -#include <linux/irqreturn.h> -#include <linux/spinlock_types.h> - -/* - * The hardirq mask has to be large enough to have - * space for potentially all IRQ sources in the system - * nesting on a single CPU: - */ -#if (1 << HARDIRQ_BITS) < NR_IRQS -# error HARDIRQ_BITS is too low! -#endif +#if defined(CONFIG_M68020) || defined(CONFIG_M68030) || \ +    defined(CONFIG_M68040) || defined(CONFIG_M68060)  /*   * Interrupt source definitions @@ -63,72 +54,27 @@  #define IRQ_USER	8 -extern unsigned int irq_canonicalize(unsigned int irq); - -struct pt_regs; +struct irq_data; +struct irq_chip; +struct irq_desc; +extern unsigned int m68k_irq_startup(struct irq_data *data); +extern unsigned int m68k_irq_startup_irq(unsigned int irq); +extern void m68k_irq_shutdown(struct irq_data *data); +extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, +						      struct pt_regs *)); +extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt); +extern void m68k_setup_irq_controller(struct irq_chip *, +				      void (*handle)(unsigned int irq, +						     struct irq_desc *desc), +				      unsigned int irq, unsigned int cnt); -/* - * various flags for request_irq() - the Amiga now uses the standard - * mechanism like all other architectures - IRQF_DISABLED and - * IRQF_SHARED are your friends. - */ -#ifndef MACH_AMIGA_ONLY -#define IRQ_FLG_LOCK	(0x0001)	/* handler is not replaceable	*/ -#define IRQ_FLG_REPLACE	(0x0002)	/* replace existing handler	*/ -#define IRQ_FLG_FAST	(0x0004) -#define IRQ_FLG_SLOW	(0x0008) -#define IRQ_FLG_STD	(0x8000)	/* internally used		*/ -#endif - -/* - * This structure is used to chain together the ISRs for a particular - * interrupt source (if it supports chaining). - */ -typedef struct irq_node { -	irqreturn_t	(*handler)(int, void *); -	void		*dev_id; -	struct irq_node *next; -	unsigned long	flags; -	const char	*devname; -} irq_node_t; - -/* - * This structure has only 4 elements for speed reasons - */ -struct irq_handler { -	int		(*handler)(int, void *); -	unsigned long	flags; -	void		*dev_id; -	const char	*devname; -}; - -struct irq_controller { -	const char *name; -	spinlock_t lock; -	int (*startup)(unsigned int irq); -	void (*shutdown)(unsigned int irq); -	void (*enable)(unsigned int irq); -	void (*disable)(unsigned int irq); -}; - -extern int m68k_irq_startup(unsigned int); -extern void m68k_irq_shutdown(unsigned int); - -/* - * This function returns a new irq_node_t - */ -extern irq_node_t *new_irq_node(void); - -extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); -extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, -				      void (*handler)(unsigned int, struct pt_regs *)); -extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int); - -asmlinkage void m68k_handle_int(unsigned int); -asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *); +extern unsigned int irq_canonicalize(unsigned int irq);  #else  #define irq_canonicalize(irq)  (irq) -#endif /* CONFIG_MMU */ +#endif /* !(CONFIG_M68020 || CONFIG_M68030 || CONFIG_M68040 || CONFIG_M68060) */ + +asmlinkage void do_IRQ(int irq, struct pt_regs *regs); +extern atomic_t irq_err_count;  #endif /* _M68K_IRQ_H_ */ diff --git a/arch/m68k/include/asm/irq_regs.h b/arch/m68k/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b7027..00000000000 --- a/arch/m68k/include/asm/irq_regs.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/irq_regs.h> diff --git a/arch/m68k/include/asm/irqflags.h b/arch/m68k/include/asm/irqflags.h index 7ef4115b8c4..a823cd73dc0 100644 --- a/arch/m68k/include/asm/irqflags.h +++ b/arch/m68k/include/asm/irqflags.h @@ -3,7 +3,7 @@  #include <linux/types.h>  #ifdef CONFIG_MMU -#include <linux/hardirq.h> +#include <linux/preempt_mask.h>  #endif  #include <linux/preempt.h>  #include <asm/thread_info.h> @@ -67,6 +67,10 @@ static inline void arch_local_irq_restore(unsigned long flags)  static inline bool arch_irqs_disabled_flags(unsigned long flags)  { +	if (MACH_IS_ATARI) { +		/* Ignore HSYNC = ipl 2 on Atari */ +		return (flags & ~(ALLOWINT | 0x200)) != 0; +	}  	return (flags & ~ALLOWINT) != 0;  } diff --git a/arch/m68k/include/asm/kdebug.h b/arch/m68k/include/asm/kdebug.h deleted file mode 100644 index 6ece1b03766..00000000000 --- a/arch/m68k/include/asm/kdebug.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/kdebug.h> diff --git a/arch/m68k/include/asm/kexec.h b/arch/m68k/include/asm/kexec.h new file mode 100644 index 00000000000..3df97abac14 --- /dev/null +++ b/arch/m68k/include/asm/kexec.h @@ -0,0 +1,29 @@ +#ifndef _ASM_M68K_KEXEC_H +#define _ASM_M68K_KEXEC_H + +#ifdef CONFIG_KEXEC + +/* Maximum physical address we can use pages from */ +#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) +/* Maximum address we can reach in physical address mode */ +#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) +/* Maximum address we can use for the control code buffer */ +#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL) + +#define KEXEC_CONTROL_PAGE_SIZE	4096 + +#define KEXEC_ARCH KEXEC_ARCH_68K + +#ifndef __ASSEMBLY__ + +static inline void crash_setup_regs(struct pt_regs *newregs, +				    struct pt_regs *oldregs) +{ +	/* Dummy implementation for now */ +} + +#endif /* __ASSEMBLY__ */ + +#endif /* CONFIG_KEXEC */ + +#endif /* _ASM_M68K_KEXEC_H */ diff --git a/arch/m68k/include/asm/kmap_types.h b/arch/m68k/include/asm/kmap_types.h deleted file mode 100644 index 3413cc1390e..00000000000 --- a/arch/m68k/include/asm/kmap_types.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_M68K_KMAP_TYPES_H -#define __ASM_M68K_KMAP_TYPES_H - -#include <asm-generic/kmap_types.h> - -#endif	/* __ASM_M68K_KMAP_TYPES_H */ diff --git a/arch/m68k/include/asm/local.h b/arch/m68k/include/asm/local.h deleted file mode 100644 index 6c259263e1f..00000000000 --- a/arch/m68k/include/asm/local.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_M68K_LOCAL_H -#define _ASM_M68K_LOCAL_H - -#include <asm-generic/local.h> - -#endif /* _ASM_M68K_LOCAL_H */ diff --git a/arch/m68k/include/asm/local64.h b/arch/m68k/include/asm/local64.h deleted file mode 100644 index 36c93b5cc23..00000000000 --- a/arch/m68k/include/asm/local64.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/local64.h> diff --git a/arch/m68k/include/asm/m5206sim.h b/arch/m68k/include/asm/m5206sim.h index 9c384e294af..4cf864f5ea7 100644 --- a/arch/m68k/include/asm/m5206sim.h +++ b/arch/m68k/include/asm/m5206sim.h @@ -12,90 +12,111 @@  #define	m5206sim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m5206)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		MCF_CLK + +#include <asm/m52xxacr.h>  /*   *	Define the 5206 SIM register set addresses.   */ -#define	MCFSIM_SIMR		0x03		/* SIM Config reg (r/w) */ -#define	MCFSIM_ICR1		0x14		/* Intr Ctrl reg 1 (r/w) */ -#define	MCFSIM_ICR2		0x15		/* Intr Ctrl reg 2 (r/w) */ -#define	MCFSIM_ICR3		0x16		/* Intr Ctrl reg 3 (r/w) */ -#define	MCFSIM_ICR4		0x17		/* Intr Ctrl reg 4 (r/w) */ -#define	MCFSIM_ICR5		0x18		/* Intr Ctrl reg 5 (r/w) */ -#define	MCFSIM_ICR6		0x19		/* Intr Ctrl reg 6 (r/w) */ -#define	MCFSIM_ICR7		0x1a		/* Intr Ctrl reg 7 (r/w) */ -#define	MCFSIM_ICR8		0x1b		/* Intr Ctrl reg 8 (r/w) */ -#define	MCFSIM_ICR9		0x1c		/* Intr Ctrl reg 9 (r/w) */ -#define	MCFSIM_ICR10		0x1d		/* Intr Ctrl reg 10 (r/w) */ -#define	MCFSIM_ICR11		0x1e		/* Intr Ctrl reg 11 (r/w) */ -#define	MCFSIM_ICR12		0x1f		/* Intr Ctrl reg 12 (r/w) */ -#define	MCFSIM_ICR13		0x20		/* Intr Ctrl reg 13 (r/w) */ +#define	MCFSIM_SIMR		(MCF_MBAR + 0x03)	/* SIM Config reg */ +#define	MCFSIM_ICR1		(MCF_MBAR + 0x14)	/* Intr Ctrl reg 1 */ +#define	MCFSIM_ICR2		(MCF_MBAR + 0x15)	/* Intr Ctrl reg 2 */ +#define	MCFSIM_ICR3		(MCF_MBAR + 0x16)	/* Intr Ctrl reg 3 */ +#define	MCFSIM_ICR4		(MCF_MBAR + 0x17)	/* Intr Ctrl reg 4 */ +#define	MCFSIM_ICR5		(MCF_MBAR + 0x18)	/* Intr Ctrl reg 5 */ +#define	MCFSIM_ICR6		(MCF_MBAR + 0x19)	/* Intr Ctrl reg 6 */ +#define	MCFSIM_ICR7		(MCF_MBAR + 0x1a)	/* Intr Ctrl reg 7 */ +#define	MCFSIM_ICR8		(MCF_MBAR + 0x1b)	/* Intr Ctrl reg 8 */ +#define	MCFSIM_ICR9		(MCF_MBAR + 0x1c)	/* Intr Ctrl reg 9 */ +#define	MCFSIM_ICR10		(MCF_MBAR + 0x1d)	/* Intr Ctrl reg 10 */ +#define	MCFSIM_ICR11		(MCF_MBAR + 0x1e)	/* Intr Ctrl reg 11 */ +#define	MCFSIM_ICR12		(MCF_MBAR + 0x1f)	/* Intr Ctrl reg 12 */ +#define	MCFSIM_ICR13		(MCF_MBAR + 0x20)	/* Intr Ctrl reg 13 */  #ifdef CONFIG_M5206e -#define	MCFSIM_ICR14		0x21		/* Intr Ctrl reg 14 (r/w) */ -#define	MCFSIM_ICR15		0x22		/* Intr Ctrl reg 15 (r/w) */ +#define	MCFSIM_ICR14		(MCF_MBAR + 0x21)	/* Intr Ctrl reg 14 */ +#define	MCFSIM_ICR15		(MCF_MBAR + 0x22)	/* Intr Ctrl reg 15 */  #endif -#define MCFSIM_IMR		0x36		/* Interrupt Mask reg (r/w) */ -#define MCFSIM_IPR		0x3a		/* Interrupt Pend reg (r/w) */ - -#define	MCFSIM_RSR		0x40		/* Reset Status reg (r/w) */ -#define	MCFSIM_SYPCR		0x41		/* System Protection reg (r/w)*/ - -#define	MCFSIM_SWIVR		0x42		/* SW Watchdog intr reg (r/w) */ -#define	MCFSIM_SWSR		0x43		/* SW Watchdog service (r/w) */ - -#define	MCFSIM_DCRR		0x46		/* DRAM Refresh reg (r/w) */ -#define	MCFSIM_DCTR		0x4a		/* DRAM Timing reg (r/w) */ -#define	MCFSIM_DAR0		0x4c		/* DRAM 0 Address reg(r/w) */ -#define	MCFSIM_DMR0		0x50		/* DRAM 0 Mask reg (r/w) */ -#define	MCFSIM_DCR0		0x57		/* DRAM 0 Control reg (r/w) */ -#define	MCFSIM_DAR1		0x58		/* DRAM 1 Address reg (r/w) */ -#define	MCFSIM_DMR1		0x5c		/* DRAM 1 Mask reg (r/w) */ -#define	MCFSIM_DCR1		0x63		/* DRAM 1 Control reg (r/w) */ - -#define	MCFSIM_CSAR0		0x64		/* CS 0 Address 0 reg (r/w) */ -#define	MCFSIM_CSMR0		0x68		/* CS 0 Mask 0 reg (r/w) */ -#define	MCFSIM_CSCR0		0x6e		/* CS 0 Control reg (r/w) */ -#define	MCFSIM_CSAR1		0x70		/* CS 1 Address reg (r/w) */ -#define	MCFSIM_CSMR1		0x74		/* CS 1 Mask reg (r/w) */ -#define	MCFSIM_CSCR1		0x7a		/* CS 1 Control reg (r/w) */ -#define	MCFSIM_CSAR2		0x7c		/* CS 2 Address reg (r/w) */ -#define	MCFSIM_CSMR2		0x80		/* CS 2 Mask reg (r/w) */ -#define	MCFSIM_CSCR2		0x86		/* CS 2 Control reg (r/w) */ -#define	MCFSIM_CSAR3		0x88		/* CS 3 Address reg (r/w) */ -#define	MCFSIM_CSMR3		0x8c		/* CS 3 Mask reg (r/w) */ -#define	MCFSIM_CSCR3		0x92		/* CS 3 Control reg (r/w) */ -#define	MCFSIM_CSAR4		0x94		/* CS 4 Address reg (r/w) */ -#define	MCFSIM_CSMR4		0x98		/* CS 4 Mask reg (r/w) */ -#define	MCFSIM_CSCR4		0x9e		/* CS 4 Control reg (r/w) */ -#define	MCFSIM_CSAR5		0xa0		/* CS 5 Address reg (r/w) */ -#define	MCFSIM_CSMR5		0xa4		/* CS 5 Mask reg (r/w) */ -#define	MCFSIM_CSCR5		0xaa		/* CS 5 Control reg (r/w) */ -#define	MCFSIM_CSAR6		0xac		/* CS 6 Address reg (r/w) */ -#define	MCFSIM_CSMR6		0xb0		/* CS 6 Mask reg (r/w) */ -#define	MCFSIM_CSCR6		0xb6		/* CS 6 Control reg (r/w) */ -#define	MCFSIM_CSAR7		0xb8		/* CS 7 Address reg (r/w) */ -#define	MCFSIM_CSMR7		0xbc		/* CS 7 Mask reg (r/w) */ -#define	MCFSIM_CSCR7		0xc2		/* CS 7 Control reg (r/w) */ -#define	MCFSIM_DMCR		0xc6		/* Default control */ +#define	MCFSIM_IMR		(MCF_MBAR + 0x36)	/* Interrupt Mask */ +#define	MCFSIM_IPR		(MCF_MBAR + 0x3a)	/* Interrupt Pending */ + +#define	MCFSIM_RSR		(MCF_MBAR + 0x40)	/* Reset Status */ +#define	MCFSIM_SYPCR		(MCF_MBAR + 0x41)	/* System Protection */ + +#define	MCFSIM_SWIVR		(MCF_MBAR + 0x42)	/* SW Watchdog intr */ +#define	MCFSIM_SWSR		(MCF_MBAR + 0x43)	/* SW Watchdog srv */ + +#define	MCFSIM_DCRR		(MCF_MBAR + 0x46) /* DRAM Refresh reg (r/w) */ +#define	MCFSIM_DCTR		(MCF_MBAR + 0x4a) /* DRAM Timing reg (r/w) */ +#define	MCFSIM_DAR0		(MCF_MBAR + 0x4c) /* DRAM 0 Address reg(r/w) */ +#define	MCFSIM_DMR0		(MCF_MBAR + 0x50) /* DRAM 0 Mask reg (r/w) */ +#define	MCFSIM_DCR0		(MCF_MBAR + 0x57) /* DRAM 0 Control reg (r/w) */ +#define	MCFSIM_DAR1		(MCF_MBAR + 0x58) /* DRAM 1 Address reg (r/w) */ +#define	MCFSIM_DMR1		(MCF_MBAR + 0x5c) /* DRAM 1 Mask reg (r/w) */ +#define	MCFSIM_DCR1		(MCF_MBAR + 0x63) /* DRAM 1 Control reg (r/w) */ + +#define	MCFSIM_CSAR0		(MCF_MBAR + 0x64)	/* CS 0 Address reg */ +#define	MCFSIM_CSMR0		(MCF_MBAR + 0x68)	/* CS 0 Mask reg */ +#define	MCFSIM_CSCR0		(MCF_MBAR + 0x6e)	/* CS 0 Control reg */ +#define	MCFSIM_CSAR1		(MCF_MBAR + 0x70)	/* CS 1 Address reg */ +#define	MCFSIM_CSMR1		(MCF_MBAR + 0x74)	/* CS 1 Mask reg */ +#define	MCFSIM_CSCR1		(MCF_MBAR + 0x7a)	/* CS 1 Control reg */ +#define	MCFSIM_CSAR2		(MCF_MBAR + 0x7c)	/* CS 2 Address reg */ +#define	MCFSIM_CSMR2		(MCF_MBAR + 0x80)	/* CS 2 Mask reg */ +#define	MCFSIM_CSCR2		(MCF_MBAR + 0x86)	/* CS 2 Control reg */ +#define	MCFSIM_CSAR3		(MCF_MBAR + 0x88)	/* CS 3 Address reg */ +#define	MCFSIM_CSMR3		(MCF_MBAR + 0x8c)	/* CS 3 Mask reg */ +#define	MCFSIM_CSCR3		(MCF_MBAR + 0x92)	/* CS 3 Control reg */ +#define	MCFSIM_CSAR4		(MCF_MBAR + 0x94)	/* CS 4 Address reg */ +#define	MCFSIM_CSMR4		(MCF_MBAR + 0x98)	/* CS 4 Mask reg */ +#define	MCFSIM_CSCR4		(MCF_MBAR + 0x9e)	/* CS 4 Control reg */ +#define	MCFSIM_CSAR5		(MCF_MBAR + 0xa0)	/* CS 5 Address reg */ +#define	MCFSIM_CSMR5		(MCF_MBAR + 0xa4)	/* CS 5 Mask reg */ +#define	MCFSIM_CSCR5		(MCF_MBAR + 0xaa)	/* CS 5 Control reg */ +#define	MCFSIM_CSAR6		(MCF_MBAR + 0xac)	/* CS 6 Address reg */ +#define	MCFSIM_CSMR6		(MCF_MBAR + 0xb0)	/* CS 6 Mask reg */ +#define	MCFSIM_CSCR6		(MCF_MBAR + 0xb6)	/* CS 6 Control reg */ +#define	MCFSIM_CSAR7		(MCF_MBAR + 0xb8)	/* CS 7 Address reg */ +#define	MCFSIM_CSMR7		(MCF_MBAR + 0xbc)	/* CS 7 Mask reg */ +#define	MCFSIM_CSCR7		(MCF_MBAR + 0xc2)	/* CS 7 Control reg */ +#define	MCFSIM_DMCR		(MCF_MBAR + 0xc6)	/* Default control */  #ifdef CONFIG_M5206e -#define	MCFSIM_PAR		0xca		/* Pin Assignment reg (r/w) */ +#define	MCFSIM_PAR		(MCF_MBAR + 0xca)	/* Pin Assignment */  #else -#define	MCFSIM_PAR		0xcb		/* Pin Assignment reg (r/w) */ +#define	MCFSIM_PAR		(MCF_MBAR + 0xcb)	/* Pin Assignment */  #endif +#define	MCFTIMER_BASE1		(MCF_MBAR + 0x100)	/* Base of TIMER1 */ +#define	MCFTIMER_BASE2		(MCF_MBAR + 0x120)	/* Base of TIMER2 */ +  #define	MCFSIM_PADDR		(MCF_MBAR + 0x1c5)	/* Parallel Direction (r/w) */  #define	MCFSIM_PADAT		(MCF_MBAR + 0x1c9)	/* Parallel Port Value (r/w) */ +#define	MCFDMA_BASE0		(MCF_MBAR + 0x200)	/* Base address DMA 0 */ +#define	MCFDMA_BASE1		(MCF_MBAR + 0x240)	/* Base address DMA 1 */ + +#if defined(CONFIG_NETtel) +#define	MCFUART_BASE0		(MCF_MBAR + 0x180)	/* Base address UART0 */ +#define	MCFUART_BASE1		(MCF_MBAR + 0x140)	/* Base address UART1 */ +#else +#define	MCFUART_BASE0		(MCF_MBAR + 0x140)	/* Base address UART0 */ +#define	MCFUART_BASE1		(MCF_MBAR + 0x180)	/* Base address UART1 */ +#endif +  /*   *	Define system peripheral IRQ usage.   */  #define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */  #define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */ +#define	MCF_IRQ_UART0		73		/* UART0 */ +#define	MCF_IRQ_UART1		74		/* UART1 */  /* - * Generic GPIO + *	Generic GPIO   */  #define MCFGPIO_PIN_MAX		8  #define MCFGPIO_IRQ_VECBASE	-1 diff --git a/arch/m68k/include/asm/m520xsim.h b/arch/m68k/include/asm/m520xsim.h index db824a4b136..db3f8ee4a6c 100644 --- a/arch/m68k/include/asm/m520xsim.h +++ b/arch/m68k/include/asm/m520xsim.h @@ -11,10 +11,16 @@  #define m520xsim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m520x)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m52xxacr.h> +  /*   *  Define the 520x SIM register set addresses.   */ -#define MCFICM_INTC0        0x48000     /* Base for Interrupt Ctrl 0 */ +#define MCFICM_INTC0        0xFC048000  /* Base for Interrupt Ctrl 0 */  #define MCFINTC_IPRH        0x00        /* Interrupt pending 32-63 */  #define MCFINTC_IPRL        0x04        /* Interrupt pending 1-31 */  #define MCFINTC_IMRH        0x08        /* Interrupt mask 32-63 */ @@ -30,33 +36,56 @@   *  address to the SIMR and CIMR registers (not offsets into IPSBAR).   *  The 520x family only has a single INTC unit.   */ -#define MCFINTC0_SIMR       (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_SIMR) -#define MCFINTC0_CIMR       (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_CIMR) -#define	MCFINTC0_ICR0       (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0) +#define MCFINTC0_SIMR       (MCFICM_INTC0 + MCFINTC_SIMR) +#define MCFINTC0_CIMR       (MCFICM_INTC0 + MCFINTC_CIMR) +#define	MCFINTC0_ICR0       (MCFICM_INTC0 + MCFINTC_ICR0)  #define MCFINTC1_SIMR       (0)  #define MCFINTC1_CIMR       (0)  #define	MCFINTC1_ICR0       (0) +#define MCFINTC2_SIMR       (0) +#define MCFINTC2_CIMR       (0) +#define MCFINTC2_ICR0       (0)  #define MCFINT_VECBASE      64  #define MCFINT_UART0        26          /* Interrupt number for UART0 */  #define MCFINT_UART1        27          /* Interrupt number for UART1 */  #define MCFINT_UART2        28          /* Interrupt number for UART2 */  #define MCFINT_QSPI         31          /* Interrupt number for QSPI */ +#define MCFINT_FECRX0	    36		/* Interrupt number for FEC RX */ +#define MCFINT_FECTX0	    40		/* Interrupt number for FEC RX */ +#define MCFINT_FECENTC0	    42		/* Interrupt number for FEC RX */  #define MCFINT_PIT1         4           /* Interrupt number for PIT1 (PIT0 in processor) */ +#define MCF_IRQ_UART0	    (MCFINT_VECBASE + MCFINT_UART0) +#define MCF_IRQ_UART1	    (MCFINT_VECBASE + MCFINT_UART1) +#define MCF_IRQ_UART2	    (MCFINT_VECBASE + MCFINT_UART2) + +#define MCF_IRQ_FECRX0	    (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0	    (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0    (MCFINT_VECBASE + MCFINT_FECENTC0) + +#define	MCF_IRQ_QSPI	    (MCFINT_VECBASE + MCFINT_QSPI) +#define MCF_IRQ_PIT1        (MCFINT_VECBASE + MCFINT_PIT1) +  /*   *  SDRAM configuration registers.   */ -#define MCFSIM_SDMR         0x000a8000	/* SDRAM Mode/Extended Mode Register */ -#define MCFSIM_SDCR         0x000a8004	/* SDRAM Control Register */ -#define MCFSIM_SDCFG1       0x000a8008	/* SDRAM Configuration Register 1 */ -#define MCFSIM_SDCFG2       0x000a800c	/* SDRAM Configuration Register 2 */ -#define MCFSIM_SDCS0        0x000a8110	/* SDRAM Chip Select 0 Configuration */ -#define MCFSIM_SDCS1        0x000a8114	/* SDRAM Chip Select 1 Configuration */ +#define MCFSIM_SDMR         0xFC0a8000	/* SDRAM Mode/Extended Mode Register */ +#define MCFSIM_SDCR         0xFC0a8004	/* SDRAM Control Register */ +#define MCFSIM_SDCFG1       0xFC0a8008	/* SDRAM Configuration Register 1 */ +#define MCFSIM_SDCFG2       0xFC0a800c	/* SDRAM Configuration Register 2 */ +#define MCFSIM_SDCS0        0xFC0a8110	/* SDRAM Chip Select 0 Configuration */ +#define MCFSIM_SDCS1        0xFC0a8114	/* SDRAM Chip Select 1 Configuration */ +/* + * EPORT and GPIO registers. + */ +#define MCFEPORT_EPPAR			0xFC088000  #define MCFEPORT_EPDDR			0xFC088002 +#define MCFEPORT_EPIER			0xFC088003  #define MCFEPORT_EPDR			0xFC088004  #define MCFEPORT_EPPDR			0xFC088005 +#define MCFEPORT_EPFR			0xFC088006  #define MCFGPIO_PODR_BUSCTL		0xFC0A4000  #define MCFGPIO_PODR_BE			0xFC0A4001 @@ -78,15 +107,13 @@  #define MCFGPIO_PDDR_FECH		0xFC0A4013  #define MCFGPIO_PDDR_FECL		0xFC0A4014 -#define MCFGPIO_PPDSDR_BUSCTL		0xFC0A401A -#define MCFGPIO_PPDSDR_BE		0xFC0A401B -#define MCFGPIO_PPDSDR_CS		0xFC0A401C -#define MCFGPIO_PPDSDR_FECI2C		0xFC0A401D -#define MCFGPIO_PPDSDR_QSPI		0xFC0A401E -#define MCFGPIO_PPDSDR_TIMER		0xFC0A401F -#define MCFGPIO_PPDSDR_UART		0xFC0A4021 -#define MCFGPIO_PPDSDR_FECH		0xFC0A4021 -#define MCFGPIO_PPDSDR_FECL		0xFC0A4022 +#define MCFGPIO_PPDSDR_CS		0xFC0A401A +#define MCFGPIO_PPDSDR_FECI2C		0xFC0A401B +#define MCFGPIO_PPDSDR_QSPI		0xFC0A401C +#define MCFGPIO_PPDSDR_TIMER		0xFC0A401D +#define MCFGPIO_PPDSDR_UART		0xFC0A401E +#define MCFGPIO_PPDSDR_FECH		0xFC0A401F +#define MCFGPIO_PPDSDR_FECL		0xFC0A4020  #define MCFGPIO_PCLRR_BUSCTL		0xFC0A4024  #define MCFGPIO_PCLRR_BE		0xFC0A4025 @@ -97,24 +124,24 @@  #define MCFGPIO_PCLRR_UART		0xFC0A402A  #define MCFGPIO_PCLRR_FECH		0xFC0A402B  #define MCFGPIO_PCLRR_FECL		0xFC0A402C +  /*   * Generic GPIO support   */ -#define MCFGPIO_PODR			MCFGPIO_PODR_BUSCTL -#define MCFGPIO_PDDR			MCFGPIO_PDDR_BUSCTL -#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_BUSCTL -#define MCFGPIO_SETR			MCFGPIO_PPDSDR_BUSCTL -#define MCFGPIO_CLRR			MCFGPIO_PCLRR_BUSCTL +#define MCFGPIO_PODR			MCFGPIO_PODR_CS +#define MCFGPIO_PDDR			MCFGPIO_PDDR_CS +#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_CS +#define MCFGPIO_SETR			MCFGPIO_PPDSDR_CS +#define MCFGPIO_CLRR			MCFGPIO_PCLRR_CS  #define MCFGPIO_PIN_MAX			80  #define MCFGPIO_IRQ_MAX			8  #define MCFGPIO_IRQ_VECBASE		MCFINT_VECBASE -/****************************************************************************/ -#define MCF_GPIO_PAR_UART                   (0xA4036) -#define MCF_GPIO_PAR_FECI2C                 (0xA4033) -#define MCF_GPIO_PAR_QSPI                   (0xA4034) -#define MCF_GPIO_PAR_FEC                    (0xA4038) +#define MCF_GPIO_PAR_UART		0xFC0A4036 +#define MCF_GPIO_PAR_FECI2C		0xFC0A4033 +#define MCF_GPIO_PAR_QSPI		0xFC0A4034 +#define MCF_GPIO_PAR_FEC		0xFC0A4038  #define MCF_GPIO_PAR_UART_PAR_URXD0         (0x0001)  #define MCF_GPIO_PAR_UART_PAR_UTXD0         (0x0002) @@ -126,7 +153,36 @@  #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2   (0x04)  /* - *  Reset Controll Unit. + *  PIT timer module. + */ +#define	MCFPIT_BASE1		0xFC080000	/* Base address of TIMER1 */ +#define	MCFPIT_BASE2		0xFC084000	/* Base address of TIMER2 */ + +/* + *  UART module. + */ +#define MCFUART_BASE0		0xFC060000	/* Base address of UART0 */ +#define MCFUART_BASE1		0xFC064000	/* Base address of UART1 */ +#define MCFUART_BASE2		0xFC068000	/* Base address of UART2 */ + +/* + *  FEC module. + */ +#define	MCFFEC_BASE0		0xFC030000	/* Base of FEC ethernet */ +#define	MCFFEC_SIZE0		0x800		/* Register set size */ + +/* + *  QSPI module. + */ +#define	MCFQSPI_BASE		0xFC05C000	/* Base of QSPI module */ +#define	MCFQSPI_SIZE		0x40		/* Register set size */ + +#define	MCFQSPI_CS0		46 +#define	MCFQSPI_CS1		47 +#define	MCFQSPI_CS2		27 + +/* + *  Reset Control Unit.   */  #define	MCF_RCR			0xFC0A0000  #define	MCF_RSR			0xFC0A0001 @@ -134,5 +190,15 @@  #define	MCF_RCR_SWRESET		0x80		/* Software reset bit */  #define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ +/* + *  Power Management. + */ +#define MCFPM_WCR		0xfc040013 +#define MCFPM_PPMSR0		0xfc04002c +#define MCFPM_PPMCR0		0xfc04002d +#define MCFPM_PPMHR0		0xfc040030 +#define MCFPM_PPMLR0		0xfc040034 +#define MCFPM_LPCR		0xfc0a0007 +  /****************************************************************************/  #endif  /* m520xsim_h */ diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h index e8d06b24a48..5e06b4eb57f 100644 --- a/arch/m68k/include/asm/m523xsim.h +++ b/arch/m68k/include/asm/m523xsim.h @@ -11,12 +11,18 @@  #define	m523xsim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m523x)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m52xxacr.h>  /*   *	Define the 523x SIM register set addresses.   */ -#define	MCFICM_INTC0		0x0c00		/* Base for Interrupt Ctrl 0 */ -#define	MCFICM_INTC1		0x0d00		/* Base for Interrupt Ctrl 0 */ +#define	MCFICM_INTC0		(MCF_IPSBAR + 0x0c00)	/* Base for Interrupt Ctrl 0 */ +#define	MCFICM_INTC1		(MCF_IPSBAR + 0x0d00)	/* Base for Interrupt Ctrl 0 */ +  #define	MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */  #define	MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */  #define	MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */ @@ -29,27 +35,70 @@  #define	MCFINT_VECBASE		64		/* Vector base number */  #define	MCFINT_UART0		13		/* Interrupt number for UART0 */ -#define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */ +#define	MCFINT_UART1		14		/* Interrupt number for UART1 */ +#define	MCFINT_UART2		15		/* Interrupt number for UART2 */  #define MCFINT_QSPI		18		/* Interrupt number for QSPI */ +#define	MCFINT_FECRX0		23		/* Interrupt number for FEC */ +#define	MCFINT_FECTX0		27		/* Interrupt number for FEC */ +#define	MCFINT_FECENTC0		29		/* Interrupt number for FEC */ +#define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */ + +#define	MCF_IRQ_UART0	        (MCFINT_VECBASE + MCFINT_UART0) +#define	MCF_IRQ_UART1	        (MCFINT_VECBASE + MCFINT_UART1) +#define	MCF_IRQ_UART2	        (MCFINT_VECBASE + MCFINT_UART2) + +#define	MCF_IRQ_FECRX0		(MCFINT_VECBASE + MCFINT_FECRX0) +#define	MCF_IRQ_FECTX0		(MCFINT_VECBASE + MCFINT_FECTX0) +#define	MCF_IRQ_FECENTC0	(MCFINT_VECBASE + MCFINT_FECENTC0) + +#define	MCF_IRQ_QSPI		(MCFINT_VECBASE + MCFINT_QSPI) +#define MCF_IRQ_PIT1		(MCFINT_VECBASE + MCFINT_PIT1)  /*   *	SDRAM configuration registers.   */ -#define	MCFSIM_DCR		0x44		/* SDRAM control */ -#define	MCFSIM_DACR0		0x48		/* SDRAM base address 0 */ -#define	MCFSIM_DMR0		0x4c		/* SDRAM address mask 0 */ -#define	MCFSIM_DACR1		0x50		/* SDRAM base address 1 */ -#define	MCFSIM_DMR1		0x54		/* SDRAM address mask 1 */ +#define	MCFSIM_DCR		(MCF_IPSBAR + 0x44)	/* Control */ +#define	MCFSIM_DACR0		(MCF_IPSBAR + 0x48)	/* Base address 0 */ +#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x4c)	/* Address mask 0 */ +#define	MCFSIM_DACR1		(MCF_IPSBAR + 0x50)	/* Base address 1 */ +#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x54)	/* Address mask 1 */  /* - *  Reset Controll Unit (relative to IPSBAR). + *  Reset Control Unit (relative to IPSBAR).   */ -#define	MCF_RCR			0x110000 -#define	MCF_RSR			0x110001 +#define	MCF_RCR			(MCF_IPSBAR + 0x110000) +#define	MCF_RSR			(MCF_IPSBAR + 0x110001)  #define	MCF_RCR_SWRESET		0x80		/* Software reset bit */  #define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ +/* + *  UART module. + */ +#define MCFUART_BASE0		(MCF_IPSBAR + 0x200) +#define MCFUART_BASE1		(MCF_IPSBAR + 0x240) +#define MCFUART_BASE2		(MCF_IPSBAR + 0x280) + +/* + *  FEC ethernet module. + */ +#define	MCFFEC_BASE0		(MCF_IPSBAR + 0x1000) +#define	MCFFEC_SIZE0		0x800 + +/* + *  QSPI module. + */ +#define	MCFQSPI_BASE		(MCF_IPSBAR + 0x340) +#define	MCFQSPI_SIZE		0x40 + +#define	MCFQSPI_CS0		91 +#define	MCFQSPI_CS1		92 +#define	MCFQSPI_CS2		103 +#define	MCFQSPI_CS3		99 + +/* + *  GPIO module. + */  #define MCFGPIO_PODR_ADDR	(MCF_IPSBAR + 0x100000)  #define MCFGPIO_PODR_DATAH	(MCF_IPSBAR + 0x100001)  #define MCFGPIO_PODR_DATAL	(MCF_IPSBAR + 0x100002) @@ -107,30 +156,57 @@  #define MCFGPIO_PCLRR_ETPU	(MCF_IPSBAR + 0x10003C)  /* - * EPort + * PIT timer base addresses.   */ +#define	MCFPIT_BASE1		(MCF_IPSBAR + 0x150000) +#define	MCFPIT_BASE2		(MCF_IPSBAR + 0x160000) +#define	MCFPIT_BASE3		(MCF_IPSBAR + 0x170000) +#define	MCFPIT_BASE4		(MCF_IPSBAR + 0x180000) +/* + * EPort + */ +#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)  #define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002) +#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)  #define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)  #define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005) +#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)  /*   * Generic GPIO support   */ -#define MCFGPIO_PODR			MCFGPIO_PODR_ADDR -#define MCFGPIO_PDDR			MCFGPIO_PDDR_ADDR -#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_ADDR -#define MCFGPIO_SETR			MCFGPIO_PPDSDR_ADDR -#define MCFGPIO_CLRR			MCFGPIO_PCLRR_ADDR +#define MCFGPIO_PODR		MCFGPIO_PODR_ADDR +#define MCFGPIO_PDDR		MCFGPIO_PDDR_ADDR +#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_ADDR +#define MCFGPIO_SETR		MCFGPIO_PPDSDR_ADDR +#define MCFGPIO_CLRR		MCFGPIO_PCLRR_ADDR -#define MCFGPIO_PIN_MAX			107 -#define MCFGPIO_IRQ_MAX			8 -#define MCFGPIO_IRQ_VECBASE		MCFINT_VECBASE +#define MCFGPIO_PIN_MAX		107 +#define MCFGPIO_IRQ_MAX		8 +#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE  /*   * Pin Assignment  */ +#define	MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100040) +#define	MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100042) +#define	MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100044) +#define	MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100045) +#define	MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100046) +#define	MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100047) +#define	MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x100048)  #define	MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10004A)  #define	MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10004C) +#define	MCFGPIO_PAR_ETPU	(MCF_IPSBAR + 0x10004E) + +/* + * DMA unit base addresses. + */ +#define	MCFDMA_BASE0		(MCF_IPSBAR + 0x100) +#define	MCFDMA_BASE1		(MCF_IPSBAR + 0x140) +#define	MCFDMA_BASE2		(MCF_IPSBAR + 0x180) +#define	MCFDMA_BASE3		(MCF_IPSBAR + 0x1C0) +  /****************************************************************************/  #endif	/* m523xsim_h */ diff --git a/arch/m68k/include/asm/m5249sim.h b/arch/m68k/include/asm/m5249sim.h deleted file mode 100644 index 79b7b402f3c..00000000000 --- a/arch/m68k/include/asm/m5249sim.h +++ /dev/null @@ -1,225 +0,0 @@ -/****************************************************************************/ - -/* - *	m5249sim.h -- ColdFire 5249 System Integration Module support. - * - *	(C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) - */ - -/****************************************************************************/ -#ifndef	m5249sim_h -#define	m5249sim_h -/****************************************************************************/ - -/* - *	Define the 5249 SIM register set addresses. - */ -#define	MCFSIM_RSR		0x00		/* Reset Status reg (r/w) */ -#define	MCFSIM_SYPCR		0x01		/* System Protection reg (r/w)*/ -#define	MCFSIM_SWIVR		0x02		/* SW Watchdog intr reg (r/w) */ -#define	MCFSIM_SWSR		0x03		/* SW Watchdog service (r/w) */ -#define	MCFSIM_PAR		0x04		/* Pin Assignment reg (r/w) */ -#define	MCFSIM_IRQPAR		0x06		/* Interrupt Assignment reg (r/w) */ -#define	MCFSIM_MPARK		0x0C		/* BUS Master Control Reg*/ -#define	MCFSIM_IPR		0x40		/* Interrupt Pend reg (r/w) */ -#define	MCFSIM_IMR		0x44		/* Interrupt Mask reg (r/w) */ -#define	MCFSIM_AVR		0x4b		/* Autovector Ctrl reg (r/w) */ -#define	MCFSIM_ICR0		0x4c		/* Intr Ctrl reg 0 (r/w) */ -#define	MCFSIM_ICR1		0x4d		/* Intr Ctrl reg 1 (r/w) */ -#define	MCFSIM_ICR2		0x4e		/* Intr Ctrl reg 2 (r/w) */ -#define	MCFSIM_ICR3		0x4f		/* Intr Ctrl reg 3 (r/w) */ -#define	MCFSIM_ICR4		0x50		/* Intr Ctrl reg 4 (r/w) */ -#define	MCFSIM_ICR5		0x51		/* Intr Ctrl reg 5 (r/w) */ -#define	MCFSIM_ICR6		0x52		/* Intr Ctrl reg 6 (r/w) */ -#define	MCFSIM_ICR7		0x53		/* Intr Ctrl reg 7 (r/w) */ -#define	MCFSIM_ICR8		0x54		/* Intr Ctrl reg 8 (r/w) */ -#define	MCFSIM_ICR9		0x55		/* Intr Ctrl reg 9 (r/w) */ -#define	MCFSIM_ICR10		0x56		/* Intr Ctrl reg 10 (r/w) */ -#define	MCFSIM_ICR11		0x57		/* Intr Ctrl reg 11 (r/w) */ - -#define MCFSIM_CSAR0		0x80		/* CS 0 Address 0 reg (r/w) */ -#define MCFSIM_CSMR0		0x84		/* CS 0 Mask 0 reg (r/w) */ -#define MCFSIM_CSCR0		0x8a		/* CS 0 Control reg (r/w) */ -#define MCFSIM_CSAR1		0x8c		/* CS 1 Address reg (r/w) */ -#define MCFSIM_CSMR1		0x90		/* CS 1 Mask reg (r/w) */ -#define MCFSIM_CSCR1		0x96		/* CS 1 Control reg (r/w) */ -#define MCFSIM_CSAR2		0x98		/* CS 2 Address reg (r/w) */ -#define MCFSIM_CSMR2		0x9c		/* CS 2 Mask reg (r/w) */ -#define MCFSIM_CSCR2		0xa2		/* CS 2 Control reg (r/w) */ -#define MCFSIM_CSAR3		0xa4		/* CS 3 Address reg (r/w) */ -#define MCFSIM_CSMR3		0xa8		/* CS 3 Mask reg (r/w) */ -#define MCFSIM_CSCR3		0xae		/* CS 3 Control reg (r/w) */ - -#define MCFSIM_DCR		0x100		/* DRAM Control reg (r/w) */ -#define MCFSIM_DACR0		0x108		/* DRAM 0 Addr and Ctrl (r/w) */ -#define MCFSIM_DMR0		0x10c		/* DRAM 0 Mask reg (r/w) */ -#define MCFSIM_DACR1		0x110		/* DRAM 1 Addr and Ctrl (r/w) */ -#define MCFSIM_DMR1		0x114		/* DRAM 1 Mask reg (r/w) */ - - -/* - *	Some symbol defines for the above... - */ -#define	MCFSIM_SWDICR		MCFSIM_ICR0	/* Watchdog timer ICR */ -#define	MCFSIM_TIMER1ICR	MCFSIM_ICR1	/* Timer 1 ICR */ -#define	MCFSIM_TIMER2ICR	MCFSIM_ICR2	/* Timer 2 ICR */ -#define	MCFSIM_UART1ICR		MCFSIM_ICR4	/* UART 1 ICR */ -#define	MCFSIM_UART2ICR		MCFSIM_ICR5	/* UART 2 ICR */ -#define	MCFSIM_DMA0ICR		MCFSIM_ICR6	/* DMA 0 ICR */ -#define	MCFSIM_DMA1ICR		MCFSIM_ICR7	/* DMA 1 ICR */ -#define	MCFSIM_DMA2ICR		MCFSIM_ICR8	/* DMA 2 ICR */ -#define	MCFSIM_DMA3ICR		MCFSIM_ICR9	/* DMA 3 ICR */ -#define	MCFSIM_QSPIICR		MCFSIM_ICR10	/* QSPI ICR */ - -/* - *	Define system peripheral IRQ usage. - */ -#define	MCF_IRQ_QSPI		28		/* QSPI, Level 4 */ -#define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */ -#define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */ - -/* - *	General purpose IO registers (in MBAR2). - */ -#define	MCFSIM2_GPIOREAD	(MCF_MBAR2 + 0x000)	/* GPIO read values */ -#define	MCFSIM2_GPIOWRITE	(MCF_MBAR2 + 0x004)	/* GPIO write values */ -#define	MCFSIM2_GPIOENABLE	(MCF_MBAR2 + 0x008)	/* GPIO enabled */ -#define	MCFSIM2_GPIOFUNC	(MCF_MBAR2 + 0x00C)	/* GPIO function */ -#define	MCFSIM2_GPIO1READ	(MCF_MBAR2 + 0x0B0)	/* GPIO1 read values */ -#define	MCFSIM2_GPIO1WRITE	(MCF_MBAR2 + 0x0B4)	/* GPIO1 write values */ -#define	MCFSIM2_GPIO1ENABLE	(MCF_MBAR2 + 0x0B8)	/* GPIO1 enabled */ -#define	MCFSIM2_GPIO1FUNC	(MCF_MBAR2 + 0x0BC)	/* GPIO1 function */ - -#define	MCFSIM2_GPIOINTSTAT	0xc0		/* GPIO interrupt status */ -#define	MCFSIM2_GPIOINTCLEAR	0xc0		/* GPIO interrupt clear */ -#define	MCFSIM2_GPIOINTENABLE	0xc4		/* GPIO interrupt enable */ - -#define	MCFSIM2_INTLEVEL1	0x140		/* Interrupt level reg 1 */ -#define	MCFSIM2_INTLEVEL2	0x144		/* Interrupt level reg 2 */ -#define	MCFSIM2_INTLEVEL3	0x148		/* Interrupt level reg 3 */ -#define	MCFSIM2_INTLEVEL4	0x14c		/* Interrupt level reg 4 */ -#define	MCFSIM2_INTLEVEL5	0x150		/* Interrupt level reg 5 */ -#define	MCFSIM2_INTLEVEL6	0x154		/* Interrupt level reg 6 */ -#define	MCFSIM2_INTLEVEL7	0x158		/* Interrupt level reg 7 */ -#define	MCFSIM2_INTLEVEL8	0x15c		/* Interrupt level reg 8 */ - -#define	MCFSIM2_DMAROUTE	0x188		/* DMA routing */ - -#define	MCFSIM2_IDECONFIG1	0x18c		/* IDEconfig1 */ -#define	MCFSIM2_IDECONFIG2	0x190		/* IDEconfig2 */ - -/* - * Define the base interrupt for the second interrupt controller. - * We set it to 128, out of the way of the base interrupts, and plenty - * of room for its 64 interrupts. - */ -#define	MCFINTC2_VECBASE	128 - -#define	MCFINTC2_GPIOIRQ0	(MCFINTC2_VECBASE + 32) -#define	MCFINTC2_GPIOIRQ1	(MCFINTC2_VECBASE + 33) -#define	MCFINTC2_GPIOIRQ2	(MCFINTC2_VECBASE + 34) -#define	MCFINTC2_GPIOIRQ3	(MCFINTC2_VECBASE + 35) -#define	MCFINTC2_GPIOIRQ4	(MCFINTC2_VECBASE + 36) -#define	MCFINTC2_GPIOIRQ5	(MCFINTC2_VECBASE + 37) -#define	MCFINTC2_GPIOIRQ6	(MCFINTC2_VECBASE + 38) -#define	MCFINTC2_GPIOIRQ7	(MCFINTC2_VECBASE + 39) - -/* - * Generic GPIO support - */ -#define MCFGPIO_PIN_MAX		64 -#define MCFGPIO_IRQ_MAX		-1 -#define MCFGPIO_IRQ_VECBASE	-1 - -/****************************************************************************/ - -#ifdef __ASSEMBLER__ - -/* - *	The M5249C3 board needs a little help getting all its SIM devices - *	initialized at kernel start time. dBUG doesn't set much up, so - *	we need to do it manually. - */ -.macro m5249c3_setup -	/* -	 *	Set MBAR1 and MBAR2, just incase they are not set. -	 */ -	movel	#0x10000001,%a0 -	movec	%a0,%MBAR			/* map MBAR region */ -	subql	#1,%a0				/* get MBAR address in a0 */ - -	movel	#0x80000001,%a1 -	movec	%a1,#3086			/* map MBAR2 region */ -	subql	#1,%a1				/* get MBAR2 address in a1 */ - -	/* -	 *      Move secondary interrupts to their base (128). -	 */ -	moveb	#MCFINTC2_VECBASE,%d0 -	moveb	%d0,0x16b(%a1)			/* interrupt base register */ - -	/* -	 *      Work around broken CSMR0/DRAM vector problem. -	 */ -	movel	#0x001F0021,%d0			/* disable C/I bit */ -	movel	%d0,0x84(%a0)			/* set CSMR0 */ - -	/* -	 *	Disable the PLL firstly. (Who knows what state it is -	 *	in here!). -	 */ -	movel	0x180(%a1),%d0			/* get current PLL value */ -	andl	#0xfffffffe,%d0			/* PLL bypass first */ -	movel	%d0,0x180(%a1)			/* set PLL register */ -	nop - -#if CONFIG_CLOCK_FREQ == 140000000 -	/* -	 *	Set initial clock frequency. This assumes M5249C3 board -	 *	is fitted with 11.2896MHz crystal. It will program the -	 *	PLL for 140MHz. Lets go fast :-) -	 */ -	movel	#0x125a40f0,%d0			/* set for 140MHz */ -	movel	%d0,0x180(%a1)			/* set PLL register */ -	orl	#0x1,%d0 -	movel	%d0,0x180(%a1)			/* set PLL register */ -#endif - -	/* -	 *	Setup CS1 for ethernet controller. -	 *	(Setup as per M5249C3 doco). -	 */ -	movel  #0xe0000000,%d0			/* CS1 mapped at 0xe0000000 */ -	movel  %d0,0x8c(%a0) -	movel  #0x001f0021,%d0			/* CS1 size of 1Mb */ -	movel  %d0,0x90(%a0) -	movew  #0x0080,%d0			/* CS1 = 16bit port, AA */ -	movew  %d0,0x96(%a0) - -	/* -	 *	Setup CS2 for IDE interface. -	 */ -	movel	#0x50000000,%d0			/* CS2 mapped at 0x50000000 */ -	movel	%d0,0x98(%a0) -	movel	#0x001f0001,%d0			/* CS2 size of 1MB */ -	movel	%d0,0x9c(%a0) -	movew	#0x0080,%d0			/* CS2 = 16bit, TA */ -	movew	%d0,0xa2(%a0) - -	movel	#0x00107000,%d0			/* IDEconfig1 */ -	movel	%d0,0x18c(%a1) -	movel	#0x000c0400,%d0			/* IDEconfig2 */ -	movel	%d0,0x190(%a1) - -	movel	#0x00080000,%d0			/* GPIO19, IDE reset bit */ -	orl	%d0,0xc(%a1)			/* function GPIO19 */ -	orl	%d0,0x8(%a1)			/* enable GPIO19 as output */ -        orl	%d0,0x4(%a1)			/* de-assert IDE reset */ -.endm - -#define	PLATFORM_SETUP	m5249c3_setup - -#endif /* __ASSEMBLER__ */ - -/****************************************************************************/ -#endif	/* m5249sim_h */ diff --git a/arch/m68k/include/asm/m525xsim.h b/arch/m68k/include/asm/m525xsim.h new file mode 100644 index 00000000000..f186459072e --- /dev/null +++ b/arch/m68k/include/asm/m525xsim.h @@ -0,0 +1,308 @@ +/****************************************************************************/ + +/* + *	m525xsim.h -- ColdFire 525x System Integration Module support. + * + *	(C) Copyright 2012, Steven king <sfking@fdwdc.com> + *	(C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) + */ + +/****************************************************************************/ +#ifndef	m525xsim_h +#define m525xsim_h +/****************************************************************************/ + +/* + *	This header supports ColdFire 5249, 5251 and 5253. There are a few + *	little differences between them, but most of the peripheral support + *	can be used by all of them. + */ +#define CPU_NAME		"COLDFIRE(m525x)" +#define CPU_INSTR_PER_JIFFY	3 +#define MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m52xxacr.h> + +/* + *	The 525x has a second MBAR region, define its address. + */ +#define MCF_MBAR2		0x80000000 + +/* + *	Define the 525x SIM register set addresses. + */ +#define MCFSIM_RSR		(MCF_MBAR + 0x00)	/* Reset Status */ +#define MCFSIM_SYPCR		(MCF_MBAR + 0x01)	/* System Protection */ +#define MCFSIM_SWIVR		(MCF_MBAR + 0x02)	/* SW Watchdog intr */ +#define MCFSIM_SWSR		(MCF_MBAR + 0x03)	/* SW Watchdog srv */ +#define MCFSIM_MPARK		(MCF_MBAR + 0x0C)	/* BUS Master Ctrl */ +#define MCFSIM_IPR		(MCF_MBAR + 0x40)	/* Interrupt Pending */ +#define MCFSIM_IMR		(MCF_MBAR + 0x44)	/* Interrupt Mask */ +#define MCFSIM_ICR0		(MCF_MBAR + 0x4c)	/* Intr Ctrl reg 0 */ +#define MCFSIM_ICR1		(MCF_MBAR + 0x4d)	/* Intr Ctrl reg 1 */ +#define MCFSIM_ICR2		(MCF_MBAR + 0x4e)	/* Intr Ctrl reg 2 */ +#define MCFSIM_ICR3		(MCF_MBAR + 0x4f)	/* Intr Ctrl reg 3 */ +#define MCFSIM_ICR4		(MCF_MBAR + 0x50)	/* Intr Ctrl reg 4 */ +#define MCFSIM_ICR5		(MCF_MBAR + 0x51)	/* Intr Ctrl reg 5 */ +#define MCFSIM_ICR6		(MCF_MBAR + 0x52)	/* Intr Ctrl reg 6 */ +#define MCFSIM_ICR7		(MCF_MBAR + 0x53)	/* Intr Ctrl reg 7 */ +#define MCFSIM_ICR8		(MCF_MBAR + 0x54)	/* Intr Ctrl reg 8 */ +#define MCFSIM_ICR9		(MCF_MBAR + 0x55)	/* Intr Ctrl reg 9 */ +#define MCFSIM_ICR10		(MCF_MBAR + 0x56)	/* Intr Ctrl reg 10 */ +#define MCFSIM_ICR11		(MCF_MBAR + 0x57)	/* Intr Ctrl reg 11 */ + +#define MCFSIM_CSAR0		(MCF_MBAR + 0x80)	/* CS 0 Address reg */ +#define MCFSIM_CSMR0		(MCF_MBAR + 0x84)	/* CS 0 Mask reg */ +#define MCFSIM_CSCR0		(MCF_MBAR + 0x8a)	/* CS 0 Control reg */ +#define MCFSIM_CSAR1		(MCF_MBAR + 0x8c)	/* CS 1 Address reg */ +#define MCFSIM_CSMR1		(MCF_MBAR + 0x90)	/* CS 1 Mask reg */ +#define MCFSIM_CSCR1		(MCF_MBAR + 0x96)	/* CS 1 Control reg */ +#define MCFSIM_CSAR2		(MCF_MBAR + 0x98)	/* CS 2 Address reg */ +#define MCFSIM_CSMR2		(MCF_MBAR + 0x9c)	/* CS 2 Mask reg */ +#define MCFSIM_CSCR2		(MCF_MBAR + 0xa2)	/* CS 2 Control reg */ +#define MCFSIM_CSAR3		(MCF_MBAR + 0xa4)	/* CS 3 Address reg */ +#define MCFSIM_CSMR3		(MCF_MBAR + 0xa8)	/* CS 3 Mask reg */ +#define MCFSIM_CSCR3		(MCF_MBAR + 0xae)	/* CS 3 Control reg */ +#define MCFSIM_CSAR4		(MCF_MBAR + 0xb0)	/* CS 4 Address reg */ +#define MCFSIM_CSMR4		(MCF_MBAR + 0xb4)	/* CS 4 Mask reg */ +#define MCFSIM_CSCR4		(MCF_MBAR + 0xba)	/* CS 4 Control reg */ + +#define MCFSIM_DCR		(MCF_MBAR + 0x100)	/* DRAM Control */ +#define MCFSIM_DACR0		(MCF_MBAR + 0x108)	/* DRAM 0 Addr/Ctrl */ +#define MCFSIM_DMR0		(MCF_MBAR + 0x10c)	/* DRAM 0 Mask */ +#define MCFSIM_DACR1		(MCF_MBAR + 0x110)	/* DRAM 1 Addr/Ctrl */ +#define MCFSIM_DMR1		(MCF_MBAR + 0x114)	/* DRAM 1 Mask */ + +/* + * Secondary Interrupt Controller (in MBAR2) +*/ +#define MCFINTC2_INTBASE	(MCF_MBAR2 + 0x168)	/* Base Vector Reg */ +#define MCFINTC2_INTPRI1	(MCF_MBAR2 + 0x140)	/* 0-7 priority */ +#define MCFINTC2_INTPRI2	(MCF_MBAR2 + 0x144)	/* 8-15 priority */ +#define MCFINTC2_INTPRI3	(MCF_MBAR2 + 0x148)	/* 16-23 priority */ +#define MCFINTC2_INTPRI4	(MCF_MBAR2 + 0x14c)	/* 24-31 priority */ +#define MCFINTC2_INTPRI5	(MCF_MBAR2 + 0x150)	/* 32-39 priority */ +#define MCFINTC2_INTPRI6	(MCF_MBAR2 + 0x154)	/* 40-47 priority */ +#define MCFINTC2_INTPRI7	(MCF_MBAR2 + 0x158)	/* 48-55 priority */ +#define MCFINTC2_INTPRI8	(MCF_MBAR2 + 0x15c)	/* 56-63 priority */ + +#define MCFINTC2_INTPRI_REG(i)	(MCFINTC2_INTPRI1 + \ +				((((i) - MCFINTC2_VECBASE) / 8) * 4)) +#define MCFINTC2_INTPRI_BITS(b, i)	((b) << (((i) % 8) * 4)) + +/* + *	Timer module. + */ +#define MCFTIMER_BASE1		(MCF_MBAR + 0x140)	/* Base of TIMER1 */ +#define MCFTIMER_BASE2		(MCF_MBAR + 0x180)	/* Base of TIMER2 */ + +/* + *	UART module. + */ +#define MCFUART_BASE0		(MCF_MBAR + 0x1c0)	/* Base address UART0 */ +#define MCFUART_BASE1		(MCF_MBAR + 0x200)	/* Base address UART1 */ + +/* + *	QSPI module. + */ +#define MCFQSPI_BASE		(MCF_MBAR + 0x400)	/* Base address QSPI */ +#define MCFQSPI_SIZE		0x40			/* Register set size */ + +#ifdef CONFIG_M5249 +#define MCFQSPI_CS0		29 +#define MCFQSPI_CS1		24 +#define MCFQSPI_CS2		21 +#define MCFQSPI_CS3		22 +#else +#define MCFQSPI_CS0		15 +#define MCFQSPI_CS1		16 +#define MCFQSPI_CS2		24 +#define MCFQSPI_CS3		28 +#endif + +/* + *	I2C module. + */ +#define MCFI2C_BASE0		(MCF_MBAR + 0x280)	/* Base addreess I2C0 */ +#define MCFI2C_SIZE0		0x20			/* Register set size */ + +#define MCFI2C_BASE1		(MCF_MBAR2 + 0x440)	/* Base addreess I2C1 */ +#define MCFI2C_SIZE1		0x20			/* Register set size */ + +/* + *	DMA unit base addresses. + */ +#define MCFDMA_BASE0		(MCF_MBAR + 0x300)	/* Base address DMA 0 */ +#define MCFDMA_BASE1		(MCF_MBAR + 0x340)	/* Base address DMA 1 */ +#define MCFDMA_BASE2		(MCF_MBAR + 0x380)	/* Base address DMA 2 */ +#define MCFDMA_BASE3		(MCF_MBAR + 0x3C0)	/* Base address DMA 3 */ + +/* + *	Some symbol defines for the above... + */ +#define MCFSIM_SWDICR		MCFSIM_ICR0	/* Watchdog timer ICR */ +#define MCFSIM_TIMER1ICR	MCFSIM_ICR1	/* Timer 1 ICR */ +#define MCFSIM_TIMER2ICR	MCFSIM_ICR2	/* Timer 2 ICR */ +#define MCFSIM_I2CICR		MCFSIM_ICR3	/* I2C ICR */ +#define MCFSIM_UART1ICR		MCFSIM_ICR4	/* UART 1 ICR */ +#define MCFSIM_UART2ICR		MCFSIM_ICR5	/* UART 2 ICR */ +#define MCFSIM_DMA0ICR		MCFSIM_ICR6	/* DMA 0 ICR */ +#define MCFSIM_DMA1ICR		MCFSIM_ICR7	/* DMA 1 ICR */ +#define MCFSIM_DMA2ICR		MCFSIM_ICR8	/* DMA 2 ICR */ +#define MCFSIM_DMA3ICR		MCFSIM_ICR9	/* DMA 3 ICR */ +#define MCFSIM_QSPIICR		MCFSIM_ICR10	/* QSPI ICR */ + +/* + *	Define system peripheral IRQ usage. + */ +#define MCF_IRQ_QSPI		28		/* QSPI, Level 4 */ +#define MCF_IRQ_I2C0		29 +#define MCF_IRQ_TIMER		30		/* Timer0, Level 6 */ +#define MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */ + +#define MCF_IRQ_UART0		73		/* UART0 */ +#define MCF_IRQ_UART1		74		/* UART1 */ + +/* + * Define the base interrupt for the second interrupt controller. + * We set it to 128, out of the way of the base interrupts, and plenty + * of room for its 64 interrupts. + */ +#define MCFINTC2_VECBASE	128 + +#define MCF_IRQ_GPIO0		(MCFINTC2_VECBASE + 32) +#define MCF_IRQ_GPIO1		(MCFINTC2_VECBASE + 33) +#define MCF_IRQ_GPIO2		(MCFINTC2_VECBASE + 34) +#define MCF_IRQ_GPIO3		(MCFINTC2_VECBASE + 35) +#define MCF_IRQ_GPIO4		(MCFINTC2_VECBASE + 36) +#define MCF_IRQ_GPIO5		(MCFINTC2_VECBASE + 37) +#define MCF_IRQ_GPIO6		(MCFINTC2_VECBASE + 38) +#define MCF_IRQ_GPIO7		(MCFINTC2_VECBASE + 39) + +#define MCF_IRQ_USBWUP		(MCFINTC2_VECBASE + 40) +#define MCF_IRQ_I2C1		(MCFINTC2_VECBASE + 62) + +/* + *	General purpose IO registers (in MBAR2). + */ +#define MCFSIM2_GPIOREAD	(MCF_MBAR2 + 0x000)	/* GPIO read values */ +#define MCFSIM2_GPIOWRITE	(MCF_MBAR2 + 0x004)	/* GPIO write values */ +#define MCFSIM2_GPIOENABLE	(MCF_MBAR2 + 0x008)	/* GPIO enabled */ +#define MCFSIM2_GPIOFUNC	(MCF_MBAR2 + 0x00C)	/* GPIO function */ +#define MCFSIM2_GPIO1READ	(MCF_MBAR2 + 0x0B0)	/* GPIO1 read values */ +#define MCFSIM2_GPIO1WRITE	(MCF_MBAR2 + 0x0B4)	/* GPIO1 write values */ +#define MCFSIM2_GPIO1ENABLE	(MCF_MBAR2 + 0x0B8)	/* GPIO1 enabled */ +#define MCFSIM2_GPIO1FUNC	(MCF_MBAR2 + 0x0BC)	/* GPIO1 function */ + +#define MCFSIM2_GPIOINTSTAT	(MCF_MBAR2 + 0xc0)	/* GPIO intr status */ +#define MCFSIM2_GPIOINTCLEAR	(MCF_MBAR2 + 0xc0)	/* GPIO intr clear */ +#define MCFSIM2_GPIOINTENABLE	(MCF_MBAR2 + 0xc4)	/* GPIO intr enable */ + +#define MCFSIM2_DMAROUTE	(MCF_MBAR2 + 0x188)     /* DMA routing */ +#define MCFSIM2_IDECONFIG1	(MCF_MBAR2 + 0x18c)	/* IDEconfig1 */ +#define MCFSIM2_IDECONFIG2	(MCF_MBAR2 + 0x190)	/* IDEconfig2 */ + +/* + * Generic GPIO support + */ +#define MCFGPIO_PIN_MAX		64 +#ifdef CONFIG_M5249 +#define MCFGPIO_IRQ_MAX		-1 +#define MCFGPIO_IRQ_VECBASE	-1 +#else +#define MCFGPIO_IRQ_MAX		7 +#define MCFGPIO_IRQ_VECBASE	MCF_IRQ_GPIO0 +#endif + +/****************************************************************************/ + +#ifdef __ASSEMBLER__ +#ifdef CONFIG_M5249C3 +/* + *	The M5249C3 board needs a little help getting all its SIM devices + *	initialized at kernel start time. dBUG doesn't set much up, so + *	we need to do it manually. + */ +.macro m5249c3_setup +	/* +	 *	Set MBAR1 and MBAR2, just incase they are not set. +	 */ +	movel	#0x10000001,%a0 +	movec	%a0,%MBAR			/* map MBAR region */ +	subql	#1,%a0				/* get MBAR address in a0 */ + +	movel	#0x80000001,%a1 +	movec	%a1,#3086			/* map MBAR2 region */ +	subql	#1,%a1				/* get MBAR2 address in a1 */ + +	/* +	 *      Move secondary interrupts to their base (128). +	 */ +	moveb	#MCFINTC2_VECBASE,%d0 +	moveb	%d0,0x16b(%a1)			/* interrupt base register */ + +	/* +	 *      Work around broken CSMR0/DRAM vector problem. +	 */ +	movel	#0x001F0021,%d0			/* disable C/I bit */ +	movel	%d0,0x84(%a0)			/* set CSMR0 */ + +	/* +	 *	Disable the PLL firstly. (Who knows what state it is +	 *	in here!). +	 */ +	movel	0x180(%a1),%d0			/* get current PLL value */ +	andl	#0xfffffffe,%d0			/* PLL bypass first */ +	movel	%d0,0x180(%a1)			/* set PLL register */ +	nop + +#if CONFIG_CLOCK_FREQ == 140000000 +	/* +	 *	Set initial clock frequency. This assumes M5249C3 board +	 *	is fitted with 11.2896MHz crystal. It will program the +	 *	PLL for 140MHz. Lets go fast :-) +	 */ +	movel	#0x125a40f0,%d0			/* set for 140MHz */ +	movel	%d0,0x180(%a1)			/* set PLL register */ +	orl	#0x1,%d0 +	movel	%d0,0x180(%a1)			/* set PLL register */ +#endif + +	/* +	 *	Setup CS1 for ethernet controller. +	 *	(Setup as per M5249C3 doco). +	 */ +	movel  #0xe0000000,%d0			/* CS1 mapped at 0xe0000000 */ +	movel  %d0,0x8c(%a0) +	movel  #0x001f0021,%d0			/* CS1 size of 1Mb */ +	movel  %d0,0x90(%a0) +	movew  #0x0080,%d0			/* CS1 = 16bit port, AA */ +	movew  %d0,0x96(%a0) + +	/* +	 *	Setup CS2 for IDE interface. +	 */ +	movel	#0x50000000,%d0			/* CS2 mapped at 0x50000000 */ +	movel	%d0,0x98(%a0) +	movel	#0x001f0001,%d0			/* CS2 size of 1MB */ +	movel	%d0,0x9c(%a0) +	movew	#0x0080,%d0			/* CS2 = 16bit, TA */ +	movew	%d0,0xa2(%a0) + +	movel	#0x00107000,%d0			/* IDEconfig1 */ +	movel	%d0,0x18c(%a1) +	movel	#0x000c0400,%d0			/* IDEconfig2 */ +	movel	%d0,0x190(%a1) + +	movel	#0x00080000,%d0			/* GPIO19, IDE reset bit */ +	orl	%d0,0xc(%a1)			/* function GPIO19 */ +	orl	%d0,0x8(%a1)			/* enable GPIO19 as output */ +        orl	%d0,0x4(%a1)			/* de-assert IDE reset */ +.endm + +#define	PLATFORM_SETUP	m5249c3_setup + +#endif /* CONFIG_M5249C3 */ +#endif /* __ASSEMBLER__ */ +/****************************************************************************/ +#endif	/* m525xsim_h */ diff --git a/arch/m68k/include/asm/m5272sim.h b/arch/m68k/include/asm/m5272sim.h index df3332c2317..1fb01bb05d6 100644 --- a/arch/m68k/include/asm/m5272sim.h +++ b/arch/m68k/include/asm/m5272sim.h @@ -12,55 +12,64 @@  #define	m5272sim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m5272)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		MCF_CLK + +#include <asm/m52xxacr.h> +  /*   *	Define the 5272 SIM register set addresses.   */ -#define	MCFSIM_SCR		0x04		/* SIM Config reg (r/w) */ -#define	MCFSIM_SPR		0x06		/* System Protection reg (r/w)*/ -#define	MCFSIM_PMR		0x08		/* Power Management reg (r/w) */ -#define	MCFSIM_APMR		0x0e		/* Active Low Power reg (r/w) */ -#define	MCFSIM_DIR		0x10		/* Device Identity reg (r/w) */ - -#define	MCFSIM_ICR1		0x20		/* Intr Ctrl reg 1 (r/w) */ -#define	MCFSIM_ICR2		0x24		/* Intr Ctrl reg 2 (r/w) */ -#define	MCFSIM_ICR3		0x28		/* Intr Ctrl reg 3 (r/w) */ -#define	MCFSIM_ICR4		0x2c		/* Intr Ctrl reg 4 (r/w) */ - -#define MCFSIM_ISR		0x30		/* Interrupt Source reg (r/w) */ -#define MCFSIM_PITR		0x34		/* Interrupt Transition (r/w) */ -#define	MCFSIM_PIWR		0x38		/* Interrupt Wakeup reg (r/w) */ -#define	MCFSIM_PIVR		0x3f		/* Interrupt Vector reg (r/w( */ - -#define	MCFSIM_WRRR		0x280		/* Watchdog reference (r/w) */ -#define	MCFSIM_WIRR		0x284		/* Watchdog interrupt (r/w) */ -#define	MCFSIM_WCR		0x288		/* Watchdog counter (r/w) */ -#define	MCFSIM_WER		0x28c		/* Watchdog event (r/w) */ - -#define	MCFSIM_CSBR0		0x40		/* CS0 Base Address (r/w) */ -#define	MCFSIM_CSOR0		0x44		/* CS0 Option (r/w) */ -#define	MCFSIM_CSBR1		0x48		/* CS1 Base Address (r/w) */ -#define	MCFSIM_CSOR1		0x4c		/* CS1 Option (r/w) */ -#define	MCFSIM_CSBR2		0x50		/* CS2 Base Address (r/w) */ -#define	MCFSIM_CSOR2		0x54		/* CS2 Option (r/w) */ -#define	MCFSIM_CSBR3		0x58		/* CS3 Base Address (r/w) */ -#define	MCFSIM_CSOR3		0x5c		/* CS3 Option (r/w) */ -#define	MCFSIM_CSBR4		0x60		/* CS4 Base Address (r/w) */ -#define	MCFSIM_CSOR4		0x64		/* CS4 Option (r/w) */ -#define	MCFSIM_CSBR5		0x68		/* CS5 Base Address (r/w) */ -#define	MCFSIM_CSOR5		0x6c		/* CS5 Option (r/w) */ -#define	MCFSIM_CSBR6		0x70		/* CS6 Base Address (r/w) */ -#define	MCFSIM_CSOR6		0x74		/* CS6 Option (r/w) */ -#define	MCFSIM_CSBR7		0x78		/* CS7 Base Address (r/w) */ -#define	MCFSIM_CSOR7		0x7c		/* CS7 Option (r/w) */ - -#define	MCFSIM_SDCR		0x180		/* SDRAM Configuration (r/w) */ -#define	MCFSIM_SDTR		0x184		/* SDRAM Timing (r/w) */ -#define	MCFSIM_DCAR0		0x4c		/* DRAM 0 Address reg(r/w) */ -#define	MCFSIM_DCMR0		0x50		/* DRAM 0 Mask reg (r/w) */ -#define	MCFSIM_DCCR0		0x57		/* DRAM 0 Control reg (r/w) */ -#define	MCFSIM_DCAR1		0x58		/* DRAM 1 Address reg (r/w) */ -#define	MCFSIM_DCMR1		0x5c		/* DRAM 1 Mask reg (r/w) */ -#define	MCFSIM_DCCR1		0x63		/* DRAM 1 Control reg (r/w) */ +#define	MCFSIM_SCR		(MCF_MBAR + 0x04)	/* SIM Config reg */ +#define	MCFSIM_SPR		(MCF_MBAR + 0x06)	/* System Protection */ +#define	MCFSIM_PMR		(MCF_MBAR + 0x08)	/* Power Management */ +#define	MCFSIM_APMR		(MCF_MBAR + 0x0e)	/* Active Low Power */ +#define	MCFSIM_DIR		(MCF_MBAR + 0x10)	/* Device Identity */ + +#define	MCFSIM_ICR1		(MCF_MBAR + 0x20)	/* Intr Ctrl reg 1 */ +#define	MCFSIM_ICR2		(MCF_MBAR + 0x24)	/* Intr Ctrl reg 2 */ +#define	MCFSIM_ICR3		(MCF_MBAR + 0x28)	/* Intr Ctrl reg 3 */ +#define	MCFSIM_ICR4		(MCF_MBAR + 0x2c)	/* Intr Ctrl reg 4 */ + +#define	MCFSIM_ISR		(MCF_MBAR + 0x30)	/* Intr Source */ +#define	MCFSIM_PITR		(MCF_MBAR + 0x34)	/* Intr Transition */ +#define	MCFSIM_PIWR		(MCF_MBAR + 0x38)	/* Intr Wakeup */ +#define	MCFSIM_PIVR		(MCF_MBAR + 0x3f)	/* Intr Vector */ + +#define	MCFSIM_WRRR		(MCF_MBAR + 0x280)	/* Watchdog reference */ +#define	MCFSIM_WIRR		(MCF_MBAR + 0x284)	/* Watchdog interrupt */ +#define	MCFSIM_WCR		(MCF_MBAR + 0x288)	/* Watchdog counter */ +#define	MCFSIM_WER		(MCF_MBAR + 0x28c)	/* Watchdog event */ + +#define	MCFSIM_CSBR0		(MCF_MBAR + 0x40)	/* CS0 Base Address */ +#define	MCFSIM_CSOR0		(MCF_MBAR + 0x44)	/* CS0 Option */ +#define	MCFSIM_CSBR1		(MCF_MBAR + 0x48)	/* CS1 Base Address */ +#define	MCFSIM_CSOR1		(MCF_MBAR + 0x4c)	/* CS1 Option */ +#define	MCFSIM_CSBR2		(MCF_MBAR + 0x50)	/* CS2 Base Address */ +#define	MCFSIM_CSOR2		(MCF_MBAR + 0x54)	/* CS2 Option */ +#define	MCFSIM_CSBR3		(MCF_MBAR + 0x58)	/* CS3 Base Address */ +#define	MCFSIM_CSOR3		(MCF_MBAR + 0x5c)	/* CS3 Option */ +#define	MCFSIM_CSBR4		(MCF_MBAR + 0x60)	/* CS4 Base Address */ +#define	MCFSIM_CSOR4		(MCF_MBAR + 0x64)	/* CS4 Option */ +#define	MCFSIM_CSBR5		(MCF_MBAR + 0x68)	/* CS5 Base Address */ +#define	MCFSIM_CSOR5		(MCF_MBAR + 0x6c)	/* CS5 Option */ +#define	MCFSIM_CSBR6		(MCF_MBAR + 0x70)	/* CS6 Base Address */ +#define	MCFSIM_CSOR6		(MCF_MBAR + 0x74)	/* CS6 Option */ +#define	MCFSIM_CSBR7		(MCF_MBAR + 0x78)	/* CS7 Base Address */ +#define	MCFSIM_CSOR7		(MCF_MBAR + 0x7c)	/* CS7 Option */ + +#define	MCFSIM_SDCR		(MCF_MBAR + 0x180)	/* SDRAM Config */ +#define	MCFSIM_SDTR		(MCF_MBAR + 0x184)	/* SDRAM Timing */ +#define	MCFSIM_DCAR0		(MCF_MBAR + 0x4c)	/* DRAM 0 Address */ +#define	MCFSIM_DCMR0		(MCF_MBAR + 0x50)	/* DRAM 0 Mask */ +#define	MCFSIM_DCCR0		(MCF_MBAR + 0x57)	/* DRAM 0 Control */ +#define	MCFSIM_DCAR1		(MCF_MBAR + 0x58)	/* DRAM 1 Address */ +#define	MCFSIM_DCMR1		(MCF_MBAR + 0x5c)	/* DRAM 1 Mask reg */ +#define	MCFSIM_DCCR1		(MCF_MBAR + 0x63)	/* DRAM 1 Control */ + +#define	MCFUART_BASE0		(MCF_MBAR + 0x100) /* Base address UART0 */ +#define	MCFUART_BASE1		(MCF_MBAR + 0x140) /* Base address UART1 */  #define	MCFSIM_PACNT		(MCF_MBAR + 0x80) /* Port A Control (r/w) */  #define	MCFSIM_PADDR		(MCF_MBAR + 0x84) /* Port A Direction (r/w) */ @@ -72,6 +81,16 @@  #define	MCFSIM_PCDAT		(MCF_MBAR + 0x96) /* Port C Data (r/w) */  #define	MCFSIM_PDCNT		(MCF_MBAR + 0x98) /* Port D Control (r/w) */ +#define	MCFDMA_BASE0		(MCF_MBAR + 0xe0) /* Base address DMA 0 */ + +#define	MCFTIMER_BASE1		(MCF_MBAR + 0x200) /* Base address TIMER1 */ +#define	MCFTIMER_BASE2		(MCF_MBAR + 0x220) /* Base address TIMER2 */ +#define	MCFTIMER_BASE3		(MCF_MBAR + 0x240) /* Base address TIMER4 */ +#define	MCFTIMER_BASE4		(MCF_MBAR + 0x260) /* Base address TIMER3 */ + +#define	MCFFEC_BASE0		(MCF_MBAR + 0x840) /* Base FEC ethernet */ +#define	MCFFEC_SIZE0		0x1d0 +  /*   *	Define system peripheral IRQ usage.   */ @@ -85,8 +104,8 @@  #define	MCF_IRQ_TIMER2		70		/* Timer 2 */  #define	MCF_IRQ_TIMER3		71		/* Timer 3 */  #define	MCF_IRQ_TIMER4		72		/* Timer 4 */ -#define	MCF_IRQ_UART1		73		/* UART 1 */ -#define	MCF_IRQ_UART2		74		/* UART 2 */ +#define	MCF_IRQ_UART0		73		/* UART 0 */ +#define	MCF_IRQ_UART1		74		/* UART 1 */  #define	MCF_IRQ_PLIP		75		/* PLIC 2Khz Periodic */  #define	MCF_IRQ_PLIA		76		/* PLIC Asynchronous */  #define	MCF_IRQ_USB0		77		/* USB Endpoint 0 */ @@ -98,9 +117,9 @@  #define	MCF_IRQ_USB6		83		/* USB Endpoint 6 */  #define	MCF_IRQ_USB7		84		/* USB Endpoint 7 */  #define	MCF_IRQ_DMA		85		/* DMA Controller */ -#define	MCF_IRQ_ERX		86		/* Ethernet Receiver */ -#define	MCF_IRQ_ETX		87		/* Ethernet Transmitter */ -#define	MCF_IRQ_ENTC		88		/* Ethernet Non-Time Critical */ +#define	MCF_IRQ_FECRX0		86		/* Ethernet Receiver */ +#define	MCF_IRQ_FECTX0		87		/* Ethernet Transmitter */ +#define	MCF_IRQ_FECENTC0	88		/* Ethernet Non-Time Critical */  #define	MCF_IRQ_QSPI		89		/* Queued Serial Interface */  #define	MCF_IRQ_EINT5		90		/* External Interrupt 5 */  #define	MCF_IRQ_EINT6		91		/* External Interrupt 6 */ @@ -113,8 +132,9 @@  /*   * Generic GPIO support   */ -#define MCFGPIO_PIN_MAX			48 -#define MCFGPIO_IRQ_MAX			-1 -#define MCFGPIO_IRQ_VECBASE		-1 +#define MCFGPIO_PIN_MAX		48 +#define MCFGPIO_IRQ_MAX		-1 +#define MCFGPIO_IRQ_VECBASE	-1 +  /****************************************************************************/  #endif	/* m5272sim_h */ diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h index 1feb46f108c..1bebbe78055 100644 --- a/arch/m68k/include/asm/m527xsim.h +++ b/arch/m68k/include/asm/m527xsim.h @@ -11,12 +11,18 @@  #define	m527xsim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m527x)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m52xxacr.h>  /*   *	Define the 5270/5271 SIM register set addresses.   */ -#define	MCFICM_INTC0		0x0c00		/* Base for Interrupt Ctrl 0 */ -#define	MCFICM_INTC1		0x0d00		/* Base for Interrupt Ctrl 1 */ +#define	MCFICM_INTC0		(MCF_IPSBAR + 0x0c00)	/* Base for Interrupt Ctrl 0 */ +#define	MCFICM_INTC1		(MCF_IPSBAR + 0x0d00)	/* Base for Interrupt Ctrl 1 */ +  #define	MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */  #define	MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */  #define	MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */ @@ -32,30 +38,96 @@  #define	MCFINT_UART1		14		/* Interrupt number for UART1 */  #define	MCFINT_UART2		15		/* Interrupt number for UART2 */  #define	MCFINT_QSPI		18		/* Interrupt number for QSPI */ +#define	MCFINT_FECRX0		23		/* Interrupt number for FEC0 */ +#define	MCFINT_FECTX0		27		/* Interrupt number for FEC0 */ +#define	MCFINT_FECENTC0		29		/* Interrupt number for FEC0 */  #define	MCFINT_PIT1		36		/* Interrupt number for PIT1 */ +#define	MCFINT2_VECBASE		128		/* Vector base number 2 */ +#define	MCFINT2_FECRX1		23		/* Interrupt number for FEC1 */ +#define	MCFINT2_FECTX1		27		/* Interrupt number for FEC1 */ +#define	MCFINT2_FECENTC1	29		/* Interrupt number for FEC1 */ + +#define	MCF_IRQ_UART0	        (MCFINT_VECBASE + MCFINT_UART0) +#define	MCF_IRQ_UART1	        (MCFINT_VECBASE + MCFINT_UART1) +#define	MCF_IRQ_UART2	        (MCFINT_VECBASE + MCFINT_UART2) + +#define	MCF_IRQ_FECRX0		(MCFINT_VECBASE + MCFINT_FECRX0) +#define	MCF_IRQ_FECTX0		(MCFINT_VECBASE + MCFINT_FECTX0) +#define	MCF_IRQ_FECENTC0	(MCFINT_VECBASE + MCFINT_FECENTC0) +#define	MCF_IRQ_FECRX1		(MCFINT2_VECBASE + MCFINT2_FECRX1) +#define	MCF_IRQ_FECTX1		(MCFINT2_VECBASE + MCFINT2_FECTX1) +#define	MCF_IRQ_FECENTC1	(MCFINT2_VECBASE + MCFINT2_FECENTC1) + +#define	MCF_IRQ_QSPI		(MCFINT_VECBASE + MCFINT_QSPI) +#define MCF_IRQ_PIT1		(MCFINT_VECBASE + MCFINT_PIT1) +  /*   *	SDRAM configuration registers.   */  #ifdef CONFIG_M5271 -#define	MCFSIM_DCR		0x40		/* SDRAM control */ -#define	MCFSIM_DACR0		0x48		/* SDRAM base address 0 */ -#define	MCFSIM_DMR0		0x4c		/* SDRAM address mask 0 */ -#define	MCFSIM_DACR1		0x50		/* SDRAM base address 1 */ -#define	MCFSIM_DMR1		0x54		/* SDRAM address mask 1 */ +#define	MCFSIM_DCR		(MCF_IPSBAR + 0x40)	/* Control */ +#define	MCFSIM_DACR0		(MCF_IPSBAR + 0x48)	/* Base address 0 */ +#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x4c)	/* Address mask 0 */ +#define	MCFSIM_DACR1		(MCF_IPSBAR + 0x50)	/* Base address 1 */ +#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x54)	/* Address mask 1 */  #endif  #ifdef CONFIG_M5275 -#define	MCFSIM_DMR		0x40		/* SDRAM mode */ -#define	MCFSIM_DCR		0x44		/* SDRAM control */ -#define	MCFSIM_DCFG1		0x48		/* SDRAM configuration 1 */ -#define	MCFSIM_DCFG2		0x4c		/* SDRAM configuration 2 */ -#define	MCFSIM_DBAR0		0x50		/* SDRAM base address 0 */ -#define	MCFSIM_DMR0		0x54		/* SDRAM address mask 0 */ -#define	MCFSIM_DBAR1		0x58		/* SDRAM base address 1 */ -#define	MCFSIM_DMR1		0x5c		/* SDRAM address mask 1 */ +#define	MCFSIM_DMR		(MCF_IPSBAR + 0x40)	/* Mode */ +#define	MCFSIM_DCR		(MCF_IPSBAR + 0x44)	/* Control */ +#define	MCFSIM_DCFG1		(MCF_IPSBAR + 0x48)	/* Configuration 1 */ +#define	MCFSIM_DCFG2		(MCF_IPSBAR + 0x4c)	/* Configuration 2 */ +#define	MCFSIM_DBAR0		(MCF_IPSBAR + 0x50)	/* Base address 0 */ +#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x54)	/* Address mask 0 */ +#define	MCFSIM_DBAR1		(MCF_IPSBAR + 0x58)	/* Base address 1 */ +#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x5c)	/* Address mask 1 */  #endif +/* + *	DMA unit base addresses. + */ +#define	MCFDMA_BASE0		(MCF_IPSBAR + 0x100) +#define	MCFDMA_BASE1		(MCF_IPSBAR + 0x140) +#define	MCFDMA_BASE2		(MCF_IPSBAR + 0x180) +#define	MCFDMA_BASE3		(MCF_IPSBAR + 0x1C0) + +/* + *	UART module. + */ +#define MCFUART_BASE0		(MCF_IPSBAR + 0x200) +#define MCFUART_BASE1		(MCF_IPSBAR + 0x240) +#define MCFUART_BASE2		(MCF_IPSBAR + 0x280) + +/* + *	FEC ethernet module. + */ +#define	MCFFEC_BASE0		(MCF_IPSBAR + 0x1000) +#define	MCFFEC_SIZE0		0x800 +#define	MCFFEC_BASE1		(MCF_IPSBAR + 0x1800) +#define	MCFFEC_SIZE1		0x800 + +/* + *	QSPI module. + */ +#define	MCFQSPI_BASE		(MCF_IPSBAR + 0x340) +#define	MCFQSPI_SIZE		0x40 + +#ifdef CONFIG_M5271 +#define	MCFQSPI_CS0		91 +#define	MCFQSPI_CS1		92 +#define	MCFQSPI_CS2		99 +#define	MCFQSPI_CS3		103 +#endif +#ifdef CONFIG_M5275 +#define	MCFQSPI_CS0		59 +#define	MCFQSPI_CS1		60 +#define	MCFQSPI_CS2		61 +#define	MCFQSPI_CS3		62 +#endif +/* + *	GPIO module. + */  #ifdef CONFIG_M5271  #define MCFGPIO_PODR_ADDR	(MCF_IPSBAR + 0x100000)  #define MCFGPIO_PODR_DATAH	(MCF_IPSBAR + 0x100001) @@ -112,19 +184,33 @@  /*   * Generic GPIO support   */ -#define MCFGPIO_PODR			MCFGPIO_PODR_ADDR -#define MCFGPIO_PDDR			MCFGPIO_PDDR_ADDR -#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_ADDR -#define MCFGPIO_SETR			MCFGPIO_PPDSDR_ADDR -#define MCFGPIO_CLRR			MCFGPIO_PCLRR_ADDR +#define MCFGPIO_PODR		MCFGPIO_PODR_ADDR +#define MCFGPIO_PDDR		MCFGPIO_PDDR_ADDR +#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_ADDR +#define MCFGPIO_SETR		MCFGPIO_PPDSDR_ADDR +#define MCFGPIO_CLRR		MCFGPIO_PCLRR_ADDR -#define MCFGPIO_PIN_MAX			100 -#define MCFGPIO_IRQ_MAX			8 -#define MCFGPIO_IRQ_VECBASE		MCFINT_VECBASE +#define MCFGPIO_PIN_MAX		100 +#define MCFGPIO_IRQ_MAX		8 +#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE +/* + * Port Pin Assignment registers. + */ +#define MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100040) +#define MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100042) +#define MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100044) +#define MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100045) +#define MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100046) +#define MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100047) +#define MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x100048)  #define MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10004A)  #define MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10004C) -#endif + +#define UART0_ENABLE_MASK	0x000f +#define UART1_ENABLE_MASK	0x0ff0 +#define UART2_ENABLE_MASK	0x3000 +#endif /* CONFIG_M5271 */  #ifdef CONFIG_M5275  #define MCFGPIO_PODR_BUSCTL	(MCF_IPSBAR + 0x100004) @@ -207,50 +293,60 @@  /*   * Generic GPIO support   */ -#define MCFGPIO_PODR			MCFGPIO_PODR_BUSCTL -#define MCFGPIO_PDDR			MCFGPIO_PDDR_BUSCTL -#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_BUSCTL -#define MCFGPIO_SETR			MCFGPIO_PPDSDR_BUSCTL -#define MCFGPIO_CLRR			MCFGPIO_PCLRR_BUSCTL +#define MCFGPIO_PODR		MCFGPIO_PODR_BUSCTL +#define MCFGPIO_PDDR		MCFGPIO_PDDR_BUSCTL +#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_BUSCTL +#define MCFGPIO_SETR		MCFGPIO_PPDSDR_BUSCTL +#define MCFGPIO_CLRR		MCFGPIO_PCLRR_BUSCTL -#define MCFGPIO_PIN_MAX			148 -#define MCFGPIO_IRQ_MAX			8 -#define MCFGPIO_IRQ_VECBASE		MCFINT_VECBASE +#define MCFGPIO_PIN_MAX		148 +#define MCFGPIO_IRQ_MAX		8 +#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE +/* + * Port Pin Assignment registers. + */ +#define MCFGPIO_PAR_AD		(MCF_IPSBAR + 0x100070) +#define MCFGPIO_PAR_CS		(MCF_IPSBAR + 0x100071) +#define MCFGPIO_PAR_BUSCTL	(MCF_IPSBAR + 0x100072) +#define MCFGPIO_PAR_USB		(MCF_IPSBAR + 0x100076) +#define MCFGPIO_PAR_FEC0HL	(MCF_IPSBAR + 0x100078) +#define MCFGPIO_PAR_FEC1HL	(MCF_IPSBAR + 0x100079) +#define MCFGPIO_PAR_TIMER	(MCF_IPSBAR + 0x10007A) +#define MCFGPIO_PAR_UART	(MCF_IPSBAR + 0x10007C)  #define MCFGPIO_PAR_QSPI	(MCF_IPSBAR + 0x10007E) -#endif +#define MCFGPIO_PAR_SDRAM	(MCF_IPSBAR + 0x100080) +#define MCFGPIO_PAR_FECI2C	(MCF_IPSBAR + 0x100082) +#define MCFGPIO_PAR_BS		(MCF_IPSBAR + 0x100084) + +#define UART0_ENABLE_MASK	0x000f +#define UART1_ENABLE_MASK	0x00f0 +#define UART2_ENABLE_MASK	0x3f00 +#endif /* CONFIG_M5275 */  /* - * EPort + * PIT timer base addresses.   */ +#define	MCFPIT_BASE1		(MCF_IPSBAR + 0x150000) +#define	MCFPIT_BASE2		(MCF_IPSBAR + 0x160000) +#define	MCFPIT_BASE3		(MCF_IPSBAR + 0x170000) +#define	MCFPIT_BASE4		(MCF_IPSBAR + 0x180000) +/* + * EPort + */ +#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)  #define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002) +#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)  #define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)  #define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005) - - - -/* - *	GPIO pins setups to enable the UARTs. - */ -#ifdef CONFIG_M5271 -#define MCF_GPIO_PAR_UART	0x100048	/* PAR UART address */ -#define UART0_ENABLE_MASK	0x000f -#define UART1_ENABLE_MASK	0x0ff0 -#define UART2_ENABLE_MASK	0x3000 -#endif -#ifdef CONFIG_M5275 -#define MCF_GPIO_PAR_UART	0x10007c	/* PAR UART address */ -#define UART0_ENABLE_MASK	0x000f -#define UART1_ENABLE_MASK	0x00f0 -#define UART2_ENABLE_MASK	0x3f00  -#endif +#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)  /* - *  Reset Controll Unit (relative to IPSBAR). + *  Reset Control Unit (relative to IPSBAR).   */ -#define	MCF_RCR			0x110000 -#define	MCF_RSR			0x110001 +#define	MCF_RCR			(MCF_IPSBAR + 0x110000) +#define	MCF_RSR			(MCF_IPSBAR + 0x110001)  #define	MCF_RCR_SWRESET		0x80		/* Software reset bit */  #define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ diff --git a/arch/m68k/include/asm/m528xsim.h b/arch/m68k/include/asm/m528xsim.h index 891cbedad97..cf68ca0ac3a 100644 --- a/arch/m68k/include/asm/m528xsim.h +++ b/arch/m68k/include/asm/m528xsim.h @@ -11,12 +11,18 @@  #define	m528xsim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m528x)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		MCF_CLK + +#include <asm/m52xxacr.h>  /*   *	Define the 5280/5282 SIM register set addresses.   */ -#define	MCFICM_INTC0		0x0c00		/* Base for Interrupt Ctrl 0 */ -#define	MCFICM_INTC1		0x0d00		/* Base for Interrupt Ctrl 0 */ +#define	MCFICM_INTC0		(MCF_IPSBAR + 0x0c00)	/* Base for Interrupt Ctrl 0 */ +#define	MCFICM_INTC1		(MCF_IPSBAR + 0x0d00)	/* Base for Interrupt Ctrl 0 */ +  #define	MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */  #define	MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */  #define	MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */ @@ -29,115 +35,143 @@  #define	MCFINT_VECBASE		64		/* Vector base number */  #define	MCFINT_UART0		13		/* Interrupt number for UART0 */ +#define	MCFINT_UART1		14		/* Interrupt number for UART1 */ +#define	MCFINT_UART2		15		/* Interrupt number for UART2 */  #define	MCFINT_QSPI		18		/* Interrupt number for QSPI */ +#define	MCFINT_FECRX0		23		/* Interrupt number for FEC */ +#define	MCFINT_FECTX0		27		/* Interrupt number for FEC */ +#define	MCFINT_FECENTC0		29		/* Interrupt number for FEC */  #define	MCFINT_PIT1		55		/* Interrupt number for PIT1 */ +#define	MCF_IRQ_UART0	        (MCFINT_VECBASE + MCFINT_UART0) +#define	MCF_IRQ_UART1	        (MCFINT_VECBASE + MCFINT_UART1) +#define	MCF_IRQ_UART2	        (MCFINT_VECBASE + MCFINT_UART2) + +#define	MCF_IRQ_FECRX0		(MCFINT_VECBASE + MCFINT_FECRX0) +#define	MCF_IRQ_FECTX0		(MCFINT_VECBASE + MCFINT_FECTX0) +#define	MCF_IRQ_FECENTC0	(MCFINT_VECBASE + MCFINT_FECENTC0) + +#define	MCF_IRQ_QSPI		(MCFINT_VECBASE + MCFINT_QSPI) +#define MCF_IRQ_PIT1		(MCFINT_VECBASE + MCFINT_PIT1)  /*   *	SDRAM configuration registers.   */ -#define	MCFSIM_DCR		0x44		/* SDRAM control */ -#define	MCFSIM_DACR0		0x48		/* SDRAM base address 0 */ -#define	MCFSIM_DMR0		0x4c		/* SDRAM address mask 0 */ -#define	MCFSIM_DACR1		0x50		/* SDRAM base address 1 */ -#define	MCFSIM_DMR1		0x54		/* SDRAM address mask 1 */ +#define	MCFSIM_DCR		(MCF_IPSBAR + 0x00000044) /* Control */ +#define	MCFSIM_DACR0		(MCF_IPSBAR + 0x00000048) /* Base address 0 */ +#define	MCFSIM_DMR0		(MCF_IPSBAR + 0x0000004c) /* Address mask 0 */ +#define	MCFSIM_DACR1		(MCF_IPSBAR + 0x00000050) /* Base address 1 */ +#define	MCFSIM_DMR1		(MCF_IPSBAR + 0x00000054) /* Address mask 1 */ + +/* + *	DMA unit base addresses. + */ +#define	MCFDMA_BASE0		(MCF_IPSBAR + 0x00000100) +#define	MCFDMA_BASE1		(MCF_IPSBAR + 0x00000140) +#define	MCFDMA_BASE2		(MCF_IPSBAR + 0x00000180) +#define	MCFDMA_BASE3		(MCF_IPSBAR + 0x000001C0) + +/* + *	UART module. + */ +#define	MCFUART_BASE0		(MCF_IPSBAR + 0x00000200) +#define	MCFUART_BASE1		(MCF_IPSBAR + 0x00000240) +#define	MCFUART_BASE2		(MCF_IPSBAR + 0x00000280) + +/* + *	FEC ethernet module. + */ +#define	MCFFEC_BASE0		(MCF_IPSBAR + 0x00001000) +#define	MCFFEC_SIZE0		0x800 + +/* + *	QSPI module. + */ +#define	MCFQSPI_BASE		(MCF_IPSBAR + 0x340) +#define	MCFQSPI_SIZE		0x40 + +#define	MCFQSPI_CS0		147 +#define	MCFQSPI_CS1		148 +#define	MCFQSPI_CS2		149 +#define	MCFQSPI_CS3		150  /*   * 	GPIO registers   */ -#define MCFGPIO_PORTA		(MCF_IPSBAR + 0x00100000) -#define MCFGPIO_PORTB		(MCF_IPSBAR + 0x00100001) -#define MCFGPIO_PORTC		(MCF_IPSBAR + 0x00100002) -#define MCFGPIO_PORTD		(MCF_IPSBAR + 0x00100003) -#define MCFGPIO_PORTE		(MCF_IPSBAR + 0x00100004) -#define MCFGPIO_PORTF		(MCF_IPSBAR + 0x00100005) -#define MCFGPIO_PORTG		(MCF_IPSBAR + 0x00100006) -#define MCFGPIO_PORTH		(MCF_IPSBAR + 0x00100007) -#define MCFGPIO_PORTJ		(MCF_IPSBAR + 0x00100008) -#define MCFGPIO_PORTDD		(MCF_IPSBAR + 0x00100009) -#define MCFGPIO_PORTEH		(MCF_IPSBAR + 0x0010000A) -#define MCFGPIO_PORTEL		(MCF_IPSBAR + 0x0010000B) -#define MCFGPIO_PORTAS		(MCF_IPSBAR + 0x0010000C) -#define MCFGPIO_PORTQS		(MCF_IPSBAR + 0x0010000D) -#define MCFGPIO_PORTSD		(MCF_IPSBAR + 0x0010000E) -#define MCFGPIO_PORTTC		(MCF_IPSBAR + 0x0010000F) -#define MCFGPIO_PORTTD		(MCF_IPSBAR + 0x00100010) -#define MCFGPIO_PORTUA		(MCF_IPSBAR + 0x00100011) - -#define MCFGPIO_DDRA		(MCF_IPSBAR + 0x00100014) -#define MCFGPIO_DDRB		(MCF_IPSBAR + 0x00100015) -#define MCFGPIO_DDRC		(MCF_IPSBAR + 0x00100016) -#define MCFGPIO_DDRD		(MCF_IPSBAR + 0x00100017) -#define MCFGPIO_DDRE		(MCF_IPSBAR + 0x00100018) -#define MCFGPIO_DDRF		(MCF_IPSBAR + 0x00100019) -#define MCFGPIO_DDRG		(MCF_IPSBAR + 0x0010001A) -#define MCFGPIO_DDRH		(MCF_IPSBAR + 0x0010001B) -#define MCFGPIO_DDRJ		(MCF_IPSBAR + 0x0010001C) -#define MCFGPIO_DDRDD		(MCF_IPSBAR + 0x0010001D) -#define MCFGPIO_DDREH		(MCF_IPSBAR + 0x0010001E) -#define MCFGPIO_DDREL		(MCF_IPSBAR + 0x0010001F) -#define MCFGPIO_DDRAS		(MCF_IPSBAR + 0x00100020) -#define MCFGPIO_DDRQS		(MCF_IPSBAR + 0x00100021) -#define MCFGPIO_DDRSD		(MCF_IPSBAR + 0x00100022) -#define MCFGPIO_DDRTC		(MCF_IPSBAR + 0x00100023) -#define MCFGPIO_DDRTD		(MCF_IPSBAR + 0x00100024) -#define MCFGPIO_DDRUA		(MCF_IPSBAR + 0x00100025) - -#define MCFGPIO_PORTAP		(MCF_IPSBAR + 0x00100028) -#define MCFGPIO_PORTBP		(MCF_IPSBAR + 0x00100029) -#define MCFGPIO_PORTCP		(MCF_IPSBAR + 0x0010002A) -#define MCFGPIO_PORTDP		(MCF_IPSBAR + 0x0010002B) -#define MCFGPIO_PORTEP		(MCF_IPSBAR + 0x0010002C) -#define MCFGPIO_PORTFP		(MCF_IPSBAR + 0x0010002D) -#define MCFGPIO_PORTGP		(MCF_IPSBAR + 0x0010002E) -#define MCFGPIO_PORTHP		(MCF_IPSBAR + 0x0010002F) -#define MCFGPIO_PORTJP		(MCF_IPSBAR + 0x00100030) -#define MCFGPIO_PORTDDP		(MCF_IPSBAR + 0x00100031) -#define MCFGPIO_PORTEHP		(MCF_IPSBAR + 0x00100032) -#define MCFGPIO_PORTELP		(MCF_IPSBAR + 0x00100033) -#define MCFGPIO_PORTASP		(MCF_IPSBAR + 0x00100034) -#define MCFGPIO_PORTQSP		(MCF_IPSBAR + 0x00100035) -#define MCFGPIO_PORTSDP		(MCF_IPSBAR + 0x00100036) -#define MCFGPIO_PORTTCP		(MCF_IPSBAR + 0x00100037) -#define MCFGPIO_PORTTDP		(MCF_IPSBAR + 0x00100038) -#define MCFGPIO_PORTUAP		(MCF_IPSBAR + 0x00100039) - -#define MCFGPIO_SETA		(MCF_IPSBAR + 0x00100028) -#define MCFGPIO_SETB		(MCF_IPSBAR + 0x00100029) -#define MCFGPIO_SETC		(MCF_IPSBAR + 0x0010002A) -#define MCFGPIO_SETD		(MCF_IPSBAR + 0x0010002B) -#define MCFGPIO_SETE		(MCF_IPSBAR + 0x0010002C) -#define MCFGPIO_SETF		(MCF_IPSBAR + 0x0010002D) -#define MCFGPIO_SETG		(MCF_IPSBAR + 0x0010002E) -#define MCFGPIO_SETH		(MCF_IPSBAR + 0x0010002F) -#define MCFGPIO_SETJ		(MCF_IPSBAR + 0x00100030) -#define MCFGPIO_SETDD		(MCF_IPSBAR + 0x00100031) -#define MCFGPIO_SETEH		(MCF_IPSBAR + 0x00100032) -#define MCFGPIO_SETEL		(MCF_IPSBAR + 0x00100033) -#define MCFGPIO_SETAS		(MCF_IPSBAR + 0x00100034) -#define MCFGPIO_SETQS		(MCF_IPSBAR + 0x00100035) -#define MCFGPIO_SETSD		(MCF_IPSBAR + 0x00100036) -#define MCFGPIO_SETTC		(MCF_IPSBAR + 0x00100037) -#define MCFGPIO_SETTD		(MCF_IPSBAR + 0x00100038) -#define MCFGPIO_SETUA		(MCF_IPSBAR + 0x00100039) - -#define MCFGPIO_CLRA		(MCF_IPSBAR + 0x0010003C) -#define MCFGPIO_CLRB		(MCF_IPSBAR + 0x0010003D) -#define MCFGPIO_CLRC		(MCF_IPSBAR + 0x0010003E) -#define MCFGPIO_CLRD		(MCF_IPSBAR + 0x0010003F) -#define MCFGPIO_CLRE		(MCF_IPSBAR + 0x00100040) -#define MCFGPIO_CLRF		(MCF_IPSBAR + 0x00100041) -#define MCFGPIO_CLRG		(MCF_IPSBAR + 0x00100042) -#define MCFGPIO_CLRH		(MCF_IPSBAR + 0x00100043) -#define MCFGPIO_CLRJ		(MCF_IPSBAR + 0x00100044) -#define MCFGPIO_CLRDD		(MCF_IPSBAR + 0x00100045) -#define MCFGPIO_CLREH		(MCF_IPSBAR + 0x00100046) -#define MCFGPIO_CLREL		(MCF_IPSBAR + 0x00100047) -#define MCFGPIO_CLRAS		(MCF_IPSBAR + 0x00100048) -#define MCFGPIO_CLRQS		(MCF_IPSBAR + 0x00100049) -#define MCFGPIO_CLRSD		(MCF_IPSBAR + 0x0010004A) -#define MCFGPIO_CLRTC		(MCF_IPSBAR + 0x0010004B) -#define MCFGPIO_CLRTD		(MCF_IPSBAR + 0x0010004C) -#define MCFGPIO_CLRUA		(MCF_IPSBAR + 0x0010004D) +#define MCFGPIO_PODR_A		(MCF_IPSBAR + 0x00100000) +#define MCFGPIO_PODR_B		(MCF_IPSBAR + 0x00100001) +#define MCFGPIO_PODR_C		(MCF_IPSBAR + 0x00100002) +#define MCFGPIO_PODR_D		(MCF_IPSBAR + 0x00100003) +#define MCFGPIO_PODR_E		(MCF_IPSBAR + 0x00100004) +#define MCFGPIO_PODR_F		(MCF_IPSBAR + 0x00100005) +#define MCFGPIO_PODR_G		(MCF_IPSBAR + 0x00100006) +#define MCFGPIO_PODR_H		(MCF_IPSBAR + 0x00100007) +#define MCFGPIO_PODR_J		(MCF_IPSBAR + 0x00100008) +#define MCFGPIO_PODR_DD		(MCF_IPSBAR + 0x00100009) +#define MCFGPIO_PODR_EH		(MCF_IPSBAR + 0x0010000A) +#define MCFGPIO_PODR_EL		(MCF_IPSBAR + 0x0010000B) +#define MCFGPIO_PODR_AS		(MCF_IPSBAR + 0x0010000C) +#define MCFGPIO_PODR_QS		(MCF_IPSBAR + 0x0010000D) +#define MCFGPIO_PODR_SD		(MCF_IPSBAR + 0x0010000E) +#define MCFGPIO_PODR_TC		(MCF_IPSBAR + 0x0010000F) +#define MCFGPIO_PODR_TD		(MCF_IPSBAR + 0x00100010) +#define MCFGPIO_PODR_UA		(MCF_IPSBAR + 0x00100011) + +#define MCFGPIO_PDDR_A		(MCF_IPSBAR + 0x00100014) +#define MCFGPIO_PDDR_B		(MCF_IPSBAR + 0x00100015) +#define MCFGPIO_PDDR_C		(MCF_IPSBAR + 0x00100016) +#define MCFGPIO_PDDR_D		(MCF_IPSBAR + 0x00100017) +#define MCFGPIO_PDDR_E		(MCF_IPSBAR + 0x00100018) +#define MCFGPIO_PDDR_F		(MCF_IPSBAR + 0x00100019) +#define MCFGPIO_PDDR_G		(MCF_IPSBAR + 0x0010001A) +#define MCFGPIO_PDDR_H		(MCF_IPSBAR + 0x0010001B) +#define MCFGPIO_PDDR_J		(MCF_IPSBAR + 0x0010001C) +#define MCFGPIO_PDDR_DD		(MCF_IPSBAR + 0x0010001D) +#define MCFGPIO_PDDR_EH		(MCF_IPSBAR + 0x0010001E) +#define MCFGPIO_PDDR_EL		(MCF_IPSBAR + 0x0010001F) +#define MCFGPIO_PDDR_AS		(MCF_IPSBAR + 0x00100020) +#define MCFGPIO_PDDR_QS		(MCF_IPSBAR + 0x00100021) +#define MCFGPIO_PDDR_SD		(MCF_IPSBAR + 0x00100022) +#define MCFGPIO_PDDR_TC		(MCF_IPSBAR + 0x00100023) +#define MCFGPIO_PDDR_TD		(MCF_IPSBAR + 0x00100024) +#define MCFGPIO_PDDR_UA		(MCF_IPSBAR + 0x00100025) + +#define MCFGPIO_PPDSDR_A	(MCF_IPSBAR + 0x00100028) +#define MCFGPIO_PPDSDR_B	(MCF_IPSBAR + 0x00100029) +#define MCFGPIO_PPDSDR_C	(MCF_IPSBAR + 0x0010002A) +#define MCFGPIO_PPDSDR_D	(MCF_IPSBAR + 0x0010002B) +#define MCFGPIO_PPDSDR_E	(MCF_IPSBAR + 0x0010002C) +#define MCFGPIO_PPDSDR_F	(MCF_IPSBAR + 0x0010002D) +#define MCFGPIO_PPDSDR_G	(MCF_IPSBAR + 0x0010002E) +#define MCFGPIO_PPDSDR_H	(MCF_IPSBAR + 0x0010002F) +#define MCFGPIO_PPDSDR_J	(MCF_IPSBAR + 0x00100030) +#define MCFGPIO_PPDSDR_DD	(MCF_IPSBAR + 0x00100031) +#define MCFGPIO_PPDSDR_EH	(MCF_IPSBAR + 0x00100032) +#define MCFGPIO_PPDSDR_EL	(MCF_IPSBAR + 0x00100033) +#define MCFGPIO_PPDSDR_AS	(MCF_IPSBAR + 0x00100034) +#define MCFGPIO_PPDSDR_QS	(MCF_IPSBAR + 0x00100035) +#define MCFGPIO_PPDSDR_SD	(MCF_IPSBAR + 0x00100036) +#define MCFGPIO_PPDSDR_TC	(MCF_IPSBAR + 0x00100037) +#define MCFGPIO_PPDSDR_TD	(MCF_IPSBAR + 0x00100038) +#define MCFGPIO_PPDSDR_UA	(MCF_IPSBAR + 0x00100039) + +#define MCFGPIO_PCLRR_A		(MCF_IPSBAR + 0x0010003C) +#define MCFGPIO_PCLRR_B		(MCF_IPSBAR + 0x0010003D) +#define MCFGPIO_PCLRR_C		(MCF_IPSBAR + 0x0010003E) +#define MCFGPIO_PCLRR_D		(MCF_IPSBAR + 0x0010003F) +#define MCFGPIO_PCLRR_E		(MCF_IPSBAR + 0x00100040) +#define MCFGPIO_PCLRR_F		(MCF_IPSBAR + 0x00100041) +#define MCFGPIO_PCLRR_G		(MCF_IPSBAR + 0x00100042) +#define MCFGPIO_PCLRR_H		(MCF_IPSBAR + 0x00100043) +#define MCFGPIO_PCLRR_J		(MCF_IPSBAR + 0x00100044) +#define MCFGPIO_PCLRR_DD	(MCF_IPSBAR + 0x00100045) +#define MCFGPIO_PCLRR_EH	(MCF_IPSBAR + 0x00100046) +#define MCFGPIO_PCLRR_EL	(MCF_IPSBAR + 0x00100047) +#define MCFGPIO_PCLRR_AS	(MCF_IPSBAR + 0x00100048) +#define MCFGPIO_PCLRR_QS	(MCF_IPSBAR + 0x00100049) +#define MCFGPIO_PCLRR_SD	(MCF_IPSBAR + 0x0010004A) +#define MCFGPIO_PCLRR_TC	(MCF_IPSBAR + 0x0010004B) +#define MCFGPIO_PCLRR_TD	(MCF_IPSBAR + 0x0010004C) +#define MCFGPIO_PCLRR_UA	(MCF_IPSBAR + 0x0010004D)  #define MCFGPIO_PBCDPAR		(MCF_IPSBAR + 0x00100050)  #define MCFGPIO_PFPAR		(MCF_IPSBAR + 0x00100051) @@ -152,6 +186,14 @@  #define MCFGPIO_PUAPAR		(MCF_IPSBAR + 0x0010005C)  /* + * PIT timer base addresses. + */ +#define	MCFPIT_BASE1		(MCF_IPSBAR + 0x00150000) +#define	MCFPIT_BASE2		(MCF_IPSBAR + 0x00160000) +#define	MCFPIT_BASE3		(MCF_IPSBAR + 0x00170000) +#define	MCFPIT_BASE4		(MCF_IPSBAR + 0x00180000) + +/*   * 	Edge Port registers   */  #define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x00130000) @@ -181,73 +223,24 @@   * definitions for generic gpio support   *   */ -#define MCFGPIO_PODR		MCFGPIO_PORTA	/* port output data */ -#define MCFGPIO_PDDR		MCFGPIO_DDRA	/* port data direction */ -#define MCFGPIO_PPDR		MCFGPIO_PORTAP	/* port pin data */ -#define MCFGPIO_SETR		MCFGPIO_SETA	/* set output */ -#define MCFGPIO_CLRR		MCFGPIO_CLRA	/* clr output */ +#define MCFGPIO_PODR		MCFGPIO_PODR_A	/* port output data */ +#define MCFGPIO_PDDR		MCFGPIO_PDDR_A	/* port data direction */ +#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_A/* port pin data */ +#define MCFGPIO_SETR		MCFGPIO_PPDSDR_A/* set output */ +#define MCFGPIO_CLRR		MCFGPIO_PCLRR_A	/* clr output */  #define MCFGPIO_IRQ_MAX		8  #define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE  #define MCFGPIO_PIN_MAX		180 - -/* - *	Derek Cheung - 6 Feb 2005 - *		add I2C and QSPI register definition using Freescale's MCF5282 - */ -/* set Port AS pin for I2C or UART */ -#define MCF5282_GPIO_PASPAR     (volatile u16 *) (MCF_IPSBAR + 0x00100056) - -/* Port UA Pin Assignment Register (8 Bit) */ -#define MCF5282_GPIO_PUAPAR	0x10005C - -/* Interrupt Mask Register Register Low */  -#define MCF5282_INTC0_IMRL      (volatile u32 *) (MCF_IPSBAR + 0x0C0C) -/* Interrupt Control Register 7 */ -#define MCF5282_INTC0_ICR17     (volatile u8 *) (MCF_IPSBAR + 0x0C51) - -  /*   *  Reset Control Unit (relative to IPSBAR).   */ -#define	MCF_RCR			0x110000 -#define	MCF_RSR			0x110001 +#define	MCF_RCR			(MCF_IPSBAR + 0x110000) +#define	MCF_RSR			(MCF_IPSBAR + 0x110001)  #define	MCF_RCR_SWRESET		0x80		/* Software reset bit */  #define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ -/********************************************************************* -* -* Inter-IC (I2C) Module -* -*********************************************************************/ -/* Read/Write access macros for general use */ -#define MCF5282_I2C_I2ADR       (volatile u8 *) (MCF_IPSBAR + 0x0300) // Address  -#define MCF5282_I2C_I2FDR       (volatile u8 *) (MCF_IPSBAR + 0x0304) // Freq Divider -#define MCF5282_I2C_I2CR        (volatile u8 *) (MCF_IPSBAR + 0x0308) // Control -#define MCF5282_I2C_I2SR        (volatile u8 *) (MCF_IPSBAR + 0x030C) // Status -#define MCF5282_I2C_I2DR        (volatile u8 *) (MCF_IPSBAR + 0x0310) // Data I/O - -/* Bit level definitions and macros */ -#define MCF5282_I2C_I2ADR_ADDR(x)                       (((x)&0x7F)<<0x01) - -#define MCF5282_I2C_I2FDR_IC(x)                         (((x)&0x3F)) - -#define MCF5282_I2C_I2CR_IEN    (0x80)	// I2C enable -#define MCF5282_I2C_I2CR_IIEN   (0x40)  // interrupt enable -#define MCF5282_I2C_I2CR_MSTA   (0x20)  // master/slave mode -#define MCF5282_I2C_I2CR_MTX    (0x10)  // transmit/receive mode -#define MCF5282_I2C_I2CR_TXAK   (0x08)  // transmit acknowledge enable -#define MCF5282_I2C_I2CR_RSTA   (0x04)  // repeat start - -#define MCF5282_I2C_I2SR_ICF    (0x80)  // data transfer bit -#define MCF5282_I2C_I2SR_IAAS   (0x40)  // I2C addressed as a slave -#define MCF5282_I2C_I2SR_IBB    (0x20)  // I2C bus busy -#define MCF5282_I2C_I2SR_IAL    (0x10)  // aribitration lost -#define MCF5282_I2C_I2SR_SRW    (0x04)  // slave read/write -#define MCF5282_I2C_I2SR_IIF    (0x02)  // I2C interrupt -#define MCF5282_I2C_I2SR_RXAK   (0x01)  // received acknowledge - - +/****************************************************************************/  #endif	/* m528xsim_h */ diff --git a/arch/m68k/include/asm/m52xxacr.h b/arch/m68k/include/asm/m52xxacr.h new file mode 100644 index 00000000000..abc391a9ae8 --- /dev/null +++ b/arch/m68k/include/asm/m52xxacr.h @@ -0,0 +1,94 @@ +/****************************************************************************/ + +/* + * m52xxacr.h -- ColdFire version 2 core cache support + * + * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> + */ + +/****************************************************************************/ +#ifndef m52xxacr_h +#define m52xxacr_h +/****************************************************************************/ + +/* + * All varients of the ColdFire using version 2 cores have a similar + * cache setup. Although not absolutely identical the cache register + * definitions are compatible for all of them. Mostly they support a + * configurable cache memory that can be instruction only, data only, + * or split instruction and data. The exception is the very old version 2 + * core based parts, like the 5206(e), 5249 and 5272, which are instruction + * cache only. Cache size varies from 2k up to 16k. + */ + +/* + * Define the Cache Control register flags. + */ +#define CACR_CENB	0x80000000	/* Enable cache */ +#define CACR_CDPI	0x10000000	/* Disable invalidation by CPUSHL */ +#define CACR_CFRZ	0x08000000	/* Cache freeze mode */ +#define CACR_CINV	0x01000000	/* Invalidate cache */ +#define CACR_DISI	0x00800000	/* Disable instruction cache */ +#define CACR_DISD	0x00400000	/* Disable data cache */ +#define CACR_INVI	0x00200000	/* Invalidate instruction cache */ +#define CACR_INVD	0x00100000	/* Invalidate data cache */ +#define CACR_CEIB	0x00000400	/* Non-cachable instruction burst */ +#define CACR_DCM	0x00000200	/* Default cache mode */ +#define CACR_DBWE	0x00000100	/* Buffered write enable */ +#define CACR_DWP	0x00000020	/* Write protection */ +#define CACR_EUSP	0x00000010	/* Enable separate user a7 */ + +/* + * Define the Access Control register flags. + */ +#define ACR_BASE_POS	24		/* Address Base (upper 8 bits) */ +#define ACR_MASK_POS	16		/* Address Mask (next 8 bits) */ +#define ACR_ENABLE	0x00008000	/* Enable this ACR */ +#define ACR_USER	0x00000000	/* Allow only user accesses */ +#define ACR_SUPER	0x00002000	/* Allow supervisor access only */ +#define ACR_ANY		0x00004000	/* Allow any access type */ +#define ACR_CENB	0x00000000	/* Caching of region enabled */ +#define ACR_CDIS	0x00000040	/* Caching of region disabled */ +#define ACR_BWE		0x00000020	/* Write buffer enabled */ +#define ACR_WPROTECT	0x00000004	/* Write protect region */ + +/* + * Set the cache controller settings we will use. On the cores that support + * a split cache configuration we allow all the combinations at Kconfig + * time. For those cores that only have an instruction cache we just set + * that as on. + */ +#if defined(CONFIG_CACHE_I) +#define CACHE_TYPE	(CACR_DISD + CACR_EUSP) +#define CACHE_INVTYPEI	0 +#elif defined(CONFIG_CACHE_D) +#define CACHE_TYPE	(CACR_DISI + CACR_EUSP) +#define CACHE_INVTYPED	0 +#elif defined(CONFIG_CACHE_BOTH) +#define CACHE_TYPE	CACR_EUSP +#define CACHE_INVTYPEI	CACR_INVI +#define CACHE_INVTYPED	CACR_INVD +#else +/* This is the instruction cache only devices (no split cache, no eusp) */ +#define CACHE_TYPE	0 +#define CACHE_INVTYPEI	0 +#endif + +#define CACHE_INIT	(CACR_CINV + CACHE_TYPE) +#define CACHE_MODE	(CACR_CENB + CACHE_TYPE + CACR_DCM) + +#define CACHE_INVALIDATE  (CACHE_MODE + CACR_CINV) +#if defined(CACHE_INVTYPEI) +#define CACHE_INVALIDATEI (CACHE_MODE + CACR_CINV + CACHE_INVTYPEI) +#endif +#if defined(CACHE_INVTYPED) +#define CACHE_INVALIDATED (CACHE_MODE + CACR_CINV + CACHE_INVTYPED) +#endif + +#define ACR0_MODE	((CONFIG_RAMBASE & 0xff000000) + \ +			 (0x000f0000) + \ +			 (ACR_ENABLE + ACR_ANY + ACR_CENB + ACR_BWE)) +#define ACR1_MODE	0 + +/****************************************************************************/ +#endif  /* m52xxsim_h */ diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h index c6830e5b54c..5d0bb7ec31f 100644 --- a/arch/m68k/include/asm/m5307sim.h +++ b/arch/m68k/include/asm/m5307sim.h @@ -14,91 +14,122 @@  #define	m5307sim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m5307)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m53xxacr.h> +  /*   *	Define the 5307 SIM register set addresses.   */ -#define	MCFSIM_RSR		0x00		/* Reset Status reg (r/w) */ -#define	MCFSIM_SYPCR		0x01		/* System Protection reg (r/w)*/ -#define	MCFSIM_SWIVR		0x02		/* SW Watchdog intr reg (r/w) */ -#define	MCFSIM_SWSR		0x03		/* SW Watchdog service (r/w) */ -#define	MCFSIM_PAR		0x04		/* Pin Assignment reg (r/w) */ -#define	MCFSIM_IRQPAR		0x06		/* Interrupt Assignment reg (r/w) */ -#define	MCFSIM_PLLCR		0x08		/* PLL Controll Reg*/ -#define	MCFSIM_MPARK		0x0C		/* BUS Master Control Reg*/ -#define	MCFSIM_IPR		0x40		/* Interrupt Pend reg (r/w) */ -#define	MCFSIM_IMR		0x44		/* Interrupt Mask reg (r/w) */ -#define	MCFSIM_AVR		0x4b		/* Autovector Ctrl reg (r/w) */ -#define	MCFSIM_ICR0		0x4c		/* Intr Ctrl reg 0 (r/w) */ -#define	MCFSIM_ICR1		0x4d		/* Intr Ctrl reg 1 (r/w) */ -#define	MCFSIM_ICR2		0x4e		/* Intr Ctrl reg 2 (r/w) */ -#define	MCFSIM_ICR3		0x4f		/* Intr Ctrl reg 3 (r/w) */ -#define	MCFSIM_ICR4		0x50		/* Intr Ctrl reg 4 (r/w) */ -#define	MCFSIM_ICR5		0x51		/* Intr Ctrl reg 5 (r/w) */ -#define	MCFSIM_ICR6		0x52		/* Intr Ctrl reg 6 (r/w) */ -#define	MCFSIM_ICR7		0x53		/* Intr Ctrl reg 7 (r/w) */ -#define	MCFSIM_ICR8		0x54		/* Intr Ctrl reg 8 (r/w) */ -#define	MCFSIM_ICR9		0x55		/* Intr Ctrl reg 9 (r/w) */ -#define	MCFSIM_ICR10		0x56		/* Intr Ctrl reg 10 (r/w) */ -#define	MCFSIM_ICR11		0x57		/* Intr Ctrl reg 11 (r/w) */ - -#define MCFSIM_CSAR0		0x80		/* CS 0 Address 0 reg (r/w) */ -#define MCFSIM_CSMR0		0x84		/* CS 0 Mask 0 reg (r/w) */ -#define MCFSIM_CSCR0		0x8a		/* CS 0 Control reg (r/w) */ -#define MCFSIM_CSAR1		0x8c		/* CS 1 Address reg (r/w) */ -#define MCFSIM_CSMR1		0x90		/* CS 1 Mask reg (r/w) */ -#define MCFSIM_CSCR1		0x96		/* CS 1 Control reg (r/w) */ +#define	MCFSIM_RSR		(MCF_MBAR + 0x00)	/* Reset Status reg */ +#define	MCFSIM_SYPCR		(MCF_MBAR + 0x01)	/* System Protection */ +#define	MCFSIM_SWIVR		(MCF_MBAR + 0x02)	/* SW Watchdog intr */ +#define	MCFSIM_SWSR		(MCF_MBAR + 0x03)	/* SW Watchdog service*/ +#define	MCFSIM_PAR		(MCF_MBAR + 0x04)	/* Pin Assignment */ +#define	MCFSIM_IRQPAR		(MCF_MBAR + 0x06)	/* Itr Assignment */ +#define	MCFSIM_PLLCR		(MCF_MBAR + 0x08)	/* PLL Ctrl Reg */ +#define	MCFSIM_MPARK		(MCF_MBAR + 0x0C)	/* BUS Master Ctrl */ +#define	MCFSIM_IPR		(MCF_MBAR + 0x40)	/* Interrupt Pend */ +#define	MCFSIM_IMR		(MCF_MBAR + 0x44)	/* Interrupt Mask */ +#define	MCFSIM_AVR		(MCF_MBAR + 0x4b)	/* Autovector Ctrl */ +#define	MCFSIM_ICR0		(MCF_MBAR + 0x4c)	/* Intr Ctrl reg 0 */ +#define	MCFSIM_ICR1		(MCF_MBAR + 0x4d)	/* Intr Ctrl reg 1 */ +#define	MCFSIM_ICR2		(MCF_MBAR + 0x4e)	/* Intr Ctrl reg 2 */ +#define	MCFSIM_ICR3		(MCF_MBAR + 0x4f)	/* Intr Ctrl reg 3 */ +#define	MCFSIM_ICR4		(MCF_MBAR + 0x50)	/* Intr Ctrl reg 4 */ +#define	MCFSIM_ICR5		(MCF_MBAR + 0x51)	/* Intr Ctrl reg 5 */ +#define	MCFSIM_ICR6		(MCF_MBAR + 0x52)	/* Intr Ctrl reg 6 */ +#define	MCFSIM_ICR7		(MCF_MBAR + 0x53)	/* Intr Ctrl reg 7 */ +#define	MCFSIM_ICR8		(MCF_MBAR + 0x54)	/* Intr Ctrl reg 8 */ +#define	MCFSIM_ICR9		(MCF_MBAR + 0x55)	/* Intr Ctrl reg 9 */ +#define	MCFSIM_ICR10		(MCF_MBAR + 0x56)	/* Intr Ctrl reg 10 */ +#define	MCFSIM_ICR11		(MCF_MBAR + 0x57)	/* Intr Ctrl reg 11 */ + +#define MCFSIM_CSAR0		(MCF_MBAR + 0x80)	/* CS 0 Address reg */ +#define MCFSIM_CSMR0		(MCF_MBAR + 0x84)	/* CS 0 Mask reg */ +#define MCFSIM_CSCR0		(MCF_MBAR + 0x8a)	/* CS 0 Control reg */ +#define MCFSIM_CSAR1		(MCF_MBAR + 0x8c)	/* CS 1 Address reg */ +#define MCFSIM_CSMR1		(MCF_MBAR + 0x90)	/* CS 1 Mask reg */ +#define MCFSIM_CSCR1		(MCF_MBAR + 0x96)	/* CS 1 Control reg */  #ifdef CONFIG_OLDMASK -#define MCFSIM_CSBAR		0x98		/* CS Base Address reg (r/w) */ -#define MCFSIM_CSBAMR		0x9c		/* CS Base Mask reg (r/w) */ -#define MCFSIM_CSMR2		0x9e		/* CS 2 Mask reg (r/w) */ -#define MCFSIM_CSCR2		0xa2		/* CS 2 Control reg (r/w) */ -#define MCFSIM_CSMR3		0xaa		/* CS 3 Mask reg (r/w) */ -#define MCFSIM_CSCR3		0xae		/* CS 3 Control reg (r/w) */ -#define MCFSIM_CSMR4		0xb6		/* CS 4 Mask reg (r/w) */ -#define MCFSIM_CSCR4		0xba		/* CS 4 Control reg (r/w) */ -#define MCFSIM_CSMR5		0xc2		/* CS 5 Mask reg (r/w) */ -#define MCFSIM_CSCR5		0xc6		/* CS 5 Control reg (r/w) */ -#define MCFSIM_CSMR6		0xce		/* CS 6 Mask reg (r/w) */ -#define MCFSIM_CSCR6		0xd2		/* CS 6 Control reg (r/w) */ -#define MCFSIM_CSMR7		0xda		/* CS 7 Mask reg (r/w) */ -#define MCFSIM_CSCR7		0xde		/* CS 7 Control reg (r/w) */ +#define MCFSIM_CSBAR		(MCF_MBAR + 0x98)	/* CS Base Address */ +#define MCFSIM_CSBAMR		(MCF_MBAR + 0x9c)	/* CS Base Mask */ +#define MCFSIM_CSMR2		(MCF_MBAR + 0x9e)	/* CS 2 Mask reg */ +#define MCFSIM_CSCR2		(MCF_MBAR + 0xa2)	/* CS 2 Control reg */ +#define MCFSIM_CSMR3		(MCF_MBAR + 0xaa)	/* CS 3 Mask reg */ +#define MCFSIM_CSCR3		(MCF_MBAR + 0xae)	/* CS 3 Control reg */ +#define MCFSIM_CSMR4		(MCF_MBAR + 0xb6)	/* CS 4 Mask reg */ +#define MCFSIM_CSCR4		(MCF_MBAR + 0xba)	/* CS 4 Control reg */ +#define MCFSIM_CSMR5		(MCF_MBAR + 0xc2)	/* CS 5 Mask reg */ +#define MCFSIM_CSCR5		(MCF_MBAR + 0xc6)	/* CS 5 Control reg */ +#define MCFSIM_CSMR6		(MCF_MBAR + 0xce)	/* CS 6 Mask reg */ +#define MCFSIM_CSCR6		(MCF_MBAR + 0xd2)	/* CS 6 Control reg */ +#define MCFSIM_CSMR7		(MCF_MBAR + 0xda)	/* CS 7 Mask reg */ +#define MCFSIM_CSCR7		(MCF_MBAR + 0xde)	/* CS 7 Control reg */  #else -#define MCFSIM_CSAR2		0x98		/* CS 2 Address reg (r/w) */ -#define MCFSIM_CSMR2		0x9c		/* CS 2 Mask reg (r/w) */ -#define MCFSIM_CSCR2		0xa2		/* CS 2 Control reg (r/w) */ -#define MCFSIM_CSAR3		0xa4		/* CS 3 Address reg (r/w) */ -#define MCFSIM_CSMR3		0xa8		/* CS 3 Mask reg (r/w) */ -#define MCFSIM_CSCR3		0xae		/* CS 3 Control reg (r/w) */ -#define MCFSIM_CSAR4		0xb0		/* CS 4 Address reg (r/w) */ -#define MCFSIM_CSMR4		0xb4		/* CS 4 Mask reg (r/w) */ -#define MCFSIM_CSCR4		0xba		/* CS 4 Control reg (r/w) */ -#define MCFSIM_CSAR5		0xbc		/* CS 5 Address reg (r/w) */ -#define MCFSIM_CSMR5		0xc0		/* CS 5 Mask reg (r/w) */ -#define MCFSIM_CSCR5		0xc6		/* CS 5 Control reg (r/w) */ -#define MCFSIM_CSAR6		0xc8		/* CS 6 Address reg (r/w) */ -#define MCFSIM_CSMR6		0xcc		/* CS 6 Mask reg (r/w) */ -#define MCFSIM_CSCR6		0xd2		/* CS 6 Control reg (r/w) */ -#define MCFSIM_CSAR7		0xd4		/* CS 7 Address reg (r/w) */ -#define MCFSIM_CSMR7		0xd8		/* CS 7 Mask reg (r/w) */ -#define MCFSIM_CSCR7		0xde		/* CS 7 Control reg (r/w) */ +#define MCFSIM_CSAR2		(MCF_MBAR + 0x98)	/* CS 2 Address reg */ +#define MCFSIM_CSMR2		(MCF_MBAR + 0x9c)	/* CS 2 Mask reg */ +#define MCFSIM_CSCR2		(MCF_MBAR + 0xa2)	/* CS 2 Control reg */ +#define MCFSIM_CSAR3		(MCF_MBAR + 0xa4)	/* CS 3 Address reg */ +#define MCFSIM_CSMR3		(MCF_MBAR + 0xa8)	/* CS 3 Mask reg */ +#define MCFSIM_CSCR3		(MCF_MBAR + 0xae)	/* CS 3 Control reg */ +#define MCFSIM_CSAR4		(MCF_MBAR + 0xb0)	/* CS 4 Address reg */ +#define MCFSIM_CSMR4		(MCF_MBAR + 0xb4)	/* CS 4 Mask reg */ +#define MCFSIM_CSCR4		(MCF_MBAR + 0xba)	/* CS 4 Control reg */ +#define MCFSIM_CSAR5		(MCF_MBAR + 0xbc)	/* CS 5 Address reg */ +#define MCFSIM_CSMR5		(MCF_MBAR + 0xc0)	/* CS 5 Mask reg */ +#define MCFSIM_CSCR5		(MCF_MBAR + 0xc6)	/* CS 5 Control reg */ +#define MCFSIM_CSAR6		(MCF_MBAR + 0xc8)	/* CS 6 Address reg */ +#define MCFSIM_CSMR6		(MCF_MBAR + 0xcc)	/* CS 6 Mask reg */ +#define MCFSIM_CSCR6		(MCF_MBAR + 0xd2)	/* CS 6 Control reg */ +#define MCFSIM_CSAR7		(MCF_MBAR + 0xd4)	/* CS 7 Address reg */ +#define MCFSIM_CSMR7		(MCF_MBAR + 0xd8)	/* CS 7 Mask reg */ +#define MCFSIM_CSCR7		(MCF_MBAR + 0xde)	/* CS 7 Control reg */  #endif /* CONFIG_OLDMASK */ -#define MCFSIM_DCR		0x100		/* DRAM Control reg (r/w) */ -#define MCFSIM_DACR0		0x108		/* DRAM 0 Addr and Ctrl (r/w) */ -#define MCFSIM_DMR0		0x10c		/* DRAM 0 Mask reg (r/w) */ -#define MCFSIM_DACR1		0x110		/* DRAM 1 Addr and Ctrl (r/w) */ -#define MCFSIM_DMR1		0x114		/* DRAM 1 Mask reg (r/w) */ +#define MCFSIM_DCR		(MCF_MBAR + 0x100)	/* DRAM Control */ +#define MCFSIM_DACR0		(MCF_MBAR + 0x108)	/* DRAM Addr/Ctrl 0 */ +#define MCFSIM_DMR0		(MCF_MBAR + 0x10c)	/* DRAM Mask 0 */ +#define MCFSIM_DACR1		(MCF_MBAR + 0x110)	/* DRAM Addr/Ctrl 1 */ +#define MCFSIM_DMR1		(MCF_MBAR + 0x114)	/* DRAM Mask 1 */ + +/* + *  Timer module. + */ +#define MCFTIMER_BASE1		(MCF_MBAR + 0x140)	/* Base of TIMER1 */ +#define MCFTIMER_BASE2		(MCF_MBAR + 0x180)	/* Base of TIMER2 */  #define	MCFSIM_PADDR		(MCF_MBAR + 0x244)  #define	MCFSIM_PADAT		(MCF_MBAR + 0x248)  /* + *  DMA unit base addresses. + */ +#define MCFDMA_BASE0		(MCF_MBAR + 0x300)	/* Base address DMA 0 */ +#define MCFDMA_BASE1		(MCF_MBAR + 0x340)	/* Base address DMA 1 */ +#define MCFDMA_BASE2		(MCF_MBAR + 0x380)	/* Base address DMA 2 */ +#define MCFDMA_BASE3		(MCF_MBAR + 0x3C0)	/* Base address DMA 3 */ + +/* + *  UART module. + */ +#if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) +#define MCFUART_BASE0		(MCF_MBAR + 0x200)	/* Base address UART0 */ +#define MCFUART_BASE1		(MCF_MBAR + 0x1c0)	/* Base address UART1 */ +#else +#define MCFUART_BASE0		(MCF_MBAR + 0x1c0)	/* Base address UART0 */ +#define MCFUART_BASE1		(MCF_MBAR + 0x200)	/* Base address UART1 */ +#endif + +/*   * Generic GPIO support   */ -#define MCFGPIO_PIN_MAX			16 -#define MCFGPIO_IRQ_MAX			-1 -#define MCFGPIO_IRQ_VECBASE		-1 +#define MCFGPIO_PIN_MAX		16 +#define MCFGPIO_IRQ_MAX		-1 +#define MCFGPIO_IRQ_VECBASE	-1  /* Definition offset address for CS2-7  -- old mask 5307 */ @@ -136,42 +167,17 @@  /*   *       Defines for the IRQPAR Register   */ -#define IRQ5_LEVEL4	0x80 -#define IRQ3_LEVEL6	0x40 -#define IRQ1_LEVEL2	0x20 +#define IRQ5_LEVEL4		0x80 +#define IRQ3_LEVEL6		0x40 +#define IRQ1_LEVEL2		0x20  /*   *	Define system peripheral IRQ usage.   */  #define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */  #define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */ - -/* - *	Define the Cache register flags. - */ -#define	CACR_EC			(1<<31) -#define	CACR_ESB		(1<<29) -#define	CACR_DPI		(1<<28) -#define	CACR_HLCK		(1<<27) -#define	CACR_CINVA		(1<<24) -#define	CACR_DNFB		(1<<10) -#define	CACR_DCM_WTHRU		(0<<8) -#define	CACR_DCM_WBACK		(1<<8) -#define	CACR_DCM_OFF_PRE	(2<<8) -#define	CACR_DCM_OFF_IMP	(3<<8) -#define	CACR_DW			(1<<5) - -#define	ACR_BASE_POS		24 -#define	ACR_MASK_POS		16 -#define	ACR_ENABLE		(1<<15) -#define	ACR_USER		(0<<13) -#define	ACR_SUPER		(1<<13) -#define	ACR_ANY			(2<<13) -#define	ACR_CM_WTHRU		(0<<5) -#define	ACR_CM_WBACK		(1<<5) -#define	ACR_CM_OFF_PRE		(2<<5) -#define	ACR_CM_OFF_IMP		(3<<5) -#define	ACR_WPROTECT		(1<<2) +#define	MCF_IRQ_UART0		73		/* UART0 */ +#define	MCF_IRQ_UART1		74		/* UART1 */  /****************************************************************************/  #endif	/* m5307sim_h */ diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h deleted file mode 100644 index c4bf1c81e3c..00000000000 --- a/arch/m68k/include/asm/m532xsim.h +++ /dev/null @@ -1,2240 +0,0 @@ -/****************************************************************************/ - -/* - *	m532xsim.h -- ColdFire 5329 registers - */ - -/****************************************************************************/ -#ifndef	m532xsim_h -#define	m532xsim_h -/****************************************************************************/ - -#define MCF_REG32(x) (*(volatile unsigned long  *)(x)) -#define MCF_REG16(x) (*(volatile unsigned short *)(x)) -#define MCF_REG08(x) (*(volatile unsigned char  *)(x)) - -#define MCFINT_VECBASE      64 -#define MCFINT_UART0        26          /* Interrupt number for UART0 */ -#define MCFINT_UART1        27          /* Interrupt number for UART1 */ -#define MCFINT_UART2        28          /* Interrupt number for UART2 */ -#define MCFINT_QSPI         31          /* Interrupt number for QSPI */ - -#define MCF_WTM_WCR	MCF_REG16(0xFC098000) - -/* - *	Define the 532x SIM register set addresses. - */ -#define	MCFSIM_IPRL		0xFC048004 -#define	MCFSIM_IPRH		0xFC048000 -#define	MCFSIM_IPR		MCFSIM_IPRL -#define	MCFSIM_IMRL		0xFC04800C -#define	MCFSIM_IMRH		0xFC048008 -#define	MCFSIM_IMR		MCFSIM_IMRL -#define	MCFSIM_ICR0		0xFC048040	 -#define	MCFSIM_ICR1		0xFC048041	 -#define	MCFSIM_ICR2		0xFC048042	 -#define	MCFSIM_ICR3		0xFC048043	 -#define	MCFSIM_ICR4		0xFC048044	 -#define	MCFSIM_ICR5		0xFC048045	 -#define	MCFSIM_ICR6		0xFC048046	 -#define	MCFSIM_ICR7		0xFC048047	 -#define	MCFSIM_ICR8		0xFC048048	 -#define	MCFSIM_ICR9		0xFC048049	 -#define	MCFSIM_ICR10		0xFC04804A -#define	MCFSIM_ICR11		0xFC04804B - -/* - *	Some symbol defines for the above... - */ -#define	MCFSIM_SWDICR		MCFSIM_ICR0	/* Watchdog timer ICR */ -#define	MCFSIM_TIMER1ICR	MCFSIM_ICR1	/* Timer 1 ICR */ -#define	MCFSIM_TIMER2ICR	MCFSIM_ICR2	/* Timer 2 ICR */ -#define	MCFSIM_UART1ICR		MCFSIM_ICR4	/* UART 1 ICR */ -#define	MCFSIM_UART2ICR		MCFSIM_ICR5	/* UART 2 ICR */ -#define	MCFSIM_DMA0ICR		MCFSIM_ICR6	/* DMA 0 ICR */ -#define	MCFSIM_DMA1ICR		MCFSIM_ICR7	/* DMA 1 ICR */ -#define	MCFSIM_DMA2ICR		MCFSIM_ICR8	/* DMA 2 ICR */ -#define	MCFSIM_DMA3ICR		MCFSIM_ICR9	/* DMA 3 ICR */ - - -#define	MCFINTC0_SIMR		0xFC04801C -#define	MCFINTC0_CIMR		0xFC04801D -#define	MCFINTC0_ICR0		0xFC048040 -#define	MCFINTC1_SIMR		0xFC04C01C -#define	MCFINTC1_CIMR		0xFC04C01D -#define	MCFINTC1_ICR0		0xFC04C040 - -#define MCFSIM_ICR_TIMER1	(0xFC048040+32) -#define MCFSIM_ICR_TIMER2	(0xFC048040+33) - -/* - *	Define system peripheral IRQ usage. - */ -#define	MCF_IRQ_TIMER		(64 + 32)	/* Timer0 */ -#define	MCF_IRQ_PROFILER	(64 + 33)	/* Timer1 */ - -/* - *	Define the Cache register flags. - */ -#define	CACR_EC			(1<<31) -#define	CACR_ESB		(1<<29) -#define	CACR_DPI		(1<<28) -#define	CACR_HLCK		(1<<27) -#define	CACR_CINVA		(1<<24) -#define	CACR_DNFB		(1<<10) -#define	CACR_DCM_WTHRU		(0<<8) -#define	CACR_DCM_WBACK		(1<<8) -#define	CACR_DCM_OFF_PRE	(2<<8) -#define	CACR_DCM_OFF_IMP	(3<<8) -#define	CACR_DW			(1<<5) - -#define	ACR_BASE_POS		24 -#define	ACR_MASK_POS		16 -#define	ACR_ENABLE		(1<<15) -#define	ACR_USER		(0<<13) -#define	ACR_SUPER		(1<<13) -#define	ACR_ANY			(2<<13) -#define	ACR_CM_WTHRU		(0<<5) -#define	ACR_CM_WBACK		(1<<5) -#define	ACR_CM_OFF_PRE		(2<<5) -#define	ACR_CM_OFF_IMP		(3<<5) -#define	ACR_WPROTECT		(1<<2) - -/********************************************************************* - * - * Reset Controller Module - * - *********************************************************************/ - -#define	MCF_RCR			0xFC0A0000 -#define	MCF_RSR			0xFC0A0001 - -#define	MCF_RCR_SWRESET		0x80		/* Software reset bit */ -#define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ - -/********************************************************************* - * - * Inter-IC (I2C) Module - * - *********************************************************************/ - -/* Read/Write access macros for general use */ -#define MCF532x_I2C_I2ADR       (volatile u8 *) (0xFC058000) // Address  -#define MCF532x_I2C_I2FDR       (volatile u8 *) (0xFC058004) // Freq Divider -#define MCF532x_I2C_I2CR        (volatile u8 *) (0xFC058008) // Control -#define MCF532x_I2C_I2SR        (volatile u8 *) (0xFC05800C) // Status -#define MCF532x_I2C_I2DR        (volatile u8 *) (0xFC058010) // Data I/O - -/* Bit level definitions and macros */ -#define MCF532x_I2C_I2ADR_ADDR(x)                       (((x)&0x7F)<<0x01) - -#define MCF532x_I2C_I2FDR_IC(x)                         (((x)&0x3F)) - -#define MCF532x_I2C_I2CR_IEN    (0x80)	// I2C enable -#define MCF532x_I2C_I2CR_IIEN   (0x40)  // interrupt enable -#define MCF532x_I2C_I2CR_MSTA   (0x20)  // master/slave mode -#define MCF532x_I2C_I2CR_MTX    (0x10)  // transmit/receive mode -#define MCF532x_I2C_I2CR_TXAK   (0x08)  // transmit acknowledge enable -#define MCF532x_I2C_I2CR_RSTA   (0x04)  // repeat start - -#define MCF532x_I2C_I2SR_ICF    (0x80)  // data transfer bit -#define MCF532x_I2C_I2SR_IAAS   (0x40)  // I2C addressed as a slave -#define MCF532x_I2C_I2SR_IBB    (0x20)  // I2C bus busy -#define MCF532x_I2C_I2SR_IAL    (0x10)  // aribitration lost -#define MCF532x_I2C_I2SR_SRW    (0x04)  // slave read/write -#define MCF532x_I2C_I2SR_IIF    (0x02)  // I2C interrupt -#define MCF532x_I2C_I2SR_RXAK   (0x01)  // received acknowledge - -#define MCF532x_PAR_FECI2C	(volatile u8 *) (0xFC0A4053) - - -/* - *	The M5329EVB board needs a help getting its devices initialized  - *	at kernel start time if dBUG doesn't set it up (for example  - *	it is not used), so we need to do it manually. - */ -#ifdef __ASSEMBLER__ -.macro m5329EVB_setup -	movel	#0xFC098000, %a7 -	movel	#0x0, (%a7) -#define CORE_SRAM	0x80000000	 -#define CORE_SRAM_SIZE	0x8000 -	movel	#CORE_SRAM, %d0 -	addl	#0x221, %d0 -	movec	%d0,%RAMBAR1 -	movel	#CORE_SRAM, %sp -	addl	#CORE_SRAM_SIZE, %sp -	jsr	sysinit -.endm -#define	PLATFORM_SETUP	m5329EVB_setup - -#endif /* __ASSEMBLER__ */ - -/********************************************************************* - * - * Chip Configuration Module (CCM) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_CCM_CCR               MCF_REG16(0xFC0A0004) -#define MCF_CCM_RCON              MCF_REG16(0xFC0A0008) -#define MCF_CCM_CIR               MCF_REG16(0xFC0A000A) -#define MCF_CCM_MISCCR            MCF_REG16(0xFC0A0010) -#define MCF_CCM_CDR               MCF_REG16(0xFC0A0012) -#define MCF_CCM_UHCSR             MCF_REG16(0xFC0A0014) -#define MCF_CCM_UOCSR             MCF_REG16(0xFC0A0016) - -/* Bit definitions and macros for MCF_CCM_CCR */ -#define MCF_CCM_CCR_RESERVED      (0x0001) -#define MCF_CCM_CCR_PLL_MODE      (0x0003) -#define MCF_CCM_CCR_OSC_MODE      (0x0005) -#define MCF_CCM_CCR_BOOTPS(x)     (((x)&0x0003)<<3|0x0001) -#define MCF_CCM_CCR_LOAD          (0x0021) -#define MCF_CCM_CCR_LIMP          (0x0041) -#define MCF_CCM_CCR_CSC(x)        (((x)&0x0003)<<8|0x0001) - -/* Bit definitions and macros for MCF_CCM_RCON */ -#define MCF_CCM_RCON_RESERVED     (0x0001) -#define MCF_CCM_RCON_PLL_MODE     (0x0003) -#define MCF_CCM_RCON_OSC_MODE     (0x0005) -#define MCF_CCM_RCON_BOOTPS(x)    (((x)&0x0003)<<3|0x0001) -#define MCF_CCM_RCON_LOAD         (0x0021) -#define MCF_CCM_RCON_LIMP         (0x0041) -#define MCF_CCM_RCON_CSC(x)       (((x)&0x0003)<<8|0x0001) - -/* Bit definitions and macros for MCF_CCM_CIR */ -#define MCF_CCM_CIR_PRN(x)        (((x)&0x003F)<<0) -#define MCF_CCM_CIR_PIN(x)        (((x)&0x03FF)<<6) - -/* Bit definitions and macros for MCF_CCM_MISCCR */ -#define MCF_CCM_MISCCR_USBSRC     (0x0001) -#define MCF_CCM_MISCCR_USBDIV     (0x0002) -#define MCF_CCM_MISCCR_SSI_SRC    (0x0010) -#define MCF_CCM_MISCCR_TIM_DMA   (0x0020) -#define MCF_CCM_MISCCR_SSI_PUS    (0x0040) -#define MCF_CCM_MISCCR_SSI_PUE    (0x0080) -#define MCF_CCM_MISCCR_LCD_CHEN   (0x0100) -#define MCF_CCM_MISCCR_LIMP       (0x1000) -#define MCF_CCM_MISCCR_PLL_LOCK   (0x2000) - -/* Bit definitions and macros for MCF_CCM_CDR */ -#define MCF_CCM_CDR_SSIDIV(x)     (((x)&0x000F)<<0) -#define MCF_CCM_CDR_LPDIV(x)      (((x)&0x000F)<<8) - -/* Bit definitions and macros for MCF_CCM_UHCSR */ -#define MCF_CCM_UHCSR_XPDE        (0x0001) -#define MCF_CCM_UHCSR_UHMIE       (0x0002) -#define MCF_CCM_UHCSR_WKUP        (0x0004) -#define MCF_CCM_UHCSR_PORTIND(x)  (((x)&0x0003)<<14) - -/* Bit definitions and macros for MCF_CCM_UOCSR */ -#define MCF_CCM_UOCSR_XPDE        (0x0001) -#define MCF_CCM_UOCSR_UOMIE       (0x0002) -#define MCF_CCM_UOCSR_WKUP        (0x0004) -#define MCF_CCM_UOCSR_PWRFLT      (0x0008) -#define MCF_CCM_UOCSR_SEND        (0x0010) -#define MCF_CCM_UOCSR_VVLD        (0x0020) -#define MCF_CCM_UOCSR_BVLD        (0x0040) -#define MCF_CCM_UOCSR_AVLD        (0x0080) -#define MCF_CCM_UOCSR_DPPU        (0x0100) -#define MCF_CCM_UOCSR_DCR_VBUS    (0x0200) -#define MCF_CCM_UOCSR_CRG_VBUS    (0x0400) -#define MCF_CCM_UOCSR_DRV_VBUS    (0x0800) -#define MCF_CCM_UOCSR_DMPD        (0x1000) -#define MCF_CCM_UOCSR_DPPD        (0x2000) -#define MCF_CCM_UOCSR_PORTIND(x)  (((x)&0x0003)<<14) - -/********************************************************************* - * - * DMA Timers (DTIM) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_DTIM0_DTMR           MCF_REG16(0xFC070000) -#define MCF_DTIM0_DTXMR          MCF_REG08(0xFC070002) -#define MCF_DTIM0_DTER           MCF_REG08(0xFC070003) -#define MCF_DTIM0_DTRR           MCF_REG32(0xFC070004) -#define MCF_DTIM0_DTCR           MCF_REG32(0xFC070008) -#define MCF_DTIM0_DTCN           MCF_REG32(0xFC07000C) -#define MCF_DTIM1_DTMR           MCF_REG16(0xFC074000) -#define MCF_DTIM1_DTXMR          MCF_REG08(0xFC074002) -#define MCF_DTIM1_DTER           MCF_REG08(0xFC074003) -#define MCF_DTIM1_DTRR           MCF_REG32(0xFC074004) -#define MCF_DTIM1_DTCR           MCF_REG32(0xFC074008) -#define MCF_DTIM1_DTCN           MCF_REG32(0xFC07400C) -#define MCF_DTIM2_DTMR           MCF_REG16(0xFC078000) -#define MCF_DTIM2_DTXMR          MCF_REG08(0xFC078002) -#define MCF_DTIM2_DTER           MCF_REG08(0xFC078003) -#define MCF_DTIM2_DTRR           MCF_REG32(0xFC078004) -#define MCF_DTIM2_DTCR           MCF_REG32(0xFC078008) -#define MCF_DTIM2_DTCN           MCF_REG32(0xFC07800C) -#define MCF_DTIM3_DTMR           MCF_REG16(0xFC07C000) -#define MCF_DTIM3_DTXMR          MCF_REG08(0xFC07C002) -#define MCF_DTIM3_DTER           MCF_REG08(0xFC07C003) -#define MCF_DTIM3_DTRR           MCF_REG32(0xFC07C004) -#define MCF_DTIM3_DTCR           MCF_REG32(0xFC07C008) -#define MCF_DTIM3_DTCN           MCF_REG32(0xFC07C00C) -#define MCF_DTIM_DTMR(x)         MCF_REG16(0xFC070000+((x)*0x4000)) -#define MCF_DTIM_DTXMR(x)        MCF_REG08(0xFC070002+((x)*0x4000)) -#define MCF_DTIM_DTER(x)         MCF_REG08(0xFC070003+((x)*0x4000)) -#define MCF_DTIM_DTRR(x)         MCF_REG32(0xFC070004+((x)*0x4000)) -#define MCF_DTIM_DTCR(x)         MCF_REG32(0xFC070008+((x)*0x4000)) -#define MCF_DTIM_DTCN(x)         MCF_REG32(0xFC07000C+((x)*0x4000)) - -/* Bit definitions and macros for MCF_DTIM_DTMR */ -#define MCF_DTIM_DTMR_RST        (0x0001) -#define MCF_DTIM_DTMR_CLK(x)     (((x)&0x0003)<<1) -#define MCF_DTIM_DTMR_FRR        (0x0008) -#define MCF_DTIM_DTMR_ORRI       (0x0010) -#define MCF_DTIM_DTMR_OM         (0x0020) -#define MCF_DTIM_DTMR_CE(x)      (((x)&0x0003)<<6) -#define MCF_DTIM_DTMR_PS(x)      (((x)&0x00FF)<<8) -#define MCF_DTIM_DTMR_CE_ANY     (0x00C0) -#define MCF_DTIM_DTMR_CE_FALL    (0x0080) -#define MCF_DTIM_DTMR_CE_RISE    (0x0040) -#define MCF_DTIM_DTMR_CE_NONE    (0x0000) -#define MCF_DTIM_DTMR_CLK_DTIN   (0x0006) -#define MCF_DTIM_DTMR_CLK_DIV16  (0x0004) -#define MCF_DTIM_DTMR_CLK_DIV1   (0x0002) -#define MCF_DTIM_DTMR_CLK_STOP   (0x0000) - -/* Bit definitions and macros for MCF_DTIM_DTXMR */ -#define MCF_DTIM_DTXMR_MODE16    (0x01) -#define MCF_DTIM_DTXMR_DMAEN     (0x80) - -/* Bit definitions and macros for MCF_DTIM_DTER */ -#define MCF_DTIM_DTER_CAP        (0x01) -#define MCF_DTIM_DTER_REF        (0x02) - -/* Bit definitions and macros for MCF_DTIM_DTRR */ -#define MCF_DTIM_DTRR_REF(x)     (((x)&0xFFFFFFFF)<<0) - -/* Bit definitions and macros for MCF_DTIM_DTCR */ -#define MCF_DTIM_DTCR_CAP(x)     (((x)&0xFFFFFFFF)<<0) - -/* Bit definitions and macros for MCF_DTIM_DTCN */ -#define MCF_DTIM_DTCN_CNT(x)     (((x)&0xFFFFFFFF)<<0) - -/********************************************************************* - * - * FlexBus Chip Selects (FBCS) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_FBCS0_CSAR		MCF_REG32(0xFC008000) -#define MCF_FBCS0_CSMR		MCF_REG32(0xFC008004) -#define MCF_FBCS0_CSCR		MCF_REG32(0xFC008008) -#define MCF_FBCS1_CSAR		MCF_REG32(0xFC00800C) -#define MCF_FBCS1_CSMR		MCF_REG32(0xFC008010) -#define MCF_FBCS1_CSCR		MCF_REG32(0xFC008014) -#define MCF_FBCS2_CSAR		MCF_REG32(0xFC008018) -#define MCF_FBCS2_CSMR		MCF_REG32(0xFC00801C) -#define MCF_FBCS2_CSCR		MCF_REG32(0xFC008020) -#define MCF_FBCS3_CSAR		MCF_REG32(0xFC008024) -#define MCF_FBCS3_CSMR		MCF_REG32(0xFC008028) -#define MCF_FBCS3_CSCR		MCF_REG32(0xFC00802C) -#define MCF_FBCS4_CSAR		MCF_REG32(0xFC008030) -#define MCF_FBCS4_CSMR		MCF_REG32(0xFC008034) -#define MCF_FBCS4_CSCR		MCF_REG32(0xFC008038) -#define MCF_FBCS5_CSAR		MCF_REG32(0xFC00803C) -#define MCF_FBCS5_CSMR		MCF_REG32(0xFC008040) -#define MCF_FBCS5_CSCR		MCF_REG32(0xFC008044) -#define MCF_FBCS_CSAR(x)	MCF_REG32(0xFC008000+((x)*0x00C)) -#define MCF_FBCS_CSMR(x)	MCF_REG32(0xFC008004+((x)*0x00C)) -#define MCF_FBCS_CSCR(x)	MCF_REG32(0xFC008008+((x)*0x00C)) - -/* Bit definitions and macros for MCF_FBCS_CSAR */ -#define MCF_FBCS_CSAR_BA(x)	((x)&0xFFFF0000) - -/* Bit definitions and macros for MCF_FBCS_CSMR */ -#define MCF_FBCS_CSMR_V		(0x00000001) -#define MCF_FBCS_CSMR_WP	(0x00000100) -#define MCF_FBCS_CSMR_BAM(x)	(((x)&0x0000FFFF)<<16) -#define MCF_FBCS_CSMR_BAM_4G	(0xFFFF0000) -#define MCF_FBCS_CSMR_BAM_2G	(0x7FFF0000) -#define MCF_FBCS_CSMR_BAM_1G	(0x3FFF0000) -#define MCF_FBCS_CSMR_BAM_1024M	(0x3FFF0000) -#define MCF_FBCS_CSMR_BAM_512M	(0x1FFF0000) -#define MCF_FBCS_CSMR_BAM_256M	(0x0FFF0000) -#define MCF_FBCS_CSMR_BAM_128M	(0x07FF0000) -#define MCF_FBCS_CSMR_BAM_64M	(0x03FF0000) -#define MCF_FBCS_CSMR_BAM_32M	(0x01FF0000) -#define MCF_FBCS_CSMR_BAM_16M	(0x00FF0000) -#define MCF_FBCS_CSMR_BAM_8M	(0x007F0000) -#define MCF_FBCS_CSMR_BAM_4M	(0x003F0000) -#define MCF_FBCS_CSMR_BAM_2M	(0x001F0000) -#define MCF_FBCS_CSMR_BAM_1M	(0x000F0000) -#define MCF_FBCS_CSMR_BAM_1024K	(0x000F0000) -#define MCF_FBCS_CSMR_BAM_512K	(0x00070000) -#define MCF_FBCS_CSMR_BAM_256K	(0x00030000) -#define MCF_FBCS_CSMR_BAM_128K	(0x00010000) -#define MCF_FBCS_CSMR_BAM_64K	(0x00000000) - -/* Bit definitions and macros for MCF_FBCS_CSCR */ -#define MCF_FBCS_CSCR_BSTW	(0x00000008) -#define MCF_FBCS_CSCR_BSTR	(0x00000010) -#define MCF_FBCS_CSCR_BEM	(0x00000020) -#define MCF_FBCS_CSCR_PS(x)	(((x)&0x00000003)<<6) -#define MCF_FBCS_CSCR_AA	(0x00000100) -#define MCF_FBCS_CSCR_SBM	(0x00000200) -#define MCF_FBCS_CSCR_WS(x)	(((x)&0x0000003F)<<10) -#define MCF_FBCS_CSCR_WRAH(x)	(((x)&0x00000003)<<16) -#define MCF_FBCS_CSCR_RDAH(x)	(((x)&0x00000003)<<18) -#define MCF_FBCS_CSCR_ASET(x)	(((x)&0x00000003)<<20) -#define MCF_FBCS_CSCR_SWSEN	(0x00800000) -#define MCF_FBCS_CSCR_SWS(x)	(((x)&0x0000003F)<<26) -#define MCF_FBCS_CSCR_PS_8	(0x0040) -#define MCF_FBCS_CSCR_PS_16	(0x0080) -#define MCF_FBCS_CSCR_PS_32	(0x0000) - -/********************************************************************* - * - * General Purpose I/O (GPIO) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCFGPIO_PODR_FECH		(0xFC0A4000) -#define MCFGPIO_PODR_FECL		(0xFC0A4001) -#define MCFGPIO_PODR_SSI		(0xFC0A4002) -#define MCFGPIO_PODR_BUSCTL		(0xFC0A4003) -#define MCFGPIO_PODR_BE			(0xFC0A4004) -#define MCFGPIO_PODR_CS			(0xFC0A4005) -#define MCFGPIO_PODR_PWM		(0xFC0A4006) -#define MCFGPIO_PODR_FECI2C		(0xFC0A4007) -#define MCFGPIO_PODR_UART		(0xFC0A4009) -#define MCFGPIO_PODR_QSPI		(0xFC0A400A) -#define MCFGPIO_PODR_TIMER		(0xFC0A400B) -#define MCFGPIO_PODR_LCDDATAH		(0xFC0A400D) -#define MCFGPIO_PODR_LCDDATAM		(0xFC0A400E) -#define MCFGPIO_PODR_LCDDATAL		(0xFC0A400F) -#define MCFGPIO_PODR_LCDCTLH		(0xFC0A4010) -#define MCFGPIO_PODR_LCDCTLL		(0xFC0A4011) -#define MCFGPIO_PDDR_FECH		(0xFC0A4014) -#define MCFGPIO_PDDR_FECL		(0xFC0A4015) -#define MCFGPIO_PDDR_SSI		(0xFC0A4016) -#define MCFGPIO_PDDR_BUSCTL		(0xFC0A4017) -#define MCFGPIO_PDDR_BE			(0xFC0A4018) -#define MCFGPIO_PDDR_CS			(0xFC0A4019) -#define MCFGPIO_PDDR_PWM		(0xFC0A401A) -#define MCFGPIO_PDDR_FECI2C		(0xFC0A401B) -#define MCFGPIO_PDDR_UART		(0xFC0A401C) -#define MCFGPIO_PDDR_QSPI		(0xFC0A401E) -#define MCFGPIO_PDDR_TIMER		(0xFC0A401F) -#define MCFGPIO_PDDR_LCDDATAH		(0xFC0A4021) -#define MCFGPIO_PDDR_LCDDATAM		(0xFC0A4022) -#define MCFGPIO_PDDR_LCDDATAL		(0xFC0A4023) -#define MCFGPIO_PDDR_LCDCTLH		(0xFC0A4024) -#define MCFGPIO_PDDR_LCDCTLL		(0xFC0A4025) -#define MCFGPIO_PPDSDR_FECH		(0xFC0A4028) -#define MCFGPIO_PPDSDR_FECL		(0xFC0A4029) -#define MCFGPIO_PPDSDR_SSI		(0xFC0A402A) -#define MCFGPIO_PPDSDR_BUSCTL		(0xFC0A402B) -#define MCFGPIO_PPDSDR_BE		(0xFC0A402C) -#define MCFGPIO_PPDSDR_CS		(0xFC0A402D) -#define MCFGPIO_PPDSDR_PWM		(0xFC0A402E) -#define MCFGPIO_PPDSDR_FECI2C		(0xFC0A402F) -#define MCFGPIO_PPDSDR_UART		(0xFC0A4031) -#define MCFGPIO_PPDSDR_QSPI		(0xFC0A4032) -#define MCFGPIO_PPDSDR_TIMER		(0xFC0A4033) -#define MCFGPIO_PPDSDR_LCDDATAH		(0xFC0A4035) -#define MCFGPIO_PPDSDR_LCDDATAM		(0xFC0A4036) -#define MCFGPIO_PPDSDR_LCDDATAL		(0xFC0A4037) -#define MCFGPIO_PPDSDR_LCDCTLH		(0xFC0A4038) -#define MCFGPIO_PPDSDR_LCDCTLL		(0xFC0A4039) -#define MCFGPIO_PCLRR_FECH		(0xFC0A403C) -#define MCFGPIO_PCLRR_FECL		(0xFC0A403D) -#define MCFGPIO_PCLRR_SSI		(0xFC0A403E) -#define MCFGPIO_PCLRR_BUSCTL		(0xFC0A403F) -#define MCFGPIO_PCLRR_BE		(0xFC0A4040) -#define MCFGPIO_PCLRR_CS		(0xFC0A4041) -#define MCFGPIO_PCLRR_PWM		(0xFC0A4042) -#define MCFGPIO_PCLRR_FECI2C		(0xFC0A4043) -#define MCFGPIO_PCLRR_UART		(0xFC0A4045) -#define MCFGPIO_PCLRR_QSPI		(0xFC0A4046) -#define MCFGPIO_PCLRR_TIMER		(0xFC0A4047) -#define MCFGPIO_PCLRR_LCDDATAH		(0xFC0A4049) -#define MCFGPIO_PCLRR_LCDDATAM		(0xFC0A404A) -#define MCFGPIO_PCLRR_LCDDATAL		(0xFC0A404B) -#define MCFGPIO_PCLRR_LCDCTLH		(0xFC0A404C) -#define MCFGPIO_PCLRR_LCDCTLL		(0xFC0A404D) -#define MCF_GPIO_PAR_FEC		MCF_REG08(0xFC0A4050) -#define MCF_GPIO_PAR_PWM		MCF_REG08(0xFC0A4051) -#define MCF_GPIO_PAR_BUSCTL		MCF_REG08(0xFC0A4052) -#define MCF_GPIO_PAR_FECI2C		MCF_REG08(0xFC0A4053) -#define MCF_GPIO_PAR_BE			MCF_REG08(0xFC0A4054) -#define MCF_GPIO_PAR_CS			MCF_REG08(0xFC0A4055) -#define MCF_GPIO_PAR_SSI		MCF_REG16(0xFC0A4056) -#define MCF_GPIO_PAR_UART		MCF_REG16(0xFC0A4058) -#define MCF_GPIO_PAR_QSPI		MCF_REG16(0xFC0A405A) -#define MCF_GPIO_PAR_TIMER		MCF_REG08(0xFC0A405C) -#define MCF_GPIO_PAR_LCDDATA		MCF_REG08(0xFC0A405D) -#define MCF_GPIO_PAR_LCDCTL		MCF_REG16(0xFC0A405E) -#define MCF_GPIO_PAR_IRQ		MCF_REG16(0xFC0A4060) -#define MCF_GPIO_MSCR_FLEXBUS		MCF_REG08(0xFC0A4064) -#define MCF_GPIO_MSCR_SDRAM		MCF_REG08(0xFC0A4065) -#define MCF_GPIO_DSCR_I2C		MCF_REG08(0xFC0A4068) -#define MCF_GPIO_DSCR_PWM		MCF_REG08(0xFC0A4069) -#define MCF_GPIO_DSCR_FEC		MCF_REG08(0xFC0A406A) -#define MCF_GPIO_DSCR_UART		MCF_REG08(0xFC0A406B) -#define MCF_GPIO_DSCR_QSPI		MCF_REG08(0xFC0A406C) -#define MCF_GPIO_DSCR_TIMER		MCF_REG08(0xFC0A406D) -#define MCF_GPIO_DSCR_SSI		MCF_REG08(0xFC0A406E) -#define MCF_GPIO_DSCR_LCD		MCF_REG08(0xFC0A406F) -#define MCF_GPIO_DSCR_DEBUG		MCF_REG08(0xFC0A4070) -#define MCF_GPIO_DSCR_CLKRST		MCF_REG08(0xFC0A4071) -#define MCF_GPIO_DSCR_IRQ		MCF_REG08(0xFC0A4072) - -/* Bit definitions and macros for MCF_GPIO_PODR_FECH */ -#define MCF_GPIO_PODR_FECH_PODR_FECH0              (0x01) -#define MCF_GPIO_PODR_FECH_PODR_FECH1              (0x02) -#define MCF_GPIO_PODR_FECH_PODR_FECH2              (0x04) -#define MCF_GPIO_PODR_FECH_PODR_FECH3              (0x08) -#define MCF_GPIO_PODR_FECH_PODR_FECH4              (0x10) -#define MCF_GPIO_PODR_FECH_PODR_FECH5              (0x20) -#define MCF_GPIO_PODR_FECH_PODR_FECH6              (0x40) -#define MCF_GPIO_PODR_FECH_PODR_FECH7              (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_FECL */ -#define MCF_GPIO_PODR_FECL_PODR_FECL0              (0x01) -#define MCF_GPIO_PODR_FECL_PODR_FECL1              (0x02) -#define MCF_GPIO_PODR_FECL_PODR_FECL2              (0x04) -#define MCF_GPIO_PODR_FECL_PODR_FECL3              (0x08) -#define MCF_GPIO_PODR_FECL_PODR_FECL4              (0x10) -#define MCF_GPIO_PODR_FECL_PODR_FECL5              (0x20) -#define MCF_GPIO_PODR_FECL_PODR_FECL6              (0x40) -#define MCF_GPIO_PODR_FECL_PODR_FECL7              (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_SSI */ -#define MCF_GPIO_PODR_SSI_PODR_SSI0                (0x01) -#define MCF_GPIO_PODR_SSI_PODR_SSI1                (0x02) -#define MCF_GPIO_PODR_SSI_PODR_SSI2                (0x04) -#define MCF_GPIO_PODR_SSI_PODR_SSI3                (0x08) -#define MCF_GPIO_PODR_SSI_PODR_SSI4                (0x10) - -/* Bit definitions and macros for MCF_GPIO_PODR_BUSCTL */ -#define MCF_GPIO_PODR_BUSCTL_POSDR_BUSCTL0         (0x01) -#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL1          (0x02) -#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL2          (0x04) -#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL3          (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_BE */ -#define MCF_GPIO_PODR_BE_PODR_BE0                  (0x01) -#define MCF_GPIO_PODR_BE_PODR_BE1                  (0x02) -#define MCF_GPIO_PODR_BE_PODR_BE2                  (0x04) -#define MCF_GPIO_PODR_BE_PODR_BE3                  (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_CS */ -#define MCF_GPIO_PODR_CS_PODR_CS1                  (0x02) -#define MCF_GPIO_PODR_CS_PODR_CS2                  (0x04) -#define MCF_GPIO_PODR_CS_PODR_CS3                  (0x08) -#define MCF_GPIO_PODR_CS_PODR_CS4                  (0x10) -#define MCF_GPIO_PODR_CS_PODR_CS5                  (0x20) - -/* Bit definitions and macros for MCF_GPIO_PODR_PWM */ -#define MCF_GPIO_PODR_PWM_PODR_PWM2                (0x04) -#define MCF_GPIO_PODR_PWM_PODR_PWM3                (0x08) -#define MCF_GPIO_PODR_PWM_PODR_PWM4                (0x10) -#define MCF_GPIO_PODR_PWM_PODR_PWM5                (0x20) - -/* Bit definitions and macros for MCF_GPIO_PODR_FECI2C */ -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C0          (0x01) -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C1          (0x02) -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C2          (0x04) -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C3          (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_UART */ -#define MCF_GPIO_PODR_UART_PODR_UART0              (0x01) -#define MCF_GPIO_PODR_UART_PODR_UART1              (0x02) -#define MCF_GPIO_PODR_UART_PODR_UART2              (0x04) -#define MCF_GPIO_PODR_UART_PODR_UART3              (0x08) -#define MCF_GPIO_PODR_UART_PODR_UART4              (0x10) -#define MCF_GPIO_PODR_UART_PODR_UART5              (0x20) -#define MCF_GPIO_PODR_UART_PODR_UART6              (0x40) -#define MCF_GPIO_PODR_UART_PODR_UART7              (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_QSPI */ -#define MCF_GPIO_PODR_QSPI_PODR_QSPI0              (0x01) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI1              (0x02) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI2              (0x04) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI3              (0x08) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI4              (0x10) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI5              (0x20) - -/* Bit definitions and macros for MCF_GPIO_PODR_TIMER */ -#define MCF_GPIO_PODR_TIMER_PODR_TIMER0            (0x01) -#define MCF_GPIO_PODR_TIMER_PODR_TIMER1            (0x02) -#define MCF_GPIO_PODR_TIMER_PODR_TIMER2            (0x04) -#define MCF_GPIO_PODR_TIMER_PODR_TIMER3            (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAH */ -#define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH0      (0x01) -#define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH1      (0x02) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAM */ -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM0      (0x01) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM1      (0x02) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM2      (0x04) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM3      (0x08) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM4      (0x10) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM5      (0x20) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM6      (0x40) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM7      (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAL */ -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL0      (0x01) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL1      (0x02) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL2      (0x04) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL3      (0x08) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL4      (0x10) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL5      (0x20) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL6      (0x40) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL7      (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLH */ -#define MCF_GPIO_PODR_LCDCTLH_PODR_LCDCTLH0        (0x01) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLL */ -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL0        (0x01) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL1        (0x02) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL2        (0x04) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL3        (0x08) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL4        (0x10) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL5        (0x20) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL6        (0x40) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL7        (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_FECH */ -#define MCF_GPIO_PDDR_FECH_PDDR_FECH0              (0x01) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH1              (0x02) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH2              (0x04) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH3              (0x08) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH4              (0x10) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH5              (0x20) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH6              (0x40) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH7              (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_FECL */ -#define MCF_GPIO_PDDR_FECL_PDDR_FECL0              (0x01) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL1              (0x02) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL2              (0x04) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL3              (0x08) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL4              (0x10) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL5              (0x20) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL6              (0x40) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL7              (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_SSI */ -#define MCF_GPIO_PDDR_SSI_PDDR_SSI0                (0x01) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI1                (0x02) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI2                (0x04) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI3                (0x08) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI4                (0x10) - -/* Bit definitions and macros for MCF_GPIO_PDDR_BUSCTL */ -#define MCF_GPIO_PDDR_BUSCTL_POSDR_BUSCTL0         (0x01) -#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL1          (0x02) -#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL2          (0x04) -#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL3          (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_BE */ -#define MCF_GPIO_PDDR_BE_PDDR_BE0                  (0x01) -#define MCF_GPIO_PDDR_BE_PDDR_BE1                  (0x02) -#define MCF_GPIO_PDDR_BE_PDDR_BE2                  (0x04) -#define MCF_GPIO_PDDR_BE_PDDR_BE3                  (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_CS */ -#define MCF_GPIO_PDDR_CS_PDDR_CS1                  (0x02) -#define MCF_GPIO_PDDR_CS_PDDR_CS2                  (0x04) -#define MCF_GPIO_PDDR_CS_PDDR_CS3                  (0x08) -#define MCF_GPIO_PDDR_CS_PDDR_CS4                  (0x10) -#define MCF_GPIO_PDDR_CS_PDDR_CS5                  (0x20) - -/* Bit definitions and macros for MCF_GPIO_PDDR_PWM */ -#define MCF_GPIO_PDDR_PWM_PDDR_PWM2                (0x04) -#define MCF_GPIO_PDDR_PWM_PDDR_PWM3                (0x08) -#define MCF_GPIO_PDDR_PWM_PDDR_PWM4                (0x10) -#define MCF_GPIO_PDDR_PWM_PDDR_PWM5                (0x20) - -/* Bit definitions and macros for MCF_GPIO_PDDR_FECI2C */ -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C0          (0x01) -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C1          (0x02) -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C2          (0x04) -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C3          (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_UART */ -#define MCF_GPIO_PDDR_UART_PDDR_UART0              (0x01) -#define MCF_GPIO_PDDR_UART_PDDR_UART1              (0x02) -#define MCF_GPIO_PDDR_UART_PDDR_UART2              (0x04) -#define MCF_GPIO_PDDR_UART_PDDR_UART3              (0x08) -#define MCF_GPIO_PDDR_UART_PDDR_UART4              (0x10) -#define MCF_GPIO_PDDR_UART_PDDR_UART5              (0x20) -#define MCF_GPIO_PDDR_UART_PDDR_UART6              (0x40) -#define MCF_GPIO_PDDR_UART_PDDR_UART7              (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_QSPI */ -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI0              (0x01) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI1              (0x02) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI2              (0x04) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI3              (0x08) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI4              (0x10) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI5              (0x20) - -/* Bit definitions and macros for MCF_GPIO_PDDR_TIMER */ -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER0            (0x01) -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER1            (0x02) -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER2            (0x04) -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER3            (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAH */ -#define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH0      (0x01) -#define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH1      (0x02) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAM */ -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM0      (0x01) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM1      (0x02) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM2      (0x04) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM3      (0x08) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM4      (0x10) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM5      (0x20) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM6      (0x40) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM7      (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAL */ -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL0      (0x01) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL1      (0x02) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL2      (0x04) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL3      (0x08) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL4      (0x10) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL5      (0x20) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL6      (0x40) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL7      (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLH */ -#define MCF_GPIO_PDDR_LCDCTLH_PDDR_LCDCTLH0        (0x01) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLL */ -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL0        (0x01) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL1        (0x02) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL2        (0x04) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL3        (0x08) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL4        (0x10) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL5        (0x20) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL6        (0x40) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL7        (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECH */ -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH0          (0x01) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH1          (0x02) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH2          (0x04) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH3          (0x08) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH4          (0x10) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH5          (0x20) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH6          (0x40) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH7          (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECL */ -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL0          (0x01) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL1          (0x02) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL2          (0x04) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL3          (0x08) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL4          (0x10) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL5          (0x20) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL6          (0x40) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL7          (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_SSI */ -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI0            (0x01) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI1            (0x02) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI2            (0x04) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI3            (0x08) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI4            (0x10) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_BUSCTL */ -#define MCF_GPIO_PPDSDR_BUSCTL_POSDR_BUSCTL0       (0x01) -#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL1      (0x02) -#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL2      (0x04) -#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL3      (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_BE */ -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE0              (0x01) -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE1              (0x02) -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE2              (0x04) -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE3              (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_CS */ -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS1              (0x02) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS2              (0x04) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS3              (0x08) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS4              (0x10) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS5              (0x20) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_PWM */ -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM2            (0x04) -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM3            (0x08) -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM4            (0x10) -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM5            (0x20) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECI2C */ -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C0      (0x01) -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C1      (0x02) -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C2      (0x04) -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C3      (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_UART */ -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART0          (0x01) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART1          (0x02) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART2          (0x04) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART3          (0x08) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART4          (0x10) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART5          (0x20) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART6          (0x40) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART7          (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_QSPI */ -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI0          (0x01) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI1          (0x02) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI2          (0x04) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI3          (0x08) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI4          (0x10) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI5          (0x20) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_TIMER */ -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER0        (0x01) -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER1        (0x02) -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER2        (0x04) -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER3        (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAH */ -#define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH0  (0x01) -#define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH1  (0x02) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAM */ -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM0  (0x01) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM1  (0x02) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM2  (0x04) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM3  (0x08) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM4  (0x10) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM5  (0x20) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM6  (0x40) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM7  (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAL */ -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL0  (0x01) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL1  (0x02) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL2  (0x04) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL3  (0x08) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL4  (0x10) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL5  (0x20) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL6  (0x40) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL7  (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLH */ -#define MCF_GPIO_PPDSDR_LCDCTLH_PPDSDR_LCDCTLH0    (0x01) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLL */ -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL0    (0x01) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL1    (0x02) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL2    (0x04) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL3    (0x08) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL4    (0x10) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL5    (0x20) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL6    (0x40) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL7    (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_FECH */ -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH0            (0x01) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH1            (0x02) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH2            (0x04) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH3            (0x08) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH4            (0x10) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH5            (0x20) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH6            (0x40) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH7            (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_FECL */ -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL0            (0x01) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL1            (0x02) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL2            (0x04) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL3            (0x08) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL4            (0x10) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL5            (0x20) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL6            (0x40) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL7            (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_SSI */ -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI0              (0x01) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI1              (0x02) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI2              (0x04) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI3              (0x08) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI4              (0x10) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_BUSCTL */ -#define MCF_GPIO_PCLRR_BUSCTL_POSDR_BUSCTL0        (0x01) -#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL1        (0x02) -#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL2        (0x04) -#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL3        (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_BE */ -#define MCF_GPIO_PCLRR_BE_PCLRR_BE0                (0x01) -#define MCF_GPIO_PCLRR_BE_PCLRR_BE1                (0x02) -#define MCF_GPIO_PCLRR_BE_PCLRR_BE2                (0x04) -#define MCF_GPIO_PCLRR_BE_PCLRR_BE3                (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_CS */ -#define MCF_GPIO_PCLRR_CS_PCLRR_CS1                (0x02) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS2                (0x04) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS3                (0x08) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS4                (0x10) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS5                (0x20) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_PWM */ -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM2              (0x04) -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM3              (0x08) -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM4              (0x10) -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM5              (0x20) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_FECI2C */ -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C0        (0x01) -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C1        (0x02) -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C2        (0x04) -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C3        (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_UART */ -#define MCF_GPIO_PCLRR_UART_PCLRR_UART0            (0x01) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART1            (0x02) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART2            (0x04) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART3            (0x08) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART4            (0x10) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART5            (0x20) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART6            (0x40) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART7            (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_QSPI */ -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI0            (0x01) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI1            (0x02) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI2            (0x04) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI3            (0x08) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI4            (0x10) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI5            (0x20) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_TIMER */ -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER0          (0x01) -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER1          (0x02) -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER2          (0x04) -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER3          (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAH */ -#define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH0    (0x01) -#define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH1    (0x02) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAM */ -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM0    (0x01) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM1    (0x02) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM2    (0x04) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM3    (0x08) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM4    (0x10) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM5    (0x20) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM6    (0x40) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM7    (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAL */ -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL0    (0x01) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL1    (0x02) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL2    (0x04) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL3    (0x08) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL4    (0x10) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL5    (0x20) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL6    (0x40) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL7    (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLH */ -#define MCF_GPIO_PCLRR_LCDCTLH_PCLRR_LCDCTLH0      (0x01) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLL */ -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL0      (0x01) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL1      (0x02) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL2      (0x04) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL3      (0x08) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL4      (0x10) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL5      (0x20) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL6      (0x40) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL7      (0x80) - -/* Bit definitions and macros for MCF_GPIO_PAR_FEC */ -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII(x)            (((x)&0x03)<<0) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W(x)             (((x)&0x03)<<2) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_GPIO           (0x00) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_URTS1          (0x04) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC            (0x0C) -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_GPIO          (0x00) -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_UART          (0x01) -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC           (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_PWM */ -#define MCF_GPIO_PAR_PWM_PAR_PWM1(x)               (((x)&0x03)<<0) -#define MCF_GPIO_PAR_PWM_PAR_PWM3(x)               (((x)&0x03)<<2) -#define MCF_GPIO_PAR_PWM_PAR_PWM5                  (0x10) -#define MCF_GPIO_PAR_PWM_PAR_PWM7                  (0x20) - -/* Bit definitions and macros for MCF_GPIO_PAR_BUSCTL */ -#define MCF_GPIO_PAR_BUSCTL_PAR_TS(x)              (((x)&0x03)<<3) -#define MCF_GPIO_PAR_BUSCTL_PAR_RWB                (0x20) -#define MCF_GPIO_PAR_BUSCTL_PAR_TA                 (0x40) -#define MCF_GPIO_PAR_BUSCTL_PAR_OE                 (0x80) -#define MCF_GPIO_PAR_BUSCTL_PAR_OE_GPIO            (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_OE_OE              (0x80) -#define MCF_GPIO_PAR_BUSCTL_PAR_TA_GPIO            (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_TA_TA              (0x40) -#define MCF_GPIO_PAR_BUSCTL_PAR_RWB_GPIO           (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_RWB_RWB            (0x20) -#define MCF_GPIO_PAR_BUSCTL_PAR_TS_GPIO            (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_TS_DACK0           (0x10) -#define MCF_GPIO_PAR_BUSCTL_PAR_TS_TS              (0x18) - -/* Bit definitions and macros for MCF_GPIO_PAR_FECI2C */ -#define MCF_GPIO_PAR_FECI2C_PAR_SDA(x)             (((x)&0x03)<<0) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL(x)             (((x)&0x03)<<2) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO(x)            (((x)&0x03)<<4) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC(x)             (((x)&0x03)<<6) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_GPIO           (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_UTXD2          (0x40) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_SCL            (0x80) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC           (0xC0) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_GPIO          (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_URXD2         (0x10) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_SDA           (0x20) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO         (0x30) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL_GPIO           (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2          (0x04) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL_SCL            (0x0C) -#define MCF_GPIO_PAR_FECI2C_PAR_SDA_GPIO           (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2          (0x02) -#define MCF_GPIO_PAR_FECI2C_PAR_SDA_SDA            (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_BE */ -#define MCF_GPIO_PAR_BE_PAR_BE0                    (0x01) -#define MCF_GPIO_PAR_BE_PAR_BE1                    (0x02) -#define MCF_GPIO_PAR_BE_PAR_BE2                    (0x04) -#define MCF_GPIO_PAR_BE_PAR_BE3                    (0x08) - -/* Bit definitions and macros for MCF_GPIO_PAR_CS */ -#define MCF_GPIO_PAR_CS_PAR_CS1                    (0x02) -#define MCF_GPIO_PAR_CS_PAR_CS2                    (0x04) -#define MCF_GPIO_PAR_CS_PAR_CS3                    (0x08) -#define MCF_GPIO_PAR_CS_PAR_CS4                    (0x10) -#define MCF_GPIO_PAR_CS_PAR_CS5                    (0x20) -#define MCF_GPIO_PAR_CS_PAR_CS_CS1_GPIO            (0x00) -#define MCF_GPIO_PAR_CS_PAR_CS_CS1_SDCS1           (0x01) -#define MCF_GPIO_PAR_CS_PAR_CS_CS1_CS1             (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_SSI */ -#define MCF_GPIO_PAR_SSI_PAR_MCLK                  (0x0080) -#define MCF_GPIO_PAR_SSI_PAR_TXD(x)                (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_SSI_PAR_RXD(x)                (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_SSI_PAR_FS(x)                 (((x)&0x0003)<<12) -#define MCF_GPIO_PAR_SSI_PAR_BCLK(x)               (((x)&0x0003)<<14) - -/* Bit definitions and macros for MCF_GPIO_PAR_UART */ -#define MCF_GPIO_PAR_UART_PAR_UTXD0                (0x0001) -#define MCF_GPIO_PAR_UART_PAR_URXD0                (0x0002) -#define MCF_GPIO_PAR_UART_PAR_URTS0                (0x0004) -#define MCF_GPIO_PAR_UART_PAR_UCTS0                (0x0008) -#define MCF_GPIO_PAR_UART_PAR_UTXD1(x)             (((x)&0x0003)<<4) -#define MCF_GPIO_PAR_UART_PAR_URXD1(x)             (((x)&0x0003)<<6) -#define MCF_GPIO_PAR_UART_PAR_URTS1(x)             (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_UART_PAR_UCTS1(x)             (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_GPIO           (0x0000) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_SSI_BCLK       (0x0800) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_ULPI_D7        (0x0400) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_UCTS1          (0x0C00) -#define MCF_GPIO_PAR_UART_PAR_URTS1_GPIO           (0x0000) -#define MCF_GPIO_PAR_UART_PAR_URTS1_SSI_FS         (0x0200) -#define MCF_GPIO_PAR_UART_PAR_URTS1_ULPI_D6        (0x0100) -#define MCF_GPIO_PAR_UART_PAR_URTS1_URTS1          (0x0300) -#define MCF_GPIO_PAR_UART_PAR_URXD1_GPIO           (0x0000) -#define MCF_GPIO_PAR_UART_PAR_URXD1_SSI_RXD        (0x0080) -#define MCF_GPIO_PAR_UART_PAR_URXD1_ULPI_D5        (0x0040) -#define MCF_GPIO_PAR_UART_PAR_URXD1_URXD1          (0x00C0) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_GPIO           (0x0000) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_SSI_TXD        (0x0020) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_ULPI_D4        (0x0010) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_UTXD1          (0x0030) - -/* Bit definitions and macros for MCF_GPIO_PAR_QSPI */ -#define MCF_GPIO_PAR_QSPI_PAR_SCK(x)               (((x)&0x0003)<<4) -#define MCF_GPIO_PAR_QSPI_PAR_DOUT(x)              (((x)&0x0003)<<6) -#define MCF_GPIO_PAR_QSPI_PAR_DIN(x)               (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_QSPI_PAR_PCS0(x)              (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_QSPI_PAR_PCS1(x)              (((x)&0x0003)<<12) -#define MCF_GPIO_PAR_QSPI_PAR_PCS2(x)              (((x)&0x0003)<<14) - -/* Bit definitions and macros for MCF_GPIO_PAR_TIMER */ -#define MCF_GPIO_PAR_TIMER_PAR_TIN0(x)             (((x)&0x03)<<0) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1(x)             (((x)&0x03)<<2) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2(x)             (((x)&0x03)<<4) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3(x)             (((x)&0x03)<<6) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_GPIO           (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_TOUT3          (0x80) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_URXD2          (0x40) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_TIN3           (0xC0) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_GPIO           (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_TOUT2          (0x20) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_UTXD2          (0x10) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_TIN2           (0x30) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_GPIO           (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_TOUT1          (0x08) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_DACK1          (0x04) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_TIN1           (0x0C) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_GPIO           (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_TOUT0          (0x02) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_DREQ0          (0x01) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_TIN0           (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_LCDDATA */ -#define MCF_GPIO_PAR_LCDDATA_PAR_LD7_0(x)          (((x)&0x03)<<0) -#define MCF_GPIO_PAR_LCDDATA_PAR_LD15_8(x)         (((x)&0x03)<<2) -#define MCF_GPIO_PAR_LCDDATA_PAR_LD16(x)           (((x)&0x03)<<4) -#define MCF_GPIO_PAR_LCDDATA_PAR_LD17(x)           (((x)&0x03)<<6) - -/* Bit definitions and macros for MCF_GPIO_PAR_LCDCTL */ -#define MCF_GPIO_PAR_LCDCTL_PAR_CLS                (0x0001) -#define MCF_GPIO_PAR_LCDCTL_PAR_PS                 (0x0002) -#define MCF_GPIO_PAR_LCDCTL_PAR_REV                (0x0004) -#define MCF_GPIO_PAR_LCDCTL_PAR_SPL_SPR            (0x0008) -#define MCF_GPIO_PAR_LCDCTL_PAR_CONTRAST           (0x0010) -#define MCF_GPIO_PAR_LCDCTL_PAR_LSCLK              (0x0020) -#define MCF_GPIO_PAR_LCDCTL_PAR_LP_HSYNC           (0x0040) -#define MCF_GPIO_PAR_LCDCTL_PAR_FLM_VSYNC          (0x0080) -#define MCF_GPIO_PAR_LCDCTL_PAR_ACD_OE             (0x0100) - -/* Bit definitions and macros for MCF_GPIO_PAR_IRQ */ -#define MCF_GPIO_PAR_IRQ_PAR_IRQ1(x)               (((x)&0x0003)<<4) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ2(x)               (((x)&0x0003)<<6) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ4(x)               (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ5(x)               (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ6(x)               (((x)&0x0003)<<12) - -/* Bit definitions and macros for MCF_GPIO_MSCR_FLEXBUS */ -#define MCF_GPIO_MSCR_FLEXBUS_MSCR_ADDRCTL(x)      (((x)&0x03)<<0) -#define MCF_GPIO_MSCR_FLEXBUS_MSCR_DLOWER(x)       (((x)&0x03)<<2) -#define MCF_GPIO_MSCR_FLEXBUS_MSCR_DUPPER(x)       (((x)&0x03)<<4) - -/* Bit definitions and macros for MCF_GPIO_MSCR_SDRAM */ -#define MCF_GPIO_MSCR_SDRAM_MSCR_SDRAM(x)          (((x)&0x03)<<0) -#define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLK(x)          (((x)&0x03)<<2) -#define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLKB(x)         (((x)&0x03)<<4) - -/* Bit definitions and macros for MCF_GPIO_DSCR_I2C */ -#define MCF_GPIO_DSCR_I2C_I2C_DSE(x)               (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_PWM */ -#define MCF_GPIO_DSCR_PWM_PWM_DSE(x)               (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_FEC */ -#define MCF_GPIO_DSCR_FEC_FEC_DSE(x)               (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_UART */ -#define MCF_GPIO_DSCR_UART_UART0_DSE(x)            (((x)&0x03)<<0) -#define MCF_GPIO_DSCR_UART_UART1_DSE(x)            (((x)&0x03)<<2) - -/* Bit definitions and macros for MCF_GPIO_DSCR_QSPI */ -#define MCF_GPIO_DSCR_QSPI_QSPI_DSE(x)             (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_TIMER */ -#define MCF_GPIO_DSCR_TIMER_TIMER_DSE(x)           (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_SSI */ -#define MCF_GPIO_DSCR_SSI_SSI_DSE(x)               (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_LCD */ -#define MCF_GPIO_DSCR_LCD_LCD_DSE(x)               (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_DEBUG */ -#define MCF_GPIO_DSCR_DEBUG_DEBUG_DSE(x)           (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_CLKRST */ -#define MCF_GPIO_DSCR_CLKRST_CLKRST_DSE(x)         (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ -#define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x)               (((x)&0x03)<<0) - -/* - * Generic GPIO support - */ -#define MCFGPIO_PODR			MCFGPIO_PODR_FECH -#define MCFGPIO_PDDR			MCFGPIO_PDDR_FECH -#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_FECH -#define MCFGPIO_SETR			MCFGPIO_PPDSDR_FECH -#define MCFGPIO_CLRR			MCFGPIO_PCLRR_FECH - -#define MCFGPIO_PIN_MAX			136 -#define MCFGPIO_IRQ_MAX			8 -#define MCFGPIO_IRQ_VECBASE		MCFINT_VECBASE - - -/********************************************************************* - * - * Interrupt Controller (INTC) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_INTC0_IPRH             MCF_REG32(0xFC048000) -#define MCF_INTC0_IPRL             MCF_REG32(0xFC048004) -#define MCF_INTC0_IMRH             MCF_REG32(0xFC048008) -#define MCF_INTC0_IMRL             MCF_REG32(0xFC04800C) -#define MCF_INTC0_INTFRCH          MCF_REG32(0xFC048010) -#define MCF_INTC0_INTFRCL          MCF_REG32(0xFC048014) -#define MCF_INTC0_ICONFIG          MCF_REG16(0xFC04801A) -#define MCF_INTC0_SIMR             MCF_REG08(0xFC04801C) -#define MCF_INTC0_CIMR             MCF_REG08(0xFC04801D) -#define MCF_INTC0_CLMASK           MCF_REG08(0xFC04801E) -#define MCF_INTC0_SLMASK           MCF_REG08(0xFC04801F) -#define MCF_INTC0_ICR0             MCF_REG08(0xFC048040) -#define MCF_INTC0_ICR1             MCF_REG08(0xFC048041) -#define MCF_INTC0_ICR2             MCF_REG08(0xFC048042) -#define MCF_INTC0_ICR3             MCF_REG08(0xFC048043) -#define MCF_INTC0_ICR4             MCF_REG08(0xFC048044) -#define MCF_INTC0_ICR5             MCF_REG08(0xFC048045) -#define MCF_INTC0_ICR6             MCF_REG08(0xFC048046) -#define MCF_INTC0_ICR7             MCF_REG08(0xFC048047) -#define MCF_INTC0_ICR8             MCF_REG08(0xFC048048) -#define MCF_INTC0_ICR9             MCF_REG08(0xFC048049) -#define MCF_INTC0_ICR10            MCF_REG08(0xFC04804A) -#define MCF_INTC0_ICR11            MCF_REG08(0xFC04804B) -#define MCF_INTC0_ICR12            MCF_REG08(0xFC04804C) -#define MCF_INTC0_ICR13            MCF_REG08(0xFC04804D) -#define MCF_INTC0_ICR14            MCF_REG08(0xFC04804E) -#define MCF_INTC0_ICR15            MCF_REG08(0xFC04804F) -#define MCF_INTC0_ICR16            MCF_REG08(0xFC048050) -#define MCF_INTC0_ICR17            MCF_REG08(0xFC048051) -#define MCF_INTC0_ICR18            MCF_REG08(0xFC048052) -#define MCF_INTC0_ICR19            MCF_REG08(0xFC048053) -#define MCF_INTC0_ICR20            MCF_REG08(0xFC048054) -#define MCF_INTC0_ICR21            MCF_REG08(0xFC048055) -#define MCF_INTC0_ICR22            MCF_REG08(0xFC048056) -#define MCF_INTC0_ICR23            MCF_REG08(0xFC048057) -#define MCF_INTC0_ICR24            MCF_REG08(0xFC048058) -#define MCF_INTC0_ICR25            MCF_REG08(0xFC048059) -#define MCF_INTC0_ICR26            MCF_REG08(0xFC04805A) -#define MCF_INTC0_ICR27            MCF_REG08(0xFC04805B) -#define MCF_INTC0_ICR28            MCF_REG08(0xFC04805C) -#define MCF_INTC0_ICR29            MCF_REG08(0xFC04805D) -#define MCF_INTC0_ICR30            MCF_REG08(0xFC04805E) -#define MCF_INTC0_ICR31            MCF_REG08(0xFC04805F) -#define MCF_INTC0_ICR32            MCF_REG08(0xFC048060) -#define MCF_INTC0_ICR33            MCF_REG08(0xFC048061) -#define MCF_INTC0_ICR34            MCF_REG08(0xFC048062) -#define MCF_INTC0_ICR35            MCF_REG08(0xFC048063) -#define MCF_INTC0_ICR36            MCF_REG08(0xFC048064) -#define MCF_INTC0_ICR37            MCF_REG08(0xFC048065) -#define MCF_INTC0_ICR38            MCF_REG08(0xFC048066) -#define MCF_INTC0_ICR39            MCF_REG08(0xFC048067) -#define MCF_INTC0_ICR40            MCF_REG08(0xFC048068) -#define MCF_INTC0_ICR41            MCF_REG08(0xFC048069) -#define MCF_INTC0_ICR42            MCF_REG08(0xFC04806A) -#define MCF_INTC0_ICR43            MCF_REG08(0xFC04806B) -#define MCF_INTC0_ICR44            MCF_REG08(0xFC04806C) -#define MCF_INTC0_ICR45            MCF_REG08(0xFC04806D) -#define MCF_INTC0_ICR46            MCF_REG08(0xFC04806E) -#define MCF_INTC0_ICR47            MCF_REG08(0xFC04806F) -#define MCF_INTC0_ICR48            MCF_REG08(0xFC048070) -#define MCF_INTC0_ICR49            MCF_REG08(0xFC048071) -#define MCF_INTC0_ICR50            MCF_REG08(0xFC048072) -#define MCF_INTC0_ICR51            MCF_REG08(0xFC048073) -#define MCF_INTC0_ICR52            MCF_REG08(0xFC048074) -#define MCF_INTC0_ICR53            MCF_REG08(0xFC048075) -#define MCF_INTC0_ICR54            MCF_REG08(0xFC048076) -#define MCF_INTC0_ICR55            MCF_REG08(0xFC048077) -#define MCF_INTC0_ICR56            MCF_REG08(0xFC048078) -#define MCF_INTC0_ICR57            MCF_REG08(0xFC048079) -#define MCF_INTC0_ICR58            MCF_REG08(0xFC04807A) -#define MCF_INTC0_ICR59            MCF_REG08(0xFC04807B) -#define MCF_INTC0_ICR60            MCF_REG08(0xFC04807C) -#define MCF_INTC0_ICR61            MCF_REG08(0xFC04807D) -#define MCF_INTC0_ICR62            MCF_REG08(0xFC04807E) -#define MCF_INTC0_ICR63            MCF_REG08(0xFC04807F) -#define MCF_INTC0_ICR(x)           MCF_REG08(0xFC048040+((x)*0x001)) -#define MCF_INTC0_SWIACK           MCF_REG08(0xFC0480E0) -#define MCF_INTC0_L1IACK           MCF_REG08(0xFC0480E4) -#define MCF_INTC0_L2IACK           MCF_REG08(0xFC0480E8) -#define MCF_INTC0_L3IACK           MCF_REG08(0xFC0480EC) -#define MCF_INTC0_L4IACK           MCF_REG08(0xFC0480F0) -#define MCF_INTC0_L5IACK           MCF_REG08(0xFC0480F4) -#define MCF_INTC0_L6IACK           MCF_REG08(0xFC0480F8) -#define MCF_INTC0_L7IACK           MCF_REG08(0xFC0480FC) -#define MCF_INTC0_LIACK(x)         MCF_REG08(0xFC0480E4+((x)*0x004)) -#define MCF_INTC1_IPRH             MCF_REG32(0xFC04C000) -#define MCF_INTC1_IPRL             MCF_REG32(0xFC04C004) -#define MCF_INTC1_IMRH             MCF_REG32(0xFC04C008) -#define MCF_INTC1_IMRL             MCF_REG32(0xFC04C00C) -#define MCF_INTC1_INTFRCH          MCF_REG32(0xFC04C010) -#define MCF_INTC1_INTFRCL          MCF_REG32(0xFC04C014) -#define MCF_INTC1_ICONFIG          MCF_REG16(0xFC04C01A) -#define MCF_INTC1_SIMR             MCF_REG08(0xFC04C01C) -#define MCF_INTC1_CIMR             MCF_REG08(0xFC04C01D) -#define MCF_INTC1_CLMASK           MCF_REG08(0xFC04C01E) -#define MCF_INTC1_SLMASK           MCF_REG08(0xFC04C01F) -#define MCF_INTC1_ICR0             MCF_REG08(0xFC04C040) -#define MCF_INTC1_ICR1             MCF_REG08(0xFC04C041) -#define MCF_INTC1_ICR2             MCF_REG08(0xFC04C042) -#define MCF_INTC1_ICR3             MCF_REG08(0xFC04C043) -#define MCF_INTC1_ICR4             MCF_REG08(0xFC04C044) -#define MCF_INTC1_ICR5             MCF_REG08(0xFC04C045) -#define MCF_INTC1_ICR6             MCF_REG08(0xFC04C046) -#define MCF_INTC1_ICR7             MCF_REG08(0xFC04C047) -#define MCF_INTC1_ICR8             MCF_REG08(0xFC04C048) -#define MCF_INTC1_ICR9             MCF_REG08(0xFC04C049) -#define MCF_INTC1_ICR10            MCF_REG08(0xFC04C04A) -#define MCF_INTC1_ICR11            MCF_REG08(0xFC04C04B) -#define MCF_INTC1_ICR12            MCF_REG08(0xFC04C04C) -#define MCF_INTC1_ICR13            MCF_REG08(0xFC04C04D) -#define MCF_INTC1_ICR14            MCF_REG08(0xFC04C04E) -#define MCF_INTC1_ICR15            MCF_REG08(0xFC04C04F) -#define MCF_INTC1_ICR16            MCF_REG08(0xFC04C050) -#define MCF_INTC1_ICR17            MCF_REG08(0xFC04C051) -#define MCF_INTC1_ICR18            MCF_REG08(0xFC04C052) -#define MCF_INTC1_ICR19            MCF_REG08(0xFC04C053) -#define MCF_INTC1_ICR20            MCF_REG08(0xFC04C054) -#define MCF_INTC1_ICR21            MCF_REG08(0xFC04C055) -#define MCF_INTC1_ICR22            MCF_REG08(0xFC04C056) -#define MCF_INTC1_ICR23            MCF_REG08(0xFC04C057) -#define MCF_INTC1_ICR24            MCF_REG08(0xFC04C058) -#define MCF_INTC1_ICR25            MCF_REG08(0xFC04C059) -#define MCF_INTC1_ICR26            MCF_REG08(0xFC04C05A) -#define MCF_INTC1_ICR27            MCF_REG08(0xFC04C05B) -#define MCF_INTC1_ICR28            MCF_REG08(0xFC04C05C) -#define MCF_INTC1_ICR29            MCF_REG08(0xFC04C05D) -#define MCF_INTC1_ICR30            MCF_REG08(0xFC04C05E) -#define MCF_INTC1_ICR31            MCF_REG08(0xFC04C05F) -#define MCF_INTC1_ICR32            MCF_REG08(0xFC04C060) -#define MCF_INTC1_ICR33            MCF_REG08(0xFC04C061) -#define MCF_INTC1_ICR34            MCF_REG08(0xFC04C062) -#define MCF_INTC1_ICR35            MCF_REG08(0xFC04C063) -#define MCF_INTC1_ICR36            MCF_REG08(0xFC04C064) -#define MCF_INTC1_ICR37            MCF_REG08(0xFC04C065) -#define MCF_INTC1_ICR38            MCF_REG08(0xFC04C066) -#define MCF_INTC1_ICR39            MCF_REG08(0xFC04C067) -#define MCF_INTC1_ICR40            MCF_REG08(0xFC04C068) -#define MCF_INTC1_ICR41            MCF_REG08(0xFC04C069) -#define MCF_INTC1_ICR42            MCF_REG08(0xFC04C06A) -#define MCF_INTC1_ICR43            MCF_REG08(0xFC04C06B) -#define MCF_INTC1_ICR44            MCF_REG08(0xFC04C06C) -#define MCF_INTC1_ICR45            MCF_REG08(0xFC04C06D) -#define MCF_INTC1_ICR46            MCF_REG08(0xFC04C06E) -#define MCF_INTC1_ICR47            MCF_REG08(0xFC04C06F) -#define MCF_INTC1_ICR48            MCF_REG08(0xFC04C070) -#define MCF_INTC1_ICR49            MCF_REG08(0xFC04C071) -#define MCF_INTC1_ICR50            MCF_REG08(0xFC04C072) -#define MCF_INTC1_ICR51            MCF_REG08(0xFC04C073) -#define MCF_INTC1_ICR52            MCF_REG08(0xFC04C074) -#define MCF_INTC1_ICR53            MCF_REG08(0xFC04C075) -#define MCF_INTC1_ICR54            MCF_REG08(0xFC04C076) -#define MCF_INTC1_ICR55            MCF_REG08(0xFC04C077) -#define MCF_INTC1_ICR56            MCF_REG08(0xFC04C078) -#define MCF_INTC1_ICR57            MCF_REG08(0xFC04C079) -#define MCF_INTC1_ICR58            MCF_REG08(0xFC04C07A) -#define MCF_INTC1_ICR59            MCF_REG08(0xFC04C07B) -#define MCF_INTC1_ICR60            MCF_REG08(0xFC04C07C) -#define MCF_INTC1_ICR61            MCF_REG08(0xFC04C07D) -#define MCF_INTC1_ICR62            MCF_REG08(0xFC04C07E) -#define MCF_INTC1_ICR63            MCF_REG08(0xFC04C07F) -#define MCF_INTC1_ICR(x)           MCF_REG08(0xFC04C040+((x)*0x001)) -#define MCF_INTC1_SWIACK           MCF_REG08(0xFC04C0E0) -#define MCF_INTC1_L1IACK           MCF_REG08(0xFC04C0E4) -#define MCF_INTC1_L2IACK           MCF_REG08(0xFC04C0E8) -#define MCF_INTC1_L3IACK           MCF_REG08(0xFC04C0EC) -#define MCF_INTC1_L4IACK           MCF_REG08(0xFC04C0F0) -#define MCF_INTC1_L5IACK           MCF_REG08(0xFC04C0F4) -#define MCF_INTC1_L6IACK           MCF_REG08(0xFC04C0F8) -#define MCF_INTC1_L7IACK           MCF_REG08(0xFC04C0FC) -#define MCF_INTC1_LIACK(x)         MCF_REG08(0xFC04C0E4+((x)*0x004)) -#define MCF_INTC_IPRH(x)           MCF_REG32(0xFC048000+((x)*0x4000)) -#define MCF_INTC_IPRL(x)           MCF_REG32(0xFC048004+((x)*0x4000)) -#define MCF_INTC_IMRH(x)           MCF_REG32(0xFC048008+((x)*0x4000)) -#define MCF_INTC_IMRL(x)           MCF_REG32(0xFC04800C+((x)*0x4000)) -#define MCF_INTC_INTFRCH(x)        MCF_REG32(0xFC048010+((x)*0x4000)) -#define MCF_INTC_INTFRCL(x)        MCF_REG32(0xFC048014+((x)*0x4000)) -#define MCF_INTC_ICONFIG(x)        MCF_REG16(0xFC04801A+((x)*0x4000)) -#define MCF_INTC_SIMR(x)           MCF_REG08(0xFC04801C+((x)*0x4000)) -#define MCF_INTC_CIMR(x)           MCF_REG08(0xFC04801D+((x)*0x4000)) -#define MCF_INTC_CLMASK(x)         MCF_REG08(0xFC04801E+((x)*0x4000)) -#define MCF_INTC_SLMASK(x)         MCF_REG08(0xFC04801F+((x)*0x4000)) -#define MCF_INTC_ICR0(x)           MCF_REG08(0xFC048040+((x)*0x4000)) -#define MCF_INTC_ICR1(x)           MCF_REG08(0xFC048041+((x)*0x4000)) -#define MCF_INTC_ICR2(x)           MCF_REG08(0xFC048042+((x)*0x4000)) -#define MCF_INTC_ICR3(x)           MCF_REG08(0xFC048043+((x)*0x4000)) -#define MCF_INTC_ICR4(x)           MCF_REG08(0xFC048044+((x)*0x4000)) -#define MCF_INTC_ICR5(x)           MCF_REG08(0xFC048045+((x)*0x4000)) -#define MCF_INTC_ICR6(x)           MCF_REG08(0xFC048046+((x)*0x4000)) -#define MCF_INTC_ICR7(x)           MCF_REG08(0xFC048047+((x)*0x4000)) -#define MCF_INTC_ICR8(x)           MCF_REG08(0xFC048048+((x)*0x4000)) -#define MCF_INTC_ICR9(x)           MCF_REG08(0xFC048049+((x)*0x4000)) -#define MCF_INTC_ICR10(x)          MCF_REG08(0xFC04804A+((x)*0x4000)) -#define MCF_INTC_ICR11(x)          MCF_REG08(0xFC04804B+((x)*0x4000)) -#define MCF_INTC_ICR12(x)          MCF_REG08(0xFC04804C+((x)*0x4000)) -#define MCF_INTC_ICR13(x)          MCF_REG08(0xFC04804D+((x)*0x4000)) -#define MCF_INTC_ICR14(x)          MCF_REG08(0xFC04804E+((x)*0x4000)) -#define MCF_INTC_ICR15(x)          MCF_REG08(0xFC04804F+((x)*0x4000)) -#define MCF_INTC_ICR16(x)          MCF_REG08(0xFC048050+((x)*0x4000)) -#define MCF_INTC_ICR17(x)          MCF_REG08(0xFC048051+((x)*0x4000)) -#define MCF_INTC_ICR18(x)          MCF_REG08(0xFC048052+((x)*0x4000)) -#define MCF_INTC_ICR19(x)          MCF_REG08(0xFC048053+((x)*0x4000)) -#define MCF_INTC_ICR20(x)          MCF_REG08(0xFC048054+((x)*0x4000)) -#define MCF_INTC_ICR21(x)          MCF_REG08(0xFC048055+((x)*0x4000)) -#define MCF_INTC_ICR22(x)          MCF_REG08(0xFC048056+((x)*0x4000)) -#define MCF_INTC_ICR23(x)          MCF_REG08(0xFC048057+((x)*0x4000)) -#define MCF_INTC_ICR24(x)          MCF_REG08(0xFC048058+((x)*0x4000)) -#define MCF_INTC_ICR25(x)          MCF_REG08(0xFC048059+((x)*0x4000)) -#define MCF_INTC_ICR26(x)          MCF_REG08(0xFC04805A+((x)*0x4000)) -#define MCF_INTC_ICR27(x)          MCF_REG08(0xFC04805B+((x)*0x4000)) -#define MCF_INTC_ICR28(x)          MCF_REG08(0xFC04805C+((x)*0x4000)) -#define MCF_INTC_ICR29(x)          MCF_REG08(0xFC04805D+((x)*0x4000)) -#define MCF_INTC_ICR30(x)          MCF_REG08(0xFC04805E+((x)*0x4000)) -#define MCF_INTC_ICR31(x)          MCF_REG08(0xFC04805F+((x)*0x4000)) -#define MCF_INTC_ICR32(x)          MCF_REG08(0xFC048060+((x)*0x4000)) -#define MCF_INTC_ICR33(x)          MCF_REG08(0xFC048061+((x)*0x4000)) -#define MCF_INTC_ICR34(x)          MCF_REG08(0xFC048062+((x)*0x4000)) -#define MCF_INTC_ICR35(x)          MCF_REG08(0xFC048063+((x)*0x4000)) -#define MCF_INTC_ICR36(x)          MCF_REG08(0xFC048064+((x)*0x4000)) -#define MCF_INTC_ICR37(x)          MCF_REG08(0xFC048065+((x)*0x4000)) -#define MCF_INTC_ICR38(x)          MCF_REG08(0xFC048066+((x)*0x4000)) -#define MCF_INTC_ICR39(x)          MCF_REG08(0xFC048067+((x)*0x4000)) -#define MCF_INTC_ICR40(x)          MCF_REG08(0xFC048068+((x)*0x4000)) -#define MCF_INTC_ICR41(x)          MCF_REG08(0xFC048069+((x)*0x4000)) -#define MCF_INTC_ICR42(x)          MCF_REG08(0xFC04806A+((x)*0x4000)) -#define MCF_INTC_ICR43(x)          MCF_REG08(0xFC04806B+((x)*0x4000)) -#define MCF_INTC_ICR44(x)          MCF_REG08(0xFC04806C+((x)*0x4000)) -#define MCF_INTC_ICR45(x)          MCF_REG08(0xFC04806D+((x)*0x4000)) -#define MCF_INTC_ICR46(x)          MCF_REG08(0xFC04806E+((x)*0x4000)) -#define MCF_INTC_ICR47(x)          MCF_REG08(0xFC04806F+((x)*0x4000)) -#define MCF_INTC_ICR48(x)          MCF_REG08(0xFC048070+((x)*0x4000)) -#define MCF_INTC_ICR49(x)          MCF_REG08(0xFC048071+((x)*0x4000)) -#define MCF_INTC_ICR50(x)          MCF_REG08(0xFC048072+((x)*0x4000)) -#define MCF_INTC_ICR51(x)          MCF_REG08(0xFC048073+((x)*0x4000)) -#define MCF_INTC_ICR52(x)          MCF_REG08(0xFC048074+((x)*0x4000)) -#define MCF_INTC_ICR53(x)          MCF_REG08(0xFC048075+((x)*0x4000)) -#define MCF_INTC_ICR54(x)          MCF_REG08(0xFC048076+((x)*0x4000)) -#define MCF_INTC_ICR55(x)          MCF_REG08(0xFC048077+((x)*0x4000)) -#define MCF_INTC_ICR56(x)          MCF_REG08(0xFC048078+((x)*0x4000)) -#define MCF_INTC_ICR57(x)          MCF_REG08(0xFC048079+((x)*0x4000)) -#define MCF_INTC_ICR58(x)          MCF_REG08(0xFC04807A+((x)*0x4000)) -#define MCF_INTC_ICR59(x)          MCF_REG08(0xFC04807B+((x)*0x4000)) -#define MCF_INTC_ICR60(x)          MCF_REG08(0xFC04807C+((x)*0x4000)) -#define MCF_INTC_ICR61(x)          MCF_REG08(0xFC04807D+((x)*0x4000)) -#define MCF_INTC_ICR62(x)          MCF_REG08(0xFC04807E+((x)*0x4000)) -#define MCF_INTC_ICR63(x)          MCF_REG08(0xFC04807F+((x)*0x4000)) -#define MCF_INTC_SWIACK(x)         MCF_REG08(0xFC0480E0+((x)*0x4000)) -#define MCF_INTC_L1IACK(x)         MCF_REG08(0xFC0480E4+((x)*0x4000)) -#define MCF_INTC_L2IACK(x)         MCF_REG08(0xFC0480E8+((x)*0x4000)) -#define MCF_INTC_L3IACK(x)         MCF_REG08(0xFC0480EC+((x)*0x4000)) -#define MCF_INTC_L4IACK(x)         MCF_REG08(0xFC0480F0+((x)*0x4000)) -#define MCF_INTC_L5IACK(x)         MCF_REG08(0xFC0480F4+((x)*0x4000)) -#define MCF_INTC_L6IACK(x)         MCF_REG08(0xFC0480F8+((x)*0x4000)) -#define MCF_INTC_L7IACK(x)         MCF_REG08(0xFC0480FC+((x)*0x4000)) - -/* Bit definitions and macros for MCF_INTC_IPRH */ -#define MCF_INTC_IPRH_INT32        (0x00000001) -#define MCF_INTC_IPRH_INT33        (0x00000002) -#define MCF_INTC_IPRH_INT34        (0x00000004) -#define MCF_INTC_IPRH_INT35        (0x00000008) -#define MCF_INTC_IPRH_INT36        (0x00000010) -#define MCF_INTC_IPRH_INT37        (0x00000020) -#define MCF_INTC_IPRH_INT38        (0x00000040) -#define MCF_INTC_IPRH_INT39        (0x00000080) -#define MCF_INTC_IPRH_INT40        (0x00000100) -#define MCF_INTC_IPRH_INT41        (0x00000200) -#define MCF_INTC_IPRH_INT42        (0x00000400) -#define MCF_INTC_IPRH_INT43        (0x00000800) -#define MCF_INTC_IPRH_INT44        (0x00001000) -#define MCF_INTC_IPRH_INT45        (0x00002000) -#define MCF_INTC_IPRH_INT46        (0x00004000) -#define MCF_INTC_IPRH_INT47        (0x00008000) -#define MCF_INTC_IPRH_INT48        (0x00010000) -#define MCF_INTC_IPRH_INT49        (0x00020000) -#define MCF_INTC_IPRH_INT50        (0x00040000) -#define MCF_INTC_IPRH_INT51        (0x00080000) -#define MCF_INTC_IPRH_INT52        (0x00100000) -#define MCF_INTC_IPRH_INT53        (0x00200000) -#define MCF_INTC_IPRH_INT54        (0x00400000) -#define MCF_INTC_IPRH_INT55        (0x00800000) -#define MCF_INTC_IPRH_INT56        (0x01000000) -#define MCF_INTC_IPRH_INT57        (0x02000000) -#define MCF_INTC_IPRH_INT58        (0x04000000) -#define MCF_INTC_IPRH_INT59        (0x08000000) -#define MCF_INTC_IPRH_INT60        (0x10000000) -#define MCF_INTC_IPRH_INT61        (0x20000000) -#define MCF_INTC_IPRH_INT62        (0x40000000) -#define MCF_INTC_IPRH_INT63        (0x80000000) - -/* Bit definitions and macros for MCF_INTC_IPRL */ -#define MCF_INTC_IPRL_INT0         (0x00000001) -#define MCF_INTC_IPRL_INT1         (0x00000002) -#define MCF_INTC_IPRL_INT2         (0x00000004) -#define MCF_INTC_IPRL_INT3         (0x00000008) -#define MCF_INTC_IPRL_INT4         (0x00000010) -#define MCF_INTC_IPRL_INT5         (0x00000020) -#define MCF_INTC_IPRL_INT6         (0x00000040) -#define MCF_INTC_IPRL_INT7         (0x00000080) -#define MCF_INTC_IPRL_INT8         (0x00000100) -#define MCF_INTC_IPRL_INT9         (0x00000200) -#define MCF_INTC_IPRL_INT10        (0x00000400) -#define MCF_INTC_IPRL_INT11        (0x00000800) -#define MCF_INTC_IPRL_INT12        (0x00001000) -#define MCF_INTC_IPRL_INT13        (0x00002000) -#define MCF_INTC_IPRL_INT14        (0x00004000) -#define MCF_INTC_IPRL_INT15        (0x00008000) -#define MCF_INTC_IPRL_INT16        (0x00010000) -#define MCF_INTC_IPRL_INT17        (0x00020000) -#define MCF_INTC_IPRL_INT18        (0x00040000) -#define MCF_INTC_IPRL_INT19        (0x00080000) -#define MCF_INTC_IPRL_INT20        (0x00100000) -#define MCF_INTC_IPRL_INT21        (0x00200000) -#define MCF_INTC_IPRL_INT22        (0x00400000) -#define MCF_INTC_IPRL_INT23        (0x00800000) -#define MCF_INTC_IPRL_INT24        (0x01000000) -#define MCF_INTC_IPRL_INT25        (0x02000000) -#define MCF_INTC_IPRL_INT26        (0x04000000) -#define MCF_INTC_IPRL_INT27        (0x08000000) -#define MCF_INTC_IPRL_INT28        (0x10000000) -#define MCF_INTC_IPRL_INT29        (0x20000000) -#define MCF_INTC_IPRL_INT30        (0x40000000) -#define MCF_INTC_IPRL_INT31        (0x80000000) - -/* Bit definitions and macros for MCF_INTC_IMRH */ -#define MCF_INTC_IMRH_INT_MASK32   (0x00000001) -#define MCF_INTC_IMRH_INT_MASK33   (0x00000002) -#define MCF_INTC_IMRH_INT_MASK34   (0x00000004) -#define MCF_INTC_IMRH_INT_MASK35   (0x00000008) -#define MCF_INTC_IMRH_INT_MASK36   (0x00000010) -#define MCF_INTC_IMRH_INT_MASK37   (0x00000020) -#define MCF_INTC_IMRH_INT_MASK38   (0x00000040) -#define MCF_INTC_IMRH_INT_MASK39   (0x00000080) -#define MCF_INTC_IMRH_INT_MASK40   (0x00000100) -#define MCF_INTC_IMRH_INT_MASK41   (0x00000200) -#define MCF_INTC_IMRH_INT_MASK42   (0x00000400) -#define MCF_INTC_IMRH_INT_MASK43   (0x00000800) -#define MCF_INTC_IMRH_INT_MASK44   (0x00001000) -#define MCF_INTC_IMRH_INT_MASK45   (0x00002000) -#define MCF_INTC_IMRH_INT_MASK46   (0x00004000) -#define MCF_INTC_IMRH_INT_MASK47   (0x00008000) -#define MCF_INTC_IMRH_INT_MASK48   (0x00010000) -#define MCF_INTC_IMRH_INT_MASK49   (0x00020000) -#define MCF_INTC_IMRH_INT_MASK50   (0x00040000) -#define MCF_INTC_IMRH_INT_MASK51   (0x00080000) -#define MCF_INTC_IMRH_INT_MASK52   (0x00100000) -#define MCF_INTC_IMRH_INT_MASK53   (0x00200000) -#define MCF_INTC_IMRH_INT_MASK54   (0x00400000) -#define MCF_INTC_IMRH_INT_MASK55   (0x00800000) -#define MCF_INTC_IMRH_INT_MASK56   (0x01000000) -#define MCF_INTC_IMRH_INT_MASK57   (0x02000000) -#define MCF_INTC_IMRH_INT_MASK58   (0x04000000) -#define MCF_INTC_IMRH_INT_MASK59   (0x08000000) -#define MCF_INTC_IMRH_INT_MASK60   (0x10000000) -#define MCF_INTC_IMRH_INT_MASK61   (0x20000000) -#define MCF_INTC_IMRH_INT_MASK62   (0x40000000) -#define MCF_INTC_IMRH_INT_MASK63   (0x80000000) - -/* Bit definitions and macros for MCF_INTC_IMRL */ -#define MCF_INTC_IMRL_INT_MASK0    (0x00000001) -#define MCF_INTC_IMRL_INT_MASK1    (0x00000002) -#define MCF_INTC_IMRL_INT_MASK2    (0x00000004) -#define MCF_INTC_IMRL_INT_MASK3    (0x00000008) -#define MCF_INTC_IMRL_INT_MASK4    (0x00000010) -#define MCF_INTC_IMRL_INT_MASK5    (0x00000020) -#define MCF_INTC_IMRL_INT_MASK6    (0x00000040) -#define MCF_INTC_IMRL_INT_MASK7    (0x00000080) -#define MCF_INTC_IMRL_INT_MASK8    (0x00000100) -#define MCF_INTC_IMRL_INT_MASK9    (0x00000200) -#define MCF_INTC_IMRL_INT_MASK10   (0x00000400) -#define MCF_INTC_IMRL_INT_MASK11   (0x00000800) -#define MCF_INTC_IMRL_INT_MASK12   (0x00001000) -#define MCF_INTC_IMRL_INT_MASK13   (0x00002000) -#define MCF_INTC_IMRL_INT_MASK14   (0x00004000) -#define MCF_INTC_IMRL_INT_MASK15   (0x00008000) -#define MCF_INTC_IMRL_INT_MASK16   (0x00010000) -#define MCF_INTC_IMRL_INT_MASK17   (0x00020000) -#define MCF_INTC_IMRL_INT_MASK18   (0x00040000) -#define MCF_INTC_IMRL_INT_MASK19   (0x00080000) -#define MCF_INTC_IMRL_INT_MASK20   (0x00100000) -#define MCF_INTC_IMRL_INT_MASK21   (0x00200000) -#define MCF_INTC_IMRL_INT_MASK22   (0x00400000) -#define MCF_INTC_IMRL_INT_MASK23   (0x00800000) -#define MCF_INTC_IMRL_INT_MASK24   (0x01000000) -#define MCF_INTC_IMRL_INT_MASK25   (0x02000000) -#define MCF_INTC_IMRL_INT_MASK26   (0x04000000) -#define MCF_INTC_IMRL_INT_MASK27   (0x08000000) -#define MCF_INTC_IMRL_INT_MASK28   (0x10000000) -#define MCF_INTC_IMRL_INT_MASK29   (0x20000000) -#define MCF_INTC_IMRL_INT_MASK30   (0x40000000) -#define MCF_INTC_IMRL_INT_MASK31   (0x80000000) - -/* Bit definitions and macros for MCF_INTC_INTFRCH */ -#define MCF_INTC_INTFRCH_INTFRC32  (0x00000001) -#define MCF_INTC_INTFRCH_INTFRC33  (0x00000002) -#define MCF_INTC_INTFRCH_INTFRC34  (0x00000004) -#define MCF_INTC_INTFRCH_INTFRC35  (0x00000008) -#define MCF_INTC_INTFRCH_INTFRC36  (0x00000010) -#define MCF_INTC_INTFRCH_INTFRC37  (0x00000020) -#define MCF_INTC_INTFRCH_INTFRC38  (0x00000040) -#define MCF_INTC_INTFRCH_INTFRC39  (0x00000080) -#define MCF_INTC_INTFRCH_INTFRC40  (0x00000100) -#define MCF_INTC_INTFRCH_INTFRC41  (0x00000200) -#define MCF_INTC_INTFRCH_INTFRC42  (0x00000400) -#define MCF_INTC_INTFRCH_INTFRC43  (0x00000800) -#define MCF_INTC_INTFRCH_INTFRC44  (0x00001000) -#define MCF_INTC_INTFRCH_INTFRC45  (0x00002000) -#define MCF_INTC_INTFRCH_INTFRC46  (0x00004000) -#define MCF_INTC_INTFRCH_INTFRC47  (0x00008000) -#define MCF_INTC_INTFRCH_INTFRC48  (0x00010000) -#define MCF_INTC_INTFRCH_INTFRC49  (0x00020000) -#define MCF_INTC_INTFRCH_INTFRC50  (0x00040000) -#define MCF_INTC_INTFRCH_INTFRC51  (0x00080000) -#define MCF_INTC_INTFRCH_INTFRC52  (0x00100000) -#define MCF_INTC_INTFRCH_INTFRC53  (0x00200000) -#define MCF_INTC_INTFRCH_INTFRC54  (0x00400000) -#define MCF_INTC_INTFRCH_INTFRC55  (0x00800000) -#define MCF_INTC_INTFRCH_INTFRC56  (0x01000000) -#define MCF_INTC_INTFRCH_INTFRC57  (0x02000000) -#define MCF_INTC_INTFRCH_INTFRC58  (0x04000000) -#define MCF_INTC_INTFRCH_INTFRC59  (0x08000000) -#define MCF_INTC_INTFRCH_INTFRC60  (0x10000000) -#define MCF_INTC_INTFRCH_INTFRC61  (0x20000000) -#define MCF_INTC_INTFRCH_INTFRC62  (0x40000000) -#define MCF_INTC_INTFRCH_INTFRC63  (0x80000000) - -/* Bit definitions and macros for MCF_INTC_INTFRCL */ -#define MCF_INTC_INTFRCL_INTFRC0   (0x00000001) -#define MCF_INTC_INTFRCL_INTFRC1   (0x00000002) -#define MCF_INTC_INTFRCL_INTFRC2   (0x00000004) -#define MCF_INTC_INTFRCL_INTFRC3   (0x00000008) -#define MCF_INTC_INTFRCL_INTFRC4   (0x00000010) -#define MCF_INTC_INTFRCL_INTFRC5   (0x00000020) -#define MCF_INTC_INTFRCL_INTFRC6   (0x00000040) -#define MCF_INTC_INTFRCL_INTFRC7   (0x00000080) -#define MCF_INTC_INTFRCL_INTFRC8   (0x00000100) -#define MCF_INTC_INTFRCL_INTFRC9   (0x00000200) -#define MCF_INTC_INTFRCL_INTFRC10  (0x00000400) -#define MCF_INTC_INTFRCL_INTFRC11  (0x00000800) -#define MCF_INTC_INTFRCL_INTFRC12  (0x00001000) -#define MCF_INTC_INTFRCL_INTFRC13  (0x00002000) -#define MCF_INTC_INTFRCL_INTFRC14  (0x00004000) -#define MCF_INTC_INTFRCL_INTFRC15  (0x00008000) -#define MCF_INTC_INTFRCL_INTFRC16  (0x00010000) -#define MCF_INTC_INTFRCL_INTFRC17  (0x00020000) -#define MCF_INTC_INTFRCL_INTFRC18  (0x00040000) -#define MCF_INTC_INTFRCL_INTFRC19  (0x00080000) -#define MCF_INTC_INTFRCL_INTFRC20  (0x00100000) -#define MCF_INTC_INTFRCL_INTFRC21  (0x00200000) -#define MCF_INTC_INTFRCL_INTFRC22  (0x00400000) -#define MCF_INTC_INTFRCL_INTFRC23  (0x00800000) -#define MCF_INTC_INTFRCL_INTFRC24  (0x01000000) -#define MCF_INTC_INTFRCL_INTFRC25  (0x02000000) -#define MCF_INTC_INTFRCL_INTFRC26  (0x04000000) -#define MCF_INTC_INTFRCL_INTFRC27  (0x08000000) -#define MCF_INTC_INTFRCL_INTFRC28  (0x10000000) -#define MCF_INTC_INTFRCL_INTFRC29  (0x20000000) -#define MCF_INTC_INTFRCL_INTFRC30  (0x40000000) -#define MCF_INTC_INTFRCL_INTFRC31  (0x80000000) - -/* Bit definitions and macros for MCF_INTC_ICONFIG */ -#define MCF_INTC_ICONFIG_EMASK     (0x0020) -#define MCF_INTC_ICONFIG_ELVLPRI1  (0x0200) -#define MCF_INTC_ICONFIG_ELVLPRI2  (0x0400) -#define MCF_INTC_ICONFIG_ELVLPRI3  (0x0800) -#define MCF_INTC_ICONFIG_ELVLPRI4  (0x1000) -#define MCF_INTC_ICONFIG_ELVLPRI5  (0x2000) -#define MCF_INTC_ICONFIG_ELVLPRI6  (0x4000) -#define MCF_INTC_ICONFIG_ELVLPRI7  (0x8000) - -/* Bit definitions and macros for MCF_INTC_SIMR */ -#define MCF_INTC_SIMR_SIMR(x)      (((x)&0x7F)<<0) - -/* Bit definitions and macros for MCF_INTC_CIMR */ -#define MCF_INTC_CIMR_CIMR(x)      (((x)&0x7F)<<0) - -/* Bit definitions and macros for MCF_INTC_CLMASK */ -#define MCF_INTC_CLMASK_CLMASK(x)  (((x)&0x0F)<<0) - -/* Bit definitions and macros for MCF_INTC_SLMASK */ -#define MCF_INTC_SLMASK_SLMASK(x)  (((x)&0x0F)<<0) - -/* Bit definitions and macros for MCF_INTC_ICR */ -#define MCF_INTC_ICR_IL(x)         (((x)&0x07)<<0) - -/* Bit definitions and macros for MCF_INTC_SWIACK */ -#define MCF_INTC_SWIACK_VECTOR(x)  (((x)&0xFF)<<0) - -/* Bit definitions and macros for MCF_INTC_LIACK */ -#define MCF_INTC_LIACK_VECTOR(x)   (((x)&0xFF)<<0) - -/********************************************************************/ -/********************************************************************* -* -* LCD Controller (LCDC) -* -*********************************************************************/ - -/* Register read/write macros */ -#define MCF_LCDC_LSSAR                  MCF_REG32(0xFC0AC000) -#define MCF_LCDC_LSR                    MCF_REG32(0xFC0AC004) -#define MCF_LCDC_LVPWR                  MCF_REG32(0xFC0AC008) -#define MCF_LCDC_LCPR                   MCF_REG32(0xFC0AC00C) -#define MCF_LCDC_LCWHBR                 MCF_REG32(0xFC0AC010) -#define MCF_LCDC_LCCMR                  MCF_REG32(0xFC0AC014) -#define MCF_LCDC_LPCR                   MCF_REG32(0xFC0AC018) -#define MCF_LCDC_LHCR                   MCF_REG32(0xFC0AC01C) -#define MCF_LCDC_LVCR                   MCF_REG32(0xFC0AC020) -#define MCF_LCDC_LPOR                   MCF_REG32(0xFC0AC024) -#define MCF_LCDC_LSCR                   MCF_REG32(0xFC0AC028) -#define MCF_LCDC_LPCCR                  MCF_REG32(0xFC0AC02C) -#define MCF_LCDC_LDCR                   MCF_REG32(0xFC0AC030) -#define MCF_LCDC_LRMCR                  MCF_REG32(0xFC0AC034) -#define MCF_LCDC_LICR                   MCF_REG32(0xFC0AC038) -#define MCF_LCDC_LIER                   MCF_REG32(0xFC0AC03C) -#define MCF_LCDC_LISR                   MCF_REG32(0xFC0AC040) -#define MCF_LCDC_LGWSAR                 MCF_REG32(0xFC0AC050) -#define MCF_LCDC_LGWSR                  MCF_REG32(0xFC0AC054) -#define MCF_LCDC_LGWVPWR                MCF_REG32(0xFC0AC058) -#define MCF_LCDC_LGWPOR                 MCF_REG32(0xFC0AC05C) -#define MCF_LCDC_LGWPR                  MCF_REG32(0xFC0AC060) -#define MCF_LCDC_LGWCR                  MCF_REG32(0xFC0AC064) -#define MCF_LCDC_LGWDCR                 MCF_REG32(0xFC0AC068) -#define MCF_LCDC_BPLUT_BASE             MCF_REG32(0xFC0AC800) -#define MCF_LCDC_GWLUT_BASE             MCF_REG32(0xFC0ACC00) - -/* Bit definitions and macros for MCF_LCDC_LSSAR */ -#define MCF_LCDC_LSSAR_SSA(x)           (((x)&0x3FFFFFFF)<<2) - -/* Bit definitions and macros for MCF_LCDC_LSR */ -#define MCF_LCDC_LSR_YMAX(x)            (((x)&0x000003FF)<<0) -#define MCF_LCDC_LSR_XMAX(x)            (((x)&0x0000003F)<<20) - -/* Bit definitions and macros for MCF_LCDC_LVPWR */ -#define MCF_LCDC_LVPWR_VPW(x)           (((x)&0x000003FF)<<0) - -/* Bit definitions and macros for MCF_LCDC_LCPR */ -#define MCF_LCDC_LCPR_CYP(x)            (((x)&0x000003FF)<<0) -#define MCF_LCDC_LCPR_CXP(x)            (((x)&0x000003FF)<<16) -#define MCF_LCDC_LCPR_OP                (0x10000000) -#define MCF_LCDC_LCPR_CC(x)             (((x)&0x00000003)<<30) -#define MCF_LCDC_LCPR_CC_TRANSPARENT    (0x00000000) -#define MCF_LCDC_LCPR_CC_OR             (0x40000000) -#define MCF_LCDC_LCPR_CC_XOR            (0x80000000) -#define MCF_LCDC_LCPR_CC_AND            (0xC0000000) -#define MCF_LCDC_LCPR_OP_ON             (0x10000000) -#define MCF_LCDC_LCPR_OP_OFF            (0x00000000) - -/* Bit definitions and macros for MCF_LCDC_LCWHBR */ -#define MCF_LCDC_LCWHBR_BD(x)           (((x)&0x000000FF)<<0) -#define MCF_LCDC_LCWHBR_CH(x)           (((x)&0x0000001F)<<16) -#define MCF_LCDC_LCWHBR_CW(x)           (((x)&0x0000001F)<<24) -#define MCF_LCDC_LCWHBR_BK_EN           (0x80000000) -#define MCF_LCDC_LCWHBR_BK_EN_ON        (0x80000000) -#define MCF_LCDC_LCWHBR_BK_EN_OFF       (0x00000000) - -/* Bit definitions and macros for MCF_LCDC_LCCMR */ -#define MCF_LCDC_LCCMR_CUR_COL_B(x)     (((x)&0x0000003F)<<0) -#define MCF_LCDC_LCCMR_CUR_COL_G(x)     (((x)&0x0000003F)<<6) -#define MCF_LCDC_LCCMR_CUR_COL_R(x)     (((x)&0x0000003F)<<12) - -/* Bit definitions and macros for MCF_LCDC_LPCR */ -#define MCF_LCDC_LPCR_PCD(x)            (((x)&0x0000003F)<<0) -#define MCF_LCDC_LPCR_SHARP             (0x00000040) -#define MCF_LCDC_LPCR_SCLKSEL           (0x00000080) -#define MCF_LCDC_LPCR_ACD(x)            (((x)&0x0000007F)<<8) -#define MCF_LCDC_LPCR_ACDSEL            (0x00008000) -#define MCF_LCDC_LPCR_REV_VS            (0x00010000) -#define MCF_LCDC_LPCR_SWAP_SEL          (0x00020000) -#define MCF_LCDC_LPCR_ENDSEL            (0x00040000) -#define MCF_LCDC_LPCR_SCLKIDLE          (0x00080000) -#define MCF_LCDC_LPCR_OEPOL             (0x00100000) -#define MCF_LCDC_LPCR_CLKPOL            (0x00200000) -#define MCF_LCDC_LPCR_LPPOL             (0x00400000) -#define MCF_LCDC_LPCR_FLM               (0x00800000) -#define MCF_LCDC_LPCR_PIXPOL            (0x01000000) -#define MCF_LCDC_LPCR_BPIX(x)           (((x)&0x00000007)<<25) -#define MCF_LCDC_LPCR_PBSIZ(x)          (((x)&0x00000003)<<28) -#define MCF_LCDC_LPCR_COLOR             (0x40000000) -#define MCF_LCDC_LPCR_TFT               (0x80000000) -#define MCF_LCDC_LPCR_MODE_MONOCGROME   (0x00000000) -#define MCF_LCDC_LPCR_MODE_CSTN         (0x40000000) -#define MCF_LCDC_LPCR_MODE_TFT          (0xC0000000) -#define MCF_LCDC_LPCR_PBSIZ_1           (0x00000000) -#define MCF_LCDC_LPCR_PBSIZ_2           (0x10000000) -#define MCF_LCDC_LPCR_PBSIZ_4           (0x20000000) -#define MCF_LCDC_LPCR_PBSIZ_8           (0x30000000) -#define MCF_LCDC_LPCR_BPIX_1bpp         (0x00000000) -#define MCF_LCDC_LPCR_BPIX_2bpp         (0x02000000) -#define MCF_LCDC_LPCR_BPIX_4bpp         (0x04000000) -#define MCF_LCDC_LPCR_BPIX_8bpp         (0x06000000) -#define MCF_LCDC_LPCR_BPIX_12bpp        (0x08000000) -#define MCF_LCDC_LPCR_BPIX_16bpp        (0x0A000000) -#define MCF_LCDC_LPCR_BPIX_18bpp        (0x0C000000) - -#define MCF_LCDC_LPCR_PANEL_TYPE(x)     (((x)&0x00000003)<<30)  - -/* Bit definitions and macros for MCF_LCDC_LHCR */ -#define MCF_LCDC_LHCR_H_WAIT_2(x)       (((x)&0x000000FF)<<0) -#define MCF_LCDC_LHCR_H_WAIT_1(x)       (((x)&0x000000FF)<<8) -#define MCF_LCDC_LHCR_H_WIDTH(x)        (((x)&0x0000003F)<<26) - -/* Bit definitions and macros for MCF_LCDC_LVCR */ -#define MCF_LCDC_LVCR_V_WAIT_2(x)       (((x)&0x000000FF)<<0) -#define MCF_LCDC_LVCR_V_WAIT_1(x)       (((x)&0x000000FF)<<8) -#define MCF_LCDC_LVCR_V_WIDTH(x)      (((x)&0x0000003F)<<26) - -/* Bit definitions and macros for MCF_LCDC_LPOR */ -#define MCF_LCDC_LPOR_POS(x)            (((x)&0x0000001F)<<0) - -/* Bit definitions and macros for MCF_LCDC_LPCCR */ -#define MCF_LCDC_LPCCR_PW(x)            (((x)&0x000000FF)<<0) -#define MCF_LCDC_LPCCR_CC_EN            (0x00000100) -#define MCF_LCDC_LPCCR_SCR(x)           (((x)&0x00000003)<<9) -#define MCF_LCDC_LPCCR_LDMSK            (0x00008000) -#define MCF_LCDC_LPCCR_CLS_HI_WIDTH(x)  (((x)&0x000001FF)<<16) -#define MCF_LCDC_LPCCR_SCR_LINEPULSE    (0x00000000) -#define MCF_LCDC_LPCCR_SCR_PIXELCLK     (0x00002000) -#define MCF_LCDC_LPCCR_SCR_LCDCLOCK     (0x00004000) - -/* Bit definitions and macros for MCF_LCDC_LDCR */ -#define MCF_LCDC_LDCR_TM(x)             (((x)&0x0000001F)<<0) -#define MCF_LCDC_LDCR_HM(x)             (((x)&0x0000001F)<<16) -#define MCF_LCDC_LDCR_BURST             (0x80000000) - -/* Bit definitions and macros for MCF_LCDC_LRMCR */ -#define MCF_LCDC_LRMCR_SEL_REF          (0x00000001) - -/* Bit definitions and macros for MCF_LCDC_LICR */ -#define MCF_LCDC_LICR_INTCON            (0x00000001) -#define MCF_LCDC_LICR_INTSYN            (0x00000004) -#define MCF_LCDC_LICR_GW_INT_CON        (0x00000010) - -/* Bit definitions and macros for MCF_LCDC_LIER */ -#define MCF_LCDC_LIER_BOF_EN            (0x00000001) -#define MCF_LCDC_LIER_EOF_EN            (0x00000002) -#define MCF_LCDC_LIER_ERR_RES_EN        (0x00000004) -#define MCF_LCDC_LIER_UDR_ERR_EN        (0x00000008) -#define MCF_LCDC_LIER_GW_BOF_EN         (0x00000010) -#define MCF_LCDC_LIER_GW_EOF_EN         (0x00000020) -#define MCF_LCDC_LIER_GW_ERR_RES_EN     (0x00000040) -#define MCF_LCDC_LIER_GW_UDR_ERR_EN     (0x00000080) - -/* Bit definitions and macros for MCF_LCDC_LISR */ -#define MCF_LCDC_LISR_BOF               (0x00000001) -#define MCF_LCDC_LISR_EOF               (0x00000002) -#define MCF_LCDC_LISR_ERR_RES           (0x00000004) -#define MCF_LCDC_LISR_UDR_ERR           (0x00000008) -#define MCF_LCDC_LISR_GW_BOF            (0x00000010) -#define MCF_LCDC_LISR_GW_EOF            (0x00000020) -#define MCF_LCDC_LISR_GW_ERR_RES        (0x00000040) -#define MCF_LCDC_LISR_GW_UDR_ERR        (0x00000080) - -/* Bit definitions and macros for MCF_LCDC_LGWSAR */ -#define MCF_LCDC_LGWSAR_GWSA(x)         (((x)&0x3FFFFFFF)<<2) - -/* Bit definitions and macros for MCF_LCDC_LGWSR */ -#define MCF_LCDC_LGWSR_GWH(x)           (((x)&0x000003FF)<<0) -#define MCF_LCDC_LGWSR_GWW(x)           (((x)&0x0000003F)<<20) - -/* Bit definitions and macros for MCF_LCDC_LGWVPWR */ -#define MCF_LCDC_LGWVPWR_GWVPW(x)       (((x)&0x000003FF)<<0) - -/* Bit definitions and macros for MCF_LCDC_LGWPOR */ -#define MCF_LCDC_LGWPOR_GWPO(x)         (((x)&0x0000001F)<<0) - -/* Bit definitions and macros for MCF_LCDC_LGWPR */ -#define MCF_LCDC_LGWPR_GWYP(x)          (((x)&0x000003FF)<<0) -#define MCF_LCDC_LGWPR_GWXP(x)          (((x)&0x000003FF)<<16) - -/* Bit definitions and macros for MCF_LCDC_LGWCR */ -#define MCF_LCDC_LGWCR_GWCKB(x)         (((x)&0x0000003F)<<0) -#define MCF_LCDC_LGWCR_GWCKG(x)         (((x)&0x0000003F)<<6) -#define MCF_LCDC_LGWCR_GWCKR(x)         (((x)&0x0000003F)<<12) -#define MCF_LCDC_LGWCR_GW_RVS           (0x00200000) -#define MCF_LCDC_LGWCR_GWE              (0x00400000) -#define MCF_LCDC_LGWCR_GWCKE            (0x00800000) -#define MCF_LCDC_LGWCR_GWAV(x)          (((x)&0x000000FF)<<24) - -/* Bit definitions and macros for MCF_LCDC_LGWDCR */ -#define MCF_LCDC_LGWDCR_GWTM(x)         (((x)&0x0000001F)<<0) -#define MCF_LCDC_LGWDCR_GWHM(x)         (((x)&0x0000001F)<<16) -#define MCF_LCDC_LGWDCR_GWBT            (0x80000000) - -/* Bit definitions and macros for MCF_LCDC_LSCR */ -#define MCF_LCDC_LSCR_PS_RISE_DELAY(x)    (((x)&0x0000003F)<<26) -#define MCF_LCDC_LSCR_CLS_RISE_DELAY(x)   (((x)&0x000000FF)<<16) -#define MCF_LCDC_LSCR_REV_TOGGLE_DELAY(x) (((x)&0x0000000F)<<8) -#define MCF_LCDC_LSCR_GRAY_2(x)  		  (((x)&0x0000000F)<<4) -#define MCF_LCDC_LSCR_GRAY_1(x)  		  (((x)&0x0000000F)<<0) - -/* Bit definitions and macros for MCF_LCDC_BPLUT_BASE */ -#define MCF_LCDC_BPLUT_BASE_BASE(x)     (((x)&0xFFFFFFFF)<<0) - -/* Bit definitions and macros for MCF_LCDC_GWLUT_BASE */ -#define MCF_LCDC_GWLUT_BASE_BASE(x)     (((x)&0xFFFFFFFF)<<0) - -/********************************************************************* - * - * Phase Locked Loop (PLL) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_PLL_PODR              MCF_REG08(0xFC0C0000) -#define MCF_PLL_PLLCR             MCF_REG08(0xFC0C0004) -#define MCF_PLL_PMDR              MCF_REG08(0xFC0C0008) -#define MCF_PLL_PFDR              MCF_REG08(0xFC0C000C) - -/* Bit definitions and macros for MCF_PLL_PODR */ -#define MCF_PLL_PODR_BUSDIV(x)    (((x)&0x0F)<<0) -#define MCF_PLL_PODR_CPUDIV(x)    (((x)&0x0F)<<4) - -/* Bit definitions and macros for MCF_PLL_PLLCR */ -#define MCF_PLL_PLLCR_DITHDEV(x)  (((x)&0x07)<<0) -#define MCF_PLL_PLLCR_DITHEN      (0x80) - -/* Bit definitions and macros for MCF_PLL_PMDR */ -#define MCF_PLL_PMDR_MODDIV(x)    (((x)&0xFF)<<0) - -/* Bit definitions and macros for MCF_PLL_PFDR */ -#define MCF_PLL_PFDR_MFD(x)       (((x)&0xFF)<<0) - -/********************************************************************* - * - * System Control Module Registers (SCM) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_SCM_MPR			MCF_REG32(0xFC000000) -#define MCF_SCM_PACRA			MCF_REG32(0xFC000020) -#define MCF_SCM_PACRB			MCF_REG32(0xFC000024) -#define MCF_SCM_PACRC			MCF_REG32(0xFC000028) -#define MCF_SCM_PACRD			MCF_REG32(0xFC00002C) -#define MCF_SCM_PACRE			MCF_REG32(0xFC000040) -#define MCF_SCM_PACRF			MCF_REG32(0xFC000044) - -#define MCF_SCM_BCR			MCF_REG32(0xFC040024) - -/********************************************************************* - * - * SDRAM Controller (SDRAMC) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_SDRAMC_SDMR			MCF_REG32(0xFC0B8000) -#define MCF_SDRAMC_SDCR			MCF_REG32(0xFC0B8004) -#define MCF_SDRAMC_SDCFG1		MCF_REG32(0xFC0B8008) -#define MCF_SDRAMC_SDCFG2		MCF_REG32(0xFC0B800C) -#define MCF_SDRAMC_LIMP_FIX		MCF_REG32(0xFC0B8080) -#define MCF_SDRAMC_SDDS			MCF_REG32(0xFC0B8100) -#define MCF_SDRAMC_SDCS0		MCF_REG32(0xFC0B8110) -#define MCF_SDRAMC_SDCS1		MCF_REG32(0xFC0B8114) -#define MCF_SDRAMC_SDCS2		MCF_REG32(0xFC0B8118) -#define MCF_SDRAMC_SDCS3		MCF_REG32(0xFC0B811C) -#define MCF_SDRAMC_SDCS(x)		MCF_REG32(0xFC0B8110+((x)*0x004)) - -/* Bit definitions and macros for MCF_SDRAMC_SDMR */ -#define MCF_SDRAMC_SDMR_CMD		(0x00010000) -#define MCF_SDRAMC_SDMR_AD(x)		(((x)&0x00000FFF)<<18) -#define MCF_SDRAMC_SDMR_BNKAD(x)	(((x)&0x00000003)<<30) -#define MCF_SDRAMC_SDMR_BNKAD_LMR	(0x00000000) -#define MCF_SDRAMC_SDMR_BNKAD_LEMR	(0x40000000) - -/* Bit definitions and macros for MCF_SDRAMC_SDCR */ -#define MCF_SDRAMC_SDCR_IPALL		(0x00000002) -#define MCF_SDRAMC_SDCR_IREF		(0x00000004) -#define MCF_SDRAMC_SDCR_DQS_OE(x)	(((x)&0x0000000F)<<8) -#define MCF_SDRAMC_SDCR_PS(x)		(((x)&0x00000003)<<12) -#define MCF_SDRAMC_SDCR_RCNT(x)		(((x)&0x0000003F)<<16) -#define MCF_SDRAMC_SDCR_OE_RULE		(0x00400000) -#define MCF_SDRAMC_SDCR_MUX(x)		(((x)&0x00000003)<<24) -#define MCF_SDRAMC_SDCR_REF		(0x10000000) -#define MCF_SDRAMC_SDCR_DDR		(0x20000000) -#define MCF_SDRAMC_SDCR_CKE		(0x40000000) -#define MCF_SDRAMC_SDCR_MODE_EN		(0x80000000) -#define MCF_SDRAMC_SDCR_PS_16		(0x00002000) -#define MCF_SDRAMC_SDCR_PS_32		(0x00000000) - -/* Bit definitions and macros for MCF_SDRAMC_SDCFG1 */ -#define MCF_SDRAMC_SDCFG1_WTLAT(x)	(((x)&0x00000007)<<4) -#define MCF_SDRAMC_SDCFG1_REF2ACT(x)	(((x)&0x0000000F)<<8) -#define MCF_SDRAMC_SDCFG1_PRE2ACT(x)	(((x)&0x00000007)<<12) -#define MCF_SDRAMC_SDCFG1_ACT2RW(x)	(((x)&0x00000007)<<16) -#define MCF_SDRAMC_SDCFG1_RDLAT(x)	(((x)&0x0000000F)<<20) -#define MCF_SDRAMC_SDCFG1_SWT2RD(x)	(((x)&0x00000007)<<24) -#define MCF_SDRAMC_SDCFG1_SRD2RW(x)	(((x)&0x0000000F)<<28) - -/* Bit definitions and macros for MCF_SDRAMC_SDCFG2 */ -#define MCF_SDRAMC_SDCFG2_BL(x)		(((x)&0x0000000F)<<16) -#define MCF_SDRAMC_SDCFG2_BRD2WT(x)	(((x)&0x0000000F)<<20) -#define MCF_SDRAMC_SDCFG2_BWT2RW(x)	(((x)&0x0000000F)<<24) -#define MCF_SDRAMC_SDCFG2_BRD2PRE(x)	(((x)&0x0000000F)<<28) - -/* Device Errata - LIMP mode work around */ -#define MCF_SDRAMC_REFRESH		(0x40000000) - -/* Bit definitions and macros for MCF_SDRAMC_SDDS */ -#define MCF_SDRAMC_SDDS_SB_D(x)		(((x)&0x00000003)<<0) -#define MCF_SDRAMC_SDDS_SB_S(x)		(((x)&0x00000003)<<2) -#define MCF_SDRAMC_SDDS_SB_A(x)		(((x)&0x00000003)<<4) -#define MCF_SDRAMC_SDDS_SB_C(x)		(((x)&0x00000003)<<6) -#define MCF_SDRAMC_SDDS_SB_E(x)		(((x)&0x00000003)<<8) - -/* Bit definitions and macros for MCF_SDRAMC_SDCS */ -#define MCF_SDRAMC_SDCS_CSSZ(x)		(((x)&0x0000001F)<<0) -#define MCF_SDRAMC_SDCS_BASE(x)		(((x)&0x00000FFF)<<20) -#define MCF_SDRAMC_SDCS_BA(x)		((x)&0xFFF00000) -#define MCF_SDRAMC_SDCS_CSSZ_DIABLE	(0x00000000) -#define MCF_SDRAMC_SDCS_CSSZ_1MBYTE	(0x00000013) -#define MCF_SDRAMC_SDCS_CSSZ_2MBYTE	(0x00000014) -#define MCF_SDRAMC_SDCS_CSSZ_4MBYTE	(0x00000015) -#define MCF_SDRAMC_SDCS_CSSZ_8MBYTE	(0x00000016) -#define MCF_SDRAMC_SDCS_CSSZ_16MBYTE	(0x00000017) -#define MCF_SDRAMC_SDCS_CSSZ_32MBYTE	(0x00000018) -#define MCF_SDRAMC_SDCS_CSSZ_64MBYTE	(0x00000019) -#define MCF_SDRAMC_SDCS_CSSZ_128MBYTE	(0x0000001A) -#define MCF_SDRAMC_SDCS_CSSZ_256MBYTE	(0x0000001B) -#define MCF_SDRAMC_SDCS_CSSZ_512MBYTE	(0x0000001C) -#define MCF_SDRAMC_SDCS_CSSZ_1GBYTE	(0x0000001D) -#define MCF_SDRAMC_SDCS_CSSZ_2GBYTE	(0x0000001E) -#define MCF_SDRAMC_SDCS_CSSZ_4GBYTE	(0x0000001F) - -/********************************************************************* - * - *      FlexCAN module registers - * - *********************************************************************/ -#define MCF_FLEXCAN_BASEADDR(x)		(0xFC020000+(x)*0x0800) -#define MCF_FLEXCAN_CANMCR(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x00) -#define MCF_FLEXCAN_CANCTRL(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x04) -#define MCF_FLEXCAN_TIMER(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x08) -#define MCF_FLEXCAN_RXGMASK(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x10) -#define MCF_FLEXCAN_RX14MASK(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x14) -#define MCF_FLEXCAN_RX15MASK(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x18) -#define MCF_FLEXCAN_ERRCNT(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x1C) -#define MCF_FLEXCAN_ERRSTAT(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x20) -#define MCF_FLEXCAN_IMASK(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x28) -#define MCF_FLEXCAN_IFLAG(x)		MCF_REG32(0xFC020000+(x)*0x0800+0x30) - -#define MCF_FLEXCAN_MB_CNT(x,y)		MCF_REG32(0xFC020080+(x)*0x0800+(y)*0x10+0x0) -#define MCF_FLEXCAN_MB_ID(x,y)		MCF_REG32(0xFC020080+(x)*0x0800+(y)*0x10+0x4) -#define MCF_FLEXCAN_MB_DB(x,y,z)	MCF_REG08(0xFC020080+(x)*0x0800+(y)*0x10+0x8+(z)*0x1) - -/* - *      FlexCAN Module Configuration Register - */ -#define CANMCR_MDIS		(0x80000000) -#define CANMCR_FRZ		(0x40000000) -#define CANMCR_HALT		(0x10000000) -#define CANMCR_SOFTRST		(0x02000000) -#define CANMCR_FRZACK		(0x01000000) -#define CANMCR_SUPV		(0x00800000) -#define CANMCR_MAXMB(x)         ((x)&0x0F) - -/* - *      FlexCAN Control Register - */ -#define CANCTRL_PRESDIV(x)      (((x)&0xFF)<<24) -#define CANCTRL_RJW(x)          (((x)&0x03)<<22) -#define CANCTRL_PSEG1(x)        (((x)&0x07)<<19) -#define CANCTRL_PSEG2(x)        (((x)&0x07)<<16) -#define CANCTRL_BOFFMSK         (0x00008000) -#define CANCTRL_ERRMSK	        (0x00004000) -#define CANCTRL_CLKSRC		(0x00002000) -#define CANCTRL_LPB	        (0x00001000) -#define CANCTRL_SAMP	        (0x00000080) -#define CANCTRL_BOFFREC         (0x00000040) -#define CANCTRL_TSYNC           (0x00000020) -#define CANCTRL_LBUF            (0x00000010) -#define CANCTRL_LOM             (0x00000008) -#define CANCTRL_PROPSEG(x)      ((x)&0x07) - -/* - *      FlexCAN Error Counter Register - */ -#define ERRCNT_RXECTR(x)        (((x)&0xFF)<<8) -#define ERRCNT_TXECTR(x)        ((x)&0xFF) - -/* - *      FlexCAN Error and Status Register - */ -#define ERRSTAT_BITERR(x)       (((x)&0x03)<<14) -#define ERRSTAT_ACKERR           (0x00002000) -#define ERRSTAT_CRCERR           (0x00001000) -#define ERRSTAT_FRMERR           (0x00000800) -#define ERRSTAT_STFERR           (0x00000400) -#define ERRSTAT_TXWRN            (0x00000200) -#define ERRSTAT_RXWRN            (0x00000100) -#define ERRSTAT_IDLE             (0x00000080) -#define ERRSTAT_TXRX             (0x00000040) -#define ERRSTAT_FLTCONF(x)       (((x)&0x03)<<4) -#define ERRSTAT_BOFFINT          (0x00000004) -#define ERRSTAT_ERRINT           (0x00000002) - -/* - *      Interrupt Mask Register - */ -#define IMASK_BUF15M		(0x8000) -#define IMASK_BUF14M		(0x4000) -#define IMASK_BUF13M		(0x2000) -#define IMASK_BUF12M		(0x1000) -#define IMASK_BUF11M		(0x0800) -#define IMASK_BUF10M		(0x0400) -#define IMASK_BUF9M		(0x0200) -#define IMASK_BUF8M		(0x0100) -#define IMASK_BUF7M		(0x0080) -#define IMASK_BUF6M		(0x0040) -#define IMASK_BUF5M		(0x0020) -#define IMASK_BUF4M		(0x0010) -#define IMASK_BUF3M		(0x0008) -#define IMASK_BUF2M		(0x0004) -#define IMASK_BUF1M		(0x0002) -#define IMASK_BUF0M		(0x0001) -#define IMASK_BUFnM(x)		(0x1<<(x)) -#define IMASK_BUFF_ENABLE_ALL	(0x1111) -#define IMASK_BUFF_DISABLE_ALL	(0x0000) - -/* - *      Interrupt Flag Register - */ -#define IFLAG_BUF15M		(0x8000) -#define IFLAG_BUF14M		(0x4000) -#define IFLAG_BUF13M		(0x2000) -#define IFLAG_BUF12M		(0x1000) -#define IFLAG_BUF11M		(0x0800) -#define IFLAG_BUF10M		(0x0400) -#define IFLAG_BUF9M		(0x0200) -#define IFLAG_BUF8M		(0x0100) -#define IFLAG_BUF7M		(0x0080) -#define IFLAG_BUF6M		(0x0040) -#define IFLAG_BUF5M		(0x0020) -#define IFLAG_BUF4M		(0x0010) -#define IFLAG_BUF3M		(0x0008) -#define IFLAG_BUF2M		(0x0004) -#define IFLAG_BUF1M		(0x0002) -#define IFLAG_BUF0M		(0x0001) -#define IFLAG_BUFF_SET_ALL	(0xFFFF) -#define IFLAG_BUFF_CLEAR_ALL	(0x0000) -#define IFLAG_BUFnM(x)		(0x1<<(x)) - -/* - *      Message Buffers - */ -#define MB_CNT_CODE(x)		(((x)&0x0F)<<24) -#define MB_CNT_SRR		(0x00400000) -#define MB_CNT_IDE		(0x00200000) -#define MB_CNT_RTR		(0x00100000) -#define MB_CNT_LENGTH(x)	(((x)&0x0F)<<16) -#define MB_CNT_TIMESTAMP(x)	((x)&0xFFFF) -#define MB_ID_STD(x)		(((x)&0x07FF)<<18) -#define MB_ID_EXT(x)		((x)&0x3FFFF) - -/********************************************************************* - * - * Edge Port Module (EPORT) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCFEPORT_EPPAR                (0xFC094000) -#define MCFEPORT_EPDDR                (0xFC094002) -#define MCFEPORT_EPIER                (0xFC094003) -#define MCFEPORT_EPDR                 (0xFC094004) -#define MCFEPORT_EPPDR                (0xFC094005) -#define MCFEPORT_EPFR                 (0xFC094006) - -/* Bit definitions and macros for MCF_EPORT_EPPAR */ -#define MCF_EPORT_EPPAR_EPPA1(x)       (((x)&0x0003)<<2) -#define MCF_EPORT_EPPAR_EPPA2(x)       (((x)&0x0003)<<4) -#define MCF_EPORT_EPPAR_EPPA3(x)       (((x)&0x0003)<<6) -#define MCF_EPORT_EPPAR_EPPA4(x)       (((x)&0x0003)<<8) -#define MCF_EPORT_EPPAR_EPPA5(x)       (((x)&0x0003)<<10) -#define MCF_EPORT_EPPAR_EPPA6(x)       (((x)&0x0003)<<12) -#define MCF_EPORT_EPPAR_EPPA7(x)       (((x)&0x0003)<<14) -#define MCF_EPORT_EPPAR_LEVEL          (0) -#define MCF_EPORT_EPPAR_RISING         (1) -#define MCF_EPORT_EPPAR_FALLING        (2) -#define MCF_EPORT_EPPAR_BOTH           (3) -#define MCF_EPORT_EPPAR_EPPA7_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA7_RISING   (0x4000) -#define MCF_EPORT_EPPAR_EPPA7_FALLING  (0x8000) -#define MCF_EPORT_EPPAR_EPPA7_BOTH     (0xC000) -#define MCF_EPORT_EPPAR_EPPA6_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA6_RISING   (0x1000) -#define MCF_EPORT_EPPAR_EPPA6_FALLING  (0x2000) -#define MCF_EPORT_EPPAR_EPPA6_BOTH     (0x3000) -#define MCF_EPORT_EPPAR_EPPA5_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA5_RISING   (0x0400) -#define MCF_EPORT_EPPAR_EPPA5_FALLING  (0x0800) -#define MCF_EPORT_EPPAR_EPPA5_BOTH     (0x0C00) -#define MCF_EPORT_EPPAR_EPPA4_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA4_RISING   (0x0100) -#define MCF_EPORT_EPPAR_EPPA4_FALLING  (0x0200) -#define MCF_EPORT_EPPAR_EPPA4_BOTH     (0x0300) -#define MCF_EPORT_EPPAR_EPPA3_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA3_RISING   (0x0040) -#define MCF_EPORT_EPPAR_EPPA3_FALLING  (0x0080) -#define MCF_EPORT_EPPAR_EPPA3_BOTH     (0x00C0) -#define MCF_EPORT_EPPAR_EPPA2_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA2_RISING   (0x0010) -#define MCF_EPORT_EPPAR_EPPA2_FALLING  (0x0020) -#define MCF_EPORT_EPPAR_EPPA2_BOTH     (0x0030) -#define MCF_EPORT_EPPAR_EPPA1_LEVEL    (0x0000) -#define MCF_EPORT_EPPAR_EPPA1_RISING   (0x0004) -#define MCF_EPORT_EPPAR_EPPA1_FALLING  (0x0008) -#define MCF_EPORT_EPPAR_EPPA1_BOTH     (0x000C) - -/* Bit definitions and macros for MCF_EPORT_EPDDR */ -#define MCF_EPORT_EPDDR_EPDD1          (0x02) -#define MCF_EPORT_EPDDR_EPDD2          (0x04) -#define MCF_EPORT_EPDDR_EPDD3          (0x08) -#define MCF_EPORT_EPDDR_EPDD4          (0x10) -#define MCF_EPORT_EPDDR_EPDD5          (0x20) -#define MCF_EPORT_EPDDR_EPDD6          (0x40) -#define MCF_EPORT_EPDDR_EPDD7          (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPIER */ -#define MCF_EPORT_EPIER_EPIE1          (0x02) -#define MCF_EPORT_EPIER_EPIE2          (0x04) -#define MCF_EPORT_EPIER_EPIE3          (0x08) -#define MCF_EPORT_EPIER_EPIE4          (0x10) -#define MCF_EPORT_EPIER_EPIE5          (0x20) -#define MCF_EPORT_EPIER_EPIE6          (0x40) -#define MCF_EPORT_EPIER_EPIE7          (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPDR */ -#define MCF_EPORT_EPDR_EPD1            (0x02) -#define MCF_EPORT_EPDR_EPD2            (0x04) -#define MCF_EPORT_EPDR_EPD3            (0x08) -#define MCF_EPORT_EPDR_EPD4            (0x10) -#define MCF_EPORT_EPDR_EPD5            (0x20) -#define MCF_EPORT_EPDR_EPD6            (0x40) -#define MCF_EPORT_EPDR_EPD7            (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPPDR */ -#define MCF_EPORT_EPPDR_EPPD1          (0x02) -#define MCF_EPORT_EPPDR_EPPD2          (0x04) -#define MCF_EPORT_EPPDR_EPPD3          (0x08) -#define MCF_EPORT_EPPDR_EPPD4          (0x10) -#define MCF_EPORT_EPPDR_EPPD5          (0x20) -#define MCF_EPORT_EPPDR_EPPD6          (0x40) -#define MCF_EPORT_EPPDR_EPPD7          (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPFR */ -#define MCF_EPORT_EPFR_EPF1            (0x02) -#define MCF_EPORT_EPFR_EPF2            (0x04) -#define MCF_EPORT_EPFR_EPF3            (0x08) -#define MCF_EPORT_EPFR_EPF4            (0x10) -#define MCF_EPORT_EPFR_EPF5            (0x20) -#define MCF_EPORT_EPFR_EPF6            (0x40) -#define MCF_EPORT_EPFR_EPF7            (0x80) - -/********************************************************************/ -#endif	/* m532xsim_h */ diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h new file mode 100644 index 00000000000..3177ce8331d --- /dev/null +++ b/arch/m68k/include/asm/m53xxacr.h @@ -0,0 +1,101 @@ +/****************************************************************************/ + +/* + * m53xxacr.h -- ColdFire version 3 core cache support + * + * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> + */ + +/****************************************************************************/ +#ifndef m53xxacr_h +#define m53xxacr_h +/****************************************************************************/ + +/* + * All varients of the ColdFire using version 3 cores have a similar + * cache setup. They have a unified instruction and data cache, with + * configurable write-through or copy-back operation. + */ + +/* + * Define the Cache Control register flags. + */ +#define CACR_EC		0x80000000	/* Enable cache */ +#define CACR_ESB	0x20000000	/* Enable store buffer */ +#define CACR_DPI	0x10000000	/* Disable invalidation by CPUSHL */ +#define CACR_HLCK	0x08000000	/* Half cache lock mode */ +#define CACR_CINVA	0x01000000	/* Invalidate cache */ +#define CACR_DNFB	0x00000400	/* Inhibited fill buffer */ +#define CACR_DCM_WT	0x00000000	/* Cacheable write-through */ +#define CACR_DCM_CB	0x00000100	/* Cacheable copy-back */ +#define CACR_DCM_PRE	0x00000200	/* Cache inhibited, precise */ +#define CACR_DCM_IMPRE	0x00000300	/* Cache inhibited, imprecise */ +#define CACR_WPROTECT	0x00000020	/* Write protect*/ +#define CACR_EUSP	0x00000010	/* Eanble separate user a7 */ + +/* + * Define the Access Control register flags. + */ +#define ACR_BASE_POS	24		/* Address Base (upper 8 bits) */ +#define ACR_MASK_POS	16		/* Address Mask (next 8 bits) */ +#define ACR_ENABLE	0x00008000	/* Enable this ACR */ +#define ACR_USER	0x00000000	/* Allow only user accesses */ +#define ACR_SUPER	0x00002000	/* Allow supervisor access only */ +#define ACR_ANY		0x00004000	/* Allow any access type */ +#define ACR_CM_WT	0x00000000	/* Cacheable, write-through */ +#define ACR_CM_CB	0x00000020	/* Cacheable, copy-back */ +#define ACR_CM_PRE	0x00000040	/* Cache inhibited, precise */ +#define ACR_CM_IMPRE	0x00000060	/* Cache inhibited, imprecise */ +#define ACR_WPROTECT	0x00000004	/* Write protect region */ + +/* + * Define the cache type and arrangement (needed for pushes). + */ +#if defined(CONFIG_M5307) +#define	CACHE_SIZE	0x2000		/* 8k of unified cache */ +#define	ICACHE_SIZE	CACHE_SIZE +#define	DCACHE_SIZE	CACHE_SIZE +#elif defined(CONFIG_M53xx) +#define	CACHE_SIZE	0x4000		/* 16k of unified cache */ +#define	ICACHE_SIZE	CACHE_SIZE +#define	DCACHE_SIZE	CACHE_SIZE +#endif + +#define	CACHE_LINE_SIZE	16		/* 16 byte line size */ +#define	CACHE_WAYS	4		/* 4 ways - set associative */ + +/* + * Set the cache controller settings we will use. This default in the + * CACR is cache inhibited, we use the ACR register to set cacheing + * enabled on the regions we want (eg RAM). + */ +#if defined(CONFIG_CACHE_COPYBACK) +#define CACHE_TYPE	ACR_CM_CB +#define CACHE_PUSH +#else +#define CACHE_TYPE	ACR_CM_WT +#endif + +#ifdef CONFIG_COLDFIRE_SW_A7 +#define CACHE_MODE	(CACR_EC + CACR_ESB + CACR_DCM_PRE) +#else +#define CACHE_MODE	(CACR_EC + CACR_ESB + CACR_DCM_PRE + CACR_EUSP) +#endif + +/* + * Unified cache means we will never need to flush for coherency of + * instruction fetch. We will need to flush to maintain memory/DMA + * coherency though in all cases. And for copyback caches we will need + * to push cached data as well. + */ +#define CACHE_INIT	  CACR_CINVA +#define CACHE_INVALIDATE  CACR_CINVA +#define CACHE_INVALIDATED CACR_CINVA + +#define ACR0_MODE	((CONFIG_RAMBASE & 0xff000000) + \ +			 (0x000f0000) + \ +			 (ACR_ENABLE + ACR_ANY + CACHE_TYPE)) +#define ACR1_MODE	0 + +/****************************************************************************/ +#endif  /* m53xxsim_h */ diff --git a/arch/m68k/include/asm/m53xxsim.h b/arch/m68k/include/asm/m53xxsim.h new file mode 100644 index 00000000000..faa1a2133bf --- /dev/null +++ b/arch/m68k/include/asm/m53xxsim.h @@ -0,0 +1,1241 @@ +/****************************************************************************/ + +/* + *	m53xxsim.h -- ColdFire 5329 registers + */ + +/****************************************************************************/ +#ifndef	m53xxsim_h +#define	m53xxsim_h +/****************************************************************************/ + +#define	CPU_NAME		"COLDFIRE(m53xx)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		(MCF_CLK / 3) + +#include <asm/m53xxacr.h> + +#define MCFINT_VECBASE      64 +#define MCFINT_UART0        26          /* Interrupt number for UART0 */ +#define MCFINT_UART1        27          /* Interrupt number for UART1 */ +#define MCFINT_UART2        28          /* Interrupt number for UART2 */ +#define MCFINT_QSPI         31          /* Interrupt number for QSPI */ +#define MCFINT_FECRX0	    36		/* Interrupt number for FEC */ +#define MCFINT_FECTX0	    40		/* Interrupt number for FEC */ +#define MCFINT_FECENTC0	    42		/* Interrupt number for FEC */ + +#define MCF_IRQ_UART0       (MCFINT_VECBASE + MCFINT_UART0) +#define MCF_IRQ_UART1       (MCFINT_VECBASE + MCFINT_UART1) +#define MCF_IRQ_UART2       (MCFINT_VECBASE + MCFINT_UART2) + +#define MCF_IRQ_FECRX0	    (MCFINT_VECBASE + MCFINT_FECRX0) +#define MCF_IRQ_FECTX0	    (MCFINT_VECBASE + MCFINT_FECTX0) +#define MCF_IRQ_FECENTC0    (MCFINT_VECBASE + MCFINT_FECENTC0) + +#define	MCF_IRQ_QSPI	    (MCFINT_VECBASE + MCFINT_QSPI) + +#define MCF_WTM_WCR		0xFC098000 + +/* + *	Define the 532x SIM register set addresses. + */ +#define	MCFSIM_IPRL		0xFC048004 +#define	MCFSIM_IPRH		0xFC048000 +#define	MCFSIM_IPR		MCFSIM_IPRL +#define	MCFSIM_IMRL		0xFC04800C +#define	MCFSIM_IMRH		0xFC048008 +#define	MCFSIM_IMR		MCFSIM_IMRL +#define	MCFSIM_ICR0		0xFC048040	 +#define	MCFSIM_ICR1		0xFC048041	 +#define	MCFSIM_ICR2		0xFC048042	 +#define	MCFSIM_ICR3		0xFC048043	 +#define	MCFSIM_ICR4		0xFC048044	 +#define	MCFSIM_ICR5		0xFC048045	 +#define	MCFSIM_ICR6		0xFC048046	 +#define	MCFSIM_ICR7		0xFC048047	 +#define	MCFSIM_ICR8		0xFC048048	 +#define	MCFSIM_ICR9		0xFC048049	 +#define	MCFSIM_ICR10		0xFC04804A +#define	MCFSIM_ICR11		0xFC04804B + +/* + *	Some symbol defines for the above... + */ +#define	MCFSIM_SWDICR		MCFSIM_ICR0	/* Watchdog timer ICR */ +#define	MCFSIM_TIMER1ICR	MCFSIM_ICR1	/* Timer 1 ICR */ +#define	MCFSIM_TIMER2ICR	MCFSIM_ICR2	/* Timer 2 ICR */ +#define	MCFSIM_UART1ICR		MCFSIM_ICR4	/* UART 1 ICR */ +#define	MCFSIM_UART2ICR		MCFSIM_ICR5	/* UART 2 ICR */ +#define	MCFSIM_DMA0ICR		MCFSIM_ICR6	/* DMA 0 ICR */ +#define	MCFSIM_DMA1ICR		MCFSIM_ICR7	/* DMA 1 ICR */ +#define	MCFSIM_DMA2ICR		MCFSIM_ICR8	/* DMA 2 ICR */ +#define	MCFSIM_DMA3ICR		MCFSIM_ICR9	/* DMA 3 ICR */ + + +#define	MCFINTC0_SIMR		0xFC04801C +#define	MCFINTC0_CIMR		0xFC04801D +#define	MCFINTC0_ICR0		0xFC048040 +#define	MCFINTC1_SIMR		0xFC04C01C +#define	MCFINTC1_CIMR		0xFC04C01D +#define	MCFINTC1_ICR0		0xFC04C040 +#define MCFINTC2_SIMR		(0) +#define MCFINTC2_CIMR		(0) +#define MCFINTC2_ICR0		(0) + +#define MCFSIM_ICR_TIMER1	(0xFC048040+32) +#define MCFSIM_ICR_TIMER2	(0xFC048040+33) + +/* + *	Define system peripheral IRQ usage. + */ +#define	MCF_IRQ_TIMER		(64 + 32)	/* Timer0 */ +#define	MCF_IRQ_PROFILER	(64 + 33)	/* Timer1 */ + +/* + *  UART module. + */ +#define MCFUART_BASE0		0xFC060000	/* Base address of UART1 */ +#define MCFUART_BASE1		0xFC064000	/* Base address of UART2 */ +#define MCFUART_BASE2		0xFC068000	/* Base address of UART3 */ + +/* + *  FEC module. + */ +#define	MCFFEC_BASE0		0xFC030000	/* Base address of FEC0 */ +#define	MCFFEC_SIZE0		0x800		/* Size of FEC0 region */ + +/* + *  QSPI module. + */ +#define	MCFQSPI_BASE		0xFC05C000	/* Base address of QSPI */ +#define	MCFQSPI_SIZE		0x40		/* Size of QSPI region */ + +#define	MCFQSPI_CS0		84 +#define	MCFQSPI_CS1		85 +#define	MCFQSPI_CS2		86 + +/* + *  Timer module. + */ +#define MCFTIMER_BASE1		0xFC070000	/* Base address of TIMER1 */ +#define MCFTIMER_BASE2		0xFC074000	/* Base address of TIMER2 */ +#define MCFTIMER_BASE3		0xFC078000	/* Base address of TIMER3 */ +#define MCFTIMER_BASE4		0xFC07C000	/* Base address of TIMER4 */ + +/********************************************************************* + * + * Reset Controller Module + * + *********************************************************************/ + +#define	MCF_RCR			0xFC0A0000 +#define	MCF_RSR			0xFC0A0001 + +#define	MCF_RCR_SWRESET		0x80		/* Software reset bit */ +#define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ + + +/* + * Power Management + */ +#define MCFPM_WCR		0xfc040013 +#define MCFPM_PPMSR0		0xfc04002c +#define MCFPM_PPMCR0		0xfc04002d +#define MCFPM_PPMSR1		0xfc04002e +#define MCFPM_PPMCR1		0xfc04002f +#define MCFPM_PPMHR0		0xfc040030 +#define MCFPM_PPMLR0		0xfc040034 +#define MCFPM_PPMHR1		0xfc040038 +#define MCFPM_LPCR		0xec090007 + +/* + *	The M5329EVB board needs a help getting its devices initialized  + *	at kernel start time if dBUG doesn't set it up (for example  + *	it is not used), so we need to do it manually. + */ +#ifdef __ASSEMBLER__ +.macro m5329EVB_setup +	movel	#0xFC098000, %a7 +	movel	#0x0, (%a7) +#define CORE_SRAM	0x80000000	 +#define CORE_SRAM_SIZE	0x8000 +	movel	#CORE_SRAM, %d0 +	addl	#0x221, %d0 +	movec	%d0,%RAMBAR1 +	movel	#CORE_SRAM, %sp +	addl	#CORE_SRAM_SIZE, %sp +	jsr	sysinit +.endm +#define	PLATFORM_SETUP	m5329EVB_setup + +#endif /* __ASSEMBLER__ */ + +/********************************************************************* + * + * Chip Configuration Module (CCM) + * + *********************************************************************/ + +/* Register read/write macros */ +#define MCF_CCM_CCR               0xFC0A0004 +#define MCF_CCM_RCON              0xFC0A0008 +#define MCF_CCM_CIR               0xFC0A000A +#define MCF_CCM_MISCCR            0xFC0A0010 +#define MCF_CCM_CDR               0xFC0A0012 +#define MCF_CCM_UHCSR             0xFC0A0014 +#define MCF_CCM_UOCSR             0xFC0A0016 + +/* Bit definitions and macros for MCF_CCM_CCR */ +#define MCF_CCM_CCR_RESERVED      (0x0001) +#define MCF_CCM_CCR_PLL_MODE      (0x0003) +#define MCF_CCM_CCR_OSC_MODE      (0x0005) +#define MCF_CCM_CCR_BOOTPS(x)     (((x)&0x0003)<<3|0x0001) +#define MCF_CCM_CCR_LOAD          (0x0021) +#define MCF_CCM_CCR_LIMP          (0x0041) +#define MCF_CCM_CCR_CSC(x)        (((x)&0x0003)<<8|0x0001) + +/* Bit definitions and macros for MCF_CCM_RCON */ +#define MCF_CCM_RCON_RESERVED     (0x0001) +#define MCF_CCM_RCON_PLL_MODE     (0x0003) +#define MCF_CCM_RCON_OSC_MODE     (0x0005) +#define MCF_CCM_RCON_BOOTPS(x)    (((x)&0x0003)<<3|0x0001) +#define MCF_CCM_RCON_LOAD         (0x0021) +#define MCF_CCM_RCON_LIMP         (0x0041) +#define MCF_CCM_RCON_CSC(x)       (((x)&0x0003)<<8|0x0001) + +/* Bit definitions and macros for MCF_CCM_CIR */ +#define MCF_CCM_CIR_PRN(x)        (((x)&0x003F)<<0) +#define MCF_CCM_CIR_PIN(x)        (((x)&0x03FF)<<6) + +/* Bit definitions and macros for MCF_CCM_MISCCR */ +#define MCF_CCM_MISCCR_USBSRC     (0x0001) +#define MCF_CCM_MISCCR_USBDIV     (0x0002) +#define MCF_CCM_MISCCR_SSI_SRC    (0x0010) +#define MCF_CCM_MISCCR_TIM_DMA   (0x0020) +#define MCF_CCM_MISCCR_SSI_PUS    (0x0040) +#define MCF_CCM_MISCCR_SSI_PUE    (0x0080) +#define MCF_CCM_MISCCR_LCD_CHEN   (0x0100) +#define MCF_CCM_MISCCR_LIMP       (0x1000) +#define MCF_CCM_MISCCR_PLL_LOCK   (0x2000) + +/* Bit definitions and macros for MCF_CCM_CDR */ +#define MCF_CCM_CDR_SSIDIV(x)     (((x)&0x000F)<<0) +#define MCF_CCM_CDR_LPDIV(x)      (((x)&0x000F)<<8) + +/* Bit definitions and macros for MCF_CCM_UHCSR */ +#define MCF_CCM_UHCSR_XPDE        (0x0001) +#define MCF_CCM_UHCSR_UHMIE       (0x0002) +#define MCF_CCM_UHCSR_WKUP        (0x0004) +#define MCF_CCM_UHCSR_PORTIND(x)  (((x)&0x0003)<<14) + +/* Bit definitions and macros for MCF_CCM_UOCSR */ +#define MCF_CCM_UOCSR_XPDE        (0x0001) +#define MCF_CCM_UOCSR_UOMIE       (0x0002) +#define MCF_CCM_UOCSR_WKUP        (0x0004) +#define MCF_CCM_UOCSR_PWRFLT      (0x0008) +#define MCF_CCM_UOCSR_SEND        (0x0010) +#define MCF_CCM_UOCSR_VVLD        (0x0020) +#define MCF_CCM_UOCSR_BVLD        (0x0040) +#define MCF_CCM_UOCSR_AVLD        (0x0080) +#define MCF_CCM_UOCSR_DPPU        (0x0100) +#define MCF_CCM_UOCSR_DCR_VBUS    (0x0200) +#define MCF_CCM_UOCSR_CRG_VBUS    (0x0400) +#define MCF_CCM_UOCSR_DRV_VBUS    (0x0800) +#define MCF_CCM_UOCSR_DMPD        (0x1000) +#define MCF_CCM_UOCSR_DPPD        (0x2000) +#define MCF_CCM_UOCSR_PORTIND(x)  (((x)&0x0003)<<14) + +/********************************************************************* + * + * FlexBus Chip Selects (FBCS) + * + *********************************************************************/ + +/* Register read/write macros */ +#define MCF_FBCS0_CSAR		0xFC008000 +#define MCF_FBCS0_CSMR		0xFC008004 +#define MCF_FBCS0_CSCR		0xFC008008 +#define MCF_FBCS1_CSAR		0xFC00800C +#define MCF_FBCS1_CSMR		0xFC008010 +#define MCF_FBCS1_CSCR		0xFC008014 +#define MCF_FBCS2_CSAR		0xFC008018 +#define MCF_FBCS2_CSMR		0xFC00801C +#define MCF_FBCS2_CSCR		0xFC008020 +#define MCF_FBCS3_CSAR		0xFC008024 +#define MCF_FBCS3_CSMR		0xFC008028 +#define MCF_FBCS3_CSCR		0xFC00802C +#define MCF_FBCS4_CSAR		0xFC008030 +#define MCF_FBCS4_CSMR		0xFC008034 +#define MCF_FBCS4_CSCR		0xFC008038 +#define MCF_FBCS5_CSAR		0xFC00803C +#define MCF_FBCS5_CSMR		0xFC008040 +#define MCF_FBCS5_CSCR		0xFC008044 + +/* Bit definitions and macros for MCF_FBCS_CSAR */ +#define MCF_FBCS_CSAR_BA(x)	((x)&0xFFFF0000) + +/* Bit definitions and macros for MCF_FBCS_CSMR */ +#define MCF_FBCS_CSMR_V		(0x00000001) +#define MCF_FBCS_CSMR_WP	(0x00000100) +#define MCF_FBCS_CSMR_BAM(x)	(((x)&0x0000FFFF)<<16) +#define MCF_FBCS_CSMR_BAM_4G	(0xFFFF0000) +#define MCF_FBCS_CSMR_BAM_2G	(0x7FFF0000) +#define MCF_FBCS_CSMR_BAM_1G	(0x3FFF0000) +#define MCF_FBCS_CSMR_BAM_1024M	(0x3FFF0000) +#define MCF_FBCS_CSMR_BAM_512M	(0x1FFF0000) +#define MCF_FBCS_CSMR_BAM_256M	(0x0FFF0000) +#define MCF_FBCS_CSMR_BAM_128M	(0x07FF0000) +#define MCF_FBCS_CSMR_BAM_64M	(0x03FF0000) +#define MCF_FBCS_CSMR_BAM_32M	(0x01FF0000) +#define MCF_FBCS_CSMR_BAM_16M	(0x00FF0000) +#define MCF_FBCS_CSMR_BAM_8M	(0x007F0000) +#define MCF_FBCS_CSMR_BAM_4M	(0x003F0000) +#define MCF_FBCS_CSMR_BAM_2M	(0x001F0000) +#define MCF_FBCS_CSMR_BAM_1M	(0x000F0000) +#define MCF_FBCS_CSMR_BAM_1024K	(0x000F0000) +#define MCF_FBCS_CSMR_BAM_512K	(0x00070000) +#define MCF_FBCS_CSMR_BAM_256K	(0x00030000) +#define MCF_FBCS_CSMR_BAM_128K	(0x00010000) +#define MCF_FBCS_CSMR_BAM_64K	(0x00000000) + +/* Bit definitions and macros for MCF_FBCS_CSCR */ +#define MCF_FBCS_CSCR_BSTW	(0x00000008) +#define MCF_FBCS_CSCR_BSTR	(0x00000010) +#define MCF_FBCS_CSCR_BEM	(0x00000020) +#define MCF_FBCS_CSCR_PS(x)	(((x)&0x00000003)<<6) +#define MCF_FBCS_CSCR_AA	(0x00000100) +#define MCF_FBCS_CSCR_SBM	(0x00000200) +#define MCF_FBCS_CSCR_WS(x)	(((x)&0x0000003F)<<10) +#define MCF_FBCS_CSCR_WRAH(x)	(((x)&0x00000003)<<16) +#define MCF_FBCS_CSCR_RDAH(x)	(((x)&0x00000003)<<18) +#define MCF_FBCS_CSCR_ASET(x)	(((x)&0x00000003)<<20) +#define MCF_FBCS_CSCR_SWSEN	(0x00800000) +#define MCF_FBCS_CSCR_SWS(x)	(((x)&0x0000003F)<<26) +#define MCF_FBCS_CSCR_PS_8	(0x0040) +#define MCF_FBCS_CSCR_PS_16	(0x0080) +#define MCF_FBCS_CSCR_PS_32	(0x0000) + +/********************************************************************* + * + * General Purpose I/O (GPIO) + * + *********************************************************************/ + +/* Register read/write macros */ +#define MCFGPIO_PODR_FECH		(0xFC0A4000) +#define MCFGPIO_PODR_FECL		(0xFC0A4001) +#define MCFGPIO_PODR_SSI		(0xFC0A4002) +#define MCFGPIO_PODR_BUSCTL		(0xFC0A4003) +#define MCFGPIO_PODR_BE			(0xFC0A4004) +#define MCFGPIO_PODR_CS			(0xFC0A4005) +#define MCFGPIO_PODR_PWM		(0xFC0A4006) +#define MCFGPIO_PODR_FECI2C		(0xFC0A4007) +#define MCFGPIO_PODR_UART		(0xFC0A4009) +#define MCFGPIO_PODR_QSPI		(0xFC0A400A) +#define MCFGPIO_PODR_TIMER		(0xFC0A400B) +#define MCFGPIO_PODR_LCDDATAH		(0xFC0A400D) +#define MCFGPIO_PODR_LCDDATAM		(0xFC0A400E) +#define MCFGPIO_PODR_LCDDATAL		(0xFC0A400F) +#define MCFGPIO_PODR_LCDCTLH		(0xFC0A4010) +#define MCFGPIO_PODR_LCDCTLL		(0xFC0A4011) +#define MCFGPIO_PDDR_FECH		(0xFC0A4014) +#define MCFGPIO_PDDR_FECL		(0xFC0A4015) +#define MCFGPIO_PDDR_SSI		(0xFC0A4016) +#define MCFGPIO_PDDR_BUSCTL		(0xFC0A4017) +#define MCFGPIO_PDDR_BE			(0xFC0A4018) +#define MCFGPIO_PDDR_CS			(0xFC0A4019) +#define MCFGPIO_PDDR_PWM		(0xFC0A401A) +#define MCFGPIO_PDDR_FECI2C		(0xFC0A401B) +#define MCFGPIO_PDDR_UART		(0xFC0A401C) +#define MCFGPIO_PDDR_QSPI		(0xFC0A401E) +#define MCFGPIO_PDDR_TIMER		(0xFC0A401F) +#define MCFGPIO_PDDR_LCDDATAH		(0xFC0A4021) +#define MCFGPIO_PDDR_LCDDATAM		(0xFC0A4022) +#define MCFGPIO_PDDR_LCDDATAL		(0xFC0A4023) +#define MCFGPIO_PDDR_LCDCTLH		(0xFC0A4024) +#define MCFGPIO_PDDR_LCDCTLL		(0xFC0A4025) +#define MCFGPIO_PPDSDR_FECH		(0xFC0A4028) +#define MCFGPIO_PPDSDR_FECL		(0xFC0A4029) +#define MCFGPIO_PPDSDR_SSI		(0xFC0A402A) +#define MCFGPIO_PPDSDR_BUSCTL		(0xFC0A402B) +#define MCFGPIO_PPDSDR_BE		(0xFC0A402C) +#define MCFGPIO_PPDSDR_CS		(0xFC0A402D) +#define MCFGPIO_PPDSDR_PWM		(0xFC0A402E) +#define MCFGPIO_PPDSDR_FECI2C		(0xFC0A402F) +#define MCFGPIO_PPDSDR_UART		(0xFC0A4031) +#define MCFGPIO_PPDSDR_QSPI		(0xFC0A4032) +#define MCFGPIO_PPDSDR_TIMER		(0xFC0A4033) +#define MCFGPIO_PPDSDR_LCDDATAH		(0xFC0A4035) +#define MCFGPIO_PPDSDR_LCDDATAM		(0xFC0A4036) +#define MCFGPIO_PPDSDR_LCDDATAL		(0xFC0A4037) +#define MCFGPIO_PPDSDR_LCDCTLH		(0xFC0A4038) +#define MCFGPIO_PPDSDR_LCDCTLL		(0xFC0A4039) +#define MCFGPIO_PCLRR_FECH		(0xFC0A403C) +#define MCFGPIO_PCLRR_FECL		(0xFC0A403D) +#define MCFGPIO_PCLRR_SSI		(0xFC0A403E) +#define MCFGPIO_PCLRR_BUSCTL		(0xFC0A403F) +#define MCFGPIO_PCLRR_BE		(0xFC0A4040) +#define MCFGPIO_PCLRR_CS		(0xFC0A4041) +#define MCFGPIO_PCLRR_PWM		(0xFC0A4042) +#define MCFGPIO_PCLRR_FECI2C		(0xFC0A4043) +#define MCFGPIO_PCLRR_UART		(0xFC0A4045) +#define MCFGPIO_PCLRR_QSPI		(0xFC0A4046) +#define MCFGPIO_PCLRR_TIMER		(0xFC0A4047) +#define MCFGPIO_PCLRR_LCDDATAH		(0xFC0A4049) +#define MCFGPIO_PCLRR_LCDDATAM		(0xFC0A404A) +#define MCFGPIO_PCLRR_LCDDATAL		(0xFC0A404B) +#define MCFGPIO_PCLRR_LCDCTLH		(0xFC0A404C) +#define MCFGPIO_PCLRR_LCDCTLL		(0xFC0A404D) +#define MCFGPIO_PAR_FEC			(0xFC0A4050) +#define MCFGPIO_PAR_PWM			(0xFC0A4051) +#define MCFGPIO_PAR_BUSCTL		(0xFC0A4052) +#define MCFGPIO_PAR_FECI2C		(0xFC0A4053) +#define MCFGPIO_PAR_BE			(0xFC0A4054) +#define MCFGPIO_PAR_CS			(0xFC0A4055) +#define MCFGPIO_PAR_SSI			(0xFC0A4056) +#define MCFGPIO_PAR_UART		(0xFC0A4058) +#define MCFGPIO_PAR_QSPI		(0xFC0A405A) +#define MCFGPIO_PAR_TIMER		(0xFC0A405C) +#define MCFGPIO_PAR_LCDDATA		(0xFC0A405D) +#define MCFGPIO_PAR_LCDCTL		(0xFC0A405E) +#define MCFGPIO_PAR_IRQ			(0xFC0A4060) +#define MCFGPIO_MSCR_FLEXBUS		(0xFC0A4064) +#define MCFGPIO_MSCR_SDRAM		(0xFC0A4065) +#define MCFGPIO_DSCR_I2C		(0xFC0A4068) +#define MCFGPIO_DSCR_PWM		(0xFC0A4069) +#define MCFGPIO_DSCR_FEC		(0xFC0A406A) +#define MCFGPIO_DSCR_UART		(0xFC0A406B) +#define MCFGPIO_DSCR_QSPI		(0xFC0A406C) +#define MCFGPIO_DSCR_TIMER		(0xFC0A406D) +#define MCFGPIO_DSCR_SSI		(0xFC0A406E) +#define MCFGPIO_DSCR_LCD		(0xFC0A406F) +#define MCFGPIO_DSCR_DEBUG		(0xFC0A4070) +#define MCFGPIO_DSCR_CLKRST		(0xFC0A4071) +#define MCFGPIO_DSCR_IRQ		(0xFC0A4072) + +/* Bit definitions and macros for MCF_GPIO_PODR_FECH */ +#define MCF_GPIO_PODR_FECH_PODR_FECH0              (0x01) +#define MCF_GPIO_PODR_FECH_PODR_FECH1              (0x02) +#define MCF_GPIO_PODR_FECH_PODR_FECH2              (0x04) +#define MCF_GPIO_PODR_FECH_PODR_FECH3              (0x08) +#define MCF_GPIO_PODR_FECH_PODR_FECH4              (0x10) +#define MCF_GPIO_PODR_FECH_PODR_FECH5              (0x20) +#define MCF_GPIO_PODR_FECH_PODR_FECH6              (0x40) +#define MCF_GPIO_PODR_FECH_PODR_FECH7              (0x80) + +/* Bit definitions and macros for MCF_GPIO_PODR_FECL */ +#define MCF_GPIO_PODR_FECL_PODR_FECL0              (0x01) +#define MCF_GPIO_PODR_FECL_PODR_FECL1              (0x02) +#define MCF_GPIO_PODR_FECL_PODR_FECL2              (0x04) +#define MCF_GPIO_PODR_FECL_PODR_FECL3              (0x08) +#define MCF_GPIO_PODR_FECL_PODR_FECL4              (0x10) +#define MCF_GPIO_PODR_FECL_PODR_FECL5              (0x20) +#define MCF_GPIO_PODR_FECL_PODR_FECL6              (0x40) +#define MCF_GPIO_PODR_FECL_PODR_FECL7              (0x80) + +/* Bit definitions and macros for MCF_GPIO_PODR_SSI */ +#define MCF_GPIO_PODR_SSI_PODR_SSI0                (0x01) +#define MCF_GPIO_PODR_SSI_PODR_SSI1                (0x02) +#define MCF_GPIO_PODR_SSI_PODR_SSI2                (0x04) +#define MCF_GPIO_PODR_SSI_PODR_SSI3                (0x08) +#define MCF_GPIO_PODR_SSI_PODR_SSI4                (0x10) + +/* Bit definitions and macros for MCF_GPIO_PODR_BUSCTL */ +#define MCF_GPIO_PODR_BUSCTL_POSDR_BUSCTL0         (0x01) +#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL1          (0x02) +#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL2          (0x04) +#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL3          (0x08) + +/* Bit definitions and macros for MCF_GPIO_PODR_BE */ +#define MCF_GPIO_PODR_BE_PODR_BE0                  (0x01) +#define MCF_GPIO_PODR_BE_PODR_BE1                  (0x02) +#define MCF_GPIO_PODR_BE_PODR_BE2                  (0x04) +#define MCF_GPIO_PODR_BE_PODR_BE3                  (0x08) + +/* Bit definitions and macros for MCF_GPIO_PODR_CS */ +#define MCF_GPIO_PODR_CS_PODR_CS1                  (0x02) +#define MCF_GPIO_PODR_CS_PODR_CS2                  (0x04) +#define MCF_GPIO_PODR_CS_PODR_CS3                  (0x08) +#define MCF_GPIO_PODR_CS_PODR_CS4                  (0x10) +#define MCF_GPIO_PODR_CS_PODR_CS5                  (0x20) + +/* Bit definitions and macros for MCF_GPIO_PODR_PWM */ +#define MCF_GPIO_PODR_PWM_PODR_PWM2                (0x04) +#define MCF_GPIO_PODR_PWM_PODR_PWM3                (0x08) +#define MCF_GPIO_PODR_PWM_PODR_PWM4                (0x10) +#define MCF_GPIO_PODR_PWM_PODR_PWM5                (0x20) + +/* Bit definitions and macros for MCF_GPIO_PODR_FECI2C */ +#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C0          (0x01) +#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C1          (0x02) +#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C2          (0x04) +#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C3          (0x08) + +/* Bit definitions and macros for MCF_GPIO_PODR_UART */ +#define MCF_GPIO_PODR_UART_PODR_UART0              (0x01) +#define MCF_GPIO_PODR_UART_PODR_UART1              (0x02) +#define MCF_GPIO_PODR_UART_PODR_UART2              (0x04) +#define MCF_GPIO_PODR_UART_PODR_UART3              (0x08) +#define MCF_GPIO_PODR_UART_PODR_UART4              (0x10) +#define MCF_GPIO_PODR_UART_PODR_UART5              (0x20) +#define MCF_GPIO_PODR_UART_PODR_UART6              (0x40) +#define MCF_GPIO_PODR_UART_PODR_UART7              (0x80) + +/* Bit definitions and macros for MCF_GPIO_PODR_QSPI */ +#define MCF_GPIO_PODR_QSPI_PODR_QSPI0              (0x01) +#define MCF_GPIO_PODR_QSPI_PODR_QSPI1              (0x02) +#define MCF_GPIO_PODR_QSPI_PODR_QSPI2              (0x04) +#define MCF_GPIO_PODR_QSPI_PODR_QSPI3              (0x08) +#define MCF_GPIO_PODR_QSPI_PODR_QSPI4              (0x10) +#define MCF_GPIO_PODR_QSPI_PODR_QSPI5              (0x20) + +/* Bit definitions and macros for MCF_GPIO_PODR_TIMER */ +#define MCF_GPIO_PODR_TIMER_PODR_TIMER0            (0x01) +#define MCF_GPIO_PODR_TIMER_PODR_TIMER1            (0x02) +#define MCF_GPIO_PODR_TIMER_PODR_TIMER2            (0x04) +#define MCF_GPIO_PODR_TIMER_PODR_TIMER3            (0x08) + +/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAH */ +#define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH0      (0x01) +#define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH1      (0x02) + +/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAM */ +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM0      (0x01) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM1      (0x02) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM2      (0x04) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM3      (0x08) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM4      (0x10) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM5      (0x20) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM6      (0x40) +#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM7      (0x80) + +/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAL */ +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL0      (0x01) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL1      (0x02) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL2      (0x04) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL3      (0x08) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL4      (0x10) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL5      (0x20) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL6      (0x40) +#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL7      (0x80) + +/* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLH */ +#define MCF_GPIO_PODR_LCDCTLH_PODR_LCDCTLH0        (0x01) + +/* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLL */ +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL0        (0x01) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL1        (0x02) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL2        (0x04) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL3        (0x08) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL4        (0x10) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL5        (0x20) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL6        (0x40) +#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL7        (0x80) + +/* Bit definitions and macros for MCF_GPIO_PDDR_FECH */ +#define MCF_GPIO_PDDR_FECH_PDDR_FECH0              (0x01) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH1              (0x02) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH2              (0x04) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH3              (0x08) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH4              (0x10) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH5              (0x20) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH6              (0x40) +#define MCF_GPIO_PDDR_FECH_PDDR_FECH7              (0x80) + +/* Bit definitions and macros for MCF_GPIO_PDDR_FECL */ +#define MCF_GPIO_PDDR_FECL_PDDR_FECL0              (0x01) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL1              (0x02) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL2              (0x04) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL3              (0x08) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL4              (0x10) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL5              (0x20) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL6              (0x40) +#define MCF_GPIO_PDDR_FECL_PDDR_FECL7              (0x80) + +/* Bit definitions and macros for MCF_GPIO_PDDR_SSI */ +#define MCF_GPIO_PDDR_SSI_PDDR_SSI0                (0x01) +#define MCF_GPIO_PDDR_SSI_PDDR_SSI1                (0x02) +#define MCF_GPIO_PDDR_SSI_PDDR_SSI2                (0x04) +#define MCF_GPIO_PDDR_SSI_PDDR_SSI3                (0x08) +#define MCF_GPIO_PDDR_SSI_PDDR_SSI4                (0x10) + +/* Bit definitions and macros for MCF_GPIO_PDDR_BUSCTL */ +#define MCF_GPIO_PDDR_BUSCTL_POSDR_BUSCTL0         (0x01) +#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL1          (0x02) +#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL2          (0x04) +#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL3          (0x08) + +/* Bit definitions and macros for MCF_GPIO_PDDR_BE */ +#define MCF_GPIO_PDDR_BE_PDDR_BE0                  (0x01) +#define MCF_GPIO_PDDR_BE_PDDR_BE1                  (0x02) +#define MCF_GPIO_PDDR_BE_PDDR_BE2                  (0x04) +#define MCF_GPIO_PDDR_BE_PDDR_BE3                  (0x08) + +/* Bit definitions and macros for MCF_GPIO_PDDR_CS */ +#define MCF_GPIO_PDDR_CS_PDDR_CS1                  (0x02) +#define MCF_GPIO_PDDR_CS_PDDR_CS2                  (0x04) +#define MCF_GPIO_PDDR_CS_PDDR_CS3                  (0x08) +#define MCF_GPIO_PDDR_CS_PDDR_CS4                  (0x10) +#define MCF_GPIO_PDDR_CS_PDDR_CS5                  (0x20) + +/* Bit definitions and macros for MCF_GPIO_PDDR_PWM */ +#define MCF_GPIO_PDDR_PWM_PDDR_PWM2                (0x04) +#define MCF_GPIO_PDDR_PWM_PDDR_PWM3                (0x08) +#define MCF_GPIO_PDDR_PWM_PDDR_PWM4                (0x10) +#define MCF_GPIO_PDDR_PWM_PDDR_PWM5                (0x20) + +/* Bit definitions and macros for MCF_GPIO_PDDR_FECI2C */ +#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C0          (0x01) +#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C1          (0x02) +#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C2          (0x04) +#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C3          (0x08) + +/* Bit definitions and macros for MCF_GPIO_PDDR_UART */ +#define MCF_GPIO_PDDR_UART_PDDR_UART0              (0x01) +#define MCF_GPIO_PDDR_UART_PDDR_UART1              (0x02) +#define MCF_GPIO_PDDR_UART_PDDR_UART2              (0x04) +#define MCF_GPIO_PDDR_UART_PDDR_UART3              (0x08) +#define MCF_GPIO_PDDR_UART_PDDR_UART4              (0x10) +#define MCF_GPIO_PDDR_UART_PDDR_UART5              (0x20) +#define MCF_GPIO_PDDR_UART_PDDR_UART6              (0x40) +#define MCF_GPIO_PDDR_UART_PDDR_UART7              (0x80) + +/* Bit definitions and macros for MCF_GPIO_PDDR_QSPI */ +#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI0              (0x01) +#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI1              (0x02) +#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI2              (0x04) +#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI3              (0x08) +#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI4              (0x10) +#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI5              (0x20) + +/* Bit definitions and macros for MCF_GPIO_PDDR_TIMER */ +#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER0            (0x01) +#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER1            (0x02) +#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER2            (0x04) +#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER3            (0x08) + +/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAH */ +#define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH0      (0x01) +#define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH1      (0x02) + +/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAM */ +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM0      (0x01) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM1      (0x02) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM2      (0x04) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM3      (0x08) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM4      (0x10) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM5      (0x20) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM6      (0x40) +#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM7      (0x80) + +/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAL */ +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL0      (0x01) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL1      (0x02) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL2      (0x04) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL3      (0x08) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL4      (0x10) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL5      (0x20) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL6      (0x40) +#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL7      (0x80) + +/* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLH */ +#define MCF_GPIO_PDDR_LCDCTLH_PDDR_LCDCTLH0        (0x01) + +/* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLL */ +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL0        (0x01) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL1        (0x02) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL2        (0x04) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL3        (0x08) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL4        (0x10) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL5        (0x20) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL6        (0x40) +#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL7        (0x80) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECH */ +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH0          (0x01) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH1          (0x02) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH2          (0x04) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH3          (0x08) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH4          (0x10) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH5          (0x20) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH6          (0x40) +#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH7          (0x80) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECL */ +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL0          (0x01) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL1          (0x02) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL2          (0x04) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL3          (0x08) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL4          (0x10) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL5          (0x20) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL6          (0x40) +#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL7          (0x80) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_SSI */ +#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI0            (0x01) +#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI1            (0x02) +#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI2            (0x04) +#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI3            (0x08) +#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI4            (0x10) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_BUSCTL */ +#define MCF_GPIO_PPDSDR_BUSCTL_POSDR_BUSCTL0       (0x01) +#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL1      (0x02) +#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL2      (0x04) +#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL3      (0x08) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_BE */ +#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE0              (0x01) +#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE1              (0x02) +#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE2              (0x04) +#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE3              (0x08) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_CS */ +#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS1              (0x02) +#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS2              (0x04) +#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS3              (0x08) +#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS4              (0x10) +#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS5              (0x20) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_PWM */ +#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM2            (0x04) +#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM3            (0x08) +#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM4            (0x10) +#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM5            (0x20) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECI2C */ +#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C0      (0x01) +#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C1      (0x02) +#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C2      (0x04) +#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C3      (0x08) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_UART */ +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART0          (0x01) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART1          (0x02) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART2          (0x04) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART3          (0x08) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART4          (0x10) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART5          (0x20) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART6          (0x40) +#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART7          (0x80) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_QSPI */ +#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI0          (0x01) +#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI1          (0x02) +#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI2          (0x04) +#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI3          (0x08) +#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI4          (0x10) +#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI5          (0x20) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_TIMER */ +#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER0        (0x01) +#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER1        (0x02) +#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER2        (0x04) +#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER3        (0x08) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAH */ +#define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH0  (0x01) +#define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH1  (0x02) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAM */ +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM0  (0x01) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM1  (0x02) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM2  (0x04) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM3  (0x08) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM4  (0x10) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM5  (0x20) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM6  (0x40) +#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM7  (0x80) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAL */ +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL0  (0x01) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL1  (0x02) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL2  (0x04) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL3  (0x08) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL4  (0x10) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL5  (0x20) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL6  (0x40) +#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL7  (0x80) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLH */ +#define MCF_GPIO_PPDSDR_LCDCTLH_PPDSDR_LCDCTLH0    (0x01) + +/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLL */ +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL0    (0x01) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL1    (0x02) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL2    (0x04) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL3    (0x08) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL4    (0x10) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL5    (0x20) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL6    (0x40) +#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL7    (0x80) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_FECH */ +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH0            (0x01) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH1            (0x02) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH2            (0x04) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH3            (0x08) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH4            (0x10) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH5            (0x20) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH6            (0x40) +#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH7            (0x80) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_FECL */ +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL0            (0x01) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL1            (0x02) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL2            (0x04) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL3            (0x08) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL4            (0x10) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL5            (0x20) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL6            (0x40) +#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL7            (0x80) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_SSI */ +#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI0              (0x01) +#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI1              (0x02) +#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI2              (0x04) +#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI3              (0x08) +#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI4              (0x10) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_BUSCTL */ +#define MCF_GPIO_PCLRR_BUSCTL_POSDR_BUSCTL0        (0x01) +#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL1        (0x02) +#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL2        (0x04) +#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL3        (0x08) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_BE */ +#define MCF_GPIO_PCLRR_BE_PCLRR_BE0                (0x01) +#define MCF_GPIO_PCLRR_BE_PCLRR_BE1                (0x02) +#define MCF_GPIO_PCLRR_BE_PCLRR_BE2                (0x04) +#define MCF_GPIO_PCLRR_BE_PCLRR_BE3                (0x08) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_CS */ +#define MCF_GPIO_PCLRR_CS_PCLRR_CS1                (0x02) +#define MCF_GPIO_PCLRR_CS_PCLRR_CS2                (0x04) +#define MCF_GPIO_PCLRR_CS_PCLRR_CS3                (0x08) +#define MCF_GPIO_PCLRR_CS_PCLRR_CS4                (0x10) +#define MCF_GPIO_PCLRR_CS_PCLRR_CS5                (0x20) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_PWM */ +#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM2              (0x04) +#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM3              (0x08) +#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM4              (0x10) +#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM5              (0x20) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_FECI2C */ +#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C0        (0x01) +#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C1        (0x02) +#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C2        (0x04) +#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C3        (0x08) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_UART */ +#define MCF_GPIO_PCLRR_UART_PCLRR_UART0            (0x01) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART1            (0x02) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART2            (0x04) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART3            (0x08) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART4            (0x10) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART5            (0x20) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART6            (0x40) +#define MCF_GPIO_PCLRR_UART_PCLRR_UART7            (0x80) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_QSPI */ +#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI0            (0x01) +#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI1            (0x02) +#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI2            (0x04) +#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI3            (0x08) +#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI4            (0x10) +#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI5            (0x20) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_TIMER */ +#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER0          (0x01) +#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER1          (0x02) +#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER2          (0x04) +#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER3          (0x08) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAH */ +#define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH0    (0x01) +#define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH1    (0x02) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAM */ +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM0    (0x01) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM1    (0x02) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM2    (0x04) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM3    (0x08) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM4    (0x10) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM5    (0x20) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM6    (0x40) +#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM7    (0x80) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAL */ +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL0    (0x01) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL1    (0x02) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL2    (0x04) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL3    (0x08) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL4    (0x10) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL5    (0x20) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL6    (0x40) +#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL7    (0x80) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLH */ +#define MCF_GPIO_PCLRR_LCDCTLH_PCLRR_LCDCTLH0      (0x01) + +/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLL */ +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL0      (0x01) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL1      (0x02) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL2      (0x04) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL3      (0x08) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL4      (0x10) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL5      (0x20) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL6      (0x40) +#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL7      (0x80) + +/* Bit definitions and macros for MCF_GPIO_PAR_FEC */ +#define MCF_GPIO_PAR_FEC_PAR_FEC_MII(x)            (((x)&0x03)<<0) +#define MCF_GPIO_PAR_FEC_PAR_FEC_7W(x)             (((x)&0x03)<<2) +#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_GPIO           (0x00) +#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_URTS1          (0x04) +#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC            (0x0C) +#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_GPIO          (0x00) +#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_UART          (0x01) +#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC           (0x03) + +/* Bit definitions and macros for MCF_GPIO_PAR_PWM */ +#define MCF_GPIO_PAR_PWM_PAR_PWM1(x)               (((x)&0x03)<<0) +#define MCF_GPIO_PAR_PWM_PAR_PWM3(x)               (((x)&0x03)<<2) +#define MCF_GPIO_PAR_PWM_PAR_PWM5                  (0x10) +#define MCF_GPIO_PAR_PWM_PAR_PWM7                  (0x20) + +/* Bit definitions and macros for MCF_GPIO_PAR_BUSCTL */ +#define MCF_GPIO_PAR_BUSCTL_PAR_TS(x)              (((x)&0x03)<<3) +#define MCF_GPIO_PAR_BUSCTL_PAR_RWB                (0x20) +#define MCF_GPIO_PAR_BUSCTL_PAR_TA                 (0x40) +#define MCF_GPIO_PAR_BUSCTL_PAR_OE                 (0x80) +#define MCF_GPIO_PAR_BUSCTL_PAR_OE_GPIO            (0x00) +#define MCF_GPIO_PAR_BUSCTL_PAR_OE_OE              (0x80) +#define MCF_GPIO_PAR_BUSCTL_PAR_TA_GPIO            (0x00) +#define MCF_GPIO_PAR_BUSCTL_PAR_TA_TA              (0x40) +#define MCF_GPIO_PAR_BUSCTL_PAR_RWB_GPIO           (0x00) +#define MCF_GPIO_PAR_BUSCTL_PAR_RWB_RWB            (0x20) +#define MCF_GPIO_PAR_BUSCTL_PAR_TS_GPIO            (0x00) +#define MCF_GPIO_PAR_BUSCTL_PAR_TS_DACK0           (0x10) +#define MCF_GPIO_PAR_BUSCTL_PAR_TS_TS              (0x18) + +/* Bit definitions and macros for MCF_GPIO_PAR_FECI2C */ +#define MCF_GPIO_PAR_FECI2C_PAR_SDA(x)             (((x)&0x03)<<0) +#define MCF_GPIO_PAR_FECI2C_PAR_SCL(x)             (((x)&0x03)<<2) +#define MCF_GPIO_PAR_FECI2C_PAR_MDIO(x)            (((x)&0x03)<<4) +#define MCF_GPIO_PAR_FECI2C_PAR_MDC(x)             (((x)&0x03)<<6) +#define MCF_GPIO_PAR_FECI2C_PAR_MDC_GPIO           (0x00) +#define MCF_GPIO_PAR_FECI2C_PAR_MDC_UTXD2          (0x40) +#define MCF_GPIO_PAR_FECI2C_PAR_MDC_SCL            (0x80) +#define MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC           (0xC0) +#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_GPIO          (0x00) +#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_URXD2         (0x10) +#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_SDA           (0x20) +#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO         (0x30) +#define MCF_GPIO_PAR_FECI2C_PAR_SCL_GPIO           (0x00) +#define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2          (0x04) +#define MCF_GPIO_PAR_FECI2C_PAR_SCL_SCL            (0x0C) +#define MCF_GPIO_PAR_FECI2C_PAR_SDA_GPIO           (0x00) +#define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2          (0x02) +#define MCF_GPIO_PAR_FECI2C_PAR_SDA_SDA            (0x03) + +/* Bit definitions and macros for MCF_GPIO_PAR_BE */ +#define MCF_GPIO_PAR_BE_PAR_BE0                    (0x01) +#define MCF_GPIO_PAR_BE_PAR_BE1                    (0x02) +#define MCF_GPIO_PAR_BE_PAR_BE2                    (0x04) +#define MCF_GPIO_PAR_BE_PAR_BE3                    (0x08) + +/* Bit definitions and macros for MCF_GPIO_PAR_CS */ +#define MCF_GPIO_PAR_CS_PAR_CS1                    (0x02) +#define MCF_GPIO_PAR_CS_PAR_CS2                    (0x04) +#define MCF_GPIO_PAR_CS_PAR_CS3                    (0x08) +#define MCF_GPIO_PAR_CS_PAR_CS4                    (0x10) +#define MCF_GPIO_PAR_CS_PAR_CS5                    (0x20) +#define MCF_GPIO_PAR_CS_PAR_CS_CS1_GPIO            (0x00) +#define MCF_GPIO_PAR_CS_PAR_CS_CS1_SDCS1           (0x01) +#define MCF_GPIO_PAR_CS_PAR_CS_CS1_CS1             (0x03) + +/* Bit definitions and macros for MCF_GPIO_PAR_SSI */ +#define MCF_GPIO_PAR_SSI_PAR_MCLK                  (0x0080) +#define MCF_GPIO_PAR_SSI_PAR_TXD(x)                (((x)&0x0003)<<8) +#define MCF_GPIO_PAR_SSI_PAR_RXD(x)                (((x)&0x0003)<<10) +#define MCF_GPIO_PAR_SSI_PAR_FS(x)                 (((x)&0x0003)<<12) +#define MCF_GPIO_PAR_SSI_PAR_BCLK(x)               (((x)&0x0003)<<14) + +/* Bit definitions and macros for MCF_GPIO_PAR_UART */ +#define MCF_GPIO_PAR_UART_PAR_UTXD0                (0x0001) +#define MCF_GPIO_PAR_UART_PAR_URXD0                (0x0002) +#define MCF_GPIO_PAR_UART_PAR_URTS0                (0x0004) +#define MCF_GPIO_PAR_UART_PAR_UCTS0                (0x0008) +#define MCF_GPIO_PAR_UART_PAR_UTXD1(x)             (((x)&0x0003)<<4) +#define MCF_GPIO_PAR_UART_PAR_URXD1(x)             (((x)&0x0003)<<6) +#define MCF_GPIO_PAR_UART_PAR_URTS1(x)             (((x)&0x0003)<<8) +#define MCF_GPIO_PAR_UART_PAR_UCTS1(x)             (((x)&0x0003)<<10) +#define MCF_GPIO_PAR_UART_PAR_UCTS1_GPIO           (0x0000) +#define MCF_GPIO_PAR_UART_PAR_UCTS1_SSI_BCLK       (0x0800) +#define MCF_GPIO_PAR_UART_PAR_UCTS1_ULPI_D7        (0x0400) +#define MCF_GPIO_PAR_UART_PAR_UCTS1_UCTS1          (0x0C00) +#define MCF_GPIO_PAR_UART_PAR_URTS1_GPIO           (0x0000) +#define MCF_GPIO_PAR_UART_PAR_URTS1_SSI_FS         (0x0200) +#define MCF_GPIO_PAR_UART_PAR_URTS1_ULPI_D6        (0x0100) +#define MCF_GPIO_PAR_UART_PAR_URTS1_URTS1          (0x0300) +#define MCF_GPIO_PAR_UART_PAR_URXD1_GPIO           (0x0000) +#define MCF_GPIO_PAR_UART_PAR_URXD1_SSI_RXD        (0x0080) +#define MCF_GPIO_PAR_UART_PAR_URXD1_ULPI_D5        (0x0040) +#define MCF_GPIO_PAR_UART_PAR_URXD1_URXD1          (0x00C0) +#define MCF_GPIO_PAR_UART_PAR_UTXD1_GPIO           (0x0000) +#define MCF_GPIO_PAR_UART_PAR_UTXD1_SSI_TXD        (0x0020) +#define MCF_GPIO_PAR_UART_PAR_UTXD1_ULPI_D4        (0x0010) +#define MCF_GPIO_PAR_UART_PAR_UTXD1_UTXD1          (0x0030) + +/* Bit definitions and macros for MCF_GPIO_PAR_QSPI */ +#define MCF_GPIO_PAR_QSPI_PAR_SCK(x)               (((x)&0x0003)<<4) +#define MCF_GPIO_PAR_QSPI_PAR_DOUT(x)              (((x)&0x0003)<<6) +#define MCF_GPIO_PAR_QSPI_PAR_DIN(x)               (((x)&0x0003)<<8) +#define MCF_GPIO_PAR_QSPI_PAR_PCS0(x)              (((x)&0x0003)<<10) +#define MCF_GPIO_PAR_QSPI_PAR_PCS1(x)              (((x)&0x0003)<<12) +#define MCF_GPIO_PAR_QSPI_PAR_PCS2(x)              (((x)&0x0003)<<14) + +/* Bit definitions and macros for MCF_GPIO_PAR_TIMER */ +#define MCF_GPIO_PAR_TIMER_PAR_TIN0(x)             (((x)&0x03)<<0) +#define MCF_GPIO_PAR_TIMER_PAR_TIN1(x)             (((x)&0x03)<<2) +#define MCF_GPIO_PAR_TIMER_PAR_TIN2(x)             (((x)&0x03)<<4) +#define MCF_GPIO_PAR_TIMER_PAR_TIN3(x)             (((x)&0x03)<<6) +#define MCF_GPIO_PAR_TIMER_PAR_TIN3_GPIO           (0x00) +#define MCF_GPIO_PAR_TIMER_PAR_TIN3_TOUT3          (0x80) +#define MCF_GPIO_PAR_TIMER_PAR_TIN3_URXD2          (0x40) +#define MCF_GPIO_PAR_TIMER_PAR_TIN3_TIN3           (0xC0) +#define MCF_GPIO_PAR_TIMER_PAR_TIN2_GPIO           (0x00) +#define MCF_GPIO_PAR_TIMER_PAR_TIN2_TOUT2          (0x20) +#define MCF_GPIO_PAR_TIMER_PAR_TIN2_UTXD2          (0x10) +#define MCF_GPIO_PAR_TIMER_PAR_TIN2_TIN2           (0x30) +#define MCF_GPIO_PAR_TIMER_PAR_TIN1_GPIO           (0x00) +#define MCF_GPIO_PAR_TIMER_PAR_TIN1_TOUT1          (0x08) +#define MCF_GPIO_PAR_TIMER_PAR_TIN1_DACK1          (0x04) +#define MCF_GPIO_PAR_TIMER_PAR_TIN1_TIN1           (0x0C) +#define MCF_GPIO_PAR_TIMER_PAR_TIN0_GPIO           (0x00) +#define MCF_GPIO_PAR_TIMER_PAR_TIN0_TOUT0          (0x02) +#define MCF_GPIO_PAR_TIMER_PAR_TIN0_DREQ0          (0x01) +#define MCF_GPIO_PAR_TIMER_PAR_TIN0_TIN0           (0x03) + +/* Bit definitions and macros for MCF_GPIO_PAR_LCDDATA */ +#define MCF_GPIO_PAR_LCDDATA_PAR_LD7_0(x)          (((x)&0x03)<<0) +#define MCF_GPIO_PAR_LCDDATA_PAR_LD15_8(x)         (((x)&0x03)<<2) +#define MCF_GPIO_PAR_LCDDATA_PAR_LD16(x)           (((x)&0x03)<<4) +#define MCF_GPIO_PAR_LCDDATA_PAR_LD17(x)           (((x)&0x03)<<6) + +/* Bit definitions and macros for MCF_GPIO_PAR_LCDCTL */ +#define MCF_GPIO_PAR_LCDCTL_PAR_CLS                (0x0001) +#define MCF_GPIO_PAR_LCDCTL_PAR_PS                 (0x0002) +#define MCF_GPIO_PAR_LCDCTL_PAR_REV                (0x0004) +#define MCF_GPIO_PAR_LCDCTL_PAR_SPL_SPR            (0x0008) +#define MCF_GPIO_PAR_LCDCTL_PAR_CONTRAST           (0x0010) +#define MCF_GPIO_PAR_LCDCTL_PAR_LSCLK              (0x0020) +#define MCF_GPIO_PAR_LCDCTL_PAR_LP_HSYNC           (0x0040) +#define MCF_GPIO_PAR_LCDCTL_PAR_FLM_VSYNC          (0x0080) +#define MCF_GPIO_PAR_LCDCTL_PAR_ACD_OE             (0x0100) + +/* Bit definitions and macros for MCF_GPIO_PAR_IRQ */ +#define MCF_GPIO_PAR_IRQ_PAR_IRQ1(x)               (((x)&0x0003)<<4) +#define MCF_GPIO_PAR_IRQ_PAR_IRQ2(x)               (((x)&0x0003)<<6) +#define MCF_GPIO_PAR_IRQ_PAR_IRQ4(x)               (((x)&0x0003)<<8) +#define MCF_GPIO_PAR_IRQ_PAR_IRQ5(x)               (((x)&0x0003)<<10) +#define MCF_GPIO_PAR_IRQ_PAR_IRQ6(x)               (((x)&0x0003)<<12) + +/* Bit definitions and macros for MCF_GPIO_MSCR_FLEXBUS */ +#define MCF_GPIO_MSCR_FLEXBUS_MSCR_ADDRCTL(x)      (((x)&0x03)<<0) +#define MCF_GPIO_MSCR_FLEXBUS_MSCR_DLOWER(x)       (((x)&0x03)<<2) +#define MCF_GPIO_MSCR_FLEXBUS_MSCR_DUPPER(x)       (((x)&0x03)<<4) + +/* Bit definitions and macros for MCF_GPIO_MSCR_SDRAM */ +#define MCF_GPIO_MSCR_SDRAM_MSCR_SDRAM(x)          (((x)&0x03)<<0) +#define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLK(x)          (((x)&0x03)<<2) +#define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLKB(x)         (((x)&0x03)<<4) + +/* Bit definitions and macros for MCF_GPIO_DSCR_I2C */ +#define MCF_GPIO_DSCR_I2C_I2C_DSE(x)               (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_PWM */ +#define MCF_GPIO_DSCR_PWM_PWM_DSE(x)               (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_FEC */ +#define MCF_GPIO_DSCR_FEC_FEC_DSE(x)               (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_UART */ +#define MCF_GPIO_DSCR_UART_UART0_DSE(x)            (((x)&0x03)<<0) +#define MCF_GPIO_DSCR_UART_UART1_DSE(x)            (((x)&0x03)<<2) + +/* Bit definitions and macros for MCF_GPIO_DSCR_QSPI */ +#define MCF_GPIO_DSCR_QSPI_QSPI_DSE(x)             (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_TIMER */ +#define MCF_GPIO_DSCR_TIMER_TIMER_DSE(x)           (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_SSI */ +#define MCF_GPIO_DSCR_SSI_SSI_DSE(x)               (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_LCD */ +#define MCF_GPIO_DSCR_LCD_LCD_DSE(x)               (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_DEBUG */ +#define MCF_GPIO_DSCR_DEBUG_DEBUG_DSE(x)           (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_CLKRST */ +#define MCF_GPIO_DSCR_CLKRST_CLKRST_DSE(x)         (((x)&0x03)<<0) + +/* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ +#define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x)               (((x)&0x03)<<0) + +/* + * Generic GPIO support + */ +#define MCFGPIO_PODR			MCFGPIO_PODR_FECH +#define MCFGPIO_PDDR			MCFGPIO_PDDR_FECH +#define MCFGPIO_PPDR			MCFGPIO_PPDSDR_FECH +#define MCFGPIO_SETR			MCFGPIO_PPDSDR_FECH +#define MCFGPIO_CLRR			MCFGPIO_PCLRR_FECH + +#define MCFGPIO_PIN_MAX			136 +#define MCFGPIO_IRQ_MAX			8 +#define MCFGPIO_IRQ_VECBASE		MCFINT_VECBASE + +/********************************************************************* + * + * Phase Locked Loop (PLL) + * + *********************************************************************/ + +/* Register read/write macros */ +#define MCF_PLL_PODR              0xFC0C0000 +#define MCF_PLL_PLLCR             0xFC0C0004 +#define MCF_PLL_PMDR              0xFC0C0008 +#define MCF_PLL_PFDR              0xFC0C000C + +/* Bit definitions and macros for MCF_PLL_PODR */ +#define MCF_PLL_PODR_BUSDIV(x)    (((x)&0x0F)<<0) +#define MCF_PLL_PODR_CPUDIV(x)    (((x)&0x0F)<<4) + +/* Bit definitions and macros for MCF_PLL_PLLCR */ +#define MCF_PLL_PLLCR_DITHDEV(x)  (((x)&0x07)<<0) +#define MCF_PLL_PLLCR_DITHEN      (0x80) + +/* Bit definitions and macros for MCF_PLL_PMDR */ +#define MCF_PLL_PMDR_MODDIV(x)    (((x)&0xFF)<<0) + +/* Bit definitions and macros for MCF_PLL_PFDR */ +#define MCF_PLL_PFDR_MFD(x)       (((x)&0xFF)<<0) + +/********************************************************************* + * + * System Control Module Registers (SCM) + * + *********************************************************************/ + +/* Register read/write macros */ +#define MCF_SCM_MPR			0xFC000000 +#define MCF_SCM_PACRA			0xFC000020 +#define MCF_SCM_PACRB			0xFC000024 +#define MCF_SCM_PACRC			0xFC000028 +#define MCF_SCM_PACRD			0xFC00002C +#define MCF_SCM_PACRE			0xFC000040 +#define MCF_SCM_PACRF			0xFC000044 + +#define MCF_SCM_BCR			0xFC040024 + +/********************************************************************* + * + * SDRAM Controller (SDRAMC) + * + *********************************************************************/ + +/* Register read/write macros */ +#define MCF_SDRAMC_SDMR			0xFC0B8000 +#define MCF_SDRAMC_SDCR			0xFC0B8004 +#define MCF_SDRAMC_SDCFG1		0xFC0B8008 +#define MCF_SDRAMC_SDCFG2		0xFC0B800C +#define MCF_SDRAMC_LIMP_FIX		0xFC0B8080 +#define MCF_SDRAMC_SDDS			0xFC0B8100 +#define MCF_SDRAMC_SDCS0		0xFC0B8110 +#define MCF_SDRAMC_SDCS1		0xFC0B8114 +#define MCF_SDRAMC_SDCS2		0xFC0B8118 +#define MCF_SDRAMC_SDCS3		0xFC0B811C + +/* Bit definitions and macros for MCF_SDRAMC_SDMR */ +#define MCF_SDRAMC_SDMR_CMD		(0x00010000) +#define MCF_SDRAMC_SDMR_AD(x)		(((x)&0x00000FFF)<<18) +#define MCF_SDRAMC_SDMR_BNKAD(x)	(((x)&0x00000003)<<30) +#define MCF_SDRAMC_SDMR_BNKAD_LMR	(0x00000000) +#define MCF_SDRAMC_SDMR_BNKAD_LEMR	(0x40000000) + +/* Bit definitions and macros for MCF_SDRAMC_SDCR */ +#define MCF_SDRAMC_SDCR_IPALL		(0x00000002) +#define MCF_SDRAMC_SDCR_IREF		(0x00000004) +#define MCF_SDRAMC_SDCR_DQS_OE(x)	(((x)&0x0000000F)<<8) +#define MCF_SDRAMC_SDCR_PS(x)		(((x)&0x00000003)<<12) +#define MCF_SDRAMC_SDCR_RCNT(x)		(((x)&0x0000003F)<<16) +#define MCF_SDRAMC_SDCR_OE_RULE		(0x00400000) +#define MCF_SDRAMC_SDCR_MUX(x)		(((x)&0x00000003)<<24) +#define MCF_SDRAMC_SDCR_REF		(0x10000000) +#define MCF_SDRAMC_SDCR_DDR		(0x20000000) +#define MCF_SDRAMC_SDCR_CKE		(0x40000000) +#define MCF_SDRAMC_SDCR_MODE_EN		(0x80000000) +#define MCF_SDRAMC_SDCR_PS_16		(0x00002000) +#define MCF_SDRAMC_SDCR_PS_32		(0x00000000) + +/* Bit definitions and macros for MCF_SDRAMC_SDCFG1 */ +#define MCF_SDRAMC_SDCFG1_WTLAT(x)	(((x)&0x00000007)<<4) +#define MCF_SDRAMC_SDCFG1_REF2ACT(x)	(((x)&0x0000000F)<<8) +#define MCF_SDRAMC_SDCFG1_PRE2ACT(x)	(((x)&0x00000007)<<12) +#define MCF_SDRAMC_SDCFG1_ACT2RW(x)	(((x)&0x00000007)<<16) +#define MCF_SDRAMC_SDCFG1_RDLAT(x)	(((x)&0x0000000F)<<20) +#define MCF_SDRAMC_SDCFG1_SWT2RD(x)	(((x)&0x00000007)<<24) +#define MCF_SDRAMC_SDCFG1_SRD2RW(x)	(((x)&0x0000000F)<<28) + +/* Bit definitions and macros for MCF_SDRAMC_SDCFG2 */ +#define MCF_SDRAMC_SDCFG2_BL(x)		(((x)&0x0000000F)<<16) +#define MCF_SDRAMC_SDCFG2_BRD2WT(x)	(((x)&0x0000000F)<<20) +#define MCF_SDRAMC_SDCFG2_BWT2RW(x)	(((x)&0x0000000F)<<24) +#define MCF_SDRAMC_SDCFG2_BRD2PRE(x)	(((x)&0x0000000F)<<28) + +/* Device Errata - LIMP mode work around */ +#define MCF_SDRAMC_REFRESH		(0x40000000) + +/* Bit definitions and macros for MCF_SDRAMC_SDDS */ +#define MCF_SDRAMC_SDDS_SB_D(x)		(((x)&0x00000003)<<0) +#define MCF_SDRAMC_SDDS_SB_S(x)		(((x)&0x00000003)<<2) +#define MCF_SDRAMC_SDDS_SB_A(x)		(((x)&0x00000003)<<4) +#define MCF_SDRAMC_SDDS_SB_C(x)		(((x)&0x00000003)<<6) +#define MCF_SDRAMC_SDDS_SB_E(x)		(((x)&0x00000003)<<8) + +/* Bit definitions and macros for MCF_SDRAMC_SDCS */ +#define MCF_SDRAMC_SDCS_CSSZ(x)		(((x)&0x0000001F)<<0) +#define MCF_SDRAMC_SDCS_BASE(x)		(((x)&0x00000FFF)<<20) +#define MCF_SDRAMC_SDCS_BA(x)		((x)&0xFFF00000) +#define MCF_SDRAMC_SDCS_CSSZ_DIABLE	(0x00000000) +#define MCF_SDRAMC_SDCS_CSSZ_1MBYTE	(0x00000013) +#define MCF_SDRAMC_SDCS_CSSZ_2MBYTE	(0x00000014) +#define MCF_SDRAMC_SDCS_CSSZ_4MBYTE	(0x00000015) +#define MCF_SDRAMC_SDCS_CSSZ_8MBYTE	(0x00000016) +#define MCF_SDRAMC_SDCS_CSSZ_16MBYTE	(0x00000017) +#define MCF_SDRAMC_SDCS_CSSZ_32MBYTE	(0x00000018) +#define MCF_SDRAMC_SDCS_CSSZ_64MBYTE	(0x00000019) +#define MCF_SDRAMC_SDCS_CSSZ_128MBYTE	(0x0000001A) +#define MCF_SDRAMC_SDCS_CSSZ_256MBYTE	(0x0000001B) +#define MCF_SDRAMC_SDCS_CSSZ_512MBYTE	(0x0000001C) +#define MCF_SDRAMC_SDCS_CSSZ_1GBYTE	(0x0000001D) +#define MCF_SDRAMC_SDCS_CSSZ_2GBYTE	(0x0000001E) +#define MCF_SDRAMC_SDCS_CSSZ_4GBYTE	(0x0000001F) + +/* + * Edge Port Module (EPORT) + */ +#define MCFEPORT_EPPAR                (0xFC094000) +#define MCFEPORT_EPDDR                (0xFC094002) +#define MCFEPORT_EPIER                (0xFC094003) +#define MCFEPORT_EPDR                 (0xFC094004) +#define MCFEPORT_EPPDR                (0xFC094005) +#define MCFEPORT_EPFR                 (0xFC094006) + +/********************************************************************/ +#endif	/* m53xxsim_h */ diff --git a/arch/m68k/include/asm/m5407sim.h b/arch/m68k/include/asm/m5407sim.h index c399abbf953..a7550bc5cd1 100644 --- a/arch/m68k/include/asm/m5407sim.h +++ b/arch/m68k/include/asm/m5407sim.h @@ -14,74 +14,97 @@  #define	m5407sim_h  /****************************************************************************/ +#define	CPU_NAME		"COLDFIRE(m5407)" +#define	CPU_INSTR_PER_JIFFY	3 +#define	MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m54xxacr.h> +  /*   *	Define the 5407 SIM register set addresses.   */ -#define	MCFSIM_RSR		0x00		/* Reset Status reg (r/w) */ -#define	MCFSIM_SYPCR		0x01		/* System Protection reg (r/w)*/ -#define	MCFSIM_SWIVR		0x02		/* SW Watchdog intr reg (r/w) */ -#define	MCFSIM_SWSR		0x03		/* SW Watchdog service (r/w) */ -#define	MCFSIM_PAR		0x04		/* Pin Assignment reg (r/w) */ -#define	MCFSIM_IRQPAR		0x06		/* Interrupt Assignment reg (r/w) */ -#define	MCFSIM_PLLCR		0x08		/* PLL Controll Reg*/ -#define	MCFSIM_MPARK		0x0C		/* BUS Master Control Reg*/ -#define	MCFSIM_IPR		0x40		/* Interrupt Pend reg (r/w) */ -#define	MCFSIM_IMR		0x44		/* Interrupt Mask reg (r/w) */ -#define	MCFSIM_AVR		0x4b		/* Autovector Ctrl reg (r/w) */ -#define	MCFSIM_ICR0		0x4c		/* Intr Ctrl reg 0 (r/w) */ -#define	MCFSIM_ICR1		0x4d		/* Intr Ctrl reg 1 (r/w) */ -#define	MCFSIM_ICR2		0x4e		/* Intr Ctrl reg 2 (r/w) */ -#define	MCFSIM_ICR3		0x4f		/* Intr Ctrl reg 3 (r/w) */ -#define	MCFSIM_ICR4		0x50		/* Intr Ctrl reg 4 (r/w) */ -#define	MCFSIM_ICR5		0x51		/* Intr Ctrl reg 5 (r/w) */ -#define	MCFSIM_ICR6		0x52		/* Intr Ctrl reg 6 (r/w) */ -#define	MCFSIM_ICR7		0x53		/* Intr Ctrl reg 7 (r/w) */ -#define	MCFSIM_ICR8		0x54		/* Intr Ctrl reg 8 (r/w) */ -#define	MCFSIM_ICR9		0x55		/* Intr Ctrl reg 9 (r/w) */ -#define	MCFSIM_ICR10		0x56		/* Intr Ctrl reg 10 (r/w) */ -#define	MCFSIM_ICR11		0x57		/* Intr Ctrl reg 11 (r/w) */ - -#define MCFSIM_CSAR0		0x80		/* CS 0 Address 0 reg (r/w) */ -#define MCFSIM_CSMR0		0x84		/* CS 0 Mask 0 reg (r/w) */ -#define MCFSIM_CSCR0		0x8a		/* CS 0 Control reg (r/w) */ -#define MCFSIM_CSAR1		0x8c		/* CS 1 Address reg (r/w) */ -#define MCFSIM_CSMR1		0x90		/* CS 1 Mask reg (r/w) */ -#define MCFSIM_CSCR1		0x96		/* CS 1 Control reg (r/w) */ - -#define MCFSIM_CSAR2		0x98		/* CS 2 Address reg (r/w) */ -#define MCFSIM_CSMR2		0x9c		/* CS 2 Mask reg (r/w) */ -#define MCFSIM_CSCR2		0xa2		/* CS 2 Control reg (r/w) */ -#define MCFSIM_CSAR3		0xa4		/* CS 3 Address reg (r/w) */ -#define MCFSIM_CSMR3		0xa8		/* CS 3 Mask reg (r/w) */ -#define MCFSIM_CSCR3		0xae		/* CS 3 Control reg (r/w) */ -#define MCFSIM_CSAR4		0xb0		/* CS 4 Address reg (r/w) */ -#define MCFSIM_CSMR4		0xb4		/* CS 4 Mask reg (r/w) */ -#define MCFSIM_CSCR4		0xba		/* CS 4 Control reg (r/w) */ -#define MCFSIM_CSAR5		0xbc		/* CS 5 Address reg (r/w) */ -#define MCFSIM_CSMR5		0xc0		/* CS 5 Mask reg (r/w) */ -#define MCFSIM_CSCR5		0xc6		/* CS 5 Control reg (r/w) */ -#define MCFSIM_CSAR6		0xc8		/* CS 6 Address reg (r/w) */ -#define MCFSIM_CSMR6		0xcc		/* CS 6 Mask reg (r/w) */ -#define MCFSIM_CSCR6		0xd2		/* CS 6 Control reg (r/w) */ -#define MCFSIM_CSAR7		0xd4		/* CS 7 Address reg (r/w) */ -#define MCFSIM_CSMR7		0xd8		/* CS 7 Mask reg (r/w) */ -#define MCFSIM_CSCR7		0xde		/* CS 7 Control reg (r/w) */ - -#define MCFSIM_DCR		0x100		/* DRAM Control reg (r/w) */ -#define MCFSIM_DACR0		0x108		/* DRAM 0 Addr and Ctrl (r/w) */ -#define MCFSIM_DMR0		0x10c		/* DRAM 0 Mask reg (r/w) */ -#define MCFSIM_DACR1		0x110		/* DRAM 1 Addr and Ctrl (r/w) */ -#define MCFSIM_DMR1		0x114		/* DRAM 1 Mask reg (r/w) */ +#define	MCFSIM_RSR		(MCF_MBAR + 0x00)	/* Reset Status */ +#define	MCFSIM_SYPCR		(MCF_MBAR + 0x01)	/* System Protection */ +#define	MCFSIM_SWIVR		(MCF_MBAR + 0x02)	/* SW Watchdog intr */ +#define	MCFSIM_SWSR		(MCF_MBAR + 0x03)	/* SW Watchdog service*/ +#define	MCFSIM_PAR		(MCF_MBAR + 0x04)	/* Pin Assignment */ +#define	MCFSIM_IRQPAR		(MCF_MBAR + 0x06)	/* Intr Assignment */ +#define	MCFSIM_PLLCR		(MCF_MBAR + 0x08)	/* PLL Ctrl */ +#define	MCFSIM_MPARK		(MCF_MBAR + 0x0C)	/* BUS Master Ctrl */ +#define	MCFSIM_IPR		(MCF_MBAR + 0x40)	/* Interrupt Pending */ +#define	MCFSIM_IMR		(MCF_MBAR + 0x44)	/* Interrupt Mask */ +#define	MCFSIM_AVR		(MCF_MBAR + 0x4b)	/* Autovector Ctrl */ +#define	MCFSIM_ICR0		(MCF_MBAR + 0x4c)	/* Intr Ctrl reg 0 */ +#define	MCFSIM_ICR1		(MCF_MBAR + 0x4d)	/* Intr Ctrl reg 1 */ +#define	MCFSIM_ICR2		(MCF_MBAR + 0x4e)	/* Intr Ctrl reg 2 */ +#define	MCFSIM_ICR3		(MCF_MBAR + 0x4f)	/* Intr Ctrl reg 3 */ +#define	MCFSIM_ICR4		(MCF_MBAR + 0x50)	/* Intr Ctrl reg 4 */ +#define	MCFSIM_ICR5		(MCF_MBAR + 0x51)	/* Intr Ctrl reg 5 */ +#define	MCFSIM_ICR6		(MCF_MBAR + 0x52)	/* Intr Ctrl reg 6 */ +#define	MCFSIM_ICR7		(MCF_MBAR + 0x53)	/* Intr Ctrl reg 7 */ +#define	MCFSIM_ICR8		(MCF_MBAR + 0x54)	/* Intr Ctrl reg 8 */ +#define	MCFSIM_ICR9		(MCF_MBAR + 0x55)	/* Intr Ctrl reg 9 */ +#define	MCFSIM_ICR10		(MCF_MBAR + 0x56)	/* Intr Ctrl reg 10 */ +#define	MCFSIM_ICR11		(MCF_MBAR + 0x57)	/* Intr Ctrl reg 11 */ + +#define MCFSIM_CSAR0		(MCF_MBAR + 0x80)	/* CS 0 Address reg */ +#define MCFSIM_CSMR0		(MCF_MBAR + 0x84)	/* CS 0 Mask reg */ +#define MCFSIM_CSCR0		(MCF_MBAR + 0x8a)	/* CS 0 Control reg */ +#define MCFSIM_CSAR1		(MCF_MBAR + 0x8c)	/* CS 1 Address reg */ +#define MCFSIM_CSMR1		(MCF_MBAR + 0x90)	/* CS 1 Mask reg */ +#define MCFSIM_CSCR1		(MCF_MBAR + 0x96)	/* CS 1 Control reg */ + +#define MCFSIM_CSAR2		(MCF_MBAR + 0x98)	/* CS 2 Address reg */ +#define MCFSIM_CSMR2		(MCF_MBAR + 0x9c)	/* CS 2 Mask reg */ +#define MCFSIM_CSCR2		(MCF_MBAR + 0xa2)	/* CS 2 Control reg */ +#define MCFSIM_CSAR3		(MCF_MBAR + 0xa4)	/* CS 3 Address reg */ +#define MCFSIM_CSMR3		(MCF_MBAR + 0xa8)	/* CS 3 Mask reg */ +#define MCFSIM_CSCR3		(MCF_MBAR + 0xae)	/* CS 3 Control reg */ +#define MCFSIM_CSAR4		(MCF_MBAR + 0xb0)	/* CS 4 Address reg */ +#define MCFSIM_CSMR4		(MCF_MBAR + 0xb4)	/* CS 4 Mask reg */ +#define MCFSIM_CSCR4		(MCF_MBAR + 0xba)	/* CS 4 Control reg */ +#define MCFSIM_CSAR5		(MCF_MBAR + 0xbc)	/* CS 5 Address reg */ +#define MCFSIM_CSMR5		(MCF_MBAR + 0xc0)	/* CS 5 Mask reg */ +#define MCFSIM_CSCR5		(MCF_MBAR + 0xc6)	/* CS 5 Control reg */ +#define MCFSIM_CSAR6		(MCF_MBAR + 0xc8)	/* CS 6 Address reg */ +#define MCFSIM_CSMR6		(MCF_MBAR + 0xcc)	/* CS 6 Mask reg */ +#define MCFSIM_CSCR6		(MCF_MBAR + 0xd2)	/* CS 6 Control reg */ +#define MCFSIM_CSAR7		(MCF_MBAR + 0xd4)	/* CS 7 Address reg */ +#define MCFSIM_CSMR7		(MCF_MBAR + 0xd8)	/* CS 7 Mask reg */ +#define MCFSIM_CSCR7		(MCF_MBAR + 0xde)	/* CS 7 Control reg */ + +#define MCFSIM_DCR		(MCF_MBAR + 0x100)	/* DRAM Control */ +#define MCFSIM_DACR0		(MCF_MBAR + 0x108)	/* DRAM 0 Addr/Ctrl */ +#define MCFSIM_DMR0		(MCF_MBAR + 0x10c)	/* DRAM 0 Mask */ +#define MCFSIM_DACR1		(MCF_MBAR + 0x110)	/* DRAM 1 Addr/Ctrl */ +#define MCFSIM_DMR1		(MCF_MBAR + 0x114)	/* DRAM 1 Mask */ + +/* + *	Timer module. + */ +#define MCFTIMER_BASE1		(MCF_MBAR + 0x140)	/* Base of TIMER1 */ +#define MCFTIMER_BASE2		(MCF_MBAR + 0x180)	/* Base of TIMER2 */ + +#define MCFUART_BASE0		(MCF_MBAR + 0x1c0)	/* Base address UART0 */ +#define MCFUART_BASE1		(MCF_MBAR + 0x200)	/* Base address UART1 */  #define	MCFSIM_PADDR		(MCF_MBAR + 0x244)  #define	MCFSIM_PADAT		(MCF_MBAR + 0x248)  /* + *	DMA unit base addresses. + */ +#define MCFDMA_BASE0		(MCF_MBAR + 0x300)	/* Base address DMA 0 */ +#define MCFDMA_BASE1		(MCF_MBAR + 0x340)	/* Base address DMA 1 */ +#define MCFDMA_BASE2		(MCF_MBAR + 0x380)	/* Base address DMA 2 */ +#define MCFDMA_BASE3		(MCF_MBAR + 0x3C0)	/* Base address DMA 3 */ + +/*   * Generic GPIO support   */ -#define MCFGPIO_PIN_MAX			16 -#define MCFGPIO_IRQ_MAX			-1 -#define MCFGPIO_IRQ_VECBASE		-1 +#define MCFGPIO_PIN_MAX		16 +#define MCFGPIO_IRQ_MAX		-1 +#define MCFGPIO_IRQ_VECBASE	-1  /*   *	Some symbol defines for the above... @@ -107,49 +130,17 @@  /*   *       Defines for the IRQPAR Register   */ -#define IRQ5_LEVEL4	0x80 -#define IRQ3_LEVEL6	0x40 -#define IRQ1_LEVEL2	0x20 +#define IRQ5_LEVEL4		0x80 +#define IRQ3_LEVEL6		0x40 +#define IRQ1_LEVEL2		0x20  /*   *	Define system peripheral IRQ usage.   */  #define	MCF_IRQ_TIMER		30		/* Timer0, Level 6 */  #define	MCF_IRQ_PROFILER	31		/* Timer1, Level 7 */ - -/* - *	Define the Cache register flags. - */ -#define	CACR_DEC		0x80000000	/* Enable data cache */ -#define	CACR_DWP		0x40000000	/* Data write protection */ -#define	CACR_DESB		0x20000000	/* Enable data store buffer */ -#define	CACR_DDPI		0x10000000	/* Disable CPUSHL */ -#define	CACR_DHCLK		0x08000000	/* Half data cache lock mode */ -#define	CACR_DDCM_WT		0x00000000	/* Write through cache*/ -#define	CACR_DDCM_CP		0x02000000	/* Copyback cache */ -#define	CACR_DDCM_P		0x04000000	/* No cache, precise */ -#define	CACR_DDCM_IMP		0x06000000	/* No cache, imprecise */ -#define	CACR_DCINVA		0x01000000	/* Invalidate data cache */ -#define	CACR_BEC		0x00080000	/* Enable branch cache */ -#define	CACR_BCINVA		0x00040000	/* Invalidate branch cache */ -#define	CACR_IEC		0x00008000	/* Enable instruction cache */ -#define	CACR_DNFB		0x00002000	/* Inhibited fill buffer */ -#define	CACR_IDPI		0x00001000	/* Disable CPUSHL */ -#define	CACR_IHLCK		0x00000800	/* Intruction cache half lock */ -#define	CACR_IDCM		0x00000400	/* Intruction cache inhibit */ -#define	CACR_ICINVA		0x00000100	/* Invalidate instr cache */ - -#define	ACR_BASE_POS		24		/* Address Base */ -#define	ACR_MASK_POS		16		/* Address Mask */ -#define	ACR_ENABLE		0x00008000	/* Enable address */ -#define	ACR_USER		0x00000000	/* User mode access only */ -#define	ACR_SUPER		0x00002000	/* Supervisor mode only */ -#define	ACR_ANY			0x00004000	/* Match any access mode */ -#define	ACR_CM_WT		0x00000000	/* Write through mode */ -#define	ACR_CM_CP		0x00000020	/* Copyback mode */ -#define	ACR_CM_OFF_PRE		0x00000040	/* No cache, precise */ -#define	ACR_CM_OFF_IMP		0x00000060	/* No cache, imprecise */ -#define	ACR_WPROTECT		0x00000004	/* Write protect */ +#define	MCF_IRQ_UART0		73		/* UART0 */ +#define	MCF_IRQ_UART1		74		/* UART1 */  /****************************************************************************/  #endif	/* m5407sim_h */ diff --git a/arch/m68k/include/asm/m5441xsim.h b/arch/m68k/include/asm/m5441xsim.h new file mode 100644 index 00000000000..cc798ab9524 --- /dev/null +++ b/arch/m68k/include/asm/m5441xsim.h @@ -0,0 +1,276 @@ +/* + *	m5441xsim.h -- Coldfire 5441x register definitions + * + *	(C) Copyright 2012, Steven King <sfking@fdwdc.com> +*/ + +#ifndef m5441xsim_h +#define m5441xsim_h + +#define CPU_NAME		"COLDFIRE(m5441x)" +#define CPU_INSTR_PER_JIFFY	2 +#define MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m54xxacr.h> + +/* + *  Reset Controller Module. + */ + +#define	MCF_RCR			0xec090000 +#define	MCF_RSR			0xec090001 + +#define	MCF_RCR_SWRESET		0x80		/* Software reset bit */ +#define	MCF_RCR_FRCSTOUT	0x40		/* Force external reset */ + +/* + *  Interrupt Controller Modules. + */ +/* the 5441x have 3 interrupt controllers, each control 64 interrupts */ +#define MCFINT_VECBASE		64 +#define MCFINT0_VECBASE		MCFINT_VECBASE +#define MCFINT1_VECBASE		(MCFINT0_VECBASE + 64) +#define MCFINT2_VECBASE		(MCFINT1_VECBASE + 64) + +/* interrupt controller 0 */ +#define MCFINTC0_SIMR		0xfc04801c +#define MCFINTC0_CIMR		0xfc04801d +#define	MCFINTC0_ICR0		0xfc048040 +/* interrupt controller 1 */ +#define MCFINTC1_SIMR		0xfc04c01c +#define MCFINTC1_CIMR		0xfc04c01d +#define	MCFINTC1_ICR0		0xfc04c040 +/* interrupt controller 2 */ +#define MCFINTC2_SIMR		0xfc05001c +#define MCFINTC2_CIMR		0xfc05001d +#define	MCFINTC2_ICR0		0xfc050040 + +/* on interrupt controller 0 */ +#define MCFINT0_EPORT0		1 +#define MCFINT0_UART0		26 +#define MCFINT0_UART1		27 +#define MCFINT0_UART2		28 +#define MCFINT0_UART3		29 +#define MCFINT0_I2C0		30 +#define MCFINT0_DSPI0		31 + +#define MCFINT0_TIMER0		32 +#define MCFINT0_TIMER1		33 +#define MCFINT0_TIMER2		34 +#define MCFINT0_TIMER3		35 + +#define MCFINT0_FECRX0		36 +#define MCFINT0_FECTX0		40 +#define MCFINT0_FECENTC0	42 + +#define MCFINT0_FECRX1		49 +#define MCFINT0_FECTX1		53 +#define MCFINT0_FECENTC1	55 + +/* on interrupt controller 1 */ +#define MCFINT1_UART4		48 +#define MCFINT1_UART5		49 +#define MCFINT1_UART6		50 +#define MCFINT1_UART7		51 +#define MCFINT1_UART8		52 +#define MCFINT1_UART9		53 +#define MCFINT1_DSPI1		54 +#define MCFINT1_DSPI2		55 +#define MCFINT1_DSPI3		56 +#define MCFINT1_I2C1		57 +#define MCFINT1_I2C2		58 +#define MCFINT1_I2C3		59 +#define MCFINT1_I2C4		60 +#define MCFINT1_I2C5		61 + +/* on interrupt controller 2 */ +#define MCFINT2_PIT0		13 +#define MCFINT2_PIT1		14 +#define MCFINT2_PIT2		15 +#define MCFINT2_PIT3		16 +#define MCFINT2_RTC		26 + +/* + *  PIT timer module. + */ +#define	MCFPIT_BASE0		0xFC080000	/* Base address of TIMER0 */ +#define	MCFPIT_BASE1		0xFC084000	/* Base address of TIMER1 */ +#define	MCFPIT_BASE2		0xFC088000	/* Base address of TIMER2 */ +#define	MCFPIT_BASE3		0xFC08C000	/* Base address of TIMER3 */ + + +#define MCF_IRQ_PIT1		(MCFINT2_VECBASE + MCFINT2_PIT1) + +/* + * Power Management + */ +#define MCFPM_WCR		0xfc040013 +#define MCFPM_PPMSR0		0xfc04002c +#define MCFPM_PPMCR0		0xfc04002d +#define MCFPM_PPMSR1		0xfc04002e +#define MCFPM_PPMCR1		0xfc04002f +#define MCFPM_PPMHR0		0xfc040030 +#define MCFPM_PPMLR0		0xfc040034 +#define MCFPM_PPMHR1		0xfc040038 +#define MCFPM_PPMLR1		0xfc04003c +#define MCFPM_LPCR		0xec090007 +/* + *  UART module. + */ +#define MCFUART_BASE0		0xfc060000	/* Base address of UART0 */ +#define MCFUART_BASE1		0xfc064000	/* Base address of UART1 */ +#define MCFUART_BASE2		0xfc068000	/* Base address of UART2 */ +#define MCFUART_BASE3		0xfc06c000	/* Base address of UART3 */ +#define MCFUART_BASE4		0xec060000	/* Base address of UART4 */ +#define MCFUART_BASE5		0xec064000	/* Base address of UART5 */ +#define MCFUART_BASE6		0xec068000	/* Base address of UART6 */ +#define MCFUART_BASE7		0xec06c000	/* Base address of UART7 */ +#define MCFUART_BASE8		0xec070000	/* Base address of UART8 */ +#define MCFUART_BASE9		0xec074000	/* Base address of UART9 */ + +#define MCF_IRQ_UART0		(MCFINT0_VECBASE + MCFINT0_UART0) +#define MCF_IRQ_UART1		(MCFINT0_VECBASE + MCFINT0_UART1) +#define MCF_IRQ_UART2		(MCFINT0_VECBASE + MCFINT0_UART2) +#define MCF_IRQ_UART3		(MCFINT0_VECBASE + MCFINT0_UART3) +#define MCF_IRQ_UART4		(MCFINT1_VECBASE + MCFINT1_UART4) +#define MCF_IRQ_UART5		(MCFINT1_VECBASE + MCFINT1_UART5) +#define MCF_IRQ_UART6		(MCFINT1_VECBASE + MCFINT1_UART6) +#define MCF_IRQ_UART7		(MCFINT1_VECBASE + MCFINT1_UART7) +#define MCF_IRQ_UART8		(MCFINT1_VECBASE + MCFINT1_UART8) +#define MCF_IRQ_UART9		(MCFINT1_VECBASE + MCFINT1_UART9) +/* + *  FEC modules. + */ +#define MCFFEC_BASE0		0xfc0d4000 +#define MCFFEC_SIZE0		0x800 +#define MCF_IRQ_FECRX0		(MCFINT0_VECBASE + MCFINT0_FECRX0) +#define MCF_IRQ_FECTX0		(MCFINT0_VECBASE + MCFINT0_FECTX0) +#define MCF_IRQ_FECENTC0	(MCFINT0_VECBASE + MCFINT0_FECENTC0) + +#define MCFFEC_BASE1		0xfc0d8000 +#define MCFFEC_SIZE1		0x800 +#define MCF_IRQ_FECRX1		(MCFINT0_VECBASE + MCFINT0_FECRX1) +#define MCF_IRQ_FECTX1		(MCFINT0_VECBASE + MCFINT0_FECTX1) +#define MCF_IRQ_FECENTC1	(MCFINT0_VECBASE + MCFINT0_FECENTC1) +/* + *  I2C modules. + */ +#define MCFI2C_BASE0		0xfc058000 +#define MCFI2C_SIZE0		0x20 +#define MCFI2C_BASE1		0xfc038000 +#define MCFI2C_SIZE1		0x20 +#define MCFI2C_BASE2		0xec010000 +#define MCFI2C_SIZE2		0x20 +#define MCFI2C_BASE3		0xec014000 +#define MCFI2C_SIZE3		0x20 +#define MCFI2C_BASE4		0xec018000 +#define MCFI2C_SIZE4		0x20 +#define MCFI2C_BASE5		0xec01c000 +#define MCFI2C_SIZE5		0x20 + +#define MCF_IRQ_I2C0		(MCFINT0_VECBASE + MCFINT0_I2C0) +#define MCF_IRQ_I2C1		(MCFINT1_VECBASE + MCFINT1_I2C1) +#define MCF_IRQ_I2C2		(MCFINT1_VECBASE + MCFINT1_I2C2) +#define MCF_IRQ_I2C3		(MCFINT1_VECBASE + MCFINT1_I2C3) +#define MCF_IRQ_I2C4		(MCFINT1_VECBASE + MCFINT1_I2C4) +#define MCF_IRQ_I2C5		(MCFINT1_VECBASE + MCFINT1_I2C5) +/* + *  EPORT Module. + */ +#define MCFEPORT_EPPAR		0xfc090000 +#define MCFEPORT_EPIER		0xfc090003 +#define MCFEPORT_EPFR		0xfc090006 +/* + *  RTC Module. + */ +#define MCFRTC_BASE		0xfc0a8000 +#define MCFRTC_SIZE		(0xfc0a8840 - 0xfc0a8000) +#define MCF_IRQ_RTC		(MCFINT2_VECBASE + MCFINT2_RTC) + +/* + *  GPIO Module. + */ +#define MCFGPIO_PODR_A		0xec094000 +#define MCFGPIO_PODR_B		0xec094001 +#define MCFGPIO_PODR_C		0xec094002 +#define MCFGPIO_PODR_D		0xec094003 +#define MCFGPIO_PODR_E		0xec094004 +#define MCFGPIO_PODR_F		0xec094005 +#define MCFGPIO_PODR_G		0xec094006 +#define MCFGPIO_PODR_H		0xec094007 +#define MCFGPIO_PODR_I		0xec094008 +#define MCFGPIO_PODR_J		0xec094009 +#define MCFGPIO_PODR_K		0xec09400a + +#define MCFGPIO_PDDR_A		0xec09400c +#define MCFGPIO_PDDR_B		0xec09400d +#define MCFGPIO_PDDR_C		0xec09400e +#define MCFGPIO_PDDR_D		0xec09400f +#define MCFGPIO_PDDR_E		0xec094010 +#define MCFGPIO_PDDR_F		0xec094011 +#define MCFGPIO_PDDR_G		0xec094012 +#define MCFGPIO_PDDR_H		0xec094013 +#define MCFGPIO_PDDR_I		0xec094014 +#define MCFGPIO_PDDR_J		0xec094015 +#define MCFGPIO_PDDR_K		0xec094016 + +#define MCFGPIO_PPDSDR_A	0xec094018 +#define MCFGPIO_PPDSDR_B	0xec094019 +#define MCFGPIO_PPDSDR_C	0xec09401a +#define MCFGPIO_PPDSDR_D	0xec09401b +#define MCFGPIO_PPDSDR_E	0xec09401c +#define MCFGPIO_PPDSDR_F	0xec09401d +#define MCFGPIO_PPDSDR_G	0xec09401e +#define MCFGPIO_PPDSDR_H	0xec09401f +#define MCFGPIO_PPDSDR_I	0xec094020 +#define MCFGPIO_PPDSDR_J	0xec094021 +#define MCFGPIO_PPDSDR_K	0xec094022 + +#define MCFGPIO_PCLRR_A		0xec094024 +#define MCFGPIO_PCLRR_B		0xec094025 +#define MCFGPIO_PCLRR_C		0xec094026 +#define MCFGPIO_PCLRR_D		0xec094027 +#define MCFGPIO_PCLRR_E		0xec094028 +#define MCFGPIO_PCLRR_F		0xec094029 +#define MCFGPIO_PCLRR_G		0xec09402a +#define MCFGPIO_PCLRR_H		0xec09402b +#define MCFGPIO_PCLRR_I		0xec09402c +#define MCFGPIO_PCLRR_J		0xec09402d +#define MCFGPIO_PCLRR_K		0xec09402e + +#define MCFGPIO_PAR_FBCTL	0xec094048 +#define MCFGPIO_PAR_BE		0xec094049 +#define MCFGPIO_PAR_CS		0xec09404a +#define MCFGPIO_PAR_CANI2C	0xec09404b +#define MCFGPIO_PAR_IRQ0H	0xec09404c +#define MCFGPIO_PAR_IRQ0L	0xec09404d +#define MCFGPIO_PAR_DSPIOWH	0xec09404e +#define MCFGPIO_PAR_DSPIOWL	0xec09404f +#define MCFGPIO_PAR_TIMER	0xec094050 +#define MCFGPIO_PAR_UART2	0xec094051 +#define MCFGPIO_PAR_UART1	0xec094052 +#define MCFGPIO_PAR_UART0	0xec094053 +#define MCFGPIO_PAR_SDHCH	0xec094054 +#define MCFGPIO_PAR_SDHCL	0xec094055 +#define MCFGPIO_PAR_SIMP0H	0xec094056 +#define MCFGPIO_PAR_SIMP0L	0xec094057 +#define MCFGPIO_PAR_SSI0H	0xec094058 +#define MCFGPIO_PAR_SSI0L	0xec094059 +#define MCFGPIO_PAR_DEBUGH1	0xec09405a +#define MCFGPIO_PAR_DEBUGH0	0xec09405b +#define MCFGPIO_PAR_DEBUGl	0xec09405c +#define MCFGPIO_PAR_FEC		0xec09405e + +/* generalization for generic gpio support */ +#define MCFGPIO_PODR		MCFGPIO_PODR_A +#define MCFGPIO_PDDR		MCFGPIO_PDDR_A +#define MCFGPIO_PPDR		MCFGPIO_PPDSDR_A +#define MCFGPIO_SETR		MCFGPIO_PPDSDR_A +#define MCFGPIO_CLRR		MCFGPIO_PCLRR_A + +#define MCFGPIO_IRQ_MIN		17 +#define MCFGPIO_IRQ_MAX		24 +#define MCFGPIO_IRQ_VECBASE	(MCFINT_VECBASE - MCFGPIO_IRQ_MIN) +#define MCFGPIO_PIN_MAX		87 + +#endif /* m5441xsim_h */ diff --git a/arch/m68k/include/asm/m548xsim.h b/arch/m68k/include/asm/m548xsim.h deleted file mode 100644 index 149135ef30d..00000000000 --- a/arch/m68k/include/asm/m548xsim.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - *	m548xsim.h -- ColdFire 547x/548x System Integration Unit support. - */ - -#ifndef	m548xsim_h -#define m548xsim_h - -#define MCFINT_VECBASE      64 - -/* - *      Interrupt Controller Registers - */ -#define MCFICM_INTC0		0x0700		/* Base for Interrupt Ctrl 0 */ -#define MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */ -#define MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */ -#define MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */ -#define MCFINTC_IMRL		0x0c		/* Interrupt mask 1-31 */ -#define MCFINTC_INTFRCH		0x10		/* Interrupt force 32-63 */ -#define MCFINTC_INTFRCL		0x14		/* Interrupt force 1-31 */ -#define MCFINTC_IRLR		0x18		/* */ -#define MCFINTC_IACKL		0x19		/* */ -#define MCFINTC_ICR0		0x40		/* Base ICR register */ - -/* - *	Define system peripheral IRQ usage. - */ -#define MCF_IRQ_TIMER		(64 + 54)	/* Slice Timer 0 */ -#define MCF_IRQ_PROFILER	(64 + 53)	/* Slice Timer 1 */ - -/* - *	Generic GPIO support - */ -#define MCFGPIO_PIN_MAX		0	/* I am too lazy to count */ -#define MCFGPIO_IRQ_MAX		-1 -#define MCFGPIO_IRQ_VECBASE	-1 - -/* - *	Some PSC related definitions - */ -#define MCF_PAR_PSC(x)		(0x000A4F-((x)&0x3)) -#define MCF_PAR_SDA		(0x0008) -#define MCF_PAR_SCL		(0x0004) -#define MCF_PAR_PSC_TXD		(0x04) -#define MCF_PAR_PSC_RXD		(0x08) -#define MCF_PAR_PSC_RTS(x)	(((x)&0x03)<<4) -#define MCF_PAR_PSC_CTS(x)	(((x)&0x03)<<6) -#define MCF_PAR_PSC_CTS_GPIO	(0x00) -#define MCF_PAR_PSC_CTS_BCLK	(0x80) -#define MCF_PAR_PSC_CTS_CTS	(0xC0) -#define MCF_PAR_PSC_RTS_GPIO    (0x00) -#define MCF_PAR_PSC_RTS_FSYNC	(0x20) -#define MCF_PAR_PSC_RTS_RTS	(0x30) -#define MCF_PAR_PSC_CANRX	(0x40) - -#endif	/* m548xsim_h */ diff --git a/arch/m68k/include/asm/m54xxacr.h b/arch/m68k/include/asm/m54xxacr.h new file mode 100644 index 00000000000..6d13cae44af --- /dev/null +++ b/arch/m68k/include/asm/m54xxacr.h @@ -0,0 +1,136 @@ +/* + * Bit definitions for the MCF54xx ACR and CACR registers. + */ + +#ifndef	m54xxacr_h +#define m54xxacr_h + +/* + *	Define the Cache register flags. + */ +#define CACR_DEC	0x80000000	/* Enable data cache */ +#define CACR_DWP	0x40000000	/* Data write protection */ +#define CACR_DESB	0x20000000	/* Enable data store buffer */ +#define CACR_DDPI	0x10000000	/* Disable invalidation by CPUSHL */ +#define CACR_DHCLK	0x08000000	/* Half data cache lock mode */ +#define CACR_DDCM_WT	0x00000000	/* Write through cache*/ +#define CACR_DDCM_CP	0x02000000	/* Copyback cache */ +#define CACR_DDCM_P	0x04000000	/* No cache, precise */ +#define CACR_DDCM_IMP	0x06000000	/* No cache, imprecise */ +#define CACR_DCINVA	0x01000000	/* Invalidate data cache */ +#define CACR_BEC	0x00080000	/* Enable branch cache */ +#define CACR_BCINVA	0x00040000	/* Invalidate branch cache */ +#define CACR_IEC	0x00008000	/* Enable instruction cache */ +#define CACR_DNFB	0x00002000	/* Inhibited fill buffer */ +#define CACR_IDPI	0x00001000	/* Disable CPUSHL */ +#define CACR_IHLCK	0x00000800	/* Intruction cache half lock */ +#define CACR_IDCM	0x00000400	/* Intruction cache inhibit */ +#define CACR_ICINVA	0x00000100	/* Invalidate instr cache */ +#define CACR_EUSP	0x00000020	/* Enable separate user a7 */ + +#define ACR_BASE_POS	24		/* Address Base */ +#define ACR_MASK_POS	16		/* Address Mask */ +#define ACR_ENABLE	0x00008000	/* Enable address */ +#define ACR_USER	0x00000000	/* User mode access only */ +#define ACR_SUPER	0x00002000	/* Supervisor mode only */ +#define ACR_ANY		0x00004000	/* Match any access mode */ +#define ACR_CM_WT	0x00000000	/* Write through mode */ +#define ACR_CM_CP	0x00000020	/* Copyback mode */ +#define ACR_CM_OFF_PRE	0x00000040	/* No cache, precise */ +#define ACR_CM_OFF_IMP	0x00000060	/* No cache, imprecise */ +#define ACR_CM		0x00000060	/* Cache mode mask */ +#define ACR_SP		0x00000008	/* Supervisor protect */ +#define ACR_WPROTECT	0x00000004	/* Write protect */ + +#define ACR_BA(x)	((x) & 0xff000000) +#define ACR_ADMSK(x)	((((x) - 1) & 0xff000000) >> 8) + +#if defined(CONFIG_M5407) + +#define ICACHE_SIZE 0x4000	/* instruction - 16k */ +#define DCACHE_SIZE 0x2000	/* data - 8k */ + +#elif defined(CONFIG_M54xx) + +#define ICACHE_SIZE 0x8000	/* instruction - 32k */ +#define DCACHE_SIZE 0x8000	/* data - 32k */ + +#elif defined(CONFIG_M5441x) + +#define ICACHE_SIZE 0x2000	/* instruction - 8k */ +#define DCACHE_SIZE 0x2000	/* data - 8k */ +#endif + +#define CACHE_LINE_SIZE 0x0010	/* 16 bytes */ +#define CACHE_WAYS 4		/* 4 ways */ + +#define ICACHE_SET_MASK	((ICACHE_SIZE / 64 - 1) << CACHE_WAYS) +#define DCACHE_SET_MASK	((DCACHE_SIZE / 64 - 1) << CACHE_WAYS) +#define ICACHE_MAX_ADDR	ICACHE_SET_MASK +#define DCACHE_MAX_ADDR	DCACHE_SET_MASK + +/* + *	Version 4 cores have a true harvard style separate instruction + *	and data cache. Enable data and instruction caches, also enable write + *	buffers and branch accelerator. + */ +/* attention : enabling CACR_DESB requires a "nop" to flush the store buffer */ +/* use '+' instead of '|' for assembler's sake */ + +	/* Enable data cache */ +	/* Enable data store buffer */ +	/* outside ACRs : No cache, precise */ +	/* Enable instruction+branch caches */ +#if defined(CONFIG_M5407) +#define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC) +#else +#define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC+CACR_EUSP) +#endif +#define CACHE_INIT (CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) + +#if defined(CONFIG_MMU) +/* + *	If running with the MMU enabled then we need to map the internal + *	register region as non-cacheable. And then we map all our RAM as + *	cacheable and supervisor access only. + */ +#define ACR0_MODE	(ACR_BA(CONFIG_MBAR)+ACR_ADMSK(0x1000000)+ \ +			 ACR_ENABLE+ACR_SUPER+ACR_CM_OFF_PRE+ACR_SP) +#if defined(CONFIG_CACHE_COPYBACK) +#define ACR1_MODE	(ACR_BA(CONFIG_RAMBASE)+ACR_ADMSK(CONFIG_RAMSIZE)+ \ +			 ACR_ENABLE+ACR_SUPER+ACR_SP+ACR_CM_CP) +#else +#define ACR1_MODE	(ACR_BA(CONFIG_RAMBASE)+ACR_ADMSK(CONFIG_RAMSIZE)+ \ +			 ACR_ENABLE+ACR_SUPER+ACR_SP+ACR_CM_WT) +#endif +#define ACR2_MODE	0 +#define ACR3_MODE	(ACR_BA(CONFIG_RAMBASE)+ACR_ADMSK(CONFIG_RAMSIZE)+ \ +			 ACR_ENABLE+ACR_SUPER+ACR_SP) + +#else + +/* + *	For the non-MMU enabled case we map all of RAM as cacheable. + */ +#if defined(CONFIG_CACHE_COPYBACK) +#define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_CP) +#else +#define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_WT) +#endif +#define INSN_CACHE_MODE (ACR_ENABLE+ACR_ANY) + +#define CACHE_INVALIDATE  (CACHE_MODE+CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) +#define CACHE_INVALIDATEI (CACHE_MODE+CACR_BCINVA+CACR_ICINVA) +#define CACHE_INVALIDATED (CACHE_MODE+CACR_DCINVA) +#define ACR0_MODE	(0x000f0000+DATA_CACHE_MODE) +#define ACR1_MODE	0 +#define ACR2_MODE	(0x000f0000+INSN_CACHE_MODE) +#define ACR3_MODE	0 + +#if ((DATA_CACHE_MODE & ACR_CM) == ACR_CM_CP) +/* Copyback cache mode must push dirty cache lines first */ +#define	CACHE_PUSH +#endif + +#endif /* CONFIG_MMU */ +#endif	/* m54xxacr_h */ diff --git a/arch/m68k/include/asm/m548xgpt.h b/arch/m68k/include/asm/m54xxgpt.h index c8ef158a1c4..0b69cd1ed0e 100644 --- a/arch/m68k/include/asm/m548xgpt.h +++ b/arch/m68k/include/asm/m54xxgpt.h @@ -1,13 +1,13 @@  /* - * File:	m548xgpt.h - * Purpose:	Register and bit definitions for the MCF548X + * File:	m54xxgpt.h + * Purpose:	Register and bit definitions for the MCF54XX   *   * Notes:   *   */ -#ifndef m548xgpt_h -#define m548xgpt_h +#ifndef m54xxgpt_h +#define m54xxgpt_h  /*********************************************************************  * @@ -16,26 +16,26 @@  *********************************************************************/  /* Register read/write macros */ -#define MCF_GPT_GMS0       0x000800 -#define MCF_GPT_GCIR0      0x000804 -#define MCF_GPT_GPWM0      0x000808 -#define MCF_GPT_GSR0       0x00080C -#define MCF_GPT_GMS1       0x000810 -#define MCF_GPT_GCIR1      0x000814 -#define MCF_GPT_GPWM1      0x000818 -#define MCF_GPT_GSR1       0x00081C -#define MCF_GPT_GMS2       0x000820 -#define MCF_GPT_GCIR2      0x000824 -#define MCF_GPT_GPWM2      0x000828 -#define MCF_GPT_GSR2       0x00082C -#define MCF_GPT_GMS3       0x000830 -#define MCF_GPT_GCIR3      0x000834 -#define MCF_GPT_GPWM3      0x000838 -#define MCF_GPT_GSR3       0x00083C -#define MCF_GPT_GMS(x)     (0x000800+((x)*0x010)) -#define MCF_GPT_GCIR(x)    (0x000804+((x)*0x010)) -#define MCF_GPT_GPWM(x)    (0x000808+((x)*0x010)) -#define MCF_GPT_GSR(x)     (0x00080C+((x)*0x010)) +#define MCF_GPT_GMS0       (MCF_MBAR + 0x000800) +#define MCF_GPT_GCIR0      (MCF_MBAR + 0x000804) +#define MCF_GPT_GPWM0      (MCF_MBAR + 0x000808) +#define MCF_GPT_GSR0       (MCF_MBAR + 0x00080C) +#define MCF_GPT_GMS1       (MCF_MBAR + 0x000810) +#define MCF_GPT_GCIR1      (MCF_MBAR + 0x000814) +#define MCF_GPT_GPWM1      (MCF_MBAR + 0x000818) +#define MCF_GPT_GSR1       (MCF_MBAR + 0x00081C) +#define MCF_GPT_GMS2       (MCF_MBAR + 0x000820) +#define MCF_GPT_GCIR2      (MCF_MBAR + 0x000824) +#define MCF_GPT_GPWM2      (MCF_MBAR + 0x000828) +#define MCF_GPT_GSR2       (MCF_MBAR + 0x00082C) +#define MCF_GPT_GMS3       (MCF_MBAR + 0x000830) +#define MCF_GPT_GCIR3      (MCF_MBAR + 0x000834) +#define MCF_GPT_GPWM3      (MCF_MBAR + 0x000838) +#define MCF_GPT_GSR3       (MCF_MBAR + 0x00083C) +#define MCF_GPT_GMS(x)     (MCF_MBAR + 0x000800 + ((x) * 0x010)) +#define MCF_GPT_GCIR(x)    (MCF_MBAR + 0x000804 + ((x) * 0x010)) +#define MCF_GPT_GPWM(x)    (MCF_MBAR + 0x000808 + ((x) * 0x010)) +#define MCF_GPT_GSR(x)     (MCF_MBAR + 0x00080C + ((x) * 0x010))  /* Bit definitions and macros for MCF_GPT_GMS */  #define MCF_GPT_GMS_TMS(x)         (((x)&0x00000007)<<0) @@ -59,11 +59,13 @@  #define MCF_GPT_GMS_GPIO_INPUT     (0x00000000)  #define MCF_GPT_GMS_GPIO_OUTLO     (0x00000020)  #define MCF_GPT_GMS_GPIO_OUTHI     (0x00000030) +#define MCF_GPT_GMS_GPIO_MASK      (0x00000030)  #define MCF_GPT_GMS_TMS_DISABLE    (0x00000000)  #define MCF_GPT_GMS_TMS_INCAPT     (0x00000001)  #define MCF_GPT_GMS_TMS_OUTCAPT    (0x00000002)  #define MCF_GPT_GMS_TMS_PWM        (0x00000003)  #define MCF_GPT_GMS_TMS_GPIO       (0x00000004) +#define MCF_GPT_GMS_TMS_MASK       (0x00000007)  /* Bit definitions and macros for MCF_GPT_GCIR */  #define MCF_GPT_GCIR_CNT(x)        (((x)&0x0000FFFF)<<0) @@ -85,4 +87,4 @@  /********************************************************************/ -#endif /* m548xgpt_h */ +#endif /* m54xxgpt_h */ diff --git a/arch/m68k/include/asm/m54xxpci.h b/arch/m68k/include/asm/m54xxpci.h new file mode 100644 index 00000000000..6fbf54f72f2 --- /dev/null +++ b/arch/m68k/include/asm/m54xxpci.h @@ -0,0 +1,138 @@ +/****************************************************************************/ + +/* + *	m54xxpci.h -- ColdFire 547x and 548x PCI bus support + * + *	(C) Copyright 2011,  Greg Ungerer <gerg@uclinux.org> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +/****************************************************************************/ +#ifndef	M54XXPCI_H +#define	M54XXPCI_H +/****************************************************************************/ + +/* + *	The core set of PCI support registers are mapped into the MBAR region. + */ +#define	PCIIDR		(CONFIG_MBAR + 0xb00)	/* PCI device/vendor ID */ +#define	PCISCR		(CONFIG_MBAR + 0xb04)	/* PCI status/command */ +#define	PCICCRIR	(CONFIG_MBAR + 0xb08)	/* PCI class/revision */ +#define	PCICR1		(CONFIG_MBAR + 0xb0c)	/* PCI configuration 1 */ +#define	PCIBAR0		(CONFIG_MBAR + 0xb10)	/* PCI base address 0 */ +#define	PCIBAR1		(CONFIG_MBAR + 0xb14)	/* PCI base address 1 */ +#define	PCICCPR		(CONFIG_MBAR + 0xb28)	/* PCI cardbus CIS pointer */ +#define	PCISID		(CONFIG_MBAR + 0xb2c)	/* PCI subsystem IDs */ +#define	PCIERBAR	(CONFIG_MBAR + 0xb30)	/* PCI expansion ROM */ +#define	PCICPR		(CONFIG_MBAR + 0xb34)	/* PCI capabilities pointer */ +#define	PCICR2		(CONFIG_MBAR + 0xb3c)	/* PCI configuration 2 */ + +#define	PCIGSCR		(CONFIG_MBAR + 0xb60)	/* Global status/control */ +#define	PCITBATR0	(CONFIG_MBAR + 0xb64)	/* Target base translation 0 */ +#define	PCITBATR1	(CONFIG_MBAR + 0xb68)	/* Target base translation 1 */ +#define	PCITCR		(CONFIG_MBAR + 0xb6c)	/* Target control */ +#define	PCIIW0BTAR	(CONFIG_MBAR + 0xb70)	/* Initiator window 0 */ +#define	PCIIW1BTAR	(CONFIG_MBAR + 0xb74)	/* Initiator window 1 */ +#define	PCIIW2BTAR	(CONFIG_MBAR + 0xb78)	/* Initiator window 2 */ +#define	PCIIWCR		(CONFIG_MBAR + 0xb80)	/* Initiator window config */ +#define	PCIICR		(CONFIG_MBAR + 0xb84)	/* Initiator control */ +#define	PCIISR		(CONFIG_MBAR + 0xb88)	/* Initiator status */ +#define	PCICAR		(CONFIG_MBAR + 0xbf8)	/* Configuration address */ + +#define	PCITPSR		(CONFIG_MBAR + 0x8400)	/* TX packet size */ +#define	PCITSAR		(CONFIG_MBAR + 0x8404)	/* TX start address */ +#define	PCITTCR		(CONFIG_MBAR + 0x8408)	/* TX transaction control */ +#define	PCITER		(CONFIG_MBAR + 0x840c)	/* TX enables */ +#define	PCITNAR		(CONFIG_MBAR + 0x8410)	/* TX next address */ +#define	PCITLWR		(CONFIG_MBAR + 0x8414)	/* TX last word */ +#define	PCITDCR		(CONFIG_MBAR + 0x8418)	/* TX done counts */ +#define	PCITSR		(CONFIG_MBAR + 0x841c)	/* TX status */ +#define	PCITFDR		(CONFIG_MBAR + 0x8440)	/* TX FIFO data */ +#define	PCITFSR		(CONFIG_MBAR + 0x8444)	/* TX FIFO status */ +#define	PCITFCR		(CONFIG_MBAR + 0x8448)	/* TX FIFO control */ +#define	PCITFAR		(CONFIG_MBAR + 0x844c)	/* TX FIFO alarm */ +#define	PCITFRPR	(CONFIG_MBAR + 0x8450)	/* TX FIFO read pointer */ +#define	PCITFWPR	(CONFIG_MBAR + 0x8454)	/* TX FIFO write pointer */ + +#define	PCIRPSR		(CONFIG_MBAR + 0x8480)	/* RX packet size */ +#define	PCIRSAR		(CONFIG_MBAR + 0x8484)	/* RX start address */ +#define	PCIRTCR		(CONFIG_MBAR + 0x8488)	/* RX transaction control */ +#define	PCIRER		(CONFIG_MBAR + 0x848c)	/* RX enables */ +#define	PCIRNAR		(CONFIG_MBAR + 0x8490)	/* RX next address */ +#define	PCIRDCR		(CONFIG_MBAR + 0x8498)	/* RX done counts */ +#define	PCIRSR		(CONFIG_MBAR + 0x849c)	/* RX status */ +#define	PCIRFDR		(CONFIG_MBAR + 0x84c0)	/* RX FIFO data */ +#define	PCIRFSR		(CONFIG_MBAR + 0x84c4)	/* RX FIFO status */ +#define	PCIRFCR		(CONFIG_MBAR + 0x84c8)	/* RX FIFO control */ +#define	PCIRFAR		(CONFIG_MBAR + 0x84cc)	/* RX FIFO alarm */ +#define	PCIRFRPR	(CONFIG_MBAR + 0x84d0)	/* RX FIFO read pointer */ +#define	PCIRFWPR	(CONFIG_MBAR + 0x84d4)	/* RX FIFO write pointer */ + +#define	PACR		(CONFIG_MBAR + 0xc00)	/* PCI arbiter control */ +#define	PASR		(COFNIG_MBAR + 0xc04)	/* PCI arbiter status */ + +/* + *	Definitions for the Global status and control register. + */ +#define	PCIGSCR_PE	0x20000000		/* Parity error detected */ +#define	PCIGSCR_SE	0x10000000		/* System error detected */ +#define	PCIGSCR_XCLKBIN	0x07000000		/* XLB2CLKIN mask */ +#define	PCIGSCR_PEE	0x00002000		/* Parity error intr enable */ +#define	PCIGSCR_SEE	0x00001000		/* System error intr enable */ +#define	PCIGSCR_RESET	0x00000001		/* Reset bit */ + +/* + *	Bit definitions for the PCICAR configuration address register. + */ +#define	PCICAR_E	0x80000000		/* Enable config space */ +#define	PCICAR_BUSN	16			/* Move bus bits */ +#define	PCICAR_DEVFNN	8			/* Move devfn bits */ +#define	PCICAR_DWORDN	0			/* Move dword bits */ + +/* + *	The initiator windows hold the memory and IO mapping information. + *	This macro creates the register values from the desired addresses. + */ +#define	WXBTAR(hostaddr, pciaddr, size)	\ +			(((hostaddr) & 0xff000000) | \ +			((((size) - 1) & 0xff000000) >> 8) | \ +			(((pciaddr) & 0xff000000) >> 16)) + +#define	PCIIWCR_W0_MEM	0x00000000		/* Window 0 is memory */ +#define	PCIIWCR_W0_IO	0x08000000		/* Window 0 is IO */ +#define	PCIIWCR_W0_MRD	0x00000000		/* Window 0 memory read */ +#define	PCIIWCR_W0_MRDL	0x02000000		/* Window 0 memory read line */ +#define	PCIIWCR_W0_MRDM	0x04000000		/* Window 0 memory read mult */ +#define	PCIIWCR_W0_E	0x01000000		/* Window 0 enable */ + +#define	PCIIWCR_W1_MEM	0x00000000		/* Window 0 is memory */ +#define	PCIIWCR_W1_IO	0x00080000		/* Window 0 is IO */ +#define	PCIIWCR_W1_MRD	0x00000000		/* Window 0 memory read */ +#define	PCIIWCR_W1_MRDL	0x00020000		/* Window 0 memory read line */ +#define	PCIIWCR_W1_MRDM	0x00040000		/* Window 0 memory read mult */ +#define	PCIIWCR_W1_E	0x00010000		/* Window 0 enable */ + +/* + *	Bit definitions for the PCIBATR registers. + */ +#define	PCITBATR0_E	0x00000001		/* Enable window 0 */ +#define	PCITBATR1_E	0x00000001		/* Enable window 1 */ + +/* + *	PCI arbiter support definitions and macros. + */ +#define	PACR_INTMPRI	0x00000001 +#define	PACR_EXTMPRI(x)	(((x) & 0x1f) << 1) +#define	PACR_INTMINTE	0x00010000 +#define	PACR_EXTMINTE(x) (((x) & 0x1f) << 17) +#define	PACR_PKMD	0x40000000 +#define	PACR_DS		0x80000000 + +#define	PCICR1_CL(x)	((x) & 0xf)		/* Cacheline size field */ +#define	PCICR1_LT(x)	(((x) & 0xff) << 8)	/* Latency timer field */ + +/****************************************************************************/ +#endif	/* M54XXPCI_H */ diff --git a/arch/m68k/include/asm/m54xxsim.h b/arch/m68k/include/asm/m54xxsim.h new file mode 100644 index 00000000000..a5fbd17ab0a --- /dev/null +++ b/arch/m68k/include/asm/m54xxsim.h @@ -0,0 +1,106 @@ +/* + *	m54xxsim.h -- ColdFire 547x/548x System Integration Unit support. + */ + +#ifndef	m54xxsim_h +#define m54xxsim_h + +#define	CPU_NAME		"COLDFIRE(m54xx)" +#define	CPU_INSTR_PER_JIFFY	2 +#define	MCF_BUSCLK		(MCF_CLK / 2) + +#include <asm/m54xxacr.h> + +#define MCFINT_VECBASE		64 + +/* + *      Interrupt Controller Registers + */ +#define MCFICM_INTC0		(MCF_MBAR + 0x700) 	/* Base for Interrupt Ctrl 0 */ + +#define MCFINTC_IPRH		0x00		/* Interrupt pending 32-63 */ +#define MCFINTC_IPRL		0x04		/* Interrupt pending 1-31 */ +#define MCFINTC_IMRH		0x08		/* Interrupt mask 32-63 */ +#define MCFINTC_IMRL		0x0c		/* Interrupt mask 1-31 */ +#define MCFINTC_INTFRCH		0x10		/* Interrupt force 32-63 */ +#define MCFINTC_INTFRCL		0x14		/* Interrupt force 1-31 */ +#define MCFINTC_IRLR		0x18		/* */ +#define MCFINTC_IACKL		0x19		/* */ +#define MCFINTC_ICR0		0x40		/* Base ICR register */ + +/* + *	UART module. + */ +#define MCFUART_BASE0		(MCF_MBAR + 0x8600)	/* Base address UART0 */ +#define MCFUART_BASE1		(MCF_MBAR + 0x8700)	/* Base address UART1 */ +#define MCFUART_BASE2		(MCF_MBAR + 0x8800)	/* Base address UART2 */ +#define MCFUART_BASE3		(MCF_MBAR + 0x8900)	/* Base address UART3 */ + +/* + *	Define system peripheral IRQ usage. + */ +#define MCF_IRQ_TIMER		(MCFINT_VECBASE + 54)	/* Slice Timer 0 */ +#define MCF_IRQ_PROFILER	(MCFINT_VECBASE + 53)	/* Slice Timer 1 */ +#define MCF_IRQ_UART0		(MCFINT_VECBASE + 35) +#define MCF_IRQ_UART1		(MCFINT_VECBASE + 34) +#define MCF_IRQ_UART2		(MCFINT_VECBASE + 33) +#define MCF_IRQ_UART3		(MCFINT_VECBASE + 32) + +/* + *	Slice Timer support. + */ +#define MCFSLT_TIMER0		(MCF_MBAR + 0x900)	/* Base addr TIMER0 */ +#define MCFSLT_TIMER1		(MCF_MBAR + 0x910)	/* Base addr TIMER1 */ + +/* + *	Generic GPIO support + */ +#define MCFGPIO_PODR		(MCF_MBAR + 0xA00) +#define MCFGPIO_PDDR		(MCF_MBAR + 0xA10) +#define MCFGPIO_PPDR		(MCF_MBAR + 0xA20) +#define MCFGPIO_SETR		(MCF_MBAR + 0xA20) +#define MCFGPIO_CLRR		(MCF_MBAR + 0xA30) + +#define MCFGPIO_PIN_MAX		136	/* 128 gpio + 8 eport */ +#define MCFGPIO_IRQ_MAX		8 +#define MCFGPIO_IRQ_VECBASE	MCFINT_VECBASE + +/* + *	EDGE Port support. + */ +#define	MCFEPORT_EPPAR		(MCF_MBAR + 0xf00)	/* Pin assignment */ +#define	MCFEPORT_EPDDR		(MCF_MBAR + 0xf04)	/* Data direction */ +#define	MCFEPORT_EPIER		(MCF_MBAR + 0xf05)	/* Interrupt enable */ +#define	MCFEPORT_EPDR		(MCF_MBAR + 0xf08)	/* Port data (w) */ +#define	MCFEPORT_EPPDR		(MCF_MBAR + 0xf09)	/* Port data (r) */ +#define	MCFEPORT_EPFR		(MCF_MBAR + 0xf0c)	/* Flags */ + +/* + *	Pin Assignment register definitions + */ +#define MCFGPIO_PAR_FBCTL	(MCF_MBAR + 0xA40) +#define MCFGPIO_PAR_FBCS	(MCF_MBAR + 0xA42) +#define MCFGPIO_PAR_DMA		(MCF_MBAR + 0xA43) +#define MCFGPIO_PAR_FECI2CIRQ	(MCF_MBAR + 0xA44) +#define MCFGPIO_PAR_PCIBG	(MCF_MBAR + 0xA48)	/* PCI bus grant */ +#define MCFGPIO_PAR_PCIBR	(MCF_MBAR + 0xA4A)	/* PCI */ +#define MCFGPIO_PAR_PSC0	(MCF_MBAR + 0xA4F) +#define MCFGPIO_PAR_PSC1	(MCF_MBAR + 0xA4E) +#define MCFGPIO_PAR_PSC2	(MCF_MBAR + 0xA4D) +#define MCFGPIO_PAR_PSC3	(MCF_MBAR + 0xA4C) +#define MCFGPIO_PAR_DSPI	(MCF_MBAR + 0xA50) +#define MCFGPIO_PAR_TIMER	(MCF_MBAR + 0xA52) + +#define MCF_PAR_SDA		(0x0008) +#define MCF_PAR_SCL		(0x0004) +#define MCF_PAR_PSC_TXD		(0x04) +#define MCF_PAR_PSC_RXD		(0x08) +#define MCF_PAR_PSC_CTS_GPIO	(0x00) +#define MCF_PAR_PSC_CTS_BCLK	(0x80) +#define MCF_PAR_PSC_CTS_CTS	(0xC0) +#define MCF_PAR_PSC_RTS_GPIO    (0x00) +#define MCF_PAR_PSC_RTS_FSYNC	(0x20) +#define MCF_PAR_PSC_RTS_RTS	(0x30) +#define MCF_PAR_PSC_CANRX	(0x40) + +#endif	/* m54xxsim_h */ diff --git a/arch/m68k/include/asm/m68360.h b/arch/m68k/include/asm/m68360.h index eb7d39ef285..4664180a3ab 100644 --- a/arch/m68k/include/asm/m68360.h +++ b/arch/m68k/include/asm/m68360.h @@ -1,7 +1,7 @@ -#include "m68360_regs.h" -#include "m68360_pram.h" -#include "m68360_quicc.h" -#include "m68360_enet.h" +#include <asm/m68360_regs.h> +#include <asm/m68360_pram.h> +#include <asm/m68360_quicc.h> +#include <asm/m68360_enet.h>  #ifdef CONFIG_M68360 diff --git a/arch/m68k/include/asm/m68360_enet.h b/arch/m68k/include/asm/m68360_enet.h index c36f4d05920..4d04037c78a 100644 --- a/arch/m68k/include/asm/m68360_enet.h +++ b/arch/m68k/include/asm/m68360_enet.h @@ -10,7 +10,7 @@  #ifndef __ETHER_H  #define __ETHER_H -#include "quicc_simple.h" +#include <asm/quicc_simple.h>  /*   * transmit BD's diff --git a/arch/m68k/include/asm/m68360_quicc.h b/arch/m68k/include/asm/m68360_quicc.h index 6d40f4d18e1..59414cc108d 100644 --- a/arch/m68k/include/asm/m68360_quicc.h +++ b/arch/m68k/include/asm/m68360_quicc.h @@ -32,7 +32,7 @@ struct user_data {      /* BASE + 0x000: user data memory */      volatile unsigned char      udata_bd_ucode[0x400]; /*user data bd's Ucode*/      volatile unsigned char      udata_bd[0x200];       /*user data Ucode     */ -    volatile unsigned char      ucode_ext[0x100];      /*Ucode Extention ram */ +    volatile unsigned char      ucode_ext[0x100];      /*Ucode Extension ram */      volatile unsigned char      RESERVED1[0x500];      /* Reserved area      */  };  #else diff --git a/arch/m68k/include/asm/mac_baboon.h b/arch/m68k/include/asm/mac_baboon.h index c2a042b8c34..a2d32f6589f 100644 --- a/arch/m68k/include/asm/mac_baboon.h +++ b/arch/m68k/include/asm/mac_baboon.h @@ -29,4 +29,10 @@ struct baboon {  				 */  }; +extern int baboon_present; + +extern void baboon_register_interrupts(void); +extern void baboon_irq_enable(int); +extern void baboon_irq_disable(int); +  #endif /* __ASSEMBLY **/ diff --git a/arch/m68k/include/asm/mac_iop.h b/arch/m68k/include/asm/mac_iop.h index a2c7e6fcca3..fde874a01e2 100644 --- a/arch/m68k/include/asm/mac_iop.h +++ b/arch/m68k/include/asm/mac_iop.h @@ -159,4 +159,6 @@ extern void iop_upload_code(uint, __u8 *, uint, __u16);  extern void iop_download_code(uint, __u8 *, uint, __u16);  extern __u8 *iop_compare_code(uint, __u8 *, uint, __u16); +extern void iop_register_interrupts(void); +  #endif /* __ASSEMBLY__ */ diff --git a/arch/m68k/include/asm/mac_mouse.h b/arch/m68k/include/asm/mac_mouse.h deleted file mode 100644 index 39a5c292eae..00000000000 --- a/arch/m68k/include/asm/mac_mouse.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _ASM_MAC_MOUSE_H -#define _ASM_MAC_MOUSE_H - -/* - * linux/include/asm-m68k/mac_mouse.h - * header file for Macintosh ADB mouse driver - * 27-10-97 Michael Schmitz - * copied from: - * header file for Atari Mouse driver - * by Robert de Vries (robert@and.nl) on 19Jul93 - */ - -struct mouse_status { -	char		buttons; -	short		dx; -	short		dy; -	int		ready; -	int		active; -	wait_queue_head_t wait; -	struct fasync_struct *fasyncptr; -}; - -#endif diff --git a/arch/m68k/include/asm/mac_oss.h b/arch/m68k/include/asm/mac_oss.h index 7221f725193..425fbff4f4d 100644 --- a/arch/m68k/include/asm/mac_oss.h +++ b/arch/m68k/include/asm/mac_oss.h @@ -58,25 +58,6 @@  #define OSS_POWEROFF	0x80 -/* - * OSS Interrupt levels for various sub-systems - * - * This mapping is layed out with two things in mind: first, we try to keep - * things on their own levels to avoid having to do double-dispatches. Second, - * the levels match as closely as possible the alternate IRQ mapping mode (aka - * "A/UX mode") available on some VIA machines. - */ - -#define OSS_IRQLEV_DISABLED	0 -#define OSS_IRQLEV_IOPISM	1	/* ADB? */ -#define OSS_IRQLEV_SCSI		IRQ_AUTO_2 -#define OSS_IRQLEV_NUBUS	IRQ_AUTO_3	/* keep this on its own level */ -#define OSS_IRQLEV_IOPSCC	IRQ_AUTO_4	/* matches VIA alternate mapping */ -#define OSS_IRQLEV_SOUND	IRQ_AUTO_5	/* matches VIA alternate mapping */ -#define OSS_IRQLEV_60HZ		6	/* matches VIA alternate mapping */ -#define OSS_IRQLEV_VIA1		IRQ_AUTO_6	/* matches VIA alternate mapping */ -#define OSS_IRQLEV_PARITY	7	/* matches VIA alternate mapping */ -  #ifndef __ASSEMBLY__  struct mac_oss { @@ -91,4 +72,8 @@ struct mac_oss {  extern volatile struct mac_oss *oss;  extern int oss_present; +extern void oss_register_interrupts(void); +extern void oss_irq_enable(int); +extern void oss_irq_disable(int); +  #endif /* __ASSEMBLY__ */ diff --git a/arch/m68k/include/asm/mac_psc.h b/arch/m68k/include/asm/mac_psc.h index 7808bb0b232..e5c0d71d154 100644 --- a/arch/m68k/include/asm/mac_psc.h +++ b/arch/m68k/include/asm/mac_psc.h @@ -211,6 +211,10 @@  extern volatile __u8 *psc;  extern int psc_present; +extern void psc_register_interrupts(void); +extern void psc_irq_enable(int); +extern void psc_irq_disable(int); +  /*   *	Access functions   */ diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index 39afb438b65..fe3fc9ae1b6 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h @@ -204,7 +204,7 @@  #define vT2CL	0x1000  /* [VIA only] Timer two counter low. */  #define vT2CH	0x1200  /* [VIA only] Timer two counter high. */  #define vSR	0x1400  /* [VIA only] Shift register. */ -#define vACR	0x1600  /* [VIA only] Auxilary control register. */ +#define vACR	0x1600  /* [VIA only] Auxiliary control register. */  #define vPCR	0x1800  /* [VIA only] Peripheral control register. */                          /*            CHRP sez never ever to *write* this.  			 *            Mac family says never to *change* this. @@ -254,6 +254,17 @@  extern volatile __u8 *via1,*via2;  extern int rbv_present,via_alt_mapping; +struct irq_desc; + +extern void via_register_interrupts(void); +extern void via_irq_enable(int); +extern void via_irq_disable(int); +extern void via_nubus_irq_startup(int irq); +extern void via_nubus_irq_shutdown(int irq); +extern void via1_irq(unsigned int irq, struct irq_desc *desc); +extern void via1_set_head(int); +extern int via2_scsi_drq_pending(void); +  static inline int rbv_set_video_bpp(int bpp)  {  	char val = (bpp==1)?0:(bpp==2)?1:(bpp==4)?2:(bpp==8)?3:-1; diff --git a/arch/m68k/include/asm/machdep.h b/arch/m68k/include/asm/machdep.h index 415d5484916..953ca21da8e 100644 --- a/arch/m68k/include/asm/machdep.h +++ b/arch/m68k/include/asm/machdep.h @@ -3,6 +3,7 @@  #include <linux/seq_file.h>  #include <linux/interrupt.h> +#include <linux/time.h>  struct pt_regs;  struct mktime; @@ -16,14 +17,11 @@ extern void (*mach_init_IRQ) (void);  extern void (*mach_get_model) (char *model);  extern void (*mach_get_hardware_list) (struct seq_file *m);  /* machine dependent timer functions */ -extern unsigned long (*mach_gettimeoffset)(void);  extern int (*mach_hwclk)(int, struct rtc_time*);  extern unsigned int (*mach_get_ss)(void);  extern int (*mach_get_rtc_pll)(struct rtc_pll_info *);  extern int (*mach_set_rtc_pll)(struct rtc_pll_info *);  extern int (*mach_set_clock_mmss)(unsigned long); -extern void (*mach_gettod)(int *year, int *mon, int *day, int *hour, -			    int *min, int *sec);  extern void (*mach_reset)( void );  extern void (*mach_halt)( void );  extern void (*mach_power_off)( void ); @@ -35,11 +33,9 @@ extern void (*mach_l2_flush) (int);  extern void (*mach_beep) (unsigned int, unsigned int);  /* Hardware clock functions */ -extern void hw_timer_init(void); +extern void hw_timer_init(irq_handler_t handler);  extern unsigned long hw_timer_offset(void); -extern irqreturn_t arch_timer_interrupt(int irq, void *dummy);  extern void config_BSP(char *command, int len); -extern void do_IRQ(int irq, struct pt_regs *fp);  #endif /* _M68K_MACHDEP_H */ diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index 50db3591ca1..d323b2c2d07 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h @@ -4,6 +4,9 @@  #include <linux/seq_file.h>  #include <linux/interrupt.h> +#include <asm/bootinfo-mac.h> + +  /*   *	Apple Macintoshisms   */ @@ -11,13 +14,9 @@  extern void mac_reset(void);  extern void mac_poweroff(void);  extern void mac_init_IRQ(void); -extern int mac_irq_pending(unsigned int); -/* - *	Floppy driver magic hook - probably shouldnt be here - */ - -extern void via1_set_head(int); +extern void mac_irq_enable(struct irq_data *data); +extern void mac_irq_disable(struct irq_data *data);  /*   *	Macintosh Table @@ -46,7 +45,7 @@ struct mac_model  #define MAC_ADB_IOP		6  #define MAC_VIA_II		1 -#define MAC_VIA_IIci		2 +#define MAC_VIA_IICI		2  #define MAC_VIA_QUADRA		3  #define MAC_SCSI_NONE		0 @@ -78,65 +77,29 @@ struct mac_model  #define MAC_FLOPPY_SWIM_IOP	3  #define MAC_FLOPPY_AV		4 -/* - *	Gestalt numbers - */ +extern struct mac_model *macintosh_config; -#define MAC_MODEL_II		6 -#define MAC_MODEL_IIX		7 -#define MAC_MODEL_IICX		8 -#define MAC_MODEL_SE30		9 -#define MAC_MODEL_IICI		11 -#define MAC_MODEL_IIFX		13	/* And well numbered it is too */ -#define MAC_MODEL_IISI		18 -#define MAC_MODEL_LC		19 -#define MAC_MODEL_Q900		20 -#define MAC_MODEL_PB170		21 -#define MAC_MODEL_Q700		22 -#define MAC_MODEL_CLII		23	/* aka: P200 */ -#define MAC_MODEL_PB140		25 -#define MAC_MODEL_Q950		26	/* aka: WGS95 */ -#define MAC_MODEL_LCIII		27	/* aka: P450 */ -#define MAC_MODEL_PB210		29 -#define MAC_MODEL_C650		30 -#define MAC_MODEL_PB230		32 -#define MAC_MODEL_PB180		33 -#define MAC_MODEL_PB160		34 -#define MAC_MODEL_Q800		35	/* aka: WGS80 */ -#define MAC_MODEL_Q650		36 -#define MAC_MODEL_LCII		37	/* aka: P400/405/410/430 */ -#define MAC_MODEL_PB250		38 -#define MAC_MODEL_IIVI		44 -#define MAC_MODEL_P600		45	/* aka: P600CD */ -#define MAC_MODEL_IIVX		48 -#define MAC_MODEL_CCL		49	/* aka: P250 */ -#define MAC_MODEL_PB165C	50 -#define MAC_MODEL_C610		52	/* aka: WGS60 */ -#define MAC_MODEL_Q610		53 -#define MAC_MODEL_PB145		54	/* aka: PB145B */ -#define MAC_MODEL_P520		56	/* aka: LC520 */ -#define MAC_MODEL_C660		60 -#define MAC_MODEL_P460		62	/* aka: LCIII+, P466/P467 */ -#define MAC_MODEL_PB180C	71 -#define MAC_MODEL_PB520		72	/* aka: PB520C, PB540, PB540C, PB550C */ -#define MAC_MODEL_PB270C	77 -#define MAC_MODEL_Q840		78 -#define MAC_MODEL_P550		80	/* aka: LC550, P560 */ -#define MAC_MODEL_CCLII		83	/* aka: P275 */ -#define MAC_MODEL_PB165		84 -#define MAC_MODEL_PB190		85	/* aka: PB190CS */ -#define MAC_MODEL_TV		88 -#define MAC_MODEL_P475		89	/* aka: LC475, P476 */ -#define MAC_MODEL_P475F		90	/* aka: P475 w/ FPU (no LC040) */ -#define MAC_MODEL_P575		92	/* aka: LC575, P577/P578 */ -#define MAC_MODEL_Q605		94 -#define MAC_MODEL_Q605_ACC	95	/* Q605 accelerated to 33 MHz */ -#define MAC_MODEL_Q630		98	/* aka: LC630, P630/631/635/636/637/638/640 */ -#define MAC_MODEL_P588		99	/* aka: LC580, P580 */ -#define MAC_MODEL_PB280		102 -#define MAC_MODEL_PB280C	103 -#define MAC_MODEL_PB150		115 -extern struct mac_model *macintosh_config; +    /* +     * Internal representation of the Mac hardware, filled in from bootinfo +     */ + +struct mac_booter_data +{ +	unsigned long videoaddr; +	unsigned long videorow; +	unsigned long videodepth; +	unsigned long dimensions; +	unsigned long boottime; +	unsigned long gmtbias; +	unsigned long videological; +	unsigned long sccbase; +	unsigned long id; +	unsigned long memsize; +	unsigned long cpuid; +	unsigned long rombase; +}; + +extern struct mac_booter_data mac_bi_data;  #endif diff --git a/arch/m68k/include/asm/macints.h b/arch/m68k/include/asm/macints.h index ebe1b70fe90..92aa8a4c2d0 100644 --- a/arch/m68k/include/asm/macints.h +++ b/arch/m68k/include/asm/macints.h @@ -104,6 +104,9 @@  #define IRQ_PSC4_3	  (35)  #define IRQ_MAC_MACE_DMA  IRQ_PSC4_3 +/* OSS Level 4 interrupts */ +#define IRQ_MAC_SCC	  (33) +  /* Level 5 (PSC, AV Macs only) interrupts */  #define IRQ_PSC5_0	  (40)  #define IRQ_PSC5_1	  (41) @@ -131,9 +134,6 @@  #define IRQ_BABOON_2	  (66)  #define IRQ_BABOON_3	  (67) -/* On non-PSC machines, the serial ports share an IRQ */ -#define IRQ_MAC_SCC	  IRQ_AUTO_4 -  #define SLOT2IRQ(x)	  (x + 47)  #define IRQ2SLOT(x)	  (x - 47) diff --git a/arch/m68k/include/asm/mc146818rtc.h b/arch/m68k/include/asm/mc146818rtc.h index 9f70a01f73d..05b43bf5cdf 100644 --- a/arch/m68k/include/asm/mc146818rtc.h +++ b/arch/m68k/include/asm/mc146818rtc.h @@ -10,16 +10,16 @@  #include <asm/atarihw.h> -#define RTC_PORT(x)	(TT_RTC_BAS + 2*(x)) +#define ATARI_RTC_PORT(x)	(TT_RTC_BAS + 2*(x))  #define RTC_ALWAYS_BCD	0  #define CMOS_READ(addr) ({ \ -atari_outb_p((addr),RTC_PORT(0)); \ -atari_inb_p(RTC_PORT(1)); \ +atari_outb_p((addr), ATARI_RTC_PORT(0)); \ +atari_inb_p(ATARI_RTC_PORT(1)); \  })  #define CMOS_WRITE(val, addr) ({ \ -atari_outb_p((addr),RTC_PORT(0)); \ -atari_outb_p((val),RTC_PORT(1)); \ +atari_outb_p((addr), ATARI_RTC_PORT(0)); \ +atari_outb_p((val), ATARI_RTC_PORT(1)); \  })  #endif /* CONFIG_ATARI */ diff --git a/arch/m68k/include/asm/mcfne.h b/arch/m68k/include/asm/mcf8390.h index bf638be0958..a72a20819a5 100644 --- a/arch/m68k/include/asm/mcfne.h +++ b/arch/m68k/include/asm/mcf8390.h @@ -1,7 +1,7 @@  /****************************************************************************/  /* - *	mcfne.h -- NE2000 in ColdFire eval boards. + *	mcf8390.h -- NS8390 support for ColdFire eval boards.   *   *	(C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com)   *	(C) Copyright 2000,      Lineo (www.lineo.com) @@ -14,8 +14,8 @@   */  /****************************************************************************/ -#ifndef	mcfne_h -#define	mcfne_h +#ifndef	mcf8390_h +#define	mcf8390_h  /****************************************************************************/ @@ -37,6 +37,7 @@  #if defined(CONFIG_ARN5206)  #define NE2000_ADDR		0x40000300  #define NE2000_ODDOFFSET	0x00010000 +#define NE2000_ADDRSIZE		0x00020000  #define	NE2000_IRQ_VECTOR	0xf0  #define	NE2000_IRQ_PRIORITY	2  #define	NE2000_IRQ_LEVEL	4 @@ -46,6 +47,7 @@  #if defined(CONFIG_M5206eC3)  #define	NE2000_ADDR		0x40000300  #define	NE2000_ODDOFFSET	0x00010000 +#define	NE2000_ADDRSIZE		0x00020000  #define	NE2000_IRQ_VECTOR	0x1c  #define	NE2000_IRQ_PRIORITY	2  #define	NE2000_IRQ_LEVEL	4 @@ -54,6 +56,7 @@  #if defined(CONFIG_M5206e) && defined(CONFIG_NETtel)  #define NE2000_ADDR		0x30000300 +#define NE2000_ADDRSIZE		0x00001000  #define NE2000_IRQ_VECTOR	25  #define NE2000_IRQ_PRIORITY	1  #define NE2000_IRQ_LEVEL	3 @@ -63,6 +66,7 @@  #if defined(CONFIG_M5307C3)  #define NE2000_ADDR		0x40000300  #define NE2000_ODDOFFSET	0x00010000 +#define NE2000_ADDRSIZE		0x00020000  #define NE2000_IRQ_VECTOR	0x1b  #define	NE2000_BYTE		volatile unsigned short  #endif @@ -70,6 +74,7 @@  #if defined(CONFIG_M5272) && defined(CONFIG_NETtel)  #define NE2000_ADDR		0x30600300  #define NE2000_ODDOFFSET	0x00008000 +#define NE2000_ADDRSIZE		0x00010000  #define NE2000_IRQ_VECTOR	67  #undef	BSWAP  #define	BSWAP(w)		(w) @@ -82,6 +87,7 @@  #define NE2000_ADDR0		0x30600300  #define NE2000_ADDR1		0x30800300  #define NE2000_ODDOFFSET	0x00008000 +#define NE2000_ADDRSIZE		0x00010000  #define NE2000_IRQ_VECTOR0	27  #define NE2000_IRQ_VECTOR1	29  #undef	BSWAP @@ -94,6 +100,7 @@  #if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3)  #define NE2000_ADDR		0x30600300  #define NE2000_ODDOFFSET	0x00008000 +#define NE2000_ADDRSIZE		0x00010000  #define NE2000_IRQ_VECTOR	27  #undef	BSWAP  #define	BSWAP(w)		(w) @@ -105,6 +112,7 @@  #if defined(CONFIG_ARN5307)  #define NE2000_ADDR		0xfe600300  #define NE2000_ODDOFFSET	0x00010000 +#define NE2000_ADDRSIZE		0x00020000  #define NE2000_IRQ_VECTOR	0x1b  #define NE2000_IRQ_PRIORITY	2  #define NE2000_IRQ_LEVEL	3 @@ -114,129 +122,10 @@  #if defined(CONFIG_M5407C3)  #define NE2000_ADDR		0x40000300  #define NE2000_ODDOFFSET	0x00010000 +#define NE2000_ADDRSIZE		0x00020000  #define NE2000_IRQ_VECTOR	0x1b  #define	NE2000_BYTE		volatile unsigned short  #endif  /****************************************************************************/ - -/* - *	Side-band address space for odd address requires re-mapping - *	many of the standard ISA access functions. - */ -#ifdef NE2000_ODDOFFSET - -#undef outb -#undef outb_p -#undef inb -#undef inb_p -#undef outsb -#undef outsw -#undef insb -#undef insw - -#define	outb	ne2000_outb -#define	inb	ne2000_inb -#define	outb_p	ne2000_outb -#define	inb_p	ne2000_inb -#define	outsb	ne2000_outsb -#define	outsw	ne2000_outsw -#define	insb	ne2000_insb -#define	insw	ne2000_insw - - -#ifndef COLDFIRE_NE2000_FUNCS - -void ne2000_outb(unsigned int val, unsigned int addr); -int  ne2000_inb(unsigned int addr); -void ne2000_insb(unsigned int addr, void *vbuf, int unsigned long len); -void ne2000_insw(unsigned int addr, void *vbuf, unsigned long len); -void ne2000_outsb(unsigned int addr, void *vbuf, unsigned long len); -void ne2000_outsw(unsigned int addr, void *vbuf, unsigned long len); - -#else - -/* - *	This macro converts a conventional register address into the - *	real memory pointer of the mapped NE2000 device. - *	On most NE2000 implementations on ColdFire boards the chip is - *	mapped in kinda funny, due to its ISA heritage. - */ -#define	NE2000_PTR(addr)	((addr&0x1)?(NE2000_ODDOFFSET+addr-1):(addr)) -#define	NE2000_DATA_PTR(addr)	(addr) - - -void ne2000_outb(unsigned int val, unsigned int addr) -{ -	NE2000_BYTE	*rp; - -	rp = (NE2000_BYTE *) NE2000_PTR(addr); -	*rp = RSWAP(val); -} - -int ne2000_inb(unsigned int addr) -{ -	NE2000_BYTE	*rp, val; - -	rp = (NE2000_BYTE *) NE2000_PTR(addr); -	val = *rp; -	return((int) ((NE2000_BYTE) RSWAP(val))); -} - -void ne2000_insb(unsigned int addr, void *vbuf, int unsigned long len) -{ -	NE2000_BYTE	*rp, val; -	unsigned char	*buf; - -	buf = (unsigned char *) vbuf; -	rp = (NE2000_BYTE *) NE2000_DATA_PTR(addr); -	for (; (len > 0); len--) { -		val = *rp; -		*buf++ = RSWAP(val); -	} -} - -void ne2000_insw(unsigned int addr, void *vbuf, unsigned long len) -{ -	volatile unsigned short	*rp; -	unsigned short		w, *buf; - -	buf = (unsigned short *) vbuf; -	rp = (volatile unsigned short *) NE2000_DATA_PTR(addr); -	for (; (len > 0); len--) { -		w = *rp; -		*buf++ = BSWAP(w); -	} -} - -void ne2000_outsb(unsigned int addr, const void *vbuf, unsigned long len) -{ -	NE2000_BYTE	*rp, val; -	unsigned char	*buf; - -	buf = (unsigned char *) vbuf; -	rp = (NE2000_BYTE *) NE2000_DATA_PTR(addr); -	for (; (len > 0); len--) { -		val = *buf++; -		*rp = RSWAP(val); -	} -} - -void ne2000_outsw(unsigned int addr, const void *vbuf, unsigned long len) -{ -	volatile unsigned short	*rp; -	unsigned short		w, *buf; - -	buf = (unsigned short *) vbuf; -	rp = (volatile unsigned short *) NE2000_DATA_PTR(addr); -	for (; (len > 0); len--) { -		w = *buf++; -		*rp = BSWAP(w); -	} -} - -#endif /* COLDFIRE_NE2000_FUNCS */ -#endif /* NE2000_OFFOFFSET */ - -/****************************************************************************/ -#endif	/* mcfne_h */ +#endif	/* mcf8390_h */ diff --git a/arch/m68k/include/asm/mcf_pgalloc.h b/arch/m68k/include/asm/mcf_pgalloc.h new file mode 100644 index 00000000000..f9924fbcfe4 --- /dev/null +++ b/arch/m68k/include/asm/mcf_pgalloc.h @@ -0,0 +1,106 @@ +#ifndef M68K_MCF_PGALLOC_H +#define M68K_MCF_PGALLOC_H + +#include <asm/tlb.h> +#include <asm/tlbflush.h> + +extern inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) +{ +	free_page((unsigned long) pte); +} + +extern const char bad_pmd_string[]; + +extern inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, +	unsigned long address) +{ +	unsigned long page = __get_free_page(GFP_DMA|__GFP_REPEAT); + +	if (!page) +		return NULL; + +	memset((void *)page, 0, PAGE_SIZE); +	return (pte_t *) (page); +} + +extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address) +{ +	return (pmd_t *) pgd; +} + +#define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); }) +#define pmd_alloc_one(mm, address)      ({ BUG(); ((pmd_t *)2); }) + +#define pte_alloc_one_fast(mm, addr) pte_alloc_one(mm, addr) + +#define pmd_populate(mm, pmd, page) (pmd_val(*pmd) = \ +	(unsigned long)(page_address(page))) + +#define pmd_populate_kernel(mm, pmd, pte) (pmd_val(*pmd) = (unsigned long)(pte)) + +#define pmd_pgtable(pmd) pmd_page(pmd) + +static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page, +				  unsigned long address) +{ +	__free_page(page); +} + +#define __pmd_free_tlb(tlb, pmd, address) do { } while (0) + +static inline struct page *pte_alloc_one(struct mm_struct *mm, +	unsigned long address) +{ +	struct page *page = alloc_pages(GFP_DMA|__GFP_REPEAT, 0); +	pte_t *pte; + +	if (!page) +		return NULL; +	if (!pgtable_page_ctor(page)) { +		__free_page(page); +		return NULL; +	} + +	pte = kmap(page); +	if (pte) { +		clear_page(pte); +		__flush_page_to_ram(pte); +		flush_tlb_kernel_page(pte); +		nocache_page(pte); +	} +	kunmap(page); + +	return page; +} + +extern inline void pte_free(struct mm_struct *mm, struct page *page) +{ +	__free_page(page); +} + +/* + * In our implementation, each pgd entry contains 1 pmd that is never allocated + * or freed.  pgd_present is always 1, so this should never be called. -NL + */ +#define pmd_free(mm, pmd) BUG() + +static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) +{ +	free_page((unsigned long) pgd); +} + +static inline pgd_t *pgd_alloc(struct mm_struct *mm) +{ +	pgd_t *new_pgd; + +	new_pgd = (pgd_t *)__get_free_page(GFP_DMA | __GFP_NOWARN); +	if (!new_pgd) +		return NULL; +	memcpy(new_pgd, swapper_pg_dir, PAGE_SIZE); +	memset(new_pgd, 0, PAGE_OFFSET >> PGDIR_SHIFT); +	return new_pgd; +} + +#define pgd_populate(mm, pmd, pte) BUG() + +#endif /* M68K_MCF_PGALLOC_H */ diff --git a/arch/m68k/include/asm/mcf_pgtable.h b/arch/m68k/include/asm/mcf_pgtable.h new file mode 100644 index 00000000000..3c793682e5d --- /dev/null +++ b/arch/m68k/include/asm/mcf_pgtable.h @@ -0,0 +1,426 @@ +#ifndef _MCF_PGTABLE_H +#define _MCF_PGTABLE_H + +#include <asm/mcfmmu.h> +#include <asm/page.h> + +/* + * MMUDR bits, in proper place. We write these directly into the MMUDR + * after masking from the pte. + */ +#define CF_PAGE_LOCKED		MMUDR_LK	/* 0x00000002 */ +#define CF_PAGE_EXEC		MMUDR_X		/* 0x00000004 */ +#define CF_PAGE_WRITABLE	MMUDR_W		/* 0x00000008 */ +#define CF_PAGE_READABLE	MMUDR_R		/* 0x00000010 */ +#define CF_PAGE_SYSTEM		MMUDR_SP	/* 0x00000020 */ +#define CF_PAGE_COPYBACK	MMUDR_CM_CCB	/* 0x00000040 */ +#define CF_PAGE_NOCACHE		MMUDR_CM_NCP	/* 0x00000080 */ + +#define CF_CACHEMASK		(~MMUDR_CM_CCB) +#define CF_PAGE_MMUDR_MASK	0x000000fe + +#define _PAGE_NOCACHE030	CF_PAGE_NOCACHE + +/* + * MMUTR bits, need shifting down. + */ +#define CF_PAGE_MMUTR_MASK	0x00000c00 +#define CF_PAGE_MMUTR_SHIFT	10 + +#define CF_PAGE_VALID		(MMUTR_V << CF_PAGE_MMUTR_SHIFT) +#define CF_PAGE_SHARED		(MMUTR_SG << CF_PAGE_MMUTR_SHIFT) + +/* + * Fake bits, not implemented in CF, will get masked out before + * hitting hardware. + */ +#define CF_PAGE_DIRTY		0x00000001 +#define CF_PAGE_FILE		0x00000200 +#define CF_PAGE_ACCESSED	0x00001000 + +#define _PAGE_CACHE040		0x020   /* 68040 cache mode, cachable, copyback */ +#define _PAGE_NOCACHE_S		0x040   /* 68040 no-cache mode, serialized */ +#define _PAGE_NOCACHE		0x060   /* 68040 cache mode, non-serialized */ +#define _PAGE_CACHE040W		0x000   /* 68040 cache mode, cachable, write-through */ +#define _DESCTYPE_MASK		0x003 +#define _CACHEMASK040		(~0x060) +#define _PAGE_GLOBAL040		0x400   /* 68040 global bit, used for kva descs */ + +/* + * Externally used page protection values. + */ +#define _PAGE_PRESENT	(CF_PAGE_VALID) +#define _PAGE_ACCESSED	(CF_PAGE_ACCESSED) +#define _PAGE_DIRTY	(CF_PAGE_DIRTY) +#define _PAGE_READWRITE (CF_PAGE_READABLE \ +				| CF_PAGE_WRITABLE \ +				| CF_PAGE_SYSTEM \ +				| CF_PAGE_SHARED) + +/* + * Compound page protection values. + */ +#define PAGE_NONE	__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED) + +#define PAGE_SHARED     __pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_SHARED) + +#define PAGE_INIT	__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_WRITABLE \ +				 | CF_PAGE_EXEC \ +				 | CF_PAGE_SYSTEM) + +#define PAGE_KERNEL	__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_WRITABLE \ +				 | CF_PAGE_EXEC \ +				 | CF_PAGE_SYSTEM \ +				 | CF_PAGE_SHARED) + +#define PAGE_COPY	__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_DIRTY) + +/* + * Page protections for initialising protection_map. See mm/mmap.c + * for use. In general, the bit positions are xwr, and P-items are + * private, the S-items are shared. + */ +#define __P000		PAGE_NONE +#define __P001		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE) +#define __P010		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_WRITABLE) +#define __P011		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_WRITABLE) +#define __P100		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_EXEC) +#define __P101		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_EXEC) +#define __P110		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_WRITABLE \ +				 | CF_PAGE_EXEC) +#define __P111		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_WRITABLE \ +				 | CF_PAGE_EXEC) + +#define __S000		PAGE_NONE +#define __S001		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE) +#define __S010		PAGE_SHARED +#define __S011		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_SHARED \ +				 | CF_PAGE_READABLE) +#define __S100		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_EXEC) +#define __S101		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_EXEC) +#define __S110		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_SHARED \ +				 | CF_PAGE_EXEC) +#define __S111		__pgprot(CF_PAGE_VALID \ +				 | CF_PAGE_ACCESSED \ +				 | CF_PAGE_SHARED \ +				 | CF_PAGE_READABLE \ +				 | CF_PAGE_EXEC) + +#define PTE_MASK	PAGE_MASK +#define CF_PAGE_CHG_MASK (PTE_MASK | CF_PAGE_ACCESSED | CF_PAGE_DIRTY) + +#ifndef __ASSEMBLY__ + +/* + * Conversion functions: convert a page and protection to a page entry, + * and a page entry and page directory to the page they refer to. + */ +#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) + +static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) +{ +	pte_val(pte) = (pte_val(pte) & CF_PAGE_CHG_MASK) | pgprot_val(newprot); +	return pte; +} + +#define pmd_set(pmdp, ptep) do {} while (0) + +static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp) +{ +	pgd_val(*pgdp) = virt_to_phys(pmdp); +} + +#define __pte_page(pte)	((unsigned long) (pte_val(pte) & PAGE_MASK)) +#define __pmd_page(pmd)	((unsigned long) (pmd_val(pmd))) + +static inline int pte_none(pte_t pte) +{ +	return !pte_val(pte); +} + +static inline int pte_present(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_VALID; +} + +static inline void pte_clear(struct mm_struct *mm, unsigned long addr, +	pte_t *ptep) +{ +	pte_val(*ptep) = 0; +} + +#define pte_pagenr(pte)	((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT) +#define pte_page(pte)	virt_to_page(__pte_page(pte)) + +static inline int pmd_none2(pmd_t *pmd) { return !pmd_val(*pmd); } +#define pmd_none(pmd) pmd_none2(&(pmd)) +static inline int pmd_bad2(pmd_t *pmd) { return 0; } +#define pmd_bad(pmd) pmd_bad2(&(pmd)) +#define pmd_present(pmd) (!pmd_none2(&(pmd))) +static inline void pmd_clear(pmd_t *pmdp) { pmd_val(*pmdp) = 0; } + +static inline int pgd_none(pgd_t pgd) { return 0; } +static inline int pgd_bad(pgd_t pgd) { return 0; } +static inline int pgd_present(pgd_t pgd) { return 1; } +static inline void pgd_clear(pgd_t *pgdp) {} + +#define pte_ERROR(e) \ +	printk(KERN_ERR "%s:%d: bad pte %08lx.\n",	\ +	__FILE__, __LINE__, pte_val(e)) +#define pmd_ERROR(e) \ +	printk(KERN_ERR "%s:%d: bad pmd %08lx.\n",	\ +	__FILE__, __LINE__, pmd_val(e)) +#define pgd_ERROR(e) \ +	printk(KERN_ERR "%s:%d: bad pgd %08lx.\n",	\ +	__FILE__, __LINE__, pgd_val(e)) + +/* + * The following only work if pte_present() is true. + * Undefined behaviour if not... + * [we have the full set here even if they don't change from m68k] + */ +static inline int pte_read(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_READABLE; +} + +static inline int pte_write(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_WRITABLE; +} + +static inline int pte_exec(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_EXEC; +} + +static inline int pte_dirty(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_DIRTY; +} + +static inline int pte_young(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_ACCESSED; +} + +static inline int pte_file(pte_t pte) +{ +	return pte_val(pte) & CF_PAGE_FILE; +} + +static inline int pte_special(pte_t pte) +{ +	return 0; +} + +static inline pte_t pte_wrprotect(pte_t pte) +{ +	pte_val(pte) &= ~CF_PAGE_WRITABLE; +	return pte; +} + +static inline pte_t pte_rdprotect(pte_t pte) +{ +	pte_val(pte) &= ~CF_PAGE_READABLE; +	return pte; +} + +static inline pte_t pte_exprotect(pte_t pte) +{ +	pte_val(pte) &= ~CF_PAGE_EXEC; +	return pte; +} + +static inline pte_t pte_mkclean(pte_t pte) +{ +	pte_val(pte) &= ~CF_PAGE_DIRTY; +	return pte; +} + +static inline pte_t pte_mkold(pte_t pte) +{ +	pte_val(pte) &= ~CF_PAGE_ACCESSED; +	return pte; +} + +static inline pte_t pte_mkwrite(pte_t pte) +{ +	pte_val(pte) |= CF_PAGE_WRITABLE; +	return pte; +} + +static inline pte_t pte_mkread(pte_t pte) +{ +	pte_val(pte) |= CF_PAGE_READABLE; +	return pte; +} + +static inline pte_t pte_mkexec(pte_t pte) +{ +	pte_val(pte) |= CF_PAGE_EXEC; +	return pte; +} + +static inline pte_t pte_mkdirty(pte_t pte) +{ +	pte_val(pte) |= CF_PAGE_DIRTY; +	return pte; +} + +static inline pte_t pte_mkyoung(pte_t pte) +{ +	pte_val(pte) |= CF_PAGE_ACCESSED; +	return pte; +} + +static inline pte_t pte_mknocache(pte_t pte) +{ +	pte_val(pte) |= 0x80 | (pte_val(pte) & ~0x40); +	return pte; +} + +static inline pte_t pte_mkcache(pte_t pte) +{ +	pte_val(pte) &= ~CF_PAGE_NOCACHE; +	return pte; +} + +static inline pte_t pte_mkspecial(pte_t pte) +{ +	return pte; +} + +#define swapper_pg_dir kernel_pg_dir +extern pgd_t kernel_pg_dir[PTRS_PER_PGD]; + +/* + * Find an entry in a pagetable directory. + */ +#define pgd_index(address)	((address) >> PGDIR_SHIFT) +#define pgd_offset(mm, address)	((mm)->pgd + pgd_index(address)) + +/* + * Find an entry in a kernel pagetable directory. + */ +#define pgd_offset_k(address)	pgd_offset(&init_mm, address) + +/* + * Find an entry in the second-level pagetable. + */ +static inline pmd_t *pmd_offset(pgd_t *pgd, unsigned long address) +{ +	return (pmd_t *) pgd; +} + +/* + * Find an entry in the third-level pagetable. + */ +#define __pte_offset(address)	((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) +#define pte_offset_kernel(dir, address) \ +	((pte_t *) __pmd_page(*(dir)) + __pte_offset(address)) + +/* + * Disable caching for page at given kernel virtual address. + */ +static inline void nocache_page(void *vaddr) +{ +	pgd_t *dir; +	pmd_t *pmdp; +	pte_t *ptep; +	unsigned long addr = (unsigned long) vaddr; + +	dir = pgd_offset_k(addr); +	pmdp = pmd_offset(dir, addr); +	ptep = pte_offset_kernel(pmdp, addr); +	*ptep = pte_mknocache(*ptep); +} + +/* + * Enable caching for page at given kernel virtual address. + */ +static inline void cache_page(void *vaddr) +{ +	pgd_t *dir; +	pmd_t *pmdp; +	pte_t *ptep; +	unsigned long addr = (unsigned long) vaddr; + +	dir = pgd_offset_k(addr); +	pmdp = pmd_offset(dir, addr); +	ptep = pte_offset_kernel(pmdp, addr); +	*ptep = pte_mkcache(*ptep); +} + +#define PTE_FILE_MAX_BITS	21 +#define PTE_FILE_SHIFT		11 + +static inline unsigned long pte_to_pgoff(pte_t pte) +{ +	return pte_val(pte) >> PTE_FILE_SHIFT; +} + +static inline pte_t pgoff_to_pte(unsigned pgoff) +{ +	return __pte((pgoff << PTE_FILE_SHIFT) + CF_PAGE_FILE); +} + +/* + * Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e)) + */ +#define __swp_type(x)		((x).val & 0xFF) +#define __swp_offset(x)		((x).val >> PTE_FILE_SHIFT) +#define __swp_entry(typ, off)	((swp_entry_t) { (typ) | \ +					(off << PTE_FILE_SHIFT) }) +#define __pte_to_swp_entry(pte)	((swp_entry_t) { pte_val(pte) }) +#define __swp_entry_to_pte(x)	(__pte((x).val)) + +#define pmd_page(pmd)		(pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) + +#define pte_offset_map(pmdp, addr) ((pte_t *)__pmd_page(*pmdp) + \ +				       __pte_offset(addr)) +#define pte_unmap(pte)		((void) 0) +#define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) +#define pte_pfn(pte)		(pte_val(pte) >> PAGE_SHIFT) + +#endif	/* !__ASSEMBLY__ */ +#endif	/* _MCF_PGTABLE_H */ diff --git a/arch/m68k/include/asm/mcfcache.h b/arch/m68k/include/asm/mcfcache.h deleted file mode 100644 index f49dfc09f70..00000000000 --- a/arch/m68k/include/asm/mcfcache.h +++ /dev/null @@ -1,150 +0,0 @@ -/****************************************************************************/ - -/* - *	mcfcache.h -- ColdFire CPU cache support code - * - *	(C) Copyright 2004, Greg Ungerer <gerg@snapgear.com> - */ - -/****************************************************************************/ -#ifndef	__M68KNOMMU_MCFCACHE_H -#define	__M68KNOMMU_MCFCACHE_H -/****************************************************************************/ - - -/* - *	The different ColdFire families have different cache arrangments. - *	Everything from a small instruction only cache, to configurable - *	data and/or instruction cache, to unified instruction/data, to  - *	harvard style separate instruction and data caches. - */ - -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) -/* - *	Simple version 2 core cache. These have instruction cache only, - *	we just need to invalidate it and enable it. - */ -.macro CACHE_ENABLE -	movel	#0x01000000,%d0		/* invalidate cache cmd */ -	movec	%d0,%CACR		/* do invalidate cache */ -	movel	#0x80000100,%d0		/* setup cache mask */ -	movec	%d0,%CACR		/* enable cache */ -.endm -#endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ - -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) -/* - *	New version 2 cores have a configurable split cache arrangement. - *	For now I am just enabling instruction cache - but ultimately I - *	think a split instruction/data cache would be better. - */ -.macro CACHE_ENABLE -	movel	#0x01400000,%d0 -	movec	%d0,%CACR		/* invalidate cache */ -	nop -	movel	#0x0000c000,%d0		/* set SDRAM cached only */ -	movec	%d0,%ACR0 -	movel	#0x00000000,%d0		/* no other regions cached */ -	movec	%d0,%ACR1 -	movel	#0x80400100,%d0		/* configure cache */ -	movec	%d0,%CACR		/* enable cache */ -	nop -.endm -#endif /* CONFIG_M523x || CONFIG_M527x */ - -#if defined(CONFIG_M528x) -.macro CACHE_ENABLE -	nop -	movel	#0x01000000, %d0 -	movec	%d0, %CACR		/* Invalidate cache */ -	nop -	movel	#0x0000c020, %d0	/* Set SDRAM cached only */ -	movec	%d0, %ACR0 -	movel	#0x00000000, %d0	/* No other regions cached */ -	movec	%d0, %ACR1 -	movel	#0x80000200, %d0	/* Setup cache mask */ -	movec	%d0, %CACR		/* Enable cache */ -	nop -.endm -#endif /* CONFIG_M528x */ - -#if defined(CONFIG_M5249) || defined(CONFIG_M5307) -/* - *	The version 3 core cache. Oddly enough the version 2 core 5249 - *	has the same SDRAM and cache setup as the version 3 cores. - *	This is a single unified instruction/data cache. - */ -.macro CACHE_ENABLE -	movel	#0x01000000,%d0		/* invalidate whole cache */ -	movec	%d0,%CACR -	nop -#if defined(DEBUGGER_COMPATIBLE_CACHE) || defined(CONFIG_SECUREEDGEMP3) -	movel	#0x0000c000,%d0		/* set SDRAM cached (write-thru) */ -#else -	movel	#0x0000c020,%d0		/* set SDRAM cached (copyback) */ -#endif -	movec	%d0,%ACR0 -	movel	#0x00000000,%d0		/* no other regions cached */ -	movec	%d0,%ACR1 -	movel	#0xa0000200,%d0		/* enable cache */ -	movec	%d0,%CACR -	nop -.endm -#endif /* CONFIG_M5249 || CONFIG_M5307 */ - -#if defined(CONFIG_M532x) -.macro CACHE_ENABLE -	movel	#0x01000000,%d0		/* invalidate cache cmd */ -	movec	%d0,%CACR		/* do invalidate cache */ -	nop -	movel	#0x4001C000,%d0		/* set SDRAM cached (write-thru) */ -	movec	%d0,%ACR0 -	movel	#0x00000000,%d0		/* no other regions cached */ -	movec	%d0,%ACR1 -	movel	#0x80000200,%d0		/* setup cache mask */ -	movec	%d0,%CACR		/* enable cache */ -	nop -.endm -#endif /* CONFIG_M532x */ - -#if defined(CONFIG_M5407) || defined(CONFIG_M548x) -/* - *	Version 4 cores have a true harvard style separate instruction - *	and data cache. Invalidate and enable cache, also enable write - *	buffers and branch accelerator. - */ -.macro CACHE_ENABLE -	movel	#0x01040100,%d0		/* invalidate whole cache */ -	movec	%d0,%CACR -	nop -	movel	#0x000fc000,%d0		/* set SDRAM cached only */ -	movec	%d0, %ACR0 -	movel	#0x00000000,%d0		/* no other regions cached */ -	movec	%d0, %ACR1 -	movel	#0x000fc000,%d0		/* set SDRAM cached only */ -	movec	%d0, %ACR2 -	movel	#0x00000000,%d0		/* no other regions cached */ -	movec	%d0, %ACR3 -	movel	#0xb6088400,%d0		/* enable caches */ -	movec	%d0,%CACR -	nop -.endm -#endif /* CONFIG_M5407 */ - -#if defined(CONFIG_M520x) -.macro CACHE_ENABLE -	move.l	#0x01000000,%d0		/* invalidate whole cache */ -	movec	%d0,%CACR -	nop -	move.l	#0x0000c000,%d0		/* set SDRAM cached (write-thru) */ -	movec	%d0,%ACR0 -	move.l	#0x00000000,%d0		/* no other regions cached */ -	movec	%d0,%ACR1 -	move.l	#0x80400000,%d0		/* enable 8K instruction cache */ -	movec	%d0,%CACR -	nop -.endm -#endif /* CONFIG_M520x */ - -/****************************************************************************/ -#endif	/* __M68KNOMMU_MCFCACHE_H */ diff --git a/arch/m68k/include/asm/mcfclk.h b/arch/m68k/include/asm/mcfclk.h new file mode 100644 index 00000000000..ea4791e3a55 --- /dev/null +++ b/arch/m68k/include/asm/mcfclk.h @@ -0,0 +1,50 @@ +/* + * mcfclk.h -- coldfire specific clock structure + */ + + +#ifndef mcfclk_h +#define mcfclk_h + +struct clk; + +struct clk_ops { +	void (*enable)(struct clk *); +	void (*disable)(struct clk *); +}; + +struct clk { +	const char *name; +	struct clk_ops *clk_ops; +	unsigned long rate; +	unsigned long enabled; +	u8 slot; +}; + +extern struct clk *mcf_clks[]; + +#ifdef MCFPM_PPMCR0 +extern struct clk_ops clk_ops0; +#ifdef MCFPM_PPMCR1 +extern struct clk_ops clk_ops1; +#endif /* MCFPM_PPMCR1 */ + +#define DEFINE_CLK(clk_bank, clk_name, clk_slot, clk_rate) \ +static struct clk __clk_##clk_bank##_##clk_slot = { \ +	.name = clk_name, \ +	.clk_ops = &clk_ops##clk_bank, \ +	.rate = clk_rate, \ +	.slot = clk_slot, \ +} + +void __clk_init_enabled(struct clk *); +void __clk_init_disabled(struct clk *); +#else +#define DEFINE_CLK(clk_ref, clk_name, clk_rate) \ +        static struct clk clk_##clk_ref = { \ +                .name = clk_name, \ +                .rate = clk_rate, \ +        } +#endif /* MCFPM_PPMCR0 */ + +#endif /* mcfclk_h */ diff --git a/arch/m68k/include/asm/mcfdma.h b/arch/m68k/include/asm/mcfdma.h index 705c52c79cd..10bc7e391c1 100644 --- a/arch/m68k/include/asm/mcfdma.h +++ b/arch/m68k/include/asm/mcfdma.h @@ -11,29 +11,6 @@  #define	mcfdma_h  /****************************************************************************/ - -/* - *	Get address specific defines for this Coldfire member. - */ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) -#define	MCFDMA_BASE0		0x200		/* Base address of DMA 0 */ -#define	MCFDMA_BASE1		0x240		/* Base address of DMA 1 */ -#elif defined(CONFIG_M5272) -#define	MCFDMA_BASE0		0x0e0		/* Base address of DMA 0 */ -#elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) -/* These are relative to the IPSBAR, not MBAR */ -#define	MCFDMA_BASE0		0x100		/* Base address of DMA 0 */ -#define	MCFDMA_BASE1		0x140		/* Base address of DMA 1 */ -#define	MCFDMA_BASE2		0x180		/* Base address of DMA 2 */ -#define	MCFDMA_BASE3		0x1C0		/* Base address of DMA 3 */ -#elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) -#define	MCFDMA_BASE0		0x300		/* Base address of DMA 0 */ -#define	MCFDMA_BASE1		0x340		/* Base address of DMA 1 */ -#define	MCFDMA_BASE2		0x380		/* Base address of DMA 2 */ -#define	MCFDMA_BASE3		0x3C0		/* Base address of DMA 3 */ -#endif - -  #if !defined(CONFIG_M5272)  /* diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h index ee5e4ccce89..66203c334c6 100644 --- a/arch/m68k/include/asm/mcfgpio.h +++ b/arch/m68k/include/asm/mcfgpio.h @@ -16,25 +16,293 @@  #ifndef mcfgpio_h  #define mcfgpio_h -#include <linux/io.h> +#ifdef CONFIG_GPIOLIB  #include <asm-generic/gpio.h> +#else -struct mcf_gpio_chip { -	struct gpio_chip gpio_chip; -	void __iomem *pddr; -	void __iomem *podr; -	void __iomem *ppdr; -	void __iomem *setr; -	void __iomem *clrr; -	const u8 *gpio_to_pinmux; -}; - -int mcf_gpio_direction_input(struct gpio_chip *, unsigned); -int mcf_gpio_get_value(struct gpio_chip *, unsigned); -int mcf_gpio_direction_output(struct gpio_chip *, unsigned, int); -void mcf_gpio_set_value(struct gpio_chip *, unsigned, int); -void mcf_gpio_set_value_fast(struct gpio_chip *, unsigned, int); -int mcf_gpio_request(struct gpio_chip *, unsigned); -void mcf_gpio_free(struct gpio_chip *, unsigned); +int __mcfgpio_get_value(unsigned gpio); +void __mcfgpio_set_value(unsigned gpio, int value); +int __mcfgpio_direction_input(unsigned gpio); +int __mcfgpio_direction_output(unsigned gpio, int value); +int __mcfgpio_request(unsigned gpio); +void __mcfgpio_free(unsigned gpio); + +/* our alternate 'gpiolib' functions */ +static inline int __gpio_get_value(unsigned gpio) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		return __mcfgpio_get_value(gpio); +	else +		return -EINVAL; +} + +static inline void __gpio_set_value(unsigned gpio, int value) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		__mcfgpio_set_value(gpio, value); +} + +static inline int __gpio_cansleep(unsigned gpio) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		return 0; +	else +		return -EINVAL; +} + +static inline int __gpio_to_irq(unsigned gpio) +{ +	return -EINVAL; +} + +static inline int gpio_direction_input(unsigned gpio) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		return __mcfgpio_direction_input(gpio); +	else +		return -EINVAL; +} + +static inline int gpio_direction_output(unsigned gpio, int value) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		return __mcfgpio_direction_output(gpio, value); +	else +		return -EINVAL; +} + +static inline int gpio_request(unsigned gpio, const char *label) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		return __mcfgpio_request(gpio); +	else +		return -EINVAL; +} + +static inline void gpio_free(unsigned gpio) +{ +	if (gpio < MCFGPIO_PIN_MAX) +		__mcfgpio_free(gpio); +} + +#endif /* CONFIG_GPIOLIB */ + + +/* + * The Freescale Coldfire family is quite varied in how they implement GPIO. + * Some parts have 8 bit ports, some have 16bit and some have 32bit; some have + * only one port, others have multiple ports; some have a single data latch + * for both input and output, others have a separate pin data register to read + * input; some require a read-modify-write access to change an output, others + * have set and clear registers for some of the outputs; Some have all the + * GPIOs in a single control area, others have some GPIOs implemented in + * different modules. + * + * This implementation attempts accommodate the differences while presenting + * a generic interface that will optimize to as few instructions as possible. + */ +#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ +    defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ +    defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ +    defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ +    defined(CONFIG_M5441x) + +/* These parts have GPIO organized by 8 bit ports */ + +#define MCFGPIO_PORTTYPE		u8 +#define MCFGPIO_PORTSIZE		8 +#define mcfgpio_read(port)		__raw_readb(port) +#define mcfgpio_write(data, port)	__raw_writeb(data, port) + +#elif defined(CONFIG_M5307) || defined(CONFIG_M5407) || defined(CONFIG_M5272) + +/* These parts have GPIO organized by 16 bit ports */ + +#define MCFGPIO_PORTTYPE		u16 +#define MCFGPIO_PORTSIZE		16 +#define mcfgpio_read(port)		__raw_readw(port) +#define mcfgpio_write(data, port)	__raw_writew(data, port) + +#elif defined(CONFIG_M5249) || defined(CONFIG_M525x) + +/* These parts have GPIO organized by 32 bit ports */ + +#define MCFGPIO_PORTTYPE		u32 +#define MCFGPIO_PORTSIZE		32 +#define mcfgpio_read(port)		__raw_readl(port) +#define mcfgpio_write(data, port)	__raw_writel(data, port)  #endif + +#define mcfgpio_bit(gpio)		(1 << ((gpio) %  MCFGPIO_PORTSIZE)) +#define mcfgpio_port(gpio)		((gpio) / MCFGPIO_PORTSIZE) + +#if defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ +    defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ +    defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ +    defined(CONFIG_M5441x) +/* + * These parts have an 'Edge' Port module (external interrupt/GPIO) which uses + * read-modify-write to change an output and a GPIO module which has separate + * set/clr registers to directly change outputs with a single write access. + */ +#if defined(CONFIG_M528x) +/* + * The 528x also has GPIOs in other modules (GPT, QADC) which use + * read-modify-write as well as those controlled by the EPORT and GPIO modules. + */ +#define MCFGPIO_SCR_START		40 +#elif defined(CONFIGM5441x) +/* The m5441x EPORT doesn't have its own GPIO port, uses PORT C */ +#define MCFGPIO_SCR_START		0 +#else +#define MCFGPIO_SCR_START		8 +#endif + +#define MCFGPIO_SETR_PORT(gpio)		(MCFGPIO_SETR + \ +					mcfgpio_port(gpio - MCFGPIO_SCR_START)) + +#define MCFGPIO_CLRR_PORT(gpio)		(MCFGPIO_CLRR + \ +					mcfgpio_port(gpio - MCFGPIO_SCR_START)) +#else + +#define MCFGPIO_SCR_START		MCFGPIO_PIN_MAX +/* with MCFGPIO_SCR == MCFGPIO_PIN_MAX, these will be optimized away */ +#define MCFGPIO_SETR_PORT(gpio)		0 +#define MCFGPIO_CLRR_PORT(gpio)		0 + +#endif +/* + * Coldfire specific helper functions + */ + +/* return the port pin data register for a gpio */ +static inline u32 __mcfgpio_ppdr(unsigned gpio) +{ +#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ +    defined(CONFIG_M5307) || defined(CONFIG_M5407) +	return MCFSIM_PADAT; +#elif defined(CONFIG_M5272) +	if (gpio < 16) +		return MCFSIM_PADAT; +	else if (gpio < 32) +		return MCFSIM_PBDAT; +	else +		return MCFSIM_PCDAT; +#elif defined(CONFIG_M5249) || defined(CONFIG_M525x) +	if (gpio < 32) +		return MCFSIM2_GPIOREAD; +	else +		return MCFSIM2_GPIO1READ; +#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ +      defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ +      defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ +      defined(CONFIG_M5441x) +#if !defined(CONFIG_M5441x) +	if (gpio < 8) +		return MCFEPORT_EPPDR; +#if defined(CONFIG_M528x) +	else if (gpio < 16) +		return MCFGPTA_GPTPORT; +	else if (gpio < 24) +		return MCFGPTB_GPTPORT; +	else if (gpio < 32) +		return MCFQADC_PORTQA; +	else if (gpio < 40) +		return MCFQADC_PORTQB; +#endif /* defined(CONFIG_M528x) */ +	else +#endif /* !defined(CONFIG_M5441x) */ +		return MCFGPIO_PPDR + mcfgpio_port(gpio - MCFGPIO_SCR_START); +#else +	return 0; +#endif +} + +/* return the port output data register for a gpio */ +static inline u32 __mcfgpio_podr(unsigned gpio) +{ +#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ +    defined(CONFIG_M5307) || defined(CONFIG_M5407) +	return MCFSIM_PADAT; +#elif defined(CONFIG_M5272) +	if (gpio < 16) +		return MCFSIM_PADAT; +	else if (gpio < 32) +		return MCFSIM_PBDAT; +	else +		return MCFSIM_PCDAT; +#elif defined(CONFIG_M5249) || defined(CONFIG_M525x) +	if (gpio < 32) +		return MCFSIM2_GPIOWRITE; +	else +		return MCFSIM2_GPIO1WRITE; +#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ +      defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ +      defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ +      defined(CONFIG_M5441x) +#if !defined(CONFIG_M5441x) +	if (gpio < 8) +		return MCFEPORT_EPDR; +#if defined(CONFIG_M528x) +	else if (gpio < 16) +		return MCFGPTA_GPTPORT; +	else if (gpio < 24) +		return MCFGPTB_GPTPORT; +	else if (gpio < 32) +		return MCFQADC_PORTQA; +	else if (gpio < 40) +		return MCFQADC_PORTQB; +#endif /* defined(CONFIG_M528x) */ +	else +#endif /* !defined(CONFIG_M5441x) */ +		return MCFGPIO_PODR + mcfgpio_port(gpio - MCFGPIO_SCR_START); +#else +	return 0; +#endif +} + +/* return the port direction data register for a gpio */ +static inline u32 __mcfgpio_pddr(unsigned gpio) +{ +#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ +    defined(CONFIG_M5307) || defined(CONFIG_M5407) +	return MCFSIM_PADDR; +#elif defined(CONFIG_M5272) +	if (gpio < 16) +		return MCFSIM_PADDR; +	else if (gpio < 32) +		return MCFSIM_PBDDR; +	else +		return MCFSIM_PCDDR; +#elif defined(CONFIG_M5249) || defined(CONFIG_M525x) +	if (gpio < 32) +		return MCFSIM2_GPIOENABLE; +	else +		return MCFSIM2_GPIO1ENABLE; +#elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ +      defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ +      defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ +      defined(CONFIG_M5441x) +#if !defined(CONFIG_M5441x) +	if (gpio < 8) +		return MCFEPORT_EPDDR; +#if defined(CONFIG_M528x) +	else if (gpio < 16) +		return MCFGPTA_GPTDDR; +	else if (gpio < 24) +		return MCFGPTB_GPTDDR; +	else if (gpio < 32) +		return MCFQADC_DDRQA; +	else if (gpio < 40) +		return MCFQADC_DDRQB; +#endif /* defined(CONFIG_M528x) */ +	else +#endif /* !defined(CONFIG_M5441x) */ +		return MCFGPIO_PDDR + mcfgpio_port(gpio - MCFGPIO_SCR_START); +#else +	return 0; +#endif +} + +#endif /* mcfgpio_h */ diff --git a/arch/m68k/include/asm/mcfmbus.h b/arch/m68k/include/asm/mcfmbus.h deleted file mode 100644 index 319899c47a2..00000000000 --- a/arch/m68k/include/asm/mcfmbus.h +++ /dev/null @@ -1,77 +0,0 @@ -/****************************************************************************/ - -/* - *      mcfmbus.h -- Coldfire MBUS support defines. - * - *      (C) Copyright 1999, Martin Floeer (mfloeer@axcent.de)  - */ - -/****************************************************************************/ - - -#ifndef mcfmbus_h -#define mcfmbus_h - - -#define MCFMBUS_BASE		0x280 -#define MCFMBUS_IRQ_VECTOR	0x19 -#define MCFMBUS_IRQ		0x1 -#define MCFMBUS_CLK		0x3f -#define MCFMBUS_IRQ_LEVEL	0x07	/*IRQ Level 1*/ -#define MCFMBUS_ADDRESS		0x01 - - -/* -*	Define the 5307 MBUS register set addresses -*/ - -#define MCFMBUS_MADR	0x00 -#define MCFMBUS_MFDR	0x04 -#define MCFMBUS_MBCR	0x08 -#define MCFMBUS_MBSR	0x0C -#define MCFMBUS_MBDR	0x10 - - -#define MCFMBUS_MADR_ADDR(a)	(((a)&0x7F)<<0x01) /*Slave Address*/ - -#define MCFMBUS_MFDR_MBC(a)	((a)&0x3F)	   /*M-Bus Clock*/ - -/* -*	Define bit flags in Control Register -*/ - -#define MCFMBUS_MBCR_MEN           (0x80)  /* M-Bus Enable                 */ -#define MCFMBUS_MBCR_MIEN          (0x40)  /* M-Bus Interrupt Enable       */ -#define MCFMBUS_MBCR_MSTA          (0x20)  /* Master/Slave Mode Select Bit */ -#define MCFMBUS_MBCR_MTX           (0x10)  /* Transmit/Rcv Mode Select Bit */ -#define MCFMBUS_MBCR_TXAK          (0x08)  /* Transmit Acknowledge Enable  */ -#define MCFMBUS_MBCR_RSTA          (0x04)  /* Repeat Start                 */ - -/* -*	Define bit flags in Status Register -*/ - -#define MCFMBUS_MBSR_MCF           (0x80)  /* Data Transfer Complete       */ -#define MCFMBUS_MBSR_MAAS          (0x40)  /* Addressed as a Slave         */ -#define MCFMBUS_MBSR_MBB           (0x20)  /* Bus Busy                     */ -#define MCFMBUS_MBSR_MAL           (0x10)  /* Arbitration Lost             */ -#define MCFMBUS_MBSR_SRW           (0x04)  /* Slave Transmit               */ -#define MCFMBUS_MBSR_MIF           (0x02)  /* M-Bus Interrupt              */ -#define MCFMBUS_MBSR_RXAK          (0x01)  /* No Acknowledge Received      */ - -/* -*	Define bit flags in DATA I/O Register -*/ - -#define MCFMBUS_MBDR_READ          (0x01)  /* 1=read 0=write MBUS */ - -#define MBUSIOCSCLOCK		1 -#define MBUSIOCGCLOCK		2 -#define MBUSIOCSADDR			3 -#define MBUSIOCGADDR			4 -#define MBUSIOCSSLADDR			5 -#define MBUSIOCGSLADDR			6 -#define MBUSIOCSSUBADDR			7 -#define MBUSIOCGSUBADDR			8 - -#endif diff --git a/arch/m68k/include/asm/mcfmmu.h b/arch/m68k/include/asm/mcfmmu.h new file mode 100644 index 00000000000..26cc3d5a63f --- /dev/null +++ b/arch/m68k/include/asm/mcfmmu.h @@ -0,0 +1,112 @@ +/* + *	mcfmmu.h -- definitions for the ColdFire v4e MMU + * + *	(C) Copyright 2011,  Greg Ungerer <gerg@uclinux.org> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#ifndef	MCFMMU_H +#define	MCFMMU_H + +/* + *	The MMU support registers are mapped into the address space using + *	the processor MMUBASE register. We used a fixed address for mapping, + *	there doesn't seem any need to make this configurable yet. + */ +#define	MMUBASE		0xfe000000 + +/* + *	The support registers of the MMU. Names are the sames as those + *	used in the Freescale v4e documentation. + */ +#define	MMUCR		(MMUBASE + 0x00)	/* Control register */ +#define	MMUOR		(MMUBASE + 0x04)	/* Operation register */ +#define	MMUSR		(MMUBASE + 0x08)	/* Status register */ +#define	MMUAR		(MMUBASE + 0x10)	/* TLB Address register */ +#define	MMUTR		(MMUBASE + 0x14)	/* TLB Tag register */ +#define	MMUDR		(MMUBASE + 0x18)	/* TLB Data register */ + +/* + *	MMU Control register bit flags + */ +#define	MMUCR_EN	0x00000001		/* Virtual mode enable */ +#define	MMUCR_ASM	0x00000002		/* Address space mode */ + +/* + *	MMU Operation register. + */ +#define	MMUOR_UAA	0x00000001		/* Update allocatiom address */ +#define	MMUOR_ACC	0x00000002		/* TLB access */ +#define	MMUOR_RD	0x00000004		/* TLB access read */ +#define	MMUOR_WR	0x00000000		/* TLB access write */ +#define	MMUOR_ADR	0x00000008		/* TLB address select */ +#define	MMUOR_ITLB	0x00000010		/* ITLB operation */ +#define	MMUOR_CAS	0x00000020		/* Clear non-locked ASID TLBs */ +#define	MMUOR_CNL	0x00000040		/* Clear non-locked TLBs */ +#define	MMUOR_CA	0x00000080		/* Clear all TLBs */ +#define	MMUOR_STLB	0x00000100		/* Search TLBs */ +#define	MMUOR_AAN	16			/* TLB allocation address */ +#define	MMUOR_AAMASK	0xffff0000		/* AA mask */ + +/* + *	MMU Status register. + */ +#define	MMUSR_HIT	0x00000002		/* Search TLB hit */ +#define	MMUSR_WF	0x00000008		/* Write access fault */ +#define	MMUSR_RF	0x00000010		/* Read access fault */ +#define	MMUSR_SPF	0x00000020		/* Supervisor protect fault */ + +/* + *	MMU Read/Write Tag register. + */ +#define	MMUTR_V		0x00000001		/* Valid */ +#define	MMUTR_SG	0x00000002		/* Shared global */ +#define	MMUTR_IDN	2			/* Address Space ID */ +#define	MMUTR_IDMASK	0x000003fc		/* ASID mask */ +#define	MMUTR_VAN	10			/* Virtual Address */ +#define	MMUTR_VAMASK	0xfffffc00		/* VA mask */ + +/* + *	MMU Read/Write Data register. + */ +#define	MMUDR_LK	0x00000002		/* Lock entry */ +#define	MMUDR_X		0x00000004		/* Execute access enable */ +#define	MMUDR_W		0x00000008		/* Write access enable */ +#define	MMUDR_R		0x00000010		/* Read access enable */ +#define	MMUDR_SP	0x00000020		/* Supervisor access enable */ +#define	MMUDR_CM_CWT	0x00000000		/* Cachable write thru */ +#define	MMUDR_CM_CCB	0x00000040		/* Cachable copy back */ +#define	MMUDR_CM_NCP	0x00000080		/* Non-cachable precise */ +#define	MMUDR_CM_NCI	0x000000c0		/* Non-cachable imprecise */ +#define	MMUDR_SZ_1MB	0x00000000		/* 1MB page size */ +#define	MMUDR_SZ_4KB	0x00000100		/* 4kB page size */ +#define	MMUDR_SZ_8KB	0x00000200		/* 8kB page size */ +#define	MMUDR_SZ_1KB	0x00000300		/* 1kB page size */ +#define	MMUDR_PAN	10			/* Physical address */ +#define	MMUDR_PAMASK	0xfffffc00		/* PA mask */ + +#ifndef __ASSEMBLY__ + +/* + *	Simple access functions for the MMU registers. Nothing fancy + *	currently required, just simple 32bit access. + */ +static inline u32 mmu_read(u32 a) +{ +	return *((volatile u32 *) a); +} + +static inline void mmu_write(u32 a, u32 v) +{ +	*((volatile u32 *) a) = v; +	__asm__ __volatile__ ("nop"); +} + +int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word); + +#endif + +#endif	/* MCFMMU_H */ diff --git a/arch/m68k/include/asm/mcfpit.h b/arch/m68k/include/asm/mcfpit.h index f570cf64fd2..9fd321ca072 100644 --- a/arch/m68k/include/asm/mcfpit.h +++ b/arch/m68k/include/asm/mcfpit.h @@ -11,22 +11,8 @@  #define	mcfpit_h  /****************************************************************************/ - -/* - *	Get address specific defines for the 5270/5271, 5280/5282, and 5208. - */ -#if defined(CONFIG_M520x) -#define	MCFPIT_BASE1		0x00080000	/* Base address of TIMER1 */ -#define	MCFPIT_BASE2		0x00084000	/* Base address of TIMER2 */ -#else -#define	MCFPIT_BASE1		0x00150000	/* Base address of TIMER1 */ -#define	MCFPIT_BASE2		0x00160000	/* Base address of TIMER2 */ -#define	MCFPIT_BASE3		0x00170000	/* Base address of TIMER3 */ -#define	MCFPIT_BASE4		0x00180000	/* Base address of TIMER4 */ -#endif -  /* - *	Define the PIT timer register set addresses. + *	Define the PIT timer register address offsets.   */  #define	MCFPIT_PCSR		0x0		/* PIT control register */  #define	MCFPIT_PMR		0x2		/* PIT modulus register */ diff --git a/arch/m68k/include/asm/mcfqspi.h b/arch/m68k/include/asm/mcfqspi.h index 39d90d51111..7b51416ccae 100644 --- a/arch/m68k/include/asm/mcfqspi.h +++ b/arch/m68k/include/asm/mcfqspi.h @@ -21,15 +21,6 @@  #ifndef mcfqspi_h  #define mcfqspi_h -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) -#define	MCFQSPI_IOBASE		(MCF_IPSBAR + 0x340) -#elif defined(CONFIG_M5249) -#define MCFQSPI_IOBASE		(MCF_MBAR + 0x300) -#elif defined(CONFIG_M520x) || defined(CONFIG_M532x) -#define MCFQSPI_IOBASE		0xFC058000 -#endif -#define MCFQSPI_IOSIZE		0x40 -  /**   * struct mcfqspi_cs_control - chip select control for the coldfire qspi driver   * @setup: setup the control; allocate gpio's, etc. May be NULL. diff --git a/arch/m68k/include/asm/mcfsim.h b/arch/m68k/include/asm/mcfsim.h index 6901fd68165..bc867de8a1e 100644 --- a/arch/m68k/include/asm/mcfsim.h +++ b/arch/m68k/include/asm/mcfsim.h @@ -24,8 +24,8 @@  #elif defined(CONFIG_M523x)  #include <asm/m523xsim.h>  #include <asm/mcfintc.h> -#elif defined(CONFIG_M5249) -#include <asm/m5249sim.h> +#elif defined(CONFIG_M5249) || defined(CONFIG_M525x) +#include <asm/m525xsim.h>  #include <asm/mcfintc.h>  #elif defined(CONFIG_M527x)  #include <asm/m527xsim.h> @@ -36,13 +36,15 @@  #elif defined(CONFIG_M5307)  #include <asm/m5307sim.h>  #include <asm/mcfintc.h> -#elif defined(CONFIG_M532x) -#include <asm/m532xsim.h> +#elif defined(CONFIG_M53xx) +#include <asm/m53xxsim.h>  #elif defined(CONFIG_M5407)  #include <asm/m5407sim.h>  #include <asm/mcfintc.h> -#elif defined(CONFIG_M548x) -#include <asm/m548xsim.h> +#elif defined(CONFIG_M54xx) +#include <asm/m54xxsim.h> +#elif defined(CONFIG_M5441x) +#include <asm/m5441xsim.h>  #endif  /****************************************************************************/ diff --git a/arch/m68k/include/asm/mcfslt.h b/arch/m68k/include/asm/mcfslt.h index d0d0ecba533..c2314b6f8ca 100644 --- a/arch/m68k/include/asm/mcfslt.h +++ b/arch/m68k/include/asm/mcfslt.h @@ -13,13 +13,6 @@  /****************************************************************************/  /* - *	Get address specific defines for the 547x. - */ -#define MCFSLT_TIMER0		0x900	/* Base address of TIMER0 */ -#define MCFSLT_TIMER1		0x910	/* Base address of TIMER1 */ - - -/*   *	Define the SLT timer register set addresses.   */  #define MCFSLT_STCNT		0x00	/* Terminal count */ diff --git a/arch/m68k/include/asm/mcftimer.h b/arch/m68k/include/asm/mcftimer.h index 0f90f6d2227..089f0f150bb 100644 --- a/arch/m68k/include/asm/mcftimer.h +++ b/arch/m68k/include/asm/mcftimer.h @@ -12,29 +12,6 @@  #define	mcftimer_h  /****************************************************************************/ - -/* - *	Get address specific defines for this ColdFire member. - */ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) -#define	MCFTIMER_BASE1		0x100		/* Base address of TIMER1 */ -#define	MCFTIMER_BASE2		0x120		/* Base address of TIMER2 */ -#elif defined(CONFIG_M5272) -#define MCFTIMER_BASE1		0x200           /* Base address of TIMER1 */ -#define MCFTIMER_BASE2		0x220           /* Base address of TIMER2 */ -#define MCFTIMER_BASE3		0x240           /* Base address of TIMER4 */ -#define MCFTIMER_BASE4		0x260           /* Base address of TIMER3 */ -#elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) -#define MCFTIMER_BASE1		0x140           /* Base address of TIMER1 */ -#define MCFTIMER_BASE2		0x180           /* Base address of TIMER2 */ -#elif defined(CONFIG_M532x) -#define MCFTIMER_BASE1		0xfc070000	/* Base address of TIMER1 */ -#define MCFTIMER_BASE2		0xfc074000	/* Base address of TIMER2 */ -#define MCFTIMER_BASE3		0xfc078000	/* Base address of TIMER3 */ -#define MCFTIMER_BASE4		0xfc07c000	/* Base address of TIMER4 */ -#endif - -  /*   *	Define the TIMER register set addresses.   */ @@ -42,7 +19,7 @@  #define	MCFTIMER_TRR		0x04		/* Timer Reference (r/w) */  #define	MCFTIMER_TCR		0x08		/* Timer Capture reg (r/w) */  #define	MCFTIMER_TCN		0x0C		/* Timer Counter reg (r/w) */ -#if defined(CONFIG_M532x) +#if defined(CONFIG_M53xx) || defined(CONFIG_M5441x)  #define	MCFTIMER_TER		0x03		/* Timer Event reg (r/w) */  #else  #define	MCFTIMER_TER		0x11		/* Timer Event reg (r/w) */ @@ -50,7 +27,7 @@  /*   *	Bit definitions for the Timer Mode Register (TMR). - *	Register bit flags are common accross ColdFires. + *	Register bit flags are common across ColdFires.   */  #define	MCFTIMER_TMR_PREMASK	0xff00		/* Prescalar mask */  #define	MCFTIMER_TMR_DISCE	0x0000		/* Disable capture */ diff --git a/arch/m68k/include/asm/mcfuart.h b/arch/m68k/include/asm/mcfuart.h index db72e2b889c..b40c20f6664 100644 --- a/arch/m68k/include/asm/mcfuart.h +++ b/arch/m68k/include/asm/mcfuart.h @@ -12,49 +12,6 @@  #define	mcfuart_h  /****************************************************************************/ -/* - *	Define the base address of the UARTS within the MBAR address - *	space. - */ -#if defined(CONFIG_M5272) -#define	MCFUART_BASE1		0x100		/* Base address of UART1 */ -#define	MCFUART_BASE2		0x140		/* Base address of UART2 */ -#elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) -#if defined(CONFIG_NETtel) -#define	MCFUART_BASE1		0x180		/* Base address of UART1 */ -#define	MCFUART_BASE2		0x140		/* Base address of UART2 */ -#else -#define	MCFUART_BASE1		0x140		/* Base address of UART1 */ -#define	MCFUART_BASE2		0x180		/* Base address of UART2 */ -#endif -#elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) -#define MCFUART_BASE1		0x200           /* Base address of UART1 */ -#define MCFUART_BASE2		0x240           /* Base address of UART2 */ -#define MCFUART_BASE3		0x280           /* Base address of UART3 */ -#elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) -#if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) -#define MCFUART_BASE1		0x200           /* Base address of UART1 */ -#define MCFUART_BASE2		0x1c0           /* Base address of UART2 */ -#else -#define MCFUART_BASE1		0x1c0           /* Base address of UART1 */ -#define MCFUART_BASE2		0x200           /* Base address of UART2 */ -#endif -#elif defined(CONFIG_M520x) -#define MCFUART_BASE1		0x60000		/* Base address of UART1 */ -#define MCFUART_BASE2		0x64000		/* Base address of UART2 */ -#define MCFUART_BASE3		0x68000		/* Base address of UART2 */ -#elif defined(CONFIG_M532x) -#define MCFUART_BASE1		0xfc060000	/* Base address of UART1 */ -#define MCFUART_BASE2		0xfc064000	/* Base address of UART2 */ -#define MCFUART_BASE3		0xfc068000	/* Base address of UART3 */ -#elif defined(CONFIG_M548x) -#define MCFUART_BASE1		0x8600		/* on M548x */ -#define MCFUART_BASE2		0x8700		/* on M548x */ -#define MCFUART_BASE3		0x8800		/* on M548x */ -#define MCFUART_BASE4		0x8900		/* on M548x */ -#endif - -  #include <linux/serial_core.h>  #include <linux/platform_device.h> @@ -84,7 +41,10 @@ struct mcf_platform_uart {  #define	MCFUART_UTF		0x28		/* Transmitter FIFO (r/w) */  #define	MCFUART_URF		0x2c		/* Receiver FIFO (r/w) */  #define	MCFUART_UFPD		0x30		/* Frac Prec. Divider (r/w) */ -#else +#endif +#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ +	defined(CONFIG_M5249) || defined(CONFIG_M525x) || \ +	defined(CONFIG_M5307) || defined(CONFIG_M5407)  #define	MCFUART_UIVR		0x30		/* Interrupt Vector (r/w) */  #endif  #define	MCFUART_UIPR		0x34		/* Input Port (r) */ @@ -217,7 +177,7 @@ struct mcf_platform_uart {  #define	MCFUART_URF_RXS		0xc0		/* Receiver status */  #endif -#if defined(CONFIG_M548x) +#if defined(CONFIG_M54xx)  #define MCFUART_TXFIFOSIZE	512  #elif defined(CONFIG_M5272)  #define MCFUART_TXFIFOSIZE	25 diff --git a/arch/m68k/include/asm/mman.h b/arch/m68k/include/asm/mman.h deleted file mode 100644 index 8eebf89f5ab..00000000000 --- a/arch/m68k/include/asm/mman.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/mman.h> diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm/mmu_context.h index 7d4341e55a9..dc3be991d63 100644 --- a/arch/m68k/include/asm/mmu_context.h +++ b/arch/m68k/include/asm/mmu_context.h @@ -8,7 +8,206 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)  }  #ifdef CONFIG_MMU -#ifndef CONFIG_SUN3 + +#if defined(CONFIG_COLDFIRE) + +#include <asm/atomic.h> +#include <asm/bitops.h> +#include <asm/mcfmmu.h> +#include <asm/mmu.h> + +#define NO_CONTEXT		256 +#define LAST_CONTEXT		255 +#define FIRST_CONTEXT		1 + +extern unsigned long context_map[]; +extern mm_context_t next_mmu_context; + +extern atomic_t nr_free_contexts; +extern struct mm_struct *context_mm[LAST_CONTEXT+1]; +extern void steal_context(void); + +static inline void get_mmu_context(struct mm_struct *mm) +{ +	mm_context_t ctx; + +	if (mm->context != NO_CONTEXT) +		return; +	while (atomic_dec_and_test_lt(&nr_free_contexts)) { +		atomic_inc(&nr_free_contexts); +		steal_context(); +	} +	ctx = next_mmu_context; +	while (test_and_set_bit(ctx, context_map)) { +		ctx = find_next_zero_bit(context_map, LAST_CONTEXT+1, ctx); +		if (ctx > LAST_CONTEXT) +			ctx = 0; +	} +	next_mmu_context = (ctx + 1) & LAST_CONTEXT; +	mm->context = ctx; +	context_mm[ctx] = mm; +} + +/* + * Set up the context for a new address space. + */ +#define init_new_context(tsk, mm)	(((mm)->context = NO_CONTEXT), 0) + +/* + * We're finished using the context for an address space. + */ +static inline void destroy_context(struct mm_struct *mm) +{ +	if (mm->context != NO_CONTEXT) { +		clear_bit(mm->context, context_map); +		mm->context = NO_CONTEXT; +		atomic_inc(&nr_free_contexts); +	} +} + +static inline void set_context(mm_context_t context, pgd_t *pgd) +{ +	__asm__ __volatile__ ("movec %0,%%asid" : : "d" (context)); +} + +static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, +	struct task_struct *tsk) +{ +	get_mmu_context(tsk->mm); +	set_context(tsk->mm->context, next->pgd); +} + +/* + * After we have set current->mm to a new value, this activates + * the context for the new mm so we see the new mappings. + */ +static inline void activate_mm(struct mm_struct *active_mm, +	struct mm_struct *mm) +{ +	get_mmu_context(mm); +	set_context(mm->context, mm->pgd); +} + +#define deactivate_mm(tsk, mm) do { } while (0) + +extern void mmu_context_init(void); +#define prepare_arch_switch(next) load_ksp_mmu(next) + +static inline void load_ksp_mmu(struct task_struct *task) +{ +	unsigned long flags; +	struct mm_struct *mm; +	int asid; +	pgd_t *pgd; +	pmd_t *pmd; +	pte_t *pte; +	unsigned long mmuar; + +	local_irq_save(flags); +	mmuar = task->thread.ksp; + +	/* Search for a valid TLB entry, if one is found, don't remap */ +	mmu_write(MMUAR, mmuar); +	mmu_write(MMUOR, MMUOR_STLB | MMUOR_ADR); +	if (mmu_read(MMUSR) & MMUSR_HIT) +		goto end; + +	if (mmuar >= PAGE_OFFSET) { +		mm = &init_mm; +	} else { +		pr_info("load_ksp_mmu: non-kernel mm found: 0x%p\n", task->mm); +		mm = task->mm; +	} + +	if (!mm) +		goto bug; + +	pgd = pgd_offset(mm, mmuar); +	if (pgd_none(*pgd)) +		goto bug; + +	pmd = pmd_offset(pgd, mmuar); +	if (pmd_none(*pmd)) +		goto bug; + +	pte = (mmuar >= PAGE_OFFSET) ? pte_offset_kernel(pmd, mmuar) +				     : pte_offset_map(pmd, mmuar); +	if (pte_none(*pte) || !pte_present(*pte)) +		goto bug; + +	set_pte(pte, pte_mkyoung(*pte)); +	asid = mm->context & 0xff; +	if (!pte_dirty(*pte) && mmuar <= PAGE_OFFSET) +		set_pte(pte, pte_wrprotect(*pte)); + +	mmu_write(MMUTR, (mmuar & PAGE_MASK) | (asid << MMUTR_IDN) | +		(((int)(pte->pte) & (int)CF_PAGE_MMUTR_MASK) +		>> CF_PAGE_MMUTR_SHIFT) | MMUTR_V); + +	mmu_write(MMUDR, (pte_val(*pte) & PAGE_MASK) | +		((pte->pte) & CF_PAGE_MMUDR_MASK) | MMUDR_SZ_8KB | MMUDR_X); + +	mmu_write(MMUOR, MMUOR_ACC | MMUOR_UAA); + +	goto end; + +bug: +	pr_info("ksp load failed: mm=0x%p ksp=0x08%lx\n", mm, mmuar); +end: +	local_irq_restore(flags); +} + +#elif defined(CONFIG_SUN3) +#include <asm/sun3mmu.h> +#include <linux/sched.h> + +extern unsigned long get_free_context(struct mm_struct *mm); +extern void clear_context(unsigned long context); + +/* set the context for a new task to unmapped */ +static inline int init_new_context(struct task_struct *tsk, +				   struct mm_struct *mm) +{ +	mm->context = SUN3_INVALID_CONTEXT; +	return 0; +} + +/* find the context given to this process, and if it hasn't already +   got one, go get one for it. */ +static inline void get_mmu_context(struct mm_struct *mm) +{ +	if (mm->context == SUN3_INVALID_CONTEXT) +		mm->context = get_free_context(mm); +} + +/* flush context if allocated... */ +static inline void destroy_context(struct mm_struct *mm) +{ +	if (mm->context != SUN3_INVALID_CONTEXT) +		clear_context(mm->context); +} + +static inline void activate_context(struct mm_struct *mm) +{ +	get_mmu_context(mm); +	sun3_put_context(mm->context); +} + +static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, +			     struct task_struct *tsk) +{ +	activate_context(tsk->mm); +} + +#define deactivate_mm(tsk, mm)	do { } while (0) + +static inline void activate_mm(struct mm_struct *prev_mm, +			       struct mm_struct *next_mm) +{ +	activate_context(next_mm); +} + +#else  #include <asm/setup.h>  #include <asm/page.h> @@ -103,55 +302,8 @@ static inline void activate_mm(struct mm_struct *prev_mm,  		switch_mm_0460(next_mm);  } -#else  /* CONFIG_SUN3 */ -#include <asm/sun3mmu.h> -#include <linux/sched.h> - -extern unsigned long get_free_context(struct mm_struct *mm); -extern void clear_context(unsigned long context); - -/* set the context for a new task to unmapped */ -static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) -{ -	mm->context = SUN3_INVALID_CONTEXT; -	return 0; -} - -/* find the context given to this process, and if it hasn't already -   got one, go get one for it. */ -static inline void get_mmu_context(struct mm_struct *mm) -{ -	if(mm->context == SUN3_INVALID_CONTEXT) -		mm->context = get_free_context(mm); -} - -/* flush context if allocated... */ -static inline void destroy_context(struct mm_struct *mm) -{ -	if(mm->context != SUN3_INVALID_CONTEXT) -		clear_context(mm->context); -} - -static inline void activate_context(struct mm_struct *mm) -{ -	get_mmu_context(mm); -	sun3_put_context(mm->context); -} - -static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) -{ -	activate_context(tsk->mm); -} - -#define deactivate_mm(tsk,mm)	do { } while (0) - -static inline void activate_mm(struct mm_struct *prev_mm, -			       struct mm_struct *next_mm) -{ -	activate_context(next_mm); -} -  #endif +  #else /* !CONFIG_MMU */  static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) diff --git a/arch/m68k/include/asm/module.h b/arch/m68k/include/asm/module.h index 5f21e11071b..8b58fce843d 100644 --- a/arch/m68k/include/asm/module.h +++ b/arch/m68k/include/asm/module.h @@ -1,17 +1,7 @@  #ifndef _ASM_M68K_MODULE_H  #define _ASM_M68K_MODULE_H -#ifdef CONFIG_MMU - -struct mod_arch_specific { -	struct m68k_fixup_info *fixup_start, *fixup_end; -}; - -#define MODULE_ARCH_INIT {				\ -	.fixup_start		= __start_fixup,	\ -	.fixup_end		= __stop_fixup,		\ -} - +#include <asm-generic/module.h>  enum m68k_fixup_type {  	m68k_fixup_memoffset, @@ -23,26 +13,29 @@ struct m68k_fixup_info {  	void *addr;  }; +struct mod_arch_specific { +	struct m68k_fixup_info *fixup_start, *fixup_end; +}; + +#ifdef CONFIG_MMU + +#define MODULE_ARCH_INIT {				\ +	.fixup_start		= __start_fixup,	\ +	.fixup_end		= __stop_fixup,		\ +} + +  #define m68k_fixup(type, addr)			\  	"	.section \".m68k_fixup\",\"aw\"\n"	\  	"	.long " #type "," #addr "\n"	\  	"	.previous\n" +#endif /* CONFIG_MMU */ +  extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];  struct module;  extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,  			 struct m68k_fixup_info *end); -#else - -struct mod_arch_specific { -}; - -#endif /* CONFIG_MMU */ - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr -  #endif /* _ASM_M68K_MODULE_H */ diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h index 2f02f264e69..24bcba496c7 100644 --- a/arch/m68k/include/asm/motorola_pgalloc.h +++ b/arch/m68k/include/asm/motorola_pgalloc.h @@ -29,18 +29,22 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)  static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)  { -	struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); +	struct page *page;  	pte_t *pte; +	page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);  	if(!page)  		return NULL; +	if (!pgtable_page_ctor(page)) { +		__free_page(page); +		return NULL; +	}  	pte = kmap(page);  	__flush_page_to_ram(pte);  	flush_tlb_kernel_page(pte);  	nocache_page(pte);  	kunmap(page); -	pgtable_page_ctor(page);  	return page;  } diff --git a/arch/m68k/include/asm/motorola_pgtable.h b/arch/m68k/include/asm/motorola_pgtable.h index 45bd3f589bf..e0fdd4d0807 100644 --- a/arch/m68k/include/asm/motorola_pgtable.h +++ b/arch/m68k/include/asm/motorola_pgtable.h @@ -8,6 +8,7 @@  #define _PAGE_PRESENT	0x001  #define _PAGE_SHORT	0x002  #define _PAGE_RONLY	0x004 +#define _PAGE_READWRITE	0x000  #define _PAGE_ACCESSED	0x008  #define _PAGE_DIRTY	0x010  #define _PAGE_SUPER	0x080	/* 68040 supervisor only */ diff --git a/arch/m68k/include/asm/msgbuf.h b/arch/m68k/include/asm/msgbuf.h deleted file mode 100644 index 243cb798de8..00000000000 --- a/arch/m68k/include/asm/msgbuf.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _M68K_MSGBUF_H -#define _M68K_MSGBUF_H - -/* - * The msqid64_ds structure for m68k architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct msqid64_ds { -	struct ipc64_perm msg_perm; -	__kernel_time_t msg_stime;	/* last msgsnd time */ -	unsigned long	__unused1; -	__kernel_time_t msg_rtime;	/* last msgrcv time */ -	unsigned long	__unused2; -	__kernel_time_t msg_ctime;	/* last change time */ -	unsigned long	__unused3; -	unsigned long  msg_cbytes;	/* current number of bytes on queue */ -	unsigned long  msg_qnum;	/* number of messages in queue */ -	unsigned long  msg_qbytes;	/* max number of bytes on queue */ -	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */ -	__kernel_pid_t msg_lrpid;	/* last receive pid */ -	unsigned long  __unused4; -	unsigned long  __unused5; -}; - -#endif /* _M68K_MSGBUF_H */ diff --git a/arch/m68k/include/asm/mutex.h b/arch/m68k/include/asm/mutex.h deleted file mode 100644 index 458c1f7fbc1..00000000000 --- a/arch/m68k/include/asm/mutex.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Pull in the generic implementation for the mutex fastpath. - * - * TODO: implement optimized primitives instead, or leave the generic - * implementation in place, or pick the atomic_xchg() based generic - * implementation. (see asm-generic/mutex-xchg.h for details) - */ - -#include <asm-generic/mutex-dec.h> diff --git a/arch/m68k/include/asm/mvme16xhw.h b/arch/m68k/include/asm/mvme16xhw.h index 6117f56653d..1eb89de631e 100644 --- a/arch/m68k/include/asm/mvme16xhw.h +++ b/arch/m68k/include/asm/mvme16xhw.h @@ -3,23 +3,6 @@  #include <asm/irq.h> -/* Board ID data structure - pointer to this retrieved from Bug by head.S */ - -/* Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc) */ - -extern long mvme_bdid_ptr; - -typedef struct { -	char	bdid[4]; -	u_char	rev, mth, day, yr; -	u_short	size, reserved; -	u_short	brdno; -	char brdsuffix[2]; -	u_long	options; -	u_short	clun, dlun, ctype, dnum; -	u_long	option2; -} t_bdid, *p_bdid; -  typedef struct {  	u_char	ack_icr, diff --git a/arch/m68k/include/asm/natfeat.h b/arch/m68k/include/asm/natfeat.h new file mode 100644 index 00000000000..a3521b80c3b --- /dev/null +++ b/arch/m68k/include/asm/natfeat.h @@ -0,0 +1,22 @@ +/* + * ARAnyM hardware support via Native Features (natfeats) + * + * Copyright (c) 2005 Petr Stehlik of ARAnyM dev team + * + * This software may be used and distributed according to the terms of + * the GNU General Public License (GPL), incorporated herein by reference. + */ + +#ifndef _NATFEAT_H +#define _NATFEAT_H + +long nf_get_id(const char *feature_name); +long nf_call(long id, ...); + +void nf_init(void); +void nf_shutdown(void); + +void nfprint(const char *fmt, ...) +	__attribute__ ((format (printf, 1, 2))); + +# endif /* _NATFEAT_H */ diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h index 4dec2d9fb99..2a7a7667d80 100644 --- a/arch/m68k/include/asm/nettel.h +++ b/arch/m68k/include/asm/nettel.h @@ -21,6 +21,7 @@  #ifdef CONFIG_COLDFIRE  #include <asm/coldfire.h>  #include <asm/mcfsim.h> +#include <asm/io.h>  #endif  /*---------------------------------------------------------------------------*/ @@ -86,16 +87,12 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)   */  static __inline__ unsigned int mcf_getppdata(void)  { -	volatile unsigned short *pp; -	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT); -	return((unsigned int) *pp); +	return readw(MCFSIM_PBDAT);  }  static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)  { -	volatile unsigned short *pp; -	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT); -	*pp = (*pp & ~mask) | bits; +	write((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);  }  #endif diff --git a/arch/m68k/include/asm/page.h b/arch/m68k/include/asm/page.h index dfebb7c1e37..38b024a0b04 100644 --- a/arch/m68k/include/asm/page.h +++ b/arch/m68k/include/asm/page.h @@ -6,10 +6,10 @@  #include <asm/page_offset.h>  /* PAGE_SHIFT determines the page size */ -#ifndef CONFIG_SUN3 -#define PAGE_SHIFT	(12) +#if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE) +#define PAGE_SHIFT	13  #else -#define PAGE_SHIFT	(13) +#define PAGE_SHIFT	12  #endif  #define PAGE_SIZE	(_AC(1, UL) << PAGE_SHIFT)  #define PAGE_MASK	(~(PAGE_SIZE-1)) @@ -36,14 +36,21 @@ typedef struct page *pgtable_t;  #define __pgd(x)	((pgd_t) { (x) } )  #define __pgprot(x)	((pgprot_t) { (x) } ) +extern unsigned long _rambase; +extern unsigned long _ramstart; +extern unsigned long _ramend; +  #endif /* !__ASSEMBLY__ */  #ifdef CONFIG_MMU -#include "page_mm.h" +#include <asm/page_mm.h>  #else -#include "page_no.h" +#include <asm/page_no.h>  #endif +#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \ +				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) +  #include <asm-generic/getorder.h>  #endif /* _M68K_PAGE_H */ diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h index 31d5570d656..5029f73e629 100644 --- a/arch/m68k/include/asm/page_mm.h +++ b/arch/m68k/include/asm/page_mm.h @@ -162,7 +162,7 @@ static inline __attribute_const__ int __virt_to_node_shift(void)  	pgdat->node_mem_map + (__pfn - pgdat->node_start_pfn);		\  })  #define page_to_pfn(_page) ({						\ -	struct page *__p = (_page);					\ +	const struct page *__p = (_page);				\  	struct pglist_data *pgdat;					\  	pgdat = &pg_data_map[page_to_nid(__p)];				\  	((__p) - pgdat->node_mem_map) + pgdat->node_start_pfn;		\ @@ -173,7 +173,4 @@ static inline __attribute_const__ int __virt_to_node_shift(void)  #endif /* __ASSEMBLY__ */ -#define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \ -				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -  #endif /* _M68K_PAGE_MM_H */ diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h index 90595721185..ef209169579 100644 --- a/arch/m68k/include/asm/page_no.h +++ b/arch/m68k/include/asm/page_no.h @@ -26,7 +26,7 @@ extern unsigned long memory_end;  #define pfn_to_virt(pfn)	__va((pfn) << PAGE_SHIFT)  #define virt_to_page(addr)	(mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) -#define page_to_virt(page)	((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) +#define page_to_virt(page)	__va(((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET))  #define pfn_to_page(pfn)	virt_to_page(pfn_to_virt(pfn))  #define page_to_pfn(page)	virt_to_pfn(page_to_virt(page)) diff --git a/arch/m68k/include/asm/page_offset.h b/arch/m68k/include/asm/page_offset.h index 1780152d81d..82626a8f1d0 100644 --- a/arch/m68k/include/asm/page_offset.h +++ b/arch/m68k/include/asm/page_offset.h @@ -1,11 +1,9 @@  /* This handles the memory map.. */ -#ifdef CONFIG_MMU -#ifndef CONFIG_SUN3 -#define PAGE_OFFSET_RAW		0x00000000 -#else +#if defined(CONFIG_RAMBASE) +#define PAGE_OFFSET_RAW		CONFIG_RAMBASE +#elif defined(CONFIG_SUN3)  #define PAGE_OFFSET_RAW		0x0E000000 -#endif  #else -#define	PAGE_OFFSET_RAW		CONFIG_RAMBASE +#define PAGE_OFFSET_RAW		0x00000000  #endif diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h index 646b1872f73..c85cece778e 100644 --- a/arch/m68k/include/asm/parport.h +++ b/arch/m68k/include/asm/parport.h @@ -11,12 +11,14 @@  #ifndef _ASM_M68K_PARPORT_H  #define _ASM_M68K_PARPORT_H 1 +#undef insl +#undef outsl  #define insl(port,buf,len)   isa_insb(port,buf,(len)<<2)  #define outsl(port,buf,len)  isa_outsb(port,buf,(len)<<2)  /* no dma, or IRQ autoprobing */ -static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); -static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) +static int parport_pc_find_isa_ports (int autoirq, int autodma); +static int parport_pc_find_nonpci_ports (int autoirq, int autodma)  {          if (! (MACH_IS_Q40))  	  return 0; /* count=0 */ diff --git a/arch/m68k/include/asm/pci.h b/arch/m68k/include/asm/pci.h index 4ad0aea48ab..848c3dfaad5 100644 --- a/arch/m68k/include/asm/pci.h +++ b/arch/m68k/include/asm/pci.h @@ -2,6 +2,7 @@  #define _ASM_M68K_PCI_H  #include <asm-generic/pci-dma-compat.h> +#include <asm-generic/pci.h>  /* The PCI address space does equal the physical memory   * address space.  The networking and block device layers use @@ -9,4 +10,9 @@   */  #define PCI_DMA_BUS_IS_PHYS	(1) +#define	pcibios_assign_all_busses()	1 + +#define	PCIBIOS_MIN_IO		0x00000100 +#define	PCIBIOS_MIN_MEM		0x02000000 +  #endif /* _ASM_M68K_PCI_H */ diff --git a/arch/m68k/include/asm/percpu.h b/arch/m68k/include/asm/percpu.h deleted file mode 100644 index 0859d048faf..00000000000 --- a/arch/m68k/include/asm/percpu.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_M68K_PERCPU_H -#define __ASM_M68K_PERCPU_H - -#include <asm-generic/percpu.h> - -#endif	/* __ASM_M68K_PERCPU_H */ diff --git a/arch/m68k/include/asm/pgalloc.h b/arch/m68k/include/asm/pgalloc.h index c294aad8a90..37bee7e3223 100644 --- a/arch/m68k/include/asm/pgalloc.h +++ b/arch/m68k/include/asm/pgalloc.h @@ -7,7 +7,9 @@  #ifdef CONFIG_MMU  #include <asm/virtconvert.h> -#ifdef CONFIG_SUN3 +#if defined(CONFIG_COLDFIRE) +#include <asm/mcf_pgalloc.h> +#elif defined(CONFIG_SUN3)  #include <asm/sun3_pgalloc.h>  #else  #include <asm/motorola_pgalloc.h> diff --git a/arch/m68k/include/asm/pgtable.h b/arch/m68k/include/asm/pgtable.h index ee6759eb445..a3d733b524d 100644 --- a/arch/m68k/include/asm/pgtable.h +++ b/arch/m68k/include/asm/pgtable.h @@ -1,5 +1,5 @@  #ifdef __uClinux__ -#include "pgtable_no.h" +#include <asm/pgtable_no.h>  #else -#include "pgtable_mm.h" +#include <asm/pgtable_mm.h>  #endif diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h index 87174c904d2..9f5abbda1ea 100644 --- a/arch/m68k/include/asm/pgtable_mm.h +++ b/arch/m68k/include/asm/pgtable_mm.h @@ -40,6 +40,8 @@  /* PGDIR_SHIFT determines what a third-level page table entry can map */  #ifdef CONFIG_SUN3  #define PGDIR_SHIFT     17 +#elif defined(CONFIG_COLDFIRE) +#define PGDIR_SHIFT     22  #else  #define PGDIR_SHIFT	25  #endif @@ -54,6 +56,10 @@  #define PTRS_PER_PTE   16  #define PTRS_PER_PMD   1  #define PTRS_PER_PGD   2048 +#elif defined(CONFIG_COLDFIRE) +#define PTRS_PER_PTE	512 +#define PTRS_PER_PMD	1 +#define PTRS_PER_PGD	1024  #else  #define PTRS_PER_PTE	1024  #define PTRS_PER_PMD	8 @@ -66,12 +72,22 @@  #ifdef CONFIG_SUN3  #define KMAP_START     0x0DC00000  #define KMAP_END       0x0E000000 +#elif defined(CONFIG_COLDFIRE) +#define KMAP_START	0xe0000000 +#define KMAP_END	0xf0000000  #else  #define	KMAP_START	0xd0000000  #define	KMAP_END	0xf0000000  #endif -#ifndef CONFIG_SUN3 +#ifdef CONFIG_SUN3 +extern unsigned long m68k_vmalloc_end; +#define VMALLOC_START 0x0f800000 +#define VMALLOC_END m68k_vmalloc_end +#elif defined(CONFIG_COLDFIRE) +#define VMALLOC_START	0xd0000000 +#define VMALLOC_END	0xe0000000 +#else  /* Just any arbitrary offset to the start of the vmalloc VM area: the   * current 8MB value just means that there will be a 8MB "hole" after the   * physical memory until the kernel virtual memory starts.  That means that @@ -82,11 +98,7 @@  #define VMALLOC_OFFSET	(8*1024*1024)  #define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))  #define VMALLOC_END KMAP_START -#else -extern unsigned long m68k_vmalloc_end; -#define VMALLOC_START 0x0f800000 -#define VMALLOC_END m68k_vmalloc_end -#endif /* CONFIG_SUN3 */ +#endif  /* zero page used for uninitialized stuff */  extern void *empty_zero_page; @@ -123,13 +135,12 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,  #define kern_addr_valid(addr)	(1) -#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)		\ -		remap_pfn_range(vma, vaddr, pfn, size, prot) -  /* MMU-specific headers */  #ifdef CONFIG_SUN3  #include <asm/sun3_pgtable.h> +#elif defined(CONFIG_COLDFIRE) +#include <asm/mcf_pgtable.h>  #else  #include <asm/motorola_pgtable.h>  #endif @@ -138,6 +149,9 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,  /*   * Macro to mark a page protection value as "uncacheable".   */ +#ifdef CONFIG_COLDFIRE +# define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | CF_PAGE_NOCACHE)) +#else  #ifdef SUN3_PAGE_NOCACHE  # define __SUN3_PAGE_NOCACHE	SUN3_PAGE_NOCACHE  #else @@ -152,6 +166,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,  	    ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S))	\  	    : (prot))) +#endif /* CONFIG_COLDFIRE */  #include <asm-generic/pgtable.h>  #endif /* !__ASSEMBLY__ */ diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h index bf86b29fe64..c527fc2ecf8 100644 --- a/arch/m68k/include/asm/pgtable_no.h +++ b/arch/m68k/include/asm/pgtable_no.h @@ -55,15 +55,14 @@ extern unsigned int kobjsize(const void *objp);   */  #define pgtable_cache_init()	do { } while (0) -#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)		\ -		remap_pfn_range(vma, vaddr, pfn, size, prot) -  /*   * All 32bit addresses are effectively valid for vmalloc...   * Sort of meaningless for non-VM targets.   */  #define	VMALLOC_START	0  #define	VMALLOC_END	0xffffffff +#define	KMAP_START	0 +#define	KMAP_END	0xffffffff  #include <asm-generic/pgtable.h> diff --git a/arch/m68k/include/asm/pinmux.h b/arch/m68k/include/asm/pinmux.h deleted file mode 100644 index 119ee686dbd..00000000000 --- a/arch/m68k/include/asm/pinmux.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Coldfire generic GPIO pinmux support. - * - * (C) Copyright 2009, Steven King <sfking@fdwdc.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - */ - -#ifndef pinmux_h -#define pinmux_h - -#define MCFPINMUX_NONE		-1 - -extern int mcf_pinmux_request(unsigned, unsigned); -extern void mcf_pinmux_release(unsigned, unsigned); - -static inline int mcf_pinmux_is_valid(unsigned pinmux) -{ -	return pinmux != MCFPINMUX_NONE; -} - -#endif - diff --git a/arch/m68k/include/asm/posix_types.h b/arch/m68k/include/asm/posix_types.h deleted file mode 100644 index 63cdcc142d9..00000000000 --- a/arch/m68k/include/asm/posix_types.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __ARCH_M68K_POSIX_TYPES_H -#define __ARCH_M68K_POSIX_TYPES_H - -/* - * This file is generally used by user-level software, so you need to - * be a little careful about namespace pollution etc.  Also, we cannot - * assume GCC is being used. - */ - -typedef unsigned long	__kernel_ino_t; -typedef unsigned short	__kernel_mode_t; -typedef unsigned short	__kernel_nlink_t; -typedef long		__kernel_off_t; -typedef int		__kernel_pid_t; -typedef unsigned short	__kernel_ipc_pid_t; -typedef unsigned short	__kernel_uid_t; -typedef unsigned short	__kernel_gid_t; -typedef unsigned int	__kernel_size_t; -typedef int		__kernel_ssize_t; -typedef int		__kernel_ptrdiff_t; -typedef long		__kernel_time_t; -typedef long		__kernel_suseconds_t; -typedef long		__kernel_clock_t; -typedef int		__kernel_timer_t; -typedef int		__kernel_clockid_t; -typedef int		__kernel_daddr_t; -typedef char *		__kernel_caddr_t; -typedef unsigned short	__kernel_uid16_t; -typedef unsigned short	__kernel_gid16_t; -typedef unsigned int	__kernel_uid32_t; -typedef unsigned int	__kernel_gid32_t; - -typedef unsigned short	__kernel_old_uid_t; -typedef unsigned short	__kernel_old_gid_t; -typedef unsigned short	__kernel_old_dev_t; - -#ifdef __GNUC__ -typedef long long	__kernel_loff_t; -#endif - -typedef struct { -	int	val[2]; -} __kernel_fsid_t; - -#if defined(__KERNEL__) - -#undef	__FD_SET -#define	__FD_SET(d, set)	((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) - -#undef	__FD_CLR -#define	__FD_CLR(d, set)	((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) - -#undef	__FD_ISSET -#define	__FD_ISSET(d, set)	((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) - -#undef	__FD_ZERO -#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) - -#endif /* defined(__KERNEL__) */ - -#endif diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index 7a6a7590cc0..b0768a65792 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h @@ -20,23 +20,26 @@  static inline unsigned long rdusp(void)  { -#ifdef CONFIG_COLDFIRE +#ifdef CONFIG_COLDFIRE_SW_A7  	extern unsigned int sw_usp;  	return sw_usp;  #else -	unsigned long usp; -	__asm__ __volatile__("move %/usp,%0" : "=a" (usp)); +	register unsigned long usp __asm__("a0"); +	/* move %usp,%a0 */ +	__asm__ __volatile__(".word 0x4e68" : "=a" (usp));  	return usp;  #endif  }  static inline void wrusp(unsigned long usp)  { -#ifdef CONFIG_COLDFIRE +#ifdef CONFIG_COLDFIRE_SW_A7  	extern unsigned int sw_usp;  	sw_usp = usp;  #else -	__asm__ __volatile__("move %0,%/usp" : : "a" (usp)); +	register unsigned long a0 __asm__("a0") = usp; +	/* move %a0,%usp */ +	__asm__ __volatile__(".word 0x4e60" : : "a" (a0) );  #endif  } @@ -45,10 +48,12 @@ static inline void wrusp(unsigned long usp)   * so don't change it unless you know what you are doing.   */  #ifdef CONFIG_MMU -#ifndef CONFIG_SUN3 -#define TASK_SIZE	(0xF0000000UL) -#else +#if defined(CONFIG_COLDFIRE) +#define TASK_SIZE	(0xC0000000UL) +#elif defined(CONFIG_SUN3)  #define TASK_SIZE	(0x0E000000UL) +#else +#define TASK_SIZE	(0xF0000000UL)  #endif  #else  #define TASK_SIZE	(0xFFFFFFFFUL) @@ -63,10 +68,12 @@ static inline void wrusp(unsigned long usp)   * space during mmap's.   */  #ifdef CONFIG_MMU -#ifndef CONFIG_SUN3 -#define TASK_UNMAPPED_BASE	0xC0000000UL -#else +#if defined(CONFIG_COLDFIRE) +#define TASK_UNMAPPED_BASE	0x60000000UL +#elif defined(CONFIG_SUN3)  #define TASK_UNMAPPED_BASE	0x0A000000UL +#else +#define TASK_UNMAPPED_BASE	0xC0000000UL  #endif  #define TASK_UNMAPPED_ALIGN(addr, off)	PAGE_ALIGN(addr)  #else @@ -85,16 +92,24 @@ struct thread_struct {  	unsigned long  fp[8*3];  	unsigned long  fpcntl[3];	/* fp control regs */  	unsigned char  fpstate[FPSTATESIZE];  /* floating point state */ -	struct thread_info info;  };  #define INIT_THREAD  {							\  	.ksp	= sizeof(init_stack) + (unsigned long) init_stack,	\  	.sr	= PS_S,							\  	.fs	= __KERNEL_DS,						\ -	.info	= INIT_THREAD_INFO(init_task),				\  } +/* + * ColdFire stack format sbould be 0x4 for an aligned usp (will always be + * true on thread creation). We need to set this explicitly. + */ +#ifdef CONFIG_COLDFIRE +#define setframeformat(_regs)	do { (_regs)->format = 0x4; } while(0) +#else +#define setframeformat(_regs)	do { } while (0) +#endif +  #ifdef CONFIG_MMU  /*   * Do necessary setup to start up a newly executed thread. @@ -102,38 +117,32 @@ struct thread_struct {  static inline void start_thread(struct pt_regs * regs, unsigned long pc,  				unsigned long usp)  { -	/* reads from user space */ -	set_fs(USER_DS); -  	regs->pc = pc;  	regs->sr &= ~0x2000; +	setframeformat(regs);  	wrusp(usp);  } -#else +extern int handle_kernel_fault(struct pt_regs *regs); -/* - * Coldfire stacks need to be re-aligned on trap exit, conventional - * 68k can handle this case cleanly. - */ -#ifdef CONFIG_COLDFIRE -#define reformat(_regs)		do { (_regs)->format = 0x4; } while(0)  #else -#define reformat(_regs)		do { } while (0) -#endif  #define start_thread(_regs, _pc, _usp)                  \  do {                                                    \ -	set_fs(USER_DS); /* reads from user space */    \  	(_regs)->pc = (_pc);                            \ -	((struct switch_stack *)(_regs))[-1].a6 = 0;    \ -	reformat(_regs);                                \ +	setframeformat(_regs);                          \  	if (current->mm)                                \  		(_regs)->d5 = current->mm->start_data;  \  	(_regs)->sr &= ~0x2000;                         \  	wrusp(_usp);                                    \  } while(0) +static inline  int handle_kernel_fault(struct pt_regs *regs) +{ +	/* Any fault in kernel is fatal on non-mmu */ +	return 0; +} +  #endif  /* Forward declaration, a strange C thing */ @@ -144,11 +153,6 @@ static inline void release_thread(struct task_struct *dead_task)  {  } -/* Prepare to copy thread state - unlazy all lazy status */ -#define prepare_to_copy(tsk)	do { } while (0) - -extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); -  /*   * Free current thread data structures etc..   */ diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index 6e6e3ac1d91..a45cb6894ad 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch/m68k/include/asm/ptrace.h @@ -1,82 +1,10 @@  #ifndef _M68K_PTRACE_H  #define _M68K_PTRACE_H -#define PT_D1	   0 -#define PT_D2	   1 -#define PT_D3	   2 -#define PT_D4	   3 -#define PT_D5	   4 -#define PT_D6	   5 -#define PT_D7	   6 -#define PT_A0	   7 -#define PT_A1	   8 -#define PT_A2	   9 -#define PT_A3	   10 -#define PT_A4	   11 -#define PT_A5	   12 -#define PT_A6	   13 -#define PT_D0	   14 -#define PT_USP	   15 -#define PT_ORIG_D0 16 -#define PT_SR	   17 -#define PT_PC	   18 +#include <uapi/asm/ptrace.h>  #ifndef __ASSEMBLY__ -/* this struct defines the way the registers are stored on the -   stack during a system call. */ - -struct pt_regs { -  long     d1; -  long     d2; -  long     d3; -  long     d4; -  long     d5; -  long     a0; -  long     a1; -  long     a2; -  long     d0; -  long     orig_d0; -  long     stkadj; -#ifdef CONFIG_COLDFIRE -  unsigned format :  4; /* frame format specifier */ -  unsigned vector : 12; /* vector offset */ -  unsigned short sr; -  unsigned long  pc; -#else -  unsigned short sr; -  unsigned long  pc; -  unsigned format :  4; /* frame format specifier */ -  unsigned vector : 12; /* vector offset */ -#endif -}; - -/* - * This is the extended stack used by signal handlers and the context - * switcher: it's pushed after the normal "struct pt_regs". - */ -struct switch_stack { -	unsigned long  d6; -	unsigned long  d7; -	unsigned long  a3; -	unsigned long  a4; -	unsigned long  a5; -	unsigned long  a6; -	unsigned long  retpc; -}; - -/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ -#define PTRACE_GETREGS            12 -#define PTRACE_SETREGS            13 -#define PTRACE_GETFPREGS          14 -#define PTRACE_SETFPREGS          15 - -#define PTRACE_GET_THREAD_AREA    25 - -#define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */ - -#ifdef __KERNEL__ -  #ifndef PS_S  #define PS_S  (0x2000)  #define PS_M  (0x1000) @@ -85,7 +13,9 @@ struct switch_stack {  #define user_mode(regs) (!((regs)->sr & PS_S))  #define instruction_pointer(regs) ((regs)->pc)  #define profile_pc(regs) instruction_pointer(regs) -extern void show_regs(struct pt_regs *); +#define current_pt_regs() \ +	(struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1 +#define current_user_stack_pointer() rdusp()  #define arch_has_single_step()	(1) @@ -93,6 +23,5 @@ extern void show_regs(struct pt_regs *);  #define arch_has_block_step()	(1)  #endif -#endif /* __KERNEL__ */  #endif /* __ASSEMBLY__ */  #endif /* _M68K_PTRACE_H */ diff --git a/arch/m68k/include/asm/q40_master.h b/arch/m68k/include/asm/q40_master.h index 3907a09d4fc..fc5b36278d0 100644 --- a/arch/m68k/include/asm/q40_master.h +++ b/arch/m68k/include/asm/q40_master.h @@ -60,7 +60,7 @@  #define Q40_RTC_WRITE  128  /* define some Q40 specific ints */ -#include "q40ints.h" +#include <asm/q40ints.h>  /* misc defs */  #define DAC_LEFT  ((unsigned char *)0xff008000) diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h index 3d970afb708..22f12c9eb91 100644 --- a/arch/m68k/include/asm/q40ints.h +++ b/arch/m68k/include/asm/q40ints.h @@ -24,6 +24,3 @@  #define Q40_IRQ10_MASK       (1<<5)  #define Q40_IRQ14_MASK       (1<<6)  #define Q40_IRQ15_MASK       (1<<7) - -extern unsigned long q40_probe_irq_on (void); -extern int q40_probe_irq_off (unsigned long irqs); diff --git a/arch/m68k/include/asm/raw_io.h b/arch/m68k/include/asm/raw_io.h index d9eb9834ccc..932faa35655 100644 --- a/arch/m68k/include/asm/raw_io.h +++ b/arch/m68k/include/asm/raw_io.h @@ -10,7 +10,7 @@  #ifdef __KERNEL__ -#include <asm/types.h> +#include <asm/byteorder.h>  /* Values for nocacheflag and cmode */ @@ -60,6 +60,57 @@ extern void __iounmap(void *addr, unsigned long size);  #define __raw_writew(val,addr) out_be16((addr),(val))  #define __raw_writel(val,addr) out_be32((addr),(val)) +/* + * Atari ROM port (cartridge port) ISA adapter, used for the EtherNEC NE2000 + * network card driver. + * The ISA adapter connects address lines A9-A13 to ISA address lines A0-A4, + * and hardwires the rest of the ISA addresses for a base address of 0x300. + * + * Data lines D8-D15 are connected to ISA data lines D0-D7 for reading. + * For writes, address lines A1-A8 are latched to ISA data lines D0-D7 + * (meaning the bit pattern on A1-A8 can be read back as byte). + * + * Read and write operations are distinguished by the base address used: + * reads are from the ROM A side range, writes are through the B side range + * addresses (A side base + 0x10000). + * + * Reads and writes are byte only. + * + * 16 bit reads and writes are necessary for the NetUSBee adapter's USB + * chipset - 16 bit words are read straight off the ROM port while 16 bit + * reads are split into two byte writes. The low byte is latched to the + * NetUSBee buffer by a read from the _read_ window (with the data pattern + * asserted as A1-A8 address pattern). The high byte is then written to the + * write range as usual, completing the write cycle. + */ + +#if defined(CONFIG_ATARI_ROM_ISA) +#define rom_in_8(addr) \ +	({ u16 __v = (*(__force volatile u16 *) (addr)); __v >>= 8; __v; }) +#define rom_in_be16(addr) \ +	({ u16 __v = (*(__force volatile u16 *) (addr)); __v; }) +#define rom_in_le16(addr) \ +	({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v; }) + +#define rom_out_8(addr, b)	\ +	({u8 __w, __v = (b);  u32 _addr = ((u32) (addr)); \ +	__w = ((*(__force volatile u8 *)  ((_addr | 0x10000) + (__v<<1)))); }) +#define rom_out_be16(addr, w)	\ +	({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \ +	__w = ((*(__force volatile u16 *) ((_addr & 0xFFFF0000UL) + ((__v & 0xFF)<<1)))); \ +	__w = ((*(__force volatile u16 *) ((_addr | 0x10000) + ((__v >> 8)<<1)))); }) +#define rom_out_le16(addr, w)	\ +	({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \ +	__w = ((*(__force volatile u16 *) ((_addr & 0xFFFF0000UL) + ((__v >> 8)<<1)))); \ +	__w = ((*(__force volatile u16 *) ((_addr | 0x10000) + ((__v & 0xFF)<<1)))); }) + +#define raw_rom_inb rom_in_8 +#define raw_rom_inw rom_in_be16 + +#define raw_rom_outb(val, port) rom_out_8((port), (val)) +#define raw_rom_outw(val, port) rom_out_be16((port), (val)) +#endif /* CONFIG_ATARI_ROM_ISA */ +  static inline void raw_insb(volatile u8 __iomem *port, u8 *buf, unsigned int len)  {  	unsigned int i; @@ -342,6 +393,62 @@ static inline void raw_outsw_swapw(volatile u16 __iomem *port, const u16 *buf,  		: "d0", "a0", "a1", "d6");  } + +#if defined(CONFIG_ATARI_ROM_ISA) +static inline void raw_rom_insb(volatile u8 __iomem *port, u8 *buf, unsigned int len) +{ +	unsigned int i; + +	for (i = 0; i < len; i++) +		*buf++ = rom_in_8(port); +} + +static inline void raw_rom_outsb(volatile u8 __iomem *port, const u8 *buf, +			     unsigned int len) +{ +	unsigned int i; + +	for (i = 0; i < len; i++) +		rom_out_8(port, *buf++); +} + +static inline void raw_rom_insw(volatile u16 __iomem *port, u16 *buf, +				   unsigned int nr) +{ +	unsigned int i; + +	for (i = 0; i < nr; i++) +		*buf++ = rom_in_be16(port); +} + +static inline void raw_rom_outsw(volatile u16 __iomem *port, const u16 *buf, +				   unsigned int nr) +{ +	unsigned int i; + +	for (i = 0; i < nr; i++) +		rom_out_be16(port, *buf++); +} + +static inline void raw_rom_insw_swapw(volatile u16 __iomem *port, u16 *buf, +				   unsigned int nr) +{ +	unsigned int i; + +	for (i = 0; i < nr; i++) +		*buf++ = rom_in_le16(port); +} + +static inline void raw_rom_outsw_swapw(volatile u16 __iomem *port, const u16 *buf, +				   unsigned int nr) +{ +	unsigned int i; + +	for (i = 0; i < nr; i++) +		rom_out_le16(port, *buf++); +} +#endif /* CONFIG_ATARI_ROM_ISA */ +  #endif /* __KERNEL__ */  #endif /* _RAW_IO_H */ diff --git a/arch/m68k/include/asm/resource.h b/arch/m68k/include/asm/resource.h deleted file mode 100644 index e7d35019f33..00000000000 --- a/arch/m68k/include/asm/resource.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_RESOURCE_H -#define _M68K_RESOURCE_H - -#include <asm-generic/resource.h> - -#endif /* _M68K_RESOURCE_H */ diff --git a/arch/m68k/include/asm/sbus.h b/arch/m68k/include/asm/sbus.h deleted file mode 100644 index bfe3ba147f2..00000000000 --- a/arch/m68k/include/asm/sbus.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * some sbus structures and macros to make usage of sbus drivers possible - */ - -#ifndef __M68K_SBUS_H -#define __M68K_SBUS_H - -struct sbus_dev { -	struct { -		unsigned int which_io; -		unsigned int phys_addr; -	} reg_addrs[1]; -}; - -/* sbus IO functions stolen from include/asm-sparc/io.h for the serial driver */ -/* No SBUS on the Sun3, kludge -- sam */ - -static inline void _sbus_writeb(unsigned char val, unsigned long addr) -{ -	*(volatile unsigned char *)addr = val; -} - -static inline unsigned char _sbus_readb(unsigned long addr) -{ -	return *(volatile unsigned char *)addr; -} - -static inline void _sbus_writel(unsigned long val, unsigned long addr) -{ -	*(volatile unsigned long *)addr = val; - -} - -extern inline unsigned long _sbus_readl(unsigned long addr) -{ -	return *(volatile unsigned long *)addr; -} - - -#define sbus_readb(a) _sbus_readb((unsigned long)a) -#define sbus_writeb(v, a) _sbus_writeb(v, (unsigned long)a) -#define sbus_readl(a) _sbus_readl((unsigned long)a) -#define sbus_writel(v, a) _sbus_writel(v, (unsigned long)a) - -#endif diff --git a/arch/m68k/include/asm/scatterlist.h b/arch/m68k/include/asm/scatterlist.h deleted file mode 100644 index 312505452a1..00000000000 --- a/arch/m68k/include/asm/scatterlist.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_SCATTERLIST_H -#define _M68K_SCATTERLIST_H - -#include <asm-generic/scatterlist.h> - -#endif /* !(_M68K_SCATTERLIST_H) */ diff --git a/arch/m68k/include/asm/sections.h b/arch/m68k/include/asm/sections.h deleted file mode 100644 index d64967ecfec..00000000000 --- a/arch/m68k/include/asm/sections.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_M68K_SECTIONS_H -#define _ASM_M68K_SECTIONS_H - -#include <asm-generic/sections.h> - -#endif /* _ASM_M68K_SECTIONS_H */ diff --git a/arch/m68k/include/asm/segment.h b/arch/m68k/include/asm/segment.h index ee959219fdf..0fa80e97ed2 100644 --- a/arch/m68k/include/asm/segment.h +++ b/arch/m68k/include/asm/segment.h @@ -22,23 +22,26 @@ typedef struct {  } mm_segment_t;  #define MAKE_MM_SEG(s)	((mm_segment_t) { (s) }) -#define USER_DS		MAKE_MM_SEG(__USER_DS) -#define KERNEL_DS	MAKE_MM_SEG(__KERNEL_DS) +#ifdef CONFIG_CPU_HAS_ADDRESS_SPACES  /*   * Get/set the SFC/DFC registers for MOVES instructions   */ +#define USER_DS		MAKE_MM_SEG(__USER_DS) +#define KERNEL_DS	MAKE_MM_SEG(__KERNEL_DS)  static inline mm_segment_t get_fs(void)  { -#ifdef CONFIG_MMU  	mm_segment_t _v;  	__asm__ ("movec %/dfc,%0":"=r" (_v.seg):); -  	return _v; -#else -	return USER_DS; -#endif +} + +static inline void set_fs(mm_segment_t val) +{ +	__asm__ __volatile__ ("movec %0,%/sfc\n\t" +			      "movec %0,%/dfc\n\t" +			      : /* no outputs */ : "r" (val.seg) : "memory");  }  static inline mm_segment_t get_ds(void) @@ -47,14 +50,13 @@ static inline mm_segment_t get_ds(void)      return KERNEL_DS;  } -static inline void set_fs(mm_segment_t val) -{ -#ifdef CONFIG_MMU -	__asm__ __volatile__ ("movec %0,%/sfc\n\t" -			      "movec %0,%/dfc\n\t" -			      : /* no outputs */ : "r" (val.seg) : "memory"); +#else +#define USER_DS		MAKE_MM_SEG(TASK_SIZE) +#define KERNEL_DS	MAKE_MM_SEG(0xFFFFFFFF) +#define get_ds()	(KERNEL_DS) +#define get_fs()	(current_thread_info()->addr_limit) +#define set_fs(x)	(current_thread_info()->addr_limit = (x))  #endif -}  #define segment_eq(a,b)	((a).seg == (b).seg) diff --git a/arch/m68k/include/asm/sembuf.h b/arch/m68k/include/asm/sembuf.h deleted file mode 100644 index 2308052a8c2..00000000000 --- a/arch/m68k/include/asm/sembuf.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _M68K_SEMBUF_H -#define _M68K_SEMBUF_H - -/* - * The semid64_ds structure for m68k architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct semid64_ds { -	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */ -	__kernel_time_t	sem_otime;		/* last semop time */ -	unsigned long	__unused1; -	__kernel_time_t	sem_ctime;		/* last change time */ -	unsigned long	__unused2; -	unsigned long	sem_nsems;		/* no. of semaphores in array */ -	unsigned long	__unused3; -	unsigned long	__unused4; -}; - -#endif /* _M68K_SEMBUF_H */ diff --git a/arch/m68k/include/asm/serial.h b/arch/m68k/include/asm/serial.h index 2b90d6e6907..7267536adbc 100644 --- a/arch/m68k/include/asm/serial.h +++ b/arch/m68k/include/asm/serial.h @@ -25,9 +25,11 @@  #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF  #endif +#ifdef CONFIG_ISA  #define SERIAL_PORT_DFNS			\  	/* UART CLK   PORT IRQ     FLAGS        */			\  	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\  	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\  	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\  	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */ +#endif diff --git a/arch/m68k/include/asm/setup.h b/arch/m68k/include/asm/setup.h index 4dfb3952b37..8f2023f8c1c 100644 --- a/arch/m68k/include/asm/setup.h +++ b/arch/m68k/include/asm/setup.h @@ -19,32 +19,13 @@  **   Redesign of the boot information structure; moved boot information  **   structure to bootinfo.h  */ -  #ifndef _M68K_SETUP_H  #define _M68K_SETUP_H +#include <uapi/asm/bootinfo.h> +#include <uapi/asm/setup.h> -    /* -     *  Linux/m68k Architectures -     */ - -#define MACH_AMIGA    1 -#define MACH_ATARI    2 -#define MACH_MAC      3 -#define MACH_APOLLO   4 -#define MACH_SUN3     5 -#define MACH_MVME147  6 -#define MACH_MVME16x  7 -#define MACH_BVME6000 8 -#define MACH_HP300    9 -#define MACH_Q40     10 -#define MACH_SUN3X   11 - -#define COMMAND_LINE_SIZE 256 - -#ifdef __KERNEL__ -  #define CL_SIZE COMMAND_LINE_SIZE  #ifndef __ASSEMBLY__ @@ -193,57 +174,6 @@ extern unsigned long m68k_machtype;  #  define MACH_TYPE (m68k_machtype)  #endif -#endif /* __KERNEL__ */ - - -    /* -     *  CPU, FPU and MMU types -     * -     *  Note: we may rely on the following equalities: -     * -     *      CPU_68020 == MMU_68851 -     *      CPU_68030 == MMU_68030 -     *      CPU_68040 == FPU_68040 == MMU_68040 -     *      CPU_68060 == FPU_68060 == MMU_68060 -     */ - -#define CPUB_68020     0 -#define CPUB_68030     1 -#define CPUB_68040     2 -#define CPUB_68060     3 - -#define CPU_68020      (1<<CPUB_68020) -#define CPU_68030      (1<<CPUB_68030) -#define CPU_68040      (1<<CPUB_68040) -#define CPU_68060      (1<<CPUB_68060) - -#define FPUB_68881     0 -#define FPUB_68882     1 -#define FPUB_68040     2                       /* Internal FPU */ -#define FPUB_68060     3                       /* Internal FPU */ -#define FPUB_SUNFPA    4                       /* Sun-3 FPA */ - -#define FPU_68881      (1<<FPUB_68881) -#define FPU_68882      (1<<FPUB_68882) -#define FPU_68040      (1<<FPUB_68040) -#define FPU_68060      (1<<FPUB_68060) -#define FPU_SUNFPA     (1<<FPUB_SUNFPA) - -#define MMUB_68851     0 -#define MMUB_68030     1                       /* Internal MMU */ -#define MMUB_68040     2                       /* Internal MMU */ -#define MMUB_68060     3                       /* Internal MMU */ -#define MMUB_APOLLO    4                       /* Custom Apollo */ -#define MMUB_SUN3      5                       /* Custom Sun-3 */ - -#define MMU_68851      (1<<MMUB_68851) -#define MMU_68030      (1<<MMUB_68030) -#define MMU_68040      (1<<MMUB_68040) -#define MMU_68060      (1<<MMUB_68060) -#define MMU_SUN3       (1<<MMUB_SUN3) -#define MMU_APOLLO     (1<<MMUB_APOLLO) - -#ifdef __KERNEL__  #ifndef __ASSEMBLY__  extern unsigned long m68k_cputype; @@ -341,6 +271,13 @@ extern int m68k_is040or060;  #  endif  #endif +#if !defined(CONFIG_COLDFIRE) +#  define CPU_IS_COLDFIRE (0) +#else +#  define CPU_IS_COLDFIRE (1) +#  define MMU_IS_COLDFIRE (1) +#endif +  #define CPU_TYPE (m68k_cputype)  #ifdef CONFIG_M68KFPU_EMU @@ -361,16 +298,14 @@ extern int m68k_is040or060;  #define NUM_MEMINFO	4  #ifndef __ASSEMBLY__ -struct mem_info { +struct m68k_mem_info {  	unsigned long addr;		/* physical address of memory chunk */  	unsigned long size;		/* length of memory chunk (in bytes) */  };  extern int m68k_num_memory;		/* # of memory blocks found (and used) */  extern int m68k_realnum_memory;		/* real # of memory blocks found */ -extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ +extern struct m68k_mem_info m68k_memory[NUM_MEMINFO];/* memory description */  #endif -#endif /* __KERNEL__ */ -  #endif /* _M68K_SETUP_H */ diff --git a/arch/m68k/include/asm/shm.h b/arch/m68k/include/asm/shm.h deleted file mode 100644 index fa56ec84a12..00000000000 --- a/arch/m68k/include/asm/shm.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _M68K_SHM_H -#define _M68K_SHM_H - - -/* format of page table entries that correspond to shared memory pages -   currently out in swap space (see also mm/swap.c): -   bits 0-1 (PAGE_PRESENT) is  = 0 -   bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE -   bits 31..9 are used like this: -   bits 15..9 (SHM_ID) the id of the shared memory segment -   bits 30..16 (SHM_IDX) the index of the page within the shared memory segment -                    (actually only bits 25..16 get used since SHMMAX is so low) -   bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach -*/ -/* on the m68k both bits 0 and 1 must be zero */ -/* format on the sun3 is similar, but bits 30, 31 are set to zero and all -   others are reduced by 2. --m */ - -#ifndef CONFIG_SUN3 -#define SHM_ID_SHIFT	9 -#else -#define SHM_ID_SHIFT	7 -#endif -#define _SHM_ID_BITS	7 -#define SHM_ID_MASK	((1<<_SHM_ID_BITS)-1) - -#define SHM_IDX_SHIFT	(SHM_ID_SHIFT+_SHM_ID_BITS) -#define _SHM_IDX_BITS	15 -#define SHM_IDX_MASK	((1<<_SHM_IDX_BITS)-1) - -#endif /* _M68K_SHM_H */ diff --git a/arch/m68k/include/asm/shmbuf.h b/arch/m68k/include/asm/shmbuf.h deleted file mode 100644 index f8928d62f1b..00000000000 --- a/arch/m68k/include/asm/shmbuf.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _M68K_SHMBUF_H -#define _M68K_SHMBUF_H - -/* - * The shmid64_ds structure for m68k architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct shmid64_ds { -	struct ipc64_perm	shm_perm;	/* operation perms */ -	size_t			shm_segsz;	/* size of segment (bytes) */ -	__kernel_time_t		shm_atime;	/* last attach time */ -	unsigned long		__unused1; -	__kernel_time_t		shm_dtime;	/* last detach time */ -	unsigned long		__unused2; -	__kernel_time_t		shm_ctime;	/* last change time */ -	unsigned long		__unused3; -	__kernel_pid_t		shm_cpid;	/* pid of creator */ -	__kernel_pid_t		shm_lpid;	/* pid of last operator */ -	unsigned long		shm_nattch;	/* no. of current attaches */ -	unsigned long		__unused4; -	unsigned long		__unused5; -}; - -struct shminfo64 { -	unsigned long	shmmax; -	unsigned long	shmmin; -	unsigned long	shmmni; -	unsigned long	shmseg; -	unsigned long	shmall; -	unsigned long	__unused1; -	unsigned long	__unused2; -	unsigned long	__unused3; -	unsigned long	__unused4; -}; - -#endif /* _M68K_SHMBUF_H */ diff --git a/arch/m68k/include/asm/shmparam.h b/arch/m68k/include/asm/shmparam.h deleted file mode 100644 index 558892a2efb..00000000000 --- a/arch/m68k/include/asm/shmparam.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_SHMPARAM_H -#define _M68K_SHMPARAM_H - -#define	SHMLBA PAGE_SIZE		 /* attach addr a multiple of this */ - -#endif /* _M68K_SHMPARAM_H */ diff --git a/arch/m68k/include/asm/siginfo.h b/arch/m68k/include/asm/siginfo.h deleted file mode 100644 index 851d3d784b5..00000000000 --- a/arch/m68k/include/asm/siginfo.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_SIGINFO_H -#define _M68K_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif diff --git a/arch/m68k/include/asm/signal.h b/arch/m68k/include/asm/signal.h index 5bc09c787a1..8c8ce5e1ee0 100644 --- a/arch/m68k/include/asm/signal.h +++ b/arch/m68k/include/asm/signal.h @@ -1,12 +1,8 @@  #ifndef _M68K_SIGNAL_H  #define _M68K_SIGNAL_H -#include <linux/types.h> +#include <uapi/asm/signal.h> -/* Avoid too many header ordering problems.  */ -struct siginfo; - -#ifdef __KERNEL__  /* Most things should be clean enough to redefine this at will, if care     is taken to make libc match.  */ @@ -20,143 +16,17 @@ typedef struct {  	unsigned long sig[_NSIG_WORDS];  } sigset_t; -#else -/* Here we must cater to libcs that poke about in kernel headers.  */ - -#define NSIG		32 -typedef unsigned long sigset_t; - -#endif /* __KERNEL__ */ - -#define SIGHUP		 1 -#define SIGINT		 2 -#define SIGQUIT		 3 -#define SIGILL		 4 -#define SIGTRAP		 5 -#define SIGABRT		 6 -#define SIGIOT		 6 -#define SIGBUS		 7 -#define SIGFPE		 8 -#define SIGKILL		 9 -#define SIGUSR1		10 -#define SIGSEGV		11 -#define SIGUSR2		12 -#define SIGPIPE		13 -#define SIGALRM		14 -#define SIGTERM		15 -#define SIGSTKFLT	16 -#define SIGCHLD		17 -#define SIGCONT		18 -#define SIGSTOP		19 -#define SIGTSTP		20 -#define SIGTTIN		21 -#define SIGTTOU		22 -#define SIGURG		23 -#define SIGXCPU		24 -#define SIGXFSZ		25 -#define SIGVTALRM	26 -#define SIGPROF		27 -#define SIGWINCH	28 -#define SIGIO		29 -#define SIGPOLL		SIGIO -/* -#define SIGLOST		29 -*/ -#define SIGPWR		30 -#define SIGSYS		31 -#define	SIGUNUSED	31 - -/* These should not be considered constants from userland.  */ -#define SIGRTMIN	32 -#define SIGRTMAX	_NSIG - -/* - * SA_FLAGS values: - * - * SA_ONSTACK indicates that a registered stack_t will be used. - * SA_RESTART flag to get restarting signals (which were the default long ago) - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. - * SA_RESETHAND clears the handler when the signal is delivered. - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. - * SA_NODEFER prevents the current signal from being masked in the handler. - * - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single - * Unix names RESETHAND and NODEFER respectively. - */ -#define SA_NOCLDSTOP	0x00000001 -#define SA_NOCLDWAIT	0x00000002 -#define SA_SIGINFO	0x00000004 -#define SA_ONSTACK	0x08000000 -#define SA_RESTART	0x10000000 -#define SA_NODEFER	0x40000000 -#define SA_RESETHAND	0x80000000 - -#define SA_NOMASK	SA_NODEFER -#define SA_ONESHOT	SA_RESETHAND - -/* - * sigaltstack controls - */ -#define SS_ONSTACK	1 -#define SS_DISABLE	2 - -#define MINSIGSTKSZ	2048 -#define SIGSTKSZ	8192 - -#include <asm-generic/signal-defs.h> - -#ifdef __KERNEL__ -struct old_sigaction { -	__sighandler_t sa_handler; -	old_sigset_t sa_mask; -	unsigned long sa_flags; -	__sigrestore_t sa_restorer; -}; - -struct sigaction { -	__sighandler_t sa_handler; -	unsigned long sa_flags; -	__sigrestore_t sa_restorer; -	sigset_t sa_mask;		/* mask last for extensibility */ -}; - -struct k_sigaction { -	struct sigaction sa; -}; -#else -/* Here we must cater to libcs that poke about in kernel headers.  */ - -struct sigaction { -	union { -	  __sighandler_t _sa_handler; -	  void (*_sa_sigaction)(int, struct siginfo *, void *); -	} _u; -	sigset_t sa_mask; -	unsigned long sa_flags; -	void (*sa_restorer)(void); -}; - -#define sa_handler	_u._sa_handler -#define sa_sigaction	_u._sa_sigaction - -#endif /* __KERNEL__ */ - -typedef struct sigaltstack { -	void __user *ss_sp; -	int ss_flags; -	size_t ss_size; -} stack_t; - -#ifdef __KERNEL__ +#define __ARCH_HAS_SA_RESTORER +  #include <asm/sigcontext.h> -#ifndef __uClinux__ +#ifndef CONFIG_CPU_HAS_NO_BITFIELDS  #define __HAVE_ARCH_SIG_BITOPS  static inline void sigaddset(sigset_t *set, int _sig)  {  	asm ("bfset %0{%1,#1}" -		: "+od" (*set) +		: "+o" (*set)  		: "id" ((_sig - 1) ^ 31)  		: "cc");  } @@ -164,7 +34,7 @@ static inline void sigaddset(sigset_t *set, int _sig)  static inline void sigdelset(sigset_t *set, int _sig)  {  	asm ("bfclr %0{%1,#1}" -		: "+od" (*set) +		: "+o" (*set)  		: "id" ((_sig - 1) ^ 31)  		: "cc");  } @@ -180,7 +50,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)  	int ret;  	asm ("bfextu %1{%2,#1},%0"  		: "=d" (ret) -		: "od" (*set), "id" ((_sig-1) ^ 31) +		: "o" (*set), "id" ((_sig-1) ^ 31)  		: "cc");  	return ret;  } @@ -190,24 +60,11 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)  	 __const_sigismember(set,sig) :		\  	 __gen_sigismember(set,sig)) -static inline int sigfindinword(unsigned long word) -{ -	asm ("bfffo %1{#0,#0},%0" -		: "=d" (word) -		: "d" (word & -word) -		: "cc"); -	return word ^ 31; -} - -struct pt_regs; -extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); - -#else - -#undef __HAVE_ARCH_SIG_BITOPS -#define ptrace_signal_deliver(regs, cookie) do { } while (0) +#endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */ +#ifndef __uClinux__ +extern void ptrace_signal_deliver(void); +#define ptrace_signal_deliver ptrace_signal_deliver  #endif /* __uClinux__ */ -#endif /* __KERNEL__ */  #endif /* _M68K_SIGNAL_H */ diff --git a/arch/m68k/include/asm/socket.h b/arch/m68k/include/asm/socket.h deleted file mode 100644 index 9bf49c87d95..00000000000 --- a/arch/m68k/include/asm/socket.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef _ASM_SOCKET_H -#define _ASM_SOCKET_H - -#include <asm/sockios.h> - -/* For setsockopt(2) */ -#define SOL_SOCKET	1 - -#define SO_DEBUG	1 -#define SO_REUSEADDR	2 -#define SO_TYPE		3 -#define SO_ERROR	4 -#define SO_DONTROUTE	5 -#define SO_BROADCAST	6 -#define SO_SNDBUF	7 -#define SO_RCVBUF	8 -#define SO_SNDBUFFORCE	32 -#define SO_RCVBUFFORCE	33 -#define SO_KEEPALIVE	9 -#define SO_OOBINLINE	10 -#define SO_NO_CHECK	11 -#define SO_PRIORITY	12 -#define SO_LINGER	13 -#define SO_BSDCOMPAT	14 -/* To add :#define SO_REUSEPORT 15 */ -#define SO_PASSCRED	16 -#define SO_PEERCRED	17 -#define SO_RCVLOWAT	18 -#define SO_SNDLOWAT	19 -#define SO_RCVTIMEO	20 -#define SO_SNDTIMEO	21 - -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION		22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT	23 -#define SO_SECURITY_ENCRYPTION_NETWORK		24 - -#define SO_BINDTODEVICE	25 - -/* Socket filtering */ -#define SO_ATTACH_FILTER        26 -#define SO_DETACH_FILTER        27 - -#define SO_PEERNAME             28 -#define SO_TIMESTAMP		29 -#define SCM_TIMESTAMP		SO_TIMESTAMP - -#define SO_ACCEPTCONN		30 - -#define SO_PEERSEC             31 -#define SO_PASSSEC		34 -#define SO_TIMESTAMPNS		35 -#define SCM_TIMESTAMPNS		SO_TIMESTAMPNS - -#define SO_MARK			36 - -#define SO_TIMESTAMPING		37 -#define SCM_TIMESTAMPING	SO_TIMESTAMPING - -#define SO_PROTOCOL		38 -#define SO_DOMAIN		39 - -#define SO_RXQ_OVFL             40 - -#endif /* _ASM_SOCKET_H */ diff --git a/arch/m68k/include/asm/sockios.h b/arch/m68k/include/asm/sockios.h deleted file mode 100644 index c04a23943cb..00000000000 --- a/arch/m68k/include/asm/sockios.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __ARCH_M68K_SOCKIOS__ -#define __ARCH_M68K_SOCKIOS__ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN	0x8901 -#define SIOCSPGRP	0x8902 -#define FIOGETOWN	0x8903 -#define SIOCGPGRP	0x8904 -#define SIOCATMARK	0x8905 -#define SIOCGSTAMP	0x8906		/* Get stamp (timeval) */ -#define SIOCGSTAMPNS	0x8907		/* Get stamp (timespec) */ - -#endif /* __ARCH_M68K_SOCKIOS__ */ diff --git a/arch/m68k/include/asm/spinlock.h b/arch/m68k/include/asm/spinlock.h deleted file mode 100644 index 20f46e27b53..00000000000 --- a/arch/m68k/include/asm/spinlock.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __M68K_SPINLOCK_H -#define __M68K_SPINLOCK_H - -#error "m68k doesn't do SMP yet" - -#endif diff --git a/arch/m68k/include/asm/statfs.h b/arch/m68k/include/asm/statfs.h deleted file mode 100644 index 08d93f14e06..00000000000 --- a/arch/m68k/include/asm/statfs.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _M68K_STATFS_H -#define _M68K_STATFS_H - -#include <asm-generic/statfs.h> - -#endif /* _M68K_STATFS_H */ diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index 2936dda938d..c30c03d9858 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h @@ -4,34 +4,6 @@  #include <linux/types.h>  #include <linux/compiler.h> -static inline size_t __kernel_strlen(const char *s) -{ -	const char *sc; - -	for (sc = s; *sc++; ) -		; -	return sc - s - 1; -} - -static inline char *__kernel_strcpy(char *dest, const char *src) -{ -	char *xdest = dest; - -	asm volatile ("\n" -		"1:	move.b	(%1)+,(%0)+\n" -		"	jne	1b" -		: "+a" (dest), "+a" (src) -		: : "memory"); -	return xdest; -} - -#ifndef __IN_STRING_C - -#define __HAVE_ARCH_STRLEN -#define strlen(s)	(__builtin_constant_p(s) ?	\ -			 __builtin_strlen(s) :		\ -			 __kernel_strlen(s)) -  #define __HAVE_ARCH_STRNLEN  static inline size_t strnlen(const char *s, size_t count)  { @@ -48,16 +20,6 @@ static inline size_t strnlen(const char *s, size_t count)  	return sc - s;  } -#define __HAVE_ARCH_STRCPY -#if __GNUC__ >= 4 -#define strcpy(d, s)	(__builtin_constant_p(s) &&	\ -			 __builtin_strlen(s) <= 32 ?	\ -			 __builtin_strcpy(d, s) :	\ -			 __kernel_strcpy(d, s)) -#else -#define strcpy(d, s)	__kernel_strcpy(d, s) -#endif -  #define __HAVE_ARCH_STRNCPY  static inline char *strncpy(char *dest, const char *src, size_t n)  { @@ -75,24 +37,6 @@ static inline char *strncpy(char *dest, const char *src, size_t n)  	return xdest;  } -#define __HAVE_ARCH_STRCAT -#define strcat(d, s)	({			\ -	char *__d = (d);			\ -	strcpy(__d + strlen(__d), (s));		\ -}) - -#define __HAVE_ARCH_STRCHR -static inline char *strchr(const char *s, int c) -{ -	char sc, ch = c; - -	for (; (sc = *s++) != ch; ) { -		if (!sc) -			return NULL; -	} -	return (char *)s - 1; -} -  #ifndef CONFIG_COLDFIRE  #define __HAVE_ARCH_STRCMP  static inline int strcmp(const char *cs, const char *ct) @@ -111,14 +55,12 @@ static inline int strcmp(const char *cs, const char *ct)  		: "+a" (cs), "+a" (ct), "=d" (res));  	return res;  } +#endif /* CONFIG_COLDFIRE */  #define __HAVE_ARCH_MEMMOVE  extern void *memmove(void *, const void *, __kernel_size_t); -#define __HAVE_ARCH_MEMCMP -extern int memcmp(const void *, const void *, __kernel_size_t);  #define memcmp(d, s, n) __builtin_memcmp(d, s, n) -#endif /* CONFIG_COLDFIRE */  #define __HAVE_ARCH_MEMSET  extern void *memset(void *, int, __kernel_size_t); @@ -128,6 +70,4 @@ extern void *memset(void *, int, __kernel_size_t);  extern void *memcpy(void *, const void *, __kernel_size_t);  #define memcpy(d, s, n) __builtin_memcpy(d, s, n) -#endif -  #endif /* _M68K_STRING_H_ */ diff --git a/arch/m68k/include/asm/sun3_pgalloc.h b/arch/m68k/include/asm/sun3_pgalloc.h index 48d80d5a666..f868506e335 100644 --- a/arch/m68k/include/asm/sun3_pgalloc.h +++ b/arch/m68k/include/asm/sun3_pgalloc.h @@ -59,7 +59,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,  		return NULL;  	clear_highpage(page); -	pgtable_page_ctor(page); +	if (!pgtable_page_ctor(page)) { +		__free_page(page); +		return NULL; +	}  	return page;  } diff --git a/arch/m68k/include/asm/sun3_pgtable.h b/arch/m68k/include/asm/sun3_pgtable.h index cf5fad9b525..f55aa04161e 100644 --- a/arch/m68k/include/asm/sun3_pgtable.h +++ b/arch/m68k/include/asm/sun3_pgtable.h @@ -217,9 +217,8 @@ static inline pte_t pgoff_to_pte(unsigned off)  /* Find an entry in the third-level pagetable. */  #define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE-1))  #define pte_offset_kernel(pmd, address) ((pte_t *) __pmd_page(*pmd) + pte_index(address)) -/* FIXME: should we bother with kmap() here? */ -#define pte_offset_map(pmd, address) ((pte_t *)kmap(pmd_page(*pmd)) + pte_index(address)) -#define pte_unmap(pte) kunmap(pte) +#define pte_offset_map(pmd, address) ((pte_t *)page_address(pmd_page(*pmd)) + pte_index(address)) +#define pte_unmap(pte) do { } while (0)  /* Macros to (de)construct the fake PTEs representing swap pages. */  #define __swp_type(x)		((x).val & 0x7F) diff --git a/arch/m68k/include/asm/sun3xflop.h b/arch/m68k/include/asm/sun3xflop.h index 32c45f84ac6..a02ea3a7bb2 100644 --- a/arch/m68k/include/asm/sun3xflop.h +++ b/arch/m68k/include/asm/sun3xflop.h @@ -11,7 +11,6 @@  #include <asm/page.h>  #include <asm/pgtable.h> -#include <asm/system.h>  #include <asm/irq.h>  #include <asm/sun3x.h> @@ -208,7 +207,7 @@ static int sun3xflop_request_irq(void)  	if(!once) {  		once = 1;  		error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, -				    IRQF_DISABLED, "floppy", NULL); +				    0, "floppy", NULL);  		return ((error == 0) ? 0 : -1);  	} else return 0;  } diff --git a/arch/m68k/include/asm/switch_to.h b/arch/m68k/include/asm/switch_to.h new file mode 100644 index 00000000000..16fd6b63498 --- /dev/null +++ b/arch/m68k/include/asm/switch_to.h @@ -0,0 +1,41 @@ +#ifndef _M68K_SWITCH_TO_H +#define _M68K_SWITCH_TO_H + +/* + * switch_to(n) should switch tasks to task ptr, first checking that + * ptr isn't the current task, in which case it does nothing.  This + * also clears the TS-flag if the task we switched to has used the + * math co-processor latest. + */ +/* + * switch_to() saves the extra registers, that are not saved + * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and + * a0-a1. Some of these are used by schedule() and its predecessors + * and so we might get see unexpected behaviors when a task returns + * with unexpected register values. + * + * syscall stores these registers itself and none of them are used + * by syscall after the function in the syscall has been called. + * + * Beware that resume now expects *next to be in d1 and the offset of + * tss to be in a1. This saves a few instructions as we no longer have + * to push them onto the stack and read them back right after. + * + * 02/17/96 - Jes Sorensen (jds@kom.auc.dk) + * + * Changed 96/09/19 by Andreas Schwab + * pass prev in a0, next in a1 + */ +asmlinkage void resume(void); +#define switch_to(prev,next,last) do { \ +  register void *_prev __asm__ ("a0") = (prev); \ +  register void *_next __asm__ ("a1") = (next); \ +  register void *_last __asm__ ("d1"); \ +  __asm__ __volatile__("jbsr resume" \ +		       : "=a" (_prev), "=a" (_next), "=d" (_last) \ +		       : "0" (_prev), "1" (_next) \ +		       : "d0", "d2", "d3", "d4", "d5"); \ +  (last) = _last; \ +} while (0) + +#endif /* _M68K_SWITCH_TO_H */ diff --git a/arch/m68k/include/asm/system.h b/arch/m68k/include/asm/system.h deleted file mode 100644 index ccea925ff4f..00000000000 --- a/arch/m68k/include/asm/system.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef __uClinux__ -#include "system_no.h" -#else -#include "system_mm.h" -#endif diff --git a/arch/m68k/include/asm/system_no.h b/arch/m68k/include/asm/system_no.h deleted file mode 100644 index 6fe9f93bc3f..00000000000 --- a/arch/m68k/include/asm/system_no.h +++ /dev/null @@ -1,153 +0,0 @@ -#ifndef _M68KNOMMU_SYSTEM_H -#define _M68KNOMMU_SYSTEM_H - -#include <linux/linkage.h> -#include <linux/irqflags.h> -#include <asm/segment.h> -#include <asm/entry.h> - -/* - * switch_to(n) should switch tasks to task ptr, first checking that - * ptr isn't the current task, in which case it does nothing.  This - * also clears the TS-flag if the task we switched to has used the - * math co-processor latest. - */ -/* - * switch_to() saves the extra registers, that are not saved - * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and - * a0-a1. Some of these are used by schedule() and its predecessors - * and so we might get see unexpected behaviors when a task returns - * with unexpected register values. - * - * syscall stores these registers itself and none of them are used - * by syscall after the function in the syscall has been called. - * - * Beware that resume now expects *next to be in d1 and the offset of - * tss to be in a1. This saves a few instructions as we no longer have - * to push them onto the stack and read them back right after. - * - * 02/17/96 - Jes Sorensen (jds@kom.auc.dk) - * - * Changed 96/09/19 by Andreas Schwab - * pass prev in a0, next in a1, offset of tss in d1, and whether - * the mm structures are shared in d2 (to avoid atc flushing). - */ -asmlinkage void resume(void); -#define switch_to(prev,next,last)				\ -{								\ -  void *_last;							\ -  __asm__ __volatile__(						\ -  	"movel	%1, %%a0\n\t"					\ -	"movel	%2, %%a1\n\t"					\ -	"jbsr resume\n\t"					\ -	"movel	%%d1, %0\n\t"					\ -       : "=d" (_last)						\ -       : "d" (prev), "d" (next)					\ -       : "cc", "d0", "d1", "d2", "d3", "d4", "d5", "a0", "a1");	\ -  (last) = _last;						\ -} - -#define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc") - -/* - * Force strict CPU ordering. - * Not really required on m68k... - */ -#define nop()  asm volatile ("nop"::) -#define mb()   asm volatile (""   : : :"memory") -#define rmb()  asm volatile (""   : : :"memory") -#define wmb()  asm volatile (""   : : :"memory") -#define set_mb(var, value)	({ (var) = (value); wmb(); }) - -#define smp_mb()	barrier() -#define smp_rmb()	barrier() -#define smp_wmb()	barrier() -#define smp_read_barrier_depends()	do { } while(0) - -#define read_barrier_depends()  ((void)0) - -#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) - -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((volatile struct __xchg_dummy *)(x)) - -#ifndef CONFIG_RMW_INSNS -static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) -{ -  unsigned long tmp, flags; - -  local_irq_save(flags); - -  switch (size) { -  case 1: -    __asm__ __volatile__ -    ("moveb %2,%0\n\t" -     "moveb %1,%2" -    : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); -    break; -  case 2: -    __asm__ __volatile__ -    ("movew %2,%0\n\t" -     "movew %1,%2" -    : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); -    break; -  case 4: -    __asm__ __volatile__ -    ("movel %2,%0\n\t" -     "movel %1,%2" -    : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); -    break; -  } -  local_irq_restore(flags); -  return tmp; -} -#else -static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) -{ -	switch (size) { -	    case 1: -		__asm__ __volatile__ -			("moveb %2,%0\n\t" -			 "1:\n\t" -			 "casb %0,%1,%2\n\t" -			 "jne 1b" -			 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory"); -		break; -	    case 2: -		__asm__ __volatile__ -			("movew %2,%0\n\t" -			 "1:\n\t" -			 "casw %0,%1,%2\n\t" -			 "jne 1b" -			 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory"); -		break; -	    case 4: -		__asm__ __volatile__ -			("movel %2,%0\n\t" -			 "1:\n\t" -			 "casl %0,%1,%2\n\t" -			 "jne 1b" -			 : "=&d" (x) : "d" (x), "m" (*__xg(ptr)) : "memory"); -		break; -	} -	return x; -} -#endif - -#include <asm-generic/cmpxchg-local.h> - -/* - * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make - * them available. - */ -#define cmpxchg_local(ptr, o, n)				  	       \ -	((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ -			(unsigned long)(n), sizeof(*(ptr)))) -#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) - -#include <asm-generic/cmpxchg.h> - -#define arch_align_stack(x) (x) - - -#endif /* _M68KNOMMU_SYSTEM_H */ diff --git a/arch/m68k/include/asm/termbits.h b/arch/m68k/include/asm/termbits.h deleted file mode 100644 index aea1e37b765..00000000000 --- a/arch/m68k/include/asm/termbits.h +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef __ARCH_M68K_TERMBITS_H__ -#define __ARCH_M68K_TERMBITS_H__ - -#include <linux/posix_types.h> - -typedef unsigned char	cc_t; -typedef unsigned int	speed_t; -typedef unsigned int	tcflag_t; - -#define NCCS 19 -struct termios { -	tcflag_t c_iflag;		/* input mode flags */ -	tcflag_t c_oflag;		/* output mode flags */ -	tcflag_t c_cflag;		/* control mode flags */ -	tcflag_t c_lflag;		/* local mode flags */ -	cc_t c_line;			/* line discipline */ -	cc_t c_cc[NCCS];		/* control characters */ -}; - -struct termios2 { -	tcflag_t c_iflag;		/* input mode flags */ -	tcflag_t c_oflag;		/* output mode flags */ -	tcflag_t c_cflag;		/* control mode flags */ -	tcflag_t c_lflag;		/* local mode flags */ -	cc_t c_line;			/* line discipline */ -	cc_t c_cc[NCCS];		/* control characters */ -	speed_t c_ispeed;		/* input speed */ -	speed_t c_ospeed;		/* output speed */ -}; - -struct ktermios { -	tcflag_t c_iflag;		/* input mode flags */ -	tcflag_t c_oflag;		/* output mode flags */ -	tcflag_t c_cflag;		/* control mode flags */ -	tcflag_t c_lflag;		/* local mode flags */ -	cc_t c_line;			/* line discipline */ -	cc_t c_cc[NCCS];		/* control characters */ -	speed_t c_ispeed;		/* input speed */ -	speed_t c_ospeed;		/* output speed */ -}; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - - -/* c_iflag bits */ -#define IGNBRK	0000001 -#define BRKINT	0000002 -#define IGNPAR	0000004 -#define PARMRK	0000010 -#define INPCK	0000020 -#define ISTRIP	0000040 -#define INLCR	0000100 -#define IGNCR	0000200 -#define ICRNL	0000400 -#define IUCLC	0001000 -#define IXON	0002000 -#define IXANY	0004000 -#define IXOFF	0010000 -#define IMAXBEL	0020000 -#define IUTF8	0040000 - -/* c_oflag bits */ -#define OPOST	0000001 -#define OLCUC	0000002 -#define ONLCR	0000004 -#define OCRNL	0000010 -#define ONOCR	0000020 -#define ONLRET	0000040 -#define OFILL	0000100 -#define OFDEL	0000200 -#define NLDLY	0000400 -#define   NL0	0000000 -#define   NL1	0000400 -#define CRDLY	0003000 -#define   CR0	0000000 -#define   CR1	0001000 -#define   CR2	0002000 -#define   CR3	0003000 -#define TABDLY	0014000 -#define   TAB0	0000000 -#define   TAB1	0004000 -#define   TAB2	0010000 -#define   TAB3	0014000 -#define   XTABS	0014000 -#define BSDLY	0020000 -#define   BS0	0000000 -#define   BS1	0020000 -#define VTDLY	0040000 -#define   VT0	0000000 -#define   VT1	0040000 -#define FFDLY	0100000 -#define   FF0	0000000 -#define   FF1	0100000 - -/* c_cflag bit meaning */ -#define CBAUD	0010017 -#define  B0	0000000		/* hang up */ -#define  B50	0000001 -#define  B75	0000002 -#define  B110	0000003 -#define  B134	0000004 -#define  B150	0000005 -#define  B200	0000006 -#define  B300	0000007 -#define  B600	0000010 -#define  B1200	0000011 -#define  B1800	0000012 -#define  B2400	0000013 -#define  B4800	0000014 -#define  B9600	0000015 -#define  B19200	0000016 -#define  B38400	0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE	0000060 -#define   CS5	0000000 -#define   CS6	0000020 -#define   CS7	0000040 -#define   CS8	0000060 -#define CSTOPB	0000100 -#define CREAD	0000200 -#define PARENB	0000400 -#define PARODD	0001000 -#define HUPCL	0002000 -#define CLOCAL	0004000 -#define CBAUDEX 0010000 -#define    BOTHER 0010000 -#define    B57600 0010001 -#define   B115200 0010002 -#define   B230400 0010003 -#define   B460800 0010004 -#define   B500000 0010005 -#define   B576000 0010006 -#define   B921600 0010007 -#define  B1000000 0010010 -#define  B1152000 0010011 -#define  B1500000 0010012 -#define  B2000000 0010013 -#define  B2500000 0010014 -#define  B3000000 0010015 -#define  B3500000 0010016 -#define  B4000000 0010017 -#define CIBAUD	  002003600000		/* input baud rate */ -#define CMSPAR	  010000000000		/* mark or space (stick) parity */ -#define CRTSCTS	  020000000000		/* flow control */ - -#define IBSHIFT	16			/* Shift from CBAUD to CIBAUD */ - -/* c_lflag bits */ -#define ISIG	0000001 -#define ICANON	0000002 -#define XCASE	0000004 -#define ECHO	0000010 -#define ECHOE	0000020 -#define ECHOK	0000040 -#define ECHONL	0000100 -#define NOFLSH	0000200 -#define TOSTOP	0000400 -#define ECHOCTL	0001000 -#define ECHOPRT	0002000 -#define ECHOKE	0004000 -#define FLUSHO	0010000 -#define PENDIN	0040000 -#define IEXTEN	0100000 -#define EXTPROC	0200000 - - -/* tcflow() and TCXONC use these */ -#define	TCOOFF		0 -#define	TCOON		1 -#define	TCIOFF		2 -#define	TCION		3 - -/* tcflush() and TCFLSH use these */ -#define	TCIFLUSH	0 -#define	TCOFLUSH	1 -#define	TCIOFLUSH	2 - -/* tcsetattr uses these */ -#define	TCSANOW		0 -#define	TCSADRAIN	1 -#define	TCSAFLUSH	2 - -#endif /* __ARCH_M68K_TERMBITS_H__ */ diff --git a/arch/m68k/include/asm/termios.h b/arch/m68k/include/asm/termios.h deleted file mode 100644 index 0823032e404..00000000000 --- a/arch/m68k/include/asm/termios.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef _M68K_TERMIOS_H -#define _M68K_TERMIOS_H - -#include <asm/termbits.h> -#include <asm/ioctls.h> - -struct winsize { -	unsigned short ws_row; -	unsigned short ws_col; -	unsigned short ws_xpixel; -	unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { -	unsigned short c_iflag;		/* input mode flags */ -	unsigned short c_oflag;		/* output mode flags */ -	unsigned short c_cflag;		/* control mode flags */ -	unsigned short c_lflag;		/* local mode flags */ -	unsigned char c_line;		/* line discipline */ -	unsigned char c_cc[NCC];	/* control characters */ -}; - -#ifdef __KERNEL__ -/*	intr=^C		quit=^|		erase=del	kill=^U -	eof=^D		vtime=\0	vmin=\1		sxtc=\0 -	start=^Q	stop=^S		susp=^Z		eol=\0 -	reprint=^R	discard=^U	werase=^W	lnext=^V -	eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" -#endif - -/* modem lines */ -#define TIOCM_LE	0x001 -#define TIOCM_DTR	0x002 -#define TIOCM_RTS	0x004 -#define TIOCM_ST	0x008 -#define TIOCM_SR	0x010 -#define TIOCM_CTS	0x020 -#define TIOCM_CAR	0x040 -#define TIOCM_RNG	0x080 -#define TIOCM_DSR	0x100 -#define TIOCM_CD	TIOCM_CAR -#define TIOCM_RI	TIOCM_RNG -#define TIOCM_OUT1	0x2000 -#define TIOCM_OUT2	0x4000 -#define TIOCM_LOOP	0x8000 - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -#ifdef __KERNEL__ - -/* - * Translate a "termio" structure into a "termios". Ugh. - */ -#define user_termio_to_kernel_termios(termios, termio) \ -({ \ -	unsigned short tmp; \ -	get_user(tmp, &(termio)->c_iflag); \ -	(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \ -	get_user(tmp, &(termio)->c_oflag); \ -	(termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \ -	get_user(tmp, &(termio)->c_cflag); \ -	(termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \ -	get_user(tmp, &(termio)->c_lflag); \ -	(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \ -	get_user((termios)->c_line, &(termio)->c_line); \ -	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ -}) - -/* - * Translate a "termios" structure into a "termio". Ugh. - */ -#define kernel_termios_to_user_termio(termio, termios) \ -({ \ -	put_user((termios)->c_iflag, &(termio)->c_iflag); \ -	put_user((termios)->c_oflag, &(termio)->c_oflag); \ -	put_user((termios)->c_cflag, &(termio)->c_cflag); \ -	put_user((termios)->c_lflag, &(termio)->c_lflag); \ -	put_user((termios)->c_line,  &(termio)->c_line); \ -	copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ -}) - -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) -#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) -#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) - -#endif	/* __KERNEL__ */ - -#endif /* _M68K_TERMIOS_H */ diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h index 1da5d53a00e..21a4784ca5a 100644 --- a/arch/m68k/include/asm/thread_info.h +++ b/arch/m68k/include/asm/thread_info.h @@ -3,6 +3,7 @@  #include <asm/types.h>  #include <asm/page.h> +#include <asm/segment.h>  /*   * On machines with 4k pages we default to an 8k thread size, though we @@ -26,6 +27,7 @@ struct thread_info {  	struct task_struct	*task;		/* main task structure */  	unsigned long		flags;  	struct exec_domain	*exec_domain;	/* execution domain */ +	mm_segment_t		addr_limit;	/* thread address space */  	int			preempt_count;	/* 0 => preemptable, <0 => BUG */  	__u32			cpu;		/* should always be 0 on m68k */  	unsigned long		tp_value;	/* thread pointer */ @@ -33,12 +35,11 @@ struct thread_info {  };  #endif /* __ASSEMBLY__ */ -#define PREEMPT_ACTIVE		0x4000000 -  #define INIT_THREAD_INFO(tsk)			\  {						\  	.task		= &tsk,			\  	.exec_domain	= &default_exec_domain,	\ +	.addr_limit	= KERNEL_DS,		\  	.preempt_count	= INIT_PREEMPT_COUNT,	\  	.restart_block = {			\  		.fn = do_no_restart_syscall,	\ @@ -47,34 +48,6 @@ struct thread_info {  #define init_stack		(init_thread_union.stack) -#ifdef CONFIG_MMU - -#ifndef __ASSEMBLY__ -#include <asm/current.h> -#endif - -#ifdef ASM_OFFSETS_C -#define task_thread_info(tsk)	((struct thread_info *) NULL) -#else -#include <asm/asm-offsets.h> -#define task_thread_info(tsk)	((struct thread_info *)((char *)tsk+TASK_TINFO)) -#endif - -#define init_thread_info	(init_task.thread.info) -#define task_stack_page(tsk)	((tsk)->stack) -#define current_thread_info()	task_thread_info(current) - -#define __HAVE_THREAD_FUNCTIONS - -#define setup_thread_stack(p, org) ({			\ -	*(struct task_struct **)(p)->stack = (p);	\ -	task_thread_info(p)->task = (p);		\ -}) - -#define end_of_stack(p)		((unsigned long *)(p)->stack + 1) - -#else /* !CONFIG_MMU */ -  #ifndef __ASSEMBLY__  /* how to get the thread information struct from C */  static inline struct thread_info *current_thread_info(void) @@ -92,17 +65,16 @@ static inline struct thread_info *current_thread_info(void)  #define init_thread_info	(init_thread_union.thread_info) -#endif /* CONFIG_MMU */ -  /* entry.S relies on these definitions!   * bits 0-7 are tested at every exception exit   * bits 8-15 are also tested at syscall exit   */ +#define TIF_NOTIFY_RESUME	5	/* callback before returning to user */  #define TIF_SIGPENDING		6	/* signal pending */  #define TIF_NEED_RESCHED	7	/* rescheduling necessary */  #define TIF_DELAYED_TRACE	14	/* single step a syscall */  #define TIF_SYSCALL_TRACE	15	/* syscall trace active */  #define TIF_MEMDIE		16	/* is terminating due to OOM killer */ -#define TIF_FREEZE		17	/* thread is freezing for suspend */ +#define TIF_RESTORE_SIGMASK	18	/* restore signal mask in do_signal */  #endif	/* _ASM_M68K_THREAD_INFO_H */ diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h index 6759dad954f..efc1f489235 100644 --- a/arch/m68k/include/asm/timex.h +++ b/arch/m68k/include/asm/timex.h @@ -28,4 +28,14 @@ static inline cycles_t get_cycles(void)  	return 0;  } +extern unsigned long (*mach_random_get_entropy)(void); + +static inline unsigned long random_get_entropy(void) +{ +	if (mach_random_get_entropy) +		return mach_random_get_entropy(); +	return 0; +} +#define random_get_entropy	random_get_entropy +  #endif diff --git a/arch/m68k/include/asm/tlbflush.h b/arch/m68k/include/asm/tlbflush.h index a6b4ed4fc90..965ea35c9a4 100644 --- a/arch/m68k/include/asm/tlbflush.h +++ b/arch/m68k/include/asm/tlbflush.h @@ -5,10 +5,13 @@  #ifndef CONFIG_SUN3  #include <asm/current.h> +#include <asm/mcfmmu.h>  static inline void flush_tlb_kernel_page(void *addr)  { -	if (CPU_IS_040_OR_060) { +	if (CPU_IS_COLDFIRE) { +		mmu_write(MMUOR, MMUOR_CNL); +	} else if (CPU_IS_040_OR_060) {  		mm_segment_t old_fs = get_fs();  		set_fs(KERNEL_DS);  		__asm__ __volatile__(".chip 68040\n\t" @@ -25,12 +28,15 @@ static inline void flush_tlb_kernel_page(void *addr)   */  static inline void __flush_tlb(void)  { -	if (CPU_IS_040_OR_060) +	if (CPU_IS_COLDFIRE) { +		mmu_write(MMUOR, MMUOR_CNL); +	} else if (CPU_IS_040_OR_060) {  		__asm__ __volatile__(".chip 68040\n\t"  				     "pflushan\n\t"  				     ".chip 68k"); -	else if (CPU_IS_020_OR_030) +	} else if (CPU_IS_020_OR_030) {  		__asm__ __volatile__("pflush #0,#4"); +	}  }  static inline void __flush_tlb040_one(unsigned long addr) @@ -43,7 +49,9 @@ static inline void __flush_tlb040_one(unsigned long addr)  static inline void __flush_tlb_one(unsigned long addr)  { -	if (CPU_IS_040_OR_060) +	if (CPU_IS_COLDFIRE) +		mmu_write(MMUOR, MMUOR_CNL); +	else if (CPU_IS_040_OR_060)  		__flush_tlb040_one(addr);  	else if (CPU_IS_020_OR_030)  		__asm__ __volatile__("pflush #0,#4,(%0)" : : "a" (addr)); @@ -56,12 +64,15 @@ static inline void __flush_tlb_one(unsigned long addr)   */  static inline void flush_tlb_all(void)  { -	if (CPU_IS_040_OR_060) +	if (CPU_IS_COLDFIRE) { +		mmu_write(MMUOR, MMUOR_CNL); +	} else if (CPU_IS_040_OR_060) {  		__asm__ __volatile__(".chip 68040\n\t"  				     "pflusha\n\t"  				     ".chip 68k"); -	else if (CPU_IS_020_OR_030) +	} else if (CPU_IS_020_OR_030) {  		__asm__ __volatile__("pflusha"); +	}  }  static inline void flush_tlb_mm(struct mm_struct *mm) diff --git a/arch/m68k/include/asm/topology.h b/arch/m68k/include/asm/topology.h deleted file mode 100644 index ca173e9f26f..00000000000 --- a/arch/m68k/include/asm/topology.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_M68K_TOPOLOGY_H -#define _ASM_M68K_TOPOLOGY_H - -#include <asm-generic/topology.h> - -#endif /* _ASM_M68K_TOPOLOGY_H */ diff --git a/arch/m68k/include/asm/traps.h b/arch/m68k/include/asm/traps.h index 0bffb17d5db..4aff3358fba 100644 --- a/arch/m68k/include/asm/traps.h +++ b/arch/m68k/include/asm/traps.h @@ -18,11 +18,11 @@  typedef void (*e_vector)(void);  extern e_vector vectors[]; +extern e_vector *_ramvec;  asmlinkage void auto_inthandler(void);  asmlinkage void user_inthandler(void);  asmlinkage void bad_inthandler(void); -extern void init_vectors(void);  #endif diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h deleted file mode 100644 index 6441cb5f8e7..00000000000 --- a/arch/m68k/include/asm/types.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _M68K_TYPES_H -#define _M68K_TYPES_H - -/* - * This file is never included by application software unless - * explicitly requested (e.g., via linux/types.h) in which case the - * application is Linux specific so (user-) name space pollution is - * not a major issue.  However, for interoperability, libraries still - * need to be careful to avoid a name clashes. - */ -#include <asm-generic/int-ll64.h> - -#ifndef __ASSEMBLY__ - -typedef unsigned short umode_t; - -#endif /* __ASSEMBLY__ */ - -/* - * These aren't exported outside the kernel to avoid name space clashes - */ -#ifdef __KERNEL__ - -#define BITS_PER_LONG 32 - -#ifndef __ASSEMBLY__ - -/* DMA addresses are always 32-bits wide */ - -typedef u32 dma_addr_t; -typedef u32 dma64_addr_t; - -#endif /* __ASSEMBLY__ */ - -#endif /* __KERNEL__ */ - -#endif /* _M68K_TYPES_H */ diff --git a/arch/m68k/include/asm/uaccess.h b/arch/m68k/include/asm/uaccess.h index 38f92dbb9a4..3fadc4a93d9 100644 --- a/arch/m68k/include/asm/uaccess.h +++ b/arch/m68k/include/asm/uaccess.h @@ -1,5 +1,12 @@  #ifdef __uClinux__ -#include "uaccess_no.h" +#include <asm/uaccess_no.h>  #else -#include "uaccess_mm.h" +#include <asm/uaccess_mm.h> +#endif + +#ifdef CONFIG_CPU_HAS_NO_UNALIGNED +#include <asm-generic/uaccess-unaligned.h> +#else +#define __get_user_unaligned(x, ptr)	__get_user((x), (ptr)) +#define __put_user_unaligned(x, ptr)	__put_user((x), (ptr))  #endif diff --git a/arch/m68k/include/asm/uaccess_mm.h b/arch/m68k/include/asm/uaccess_mm.h index 7107f3fbdbb..15901db435b 100644 --- a/arch/m68k/include/asm/uaccess_mm.h +++ b/arch/m68k/include/asm/uaccess_mm.h @@ -21,6 +21,22 @@ static inline int access_ok(int type, const void __user *addr,  }  /* + * Not all varients of the 68k family support the notion of address spaces. + * The traditional 680x0 parts do, and they use the sfc/dfc registers and + * the "moves" instruction to access user space from kernel space. Other + * family members like ColdFire don't support this, and only have a single + * address space, and use the usual "move" instruction for user space access. + * + * Outside of this difference the user space access functions are the same. + * So lets keep the code simple and just define in what we need to use. + */ +#ifdef CONFIG_CPU_HAS_ADDRESS_SPACES +#define	MOVES	"moves" +#else +#define	MOVES	"move" +#endif + +/*   * The exception table consists of pairs of addresses: the first is the   * address of an instruction that is allowed to fault, and the second is   * the address at which the program should continue.  No registers are @@ -43,7 +59,7 @@ extern int __get_user_bad(void);  #define __put_user_asm(res, x, ptr, bwl, reg, err)	\  asm volatile ("\n"					\ -	"1:	moves."#bwl"	%2,%1\n"		\ +	"1:	"MOVES"."#bwl"	%2,%1\n"		\  	"2:\n"						\  	"	.section .fixup,\"ax\"\n"		\  	"	.even\n"				\ @@ -74,7 +90,7 @@ asm volatile ("\n"					\  		__put_user_asm(__pu_err, __pu_val, ptr, b, d, -EFAULT);	\  		break;							\  	case 2:								\ -		__put_user_asm(__pu_err, __pu_val, ptr, w, d, -EFAULT);	\ +		__put_user_asm(__pu_err, __pu_val, ptr, w, r, -EFAULT);	\  		break;							\  	case 4:								\  		__put_user_asm(__pu_err, __pu_val, ptr, l, r, -EFAULT);	\ @@ -83,8 +99,8 @@ asm volatile ("\n"					\   	    {								\   		const void __user *__pu_ptr = (ptr);			\  		asm volatile ("\n"					\ -			"1:	moves.l	%2,(%1)+\n"			\ -			"2:	moves.l	%R2,(%1)\n"			\ +			"1:	"MOVES".l	%2,(%1)+\n"		\ +			"2:	"MOVES".l	%R2,(%1)\n"		\  			"3:\n"						\  			"	.section .fixup,\"ax\"\n"		\  			"	.even\n"				\ @@ -115,12 +131,12 @@ asm volatile ("\n"					\  #define __get_user_asm(res, x, ptr, type, bwl, reg, err) ({	\  	type __gu_val;						\  	asm volatile ("\n"					\ -		"1:	moves."#bwl"	%2,%1\n"		\ +		"1:	"MOVES"."#bwl"	%2,%1\n"		\  		"2:\n"						\  		"	.section .fixup,\"ax\"\n"		\  		"	.even\n"				\  		"10:	move.l	%3,%0\n"			\ -		"	sub."#bwl"	%1,%1\n"		\ +		"	sub.l	%1,%1\n"			\  		"	jra	2b\n"				\  		"	.previous\n"				\  		"\n"						\ @@ -142,7 +158,7 @@ asm volatile ("\n"					\  		__get_user_asm(__gu_err, x, ptr, u8, b, d, -EFAULT);	\  		break;							\  	case 2:								\ -		__get_user_asm(__gu_err, x, ptr, u16, w, d, -EFAULT);	\ +		__get_user_asm(__gu_err, x, ptr, u16, w, r, -EFAULT);	\  		break;							\  	case 4:								\  		__get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT);	\ @@ -152,8 +168,8 @@ asm volatile ("\n"					\   		const void *__gu_ptr = (ptr);				\   		u64 __gu_val;						\  		asm volatile ("\n"					\ -			"1:	moves.l	(%2)+,%1\n"			\ -			"2:	moves.l	(%2),%R1\n"			\ +			"1:	"MOVES".l	(%2)+,%1\n"		\ +			"2:	"MOVES".l	(%2),%R1\n"		\  			"3:\n"						\  			"	.section .fixup,\"ax\"\n"		\  			"	.even\n"				\ @@ -188,12 +204,12 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from, unsigned  #define __constant_copy_from_user_asm(res, to, from, tmp, n, s1, s2, s3)\  	asm volatile ("\n"						\ -		"1:	moves."#s1"	(%2)+,%3\n"			\ +		"1:	"MOVES"."#s1"	(%2)+,%3\n"			\  		"	move."#s1"	%3,(%1)+\n"			\ -		"2:	moves."#s2"	(%2)+,%3\n"			\ +		"2:	"MOVES"."#s2"	(%2)+,%3\n"			\  		"	move."#s2"	%3,(%1)+\n"			\  		"	.ifnc	\""#s3"\",\"\"\n"			\ -		"3:	moves."#s3"	(%2)+,%3\n"			\ +		"3:	"MOVES"."#s3"	(%2)+,%3\n"			\  		"	move."#s3"	%3,(%1)+\n"			\  		"	.endif\n"					\  		"4:\n"							\ @@ -229,7 +245,7 @@ __constant_copy_from_user(void *to, const void __user *from, unsigned long n)  		__get_user_asm(res, *(u8 *)to, (u8 __user *)from, u8, b, d, 1);  		break;  	case 2: -		__get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, d, 2); +		__get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, r, 2);  		break;  	case 3:  		__constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,); @@ -269,13 +285,13 @@ __constant_copy_from_user(void *to, const void __user *from, unsigned long n)  #define __constant_copy_to_user_asm(res, to, from, tmp, n, s1, s2, s3)	\  	asm volatile ("\n"						\  		"	move."#s1"	(%2)+,%3\n"			\ -		"11:	moves."#s1"	%3,(%1)+\n"			\ +		"11:	"MOVES"."#s1"	%3,(%1)+\n"			\  		"12:	move."#s2"	(%2)+,%3\n"			\ -		"21:	moves."#s2"	%3,(%1)+\n"			\ +		"21:	"MOVES"."#s2"	%3,(%1)+\n"			\  		"22:\n"							\  		"	.ifnc	\""#s3"\",\"\"\n"			\  		"	move."#s3"	(%2)+,%3\n"			\ -		"31:	moves."#s3"	%3,(%1)+\n"			\ +		"31:	"MOVES"."#s3"	%3,(%1)+\n"			\  		"32:\n"							\  		"	.endif\n"					\  		"4:\n"							\ @@ -310,7 +326,7 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)  		__put_user_asm(res, *(u8 *)from, (u8 __user *)to, b, d, 1);  		break;  	case 2: -		__put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, d, 2); +		__put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, r, 2);  		break;  	case 3:  		__constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,); @@ -363,12 +379,15 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)  #define copy_from_user(to, from, n)	__copy_from_user(to, from, n)  #define copy_to_user(to, from, n)	__copy_to_user(to, from, n) -long strncpy_from_user(char *dst, const char __user *src, long count); -long strnlen_user(const char __user *src, long n); +#define user_addr_max() \ +	(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL) + +extern long strncpy_from_user(char *dst, const char __user *src, long count); +extern __must_check long strlen_user(const char __user *str); +extern __must_check long strnlen_user(const char __user *str, long n); +  unsigned long __clear_user(void __user *to, unsigned long n);  #define clear_user	__clear_user -#define strlen_user(str) strnlen_user(str, 32767) -  #endif /* _M68K_UACCESS_H */ diff --git a/arch/m68k/include/asm/ucontext.h b/arch/m68k/include/asm/ucontext.h index 00dcc5176c5..e4e22669edc 100644 --- a/arch/m68k/include/asm/ucontext.h +++ b/arch/m68k/include/asm/ucontext.h @@ -7,11 +7,7 @@ typedef greg_t gregset_t[NGREG];  typedef struct fpregset {  	int f_fpcntl[3]; -#ifdef __mcoldfire__ -	int f_fpregs[8][2]; -#else  	int f_fpregs[8*3]; -#endif  } fpregset_t;  struct mcontext { diff --git a/arch/m68k/include/asm/unaligned.h b/arch/m68k/include/asm/unaligned.h index 019caa740c2..2b3ca0bf7a0 100644 --- a/arch/m68k/include/asm/unaligned.h +++ b/arch/m68k/include/asm/unaligned.h @@ -2,7 +2,7 @@  #define _ASM_M68K_UNALIGNED_H -#ifdef CONFIG_COLDFIRE +#ifdef CONFIG_CPU_HAS_NO_UNALIGNED  #include <linux/unaligned/be_struct.h>  #include <linux/unaligned/le_byteshift.h>  #include <linux/unaligned/generic.h> @@ -12,7 +12,7 @@  #else  /* - * The m68k can do unaligned accesses itself.  + * The m68k can do unaligned accesses itself.   */  #include <linux/unaligned/access_ok.h>  #include <linux/unaligned/generic.h> diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index b43b36beafe..1fcdd344c7a 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h @@ -1,354 +1,11 @@  #ifndef _ASM_M68K_UNISTD_H_  #define _ASM_M68K_UNISTD_H_ -/* - * This file contains the system call numbers. - */ +#include <uapi/asm/unistd.h> -#define __NR_restart_syscall	  0 -#define __NR_exit		  1 -#define __NR_fork		  2 -#define __NR_read		  3 -#define __NR_write		  4 -#define __NR_open		  5 -#define __NR_close		  6 -#define __NR_waitpid		  7 -#define __NR_creat		  8 -#define __NR_link		  9 -#define __NR_unlink		 10 -#define __NR_execve		 11 -#define __NR_chdir		 12 -#define __NR_time		 13 -#define __NR_mknod		 14 -#define __NR_chmod		 15 -#define __NR_chown		 16 -#define __NR_break		 17 -#define __NR_oldstat		 18 -#define __NR_lseek		 19 -#define __NR_getpid		 20 -#define __NR_mount		 21 -#define __NR_umount		 22 -#define __NR_setuid		 23 -#define __NR_getuid		 24 -#define __NR_stime		 25 -#define __NR_ptrace		 26 -#define __NR_alarm		 27 -#define __NR_oldfstat		 28 -#define __NR_pause		 29 -#define __NR_utime		 30 -#define __NR_stty		 31 -#define __NR_gtty		 32 -#define __NR_access		 33 -#define __NR_nice		 34 -#define __NR_ftime		 35 -#define __NR_sync		 36 -#define __NR_kill		 37 -#define __NR_rename		 38 -#define __NR_mkdir		 39 -#define __NR_rmdir		 40 -#define __NR_dup		 41 -#define __NR_pipe		 42 -#define __NR_times		 43 -#define __NR_prof		 44 -#define __NR_brk		 45 -#define __NR_setgid		 46 -#define __NR_getgid		 47 -#define __NR_signal		 48 -#define __NR_geteuid		 49 -#define __NR_getegid		 50 -#define __NR_acct		 51 -#define __NR_umount2		 52 -#define __NR_lock		 53 -#define __NR_ioctl		 54 -#define __NR_fcntl		 55 -#define __NR_mpx		 56 -#define __NR_setpgid		 57 -#define __NR_ulimit		 58 -#define __NR_oldolduname	 59 -#define __NR_umask		 60 -#define __NR_chroot		 61 -#define __NR_ustat		 62 -#define __NR_dup2		 63 -#define __NR_getppid		 64 -#define __NR_getpgrp		 65 -#define __NR_setsid		 66 -#define __NR_sigaction		 67 -#define __NR_sgetmask		 68 -#define __NR_ssetmask		 69 -#define __NR_setreuid		 70 -#define __NR_setregid		 71 -#define __NR_sigsuspend		 72 -#define __NR_sigpending		 73 -#define __NR_sethostname	 74 -#define __NR_setrlimit		 75 -#define __NR_getrlimit		 76 -#define __NR_getrusage		 77 -#define __NR_gettimeofday	 78 -#define __NR_settimeofday	 79 -#define __NR_getgroups		 80 -#define __NR_setgroups		 81 -#define __NR_select		 82 -#define __NR_symlink		 83 -#define __NR_oldlstat		 84 -#define __NR_readlink		 85 -#define __NR_uselib		 86 -#define __NR_swapon		 87 -#define __NR_reboot		 88 -#define __NR_readdir		 89 -#define __NR_mmap		 90 -#define __NR_munmap		 91 -#define __NR_truncate		 92 -#define __NR_ftruncate		 93 -#define __NR_fchmod		 94 -#define __NR_fchown		 95 -#define __NR_getpriority	 96 -#define __NR_setpriority	 97 -#define __NR_profil		 98 -#define __NR_statfs		 99 -#define __NR_fstatfs		100 -#define __NR_ioperm		101 -#define __NR_socketcall		102 -#define __NR_syslog		103 -#define __NR_setitimer		104 -#define __NR_getitimer		105 -#define __NR_stat		106 -#define __NR_lstat		107 -#define __NR_fstat		108 -#define __NR_olduname		109 -#define __NR_iopl		/* 110 */ not supported -#define __NR_vhangup		111 -#define __NR_idle		/* 112 */ Obsolete -#define __NR_vm86		/* 113 */ not supported -#define __NR_wait4		114 -#define __NR_swapoff		115 -#define __NR_sysinfo		116 -#define __NR_ipc		117 -#define __NR_fsync		118 -#define __NR_sigreturn		119 -#define __NR_clone		120 -#define __NR_setdomainname	121 -#define __NR_uname		122 -#define __NR_cacheflush		123 -#define __NR_adjtimex		124 -#define __NR_mprotect		125 -#define __NR_sigprocmask	126 -#define __NR_create_module	127 -#define __NR_init_module	128 -#define __NR_delete_module	129 -#define __NR_get_kernel_syms	130 -#define __NR_quotactl		131 -#define __NR_getpgid		132 -#define __NR_fchdir		133 -#define __NR_bdflush		134 -#define __NR_sysfs		135 -#define __NR_personality	136 -#define __NR_afs_syscall	137 /* Syscall for Andrew File System */ -#define __NR_setfsuid		138 -#define __NR_setfsgid		139 -#define __NR__llseek		140 -#define __NR_getdents		141 -#define __NR__newselect		142 -#define __NR_flock		143 -#define __NR_msync		144 -#define __NR_readv		145 -#define __NR_writev		146 -#define __NR_getsid		147 -#define __NR_fdatasync		148 -#define __NR__sysctl		149 -#define __NR_mlock		150 -#define __NR_munlock		151 -#define __NR_mlockall		152 -#define __NR_munlockall		153 -#define __NR_sched_setparam		154 -#define __NR_sched_getparam		155 -#define __NR_sched_setscheduler		156 -#define __NR_sched_getscheduler		157 -#define __NR_sched_yield		158 -#define __NR_sched_get_priority_max	159 -#define __NR_sched_get_priority_min	160 -#define __NR_sched_rr_get_interval	161 -#define __NR_nanosleep		162 -#define __NR_mremap		163 -#define __NR_setresuid		164 -#define __NR_getresuid		165 -#define __NR_getpagesize	166 -#define __NR_query_module	167 -#define __NR_poll		168 -#define __NR_nfsservctl		169 -#define __NR_setresgid		170 -#define __NR_getresgid		171 -#define __NR_prctl		172 -#define __NR_rt_sigreturn	173 -#define __NR_rt_sigaction	174 -#define __NR_rt_sigprocmask	175 -#define __NR_rt_sigpending	176 -#define __NR_rt_sigtimedwait	177 -#define __NR_rt_sigqueueinfo	178 -#define __NR_rt_sigsuspend	179 -#define __NR_pread64		180 -#define __NR_pwrite64		181 -#define __NR_lchown		182 -#define __NR_getcwd		183 -#define __NR_capget		184 -#define __NR_capset		185 -#define __NR_sigaltstack	186 -#define __NR_sendfile		187 -#define __NR_getpmsg		188	/* some people actually want streams */ -#define __NR_putpmsg		189	/* some people actually want streams */ -#define __NR_vfork		190 -#define __NR_ugetrlimit		191 -#define __NR_mmap2		192 -#define __NR_truncate64		193 -#define __NR_ftruncate64	194 -#define __NR_stat64		195 -#define __NR_lstat64		196 -#define __NR_fstat64		197 -#define __NR_chown32		198 -#define __NR_getuid32		199 -#define __NR_getgid32		200 -#define __NR_geteuid32		201 -#define __NR_getegid32		202 -#define __NR_setreuid32		203 -#define __NR_setregid32		204 -#define __NR_getgroups32	205 -#define __NR_setgroups32	206 -#define __NR_fchown32		207 -#define __NR_setresuid32	208 -#define __NR_getresuid32	209 -#define __NR_setresgid32	210 -#define __NR_getresgid32	211 -#define __NR_lchown32		212 -#define __NR_setuid32		213 -#define __NR_setgid32		214 -#define __NR_setfsuid32		215 -#define __NR_setfsgid32		216 -#define __NR_pivot_root		217 -#define __NR_getdents64		220 -#define __NR_gettid		221 -#define __NR_tkill		222 -#define __NR_setxattr		223 -#define __NR_lsetxattr		224 -#define __NR_fsetxattr		225 -#define __NR_getxattr		226 -#define __NR_lgetxattr		227 -#define __NR_fgetxattr		228 -#define __NR_listxattr		229 -#define __NR_llistxattr		230 -#define __NR_flistxattr		231 -#define __NR_removexattr	232 -#define __NR_lremovexattr	233 -#define __NR_fremovexattr	234 -#define __NR_futex		235 -#define __NR_sendfile64		236 -#define __NR_mincore		237 -#define __NR_madvise		238 -#define __NR_fcntl64		239 -#define __NR_readahead		240 -#define __NR_io_setup		241 -#define __NR_io_destroy		242 -#define __NR_io_getevents	243 -#define __NR_io_submit		244 -#define __NR_io_cancel		245 -#define __NR_fadvise64		246 -#define __NR_exit_group		247 -#define __NR_lookup_dcookie	248 -#define __NR_epoll_create	249 -#define __NR_epoll_ctl		250 -#define __NR_epoll_wait		251 -#define __NR_remap_file_pages	252 -#define __NR_set_tid_address	253 -#define __NR_timer_create	254 -#define __NR_timer_settime	255 -#define __NR_timer_gettime	256 -#define __NR_timer_getoverrun	257 -#define __NR_timer_delete	258 -#define __NR_clock_settime	259 -#define __NR_clock_gettime	260 -#define __NR_clock_getres	261 -#define __NR_clock_nanosleep	262 -#define __NR_statfs64		263 -#define __NR_fstatfs64		264 -#define __NR_tgkill		265 -#define __NR_utimes		266 -#define __NR_fadvise64_64	267 -#define __NR_mbind		268 -#define __NR_get_mempolicy	269 -#define __NR_set_mempolicy	270 -#define __NR_mq_open		271 -#define __NR_mq_unlink		272 -#define __NR_mq_timedsend	273 -#define __NR_mq_timedreceive	274 -#define __NR_mq_notify		275 -#define __NR_mq_getsetattr	276 -#define __NR_waitid		277 -#define __NR_vserver		278 -#define __NR_add_key		279 -#define __NR_request_key	280 -#define __NR_keyctl		281 -#define __NR_ioprio_set		282 -#define __NR_ioprio_get		283 -#define __NR_inotify_init	284 -#define __NR_inotify_add_watch	285 -#define __NR_inotify_rm_watch	286 -#define __NR_migrate_pages	287 -#define __NR_openat		288 -#define __NR_mkdirat		289 -#define __NR_mknodat		290 -#define __NR_fchownat		291 -#define __NR_futimesat		292 -#define __NR_fstatat64		293 -#define __NR_unlinkat		294 -#define __NR_renameat		295 -#define __NR_linkat		296 -#define __NR_symlinkat		297 -#define __NR_readlinkat		298 -#define __NR_fchmodat		299 -#define __NR_faccessat		300 -#define __NR_pselect6		301 -#define __NR_ppoll		302 -#define __NR_unshare		303 -#define __NR_set_robust_list	304 -#define __NR_get_robust_list	305 -#define __NR_splice		306 -#define __NR_sync_file_range	307 -#define __NR_tee		308 -#define __NR_vmsplice		309 -#define __NR_move_pages		310 -#define __NR_sched_setaffinity	311 -#define __NR_sched_getaffinity	312 -#define __NR_kexec_load		313 -#define __NR_getcpu		314 -#define __NR_epoll_pwait	315 -#define __NR_utimensat		316 -#define __NR_signalfd		317 -#define __NR_timerfd_create	318 -#define __NR_eventfd		319 -#define __NR_fallocate		320 -#define __NR_timerfd_settime	321 -#define __NR_timerfd_gettime	322 -#define __NR_signalfd4		323 -#define __NR_eventfd2		324 -#define __NR_epoll_create1	325 -#define __NR_dup3		326 -#define __NR_pipe2		327 -#define __NR_inotify_init1	328 -#define __NR_preadv		329 -#define __NR_pwritev		330 -#define __NR_rt_tgsigqueueinfo	331 -#define __NR_perf_event_open	332 -#define __NR_get_thread_area	333 -#define __NR_set_thread_area	334 -#define __NR_atomic_cmpxchg_32	335 -#define __NR_atomic_barrier	336 -#define __NR_fanotify_init	337 -#define __NR_fanotify_mark	338 -#define __NR_prlimit64		339 -#ifdef __KERNEL__ +#define NR_syscalls		352 -#define NR_syscalls		340 - -#define __ARCH_WANT_IPC_PARSE_VERSION  #define __ARCH_WANT_OLD_READDIR  #define __ARCH_WANT_OLD_STAT  #define __ARCH_WANT_STAT64 @@ -356,7 +13,6 @@  #define __ARCH_WANT_SYS_GETHOSTNAME  #define __ARCH_WANT_SYS_IPC  #define __ARCH_WANT_SYS_PAUSE -#define __ARCH_WANT_SYS_SGETMASK  #define __ARCH_WANT_SYS_SIGNAL  #define __ARCH_WANT_SYS_TIME  #define __ARCH_WANT_SYS_UTIME @@ -372,15 +28,7 @@  #define __ARCH_WANT_SYS_OLDUMOUNT  #define __ARCH_WANT_SYS_SIGPENDING  #define __ARCH_WANT_SYS_SIGPROCMASK -#define __ARCH_WANT_SYS_RT_SIGACTION - -/* - * "Conditional" syscalls - * - * What we want is __attribute__((weak,alias("sys_ni_syscall"))), - * but it doesn't work on all toolchains, so we just do it by hand - */ -#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") +#define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_SYS_VFORK -#endif /* __KERNEL__ */  #endif /* _ASM_M68K_UNISTD_H_ */ diff --git a/arch/m68k/include/asm/vga.h b/arch/m68k/include/asm/vga.h new file mode 100644 index 00000000000..d3aa1401e7a --- /dev/null +++ b/arch/m68k/include/asm/vga.h @@ -0,0 +1,27 @@ +#ifndef _ASM_M68K_VGA_H +#define _ASM_M68K_VGA_H + +#include <asm/raw_io.h> + +/* + * FIXME + * Ugh, we don't have PCI space, so map readb() and friends to use raw I/O + * accessors, which are identical to the z_*() Zorro bus accessors. + * This should make cirrusfb work again on Amiga + */ +#undef inb_p +#undef inw_p +#undef outb_p +#undef outw +#undef readb +#undef writeb +#undef writew +#define inb_p(port)		0 +#define inw_p(port)		0 +#define outb_p(port, val)	do { } while (0) +#define outw(port, val)		do { } while (0) +#define readb			raw_inb +#define writeb			raw_outb +#define writew			raw_outw + +#endif /* _ASM_M68K_VGA_H */ diff --git a/arch/m68k/include/asm/xor.h b/arch/m68k/include/asm/xor.h deleted file mode 100644 index c82eb12a5b1..00000000000 --- a/arch/m68k/include/asm/xor.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/xor.h> diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild new file mode 100644 index 00000000000..6a2d257bdfb --- /dev/null +++ b/arch/m68k/include/uapi/asm/Kbuild @@ -0,0 +1,35 @@ +# UAPI Header export list +include include/uapi/asm-generic/Kbuild.asm + +generic-y += auxvec.h +generic-y += msgbuf.h +generic-y += sembuf.h +generic-y += shmbuf.h +generic-y += socket.h +generic-y += sockios.h +generic-y += termbits.h +generic-y += termios.h + +header-y += a.out.h +header-y += bootinfo.h +header-y += bootinfo-amiga.h +header-y += bootinfo-apollo.h +header-y += bootinfo-atari.h +header-y += bootinfo-hp300.h +header-y += bootinfo-mac.h +header-y += bootinfo-q40.h +header-y += bootinfo-vme.h +header-y += byteorder.h +header-y += cachectl.h +header-y += fcntl.h +header-y += ioctls.h +header-y += param.h +header-y += poll.h +header-y += posix_types.h +header-y += ptrace.h +header-y += setup.h +header-y += sigcontext.h +header-y += signal.h +header-y += stat.h +header-y += swab.h +header-y += unistd.h diff --git a/arch/m68k/include/asm/a.out.h b/arch/m68k/include/uapi/asm/a.out.h index 3885fe43432..3885fe43432 100644 --- a/arch/m68k/include/asm/a.out.h +++ b/arch/m68k/include/uapi/asm/a.out.h diff --git a/arch/m68k/include/uapi/asm/bootinfo-amiga.h b/arch/m68k/include/uapi/asm/bootinfo-amiga.h new file mode 100644 index 00000000000..daad3c58d2d --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-amiga.h @@ -0,0 +1,63 @@ +/* +** asm/bootinfo-amiga.h -- Amiga-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_AMIGA_H +#define _UAPI_ASM_M68K_BOOTINFO_AMIGA_H + + +    /* +     *  Amiga-specific tags +     */ + +#define BI_AMIGA_MODEL		0x8000	/* model (__be32) */ +#define BI_AMIGA_AUTOCON	0x8001	/* AutoConfig device */ +					/* (AmigaOS struct ConfigDev) */ +#define BI_AMIGA_CHIP_SIZE	0x8002	/* size of Chip RAM (__be32) */ +#define BI_AMIGA_VBLANK		0x8003	/* VBLANK frequency (__u8) */ +#define BI_AMIGA_PSFREQ		0x8004	/* power supply frequency (__u8) */ +#define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (__be32) */ +#define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (__be32) */ +#define BI_AMIGA_SERPER		0x8007	/* serial port period (__be16) */ + + +    /* +     *  Amiga models (BI_AMIGA_MODEL) +     */ + +#define AMI_UNKNOWN		0 +#define AMI_500			1 +#define AMI_500PLUS		2 +#define AMI_600			3 +#define AMI_1000		4 +#define AMI_1200		5 +#define AMI_2000		6 +#define AMI_2500		7 +#define AMI_3000		8 +#define AMI_3000T		9 +#define AMI_3000PLUS		10 +#define AMI_4000		11 +#define AMI_4000T		12 +#define AMI_CDTV		13 +#define AMI_CD32		14 +#define AMI_DRACO		15 + + +    /* +     *  Amiga chipsets (BI_AMIGA_CHIPSET) +     */ + +#define CS_STONEAGE		0 +#define CS_OCS			1 +#define CS_ECS			2 +#define CS_AGA			3 + + +    /* +     *  Latest Amiga bootinfo version +     */ + +#define AMIGA_BOOTI_VERSION	MK_BI_VERSION(2, 0) + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_AMIGA_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo-apollo.h b/arch/m68k/include/uapi/asm/bootinfo-apollo.h new file mode 100644 index 00000000000..a93e0af1c6f --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-apollo.h @@ -0,0 +1,28 @@ +/* +** asm/bootinfo-apollo.h -- Apollo-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_APOLLO_H +#define _UAPI_ASM_M68K_BOOTINFO_APOLLO_H + + +    /* +     *  Apollo-specific tags +     */ + +#define BI_APOLLO_MODEL		0x8000	/* model (__be32) */ + + +    /* +     *  Apollo models (BI_APOLLO_MODEL) +     */ + +#define APOLLO_UNKNOWN		0 +#define APOLLO_DN3000		1 +#define APOLLO_DN3010		2 +#define APOLLO_DN3500		3 +#define APOLLO_DN4000		4 +#define APOLLO_DN4500		5 + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_APOLLO_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo-atari.h b/arch/m68k/include/uapi/asm/bootinfo-atari.h new file mode 100644 index 00000000000..a817854049b --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-atari.h @@ -0,0 +1,44 @@ +/* +** asm/bootinfo-atari.h -- Atari-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_ATARI_H +#define _UAPI_ASM_M68K_BOOTINFO_ATARI_H + + +    /* +     *  Atari-specific tags +     */ + +#define BI_ATARI_MCH_COOKIE	0x8000	/* _MCH cookie from TOS (__be32) */ +#define BI_ATARI_MCH_TYPE	0x8001	/* special machine type (__be32) */ + + +    /* +     *  mch_cookie values (upper word of BI_ATARI_MCH_COOKIE) +     */ + +#define ATARI_MCH_ST		0 +#define ATARI_MCH_STE		1 +#define ATARI_MCH_TT		2 +#define ATARI_MCH_FALCON	3 + + +    /* +     *  Atari machine types (BI_ATARI_MCH_TYPE) +     */ + +#define ATARI_MACH_NORMAL	0	/* no special machine type */ +#define ATARI_MACH_MEDUSA	1	/* Medusa 040 */ +#define ATARI_MACH_HADES	2	/* Hades 040 or 060 */ +#define ATARI_MACH_AB40		3	/* Afterburner040 on Falcon */ + + +    /* +     *  Latest Atari bootinfo version +     */ + +#define ATARI_BOOTI_VERSION	MK_BI_VERSION(2, 1) + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_ATARI_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo-hp300.h b/arch/m68k/include/uapi/asm/bootinfo-hp300.h new file mode 100644 index 00000000000..c90cb71ed89 --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-hp300.h @@ -0,0 +1,50 @@ +/* +** asm/bootinfo-hp300.h -- HP9000/300-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_HP300_H +#define _UAPI_ASM_M68K_BOOTINFO_HP300_H + + +    /* +     *  HP9000/300-specific tags +     */ + +#define BI_HP300_MODEL		0x8000	/* model (__be32) */ +#define BI_HP300_UART_SCODE	0x8001	/* UART select code (__be32) */ +#define BI_HP300_UART_ADDR	0x8002	/* phys. addr of UART (__be32) */ + + +    /* +     *  HP9000/300 and /400 models (BI_HP300_MODEL) +     * +     * This information was taken from NetBSD +     */ + +#define HP_320		0	/* 16MHz 68020+HP MMU+16K external cache */ +#define HP_330		1	/* 16MHz 68020+68851 MMU */ +#define HP_340		2	/* 16MHz 68030 */ +#define HP_345		3	/* 50MHz 68030+32K external cache */ +#define HP_350		4	/* 25MHz 68020+HP MMU+32K external cache */ +#define HP_360		5	/* 25MHz 68030 */ +#define HP_370		6	/* 33MHz 68030+64K external cache */ +#define HP_375		7	/* 50MHz 68030+32K external cache */ +#define HP_380		8	/* 25MHz 68040 */ +#define HP_385		9	/* 33MHz 68040 */ + +#define HP_400		10	/* 50MHz 68030+32K external cache */ +#define HP_425T		11	/* 25MHz 68040 - model 425t */ +#define HP_425S		12	/* 25MHz 68040 - model 425s */ +#define HP_425E		13	/* 25MHz 68040 - model 425e */ +#define HP_433T		14	/* 33MHz 68040 - model 433t */ +#define HP_433S		15	/* 33MHz 68040 - model 433s */ + + +    /* +     *  Latest HP9000/300 bootinfo version +     */ + +#define HP300_BOOTI_VERSION	MK_BI_VERSION(2, 0) + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_HP300_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo-mac.h b/arch/m68k/include/uapi/asm/bootinfo-mac.h new file mode 100644 index 00000000000..b44ff73898a --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-mac.h @@ -0,0 +1,119 @@ +/* +** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_MAC_H +#define _UAPI_ASM_M68K_BOOTINFO_MAC_H + + +    /* +     *  Macintosh-specific tags (all __be32) +     */ + +#define BI_MAC_MODEL		0x8000	/* Mac Gestalt ID (model type) */ +#define BI_MAC_VADDR		0x8001	/* Mac video base address */ +#define BI_MAC_VDEPTH		0x8002	/* Mac video depth */ +#define BI_MAC_VROW		0x8003	/* Mac video rowbytes */ +#define BI_MAC_VDIM		0x8004	/* Mac video dimensions */ +#define BI_MAC_VLOGICAL		0x8005	/* Mac video logical base */ +#define BI_MAC_SCCBASE		0x8006	/* Mac SCC base address */ +#define BI_MAC_BTIME		0x8007	/* Mac boot time */ +#define BI_MAC_GMTBIAS		0x8008	/* Mac GMT timezone offset */ +#define BI_MAC_MEMSIZE		0x8009	/* Mac RAM size (sanity check) */ +#define BI_MAC_CPUID		0x800a	/* Mac CPU type (sanity check) */ +#define BI_MAC_ROMBASE		0x800b	/* Mac system ROM base address */ + + +    /* +     *  Macintosh hardware profile data - unused, see macintosh.h for +     *  reasonable type values +     */ + +#define BI_MAC_VIA1BASE		0x8010	/* Mac VIA1 base address (always present) */ +#define BI_MAC_VIA2BASE		0x8011	/* Mac VIA2 base address (type varies) */ +#define BI_MAC_VIA2TYPE		0x8012	/* Mac VIA2 type (VIA, RBV, OSS) */ +#define BI_MAC_ADBTYPE		0x8013	/* Mac ADB interface type */ +#define BI_MAC_ASCBASE		0x8014	/* Mac Apple Sound Chip base address */ +#define BI_MAC_SCSI5380		0x8015	/* Mac NCR 5380 SCSI (base address, multi) */ +#define BI_MAC_SCSIDMA		0x8016	/* Mac SCSI DMA (base address) */ +#define BI_MAC_SCSI5396		0x8017	/* Mac NCR 53C96 SCSI (base address, multi) */ +#define BI_MAC_IDETYPE		0x8018	/* Mac IDE interface type */ +#define BI_MAC_IDEBASE		0x8019	/* Mac IDE interface base address */ +#define BI_MAC_NUBUS		0x801a	/* Mac Nubus type (none, regular, pseudo) */ +#define BI_MAC_SLOTMASK		0x801b	/* Mac Nubus slots present */ +#define BI_MAC_SCCTYPE		0x801c	/* Mac SCC serial type (normal, IOP) */ +#define BI_MAC_ETHTYPE		0x801d	/* Mac builtin ethernet type (Sonic, MACE */ +#define BI_MAC_ETHBASE		0x801e	/* Mac builtin ethernet base address */ +#define BI_MAC_PMU		0x801f	/* Mac power management / poweroff hardware */ +#define BI_MAC_IOP_SWIM		0x8020	/* Mac SWIM floppy IOP */ +#define BI_MAC_IOP_ADB		0x8021	/* Mac ADB IOP */ + + +    /* +     * Macintosh Gestalt numbers (BI_MAC_MODEL) +     */ + +#define MAC_MODEL_II		6 +#define MAC_MODEL_IIX		7 +#define MAC_MODEL_IICX		8 +#define MAC_MODEL_SE30		9 +#define MAC_MODEL_IICI		11 +#define MAC_MODEL_IIFX		13	/* And well numbered it is too */ +#define MAC_MODEL_IISI		18 +#define MAC_MODEL_LC		19 +#define MAC_MODEL_Q900		20 +#define MAC_MODEL_PB170		21 +#define MAC_MODEL_Q700		22 +#define MAC_MODEL_CLII		23	/* aka: P200 */ +#define MAC_MODEL_PB140		25 +#define MAC_MODEL_Q950		26	/* aka: WGS95 */ +#define MAC_MODEL_LCIII		27	/* aka: P450 */ +#define MAC_MODEL_PB210		29 +#define MAC_MODEL_C650		30 +#define MAC_MODEL_PB230		32 +#define MAC_MODEL_PB180		33 +#define MAC_MODEL_PB160		34 +#define MAC_MODEL_Q800		35	/* aka: WGS80 */ +#define MAC_MODEL_Q650		36 +#define MAC_MODEL_LCII		37	/* aka: P400/405/410/430 */ +#define MAC_MODEL_PB250		38 +#define MAC_MODEL_IIVI		44 +#define MAC_MODEL_P600		45	/* aka: P600CD */ +#define MAC_MODEL_IIVX		48 +#define MAC_MODEL_CCL		49	/* aka: P250 */ +#define MAC_MODEL_PB165C	50 +#define MAC_MODEL_C610		52	/* aka: WGS60 */ +#define MAC_MODEL_Q610		53 +#define MAC_MODEL_PB145		54	/* aka: PB145B */ +#define MAC_MODEL_P520		56	/* aka: LC520 */ +#define MAC_MODEL_C660		60 +#define MAC_MODEL_P460		62	/* aka: LCIII+, P466/P467 */ +#define MAC_MODEL_PB180C	71 +#define MAC_MODEL_PB520		72	/* aka: PB520C, PB540, PB540C, PB550C */ +#define MAC_MODEL_PB270C	77 +#define MAC_MODEL_Q840		78 +#define MAC_MODEL_P550		80	/* aka: LC550, P560 */ +#define MAC_MODEL_CCLII		83	/* aka: P275 */ +#define MAC_MODEL_PB165		84 +#define MAC_MODEL_PB190		85	/* aka: PB190CS */ +#define MAC_MODEL_TV		88 +#define MAC_MODEL_P475		89	/* aka: LC475, P476 */ +#define MAC_MODEL_P475F		90	/* aka: P475 w/ FPU (no LC040) */ +#define MAC_MODEL_P575		92	/* aka: LC575, P577/P578 */ +#define MAC_MODEL_Q605		94 +#define MAC_MODEL_Q605_ACC	95	/* Q605 accelerated to 33 MHz */ +#define MAC_MODEL_Q630		98	/* aka: LC630, P630/631/635/636/637/638/640 */ +#define MAC_MODEL_P588		99	/* aka: LC580, P580 */ +#define MAC_MODEL_PB280		102 +#define MAC_MODEL_PB280C	103 +#define MAC_MODEL_PB150		115 + + +    /* +     *  Latest Macintosh bootinfo version +     */ + +#define MAC_BOOTI_VERSION	MK_BI_VERSION(2, 0) + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_MAC_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo-q40.h b/arch/m68k/include/uapi/asm/bootinfo-q40.h new file mode 100644 index 00000000000..c79fea7e555 --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-q40.h @@ -0,0 +1,16 @@ +/* +** asm/bootinfo-q40.h -- Q40-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_Q40_H +#define _UAPI_ASM_M68K_BOOTINFO_Q40_H + + +    /* +     *  Latest Q40 bootinfo version +     */ + +#define Q40_BOOTI_VERSION	MK_BI_VERSION(2, 0) + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_Q40_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo-vme.h b/arch/m68k/include/uapi/asm/bootinfo-vme.h new file mode 100644 index 00000000000..a135eb41d67 --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo-vme.h @@ -0,0 +1,70 @@ +/* +** asm/bootinfo-vme.h -- VME-specific boot information definitions +*/ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_VME_H +#define _UAPI_ASM_M68K_BOOTINFO_VME_H + + +#include <linux/types.h> + + +    /* +     *  VME-specific tags +     */ + +#define BI_VME_TYPE		0x8000	/* VME sub-architecture (__be32) */ +#define BI_VME_BRDINFO		0x8001	/* VME board information (struct) */ + + +    /* +     *  VME models (BI_VME_TYPE) +     */ + +#define VME_TYPE_TP34V		0x0034	/* Tadpole TP34V */ +#define VME_TYPE_MVME147	0x0147	/* Motorola MVME147 */ +#define VME_TYPE_MVME162	0x0162	/* Motorola MVME162 */ +#define VME_TYPE_MVME166	0x0166	/* Motorola MVME166 */ +#define VME_TYPE_MVME167	0x0167	/* Motorola MVME167 */ +#define VME_TYPE_MVME172	0x0172	/* Motorola MVME172 */ +#define VME_TYPE_MVME177	0x0177	/* Motorola MVME177 */ +#define VME_TYPE_BVME4000	0x4000	/* BVM Ltd. BVME4000 */ +#define VME_TYPE_BVME6000	0x6000	/* BVM Ltd. BVME6000 */ + + +#ifndef __ASSEMBLY__ + +/* + * Board ID data structure - pointer to this retrieved from Bug by head.S + * + * BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on + * Motorola VME boards.  Contains board number, Bug version, board + * configuration options, etc. + * + * Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc) + */ + +typedef struct { +	char	bdid[4]; +	__u8	rev, mth, day, yr; +	__be16	size, reserved; +	__be16	brdno; +	char	brdsuffix[2]; +	__be32	options; +	__be16	clun, dlun, ctype, dnum; +	__be32	option2; +} t_bdid, *p_bdid; + +#endif /* __ASSEMBLY__ */ + + +    /* +     *  Latest VME bootinfo versions +     */ + +#define MVME147_BOOTI_VERSION	MK_BI_VERSION(2, 0) +#define MVME16x_BOOTI_VERSION	MK_BI_VERSION(2, 0) +#define BVME6000_BOOTI_VERSION	MK_BI_VERSION(2, 0) + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_VME_H */ diff --git a/arch/m68k/include/uapi/asm/bootinfo.h b/arch/m68k/include/uapi/asm/bootinfo.h new file mode 100644 index 00000000000..cdeb26a015b --- /dev/null +++ b/arch/m68k/include/uapi/asm/bootinfo.h @@ -0,0 +1,174 @@ +/* + * asm/bootinfo.h -- Definition of the Linux/m68k boot information structure + * + * Copyright 1992 by Greg Harp + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#ifndef _UAPI_ASM_M68K_BOOTINFO_H +#define _UAPI_ASM_M68K_BOOTINFO_H + + +#include <linux/types.h> + + +#ifndef __ASSEMBLY__ + +    /* +     *  Bootinfo definitions +     * +     *  This is an easily parsable and extendable structure containing all +     *  information to be passed from the bootstrap to the kernel. +     * +     *  This way I hope to keep all future changes back/forewards compatible. +     *  Thus, keep your fingers crossed... +     * +     *  This structure is copied right after the kernel by the bootstrap +     *  routine. +     */ + +struct bi_record { +	__be16 tag;			/* tag ID */ +	__be16 size;			/* size of record (in bytes) */ +	__be32 data[0];			/* data */ +}; + + +struct mem_info { +	__be32 addr;			/* physical address of memory chunk */ +	__be32 size;			/* length of memory chunk (in bytes) */ +}; + +#endif /* __ASSEMBLY__ */ + + +    /* +     *  Tag Definitions +     * +     *  Machine independent tags start counting from 0x0000 +     *  Machine dependent tags start counting from 0x8000 +     */ + +#define BI_LAST			0x0000	/* last record (sentinel) */ +#define BI_MACHTYPE		0x0001	/* machine type (__be32) */ +#define BI_CPUTYPE		0x0002	/* cpu type (__be32) */ +#define BI_FPUTYPE		0x0003	/* fpu type (__be32) */ +#define BI_MMUTYPE		0x0004	/* mmu type (__be32) */ +#define BI_MEMCHUNK		0x0005	/* memory chunk address and size */ +					/* (struct mem_info) */ +#define BI_RAMDISK		0x0006	/* ramdisk address and size */ +					/* (struct mem_info) */ +#define BI_COMMAND_LINE		0x0007	/* kernel command line parameters */ +					/* (string) */ + + +    /* +     *  Linux/m68k Architectures (BI_MACHTYPE) +     */ + +#define MACH_AMIGA		1 +#define MACH_ATARI		2 +#define MACH_MAC		3 +#define MACH_APOLLO		4 +#define MACH_SUN3		5 +#define MACH_MVME147		6 +#define MACH_MVME16x		7 +#define MACH_BVME6000		8 +#define MACH_HP300		9 +#define MACH_Q40		10 +#define MACH_SUN3X		11 +#define MACH_M54XX		12 + + +    /* +     *  CPU, FPU and MMU types (BI_CPUTYPE, BI_FPUTYPE, BI_MMUTYPE) +     * +     *  Note: we may rely on the following equalities: +     * +     *      CPU_68020 == MMU_68851 +     *      CPU_68030 == MMU_68030 +     *      CPU_68040 == FPU_68040 == MMU_68040 +     *      CPU_68060 == FPU_68060 == MMU_68060 +     */ + +#define CPUB_68020		0 +#define CPUB_68030		1 +#define CPUB_68040		2 +#define CPUB_68060		3 +#define CPUB_COLDFIRE		4 + +#define CPU_68020		(1 << CPUB_68020) +#define CPU_68030		(1 << CPUB_68030) +#define CPU_68040		(1 << CPUB_68040) +#define CPU_68060		(1 << CPUB_68060) +#define CPU_COLDFIRE		(1 << CPUB_COLDFIRE) + +#define FPUB_68881		0 +#define FPUB_68882		1 +#define FPUB_68040		2	/* Internal FPU */ +#define FPUB_68060		3	/* Internal FPU */ +#define FPUB_SUNFPA		4	/* Sun-3 FPA */ +#define FPUB_COLDFIRE		5	/* ColdFire FPU */ + +#define FPU_68881		(1 << FPUB_68881) +#define FPU_68882		(1 << FPUB_68882) +#define FPU_68040		(1 << FPUB_68040) +#define FPU_68060		(1 << FPUB_68060) +#define FPU_SUNFPA		(1 << FPUB_SUNFPA) +#define FPU_COLDFIRE		(1 << FPUB_COLDFIRE) + +#define MMUB_68851		0 +#define MMUB_68030		1	/* Internal MMU */ +#define MMUB_68040		2	/* Internal MMU */ +#define MMUB_68060		3	/* Internal MMU */ +#define MMUB_APOLLO		4	/* Custom Apollo */ +#define MMUB_SUN3		5	/* Custom Sun-3 */ +#define MMUB_COLDFIRE		6	/* Internal MMU */ + +#define MMU_68851		(1 << MMUB_68851) +#define MMU_68030		(1 << MMUB_68030) +#define MMU_68040		(1 << MMUB_68040) +#define MMU_68060		(1 << MMUB_68060) +#define MMU_SUN3		(1 << MMUB_SUN3) +#define MMU_APOLLO		(1 << MMUB_APOLLO) +#define MMU_COLDFIRE		(1 << MMUB_COLDFIRE) + + +    /* +     * Stuff for bootinfo interface versioning +     * +     * At the start of kernel code, a 'struct bootversion' is located. +     * bootstrap checks for a matching version of the interface before booting +     * a kernel, to avoid user confusion if kernel and bootstrap don't work +     * together :-) +     * +     * If incompatible changes are made to the bootinfo interface, the major +     * number below should be stepped (and the minor reset to 0) for the +     * appropriate machine. If a change is backward-compatible, the minor +     * should be stepped. "Backwards-compatible" means that booting will work, +     * but certain features may not. +     */ + +#define BOOTINFOV_MAGIC			0x4249561A	/* 'BIV^Z' */ +#define MK_BI_VERSION(major, minor)	(((major) << 16) + (minor)) +#define BI_VERSION_MAJOR(v)		(((v) >> 16) & 0xffff) +#define BI_VERSION_MINOR(v)		((v) & 0xffff) + +#ifndef __ASSEMBLY__ + +struct bootversion { +	__be16 branch; +	__be32 magic; +	struct { +		__be32 machtype; +		__be32 version; +	} machversions[0]; +} __packed; + +#endif /* __ASSEMBLY__ */ + + +#endif /* _UAPI_ASM_M68K_BOOTINFO_H */ diff --git a/arch/m68k/include/asm/byteorder.h b/arch/m68k/include/uapi/asm/byteorder.h index 31b260a8880..31b260a8880 100644 --- a/arch/m68k/include/asm/byteorder.h +++ b/arch/m68k/include/uapi/asm/byteorder.h diff --git a/arch/m68k/include/asm/cachectl.h b/arch/m68k/include/uapi/asm/cachectl.h index 525978e959e..525978e959e 100644 --- a/arch/m68k/include/asm/cachectl.h +++ b/arch/m68k/include/uapi/asm/cachectl.h diff --git a/arch/m68k/include/asm/fcntl.h b/arch/m68k/include/uapi/asm/fcntl.h index 1c369b20dc4..1c369b20dc4 100644 --- a/arch/m68k/include/asm/fcntl.h +++ b/arch/m68k/include/uapi/asm/fcntl.h diff --git a/arch/m68k/include/asm/ioctls.h b/arch/m68k/include/uapi/asm/ioctls.h index 1332bb4ca5b..1332bb4ca5b 100644 --- a/arch/m68k/include/asm/ioctls.h +++ b/arch/m68k/include/uapi/asm/ioctls.h diff --git a/arch/m68k/include/asm/param.h b/arch/m68k/include/uapi/asm/param.h index 36265ccf5c7..36265ccf5c7 100644 --- a/arch/m68k/include/asm/param.h +++ b/arch/m68k/include/uapi/asm/param.h diff --git a/arch/m68k/include/asm/poll.h b/arch/m68k/include/uapi/asm/poll.h index f080fcdb61b..f080fcdb61b 100644 --- a/arch/m68k/include/asm/poll.h +++ b/arch/m68k/include/uapi/asm/poll.h diff --git a/arch/m68k/include/uapi/asm/posix_types.h b/arch/m68k/include/uapi/asm/posix_types.h new file mode 100644 index 00000000000..cf4dbf70fdc --- /dev/null +++ b/arch/m68k/include/uapi/asm/posix_types.h @@ -0,0 +1,25 @@ +#ifndef __ARCH_M68K_POSIX_TYPES_H +#define __ARCH_M68K_POSIX_TYPES_H + +/* + * This file is generally used by user-level software, so you need to + * be a little careful about namespace pollution etc.  Also, we cannot + * assume GCC is being used. + */ + +typedef unsigned short	__kernel_mode_t; +#define __kernel_mode_t __kernel_mode_t + +typedef unsigned short	__kernel_ipc_pid_t; +#define __kernel_ipc_pid_t __kernel_ipc_pid_t + +typedef unsigned short	__kernel_uid_t; +typedef unsigned short	__kernel_gid_t; +#define __kernel_uid_t __kernel_uid_t + +typedef unsigned short	__kernel_old_dev_t; +#define __kernel_old_dev_t __kernel_old_dev_t + +#include <asm-generic/posix_types.h> + +#endif diff --git a/arch/m68k/include/uapi/asm/ptrace.h b/arch/m68k/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..caf92fd3493 --- /dev/null +++ b/arch/m68k/include/uapi/asm/ptrace.h @@ -0,0 +1,79 @@ +#ifndef _UAPI_M68K_PTRACE_H +#define _UAPI_M68K_PTRACE_H + +#define PT_D1	   0 +#define PT_D2	   1 +#define PT_D3	   2 +#define PT_D4	   3 +#define PT_D5	   4 +#define PT_D6	   5 +#define PT_D7	   6 +#define PT_A0	   7 +#define PT_A1	   8 +#define PT_A2	   9 +#define PT_A3	   10 +#define PT_A4	   11 +#define PT_A5	   12 +#define PT_A6	   13 +#define PT_D0	   14 +#define PT_USP	   15 +#define PT_ORIG_D0 16 +#define PT_SR	   17 +#define PT_PC	   18 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the +   stack during a system call. */ + +struct pt_regs { +  long     d1; +  long     d2; +  long     d3; +  long     d4; +  long     d5; +  long     a0; +  long     a1; +  long     a2; +  long     d0; +  long     orig_d0; +  long     stkadj; +#ifdef CONFIG_COLDFIRE +  unsigned format :  4; /* frame format specifier */ +  unsigned vector : 12; /* vector offset */ +  unsigned short sr; +  unsigned long  pc; +#else +  unsigned short sr; +  unsigned long  pc; +  unsigned format :  4; /* frame format specifier */ +  unsigned vector : 12; /* vector offset */ +#endif +}; + +/* + * This is the extended stack used by signal handlers and the context + * switcher: it's pushed after the normal "struct pt_regs". + */ +struct switch_stack { +	unsigned long  d6; +	unsigned long  d7; +	unsigned long  a3; +	unsigned long  a4; +	unsigned long  a5; +	unsigned long  a6; +	unsigned long  retpc; +}; + +/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ +#define PTRACE_GETREGS            12 +#define PTRACE_SETREGS            13 +#define PTRACE_GETFPREGS          14 +#define PTRACE_SETFPREGS          15 + +#define PTRACE_GET_THREAD_AREA    25 + +#define PTRACE_SINGLEBLOCK	33	/* resume execution until next branch */ + +#endif /* __ASSEMBLY__ */ +#endif /* _UAPI_M68K_PTRACE_H */ diff --git a/arch/m68k/include/uapi/asm/setup.h b/arch/m68k/include/uapi/asm/setup.h new file mode 100644 index 00000000000..6a6dc636761 --- /dev/null +++ b/arch/m68k/include/uapi/asm/setup.h @@ -0,0 +1,16 @@ +/* +** asm/setup.h -- Definition of the Linux/m68k setup information +** +** Copyright 1992 by Greg Harp +** +** This file is subject to the terms and conditions of the GNU General Public +** License.  See the file COPYING in the main directory of this archive +** for more details. +*/ + +#ifndef _UAPI_M68K_SETUP_H +#define _UAPI_M68K_SETUP_H + +#define COMMAND_LINE_SIZE 256 + +#endif /* _UAPI_M68K_SETUP_H */ diff --git a/arch/m68k/include/asm/sigcontext.h b/arch/m68k/include/uapi/asm/sigcontext.h index a29dd74a17c..523db2a51cf 100644 --- a/arch/m68k/include/asm/sigcontext.h +++ b/arch/m68k/include/uapi/asm/sigcontext.h @@ -15,11 +15,7 @@ struct sigcontext {  	unsigned long  sc_pc;  	unsigned short sc_formatvec;  #ifndef __uClinux__ -# ifdef __mcoldfire__ -	unsigned long  sc_fpregs[2][2];	/* room for two fp registers */ -# else  	unsigned long  sc_fpregs[2*3];  /* room for two fp registers */ -# endif  	unsigned long  sc_fpcntl[3];  	unsigned char  sc_fpstate[216];  #endif diff --git a/arch/m68k/include/uapi/asm/signal.h b/arch/m68k/include/uapi/asm/signal.h new file mode 100644 index 00000000000..cba6f858bb4 --- /dev/null +++ b/arch/m68k/include/uapi/asm/signal.h @@ -0,0 +1,112 @@ +#ifndef _UAPI_M68K_SIGNAL_H +#define _UAPI_M68K_SIGNAL_H + +#include <linux/types.h> + +/* Avoid too many header ordering problems.  */ +struct siginfo; + +#ifndef __KERNEL__ +/* Here we must cater to libcs that poke about in kernel headers.  */ + +#define NSIG		32 +typedef unsigned long sigset_t; + +#endif /* __KERNEL__ */ + +#define SIGHUP		 1 +#define SIGINT		 2 +#define SIGQUIT		 3 +#define SIGILL		 4 +#define SIGTRAP		 5 +#define SIGABRT		 6 +#define SIGIOT		 6 +#define SIGBUS		 7 +#define SIGFPE		 8 +#define SIGKILL		 9 +#define SIGUSR1		10 +#define SIGSEGV		11 +#define SIGUSR2		12 +#define SIGPIPE		13 +#define SIGALRM		14 +#define SIGTERM		15 +#define SIGSTKFLT	16 +#define SIGCHLD		17 +#define SIGCONT		18 +#define SIGSTOP		19 +#define SIGTSTP		20 +#define SIGTTIN		21 +#define SIGTTOU		22 +#define SIGURG		23 +#define SIGXCPU		24 +#define SIGXFSZ		25 +#define SIGVTALRM	26 +#define SIGPROF		27 +#define SIGWINCH	28 +#define SIGIO		29 +#define SIGPOLL		SIGIO +/* +#define SIGLOST		29 +*/ +#define SIGPWR		30 +#define SIGSYS		31 +#define	SIGUNUSED	31 + +/* These should not be considered constants from userland.  */ +#define SIGRTMIN	32 +#define SIGRTMAX	_NSIG + +/* + * SA_FLAGS values: + * + * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. + * SA_RESETHAND clears the handler when the signal is delivered. + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. + * SA_NODEFER prevents the current signal from being masked in the handler. + * + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single + * Unix names RESETHAND and NODEFER respectively. + */ +#define SA_NOCLDSTOP	0x00000001 +#define SA_NOCLDWAIT	0x00000002 +#define SA_SIGINFO	0x00000004 +#define SA_ONSTACK	0x08000000 +#define SA_RESTART	0x10000000 +#define SA_NODEFER	0x40000000 +#define SA_RESETHAND	0x80000000 + +#define SA_NOMASK	SA_NODEFER +#define SA_ONESHOT	SA_RESETHAND + +#define MINSIGSTKSZ	2048 +#define SIGSTKSZ	8192 + +#include <asm-generic/signal-defs.h> + +#ifndef __KERNEL__ +/* Here we must cater to libcs that poke about in kernel headers.  */ + +struct sigaction { +	union { +	  __sighandler_t _sa_handler; +	  void (*_sa_sigaction)(int, struct siginfo *, void *); +	} _u; +	sigset_t sa_mask; +	unsigned long sa_flags; +	void (*sa_restorer)(void); +}; + +#define sa_handler	_u._sa_handler +#define sa_sigaction	_u._sa_sigaction + +#endif /* __KERNEL__ */ + +typedef struct sigaltstack { +	void __user *ss_sp; +	int ss_flags; +	size_t ss_size; +} stack_t; + +#endif /* _UAPI_M68K_SIGNAL_H */ diff --git a/arch/m68k/include/asm/stat.h b/arch/m68k/include/uapi/asm/stat.h index dd38bc2e9f9..dd38bc2e9f9 100644 --- a/arch/m68k/include/asm/stat.h +++ b/arch/m68k/include/uapi/asm/stat.h diff --git a/arch/m68k/include/asm/swab.h b/arch/m68k/include/uapi/asm/swab.h index b7b37a40def..b7b37a40def 100644 --- a/arch/m68k/include/asm/swab.h +++ b/arch/m68k/include/uapi/asm/swab.h diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..9cd82fbc781 --- /dev/null +++ b/arch/m68k/include/uapi/asm/unistd.h @@ -0,0 +1,361 @@ +#ifndef _UAPI_ASM_M68K_UNISTD_H_ +#define _UAPI_ASM_M68K_UNISTD_H_ + +/* + * This file contains the system call numbers. + */ + +#define __NR_restart_syscall	  0 +#define __NR_exit		  1 +#define __NR_fork		  2 +#define __NR_read		  3 +#define __NR_write		  4 +#define __NR_open		  5 +#define __NR_close		  6 +#define __NR_waitpid		  7 +#define __NR_creat		  8 +#define __NR_link		  9 +#define __NR_unlink		 10 +#define __NR_execve		 11 +#define __NR_chdir		 12 +#define __NR_time		 13 +#define __NR_mknod		 14 +#define __NR_chmod		 15 +#define __NR_chown		 16 +/*#define __NR_break		 17*/ +#define __NR_oldstat		 18 +#define __NR_lseek		 19 +#define __NR_getpid		 20 +#define __NR_mount		 21 +#define __NR_umount		 22 +#define __NR_setuid		 23 +#define __NR_getuid		 24 +#define __NR_stime		 25 +#define __NR_ptrace		 26 +#define __NR_alarm		 27 +#define __NR_oldfstat		 28 +#define __NR_pause		 29 +#define __NR_utime		 30 +/*#define __NR_stty		 31*/ +/*#define __NR_gtty		 32*/ +#define __NR_access		 33 +#define __NR_nice		 34 +/*#define __NR_ftime		 35*/ +#define __NR_sync		 36 +#define __NR_kill		 37 +#define __NR_rename		 38 +#define __NR_mkdir		 39 +#define __NR_rmdir		 40 +#define __NR_dup		 41 +#define __NR_pipe		 42 +#define __NR_times		 43 +/*#define __NR_prof		 44*/ +#define __NR_brk		 45 +#define __NR_setgid		 46 +#define __NR_getgid		 47 +#define __NR_signal		 48 +#define __NR_geteuid		 49 +#define __NR_getegid		 50 +#define __NR_acct		 51 +#define __NR_umount2		 52 +/*#define __NR_lock		 53*/ +#define __NR_ioctl		 54 +#define __NR_fcntl		 55 +/*#define __NR_mpx		 56*/ +#define __NR_setpgid		 57 +/*#define __NR_ulimit		 58*/ +/*#define __NR_oldolduname	 59*/ +#define __NR_umask		 60 +#define __NR_chroot		 61 +#define __NR_ustat		 62 +#define __NR_dup2		 63 +#define __NR_getppid		 64 +#define __NR_getpgrp		 65 +#define __NR_setsid		 66 +#define __NR_sigaction		 67 +#define __NR_sgetmask		 68 +#define __NR_ssetmask		 69 +#define __NR_setreuid		 70 +#define __NR_setregid		 71 +#define __NR_sigsuspend		 72 +#define __NR_sigpending		 73 +#define __NR_sethostname	 74 +#define __NR_setrlimit		 75 +#define __NR_getrlimit		 76 +#define __NR_getrusage		 77 +#define __NR_gettimeofday	 78 +#define __NR_settimeofday	 79 +#define __NR_getgroups		 80 +#define __NR_setgroups		 81 +#define __NR_select		 82 +#define __NR_symlink		 83 +#define __NR_oldlstat		 84 +#define __NR_readlink		 85 +#define __NR_uselib		 86 +#define __NR_swapon		 87 +#define __NR_reboot		 88 +#define __NR_readdir		 89 +#define __NR_mmap		 90 +#define __NR_munmap		 91 +#define __NR_truncate		 92 +#define __NR_ftruncate		 93 +#define __NR_fchmod		 94 +#define __NR_fchown		 95 +#define __NR_getpriority	 96 +#define __NR_setpriority	 97 +/*#define __NR_profil		 98*/ +#define __NR_statfs		 99 +#define __NR_fstatfs		100 +/*#define __NR_ioperm		101*/ +#define __NR_socketcall		102 +#define __NR_syslog		103 +#define __NR_setitimer		104 +#define __NR_getitimer		105 +#define __NR_stat		106 +#define __NR_lstat		107 +#define __NR_fstat		108 +/*#define __NR_olduname		109*/ +/*#define __NR_iopl		110*/ /* not supported */ +#define __NR_vhangup		111 +/*#define __NR_idle		112*/ /* Obsolete */ +/*#define __NR_vm86		113*/ /* not supported */ +#define __NR_wait4		114 +#define __NR_swapoff		115 +#define __NR_sysinfo		116 +#define __NR_ipc		117 +#define __NR_fsync		118 +#define __NR_sigreturn		119 +#define __NR_clone		120 +#define __NR_setdomainname	121 +#define __NR_uname		122 +#define __NR_cacheflush		123 +#define __NR_adjtimex		124 +#define __NR_mprotect		125 +#define __NR_sigprocmask	126 +#define __NR_create_module	127 +#define __NR_init_module	128 +#define __NR_delete_module	129 +#define __NR_get_kernel_syms	130 +#define __NR_quotactl		131 +#define __NR_getpgid		132 +#define __NR_fchdir		133 +#define __NR_bdflush		134 +#define __NR_sysfs		135 +#define __NR_personality	136 +/*#define __NR_afs_syscall	137*/ /* Syscall for Andrew File System */ +#define __NR_setfsuid		138 +#define __NR_setfsgid		139 +#define __NR__llseek		140 +#define __NR_getdents		141 +#define __NR__newselect		142 +#define __NR_flock		143 +#define __NR_msync		144 +#define __NR_readv		145 +#define __NR_writev		146 +#define __NR_getsid		147 +#define __NR_fdatasync		148 +#define __NR__sysctl		149 +#define __NR_mlock		150 +#define __NR_munlock		151 +#define __NR_mlockall		152 +#define __NR_munlockall		153 +#define __NR_sched_setparam		154 +#define __NR_sched_getparam		155 +#define __NR_sched_setscheduler		156 +#define __NR_sched_getscheduler		157 +#define __NR_sched_yield		158 +#define __NR_sched_get_priority_max	159 +#define __NR_sched_get_priority_min	160 +#define __NR_sched_rr_get_interval	161 +#define __NR_nanosleep		162 +#define __NR_mremap		163 +#define __NR_setresuid		164 +#define __NR_getresuid		165 +#define __NR_getpagesize	166 +#define __NR_query_module	167 +#define __NR_poll		168 +#define __NR_nfsservctl		169 +#define __NR_setresgid		170 +#define __NR_getresgid		171 +#define __NR_prctl		172 +#define __NR_rt_sigreturn	173 +#define __NR_rt_sigaction	174 +#define __NR_rt_sigprocmask	175 +#define __NR_rt_sigpending	176 +#define __NR_rt_sigtimedwait	177 +#define __NR_rt_sigqueueinfo	178 +#define __NR_rt_sigsuspend	179 +#define __NR_pread64		180 +#define __NR_pwrite64		181 +#define __NR_lchown		182 +#define __NR_getcwd		183 +#define __NR_capget		184 +#define __NR_capset		185 +#define __NR_sigaltstack	186 +#define __NR_sendfile		187 +#define __NR_getpmsg		188	/* some people actually want streams */ +#define __NR_putpmsg		189	/* some people actually want streams */ +#define __NR_vfork		190 +#define __NR_ugetrlimit		191 +#define __NR_mmap2		192 +#define __NR_truncate64		193 +#define __NR_ftruncate64	194 +#define __NR_stat64		195 +#define __NR_lstat64		196 +#define __NR_fstat64		197 +#define __NR_chown32		198 +#define __NR_getuid32		199 +#define __NR_getgid32		200 +#define __NR_geteuid32		201 +#define __NR_getegid32		202 +#define __NR_setreuid32		203 +#define __NR_setregid32		204 +#define __NR_getgroups32	205 +#define __NR_setgroups32	206 +#define __NR_fchown32		207 +#define __NR_setresuid32	208 +#define __NR_getresuid32	209 +#define __NR_setresgid32	210 +#define __NR_getresgid32	211 +#define __NR_lchown32		212 +#define __NR_setuid32		213 +#define __NR_setgid32		214 +#define __NR_setfsuid32		215 +#define __NR_setfsgid32		216 +#define __NR_pivot_root		217 +/* 218*/ +/* 219*/ +#define __NR_getdents64		220 +#define __NR_gettid		221 +#define __NR_tkill		222 +#define __NR_setxattr		223 +#define __NR_lsetxattr		224 +#define __NR_fsetxattr		225 +#define __NR_getxattr		226 +#define __NR_lgetxattr		227 +#define __NR_fgetxattr		228 +#define __NR_listxattr		229 +#define __NR_llistxattr		230 +#define __NR_flistxattr		231 +#define __NR_removexattr	232 +#define __NR_lremovexattr	233 +#define __NR_fremovexattr	234 +#define __NR_futex		235 +#define __NR_sendfile64		236 +#define __NR_mincore		237 +#define __NR_madvise		238 +#define __NR_fcntl64		239 +#define __NR_readahead		240 +#define __NR_io_setup		241 +#define __NR_io_destroy		242 +#define __NR_io_getevents	243 +#define __NR_io_submit		244 +#define __NR_io_cancel		245 +#define __NR_fadvise64		246 +#define __NR_exit_group		247 +#define __NR_lookup_dcookie	248 +#define __NR_epoll_create	249 +#define __NR_epoll_ctl		250 +#define __NR_epoll_wait		251 +#define __NR_remap_file_pages	252 +#define __NR_set_tid_address	253 +#define __NR_timer_create	254 +#define __NR_timer_settime	255 +#define __NR_timer_gettime	256 +#define __NR_timer_getoverrun	257 +#define __NR_timer_delete	258 +#define __NR_clock_settime	259 +#define __NR_clock_gettime	260 +#define __NR_clock_getres	261 +#define __NR_clock_nanosleep	262 +#define __NR_statfs64		263 +#define __NR_fstatfs64		264 +#define __NR_tgkill		265 +#define __NR_utimes		266 +#define __NR_fadvise64_64	267 +#define __NR_mbind		268 +#define __NR_get_mempolicy	269 +#define __NR_set_mempolicy	270 +#define __NR_mq_open		271 +#define __NR_mq_unlink		272 +#define __NR_mq_timedsend	273 +#define __NR_mq_timedreceive	274 +#define __NR_mq_notify		275 +#define __NR_mq_getsetattr	276 +#define __NR_waitid		277 +/*#define __NR_vserver		278*/ +#define __NR_add_key		279 +#define __NR_request_key	280 +#define __NR_keyctl		281 +#define __NR_ioprio_set		282 +#define __NR_ioprio_get		283 +#define __NR_inotify_init	284 +#define __NR_inotify_add_watch	285 +#define __NR_inotify_rm_watch	286 +#define __NR_migrate_pages	287 +#define __NR_openat		288 +#define __NR_mkdirat		289 +#define __NR_mknodat		290 +#define __NR_fchownat		291 +#define __NR_futimesat		292 +#define __NR_fstatat64		293 +#define __NR_unlinkat		294 +#define __NR_renameat		295 +#define __NR_linkat		296 +#define __NR_symlinkat		297 +#define __NR_readlinkat		298 +#define __NR_fchmodat		299 +#define __NR_faccessat		300 +#define __NR_pselect6		301 +#define __NR_ppoll		302 +#define __NR_unshare		303 +#define __NR_set_robust_list	304 +#define __NR_get_robust_list	305 +#define __NR_splice		306 +#define __NR_sync_file_range	307 +#define __NR_tee		308 +#define __NR_vmsplice		309 +#define __NR_move_pages		310 +#define __NR_sched_setaffinity	311 +#define __NR_sched_getaffinity	312 +#define __NR_kexec_load		313 +#define __NR_getcpu		314 +#define __NR_epoll_pwait	315 +#define __NR_utimensat		316 +#define __NR_signalfd		317 +#define __NR_timerfd_create	318 +#define __NR_eventfd		319 +#define __NR_fallocate		320 +#define __NR_timerfd_settime	321 +#define __NR_timerfd_gettime	322 +#define __NR_signalfd4		323 +#define __NR_eventfd2		324 +#define __NR_epoll_create1	325 +#define __NR_dup3		326 +#define __NR_pipe2		327 +#define __NR_inotify_init1	328 +#define __NR_preadv		329 +#define __NR_pwritev		330 +#define __NR_rt_tgsigqueueinfo	331 +#define __NR_perf_event_open	332 +#define __NR_get_thread_area	333 +#define __NR_set_thread_area	334 +#define __NR_atomic_cmpxchg_32	335 +#define __NR_atomic_barrier	336 +#define __NR_fanotify_init	337 +#define __NR_fanotify_mark	338 +#define __NR_prlimit64		339 +#define __NR_name_to_handle_at	340 +#define __NR_open_by_handle_at	341 +#define __NR_clock_adjtime	342 +#define __NR_syncfs		343 +#define __NR_setns		344 +#define __NR_process_vm_readv	345 +#define __NR_process_vm_writev	346 +#define __NR_kcmp		347 +#define __NR_finit_module	348 +#define __NR_sched_setattr	349 +#define __NR_sched_getattr	350 +#define __NR_renameat2		351 + +#endif /* _UAPI_ASM_M68K_UNISTD_H_ */ diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 55d5d6b680a..e47778f8588 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile @@ -2,16 +2,28 @@  # Makefile for the linux kernel.  # -ifndef CONFIG_SUN3 -  extra-y := head.o -else -  extra-y := sun3-head.o -endif -extra-y	+= vmlinux.lds +extra-$(CONFIG_AMIGA)	:= head.o +extra-$(CONFIG_ATARI)	:= head.o +extra-$(CONFIG_MAC)	:= head.o +extra-$(CONFIG_APOLLO)	:= head.o +extra-$(CONFIG_VME)	:= head.o +extra-$(CONFIG_HP300)	:= head.o +extra-$(CONFIG_Q40)	:= head.o +extra-$(CONFIG_SUN3X)	:= head.o +extra-$(CONFIG_SUN3)	:= sun3-head.o +extra-y			+= vmlinux.lds -obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \ -	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o +obj-y	:= entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o +obj-y	+= setup.o signal.o sys_m68k.o syscalltable.o time.o traps.o -devres-y = ../../../kernel/irq/devres.o +obj-$(CONFIG_MMU_MOTOROLA) += ints.o vectors.o +obj-$(CONFIG_MMU_SUN3) += ints.o vectors.o +obj-$(CONFIG_PCI) += pcibios.o + +obj-$(CONFIG_HAS_DMA)	+= dma.o + +obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o +obj-$(CONFIG_BOOTINFO_PROC)	+= bootinfo_proc.o + +obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o -obj-y$(CONFIG_MMU_SUN3) += dma.o	# no, it's not a typo diff --git a/arch/m68k/kernel/asm-offsets.c b/arch/m68k/kernel/asm-offsets.c index 78e59b82ebc..3a386341aa6 100644 --- a/arch/m68k/kernel/asm-offsets.c +++ b/arch/m68k/kernel/asm-offsets.c @@ -23,11 +23,8 @@ int main(void)  {  	/* offsets into the task struct */  	DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); -	DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));  	DEFINE(TASK_MM, offsetof(struct task_struct, mm)); -#ifdef CONFIG_MMU -	DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info)); -#endif +	DEFINE(TASK_STACK, offsetof(struct task_struct, stack));  	/* offsets into the thread struct */  	DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp)); @@ -57,18 +54,30 @@ int main(void)  	DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));  	DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));  	DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr)); +  	/* bitfields are a bit difficult */ +#ifdef CONFIG_COLDFIRE +	DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, sr) - 2); +#else  	DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4); +#endif  	/* offsets into the irq_cpustat_t struct */  	DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending)); +	/* signal defines */ +	DEFINE(LSIGSEGV, SIGSEGV); +	DEFINE(LSEGV_MAPERR, SEGV_MAPERR); +	DEFINE(LSIGTRAP, SIGTRAP); +	DEFINE(LTRAP_TRACE, TRAP_TRACE); + +#ifdef CONFIG_MMU  	/* offsets into the bi_record struct */  	DEFINE(BIR_TAG, offsetof(struct bi_record, tag));  	DEFINE(BIR_SIZE, offsetof(struct bi_record, size));  	DEFINE(BIR_DATA, offsetof(struct bi_record, data)); -	/* offsets into font_desc (drivers/video/console/font.h) */ +	/* offsets into the font_desc struct */  	DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));  	DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));  	DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width)); @@ -76,12 +85,6 @@ int main(void)  	DEFINE(FONT_DESC_DATA, offsetof(struct font_desc, data));  	DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref)); -	/* signal defines */ -	DEFINE(LSIGSEGV, SIGSEGV); -	DEFINE(LSEGV_MAPERR, SEGV_MAPERR); -	DEFINE(LSIGTRAP, SIGTRAP); -	DEFINE(LTRAP_TRACE, TRAP_TRACE); -  	/* offsets into the custom struct */  	DEFINE(CUSTOMBASE, &amiga_custom);  	DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar)); @@ -96,5 +99,9 @@ int main(void)  	DEFINE(C_PRA, offsetof(struct CIA, pra));  	DEFINE(ZTWOBASE, zTwoBase); +	/* enum m68k_fixup_type */ +	DEFINE(M68K_FIXUP_MEMOFFSET, m68k_fixup_memoffset); +#endif +  	return 0;  } diff --git a/arch/m68k/kernel/bootinfo_proc.c b/arch/m68k/kernel/bootinfo_proc.c new file mode 100644 index 00000000000..7ee853e1432 --- /dev/null +++ b/arch/m68k/kernel/bootinfo_proc.c @@ -0,0 +1,80 @@ +/* + * Based on arch/arm/kernel/atags_proc.c + */ + +#include <linux/fs.h> +#include <linux/init.h> +#include <linux/printk.h> +#include <linux/proc_fs.h> +#include <linux/slab.h> +#include <linux/string.h> + +#include <asm/bootinfo.h> +#include <asm/byteorder.h> + + +static char bootinfo_tmp[1536] __initdata; + +static void *bootinfo_copy; +static size_t bootinfo_size; + +static ssize_t bootinfo_read(struct file *file, char __user *buf, +			  size_t count, loff_t *ppos) +{ +	return simple_read_from_buffer(buf, count, ppos, bootinfo_copy, +				       bootinfo_size); +} + +static const struct file_operations bootinfo_fops = { +	.read = bootinfo_read, +	.llseek = default_llseek, +}; + +void __init save_bootinfo(const struct bi_record *bi) +{ +	const void *start = bi; +	size_t size = sizeof(bi->tag); + +	while (be16_to_cpu(bi->tag) != BI_LAST) { +		uint16_t n = be16_to_cpu(bi->size); +		size += n; +		bi = (struct bi_record *)((unsigned long)bi + n); +	} + +	if (size > sizeof(bootinfo_tmp)) { +		pr_err("Cannot save %zu bytes of bootinfo\n", size); +		return; +	} + +	pr_info("Saving %zu bytes of bootinfo\n", size); +	memcpy(bootinfo_tmp, start, size); +	bootinfo_size = size; +} + +static int __init init_bootinfo_procfs(void) +{ +	/* +	 * This cannot go into save_bootinfo() because kmalloc and proc don't +	 * work yet when it is called. +	 */ +	struct proc_dir_entry *pde; + +	if (!bootinfo_size) +		return -EINVAL; + +	bootinfo_copy = kmalloc(bootinfo_size, GFP_KERNEL); +	if (!bootinfo_copy) +		return -ENOMEM; + +	memcpy(bootinfo_copy, bootinfo_tmp, bootinfo_size); + +	pde = proc_create_data("bootinfo", 0400, NULL, &bootinfo_fops, NULL); +	if (!pde) { +		kfree(bootinfo_copy); +		return -ENOMEM; +	} + +	return 0; +} + +arch_initcall(init_bootinfo_procfs); diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c index 4bbb3c2a888..e546a5534dd 100644 --- a/arch/m68k/kernel/dma.c +++ b/arch/m68k/kernel/dma.c @@ -12,9 +12,12 @@  #include <linux/scatterlist.h>  #include <linux/slab.h>  #include <linux/vmalloc.h> +#include <linux/export.h>  #include <asm/pgalloc.h> +#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE) +  void *dma_alloc_coherent(struct device *dev, size_t size,  			 dma_addr_t *handle, gfp_t flag)  { @@ -57,7 +60,6 @@ void *dma_alloc_coherent(struct device *dev, size_t size,  	return addr;  } -EXPORT_SYMBOL(dma_alloc_coherent);  void dma_free_coherent(struct device *dev, size_t size,  		       void *addr, dma_addr_t handle) @@ -65,12 +67,45 @@ void dma_free_coherent(struct device *dev, size_t size,  	pr_debug("dma_free_coherent: %p, %x\n", addr, handle);  	vfree(addr);  } + +#else + +#include <asm/cacheflush.h> + +void *dma_alloc_coherent(struct device *dev, size_t size, +			   dma_addr_t *dma_handle, gfp_t gfp) +{ +	void *ret; +	/* ignore region specifiers */ +	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); + +	if (dev == NULL || (*dev->dma_mask < 0xffffffff)) +		gfp |= GFP_DMA; +	ret = (void *)__get_free_pages(gfp, get_order(size)); + +	if (ret != NULL) { +		memset(ret, 0, size); +		*dma_handle = virt_to_phys(ret); +	} +	return ret; +} + +void dma_free_coherent(struct device *dev, size_t size, +			 void *vaddr, dma_addr_t dma_handle) +{ +	free_pages((unsigned long)vaddr, get_order(size)); +} + +#endif /* CONFIG_MMU && !CONFIG_COLDFIRE */ + +EXPORT_SYMBOL(dma_alloc_coherent);  EXPORT_SYMBOL(dma_free_coherent);  void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,  				size_t size, enum dma_data_direction dir)  {  	switch (dir) { +	case DMA_BIDIRECTIONAL:  	case DMA_TO_DEVICE:  		cache_push(handle, size);  		break; diff --git a/arch/m68k/kernel/early_printk.c b/arch/m68k/kernel/early_printk.c new file mode 100644 index 00000000000..ff9708d7192 --- /dev/null +++ b/arch/m68k/kernel/early_printk.c @@ -0,0 +1,67 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (c) 2014 Finn Thain + */ + +#include <linux/kernel.h> +#include <linux/console.h> +#include <linux/init.h> +#include <linux/string.h> +#include <asm/setup.h> + +extern void mvme16x_cons_write(struct console *co, +			       const char *str, unsigned count); + +asmlinkage void __init debug_cons_nputs(const char *s, unsigned n); + +static void __ref debug_cons_write(struct console *c, +				   const char *s, unsigned n) +{ +#if !(defined(CONFIG_SUN3)   || defined(CONFIG_M68360) || \ +      defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)) +	if (MACH_IS_MVME16x) +		mvme16x_cons_write(c, s, n); +	else +		debug_cons_nputs(s, n); +#endif +} + +static struct console early_console_instance = { +	.name  = "debug", +	.write = debug_cons_write, +	.flags = CON_PRINTBUFFER | CON_BOOT, +	.index = -1 +}; + +static int __init setup_early_printk(char *buf) +{ +	if (early_console || buf) +		return 0; + +	early_console = &early_console_instance; +	register_console(early_console); + +	return 0; +} +early_param("earlyprintk", setup_early_printk); + +/* + * debug_cons_nputs() defined in arch/m68k/kernel/head.S cannot be called + * after init sections are discarded (for platforms that use it). + */ +#if !(defined(CONFIG_SUN3)   || defined(CONFIG_M68360) || \ +      defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)) + +static int __init unregister_early_console(void) +{ +	if (!early_console || MACH_IS_MVME16x) +		return 0; + +	return unregister_console(early_console); +} +late_initcall(unregister_early_console); + +#endif diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 6360c437dcf..b54ac7aba85 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S @@ -34,38 +34,68 @@   */  #include <linux/linkage.h> -#include <asm/entry.h>  #include <asm/errno.h>  #include <asm/setup.h>  #include <asm/segment.h>  #include <asm/traps.h>  #include <asm/unistd.h> -  #include <asm/asm-offsets.h> +#include <asm/entry.h>  .globl system_call, buserr, trap, resume  .globl sys_call_table -.globl sys_fork, sys_clone, sys_vfork -.globl ret_from_interrupt, bad_interrupt +.globl __sys_fork, __sys_clone, __sys_vfork +.globl bad_interrupt  .globl auto_irqhandler_fixup -.globl user_irqvec_fixup, user_irqhandler_fixup +.globl user_irqvec_fixup  .text +ENTRY(__sys_fork) +	SAVE_SWITCH_STACK +	jbsr	sys_fork +	lea     %sp@(24),%sp +	rts + +ENTRY(__sys_clone) +	SAVE_SWITCH_STACK +	pea	%sp@(SWITCH_STACK_SIZE) +	jbsr	m68k_clone +	lea     %sp@(28),%sp +	rts + +ENTRY(__sys_vfork) +	SAVE_SWITCH_STACK +	jbsr	sys_vfork +	lea     %sp@(24),%sp +	rts + +ENTRY(sys_sigreturn) +	SAVE_SWITCH_STACK +	jbsr	do_sigreturn +	RESTORE_SWITCH_STACK +	rts + +ENTRY(sys_rt_sigreturn) +	SAVE_SWITCH_STACK +	jbsr	do_rt_sigreturn +	RESTORE_SWITCH_STACK +	rts +  ENTRY(buserr)  	SAVE_ALL_INT  	GET_CURRENT(%d0)  	movel	%sp,%sp@-		| stack frame pointer argument -	bsrl	buserr_c +	jbsr	buserr_c  	addql	#4,%sp -	jra	.Lret_from_exception +	jra	ret_from_exception  ENTRY(trap)  	SAVE_ALL_INT  	GET_CURRENT(%d0)  	movel	%sp,%sp@-		| stack frame pointer argument -	bsrl	trap_c +	jbsr	trap_c  	addql	#4,%sp -	jra	.Lret_from_exception +	jra	ret_from_exception  	| After a fork we jump here directly from resume,  	| so that %d1 contains the previous task @@ -74,7 +104,48 @@ ENTRY(ret_from_fork)  	movel	%d1,%sp@-  	jsr	schedule_tail  	addql	#4,%sp -	jra	.Lret_from_exception +	jra	ret_from_exception + +ENTRY(ret_from_kernel_thread) +	| a3 contains the kernel thread payload, d7 - its argument +	movel	%d1,%sp@- +	jsr	schedule_tail +	movel	%d7,(%sp) +	jsr	%a3@ +	addql	#4,%sp +	jra	ret_from_exception + +#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU) + +#ifdef TRAP_DBG_INTERRUPT + +.globl dbginterrupt +ENTRY(dbginterrupt) +	SAVE_ALL_INT +	GET_CURRENT(%d0) +	movel	%sp,%sp@- 		/* stack frame pointer argument */ +	jsr	dbginterrupt_c +	addql	#4,%sp +	jra	ret_from_exception +#endif + +ENTRY(reschedule) +	/* save top of frame */ +	pea	%sp@ +	jbsr	set_esp0 +	addql	#4,%sp +	pea	ret_from_exception +	jmp	schedule + +ENTRY(ret_from_user_signal) +	moveq #__NR_sigreturn,%d0 +	trap #0 + +ENTRY(ret_from_user_rt_signal) +	movel #__NR_rt_sigreturn,%d0 +	trap #0 + +#else  do_trace_entry:  	movel	#-ENOSYS,%sp@(PT_OFF_D0)| needed for strace @@ -99,7 +170,11 @@ do_trace_exit:  	jra	.Lret_from_exception  ENTRY(ret_from_signal) -	RESTORE_SWITCH_STACK +	movel	%curptr@(TASK_STACK),%a1 +	tstb	%a1@(TINFO_FLAGS+2) +	jge	1f +	jbsr	syscall_trace +1:	RESTORE_SWITCH_STACK  	addql	#4,%sp  /* on 68040 complete pending writebacks if any */  #ifdef CONFIG_M68040 @@ -117,11 +192,13 @@ ENTRY(system_call)  	SAVE_ALL_SYS  	GET_CURRENT(%d1) +	movel	%d1,%a1 +  	| save top of frame  	movel	%sp,%curptr@(TASK_THREAD+THREAD_ESP0)  	| syscall trace? -	tstb	%curptr@(TASK_INFO+TINFO_FLAGS+2) +	tstb	%a1@(TINFO_FLAGS+2)  	jmi	do_trace_entry  	cmpl	#NR_syscalls,%d0  	jcc	badsys @@ -130,7 +207,8 @@ syscall:  	movel	%d0,%sp@(PT_OFF_D0)	| save the return value  ret_from_syscall:  	|oriw	#0x0700,%sr -	movew	%curptr@(TASK_INFO+TINFO_FLAGS+2),%d0 +	movel	%curptr@(TASK_STACK),%a1 +	movew	%a1@(TINFO_FLAGS+2),%d0  	jne	syscall_exit_work  1:	RESTORE_ALL @@ -141,7 +219,7 @@ syscall_exit_work:  	jcs	do_trace_exit  	jmi	do_delayed_trace  	lslw	#8,%d0 -	jmi	do_signal_return +	jne	do_signal_return  	pea	resume_userspace  	jra	schedule @@ -156,7 +234,8 @@ ENTRY(ret_from_exception)  	andw	#ALLOWINT,%sr  resume_userspace: -	moveb	%curptr@(TASK_INFO+TINFO_FLAGS+3),%d0 +	movel	%curptr@(TASK_STACK),%a1 +	moveb	%a1@(TINFO_FLAGS+3),%d0  	jne	exit_work  1:	RESTORE_ALL @@ -164,7 +243,7 @@ exit_work:  	| save top of frame  	movel	%sp,%curptr@(TASK_THREAD+THREAD_ESP0)  	lslb	#1,%d0 -	jmi	do_signal_return +	jne	do_signal_return  	pea	resume_userspace  	jra	schedule @@ -174,16 +253,11 @@ do_signal_return:  	subql	#4,%sp			| dummy return address  	SAVE_SWITCH_STACK  	pea	%sp@(SWITCH_STACK_SIZE) -	clrl	%sp@- -	bsrl	do_signal -	addql	#8,%sp +	bsrl	do_notify_resume +	addql	#4,%sp  	RESTORE_SWITCH_STACK  	addql	#4,%sp -	tstl	%d0 -	jeq	resume_userspace -	| when single stepping into handler stop at the first insn -	btst	#6,%curptr@(TASK_INFO+TINFO_FLAGS+2) -	jeq	resume_userspace +	jbra	resume_userspace  do_delayed_trace:  	bclr	#7,%sp@(PT_OFF_SR)	| clear trace bit in SR @@ -201,7 +275,6 @@ do_delayed_trace:  ENTRY(auto_inthandler)  	SAVE_ALL_INT  	GET_CURRENT(%d0) -	addqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)  					|  put exception # in d0  	bfextu	%sp@(PT_OFF_FORMATVEC){#4,#10},%d0  	subw	#VEC_SPUR,%d0 @@ -209,32 +282,15 @@ ENTRY(auto_inthandler)  	movel	%sp,%sp@-  	movel	%d0,%sp@-		|  put vector # on stack  auto_irqhandler_fixup = . + 2 -	jsr	__m68k_handle_int	|  process the IRQ +	jsr	do_IRQ			|  process the IRQ  	addql	#8,%sp			|  pop parameters off stack - -ret_from_interrupt: -	subqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) -	jeq	ret_from_last_interrupt -2:	RESTORE_ALL - -	ALIGN -ret_from_last_interrupt: -	moveq	#(~ALLOWINT>>8)&0xff,%d0 -	andb	%sp@(PT_OFF_SR),%d0 -	jne	2b - -	/* check if we need to do software interrupts */ -	tstl	irq_stat+CPUSTAT_SOFTIRQ_PENDING -	jeq	.Lret_from_exception -	pea	ret_from_exception -	jra	do_softirq +	jra	ret_from_exception  /* Handler for user defined interrupt vectors */  ENTRY(user_inthandler)  	SAVE_ALL_INT  	GET_CURRENT(%d0) -	addqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)  					|  put exception # in d0  	bfextu	%sp@(PT_OFF_FORMATVEC){#4,#10},%d0  user_irqvec_fixup = . + 2 @@ -242,81 +298,20 @@ user_irqvec_fixup = . + 2  	movel	%sp,%sp@-  	movel	%d0,%sp@-		|  put vector # on stack -user_irqhandler_fixup = . + 2 -	jsr	__m68k_handle_int	|  process the IRQ +	jsr	do_IRQ			|  process the IRQ  	addql	#8,%sp			|  pop parameters off stack - -	subqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) -	jeq	ret_from_last_interrupt -	RESTORE_ALL +	jra	ret_from_exception  /* Handler for uninitialized and spurious interrupts */  ENTRY(bad_inthandler)  	SAVE_ALL_INT  	GET_CURRENT(%d0) -	addqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)  	movel	%sp,%sp@-  	jsr	handle_badint  	addql	#4,%sp - -	subqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) -	jeq	ret_from_last_interrupt -	RESTORE_ALL - - -ENTRY(sys_fork) -	SAVE_SWITCH_STACK -	pea	%sp@(SWITCH_STACK_SIZE) -	jbsr	m68k_fork -	addql	#4,%sp -	RESTORE_SWITCH_STACK -	rts - -ENTRY(sys_clone) -	SAVE_SWITCH_STACK -	pea	%sp@(SWITCH_STACK_SIZE) -	jbsr	m68k_clone -	addql	#4,%sp -	RESTORE_SWITCH_STACK -	rts - -ENTRY(sys_vfork) -	SAVE_SWITCH_STACK -	pea	%sp@(SWITCH_STACK_SIZE) -	jbsr	m68k_vfork -	addql	#4,%sp -	RESTORE_SWITCH_STACK -	rts - -ENTRY(sys_sigsuspend) -	SAVE_SWITCH_STACK -	pea	%sp@(SWITCH_STACK_SIZE) -	jbsr	do_sigsuspend -	addql	#4,%sp -	RESTORE_SWITCH_STACK -	rts - -ENTRY(sys_rt_sigsuspend) -	SAVE_SWITCH_STACK -	pea	%sp@(SWITCH_STACK_SIZE) -	jbsr	do_rt_sigsuspend -	addql	#4,%sp -	RESTORE_SWITCH_STACK -	rts - -ENTRY(sys_sigreturn) -	SAVE_SWITCH_STACK -	jbsr	do_sigreturn -	RESTORE_SWITCH_STACK -	rts - -ENTRY(sys_rt_sigreturn) -	SAVE_SWITCH_STACK -	jbsr	do_rt_sigreturn -	RESTORE_SWITCH_STACK -	rts +	jra	ret_from_exception  resume:  	/* @@ -425,347 +420,4 @@ resume:  	rts -.data -ALIGN -sys_call_table: -	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */ -	.long sys_exit -	.long sys_fork -	.long sys_read -	.long sys_write -	.long sys_open		/* 5 */ -	.long sys_close -	.long sys_waitpid -	.long sys_creat -	.long sys_link -	.long sys_unlink	/* 10 */ -	.long sys_execve -	.long sys_chdir -	.long sys_time -	.long sys_mknod -	.long sys_chmod		/* 15 */ -	.long sys_chown16 -	.long sys_ni_syscall				/* old break syscall holder */ -	.long sys_stat -	.long sys_lseek -	.long sys_getpid	/* 20 */ -	.long sys_mount -	.long sys_oldumount -	.long sys_setuid16 -	.long sys_getuid16 -	.long sys_stime		/* 25 */ -	.long sys_ptrace -	.long sys_alarm -	.long sys_fstat -	.long sys_pause -	.long sys_utime		/* 30 */ -	.long sys_ni_syscall				/* old stty syscall holder */ -	.long sys_ni_syscall				/* old gtty syscall holder */ -	.long sys_access -	.long sys_nice -	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */ -	.long sys_sync -	.long sys_kill -	.long sys_rename -	.long sys_mkdir -	.long sys_rmdir		/* 40 */ -	.long sys_dup -	.long sys_pipe -	.long sys_times -	.long sys_ni_syscall				/* old prof syscall holder */ -	.long sys_brk		/* 45 */ -	.long sys_setgid16 -	.long sys_getgid16 -	.long sys_signal -	.long sys_geteuid16 -	.long sys_getegid16	/* 50 */ -	.long sys_acct -	.long sys_umount				/* recycled never used phys() */ -	.long sys_ni_syscall				/* old lock syscall holder */ -	.long sys_ioctl -	.long sys_fcntl		/* 55 */ -	.long sys_ni_syscall				/* old mpx syscall holder */ -	.long sys_setpgid -	.long sys_ni_syscall				/* old ulimit syscall holder */ -	.long sys_ni_syscall -	.long sys_umask		/* 60 */ -	.long sys_chroot -	.long sys_ustat -	.long sys_dup2 -	.long sys_getppid -	.long sys_getpgrp	/* 65 */ -	.long sys_setsid -	.long sys_sigaction -	.long sys_sgetmask -	.long sys_ssetmask -	.long sys_setreuid16	/* 70 */ -	.long sys_setregid16 -	.long sys_sigsuspend -	.long sys_sigpending -	.long sys_sethostname -	.long sys_setrlimit	/* 75 */ -	.long sys_old_getrlimit -	.long sys_getrusage -	.long sys_gettimeofday -	.long sys_settimeofday -	.long sys_getgroups16	/* 80 */ -	.long sys_setgroups16 -	.long sys_old_select -	.long sys_symlink -	.long sys_lstat -	.long sys_readlink	/* 85 */ -	.long sys_uselib -	.long sys_swapon -	.long sys_reboot -	.long sys_old_readdir -	.long sys_old_mmap	/* 90 */ -	.long sys_munmap -	.long sys_truncate -	.long sys_ftruncate -	.long sys_fchmod -	.long sys_fchown16	/* 95 */ -	.long sys_getpriority -	.long sys_setpriority -	.long sys_ni_syscall				/* old profil syscall holder */ -	.long sys_statfs -	.long sys_fstatfs	/* 100 */ -	.long sys_ni_syscall				/* ioperm for i386 */ -	.long sys_socketcall -	.long sys_syslog -	.long sys_setitimer -	.long sys_getitimer	/* 105 */ -	.long sys_newstat -	.long sys_newlstat -	.long sys_newfstat -	.long sys_ni_syscall -	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */ -	.long sys_vhangup -	.long sys_ni_syscall				/* obsolete idle() syscall */ -	.long sys_ni_syscall				/* vm86old for i386 */ -	.long sys_wait4 -	.long sys_swapoff	/* 115 */ -	.long sys_sysinfo -	.long sys_ipc -	.long sys_fsync -	.long sys_sigreturn -	.long sys_clone		/* 120 */ -	.long sys_setdomainname -	.long sys_newuname -	.long sys_cacheflush				/* modify_ldt for i386 */ -	.long sys_adjtimex -	.long sys_mprotect	/* 125 */ -	.long sys_sigprocmask -	.long sys_ni_syscall		/* old "create_module" */ -	.long sys_init_module -	.long sys_delete_module -	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */ -	.long sys_quotactl -	.long sys_getpgid -	.long sys_fchdir -	.long sys_bdflush -	.long sys_sysfs		/* 135 */ -	.long sys_personality -	.long sys_ni_syscall				/* for afs_syscall */ -	.long sys_setfsuid16 -	.long sys_setfsgid16 -	.long sys_llseek	/* 140 */ -	.long sys_getdents -	.long sys_select -	.long sys_flock -	.long sys_msync -	.long sys_readv		/* 145 */ -	.long sys_writev -	.long sys_getsid -	.long sys_fdatasync -	.long sys_sysctl -	.long sys_mlock		/* 150 */ -	.long sys_munlock -	.long sys_mlockall -	.long sys_munlockall -	.long sys_sched_setparam -	.long sys_sched_getparam	/* 155 */ -	.long sys_sched_setscheduler -	.long sys_sched_getscheduler -	.long sys_sched_yield -	.long sys_sched_get_priority_max -	.long sys_sched_get_priority_min  /* 160 */ -	.long sys_sched_rr_get_interval -	.long sys_nanosleep -	.long sys_mremap -	.long sys_setresuid16 -	.long sys_getresuid16	/* 165 */ -	.long sys_getpagesize -	.long sys_ni_syscall		/* old sys_query_module */ -	.long sys_poll -	.long sys_nfsservctl -	.long sys_setresgid16	/* 170 */ -	.long sys_getresgid16 -	.long sys_prctl -	.long sys_rt_sigreturn -	.long sys_rt_sigaction -	.long sys_rt_sigprocmask	/* 175 */ -	.long sys_rt_sigpending -	.long sys_rt_sigtimedwait -	.long sys_rt_sigqueueinfo -	.long sys_rt_sigsuspend -	.long sys_pread64	/* 180 */ -	.long sys_pwrite64 -	.long sys_lchown16; -	.long sys_getcwd -	.long sys_capget -	.long sys_capset	/* 185 */ -	.long sys_sigaltstack -	.long sys_sendfile -	.long sys_ni_syscall				/* streams1 */ -	.long sys_ni_syscall				/* streams2 */ -	.long sys_vfork		/* 190 */ -	.long sys_getrlimit -	.long sys_mmap2 -	.long sys_truncate64 -	.long sys_ftruncate64 -	.long sys_stat64	/* 195 */ -	.long sys_lstat64 -	.long sys_fstat64 -	.long sys_chown -	.long sys_getuid -	.long sys_getgid	/* 200 */ -	.long sys_geteuid -	.long sys_getegid -	.long sys_setreuid -	.long sys_setregid -	.long sys_getgroups	/* 205 */ -	.long sys_setgroups -	.long sys_fchown -	.long sys_setresuid -	.long sys_getresuid -	.long sys_setresgid	/* 210 */ -	.long sys_getresgid -	.long sys_lchown -	.long sys_setuid -	.long sys_setgid -	.long sys_setfsuid	/* 215 */ -	.long sys_setfsgid -	.long sys_pivot_root -	.long sys_ni_syscall -	.long sys_ni_syscall -	.long sys_getdents64	/* 220 */ -	.long sys_gettid -	.long sys_tkill -	.long sys_setxattr -	.long sys_lsetxattr -	.long sys_fsetxattr	/* 225 */ -	.long sys_getxattr -	.long sys_lgetxattr -	.long sys_fgetxattr -	.long sys_listxattr -	.long sys_llistxattr	/* 230 */ -	.long sys_flistxattr -	.long sys_removexattr -	.long sys_lremovexattr -	.long sys_fremovexattr -	.long sys_futex		/* 235 */ -	.long sys_sendfile64 -	.long sys_mincore -	.long sys_madvise -	.long sys_fcntl64 -	.long sys_readahead	/* 240 */ -	.long sys_io_setup -	.long sys_io_destroy -	.long sys_io_getevents -	.long sys_io_submit -	.long sys_io_cancel	/* 245 */ -	.long sys_fadvise64 -	.long sys_exit_group -	.long sys_lookup_dcookie -	.long sys_epoll_create -	.long sys_epoll_ctl	/* 250 */ -	.long sys_epoll_wait -	.long sys_remap_file_pages -	.long sys_set_tid_address -	.long sys_timer_create -	.long sys_timer_settime	/* 255 */ -	.long sys_timer_gettime -	.long sys_timer_getoverrun -	.long sys_timer_delete -	.long sys_clock_settime -	.long sys_clock_gettime	/* 260 */ -	.long sys_clock_getres -	.long sys_clock_nanosleep -	.long sys_statfs64 -	.long sys_fstatfs64 -	.long sys_tgkill	/* 265 */ -	.long sys_utimes -	.long sys_fadvise64_64 -	.long sys_mbind -	.long sys_get_mempolicy -	.long sys_set_mempolicy	/* 270 */ -	.long sys_mq_open -	.long sys_mq_unlink -	.long sys_mq_timedsend -	.long sys_mq_timedreceive -	.long sys_mq_notify	/* 275 */ -	.long sys_mq_getsetattr -	.long sys_waitid -	.long sys_ni_syscall	/* for sys_vserver */ -	.long sys_add_key -	.long sys_request_key	/* 280 */ -	.long sys_keyctl -	.long sys_ioprio_set -	.long sys_ioprio_get -	.long sys_inotify_init -	.long sys_inotify_add_watch	/* 285 */ -	.long sys_inotify_rm_watch -	.long sys_migrate_pages -	.long sys_openat -	.long sys_mkdirat -	.long sys_mknodat		/* 290 */ -	.long sys_fchownat -	.long sys_futimesat -	.long sys_fstatat64 -	.long sys_unlinkat -	.long sys_renameat		/* 295 */ -	.long sys_linkat -	.long sys_symlinkat -	.long sys_readlinkat -	.long sys_fchmodat -	.long sys_faccessat		/* 300 */ -	.long sys_ni_syscall		/* Reserved for pselect6 */ -	.long sys_ni_syscall		/* Reserved for ppoll */ -	.long sys_unshare -	.long sys_set_robust_list -	.long sys_get_robust_list	/* 305 */ -	.long sys_splice -	.long sys_sync_file_range -	.long sys_tee -	.long sys_vmsplice -	.long sys_move_pages		/* 310 */ -	.long sys_sched_setaffinity -	.long sys_sched_getaffinity -	.long sys_kexec_load -	.long sys_getcpu -	.long sys_epoll_pwait		/* 315 */ -	.long sys_utimensat -	.long sys_signalfd -	.long sys_timerfd_create -	.long sys_eventfd -	.long sys_fallocate		/* 320 */ -	.long sys_timerfd_settime -	.long sys_timerfd_gettime -	.long sys_signalfd4 -	.long sys_eventfd2 -	.long sys_epoll_create1		/* 325 */ -	.long sys_dup3 -	.long sys_pipe2 -	.long sys_inotify_init1 -	.long sys_preadv -	.long sys_pwritev		/* 330 */ -	.long sys_rt_tgsigqueueinfo -	.long sys_perf_event_open -	.long sys_get_thread_area -	.long sys_set_thread_area -	.long sys_atomic_cmpxchg_32	/* 335 */ -	.long sys_atomic_barrier -	.long sys_fanotify_init -	.long sys_fanotify_mark -	.long sys_prlimit64 - +#endif /* CONFIG_MMU && !CONFIG_COLDFIRE */ diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index ef54128baa0..a54788458ca 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -23,7 +23,7 @@  ** 98/04/25 Phil Blundell: added HP300 support  ** 1998/08/30 David Kilzer: Added support for font_desc structures  **            for linux-2.1.115 -** 9/02/11  Richard Zidlicky: added Q40 support (initial vesion 99/01/01) +** 1999/02/11  Richard Zidlicky: added Q40 support (initial version 99/01/01)  ** 2004/05/13 Kars de Jong: Finalised HP300 support  **  ** This file is subject to the terms and conditions of the GNU General Public @@ -134,7 +134,7 @@   *	Thanks to a small helping routine enabling the mmu got quite simple   * and there is only one way left. mmu_engage makes a complete a new mapping   * that only includes the absolute necessary to be able to jump to the final - * postion and to restore the original mapping. + * position and to restore the original mapping.   * As this code doesn't need a transparent translation register anymore this   * means all registers are free to be used by machines that needs them for   * other purposes. @@ -153,7 +153,7 @@   * ------------   *	The console is also able to be turned off.  The console in head.S   * is specifically for debugging and can be very useful.  It is surrounded by - * #ifdef CONSOLE/#endif clauses so it doesn't have to ship in known-good + * #ifdef / #endif clauses so it doesn't have to ship in known-good   * kernels.  It's basic algorithm is to determine the size of the screen   * (in height/width and bit depth) and then use that information for   * displaying an 8x8 font or an 8x16 (widthxheight).  I prefer the 8x8 for @@ -198,9 +198,8 @@   * CONFIG_xxx:	These are the obvious machine configuration defines created   * during configuration.  These are defined in autoconf.h.   * - * CONSOLE:	There is support for head.S console in this file.  This - * console can talk to a Mac frame buffer, but could easily be extrapolated - * to extend it to support other platforms. + * CONSOLE_DEBUG:  Only supports a Mac frame buffer but could easily be + * extended to support other platforms.   *   * TEST_MMU:	This is a test harness for running on any given machine but   * getting an MMU dump for another class of machine.  The classes of machines @@ -222,7 +221,7 @@   * MMU_PRINT:	There is a routine built into head.S that can display the   * MMU data structures.  It outputs its result through the serial_putc   * interface.  So where ever that winds up driving data, that's where the - * mmu struct will appear.  On the Macintosh that's typically the console. + * mmu struct will appear.   *   * SERIAL_DEBUG:	There are a series of putc() macro statements   * scattered through out the code to give progress of status to the @@ -250,51 +249,37 @@   * USE_MFP:	Use the ST-MFP port (Modem1) for serial debug.   *   * Macintosh constants: - * MAC_SERIAL_DEBUG:	Turns on serial debug output for the Macintosh. - * MAC_USE_SCC_A:	Use the SCC port A (modem) for serial debug. - * MAC_USE_SCC_B:	Use the SCC port B (printer) for serial debug (default). + * MAC_USE_SCC_A: Use SCC port A (modem) for serial debug. + * MAC_USE_SCC_B: Use SCC port B (printer) for serial debug.   */  #include <linux/linkage.h>  #include <linux/init.h>  #include <asm/bootinfo.h> +#include <asm/bootinfo-amiga.h> +#include <asm/bootinfo-atari.h> +#include <asm/bootinfo-hp300.h> +#include <asm/bootinfo-mac.h> +#include <asm/bootinfo-q40.h> +#include <asm/bootinfo-vme.h>  #include <asm/setup.h>  #include <asm/entry.h>  #include <asm/pgtable.h>  #include <asm/page.h>  #include <asm/asm-offsets.h> -  #ifdef CONFIG_MAC - -#include <asm/machw.h> - -/* - * Macintosh console support - */ - -#ifdef CONFIG_FRAMEBUFFER_CONSOLE -#define CONSOLE -#define CONSOLE_PENGUIN +#  include <asm/machw.h>  #endif -/* - * Macintosh serial debug support; outputs boot info to the printer - *   and/or modem serial ports - */ -#undef MAC_SERIAL_DEBUG - -/* - * Macintosh serial debug port selection; define one or both; - *   requires MAC_SERIAL_DEBUG to be defined - */ -#define MAC_USE_SCC_A		/* Macintosh modem serial port */ -#define MAC_USE_SCC_B		/* Macintosh printer serial port */ - -#endif	/* CONFIG_MAC */ +#ifdef CONFIG_EARLY_PRINTK +#  define SERIAL_DEBUG +#  if defined(CONFIG_MAC) && defined(CONFIG_FONT_SUPPORT) +#    define CONSOLE_DEBUG +#  endif +#endif  #undef MMU_PRINT  #undef MMU_NOCACHE_KERNEL -#define SERIAL_DEBUG  #undef DEBUG  /* @@ -307,6 +292,7 @@  .globl kernel_pg_dir  .globl availmem +.globl m68k_init_mapped_size  .globl m68k_pgtable_cachemode  .globl m68k_supervisor_cachemode  #ifdef CONFIG_MVME16x @@ -484,22 +470,21 @@ func_define	serial_putc,1  func_define	console_putc,1  func_define	console_init -func_define	console_put_stats  func_define	console_put_penguin  func_define	console_plot_pixel,3  func_define	console_scroll  .macro	putc	ch -#if defined(CONSOLE) || defined(SERIAL_DEBUG) +#if defined(CONSOLE_DEBUG) || defined(SERIAL_DEBUG)  	pea	\ch  #endif -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG  	func_call	console_putc  #endif  #ifdef SERIAL_DEBUG  	func_call	serial_putc  #endif -#if defined(CONSOLE) || defined(SERIAL_DEBUG) +#if defined(CONSOLE_DEBUG) || defined(SERIAL_DEBUG)  	addql	#4,%sp  #endif  .endm @@ -519,7 +504,7 @@ func_define	putn,1  .endm  .macro	puts		string -#if defined(CONSOLE) || defined(SERIAL_DEBUG) +#if defined(CONSOLE_DEBUG) || defined(SERIAL_DEBUG)  	__INITDATA  .Lstr\@:  	.string	"\string" @@ -655,32 +640,9 @@ ENTRY(__start)  	lea	%pc@(L(mac_rowbytes)),%a1  	movel	%a0@,%a1@ -#ifdef MAC_SERIAL_DEBUG  	get_bi_record	BI_MAC_SCCBASE  	lea	%pc@(L(mac_sccbase)),%a1  	movel	%a0@,%a1@ -#endif /* MAC_SERIAL_DEBUG */ - -#if 0 -	/* -	 * Clear the screen -	 */ -	lea	%pc@(L(mac_videobase)),%a0 -	movel	%a0@,%a1 -	lea	%pc@(L(mac_dimensions)),%a0 -	movel	%a0@,%d1 -	swap	%d1		/* #rows is high bytes */ -	andl	#0xFFFF,%d1	/* rows */ -	subl	#10,%d1 -	lea	%pc@(L(mac_rowbytes)),%a0 -loopy2: -	movel	%a0@,%d0 -	subql	#1,%d0 -loopx2: -	moveb	#0x55, %a1@+ -	dbra	%d0,loopx2 -	dbra	%d1,loopy2 -#endif  L(test_notmac):  #endif /* CONFIG_MAC */ @@ -910,15 +872,14 @@ L(nothp):   */  #ifdef CONFIG_MAC  	is_not_mac(L(nocon)) -#ifdef CONSOLE +#  ifdef CONSOLE_DEBUG  	console_init -#ifdef CONSOLE_PENGUIN +#    ifdef CONFIG_LOGO  	console_put_penguin -#endif	/* CONSOLE_PENGUIN */ -	console_put_stats -#endif	/* CONSOLE */ +#    endif /* CONFIG_LOGO */ +#  endif /* CONSOLE_DEBUG */  L(nocon): -#endif	/* CONFIG_MAC */ +#endif /* CONFIG_MAC */  	putc	'\n' @@ -947,10 +908,22 @@ L(nocon):   *   *	This block of code does what's necessary to map in the various kinds   *	of machines for execution of Linux. - *	First map the first 4 MB of kernel code & data + *	First map the first 4, 8, or 16 MB of kernel code & data   */ -	mmu_map	#PAGE_OFFSET,%pc@(L(phys_kernel_start)),#4*1024*1024,\ +	get_bi_record BI_MEMCHUNK +	movel	%a0@(4),%d0 +	movel	#16*1024*1024,%d1 +	cmpl	%d0,%d1 +	jls	1f +	lsrl	#1,%d1 +	cmpl	%d0,%d1 +	jls	1f +	lsrl	#1,%d1 +1: +	lea	%pc@(m68k_init_mapped_size),%a0 +	movel	%d1,%a0@ +	mmu_map	#PAGE_OFFSET,%pc@(L(phys_kernel_start)),%d1,\  		%pc@(m68k_supervisor_cachemode)  	putc	'C' @@ -969,7 +942,7 @@ L(mmu_init_amiga):  	is_not_040_or_060(1f)  	/* -	 * 040: Map the 16Meg range physical 0x0 upto logical 0x8000.0000 +	 * 040: Map the 16Meg range physical 0x0 up to logical 0x8000.0000  	 */  	mmu_map		#0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S  	/* @@ -982,7 +955,7 @@ L(mmu_init_amiga):  1:  	/* -	 * 030:	Map the 32Meg range physical 0x0 upto logical 0x8000.0000 +	 * 030:	Map the 32Meg range physical 0x0 up to logical 0x8000.0000  	 */  	mmu_map		#0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030  	mmu_map_tt	#1,#0x40000000,#0x20000000,#_PAGE_NOCACHE030 @@ -1074,7 +1047,7 @@ L(notq40):  	is_040(1f)  	/* -	 * 030: Map the 32Meg range physical 0x0 upto logical 0xf000.0000 +	 * 030: Map the 32Meg range physical 0x0 up to logical 0xf000.0000  	 */  	mmu_map	#0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 @@ -1082,7 +1055,7 @@ L(notq40):  1:  	/* -	 * 040: Map the 16Meg range physical 0x0 upto logical 0xf000.0000 +	 * 040: Map the 16Meg range physical 0x0 up to logical 0xf000.0000  	 */  	mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S @@ -1421,15 +1394,13 @@ L(mmu_fixup_done):  	andl	L(mac_videobase),%d0  	addl	#VIDEOMEMBASE,%d0  	movel	%d0,L(mac_videobase) -#if defined(CONSOLE) +#ifdef CONSOLE_DEBUG  	movel	%pc@(L(phys_kernel_start)),%d0  	subl	#PAGE_OFFSET,%d0  	subl	%d0,L(console_font)  	subl	%d0,L(console_font_data)  #endif -#ifdef MAC_SERIAL_DEBUG  	orl	#0x50000000,L(mac_sccbase) -#endif  1:  #endif @@ -1541,7 +1512,7 @@ L(cache_done):  /*   * Find a tag record in the bootinfo structure - * The bootinfo structure is located right after the kernel bss + * The bootinfo structure is located right after the kernel   * Returns: d0: size (-1 if not found)   *          a0: data pointer (end-of-records if not found)   */ @@ -1917,7 +1888,7 @@ mmu_030_print:  	jbne	30b  mmu_print_done: -	puts	"\n\n" +	puts	"\n"  func_return	mmu_print @@ -2759,22 +2730,26 @@ func_return	get_new_page   */  #ifdef CONFIG_MAC +/* You may define either or both of these. */ +#define MAC_USE_SCC_A /* Modem port */ +#define MAC_USE_SCC_B /* Printer port */ +#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) +/* Initialisation table for SCC with 3.6864 MHz PCLK */  L(scc_initable_mac): -	.byte	9,12		/* Reset */  	.byte	4,0x44		/* x16, 1 stopbit, no parity */  	.byte	3,0xc0		/* receiver: 8 bpc */  	.byte	5,0xe2		/* transmitter: 8 bpc, assert dtr/rts */ -	.byte	9,0		/* no interrupts */  	.byte	10,0		/* NRZ */  	.byte	11,0x50		/* use baud rate generator */ -	.byte	12,10,13,0	/* 9600 baud */ +	.byte	12,1,13,0	/* 38400 baud */  	.byte	14,1		/* Baud rate generator enable */  	.byte	3,0xc1		/* enable receiver */  	.byte	5,0xea		/* enable transmitter */  	.byte	-1  	.even  #endif +#endif /* CONFIG_MAC */  #ifdef CONFIG_ATARI  /* #define USE_PRINTER */ @@ -2783,14 +2758,12 @@ L(scc_initable_mac):  #define USE_MFP  #if defined(USE_SCC_A) || defined(USE_SCC_B) -#define USE_SCC -/* Initialisation table for SCC */ -L(scc_initable): -	.byte	9,12		/* Reset */ +/* Initialisation table for SCC with 7.9872 MHz PCLK */ +/* PCLK == 8.0539 gives baud == 9680.1 */ +L(scc_initable_atari):  	.byte	4,0x44		/* x16, 1 stopbit, no parity */  	.byte	3,0xc0		/* receiver: 8 bpc */  	.byte	5,0xe2		/* transmitter: 8 bpc, assert dtr/rts */ -	.byte	9,0		/* no interrupts */  	.byte	10,0		/* NRZ */  	.byte	11,0x50		/* use baud rate generator */  	.byte	12,24,13,0	/* 9600 baud */ @@ -2839,7 +2812,7 @@ LMFP_UDR     = 0xfffa2f   */  /* - * Initialize serial port hardware for 9600/8/1 + * Initialize serial port hardware   */  func_start	serial_init,%d0/%d1/%a0/%a1  	/* @@ -2849,7 +2822,7 @@ func_start	serial_init,%d0/%d1/%a0/%a1  	 *		d0 = boot info offset  	 *	CONFIG_ATARI  	 *		a0 = address of SCC -	 *		a1 = Liobase address/address of scc_initable +	 *		a1 = Liobase address/address of scc_initable_atari  	 *		d0 = init data for serial port  	 *	CONFIG_MAC  	 *		a0 = address of SCC @@ -2870,6 +2843,7 @@ func_start	serial_init,%d0/%d1/%a0/%a1  |	movew	#61,CUSTOMBASE+C_SERPER-ZTWOBASE  1:  #endif +  #ifdef CONFIG_ATARI  	is_not_atari(4f)  	movel	%pc@(L(iobase)),%a1 @@ -2884,9 +2858,21 @@ func_start	serial_init,%d0/%d1/%a0/%a1  	moveb	%a1@(LPSG_READ),%d0  	bset	#5,%d0  	moveb	%d0,%a1@(LPSG_WRITE) -#elif defined(USE_SCC) +#elif defined(USE_SCC_A) || defined(USE_SCC_B)  	lea	%a1@(LSCC_CTRL),%a0 -	lea	%pc@(L(scc_initable)),%a1 +	/* Reset SCC register pointer */ +	moveb	%a0@,%d0 +	/* Reset SCC device: write register pointer then register value */ +	moveb	#9,%a0@ +	moveb	#0xc0,%a0@ +	/* Wait for 5 PCLK cycles, which is about 63 CPU cycles */ +	/* 5 / 7.9872 MHz = approx. 0.63 us = 63 / 100 MHz */ +	movel	#32,%d0 +2: +	subq	#1,%d0 +	jne	2b +	/* Initialize channel */ +	lea	%pc@(L(scc_initable_atari)),%a1  2:	moveb	%a1@+,%d0  	jmi	3f  	moveb	%d0,%a0@ @@ -2904,20 +2890,29 @@ func_start	serial_init,%d0/%d1/%a0/%a1  	jra	L(serial_init_done)  4:  #endif +  #ifdef CONFIG_MAC  	is_not_mac(L(serial_init_not_mac)) -#ifdef MAC_SERIAL_DEBUG -#if !defined(MAC_USE_SCC_A) && !defined(MAC_USE_SCC_B) -#define MAC_USE_SCC_B -#endif +#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)  #define mac_scc_cha_b_ctrl_offset	0x0  #define mac_scc_cha_a_ctrl_offset	0x2  #define mac_scc_cha_b_data_offset	0x4  #define mac_scc_cha_a_data_offset	0x6 - +	movel	%pc@(L(mac_sccbase)),%a0 +	/* Reset SCC register pointer */ +	moveb	%a0@(mac_scc_cha_a_ctrl_offset),%d0 +	/* Reset SCC device: write register pointer then register value */ +	moveb	#9,%a0@(mac_scc_cha_a_ctrl_offset) +	moveb	#0xc0,%a0@(mac_scc_cha_a_ctrl_offset) +	/* Wait for 5 PCLK cycles, which is about 68 CPU cycles */ +	/* 5 / 3.6864 MHz = approx. 1.36 us = 68 / 50 MHz */ +	movel	#35,%d0 +5: +	subq	#1,%d0 +	jne	5b +#endif  #ifdef MAC_USE_SCC_A  	/* Initialize channel A */ -	movel	%pc@(L(mac_sccbase)),%a0  	lea	%pc@(L(scc_initable_mac)),%a1  5:	moveb	%a1@+,%d0  	jmi	6f @@ -2926,12 +2921,8 @@ func_start	serial_init,%d0/%d1/%a0/%a1  	jra	5b  6:  #endif	/* MAC_USE_SCC_A */ -  #ifdef MAC_USE_SCC_B  	/* Initialize channel B */ -#ifndef MAC_USE_SCC_A	/* Load mac_sccbase only if needed */ -	movel	%pc@(L(mac_sccbase)),%a0 -#endif	/* MAC_USE_SCC_A */  	lea	%pc@(L(scc_initable_mac)),%a1  7:	moveb	%a1@+,%d0  	jmi	8f @@ -2940,8 +2931,6 @@ func_start	serial_init,%d0/%d1/%a0/%a1  	jra	7b  8:  #endif	/* MAC_USE_SCC_B */ -#endif	/* MAC_SERIAL_DEBUG */ -  	jra	L(serial_init_done)  L(serial_init_not_mac):  #endif	/* CONFIG_MAC */ @@ -2971,6 +2960,15 @@ L(serial_init_not_mac):  2:  #endif +#ifdef CONFIG_MVME16x +	is_not_mvme16x(L(serial_init_not_mvme16x)) +	moveb	#0x10,M167_PCSCCMICR +	moveb	#0x10,M167_PCSCCTICR +	moveb	#0x10,M167_PCSCCRICR +	jra	L(serial_init_done) +L(serial_init_not_mvme16x): +#endif +  #ifdef CONFIG_APOLLO  /* We count on the PROM initializing SIO1 */  #endif @@ -3010,27 +3008,19 @@ func_start	serial_putc,%d0/%d1/%a0/%a1  #ifdef CONFIG_MAC  	is_not_mac(5f) - -#ifdef MAC_SERIAL_DEBUG - -#ifdef MAC_USE_SCC_A +#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)  	movel	%pc@(L(mac_sccbase)),%a1 +#endif +#ifdef MAC_USE_SCC_A  3:	btst	#2,%a1@(mac_scc_cha_a_ctrl_offset)  	jeq	3b  	moveb	%d0,%a1@(mac_scc_cha_a_data_offset)  #endif	/* MAC_USE_SCC_A */ -  #ifdef MAC_USE_SCC_B -#ifndef MAC_USE_SCC_A	/* Load mac_sccbase only if needed */ -	movel	%pc@(L(mac_sccbase)),%a1 -#endif	/* MAC_USE_SCC_A */  4:	btst	#2,%a1@(mac_scc_cha_b_ctrl_offset)  	jeq	4b  	moveb	%d0,%a1@(mac_scc_cha_b_data_offset)  #endif	/* MAC_USE_SCC_B */ - -#endif	/* MAC_SERIAL_DEBUG */ -  	jra	L(serial_putc_done)  5:  #endif	/* CONFIG_MAC */ @@ -3051,7 +3041,7 @@ func_start	serial_putc,%d0/%d1/%a0/%a1  	nop  	bset	#5,%d0  	moveb	%d0,%a1@(LPSG_WRITE) -#elif defined(USE_SCC) +#elif defined(USE_SCC_A) || defined(USE_SCC_B)  3:	btst	#2,%a1@(LSCC_CTRL)  	jeq	3b  	moveb	%d0,%a1@(LSCC_DATA) @@ -3078,7 +3068,7 @@ func_start	serial_putc,%d0/%d1/%a0/%a1  	/*  	 * If the loader gave us a board type then we can use that to  	 * select an appropriate output routine; otherwise we just use -	 * the Bug code.  If we haev to use the Bug that means the Bug +	 * the Bug code.  If we have to use the Bug that means the Bug  	 * workspace has to be valid, which means the Bug has to use  	 * the SRAM, which is non-standard.  	 */ @@ -3207,7 +3197,7 @@ func_start	puts,%d0/%a0  	movel	ARG1,%a0  	jra	2f  1: -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG  	console_putc	%d0  #endif  #ifdef SERIAL_DEBUG @@ -3236,7 +3226,7 @@ func_start	putn,%d0-%d2  	jls	2f  	addb	#'A'-('9'+1),%d2  2: -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG  	console_putc	%d2  #endif  #ifdef SERIAL_DEBUG @@ -3246,37 +3236,41 @@ func_start	putn,%d0-%d2  func_return	putn -#ifdef CONFIG_MAC +#ifdef CONFIG_EARLY_PRINTK  /* - *	mac_serial_print - *   *	This routine takes its parameters on the stack.  It then - *	turns around and calls the internal routine.  This routine - *	is used until the Linux console driver initializes itself. + *	turns around and calls the internal routines.  This routine + *	is used by the boot console.   *   *	The calling parameters are: - *		void mac_serial_print(const char *str); + *		void debug_cons_nputs(const char *str, unsigned length)   *   *	This routine does NOT understand variable arguments only   *	simple strings!   */ -ENTRY(mac_serial_print) -	moveml	%d0/%a0,%sp@- -#if 1 -	move	%sr,%sp@- +ENTRY(debug_cons_nputs) +	moveml	%d0/%d1/%a0,%sp@- +	movew	%sr,%sp@-  	ori	#0x0700,%sr -#endif -	movel	%sp@(10),%a0		/* fetch parameter */ +	movel	%sp@(18),%a0		/* fetch parameter */ +	movel	%sp@(22),%d1		/* fetch parameter */  	jra	2f -1:	serial_putc	%d0 -2:	moveb	%a0@+,%d0 -	jne	1b -#if 1 -	move	%sp@+,%sr +1: +#ifdef CONSOLE_DEBUG +	console_putc	%d0 +#endif +#ifdef SERIAL_DEBUG +	serial_putc	%d0  #endif -	moveml	%sp@+,%d0/%a0 +	subq	#1,%d1 +2:	jeq	3f +	moveb	%a0@+,%d0 +	jne	1b +3: +	movew	%sp@+,%sr +	moveml	%sp@+,%d0/%d1/%a0  	rts -#endif /* CONFIG_MAC */ +#endif /* CONFIG_EARLY_PRINTK */  #if defined(CONFIG_HP300) || defined(CONFIG_APOLLO)  func_start	set_leds,%d0/%a0 @@ -3298,7 +3292,7 @@ func_start	set_leds,%d0/%a0  func_return	set_leds  #endif -#ifdef CONSOLE +#ifdef CONSOLE_DEBUG  /*   *	For continuity, see the data alignment   *	to which this structure is tied. @@ -3308,14 +3302,13 @@ func_return	set_leds  #define Lconsole_struct_num_columns	8  #define Lconsole_struct_num_rows	12  #define Lconsole_struct_left_edge	16 -#define Lconsole_struct_penguin_putc	20  func_start	console_init,%a0-%a4/%d0-%d7  	/*  	 *	Some of the register usage that follows  	 *		a0 = pointer to boot_info  	 *		a1 = pointer to screen -	 *		a2 = pointer to Lconsole_globals +	 *		a2 = pointer to console_globals  	 *		d3 = pixel width of screen  	 *		d4 = pixel height of screen  	 *		(d3,d4) ~= (x,y) of a point just below @@ -3403,42 +3396,7 @@ L(console_clear_loop):  1:  func_return	console_init -func_start	console_put_stats,%a0/%d7 -	/* -	 *	Some of the register usage that follows -	 *		a0 = pointer to boot_info -	 *		d7 = value of boot_info fields -	 */ -	puts	"\nMacLinux\n\n" - -#ifdef SERIAL_DEBUG -	puts	" vidaddr:" -	putn	%pc@(L(mac_videobase))		/* video addr. */ - -	puts	"\n  _stext:" -	lea	%pc@(_stext),%a0 -	putn	%a0 - -	puts	"\nbootinfo:" -	lea	%pc@(_end),%a0 -	putn	%a0 - -	puts	"\ncpuid:" -	putn	%pc@(L(cputype)) -	putc	'\n' - -#ifdef MAC_SERIAL_DEBUG -	putn	%pc@(L(mac_sccbase)) -	putc	'\n' -#endif -#  if defined(MMU_PRINT) -	jbsr	mmu_print_machine_cpu_types -#  endif /* MMU_PRINT */ -#endif /* SERIAL_DEBUG */ - -func_return	console_put_stats - -#ifdef CONSOLE_PENGUIN +#ifdef CONFIG_LOGO  func_start	console_put_penguin,%a0-%a1/%d0-%d7  	/*  	 *	Get 'that_penguin' onto the screen in the upper right corner @@ -3779,44 +3737,15 @@ L(white_16):  L(console_plot_pixel_exit):  func_return	console_plot_pixel -#endif /* CONSOLE */ - -#if 0 -/* - * This is some old code lying around.  I don't believe - * it's used or important anymore.  My guess is it contributed - * to getting to this point, but it's done for now. - * It was still in the 2.1.77 head.S, so it's still here. - * (And still not used!) - */ -L(showtest): -	moveml	%a0/%d7,%sp@- -	puts	"A=" -	putn	%a1 - -	.long	0xf0119f15		| ptestr	#5,%a1@,#7,%a0 - -	puts	"DA=" -	putn	%a0 - -	puts	"D=" -	putn	%a0@ +#endif /* CONSOLE_DEBUG */ -	puts	"S=" -	lea	%pc@(L(mmu)),%a0 -	.long	0xf0106200		| pmove		%psr,%a0@ -	clrl	%d7 -	movew	%a0@,%d7 -	putn	%d7 - -	putc	'\n' -	moveml	%sp@+,%a0/%d7 -	rts -#endif	/* 0 */  __INITDATA  	.align	4 +m68k_init_mapped_size: +	.long	0 +  #if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || \      defined(CONFIG_HP300) || defined(CONFIG_APOLLO)  L(custom): @@ -3824,19 +3753,18 @@ L(iobase):  	.long 0  #endif -#if defined(CONSOLE) +#ifdef CONSOLE_DEBUG  L(console_globals):  	.long	0		/* cursor column */  	.long	0		/* cursor row */  	.long	0		/* max num columns */  	.long	0		/* max num rows */  	.long	0		/* left edge */ -	.long	0		/* mac putc */  L(console_font):  	.long	0		/* pointer to console font (struct font_desc) */  L(console_font_data):  	.long	0		/* pointer to console font data */ -#endif /* CONSOLE */ +#endif /* CONSOLE_DEBUG */  #if defined(MMU_PRINT)  L(mmu_print_data): @@ -3876,7 +3804,9 @@ M167_CYIER = 0xfff45011  M167_CYLICR = 0xfff45026  M167_CYTEOIR = 0xfff45085  M167_CYTDR = 0xfff450f8 +M167_PCSCCMICR = 0xfff4201d  M167_PCSCCTICR = 0xfff4201e +M167_PCSCCRICR = 0xfff4201f  M167_PCTPIACKR = 0xfff42025  #endif @@ -3886,8 +3816,6 @@ BVME_SCC_DATA_A	= 0xffb0000f  #endif  #if defined(CONFIG_MAC) -L(mac_booter_data): -	.long	0  L(mac_videobase):  	.long	0  L(mac_videodepth): @@ -3896,11 +3824,9 @@ L(mac_dimensions):  	.long	0  L(mac_rowbytes):  	.long	0 -#ifdef MAC_SERIAL_DEBUG  L(mac_sccbase):  	.long	0 -#endif /* MAC_SERIAL_DEBUG */ -#endif +#endif /* CONFIG_MAC */  #if defined (CONFIG_APOLLO)  LSRB0        = 0x10412 diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 761ee0440c9..5b8d66fbf38 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c @@ -4,37 +4,17 @@   * This file is subject to the terms and conditions of the GNU General Public   * License.  See the file COPYING in the main directory of this archive   * for more details. - * - * 07/03/96: Timer initialization, and thus mach_sched_init(), - *           removed from request_irq() and moved to init_time(). - *           We should therefore consider renaming our add_isr() and - *           remove_isr() to request_irq() and free_irq() - *           respectively, so they are compliant with the other - *           architectures.                                     /Jes - * 11/07/96: Changed all add_/remove_isr() to request_/free_irq() calls. - *           Removed irq list support, if any machine needs an irq server - *           it must implement this itself (as it's already done), instead - *           only default handler are used with mach_default_handler. - *           request_irq got some flags different from other architectures: - *           - IRQ_FLG_REPLACE : Replace an existing handler (the default one - *                               can be replaced without this flag) - *           - IRQ_FLG_LOCK : handler can't be replaced - *           There are other machine depending flags, see there - *           If you want to replace a default handler you should know what - *           you're doing, since it might handle different other irq sources - *           which must be served                               /Roman Zippel   */  #include <linux/module.h>  #include <linux/types.h>  #include <linux/sched.h>  #include <linux/interrupt.h> -#include <linux/kernel_stat.h>  #include <linux/errno.h>  #include <linux/init.h> +#include <linux/irq.h>  #include <asm/setup.h> -#include <asm/system.h>  #include <asm/irq.h>  #include <asm/traps.h>  #include <asm/page.h> @@ -47,33 +27,22 @@  #endif  extern u32 auto_irqhandler_fixup[]; -extern u32 user_irqhandler_fixup[];  extern u16 user_irqvec_fixup[]; -/* table for system interrupt handlers */ -static struct irq_node *irq_list[NR_IRQS]; -static struct irq_controller *irq_controller[NR_IRQS]; -static int irq_depth[NR_IRQS]; -  static int m68k_first_user_vec; -static struct irq_controller auto_irq_controller = { +static struct irq_chip auto_irq_chip = {  	.name		= "auto", -	.lock		= __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock), -	.startup	= m68k_irq_startup, -	.shutdown	= m68k_irq_shutdown, +	.irq_startup	= m68k_irq_startup, +	.irq_shutdown	= m68k_irq_shutdown,  }; -static struct irq_controller user_irq_controller = { +static struct irq_chip user_irq_chip = {  	.name		= "user", -	.lock		= __SPIN_LOCK_UNLOCKED(user_irq_controller.lock), -	.startup	= m68k_irq_startup, -	.shutdown	= m68k_irq_shutdown, +	.irq_startup	= m68k_irq_startup, +	.irq_shutdown	= m68k_irq_shutdown,  }; -#define NUM_IRQ_NODES 100 -static irq_node_t nodes[NUM_IRQ_NODES]; -  /*   * void init_IRQ(void)   * @@ -89,14 +58,8 @@ void __init init_IRQ(void)  {  	int i; -	/* assembly irq entry code relies on this... */ -	if (HARDIRQ_MASK != 0x00ff0000) { -		extern void hardirq_mask_is_broken(void); -		hardirq_mask_is_broken(); -	} -  	for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) -		irq_controller[i] = &auto_irq_controller; +		irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);  	mach_init_IRQ();  } @@ -106,7 +69,7 @@ void __init init_IRQ(void)   * @handler: called from auto vector interrupts   *   * setup the handler to be called from auto vector interrupts instead of the - * standard __m68k_handle_int(), it will be called with irq numbers in the range + * standard do_IRQ(), it will be called with irq numbers in the range   * from IRQ_AUTO_1 - IRQ_AUTO_7.   */  void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) @@ -120,217 +83,49 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re   * m68k_setup_user_interrupt   * @vec: first user vector interrupt to handle   * @cnt: number of active user vector interrupts - * @handler: called from user vector interrupts   *   * setup user vector interrupts, this includes activating the specified range   * of interrupts, only then these interrupts can be requested (note: this is - * different from auto vector interrupts). An optional handler can be installed - * to be called instead of the default __m68k_handle_int(), it will be called - * with irq numbers starting from IRQ_USER. + * different from auto vector interrupts).   */ -void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, -				      void (*handler)(unsigned int, struct pt_regs *)) +void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt)  {  	int i;  	BUG_ON(IRQ_USER + cnt > NR_IRQS);  	m68k_first_user_vec = vec;  	for (i = 0; i < cnt; i++) -		irq_controller[IRQ_USER + i] = &user_irq_controller; +		irq_set_chip_and_handler(i, &user_irq_chip, handle_simple_irq);  	*user_irqvec_fixup = vec - IRQ_USER; -	if (handler) -		*user_irqhandler_fixup = (u32)handler;  	flush_icache();  }  /**   * m68k_setup_irq_controller - * @contr: irq controller which controls specified irq + * @chip: irq chip which controls specified irq + * @handle: flow handler which handles specified irq   * @irq: first irq to be managed by the controller + * @cnt: number of irqs to be managed by the controller   *   * Change the controller for the specified range of irq, which will be used to   * manage these irq. auto/user irq already have a default controller, which can   * be changed as well, but the controller probably should use m68k_irq_startup/   * m68k_irq_shutdown.   */ -void m68k_setup_irq_controller(struct irq_controller *contr, unsigned int irq, +void m68k_setup_irq_controller(struct irq_chip *chip, +			       irq_flow_handler_t handle, unsigned int irq,  			       unsigned int cnt)  {  	int i; -	for (i = 0; i < cnt; i++) -		irq_controller[irq + i] = contr; -} - -irq_node_t *new_irq_node(void) -{ -	irq_node_t *node; -	short i; - -	for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) { -		if (!node->handler) { -			memset(node, 0, sizeof(*node)); -			return node; -		} -	} - -	printk ("new_irq_node: out of nodes\n"); -	return NULL; -} - -int setup_irq(unsigned int irq, struct irq_node *node) -{ -	struct irq_controller *contr; -	struct irq_node **prev; -	unsigned long flags; - -	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { -		printk("%s: Incorrect IRQ %d from %s\n", -		       __func__, irq, node->devname); -		return -ENXIO; -	} - -	spin_lock_irqsave(&contr->lock, flags); - -	prev = irq_list + irq; -	if (*prev) { -		/* Can't share interrupts unless both agree to */ -		if (!((*prev)->flags & node->flags & IRQF_SHARED)) { -			spin_unlock_irqrestore(&contr->lock, flags); -			return -EBUSY; -		} -		while (*prev) -			prev = &(*prev)->next; -	} - -	if (!irq_list[irq]) { -		if (contr->startup) -			contr->startup(irq); -		else -			contr->enable(irq); -	} -	node->next = NULL; -	*prev = node; - -	spin_unlock_irqrestore(&contr->lock, flags); - -	return 0; -} - -int request_irq(unsigned int irq, -		irq_handler_t handler, -		unsigned long flags, const char *devname, void *dev_id) -{ -	struct irq_node *node; -	int res; - -	node = new_irq_node(); -	if (!node) -		return -ENOMEM; - -	node->handler = handler; -	node->flags   = flags; -	node->dev_id  = dev_id; -	node->devname = devname; - -	res = setup_irq(irq, node); -	if (res) -		node->handler = NULL; - -	return res; -} - -EXPORT_SYMBOL(request_irq); - -void free_irq(unsigned int irq, void *dev_id) -{ -	struct irq_controller *contr; -	struct irq_node **p, *node; -	unsigned long flags; - -	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { -		printk("%s: Incorrect IRQ %d\n", __func__, irq); -		return; +	for (i = 0; i < cnt; i++) { +		irq_set_chip(irq + i, chip); +		if (handle) +			irq_set_handler(irq + i, handle);  	} - -	spin_lock_irqsave(&contr->lock, flags); - -	p = irq_list + irq; -	while ((node = *p)) { -		if (node->dev_id == dev_id) -			break; -		p = &node->next; -	} - -	if (node) { -		*p = node->next; -		node->handler = NULL; -	} else -		printk("%s: Removing probably wrong IRQ %d\n", -		       __func__, irq); - -	if (!irq_list[irq]) { -		if (contr->shutdown) -			contr->shutdown(irq); -		else -			contr->disable(irq); -	} - -	spin_unlock_irqrestore(&contr->lock, flags);  } -EXPORT_SYMBOL(free_irq); - -void enable_irq(unsigned int irq) -{ -	struct irq_controller *contr; -	unsigned long flags; - -	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { -		printk("%s: Incorrect IRQ %d\n", -		       __func__, irq); -		return; -	} - -	spin_lock_irqsave(&contr->lock, flags); -	if (irq_depth[irq]) { -		if (!--irq_depth[irq]) { -			if (contr->enable) -				contr->enable(irq); -		} -	} else -		WARN_ON(1); -	spin_unlock_irqrestore(&contr->lock, flags); -} - -EXPORT_SYMBOL(enable_irq); - -void disable_irq(unsigned int irq) -{ -	struct irq_controller *contr; -	unsigned long flags; - -	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { -		printk("%s: Incorrect IRQ %d\n", -		       __func__, irq); -		return; -	} - -	spin_lock_irqsave(&contr->lock, flags); -	if (!irq_depth[irq]++) { -		if (contr->disable) -			contr->disable(irq); -	} -	spin_unlock_irqrestore(&contr->lock, flags); -} - -EXPORT_SYMBOL(disable_irq); - -void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq"))); - -EXPORT_SYMBOL(disable_irq_nosync); - -int m68k_irq_startup(unsigned int irq) +unsigned int m68k_irq_startup_irq(unsigned int irq)  {  	if (irq <= IRQ_AUTO_7)  		vectors[VEC_SPUR + irq] = auto_inthandler; @@ -339,41 +134,21 @@ int m68k_irq_startup(unsigned int irq)  	return 0;  } -void m68k_irq_shutdown(unsigned int irq) +unsigned int m68k_irq_startup(struct irq_data *data)  { -	if (irq <= IRQ_AUTO_7) -		vectors[VEC_SPUR + irq] = bad_inthandler; -	else -		vectors[m68k_first_user_vec + irq - IRQ_USER] = bad_inthandler; +	return m68k_irq_startup_irq(data->irq);  } - -/* - * Do we need these probe functions on the m68k? - * - *  ... may be useful with ISA devices - */ -unsigned long probe_irq_on (void) +void m68k_irq_shutdown(struct irq_data *data)  { -#ifdef CONFIG_Q40 -	if (MACH_IS_Q40) -		return q40_probe_irq_on(); -#endif -	return 0; -} +	unsigned int irq = data->irq; -EXPORT_SYMBOL(probe_irq_on); - -int probe_irq_off (unsigned long irqs) -{ -#ifdef CONFIG_Q40 -	if (MACH_IS_Q40) -		return q40_probe_irq_off(irqs); -#endif -	return 0; +	if (irq <= IRQ_AUTO_7) +		vectors[VEC_SPUR + irq] = bad_inthandler; +	else +		vectors[m68k_first_user_vec + irq - IRQ_USER] = bad_inthandler;  } -EXPORT_SYMBOL(probe_irq_off);  unsigned int irq_canonicalize(unsigned int irq)  { @@ -386,52 +161,9 @@ unsigned int irq_canonicalize(unsigned int irq)  EXPORT_SYMBOL(irq_canonicalize); -asmlinkage void m68k_handle_int(unsigned int irq) -{ -	struct irq_node *node; -	kstat_cpu(0).irqs[irq]++; -	node = irq_list[irq]; -	do { -		node->handler(irq, node->dev_id); -		node = node->next; -	} while (node); -} - -asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs) -{ -	struct pt_regs *old_regs; -	old_regs = set_irq_regs(regs); -	m68k_handle_int(irq); -	set_irq_regs(old_regs); -}  asmlinkage void handle_badint(struct pt_regs *regs)  { -	kstat_cpu(0).irqs[0]++; -	printk("unexpected interrupt from %u\n", regs->vector); -} - -int show_interrupts(struct seq_file *p, void *v) -{ -	struct irq_controller *contr; -	struct irq_node *node; -	int i = *(loff_t *) v; - -	/* autovector interrupts */ -	if (irq_list[i]) { -		contr = irq_controller[i]; -		node = irq_list[i]; -		seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname); -		while ((node = node->next)) -			seq_printf(p, ", %s", node->devname); -		seq_puts(p, "\n"); -	} -	return 0; -} - -#ifdef CONFIG_PROC_FS -void init_irq_proc(void) -{ -	/* Insert /proc/irq driver here */ +	atomic_inc(&irq_err_count); +	pr_warn("unexpected interrupt from %u\n", regs->vector);  } -#endif diff --git a/arch/m68k/kernel/irq.c b/arch/m68k/kernel/irq.c new file mode 100644 index 00000000000..9ab4f550342 --- /dev/null +++ b/arch/m68k/kernel/irq.c @@ -0,0 +1,39 @@ +/* + * irq.c + * + * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/kernel_stat.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/seq_file.h> +#include <asm/traps.h> + +asmlinkage void do_IRQ(int irq, struct pt_regs *regs) +{ +	struct pt_regs *oldregs = set_irq_regs(regs); + +	irq_enter(); +	generic_handle_irq(irq); +	irq_exit(); + +	set_irq_regs(oldregs); +} + + +/* The number of spurious interrupts */ +atomic_t irq_err_count; + +int arch_show_interrupts(struct seq_file *p, int prec) +{ +	seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); +	return 0; +} diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index d900e77e536..774c1bd59c3 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c @@ -14,3 +14,19 @@ EXPORT_SYMBOL(__ashrdi3);  EXPORT_SYMBOL(__lshrdi3);  EXPORT_SYMBOL(__muldi3); +#if defined(CONFIG_CPU_HAS_NO_MULDIV64) +/* + * Simpler 68k and ColdFire parts also need a few other gcc functions. + */ +extern long long __divsi3(long long, long long); +extern long long __modsi3(long long, long long); +extern long long __mulsi3(long long, long long); +extern long long __udivsi3(long long, long long); +extern long long __umodsi3(long long, long long); + +EXPORT_SYMBOL(__divsi3); +EXPORT_SYMBOL(__modsi3); +EXPORT_SYMBOL(__mulsi3); +EXPORT_SYMBOL(__udivsi3); +EXPORT_SYMBOL(__umodsi3); +#endif diff --git a/arch/m68k/kernel/machine_kexec.c b/arch/m68k/kernel/machine_kexec.c new file mode 100644 index 00000000000..d4affc917d9 --- /dev/null +++ b/arch/m68k/kernel/machine_kexec.c @@ -0,0 +1,58 @@ +/* + * machine_kexec.c - handle transition of Linux booting another kernel + */ +#include <linux/compiler.h> +#include <linux/kexec.h> +#include <linux/mm.h> +#include <linux/delay.h> + +#include <asm/cacheflush.h> +#include <asm/page.h> +#include <asm/setup.h> + +extern const unsigned char relocate_new_kernel[]; +extern const size_t relocate_new_kernel_size; + +int machine_kexec_prepare(struct kimage *kimage) +{ +	return 0; +} + +void machine_kexec_cleanup(struct kimage *kimage) +{ +} + +void machine_shutdown(void) +{ +} + +void machine_crash_shutdown(struct pt_regs *regs) +{ +} + +typedef void (*relocate_kernel_t)(unsigned long ptr, +				  unsigned long start, +				  unsigned long cpu_mmu_flags) __noreturn; + +void machine_kexec(struct kimage *image) +{ +	void *reboot_code_buffer; +	unsigned long cpu_mmu_flags; + +	reboot_code_buffer = page_address(image->control_code_page); + +	memcpy(reboot_code_buffer, relocate_new_kernel, +	       relocate_new_kernel_size); + +	/* +	 * we do not want to be bothered. +	 */ +	local_irq_disable(); + +	pr_info("Will call new kernel at 0x%08lx. Bye...\n", image->start); +	__flush_cache_all(); +	cpu_mmu_flags = m68k_cputype | m68k_mmutype << 8; +	((relocate_kernel_t) reboot_code_buffer)(image->head & PAGE_MASK, +						 image->start, +						 cpu_mmu_flags); +} diff --git a/arch/m68k/kernel/module.c b/arch/m68k/kernel/module.c index cd6bcb1c957..eb46fd6038c 100644 --- a/arch/m68k/kernel/module.c +++ b/arch/m68k/kernel/module.c @@ -19,29 +19,6 @@  #ifdef CONFIG_MODULES -void *module_alloc(unsigned long size) -{ -	if (size == 0) -		return NULL; -	return vmalloc(size); -} - - -/* Free memory returned from module_alloc */ -void module_free(struct module *mod, void *module_region) -{ -	vfree(module_region); -} - -/* We don't need anything special. */ -int module_frob_arch_sections(Elf_Ehdr *hdr, -			      Elf_Shdr *sechdrs, -			      char *secstrings, -			      struct module *mod) -{ -	return 0; -} -  int apply_relocate(Elf32_Shdr *sechdrs,  		   const char *strtab,  		   unsigned int symindex, @@ -70,7 +47,7 @@ int apply_relocate(Elf32_Shdr *sechdrs,  			*location += sym->st_value;  			break;  		case R_68K_PC32: -			/* Add the value, subtract its postition */ +			/* Add the value, subtract its position */  			*location += sym->st_value - (uint32_t)location;  			break;  		default: @@ -110,7 +87,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,  			*location = rel[i].r_addend + sym->st_value;  			break;  		case R_68K_PC32: -			/* Add the value, subtract its postition */ +			/* Add the value, subtract its position */  			*location = rel[i].r_addend + sym->st_value - (uint32_t)location;  			break;  		default: @@ -127,19 +104,15 @@ int module_finalize(const Elf_Ehdr *hdr,  		    struct module *mod)  {  	module_fixup(mod, mod->arch.fixup_start, mod->arch.fixup_end); -  	return 0;  } -void module_arch_cleanup(struct module *mod) -{ -} -  #endif /* CONFIG_MODULES */  void module_fixup(struct module *mod, struct m68k_fixup_info *start,  		  struct m68k_fixup_info *end)  { +#ifdef CONFIG_MMU  	struct m68k_fixup_info *fixup;  	for (fixup = start; fixup < end; fixup++) { @@ -152,4 +125,5 @@ void module_fixup(struct module *mod, struct m68k_fixup_info *start,  			break;  		}  	} +#endif  } diff --git a/arch/m68k/kernel/pcibios.c b/arch/m68k/kernel/pcibios.c new file mode 100644 index 00000000000..931a31ff59d --- /dev/null +++ b/arch/m68k/kernel/pcibios.c @@ -0,0 +1,104 @@ +/* + * pci.c -- basic PCI support code + * + * This program is free software; you can redistribute  it and/or modify it + * under  the terms of  the GNU General  Public License as published by the + * Free Software Foundation;  either version 2 of the  License, or (at your + * option) any later version. + * + * (C) Copyright 2011, Greg Ungerer <gerg@uclinux.org> + */ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/mm.h> +#include <linux/init.h> +#include <linux/pci.h> + +/* + * From arch/i386/kernel/pci-i386.c: + * + * We need to avoid collisions with `mirrored' VGA ports + * and other strange ISA hardware, so we always want the + * addresses to be allocated in the 0x000-0x0ff region + * modulo 0x400. + * + * Why? Because some silly external IO cards only decode + * the low 10 bits of the IO address. The 0x00-0xff region + * is reserved for motherboard devices that decode all 16 + * bits, so it's ok to allocate at, say, 0x2800-0x28ff, + * but we want to try to avoid allocating at 0x2900-0x2bff + * which might be mirrored at 0x0100-0x03ff.. + */ +resource_size_t pcibios_align_resource(void *data, const struct resource *res, +	resource_size_t size, resource_size_t align) +{ +	resource_size_t start = res->start; + +	if ((res->flags & IORESOURCE_IO) && (start & 0x300)) +		start = (start + 0x3ff) & ~0x3ff; + +	start = (start + align - 1) & ~(align - 1); + +	return start; +} + +/* + * This is taken from the ARM code for this. + */ +int pcibios_enable_device(struct pci_dev *dev, int mask) +{ +	struct resource *r; +	u16 cmd, newcmd; +	int idx; + +	pci_read_config_word(dev, PCI_COMMAND, &cmd); +	newcmd = cmd; + +	for (idx = 0; idx < 6; idx++) { +		/* Only set up the requested stuff */ +		if (!(mask & (1 << idx))) +			continue; + +		r = dev->resource + idx; +		if (!r->start && r->end) { +			pr_err(KERN_ERR "PCI: Device %s not available because of resource collisions\n", +				pci_name(dev)); +			return -EINVAL; +		} +		if (r->flags & IORESOURCE_IO) +			newcmd |= PCI_COMMAND_IO; +		if (r->flags & IORESOURCE_MEM) +			newcmd |= PCI_COMMAND_MEMORY; +	} + +	/* +	 * Bridges (eg, cardbus bridges) need to be fully enabled +	 */ +	if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) +		newcmd |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY; + + +	if (newcmd != cmd) { +		pr_info("PCI: enabling device %s (0x%04x -> 0x%04x)\n", +			pci_name(dev), cmd, newcmd); +		pci_write_config_word(dev, PCI_COMMAND, newcmd); +	} +	return 0; +} + +void pcibios_fixup_bus(struct pci_bus *bus) +{ +	struct pci_dev *dev; + +	list_for_each_entry(dev, &bus->devices, bus_list) { +		pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 8); +		pci_write_config_byte(dev, PCI_LATENCY_TIMER, 32); +	} +} + +char *pcibios_setup(char *str) +{ +	return str; +} + diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 18732ab2329..c55ff719fa7 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c @@ -18,7 +18,6 @@  #include <linux/slab.h>  #include <linux/fs.h>  #include <linux/smp.h> -#include <linux/smp_lock.h>  #include <linux/stddef.h>  #include <linux/unistd.h>  #include <linux/ptrace.h> @@ -26,32 +25,17 @@  #include <linux/reboot.h>  #include <linux/init_task.h>  #include <linux/mqueue.h> +#include <linux/rcupdate.h>  #include <asm/uaccess.h> -#include <asm/system.h>  #include <asm/traps.h>  #include <asm/machdep.h>  #include <asm/setup.h>  #include <asm/pgtable.h> -/* - * Initial task/thread structure. Make this a per-architecture thing, - * because different architectures tend to have different - * alignment requirements and potentially different initial - * setup. - */ -static struct signal_struct init_signals = INIT_SIGNALS(init_signals); -static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); -union thread_union init_thread_union __init_task_data -	__attribute__((aligned(THREAD_SIZE))) = -		{ INIT_THREAD_INFO(init_task) }; - -/* initial task structure */ -struct task_struct init_task = INIT_TASK(init_task); - -EXPORT_SYMBOL(init_task);  asmlinkage void ret_from_fork(void); +asmlinkage void ret_from_kernel_thread(void);  /* @@ -67,40 +51,16 @@ unsigned long thread_saved_pc(struct task_struct *tsk)  		return sw->retpc;  } -/* - * The idle loop on an m68k.. - */ -static void default_idle(void) +void arch_cpu_idle(void)  { -	if (!need_resched())  #if defined(MACH_ATARI_ONLY) -		/* block out HSYNC on the atari (falcon) */ -		__asm__("stop #0x2200" : : : "cc"); +	/* block out HSYNC on the atari (falcon) */ +	__asm__("stop #0x2200" : : : "cc");  #else -		__asm__("stop #0x2000" : : : "cc"); +	__asm__("stop #0x2000" : : : "cc");  #endif  } -void (*idle)(void) = default_idle; - -/* - * The idle thread. There's no useful work to be - * done, so just try to conserve power and have a - * low exit latency (ie sit in a loop waiting for - * somebody to say that they'd like to reschedule) - */ -void cpu_idle(void) -{ -	/* endless idle loop with no priority at all */ -	while (1) { -		while (!need_resched()) -			idle(); -		preempt_enable_no_resched(); -		schedule(); -		preempt_disable(); -	} -} -  void machine_restart(char * __unused)  {  	if (mach_reset) @@ -140,120 +100,47 @@ void show_regs(struct pt_regs * regs)  		printk("USP: %08lx\n", rdusp());  } -/* - * Create a kernel thread - */ -int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) -{ -	int pid; -	mm_segment_t fs; - -	fs = get_fs(); -	set_fs (KERNEL_DS); - -	{ -	register long retval __asm__ ("d0"); -	register long clone_arg __asm__ ("d1") = flags | CLONE_VM | CLONE_UNTRACED; - -	retval = __NR_clone; -	__asm__ __volatile__ -	  ("clrl %%d2\n\t" -	   "trap #0\n\t"		/* Linux/m68k system call */ -	   "tstl %0\n\t"		/* child or parent */ -	   "jne 1f\n\t"			/* parent - jump */ -	   "lea %%sp@(%c7),%6\n\t"	/* reload current */ -	   "movel %6@,%6\n\t" -	   "movel %3,%%sp@-\n\t"	/* push argument */ -	   "jsr %4@\n\t"		/* call fn */ -	   "movel %0,%%d1\n\t"		/* pass exit value */ -	   "movel %2,%%d0\n\t"		/* exit */ -	   "trap #0\n" -	   "1:" -	   : "+d" (retval) -	   : "i" (__NR_clone), "i" (__NR_exit), -	     "r" (arg), "a" (fn), "d" (clone_arg), "r" (current), -	     "i" (-THREAD_SIZE) -	   : "d2"); - -	pid = retval; -	} - -	set_fs (fs); -	return pid; -} -EXPORT_SYMBOL(kernel_thread); -  void flush_thread(void)  { -	unsigned long zero = 0; -	set_fs(USER_DS);  	current->thread.fs = __USER_DS; -	if (!FPU_IS_EMU) -		asm volatile (".chip 68k/68881\n\t" -			      "frestore %0@\n\t" -			      ".chip 68k" : : "a" (&zero)); +#ifdef CONFIG_FPU +	if (!FPU_IS_EMU) { +		unsigned long zero = 0; +		asm volatile("frestore %0": :"m" (zero)); +	} +#endif  }  /* - * "m68k_fork()".. By the time we get here, the - * non-volatile registers have also been saved on the - * stack. We do some ugly pointer stuff here.. (see - * also copy_thread) + * Why not generic sys_clone, you ask?  m68k passes all arguments on stack. + * And we need all registers saved, which means a bunch of stuff pushed + * on top of pt_regs, which means that sys_clone() arguments would be + * buried.  We could, of course, copy them, but it's too costly for no + * good reason - generic clone() would have to copy them *again* for + * do_fork() anyway.  So in this case it's actually better to pass pt_regs * + * and extract arguments for do_fork() from there.  Eventually we might + * go for calling do_fork() directly from the wrapper, but only after we + * are finished with do_fork() prototype conversion.   */ - -asmlinkage int m68k_fork(struct pt_regs *regs) -{ -	return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL); -} - -asmlinkage int m68k_vfork(struct pt_regs *regs) -{ -	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, -		       NULL, NULL); -} -  asmlinkage int m68k_clone(struct pt_regs *regs)  { -	unsigned long clone_flags; -	unsigned long newsp; -	int __user *parent_tidptr, *child_tidptr; - -	/* syscall2 puts clone_flags in d1 and usp in d2 */ -	clone_flags = regs->d1; -	newsp = regs->d2; -	parent_tidptr = (int __user *)regs->d3; -	child_tidptr = (int __user *)regs->d4; -	if (!newsp) -		newsp = rdusp(); -	return do_fork(clone_flags, newsp, regs, 0, -		       parent_tidptr, child_tidptr); +	/* regs will be equal to current_pt_regs() */ +	return do_fork(regs->d1, regs->d2, 0, +		       (int __user *)regs->d3, (int __user *)regs->d4);  }  int copy_thread(unsigned long clone_flags, unsigned long usp, -		 unsigned long unused, -		 struct task_struct * p, struct pt_regs * regs) +		 unsigned long arg, struct task_struct *p)  { -	struct pt_regs * childregs; -	struct switch_stack * childstack, *stack; -	unsigned long *retp; - -	childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1; +	struct fork_frame { +		struct switch_stack sw; +		struct pt_regs regs; +	} *frame; -	*childregs = *regs; -	childregs->d0 = 0; +	frame = (struct fork_frame *) (task_stack_page(p) + THREAD_SIZE) - 1; -	retp = ((unsigned long *) regs); -	stack = ((struct switch_stack *) retp) - 1; - -	childstack = ((struct switch_stack *) childregs) - 1; -	*childstack = *stack; -	childstack->retpc = (unsigned long)ret_from_fork; - -	p->thread.usp = usp; -	p->thread.ksp = (unsigned long)childstack; - -	if (clone_flags & CLONE_SETTLS) -		task_thread_info(p)->tp_value = regs->d5; +	p->thread.ksp = (unsigned long)frame; +	p->thread.esp0 = (unsigned long)&frame->regs;  	/*  	 * Must save the current SFC/DFC value, NOT the value when @@ -261,24 +148,62 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,  	 */  	p->thread.fs = get_fs().seg; +	if (unlikely(p->flags & PF_KTHREAD)) { +		/* kernel thread */ +		memset(frame, 0, sizeof(struct fork_frame)); +		frame->regs.sr = PS_S; +		frame->sw.a3 = usp; /* function */ +		frame->sw.d7 = arg; +		frame->sw.retpc = (unsigned long)ret_from_kernel_thread; +		p->thread.usp = 0; +		return 0; +	} +	memcpy(frame, container_of(current_pt_regs(), struct fork_frame, regs), +		sizeof(struct fork_frame)); +	frame->regs.d0 = 0; +	frame->sw.retpc = (unsigned long)ret_from_fork; +	p->thread.usp = usp ?: rdusp(); + +	if (clone_flags & CLONE_SETTLS) +		task_thread_info(p)->tp_value = frame->regs.d5; + +#ifdef CONFIG_FPU  	if (!FPU_IS_EMU) {  		/* Copy the current fpu state */  		asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory"); -		if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) -		  asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t" -				"fmoveml %/fpiar/%/fpcr/%/fpsr,%1" -				: : "m" (p->thread.fp[0]), "m" (p->thread.fpcntl[0]) -				: "memory"); +		if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) { +			if (CPU_IS_COLDFIRE) { +				asm volatile ("fmovemd %/fp0-%/fp7,%0\n\t" +					      "fmovel %/fpiar,%1\n\t" +					      "fmovel %/fpcr,%2\n\t" +					      "fmovel %/fpsr,%3" +					      : +					      : "m" (p->thread.fp[0]), +						"m" (p->thread.fpcntl[0]), +						"m" (p->thread.fpcntl[1]), +						"m" (p->thread.fpcntl[2]) +					      : "memory"); +			} else { +				asm volatile ("fmovemx %/fp0-%/fp7,%0\n\t" +					      "fmoveml %/fpiar/%/fpcr/%/fpsr,%1" +					      : +					      : "m" (p->thread.fp[0]), +						"m" (p->thread.fpcntl[0]) +					      : "memory"); +			} +		} +  		/* Restore the state in case the fpu was busy */  		asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));  	} +#endif /* CONFIG_FPU */  	return 0;  }  /* Fill in the fpu structure for a core dump.  */ - +#ifdef CONFIG_FPU  int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)  {  	char fpustate[216]; @@ -302,35 +227,32 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)  	if (!CPU_IS_060 ? !fpustate[0] : !fpustate[2])  		return 0; -	asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0" -		:: "m" (fpu->fpcntl[0]) -		: "memory"); -	asm volatile ("fmovemx %/fp0-%/fp7,%0" -		:: "m" (fpu->fpregs[0]) -		: "memory"); +	if (CPU_IS_COLDFIRE) { +		asm volatile ("fmovel %/fpiar,%0\n\t" +			      "fmovel %/fpcr,%1\n\t" +			      "fmovel %/fpsr,%2\n\t" +			      "fmovemd %/fp0-%/fp7,%3" +			      : +			      : "m" (fpu->fpcntl[0]), +				"m" (fpu->fpcntl[1]), +				"m" (fpu->fpcntl[2]), +				"m" (fpu->fpregs[0]) +			      : "memory"); +	} else { +		asm volatile ("fmovem %/fpiar/%/fpcr/%/fpsr,%0" +			      : +			      : "m" (fpu->fpcntl[0]) +			      : "memory"); +		asm volatile ("fmovemx %/fp0-%/fp7,%0" +			      : +			      : "m" (fpu->fpregs[0]) +			      : "memory"); +	} +  	return 1;  }  EXPORT_SYMBOL(dump_fpu); - -/* - * sys_execve() executes a new program. - */ -asmlinkage int sys_execve(const char __user *name, -			  const char __user *const __user *argv, -			  const char __user *const __user *envp) -{ -	int error; -	char * filename; -	struct pt_regs *regs = (struct pt_regs *) &name; - -	filename = getname(name); -	error = PTR_ERR(filename); -	if (IS_ERR(filename)) -		return error; -	error = do_execve(filename, argv, envp, regs); -	putname(filename); -	return error; -} +#endif /* CONFIG_FPU */  unsigned long get_wchan(struct task_struct *p)  { diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 0b252683cef..1bc10e62b9a 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c @@ -18,11 +18,11 @@  #include <linux/ptrace.h>  #include <linux/user.h>  #include <linux/signal.h> +#include <linux/tracehook.h>  #include <asm/uaccess.h>  #include <asm/page.h>  #include <asm/pgtable.h> -#include <asm/system.h>  #include <asm/processor.h>  /* @@ -145,11 +145,13 @@ void user_enable_single_step(struct task_struct *child)  	set_tsk_thread_flag(child, TIF_DELAYED_TRACE);  } +#ifdef CONFIG_MMU  void user_enable_block_step(struct task_struct *child)  {  	unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS;  	put_reg(child, PT_SR, tmp | T0_BIT);  } +#endif  void user_disable_single_step(struct task_struct *child)  { @@ -180,6 +182,14 @@ long arch_ptrace(struct task_struct *child, long request,  			if (FPU_IS_EMU && (regno < 45) && !(regno % 3))  				tmp = ((tmp & 0xffff0000) << 15) |  				      ((tmp & 0x0000ffff) << 16); +#ifndef CONFIG_MMU +		} else if (regno == 49) { +			tmp = child->mm->start_code; +		} else if (regno == 50) { +			tmp = child->mm->start_data; +		} else if (regno == 51) { +			tmp = child->mm->end_code; +#endif  		} else  			goto out_eio;  		ret = put_user(tmp, datap); @@ -275,3 +285,20 @@ asmlinkage void syscall_trace(void)  		current->exit_code = 0;  	}  } + +#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU) +asmlinkage int syscall_trace_enter(void) +{ +	int ret = 0; + +	if (test_thread_flag(TIF_SYSCALL_TRACE)) +		ret = tracehook_report_syscall_entry(task_pt_regs(current)); +	return ret; +} + +asmlinkage void syscall_trace_leave(void) +{ +	if (test_thread_flag(TIF_SYSCALL_TRACE)) +		tracehook_report_syscall_exit(task_pt_regs(current), 0); +} +#endif /* CONFIG_COLDFIRE */ diff --git a/arch/m68k/kernel/relocate_kernel.S b/arch/m68k/kernel/relocate_kernel.S new file mode 100644 index 00000000000..3e09a89067a --- /dev/null +++ b/arch/m68k/kernel/relocate_kernel.S @@ -0,0 +1,159 @@ +#include <linux/linkage.h> + +#include <asm/asm-offsets.h> +#include <asm/page.h> +#include <asm/setup.h> + + +#define MMU_BASE	8		/* MMU flags base in cpu_mmu_flags */ + +.text + +ENTRY(relocate_new_kernel) +	movel %sp@(4),%a0		/* a0 = ptr */ +	movel %sp@(8),%a1		/* a1 = start */ +	movel %sp@(12),%d1		/* d1 = cpu_mmu_flags */ +	movew #PAGE_MASK,%d2		/* d2 = PAGE_MASK */ + +	/* Disable MMU */ + +	btst #MMU_BASE + MMUB_68851,%d1 +	jeq 3f + +1:	/* 68851 or 68030 */ + +	lea %pc@(.Lcopy),%a4 +2:	addl #0x00000000,%a4		/* virt_to_phys() */ + +	.section ".m68k_fixup","aw" +	.long M68K_FIXUP_MEMOFFSET, 2b+2 +	.previous + +	.chip 68030 +	pmove %tc,%d0			/* Disable MMU */ +	bclr #7,%d0 +	pmove %d0,%tc +	jmp %a4@			/* Jump to physical .Lcopy */ +	.chip 68k + +3: +	btst #MMU_BASE + MMUB_68030,%d1 +	jne 1b + +	btst #MMU_BASE + MMUB_68040,%d1 +	jeq 6f + +4:	/* 68040 or 68060 */ + +	lea %pc@(.Lcont040),%a4 +5:	addl #0x00000000,%a4		/* virt_to_phys() */ + +	.section ".m68k_fixup","aw" +	.long M68K_FIXUP_MEMOFFSET, 5b+2 +	.previous + +	movel %a4,%d0 +	andl #0xff000000,%d0 +	orw #0xe020,%d0			/* Map 16 MiB, enable, cacheable */ +	.chip 68040 +	movec %d0,%itt0 +	movec %d0,%dtt0 +	.chip 68k +	jmp %a4@			/* Jump to physical .Lcont040 */ + +.Lcont040: +	moveq #0,%d0 +	.chip 68040 +	movec %d0,%tc			/* Disable MMU */ +	movec %d0,%itt0 +	movec %d0,%itt1 +	movec %d0,%dtt0 +	movec %d0,%dtt1 +	.chip 68k +	jra .Lcopy + +6: +	btst #MMU_BASE + MMUB_68060,%d1 +	jne 4b + +.Lcopy: +	movel %a0@+,%d0			/* d0 = entry = *ptr */ +	jeq .Lflush + +	btst #2,%d0			/* entry & IND_DONE? */ +	jne .Lflush + +	btst #1,%d0			/* entry & IND_INDIRECTION? */ +	jeq 1f +	andw %d2,%d0 +	movel %d0,%a0			/* ptr = entry & PAGE_MASK */ +	jra .Lcopy + +1: +	btst #0,%d0			/* entry & IND_DESTINATION? */ +	jeq 2f +	andw %d2,%d0 +	movel %d0,%a2			/* a2 = dst = entry & PAGE_MASK */ +	jra .Lcopy + +2: +	btst #3,%d0			/* entry & IND_SOURCE? */ +	jeq .Lcopy + +	andw %d2,%d0 +	movel %d0,%a3			/* a3 = src = entry & PAGE_MASK */ +	movew #PAGE_SIZE/32 - 1,%d0	/* d0 = PAGE_SIZE/32 - 1 */ +3: +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	movel %a3@+,%a2@+		/* *dst++ = *src++ */ +	dbf %d0, 3b +	jra .Lcopy + +.Lflush: +	/* Flush all caches */ + +	btst #CPUB_68020,%d1 +	jeq 2f + +1:	/* 68020 or 68030 */ +	.chip 68030 +	movec %cacr,%d0 +	orw #0x808,%d0 +	movec %d0,%cacr +	.chip 68k +	jra .Lreincarnate + +2: +	btst #CPUB_68030,%d1 +	jne 1b + +	btst #CPUB_68040,%d1 +	jeq 4f + +3:	/* 68040 or 68060 */ +	.chip 68040 +	nop +	cpusha %bc +	nop +	cinva %bc +	nop +	.chip 68k +	jra .Lreincarnate + +4: +	btst #CPUB_68060,%d1 +	jne 3b + +.Lreincarnate: +	jmp %a1@ + +relocate_new_kernel_end: + +ENTRY(relocate_new_kernel_size) +	.long relocate_new_kernel_end - relocate_new_kernel diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index b3963ab3d14..4bf129f1d2e 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c @@ -1,528 +1,5 @@ -/* - *  linux/arch/m68k/kernel/setup.c - * - *  Copyright (C) 1995  Hamish Macdonald - */ - -/* - * This file handles the architecture-dependent parts of system setup - */ - -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/sched.h> -#include <linux/delay.h> -#include <linux/interrupt.h> -#include <linux/fs.h> -#include <linux/console.h> -#include <linux/genhd.h> -#include <linux/errno.h> -#include <linux/string.h> -#include <linux/init.h> -#include <linux/bootmem.h> -#include <linux/proc_fs.h> -#include <linux/seq_file.h> -#include <linux/module.h> -#include <linux/initrd.h> - -#include <asm/bootinfo.h> -#include <asm/sections.h> -#include <asm/setup.h> -#include <asm/fpu.h> -#include <asm/irq.h> -#include <asm/io.h> -#include <asm/machdep.h> -#ifdef CONFIG_AMIGA -#include <asm/amigahw.h> -#endif -#ifdef CONFIG_ATARI -#include <asm/atarihw.h> -#include <asm/atari_stram.h> -#endif -#ifdef CONFIG_SUN3X -#include <asm/dvma.h> -#endif - -#if !FPSTATESIZE || !NR_IRQS -#warning No CPU/platform type selected, your kernel will not work! -#warning Are you building an allnoconfig kernel? -#endif - -unsigned long m68k_machtype; -EXPORT_SYMBOL(m68k_machtype); -unsigned long m68k_cputype; -EXPORT_SYMBOL(m68k_cputype); -unsigned long m68k_fputype; -unsigned long m68k_mmutype; -EXPORT_SYMBOL(m68k_mmutype); -#ifdef CONFIG_VME -unsigned long vme_brdtype; -EXPORT_SYMBOL(vme_brdtype); -#endif - -int m68k_is040or060; -EXPORT_SYMBOL(m68k_is040or060); - -extern unsigned long availmem; - -int m68k_num_memory; -EXPORT_SYMBOL(m68k_num_memory); -int m68k_realnum_memory; -EXPORT_SYMBOL(m68k_realnum_memory); -unsigned long m68k_memoffset; -struct mem_info m68k_memory[NUM_MEMINFO]; -EXPORT_SYMBOL(m68k_memory); - -struct mem_info m68k_ramdisk; - -static char m68k_command_line[CL_SIZE]; - -void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; -/* machine dependent irq functions */ -void (*mach_init_IRQ) (void) __initdata = NULL; -void (*mach_get_model) (char *model); -void (*mach_get_hardware_list) (struct seq_file *m); -/* machine dependent timer functions */ -unsigned long (*mach_gettimeoffset) (void); -int (*mach_hwclk) (int, struct rtc_time*); -EXPORT_SYMBOL(mach_hwclk); -int (*mach_set_clock_mmss) (unsigned long); -unsigned int (*mach_get_ss)(void); -int (*mach_get_rtc_pll)(struct rtc_pll_info *); -int (*mach_set_rtc_pll)(struct rtc_pll_info *); -EXPORT_SYMBOL(mach_get_ss); -EXPORT_SYMBOL(mach_get_rtc_pll); -EXPORT_SYMBOL(mach_set_rtc_pll); -void (*mach_reset)( void ); -void (*mach_halt)( void ); -void (*mach_power_off)( void ); -long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ -#ifdef CONFIG_HEARTBEAT -void (*mach_heartbeat) (int); -EXPORT_SYMBOL(mach_heartbeat); -#endif -#ifdef CONFIG_M68K_L2_CACHE -void (*mach_l2_flush) (int); -#endif -#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) -void (*mach_beep)(unsigned int, unsigned int); -EXPORT_SYMBOL(mach_beep); -#endif -#if defined(CONFIG_ISA) && defined(MULTI_ISA) -int isa_type; -int isa_sex; -EXPORT_SYMBOL(isa_type); -EXPORT_SYMBOL(isa_sex); -#endif - -extern int amiga_parse_bootinfo(const struct bi_record *); -extern int atari_parse_bootinfo(const struct bi_record *); -extern int mac_parse_bootinfo(const struct bi_record *); -extern int q40_parse_bootinfo(const struct bi_record *); -extern int bvme6000_parse_bootinfo(const struct bi_record *); -extern int mvme16x_parse_bootinfo(const struct bi_record *); -extern int mvme147_parse_bootinfo(const struct bi_record *); -extern int hp300_parse_bootinfo(const struct bi_record *); -extern int apollo_parse_bootinfo(const struct bi_record *); - -extern void config_amiga(void); -extern void config_atari(void); -extern void config_mac(void); -extern void config_sun3(void); -extern void config_apollo(void); -extern void config_mvme147(void); -extern void config_mvme16x(void); -extern void config_bvme6000(void); -extern void config_hp300(void); -extern void config_q40(void); -extern void config_sun3x(void); - -#define MASK_256K 0xfffc0000 - -extern void paging_init(void); - -static void __init m68k_parse_bootinfo(const struct bi_record *record) -{ -	while (record->tag != BI_LAST) { -		int unknown = 0; -		const unsigned long *data = record->data; - -		switch (record->tag) { -		case BI_MACHTYPE: -		case BI_CPUTYPE: -		case BI_FPUTYPE: -		case BI_MMUTYPE: -			/* Already set up by head.S */ -			break; - -		case BI_MEMCHUNK: -			if (m68k_num_memory < NUM_MEMINFO) { -				m68k_memory[m68k_num_memory].addr = data[0]; -				m68k_memory[m68k_num_memory].size = data[1]; -				m68k_num_memory++; -			} else -				printk("m68k_parse_bootinfo: too many memory chunks\n"); -			break; - -		case BI_RAMDISK: -			m68k_ramdisk.addr = data[0]; -			m68k_ramdisk.size = data[1]; -			break; - -		case BI_COMMAND_LINE: -			strlcpy(m68k_command_line, (const char *)data, -				sizeof(m68k_command_line)); -			break; - -		default: -			if (MACH_IS_AMIGA) -				unknown = amiga_parse_bootinfo(record); -			else if (MACH_IS_ATARI) -				unknown = atari_parse_bootinfo(record); -			else if (MACH_IS_MAC) -				unknown = mac_parse_bootinfo(record); -			else if (MACH_IS_Q40) -				unknown = q40_parse_bootinfo(record); -			else if (MACH_IS_BVME6000) -				unknown = bvme6000_parse_bootinfo(record); -			else if (MACH_IS_MVME16x) -				unknown = mvme16x_parse_bootinfo(record); -			else if (MACH_IS_MVME147) -				unknown = mvme147_parse_bootinfo(record); -			else if (MACH_IS_HP300) -				unknown = hp300_parse_bootinfo(record); -			else if (MACH_IS_APOLLO) -				unknown = apollo_parse_bootinfo(record); -			else -				unknown = 1; -		} -		if (unknown) -			printk("m68k_parse_bootinfo: unknown tag 0x%04x ignored\n", -			       record->tag); -		record = (struct bi_record *)((unsigned long)record + -					      record->size); -	} - -	m68k_realnum_memory = m68k_num_memory; -#ifdef CONFIG_SINGLE_MEMORY_CHUNK -	if (m68k_num_memory > 1) { -		printk("Ignoring last %i chunks of physical memory\n", -		       (m68k_num_memory - 1)); -		m68k_num_memory = 1; -	} -#endif -} - -void __init setup_arch(char **cmdline_p) -{ -	int i; - -	/* The bootinfo is located right after the kernel bss */ -	m68k_parse_bootinfo((const struct bi_record *)_end); - -	if (CPU_IS_040) -		m68k_is040or060 = 4; -	else if (CPU_IS_060) -		m68k_is040or060 = 6; - -	/* FIXME: m68k_fputype is passed in by Penguin booter, which can -	 * be confused by software FPU emulation. BEWARE. -	 * We should really do our own FPU check at startup. -	 * [what do we do with buggy 68LC040s? if we have problems -	 *  with them, we should add a test to check_bugs() below] */ -#ifndef CONFIG_M68KFPU_EMU_ONLY -	/* clear the fpu if we have one */ -	if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060)) { -		volatile int zero = 0; -		asm volatile ("frestore %0" : : "m" (zero)); -	} -#endif - -	if (CPU_IS_060) { -		u32 pcr; - -		asm (".chip 68060; movec %%pcr,%0; .chip 68k" -		     : "=d" (pcr)); -		if (((pcr >> 8) & 0xff) <= 5) { -			printk("Enabling workaround for errata I14\n"); -			asm (".chip 68060; movec %0,%%pcr; .chip 68k" -			     : : "d" (pcr | 0x20)); -		} -	} - -	init_mm.start_code = PAGE_OFFSET; -	init_mm.end_code = (unsigned long)_etext; -	init_mm.end_data = (unsigned long)_edata; -	init_mm.brk = (unsigned long)_end; - -	*cmdline_p = m68k_command_line; -	memcpy(boot_command_line, *cmdline_p, CL_SIZE); - -	parse_early_param(); - -#ifdef CONFIG_DUMMY_CONSOLE -	conswitchp = &dummy_con; -#endif - -	switch (m68k_machtype) { -#ifdef CONFIG_AMIGA -	case MACH_AMIGA: -		config_amiga(); -		break; -#endif -#ifdef CONFIG_ATARI -	case MACH_ATARI: -		config_atari(); -		break; -#endif -#ifdef CONFIG_MAC -	case MACH_MAC: -		config_mac(); -		break; -#endif -#ifdef CONFIG_SUN3 -	case MACH_SUN3: -		config_sun3(); -		break; -#endif -#ifdef CONFIG_APOLLO -	case MACH_APOLLO: -		config_apollo(); -		break; -#endif -#ifdef CONFIG_MVME147 -	case MACH_MVME147: -		config_mvme147(); -		break; -#endif -#ifdef CONFIG_MVME16x -	case MACH_MVME16x: -		config_mvme16x(); -		break; -#endif -#ifdef CONFIG_BVME6000 -	case MACH_BVME6000: -		config_bvme6000(); -		break; -#endif -#ifdef CONFIG_HP300 -	case MACH_HP300: -		config_hp300(); -		break; -#endif -#ifdef CONFIG_Q40 -	case MACH_Q40: -		config_q40(); -		break; -#endif -#ifdef CONFIG_SUN3X -	case MACH_SUN3X: -		config_sun3x(); -		break; -#endif -	default: -		panic("No configuration setup"); -	} - -	paging_init(); - -#ifndef CONFIG_SUN3 -	for (i = 1; i < m68k_num_memory; i++) -		free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr, -				  m68k_memory[i].size); -#ifdef CONFIG_BLK_DEV_INITRD -	if (m68k_ramdisk.size) { -		reserve_bootmem_node(__virt_to_node(phys_to_virt(m68k_ramdisk.addr)), -				     m68k_ramdisk.addr, m68k_ramdisk.size, -				     BOOTMEM_DEFAULT); -		initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr); -		initrd_end = initrd_start + m68k_ramdisk.size; -		printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end); -	} -#endif - -#ifdef CONFIG_ATARI -	if (MACH_IS_ATARI) -		atari_stram_reserve_pages((void *)availmem); -#endif -#ifdef CONFIG_SUN3X -	if (MACH_IS_SUN3X) { -		dvma_init(); -	} -#endif - -#endif /* !CONFIG_SUN3 */ - -/* set ISA defs early as possible */ -#if defined(CONFIG_ISA) && defined(MULTI_ISA) -	if (MACH_IS_Q40) { -		isa_type = ISA_TYPE_Q40; -		isa_sex = 0; -	} -#ifdef CONFIG_AMIGA_PCMCIA -	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) { -		isa_type = ISA_TYPE_AG; -		isa_sex = 1; -	} -#endif -#endif -} - -static int show_cpuinfo(struct seq_file *m, void *v) -{ -	const char *cpu, *mmu, *fpu; -	unsigned long clockfreq, clockfactor; - -#define LOOP_CYCLES_68020	(8) -#define LOOP_CYCLES_68030	(8) -#define LOOP_CYCLES_68040	(3) -#define LOOP_CYCLES_68060	(1) - -	if (CPU_IS_020) { -		cpu = "68020"; -		clockfactor = LOOP_CYCLES_68020; -	} else if (CPU_IS_030) { -		cpu = "68030"; -		clockfactor = LOOP_CYCLES_68030; -	} else if (CPU_IS_040) { -		cpu = "68040"; -		clockfactor = LOOP_CYCLES_68040; -	} else if (CPU_IS_060) { -		cpu = "68060"; -		clockfactor = LOOP_CYCLES_68060; -	} else { -		cpu = "680x0"; -		clockfactor = 0; -	} - -#ifdef CONFIG_M68KFPU_EMU_ONLY -	fpu = "none(soft float)"; +#ifdef CONFIG_MMU +#include "setup_mm.c"  #else -	if (m68k_fputype & FPU_68881) -		fpu = "68881"; -	else if (m68k_fputype & FPU_68882) -		fpu = "68882"; -	else if (m68k_fputype & FPU_68040) -		fpu = "68040"; -	else if (m68k_fputype & FPU_68060) -		fpu = "68060"; -	else if (m68k_fputype & FPU_SUNFPA) -		fpu = "Sun FPA"; -	else -		fpu = "none"; -#endif - -	if (m68k_mmutype & MMU_68851) -		mmu = "68851"; -	else if (m68k_mmutype & MMU_68030) -		mmu = "68030"; -	else if (m68k_mmutype & MMU_68040) -		mmu = "68040"; -	else if (m68k_mmutype & MMU_68060) -		mmu = "68060"; -	else if (m68k_mmutype & MMU_SUN3) -		mmu = "Sun-3"; -	else if (m68k_mmutype & MMU_APOLLO) -		mmu = "Apollo"; -	else -		mmu = "unknown"; - -	clockfreq = loops_per_jiffy * HZ * clockfactor; - -	seq_printf(m, "CPU:\t\t%s\n" -		   "MMU:\t\t%s\n" -		   "FPU:\t\t%s\n" -		   "Clocking:\t%lu.%1luMHz\n" -		   "BogoMips:\t%lu.%02lu\n" -		   "Calibration:\t%lu loops\n", -		   cpu, mmu, fpu, -		   clockfreq/1000000,(clockfreq/100000)%10, -		   loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100, -		   loops_per_jiffy); -	return 0; -} - -static void *c_start(struct seq_file *m, loff_t *pos) -{ -	return *pos < 1 ? (void *)1 : NULL; -} -static void *c_next(struct seq_file *m, void *v, loff_t *pos) -{ -	++*pos; -	return NULL; -} -static void c_stop(struct seq_file *m, void *v) -{ -} -const struct seq_operations cpuinfo_op = { -	.start	= c_start, -	.next	= c_next, -	.stop	= c_stop, -	.show	= show_cpuinfo, -}; - -#ifdef CONFIG_PROC_HARDWARE -static int hardware_proc_show(struct seq_file *m, void *v) -{ -	char model[80]; -	unsigned long mem; -	int i; - -	if (mach_get_model) -		mach_get_model(model); -	else -		strcpy(model, "Unknown m68k"); - -	seq_printf(m, "Model:\t\t%s\n", model); -	for (mem = 0, i = 0; i < m68k_num_memory; i++) -		mem += m68k_memory[i].size; -	seq_printf(m, "System Memory:\t%ldK\n", mem >> 10); - -	if (mach_get_hardware_list) -		mach_get_hardware_list(m); - -	return 0; -} - -static int hardware_proc_open(struct inode *inode, struct file *file) -{ -	return single_open(file, hardware_proc_show, NULL); -} - -static const struct file_operations hardware_proc_fops = { -	.open		= hardware_proc_open, -	.read		= seq_read, -	.llseek		= seq_lseek, -	.release	= single_release, -}; - -static int __init proc_hardware_init(void) -{ -	proc_create("hardware", 0, NULL, &hardware_proc_fops); -	return 0; -} -module_init(proc_hardware_init); +#include "setup_no.c"  #endif - -void check_bugs(void) -{ -#ifndef CONFIG_M68KFPU_EMU -	if (m68k_fputype == 0) { -		printk(KERN_EMERG "*** YOU DO NOT HAVE A FLOATING POINT UNIT, " -			"WHICH IS REQUIRED BY LINUX/M68K ***\n"); -		printk(KERN_EMERG "Upgrade your hardware or join the FPU " -			"emulation project\n"); -		panic("no FPU"); -	} -#endif /* !CONFIG_M68KFPU_EMU */ -} - -#ifdef CONFIG_ADB -static int __init adb_probe_sync_enable (char *str) { -	extern int __adb_probe_sync; -	__adb_probe_sync = 1; -	return 1; -} - -__setup("adb_sync", adb_probe_sync_enable); -#endif /* CONFIG_ADB */ diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c new file mode 100644 index 00000000000..5b8ec4d5f8e --- /dev/null +++ b/arch/m68k/kernel/setup_mm.c @@ -0,0 +1,570 @@ +/* + *  linux/arch/m68k/kernel/setup.c + * + *  Copyright (C) 1995  Hamish Macdonald + */ + +/* + * This file handles the architecture-dependent parts of system setup + */ + +#include <linux/kernel.h> +#include <linux/mm.h> +#include <linux/sched.h> +#include <linux/delay.h> +#include <linux/interrupt.h> +#include <linux/fs.h> +#include <linux/console.h> +#include <linux/genhd.h> +#include <linux/errno.h> +#include <linux/string.h> +#include <linux/init.h> +#include <linux/bootmem.h> +#include <linux/proc_fs.h> +#include <linux/seq_file.h> +#include <linux/module.h> +#include <linux/initrd.h> + +#include <asm/bootinfo.h> +#include <asm/byteorder.h> +#include <asm/sections.h> +#include <asm/setup.h> +#include <asm/fpu.h> +#include <asm/irq.h> +#include <asm/io.h> +#include <asm/machdep.h> +#ifdef CONFIG_AMIGA +#include <asm/amigahw.h> +#endif +#ifdef CONFIG_ATARI +#include <asm/atarihw.h> +#include <asm/atari_stram.h> +#endif +#ifdef CONFIG_SUN3X +#include <asm/dvma.h> +#endif +#include <asm/natfeat.h> + +#if !FPSTATESIZE || !NR_IRQS +#warning No CPU/platform type selected, your kernel will not work! +#warning Are you building an allnoconfig kernel? +#endif + +unsigned long m68k_machtype; +EXPORT_SYMBOL(m68k_machtype); +unsigned long m68k_cputype; +EXPORT_SYMBOL(m68k_cputype); +unsigned long m68k_fputype; +unsigned long m68k_mmutype; +EXPORT_SYMBOL(m68k_mmutype); +#ifdef CONFIG_VME +unsigned long vme_brdtype; +EXPORT_SYMBOL(vme_brdtype); +#endif + +int m68k_is040or060; +EXPORT_SYMBOL(m68k_is040or060); + +extern unsigned long availmem; + +int m68k_num_memory; +EXPORT_SYMBOL(m68k_num_memory); +int m68k_realnum_memory; +EXPORT_SYMBOL(m68k_realnum_memory); +unsigned long m68k_memoffset; +struct m68k_mem_info m68k_memory[NUM_MEMINFO]; +EXPORT_SYMBOL(m68k_memory); + +static struct m68k_mem_info m68k_ramdisk __initdata; + +static char m68k_command_line[CL_SIZE] __initdata; + +void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; +/* machine dependent irq functions */ +void (*mach_init_IRQ) (void) __initdata = NULL; +void (*mach_get_model) (char *model); +void (*mach_get_hardware_list) (struct seq_file *m); +/* machine dependent timer functions */ +int (*mach_hwclk) (int, struct rtc_time*); +EXPORT_SYMBOL(mach_hwclk); +int (*mach_set_clock_mmss) (unsigned long); +unsigned int (*mach_get_ss)(void); +int (*mach_get_rtc_pll)(struct rtc_pll_info *); +int (*mach_set_rtc_pll)(struct rtc_pll_info *); +EXPORT_SYMBOL(mach_get_ss); +EXPORT_SYMBOL(mach_get_rtc_pll); +EXPORT_SYMBOL(mach_set_rtc_pll); +void (*mach_reset)( void ); +void (*mach_halt)( void ); +void (*mach_power_off)( void ); +long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */ +#ifdef CONFIG_HEARTBEAT +void (*mach_heartbeat) (int); +EXPORT_SYMBOL(mach_heartbeat); +#endif +#ifdef CONFIG_M68K_L2_CACHE +void (*mach_l2_flush) (int); +#endif +#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) +void (*mach_beep)(unsigned int, unsigned int); +EXPORT_SYMBOL(mach_beep); +#endif +#if defined(CONFIG_ISA) && defined(MULTI_ISA) +int isa_type; +int isa_sex; +EXPORT_SYMBOL(isa_type); +EXPORT_SYMBOL(isa_sex); +#endif + +extern int amiga_parse_bootinfo(const struct bi_record *); +extern int atari_parse_bootinfo(const struct bi_record *); +extern int mac_parse_bootinfo(const struct bi_record *); +extern int q40_parse_bootinfo(const struct bi_record *); +extern int bvme6000_parse_bootinfo(const struct bi_record *); +extern int mvme16x_parse_bootinfo(const struct bi_record *); +extern int mvme147_parse_bootinfo(const struct bi_record *); +extern int hp300_parse_bootinfo(const struct bi_record *); +extern int apollo_parse_bootinfo(const struct bi_record *); + +extern void config_amiga(void); +extern void config_atari(void); +extern void config_mac(void); +extern void config_sun3(void); +extern void config_apollo(void); +extern void config_mvme147(void); +extern void config_mvme16x(void); +extern void config_bvme6000(void); +extern void config_hp300(void); +extern void config_q40(void); +extern void config_sun3x(void); + +#define MASK_256K 0xfffc0000 + +extern void paging_init(void); + +static void __init m68k_parse_bootinfo(const struct bi_record *record) +{ +	uint16_t tag; + +	save_bootinfo(record); + +	while ((tag = be16_to_cpu(record->tag)) != BI_LAST) { +		int unknown = 0; +		const void *data = record->data; +		uint16_t size = be16_to_cpu(record->size); + +		switch (tag) { +		case BI_MACHTYPE: +		case BI_CPUTYPE: +		case BI_FPUTYPE: +		case BI_MMUTYPE: +			/* Already set up by head.S */ +			break; + +		case BI_MEMCHUNK: +			if (m68k_num_memory < NUM_MEMINFO) { +				const struct mem_info *m = data; +				m68k_memory[m68k_num_memory].addr = +					be32_to_cpu(m->addr); +				m68k_memory[m68k_num_memory].size = +					be32_to_cpu(m->size); +				m68k_num_memory++; +			} else +				pr_warn("%s: too many memory chunks\n", +					__func__); +			break; + +		case BI_RAMDISK: +			{ +				const struct mem_info *m = data; +				m68k_ramdisk.addr = be32_to_cpu(m->addr); +				m68k_ramdisk.size = be32_to_cpu(m->size); +			} +			break; + +		case BI_COMMAND_LINE: +			strlcpy(m68k_command_line, data, +				sizeof(m68k_command_line)); +			break; + +		default: +			if (MACH_IS_AMIGA) +				unknown = amiga_parse_bootinfo(record); +			else if (MACH_IS_ATARI) +				unknown = atari_parse_bootinfo(record); +			else if (MACH_IS_MAC) +				unknown = mac_parse_bootinfo(record); +			else if (MACH_IS_Q40) +				unknown = q40_parse_bootinfo(record); +			else if (MACH_IS_BVME6000) +				unknown = bvme6000_parse_bootinfo(record); +			else if (MACH_IS_MVME16x) +				unknown = mvme16x_parse_bootinfo(record); +			else if (MACH_IS_MVME147) +				unknown = mvme147_parse_bootinfo(record); +			else if (MACH_IS_HP300) +				unknown = hp300_parse_bootinfo(record); +			else if (MACH_IS_APOLLO) +				unknown = apollo_parse_bootinfo(record); +			else +				unknown = 1; +		} +		if (unknown) +			pr_warn("%s: unknown tag 0x%04x ignored\n", __func__, +				tag); +		record = (struct bi_record *)((unsigned long)record + size); +	} + +	m68k_realnum_memory = m68k_num_memory; +#ifdef CONFIG_SINGLE_MEMORY_CHUNK +	if (m68k_num_memory > 1) { +		pr_warn("%s: ignoring last %i chunks of physical memory\n", +			__func__, (m68k_num_memory - 1)); +		m68k_num_memory = 1; +	} +#endif +} + +void __init setup_arch(char **cmdline_p) +{ +#ifndef CONFIG_SUN3 +	int i; +#endif + +	/* The bootinfo is located right after the kernel */ +	if (!CPU_IS_COLDFIRE) +		m68k_parse_bootinfo((const struct bi_record *)_end); + +	if (CPU_IS_040) +		m68k_is040or060 = 4; +	else if (CPU_IS_060) +		m68k_is040or060 = 6; + +	/* FIXME: m68k_fputype is passed in by Penguin booter, which can +	 * be confused by software FPU emulation. BEWARE. +	 * We should really do our own FPU check at startup. +	 * [what do we do with buggy 68LC040s? if we have problems +	 *  with them, we should add a test to check_bugs() below] */ +#ifndef CONFIG_M68KFPU_EMU_ONLY +	/* clear the fpu if we have one */ +	if (m68k_fputype & (FPU_68881|FPU_68882|FPU_68040|FPU_68060|FPU_COLDFIRE)) { +		volatile int zero = 0; +		asm volatile ("frestore %0" : : "m" (zero)); +	} +#endif + +	if (CPU_IS_060) { +		u32 pcr; + +		asm (".chip 68060; movec %%pcr,%0; .chip 68k" +		     : "=d" (pcr)); +		if (((pcr >> 8) & 0xff) <= 5) { +			pr_warn("Enabling workaround for errata I14\n"); +			asm (".chip 68060; movec %0,%%pcr; .chip 68k" +			     : : "d" (pcr | 0x20)); +		} +	} + +	init_mm.start_code = PAGE_OFFSET; +	init_mm.end_code = (unsigned long)_etext; +	init_mm.end_data = (unsigned long)_edata; +	init_mm.brk = (unsigned long)_end; + +#if defined(CONFIG_BOOTPARAM) +	strncpy(m68k_command_line, CONFIG_BOOTPARAM_STRING, CL_SIZE); +	m68k_command_line[CL_SIZE - 1] = 0; +#endif /* CONFIG_BOOTPARAM */ +	*cmdline_p = m68k_command_line; +	memcpy(boot_command_line, *cmdline_p, CL_SIZE); + +	parse_early_param(); + +#ifdef CONFIG_DUMMY_CONSOLE +	conswitchp = &dummy_con; +#endif + +	switch (m68k_machtype) { +#ifdef CONFIG_AMIGA +	case MACH_AMIGA: +		config_amiga(); +		break; +#endif +#ifdef CONFIG_ATARI +	case MACH_ATARI: +		config_atari(); +		break; +#endif +#ifdef CONFIG_MAC +	case MACH_MAC: +		config_mac(); +		break; +#endif +#ifdef CONFIG_SUN3 +	case MACH_SUN3: +		config_sun3(); +		break; +#endif +#ifdef CONFIG_APOLLO +	case MACH_APOLLO: +		config_apollo(); +		break; +#endif +#ifdef CONFIG_MVME147 +	case MACH_MVME147: +		config_mvme147(); +		break; +#endif +#ifdef CONFIG_MVME16x +	case MACH_MVME16x: +		config_mvme16x(); +		break; +#endif +#ifdef CONFIG_BVME6000 +	case MACH_BVME6000: +		config_bvme6000(); +		break; +#endif +#ifdef CONFIG_HP300 +	case MACH_HP300: +		config_hp300(); +		break; +#endif +#ifdef CONFIG_Q40 +	case MACH_Q40: +		config_q40(); +		break; +#endif +#ifdef CONFIG_SUN3X +	case MACH_SUN3X: +		config_sun3x(); +		break; +#endif +#ifdef CONFIG_COLDFIRE +	case MACH_M54XX: +		config_BSP(NULL, 0); +		break; +#endif +	default: +		panic("No configuration setup"); +	} + +	paging_init(); + +#ifdef CONFIG_NATFEAT +	nf_init(); +#endif + +#ifndef CONFIG_SUN3 +	for (i = 1; i < m68k_num_memory; i++) +		free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr, +				  m68k_memory[i].size); +#ifdef CONFIG_BLK_DEV_INITRD +	if (m68k_ramdisk.size) { +		reserve_bootmem_node(__virt_to_node(phys_to_virt(m68k_ramdisk.addr)), +				     m68k_ramdisk.addr, m68k_ramdisk.size, +				     BOOTMEM_DEFAULT); +		initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr); +		initrd_end = initrd_start + m68k_ramdisk.size; +		pr_info("initrd: %08lx - %08lx\n", initrd_start, initrd_end); +	} +#endif + +#ifdef CONFIG_ATARI +	if (MACH_IS_ATARI) +		atari_stram_reserve_pages((void *)availmem); +#endif +#ifdef CONFIG_SUN3X +	if (MACH_IS_SUN3X) { +		dvma_init(); +	} +#endif + +#endif /* !CONFIG_SUN3 */ + +/* set ISA defs early as possible */ +#if defined(CONFIG_ISA) && defined(MULTI_ISA) +	if (MACH_IS_Q40) { +		isa_type = ISA_TYPE_Q40; +		isa_sex = 0; +	} +#ifdef CONFIG_AMIGA_PCMCIA +	if (MACH_IS_AMIGA && AMIGAHW_PRESENT(PCMCIA)) { +		isa_type = ISA_TYPE_AG; +		isa_sex = 1; +	} +#endif +#ifdef CONFIG_ATARI_ROM_ISA +	if (MACH_IS_ATARI) { +		isa_type = ISA_TYPE_ENEC; +		isa_sex = 0; +	} +#endif +#endif +} + +static int show_cpuinfo(struct seq_file *m, void *v) +{ +	const char *cpu, *mmu, *fpu; +	unsigned long clockfreq, clockfactor; + +#define LOOP_CYCLES_68020	(8) +#define LOOP_CYCLES_68030	(8) +#define LOOP_CYCLES_68040	(3) +#define LOOP_CYCLES_68060	(1) +#define LOOP_CYCLES_COLDFIRE	(2) + +	if (CPU_IS_020) { +		cpu = "68020"; +		clockfactor = LOOP_CYCLES_68020; +	} else if (CPU_IS_030) { +		cpu = "68030"; +		clockfactor = LOOP_CYCLES_68030; +	} else if (CPU_IS_040) { +		cpu = "68040"; +		clockfactor = LOOP_CYCLES_68040; +	} else if (CPU_IS_060) { +		cpu = "68060"; +		clockfactor = LOOP_CYCLES_68060; +	} else if (CPU_IS_COLDFIRE) { +		cpu = "ColdFire"; +		clockfactor = LOOP_CYCLES_COLDFIRE; +	} else { +		cpu = "680x0"; +		clockfactor = 0; +	} + +#ifdef CONFIG_M68KFPU_EMU_ONLY +	fpu = "none(soft float)"; +#else +	if (m68k_fputype & FPU_68881) +		fpu = "68881"; +	else if (m68k_fputype & FPU_68882) +		fpu = "68882"; +	else if (m68k_fputype & FPU_68040) +		fpu = "68040"; +	else if (m68k_fputype & FPU_68060) +		fpu = "68060"; +	else if (m68k_fputype & FPU_SUNFPA) +		fpu = "Sun FPA"; +	else if (m68k_fputype & FPU_COLDFIRE) +		fpu = "ColdFire"; +	else +		fpu = "none"; +#endif + +	if (m68k_mmutype & MMU_68851) +		mmu = "68851"; +	else if (m68k_mmutype & MMU_68030) +		mmu = "68030"; +	else if (m68k_mmutype & MMU_68040) +		mmu = "68040"; +	else if (m68k_mmutype & MMU_68060) +		mmu = "68060"; +	else if (m68k_mmutype & MMU_SUN3) +		mmu = "Sun-3"; +	else if (m68k_mmutype & MMU_APOLLO) +		mmu = "Apollo"; +	else if (m68k_mmutype & MMU_COLDFIRE) +		mmu = "ColdFire"; +	else +		mmu = "unknown"; + +	clockfreq = loops_per_jiffy * HZ * clockfactor; + +	seq_printf(m, "CPU:\t\t%s\n" +		   "MMU:\t\t%s\n" +		   "FPU:\t\t%s\n" +		   "Clocking:\t%lu.%1luMHz\n" +		   "BogoMips:\t%lu.%02lu\n" +		   "Calibration:\t%lu loops\n", +		   cpu, mmu, fpu, +		   clockfreq/1000000,(clockfreq/100000)%10, +		   loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100, +		   loops_per_jiffy); +	return 0; +} + +static void *c_start(struct seq_file *m, loff_t *pos) +{ +	return *pos < 1 ? (void *)1 : NULL; +} +static void *c_next(struct seq_file *m, void *v, loff_t *pos) +{ +	++*pos; +	return NULL; +} +static void c_stop(struct seq_file *m, void *v) +{ +} +const struct seq_operations cpuinfo_op = { +	.start	= c_start, +	.next	= c_next, +	.stop	= c_stop, +	.show	= show_cpuinfo, +}; + +#ifdef CONFIG_PROC_HARDWARE +static int hardware_proc_show(struct seq_file *m, void *v) +{ +	char model[80]; +	unsigned long mem; +	int i; + +	if (mach_get_model) +		mach_get_model(model); +	else +		strcpy(model, "Unknown m68k"); + +	seq_printf(m, "Model:\t\t%s\n", model); +	for (mem = 0, i = 0; i < m68k_num_memory; i++) +		mem += m68k_memory[i].size; +	seq_printf(m, "System Memory:\t%ldK\n", mem >> 10); + +	if (mach_get_hardware_list) +		mach_get_hardware_list(m); + +	return 0; +} + +static int hardware_proc_open(struct inode *inode, struct file *file) +{ +	return single_open(file, hardware_proc_show, NULL); +} + +static const struct file_operations hardware_proc_fops = { +	.open		= hardware_proc_open, +	.read		= seq_read, +	.llseek		= seq_lseek, +	.release	= single_release, +}; + +static int __init proc_hardware_init(void) +{ +	proc_create("hardware", 0, NULL, &hardware_proc_fops); +	return 0; +} +module_init(proc_hardware_init); +#endif + +void check_bugs(void) +{ +#ifndef CONFIG_M68KFPU_EMU +	if (m68k_fputype == 0) { +		pr_emerg("*** YOU DO NOT HAVE A FLOATING POINT UNIT, " +			"WHICH IS REQUIRED BY LINUX/M68K ***\n"); +		pr_emerg("Upgrade your hardware or join the FPU " +			"emulation project\n"); +		panic("no FPU"); +	} +#endif /* !CONFIG_M68KFPU_EMU */ +} + +#ifdef CONFIG_ADB +static int __init adb_probe_sync_enable (char *str) { +	extern int __adb_probe_sync; +	__adb_probe_sync = 1; +	return 1; +} + +__setup("adb_sync", adb_probe_sync_enable); +#endif /* CONFIG_ADB */ diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c new file mode 100644 index 00000000000..88c27d94a72 --- /dev/null +++ b/arch/m68k/kernel/setup_no.c @@ -0,0 +1,316 @@ +/* + *  linux/arch/m68knommu/kernel/setup.c + * + *  Copyright (C) 1999-2007  Greg Ungerer (gerg@snapgear.com) + *  Copyright (C) 1998,1999  D. Jeff Dionne <jeff@uClinux.org> + *  Copyleft  ()) 2000       James D. Schettine {james@telos-systems.com} + *  Copyright (C) 1998       Kenneth Albanowski <kjahds@kjahds.com> + *  Copyright (C) 1995       Hamish Macdonald + *  Copyright (C) 2000       Lineo Inc. (www.lineo.com) + *  Copyright (C) 2001 	     Lineo, Inc. <www.lineo.com> + * + *  68VZ328 Fixes/support    Evan Stawnyczy <e@lineo.ca> + */ + +/* + * This file handles the architecture-dependent parts of system setup + */ + +#include <linux/kernel.h> +#include <linux/sched.h> +#include <linux/delay.h> +#include <linux/interrupt.h> +#include <linux/fb.h> +#include <linux/module.h> +#include <linux/mm.h> +#include <linux/console.h> +#include <linux/errno.h> +#include <linux/string.h> +#include <linux/bootmem.h> +#include <linux/seq_file.h> +#include <linux/init.h> +#include <linux/initrd.h> +#include <linux/root_dev.h> +#include <linux/rtc.h> + +#include <asm/setup.h> +#include <asm/irq.h> +#include <asm/machdep.h> +#include <asm/pgtable.h> +#include <asm/sections.h> + +unsigned long memory_start; +unsigned long memory_end; + +EXPORT_SYMBOL(memory_start); +EXPORT_SYMBOL(memory_end); + +char __initdata command_line[COMMAND_LINE_SIZE]; + +/* machine dependent timer functions */ +void (*mach_sched_init)(irq_handler_t handler) __initdata = NULL; +int (*mach_set_clock_mmss)(unsigned long); +int (*mach_hwclk) (int, struct rtc_time*); + +/* machine dependent reboot functions */ +void (*mach_reset)(void); +void (*mach_halt)(void); +void (*mach_power_off)(void); + +#ifdef CONFIG_M68000 +#if defined(CONFIG_M68328) +#define CPU_NAME	"MC68328" +#elif defined(CONFIG_M68EZ328) +#define CPU_NAME	"MC68EZ328" +#elif defined(CONFIG_M68VZ328) +#define CPU_NAME	"MC68VZ328" +#else +#define CPU_NAME	"MC68000" +#endif +#endif /* CONFIG_M68000 */ +#ifdef CONFIG_M68360 +#define CPU_NAME	"MC68360" +#endif +#ifndef CPU_NAME +#define	CPU_NAME	"UNKNOWN" +#endif + +/* + * Different cores have different instruction execution timings. + * The old/traditional 68000 cores are basically all the same, at 16. + * The ColdFire cores vary a little, their values are defined in their + * headers. We default to the standard 68000 value here. + */ +#ifndef CPU_INSTR_PER_JIFFY +#define	CPU_INSTR_PER_JIFFY	16 +#endif + +#if defined(CONFIG_UBOOT) +/* + * parse_uboot_commandline + * + * Copies u-boot commandline arguments and store them in the proper linux + * variables. + * + * Assumes: + *	_init_sp global contains the address in the stack pointer when the + *	kernel starts (see head.S::_start) + * + *	U-Boot calling convention: + *	(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end); + * + *	_init_sp can be parsed as such + * + *	_init_sp+00 = u-boot cmd after jsr into kernel (skip) + *	_init_sp+04 = &kernel board_info (residual data) + *	_init_sp+08 = &initrd_start + *	_init_sp+12 = &initrd_end + *	_init_sp+16 = &cmd_start + *	_init_sp+20 = &cmd_end + * + *	This also assumes that the memory locations pointed to are still + *	unmodified. U-boot places them near the end of external SDRAM. + * + * Argument(s): + *	commandp = the linux commandline arg container to fill. + *	size     = the sizeof commandp. + * + * Returns: + */ +static void __init parse_uboot_commandline(char *commandp, int size) +{ +	extern unsigned long _init_sp; +	unsigned long *sp; +	unsigned long uboot_kbd; +	unsigned long uboot_initrd_start, uboot_initrd_end; +	unsigned long uboot_cmd_start, uboot_cmd_end; + + +	sp = (unsigned long *)_init_sp; +	uboot_kbd = sp[1]; +	uboot_initrd_start = sp[2]; +	uboot_initrd_end = sp[3]; +	uboot_cmd_start = sp[4]; +	uboot_cmd_end = sp[5]; + +	if (uboot_cmd_start && uboot_cmd_end) +		strncpy(commandp, (const char *)uboot_cmd_start, size); +#if defined(CONFIG_BLK_DEV_INITRD) +	if (uboot_initrd_start && uboot_initrd_end && +		(uboot_initrd_end > uboot_initrd_start)) { +		initrd_start = uboot_initrd_start; +		initrd_end = uboot_initrd_end; +		ROOT_DEV = Root_RAM0; +		printk(KERN_INFO "initrd at 0x%lx:0x%lx\n", +			initrd_start, initrd_end); +	} +#endif /* if defined(CONFIG_BLK_DEV_INITRD) */ +} +#endif /* #if defined(CONFIG_UBOOT) */ + +void __init setup_arch(char **cmdline_p) +{ +	int bootmap_size; + +	memory_start = PAGE_ALIGN(_ramstart); +	memory_end = _ramend; + +	init_mm.start_code = (unsigned long) &_stext; +	init_mm.end_code = (unsigned long) &_etext; +	init_mm.end_data = (unsigned long) &_edata; +	init_mm.brk = (unsigned long) 0; + +	config_BSP(&command_line[0], sizeof(command_line)); + +#if defined(CONFIG_BOOTPARAM) +	strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line)); +	command_line[sizeof(command_line) - 1] = 0; +#endif /* CONFIG_BOOTPARAM */ + +#if defined(CONFIG_UBOOT) +	/* CONFIG_UBOOT and CONFIG_BOOTPARAM defined, concatenate cmdline */ +	#if defined(CONFIG_BOOTPARAM) +		/* Add the whitespace separator */ +		command_line[strlen(CONFIG_BOOTPARAM_STRING)] = ' '; +		/* Parse uboot command line into the rest of the buffer */ +		parse_uboot_commandline( +			&command_line[(strlen(CONFIG_BOOTPARAM_STRING)+1)], +			(sizeof(command_line) - +			(strlen(CONFIG_BOOTPARAM_STRING)+1))); +	/* Only CONFIG_UBOOT defined, create cmdline */ +	#else +		parse_uboot_commandline(&command_line[0], sizeof(command_line)); +	#endif /* CONFIG_BOOTPARAM */ +	command_line[sizeof(command_line) - 1] = 0; +#endif /* CONFIG_UBOOT */ + +	printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n"); + +#ifdef CONFIG_UCDIMM +	printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); +#endif +#ifdef CONFIG_M68VZ328 +	printk(KERN_INFO "M68VZ328 support by Evan Stawnyczy <e@lineo.ca>\n"); +#endif +#ifdef CONFIG_COLDFIRE +	printk(KERN_INFO "COLDFIRE port done by Greg Ungerer, gerg@snapgear.com\n"); +#ifdef CONFIG_M5307 +	printk(KERN_INFO "Modified for M5307 by Dave Miller, dmiller@intellistor.com\n"); +#endif +#ifdef CONFIG_ELITE +	printk(KERN_INFO "Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n"); +#endif +#endif +	printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n"); + +#if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ) +	printk(KERN_INFO "TRG SuperPilot FLASH card support <info@trgnet.com>\n"); +#endif +#if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 ) +	printk(KERN_INFO "PalmV support by Lineo Inc. <jeff@uclinux.com>\n"); +#endif +#if defined (CONFIG_M68360) +	printk(KERN_INFO "QUICC port done by SED Systems <hamilton@sedsystems.ca>,\n"); +	printk(KERN_INFO "based on 2.0.38 port by Lineo Inc. <mleslie@lineo.com>.\n"); +#endif +#ifdef CONFIG_DRAGEN2 +	printk(KERN_INFO "DragonEngine II board support by Georges Menie\n"); +#endif +#ifdef CONFIG_M5235EVB +	printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n"); +#endif + +	pr_debug("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n", +		 _stext, _etext, _sdata, _edata, __bss_start, __bss_stop); +	pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ", +		 __bss_stop, memory_start, memory_start, memory_end); + +	/* Keep a copy of command line */ +	*cmdline_p = &command_line[0]; +	memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); +	boot_command_line[COMMAND_LINE_SIZE-1] = 0; + +#if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) +	conswitchp = &dummy_con; +#endif + +	/* +	 * Give all the memory to the bootmap allocator, tell it to put the +	 * boot mem_map at the start of memory. +	 */ +	bootmap_size = init_bootmem_node( +			NODE_DATA(0), +			memory_start >> PAGE_SHIFT, /* map goes here */ +			PAGE_OFFSET >> PAGE_SHIFT,	/* 0 on coldfire */ +			memory_end >> PAGE_SHIFT); +	/* +	 * Free the usable memory, we have to make sure we do not free +	 * the bootmem bitmap so we then reserve it after freeing it :-) +	 */ +	free_bootmem(memory_start, memory_end - memory_start); +	reserve_bootmem(memory_start, bootmap_size, BOOTMEM_DEFAULT); + +#if defined(CONFIG_UBOOT) && defined(CONFIG_BLK_DEV_INITRD) +	if ((initrd_start > 0) && (initrd_start < initrd_end) && +			(initrd_end < memory_end)) +		reserve_bootmem(initrd_start, initrd_end - initrd_start, +				 BOOTMEM_DEFAULT); +#endif /* if defined(CONFIG_BLK_DEV_INITRD) */ + +	/* +	 * Get kmalloc into gear. +	 */ +	paging_init(); +} + +/* + *	Get CPU information for use by the procfs. + */ +static int show_cpuinfo(struct seq_file *m, void *v) +{ +	char *cpu, *mmu, *fpu; +	u_long clockfreq; + +	cpu = CPU_NAME; +	mmu = "none"; +	fpu = "none"; +	clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY; + +	seq_printf(m, "CPU:\t\t%s\n" +		      "MMU:\t\t%s\n" +		      "FPU:\t\t%s\n" +		      "Clocking:\t%lu.%1luMHz\n" +		      "BogoMips:\t%lu.%02lu\n" +		      "Calibration:\t%lu loops\n", +		      cpu, mmu, fpu, +		      clockfreq / 1000000, +		      (clockfreq / 100000) % 10, +		      (loops_per_jiffy * HZ) / 500000, +		      ((loops_per_jiffy * HZ) / 5000) % 100, +		      (loops_per_jiffy * HZ)); + +	return 0; +} + +static void *c_start(struct seq_file *m, loff_t *pos) +{ +	return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL; +} + +static void *c_next(struct seq_file *m, void *v, loff_t *pos) +{ +	++*pos; +	return c_start(m, pos); +} + +static void c_stop(struct seq_file *m, void *v) +{ +} + +const struct seq_operations cpuinfo_op = { +	.start	= c_start, +	.next	= c_next, +	.stop	= c_stop, +	.show	= show_cpuinfo, +}; + diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 4b387538706..57fd286e4b0 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -42,22 +42,34 @@  #include <linux/personality.h>  #include <linux/tty.h>  #include <linux/binfmts.h> +#include <linux/module.h> +#include <linux/tracehook.h>  #include <asm/setup.h>  #include <asm/uaccess.h>  #include <asm/pgtable.h>  #include <asm/traps.h>  #include <asm/ucontext.h> +#include <asm/cacheflush.h> -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) +#ifdef CONFIG_MMU -asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs); +/* + * Handle the slight differences in classic 68k and ColdFire trap frames. + */ +#ifdef CONFIG_COLDFIRE +#define	FORMAT		4 +#define	FMT4SIZE	0 +#else +#define	FORMAT		0 +#define	FMT4SIZE	sizeof(((struct frame *)0)->un.fmt4) +#endif -const int frame_extra_sizes[16] = { +static const int frame_size_change[16] = {    [1]	= -1, /* sizeof(((struct frame *)0)->un.fmt1), */    [2]	= sizeof(((struct frame *)0)->un.fmt2),    [3]	= sizeof(((struct frame *)0)->un.fmt3), -  [4]	= sizeof(((struct frame *)0)->un.fmt4), +  [4]	= FMT4SIZE,    [5]	= -1, /* sizeof(((struct frame *)0)->un.fmt5), */    [6]	= -1, /* sizeof(((struct frame *)0)->un.fmt6), */    [7]	= sizeof(((struct frame *)0)->un.fmt7), @@ -71,94 +83,154 @@ const int frame_extra_sizes[16] = {    [15]	= -1, /* sizeof(((struct frame *)0)->un.fmtf), */  }; -/* - * Atomically swap in the new signal mask, and wait for a signal. - */ -asmlinkage int do_sigsuspend(struct pt_regs *regs) +static inline int frame_extra_sizes(int f)  { -	old_sigset_t mask = regs->d3; -	sigset_t saveset; - -	mask &= _BLOCKABLE; -	saveset = current->blocked; -	siginitset(¤t->blocked, mask); -	recalc_sigpending(); - -	regs->d0 = -EINTR; -	while (1) { -		current->state = TASK_INTERRUPTIBLE; -		schedule(); -		if (do_signal(&saveset, regs)) -			return -EINTR; -	} +	return frame_size_change[f];  } -asmlinkage int -do_rt_sigsuspend(struct pt_regs *regs) +int handle_kernel_fault(struct pt_regs *regs)  { -	sigset_t __user *unewset = (sigset_t __user *)regs->d1; -	size_t sigsetsize = (size_t)regs->d2; -	sigset_t saveset, newset; - -	/* XXX: Don't preclude handling different sized sigset_t's.  */ -	if (sigsetsize != sizeof(sigset_t)) -		return -EINVAL; - -	if (copy_from_user(&newset, unewset, sizeof(newset))) -		return -EFAULT; -	sigdelsetmask(&newset, ~_BLOCKABLE); - -	saveset = current->blocked; -	current->blocked = newset; -	recalc_sigpending(); - -	regs->d0 = -EINTR; -	while (1) { -		current->state = TASK_INTERRUPTIBLE; -		schedule(); -		if (do_signal(&saveset, regs)) -			return -EINTR; -	} +	const struct exception_table_entry *fixup; +	struct pt_regs *tregs; + +	/* Are we prepared to handle this kernel fault? */ +	fixup = search_exception_tables(regs->pc); +	if (!fixup) +		return 0; + +	/* Create a new four word stack frame, discarding the old one. */ +	regs->stkadj = frame_extra_sizes(regs->format); +	tregs =	(struct pt_regs *)((long)regs + regs->stkadj); +	tregs->vector = regs->vector; +	tregs->format = FORMAT; +	tregs->pc = fixup->fixup; +	tregs->sr = regs->sr; + +	return 1;  } -asmlinkage int -sys_sigaction(int sig, const struct old_sigaction __user *act, -	      struct old_sigaction __user *oact) +void ptrace_signal_deliver(void)  { -	struct k_sigaction new_ka, old_ka; -	int ret; - -	if (act) { -		old_sigset_t mask; -		if (!access_ok(VERIFY_READ, act, sizeof(*act)) || -		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) || -		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) -			return -EFAULT; -		__get_user(new_ka.sa.sa_flags, &act->sa_flags); -		__get_user(mask, &act->sa_mask); -		siginitset(&new_ka.sa.sa_mask, mask); +	struct pt_regs *regs = signal_pt_regs(); +	if (regs->orig_d0 < 0) +		return; +	switch (regs->d0) { +	case -ERESTARTNOHAND: +	case -ERESTARTSYS: +	case -ERESTARTNOINTR: +		regs->d0 = regs->orig_d0; +		regs->orig_d0 = -1; +		regs->pc -= 2; +		break;  	} +} -	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); +static inline void push_cache (unsigned long vaddr) +{ +	/* +	 * Using the old cache_push_v() was really a big waste. +	 * +	 * What we are trying to do is to flush 8 bytes to ram. +	 * Flushing 2 cache lines of 16 bytes is much cheaper than +	 * flushing 1 or 2 pages, as previously done in +	 * cache_push_v(). +	 *                                                     Jes +	 */ +	if (CPU_IS_040) { +		unsigned long temp; + +		__asm__ __volatile__ (".chip 68040\n\t" +				      "nop\n\t" +				      "ptestr (%1)\n\t" +				      "movec %%mmusr,%0\n\t" +				      ".chip 68k" +				      : "=r" (temp) +				      : "a" (vaddr)); + +		temp &= PAGE_MASK; +		temp |= vaddr & ~PAGE_MASK; -	if (!ret && oact) { -		if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || -		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || -		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) -			return -EFAULT; -		__put_user(old_ka.sa.sa_flags, &oact->sa_flags); -		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); +		__asm__ __volatile__ (".chip 68040\n\t" +				      "nop\n\t" +				      "cpushl %%bc,(%0)\n\t" +				      ".chip 68k" +				      : : "a" (temp)); +	} +	else if (CPU_IS_060) { +		unsigned long temp; +		__asm__ __volatile__ (".chip 68060\n\t" +				      "plpar (%0)\n\t" +				      ".chip 68k" +				      : "=a" (temp) +				      : "0" (vaddr)); +		__asm__ __volatile__ (".chip 68060\n\t" +				      "cpushl %%bc,(%0)\n\t" +				      ".chip 68k" +				      : : "a" (temp)); +	} else if (!CPU_IS_COLDFIRE) { +		/* +		 * 68030/68020 have no writeback cache; +		 * still need to clear icache. +		 * Note that vaddr is guaranteed to be long word aligned. +		 */ +		unsigned long temp; +		asm volatile ("movec %%cacr,%0" : "=r" (temp)); +		temp += 4; +		asm volatile ("movec %0,%%caar\n\t" +			      "movec %1,%%cacr" +			      : : "r" (vaddr), "r" (temp)); +		asm volatile ("movec %0,%%caar\n\t" +			      "movec %1,%%cacr" +			      : : "r" (vaddr + 4), "r" (temp)); +	} else { +		/* CPU_IS_COLDFIRE */ +#if defined(CONFIG_CACHE_COPYBACK) +		flush_cf_dcache(0, DCACHE_MAX_ADDR); +#endif +		/* Invalidate instruction cache for the pushed bytes */ +		clear_cf_icache(vaddr, vaddr + 8);  	} +} -	return ret; +static inline void adjustformat(struct pt_regs *regs) +{  } -asmlinkage int -sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) +static inline void save_a5_state(struct sigcontext *sc, struct pt_regs *regs)  { -	return do_sigaltstack(uss, uoss, rdusp());  } +#else /* CONFIG_MMU */ + +void ret_from_user_signal(void); +void ret_from_user_rt_signal(void); + +static inline int frame_extra_sizes(int f) +{ +	/* No frame size adjustments required on non-MMU CPUs */ +	return 0; +} + +static inline void adjustformat(struct pt_regs *regs) +{ +	((struct switch_stack *)regs - 1)->a5 = current->mm->start_data; +	/* +	 * set format byte to make stack appear modulo 4, which it will +	 * be when doing the rte +	 */ +	regs->format = 0x4; +} + +static inline void save_a5_state(struct sigcontext *sc, struct pt_regs *regs) +{ +	sc->sc_a5 = ((struct switch_stack *)regs - 1)->a5; +} + +static inline void push_cache(unsigned long vaddr) +{ +} + +#endif /* CONFIG_MMU */  /*   * Do a signal return; undo the signal stack. @@ -189,6 +261,12 @@ struct rt_sigframe  	struct ucontext uc;  }; +#define FPCONTEXT_SIZE	216 +#define uc_fpstate	uc_filler[0] +#define uc_formatvec	uc_filler[FPCONTEXT_SIZE/4] +#define uc_extra	uc_filler[FPCONTEXT_SIZE/4+1] + +#ifdef CONFIG_FPU  static unsigned char fpu_version;	/* version number of fpu, set by setup_frame */ @@ -205,7 +283,8 @@ static inline int restore_fpu_state(struct sigcontext *sc)  	if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) {  	    /* Verify the frame format.  */ -	    if (!CPU_IS_060 && (sc->sc_fpstate[0] != fpu_version)) +	    if (!(CPU_IS_060 || CPU_IS_COLDFIRE) && +		 (sc->sc_fpstate[0] != fpu_version))  		goto out;  	    if (CPU_IS_020_OR_030) {  		if (m68k_fputype & FPU_68881 && @@ -224,34 +303,53 @@ static inline int restore_fpu_state(struct sigcontext *sc)                        sc->sc_fpstate[3] == 0x60 ||  		      sc->sc_fpstate[3] == 0xe0))  		    goto out; +	    } else if (CPU_IS_COLDFIRE) { +		if (!(sc->sc_fpstate[0] == 0x00 || +		      sc->sc_fpstate[0] == 0x05 || +		      sc->sc_fpstate[0] == 0xe5)) +		    goto out;  	    } else  		goto out; -	    __asm__ volatile (".chip 68k/68881\n\t" -			      "fmovemx %0,%%fp0-%%fp1\n\t" -			      "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t" -			      ".chip 68k" -			      : /* no outputs */ -			      : "m" (*sc->sc_fpregs), "m" (*sc->sc_fpcntl)); +	    if (CPU_IS_COLDFIRE) { +		__asm__ volatile ("fmovemd %0,%%fp0-%%fp1\n\t" +				  "fmovel %1,%%fpcr\n\t" +				  "fmovel %2,%%fpsr\n\t" +				  "fmovel %3,%%fpiar" +				  : /* no outputs */ +				  : "m" (sc->sc_fpregs[0]), +				    "m" (sc->sc_fpcntl[0]), +				    "m" (sc->sc_fpcntl[1]), +				    "m" (sc->sc_fpcntl[2])); +	    } else { +		__asm__ volatile (".chip 68k/68881\n\t" +				  "fmovemx %0,%%fp0-%%fp1\n\t" +				  "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t" +				  ".chip 68k" +				  : /* no outputs */ +				  : "m" (*sc->sc_fpregs), +				    "m" (*sc->sc_fpcntl)); +	    } +	} + +	if (CPU_IS_COLDFIRE) { +		__asm__ volatile ("frestore %0" : : "m" (*sc->sc_fpstate)); +	} else { +		__asm__ volatile (".chip 68k/68881\n\t" +				  "frestore %0\n\t" +				  ".chip 68k" +				  : : "m" (*sc->sc_fpstate));  	} -	__asm__ volatile (".chip 68k/68881\n\t" -			  "frestore %0\n\t" -			  ".chip 68k" : : "m" (*sc->sc_fpstate));  	err = 0;  out:  	return err;  } -#define FPCONTEXT_SIZE	216 -#define uc_fpstate	uc_filler[0] -#define uc_formatvec	uc_filler[FPCONTEXT_SIZE/4] -#define uc_extra	uc_filler[FPCONTEXT_SIZE/4+1] -  static inline int rt_restore_fpu_state(struct ucontext __user *uc)  {  	unsigned char fpstate[FPCONTEXT_SIZE]; -	int context_size = CPU_IS_060 ? 8 : 0; +	int context_size = CPU_IS_060 ? 8 : (CPU_IS_COLDFIRE ? 12 : 0);  	fpregset_t fpregs;  	int err = 1; @@ -270,10 +368,11 @@ static inline int rt_restore_fpu_state(struct ucontext __user *uc)  	if (__get_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate))  		goto out;  	if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { -		if (!CPU_IS_060) +		if (!(CPU_IS_060 || CPU_IS_COLDFIRE))  			context_size = fpstate[1];  		/* Verify the frame format.  */ -		if (!CPU_IS_060 && (fpstate[0] != fpu_version)) +		if (!(CPU_IS_060 || CPU_IS_COLDFIRE) && +		     (fpstate[0] != fpu_version))  			goto out;  		if (CPU_IS_020_OR_030) {  			if (m68k_fputype & FPU_68881 && @@ -292,62 +391,210 @@ static inline int rt_restore_fpu_state(struct ucontext __user *uc)  			      fpstate[3] == 0x60 ||  			      fpstate[3] == 0xe0))  				goto out; +		} else if (CPU_IS_COLDFIRE) { +			if (!(fpstate[3] == 0x00 || +			      fpstate[3] == 0x05 || +			      fpstate[3] == 0xe5)) +				goto out;  		} else  			goto out;  		if (__copy_from_user(&fpregs, &uc->uc_mcontext.fpregs,  				     sizeof(fpregs)))  			goto out; -		__asm__ volatile (".chip 68k/68881\n\t" -				  "fmovemx %0,%%fp0-%%fp7\n\t" -				  "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t" -				  ".chip 68k" -				  : /* no outputs */ -				  : "m" (*fpregs.f_fpregs), -				    "m" (*fpregs.f_fpcntl)); + +		if (CPU_IS_COLDFIRE) { +			__asm__ volatile ("fmovemd %0,%%fp0-%%fp7\n\t" +					  "fmovel %1,%%fpcr\n\t" +					  "fmovel %2,%%fpsr\n\t" +					  "fmovel %3,%%fpiar" +					  : /* no outputs */ +					  : "m" (fpregs.f_fpregs[0]), +					    "m" (fpregs.f_fpcntl[0]), +					    "m" (fpregs.f_fpcntl[1]), +					    "m" (fpregs.f_fpcntl[2])); +		} else { +			__asm__ volatile (".chip 68k/68881\n\t" +					  "fmovemx %0,%%fp0-%%fp7\n\t" +					  "fmoveml %1,%%fpcr/%%fpsr/%%fpiar\n\t" +					  ".chip 68k" +					  : /* no outputs */ +					  : "m" (*fpregs.f_fpregs), +					    "m" (*fpregs.f_fpcntl)); +		}  	}  	if (context_size &&  	    __copy_from_user(fpstate + 4, (long __user *)&uc->uc_fpstate + 1,  			     context_size))  		goto out; -	__asm__ volatile (".chip 68k/68881\n\t" -			  "frestore %0\n\t" -			  ".chip 68k" : : "m" (*fpstate)); + +	if (CPU_IS_COLDFIRE) { +		__asm__ volatile ("frestore %0" : : "m" (*fpstate)); +	} else { +		__asm__ volatile (".chip 68k/68881\n\t" +				  "frestore %0\n\t" +				  ".chip 68k" +				  : : "m" (*fpstate)); +	}  	err = 0;  out:  	return err;  } -static inline int -restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __user *fp, -		   int *pd0) +/* + * Set up a signal frame. + */ +static inline void save_fpu_state(struct sigcontext *sc, struct pt_regs *regs)  { -	int fsize, formatvec; -	struct sigcontext context; -	int err; +	if (FPU_IS_EMU) { +		/* save registers */ +		memcpy(sc->sc_fpcntl, current->thread.fpcntl, 12); +		memcpy(sc->sc_fpregs, current->thread.fp, 24); +		return; +	} -	/* Always make any pending restarted system calls return -EINTR */ -	current_thread_info()->restart_block.fn = do_no_restart_syscall; +	if (CPU_IS_COLDFIRE) { +		__asm__ volatile ("fsave %0" +				  : : "m" (*sc->sc_fpstate) : "memory"); +	} else { +		__asm__ volatile (".chip 68k/68881\n\t" +				  "fsave %0\n\t" +				  ".chip 68k" +				  : : "m" (*sc->sc_fpstate) : "memory"); +	} -	/* get previous context */ -	if (copy_from_user(&context, usc, sizeof(context))) -		goto badframe; +	if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) { +		fpu_version = sc->sc_fpstate[0]; +		if (CPU_IS_020_OR_030 && +		    regs->vector >= (VEC_FPBRUC * 4) && +		    regs->vector <= (VEC_FPNAN * 4)) { +			/* Clear pending exception in 68882 idle frame */ +			if (*(unsigned short *) sc->sc_fpstate == 0x1f38) +				sc->sc_fpstate[0x38] |= 1 << 3; +		} -	/* restore passed registers */ -	regs->d1 = context.sc_d1; -	regs->a0 = context.sc_a0; -	regs->a1 = context.sc_a1; -	regs->sr = (regs->sr & 0xff00) | (context.sc_sr & 0xff); -	regs->pc = context.sc_pc; -	regs->orig_d0 = -1;		/* disable syscall checks */ -	wrusp(context.sc_usp); -	formatvec = context.sc_formatvec; -	regs->format = formatvec >> 12; -	regs->vector = formatvec & 0xfff; +		if (CPU_IS_COLDFIRE) { +			__asm__ volatile ("fmovemd %%fp0-%%fp1,%0\n\t" +					  "fmovel %%fpcr,%1\n\t" +					  "fmovel %%fpsr,%2\n\t" +					  "fmovel %%fpiar,%3" +					  : "=m" (sc->sc_fpregs[0]), +					    "=m" (sc->sc_fpcntl[0]), +					    "=m" (sc->sc_fpcntl[1]), +					    "=m" (sc->sc_fpcntl[2]) +					  : /* no inputs */ +					  : "memory"); +		} else { +			__asm__ volatile (".chip 68k/68881\n\t" +					  "fmovemx %%fp0-%%fp1,%0\n\t" +					  "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t" +					  ".chip 68k" +					  : "=m" (*sc->sc_fpregs), +					    "=m" (*sc->sc_fpcntl) +					  : /* no inputs */ +					  : "memory"); +		} +	} +} -	err = restore_fpu_state(&context); +static inline int rt_save_fpu_state(struct ucontext __user *uc, struct pt_regs *regs) +{ +	unsigned char fpstate[FPCONTEXT_SIZE]; +	int context_size = CPU_IS_060 ? 8 : (CPU_IS_COLDFIRE ? 12 : 0); +	int err = 0; + +	if (FPU_IS_EMU) { +		/* save fpu control register */ +		err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpcntl, +				current->thread.fpcntl, 12); +		/* save all other fpu register */ +		err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpregs, +				current->thread.fp, 96); +		return err; +	} + +	if (CPU_IS_COLDFIRE) { +		__asm__ volatile ("fsave %0" : : "m" (*fpstate) : "memory"); +	} else { +		__asm__ volatile (".chip 68k/68881\n\t" +				  "fsave %0\n\t" +				  ".chip 68k" +				  : : "m" (*fpstate) : "memory"); +	} + +	err |= __put_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate); +	if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { +		fpregset_t fpregs; +		if (!(CPU_IS_060 || CPU_IS_COLDFIRE)) +			context_size = fpstate[1]; +		fpu_version = fpstate[0]; +		if (CPU_IS_020_OR_030 && +		    regs->vector >= (VEC_FPBRUC * 4) && +		    regs->vector <= (VEC_FPNAN * 4)) { +			/* Clear pending exception in 68882 idle frame */ +			if (*(unsigned short *) fpstate == 0x1f38) +				fpstate[0x38] |= 1 << 3; +		} +		if (CPU_IS_COLDFIRE) { +			__asm__ volatile ("fmovemd %%fp0-%%fp7,%0\n\t" +					  "fmovel %%fpcr,%1\n\t" +					  "fmovel %%fpsr,%2\n\t" +					  "fmovel %%fpiar,%3" +					  : "=m" (fpregs.f_fpregs[0]), +					    "=m" (fpregs.f_fpcntl[0]), +					    "=m" (fpregs.f_fpcntl[1]), +					    "=m" (fpregs.f_fpcntl[2]) +					  : /* no inputs */ +					  : "memory"); +		} else { +			__asm__ volatile (".chip 68k/68881\n\t" +					  "fmovemx %%fp0-%%fp7,%0\n\t" +					  "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t" +					  ".chip 68k" +					  : "=m" (*fpregs.f_fpregs), +					    "=m" (*fpregs.f_fpcntl) +					  : /* no inputs */ +					  : "memory"); +		} +		err |= copy_to_user(&uc->uc_mcontext.fpregs, &fpregs, +				    sizeof(fpregs)); +	} +	if (context_size) +		err |= copy_to_user((long __user *)&uc->uc_fpstate + 1, fpstate + 4, +				    context_size); +	return err; +} -	fsize = frame_extra_sizes[regs->format]; +#else /* CONFIG_FPU */ + +/* + * For the case with no FPU configured these all do nothing. + */ +static inline int restore_fpu_state(struct sigcontext *sc) +{ +	return 0; +} + +static inline int rt_restore_fpu_state(struct ucontext __user *uc) +{ +	return 0; +} + +static inline void save_fpu_state(struct sigcontext *sc, struct pt_regs *regs) +{ +} + +static inline int rt_save_fpu_state(struct ucontext __user *uc, struct pt_regs *regs) +{ +	return 0; +} + +#endif /* CONFIG_FPU */ + +static int mangle_kernel_stack(struct pt_regs *regs, int formatvec, +			       void __user *fp) +{ +	int fsize = frame_extra_sizes(formatvec >> 12);  	if (fsize < 0) {  		/*  		 * user process trying to return with weird frame format @@ -355,19 +602,29 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u  #ifdef DEBUG  		printk("user process returning with weird frame format\n");  #endif -		goto badframe; +		return 1;  	} +	if (!fsize) { +		regs->format = formatvec >> 12; +		regs->vector = formatvec & 0xfff; +	} else { +		struct switch_stack *sw = (struct switch_stack *)regs - 1; +		unsigned long buf[fsize / 2]; /* yes, twice as much */ -	/* OK.	Make room on the supervisor stack for the extra junk, -	 * if necessary. -	 */ +		/* that'll make sure that expansion won't crap over data */ +		if (copy_from_user(buf + fsize / 4, fp, fsize)) +			return 1; -	if (fsize) { -		struct switch_stack *sw = (struct switch_stack *)regs - 1; -		regs->d0 = context.sc_d0; +		/* point of no return */ +		regs->format = formatvec >> 12; +		regs->vector = formatvec & 0xfff;  #define frame_offset (sizeof(struct pt_regs)+sizeof(struct switch_stack)) -		__asm__ __volatile__ -			("   movel %0,%/a0\n\t" +		__asm__ __volatile__ ( +#ifdef CONFIG_COLDFIRE +			 "   movel %0,%/sp\n\t" +			 "   bra ret_from_signal\n" +#else +			 "   movel %0,%/a0\n\t"  			 "   subl %1,%/a0\n\t"     /* make room on stack */  			 "   movel %/a0,%/sp\n\t"  /* set stack pointer */  			 /* move switch_stack and pt_regs */ @@ -376,30 +633,51 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u  			 "   lea %/sp@(%c3),%/a0\n\t" /* add offset of fmt */  			 "   lsrl  #2,%1\n\t"  			 "   subql #1,%1\n\t" -			 "2: movesl %4@+,%2\n\t" -			 "3: movel %2,%/a0@+\n\t" +			 /* copy to the gap we'd made */ +			 "2: movel %4@+,%/a0@+\n\t"  			 "   dbra %1,2b\n\t"  			 "   bral ret_from_signal\n" -			 "4:\n" -			 ".section __ex_table,\"a\"\n" -			 "   .align 4\n" -			 "   .long 2b,4b\n" -			 "   .long 3b,4b\n" -			 ".previous" +#endif  			 : /* no outputs, it doesn't ever return */  			 : "a" (sw), "d" (fsize), "d" (frame_offset/4-1), -			   "n" (frame_offset), "a" (fp) +			   "n" (frame_offset), "a" (buf + fsize/4)  			 : "a0");  #undef frame_offset -		/* -		 * If we ever get here an exception occurred while -		 * building the above stack-frame. -		 */ -		goto badframe;  	} +	return 0; +} -	*pd0 = context.sc_d0; -	return err; +static inline int +restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __user *fp) +{ +	int formatvec; +	struct sigcontext context; +	int err = 0; + +	/* Always make any pending restarted system calls return -EINTR */ +	current_thread_info()->restart_block.fn = do_no_restart_syscall; + +	/* get previous context */ +	if (copy_from_user(&context, usc, sizeof(context))) +		goto badframe; + +	/* restore passed registers */ +	regs->d0 = context.sc_d0; +	regs->d1 = context.sc_d1; +	regs->a0 = context.sc_a0; +	regs->a1 = context.sc_a1; +	regs->sr = (regs->sr & 0xff00) | (context.sc_sr & 0xff); +	regs->pc = context.sc_pc; +	regs->orig_d0 = -1;		/* disable syscall checks */ +	wrusp(context.sc_usp); +	formatvec = context.sc_formatvec; + +	err = restore_fpu_state(&context); + +	if (err || mangle_kernel_stack(regs, formatvec, fp)) +		goto badframe; + +	return 0;  badframe:  	return 1; @@ -407,9 +685,9 @@ badframe:  static inline int  rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, -		    struct ucontext __user *uc, int *pd0) +		    struct ucontext __user *uc)  { -	int fsize, temp; +	int temp;  	greg_t __user *gregs = uc->uc_mcontext.gregs;  	unsigned long usp;  	int err; @@ -443,65 +721,17 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,  	regs->sr = (regs->sr & 0xff00) | (temp & 0xff);  	regs->orig_d0 = -1;		/* disable syscall checks */  	err |= __get_user(temp, &uc->uc_formatvec); -	regs->format = temp >> 12; -	regs->vector = temp & 0xfff;  	err |= rt_restore_fpu_state(uc); +	err |= restore_altstack(&uc->uc_stack); -	if (do_sigaltstack(&uc->uc_stack, NULL, usp) == -EFAULT) -		goto badframe; - -	fsize = frame_extra_sizes[regs->format]; -	if (fsize < 0) { -		/* -		 * user process trying to return with weird frame format -		 */ -#ifdef DEBUG -		printk("user process returning with weird frame format\n"); -#endif +	if (err)  		goto badframe; -	} - -	/* OK.	Make room on the supervisor stack for the extra junk, -	 * if necessary. -	 */ -	if (fsize) { -#define frame_offset (sizeof(struct pt_regs)+sizeof(struct switch_stack)) -		__asm__ __volatile__ -			("   movel %0,%/a0\n\t" -			 "   subl %1,%/a0\n\t"     /* make room on stack */ -			 "   movel %/a0,%/sp\n\t"  /* set stack pointer */ -			 /* move switch_stack and pt_regs */ -			 "1: movel %0@+,%/a0@+\n\t" -			 "   dbra %2,1b\n\t" -			 "   lea %/sp@(%c3),%/a0\n\t" /* add offset of fmt */ -			 "   lsrl  #2,%1\n\t" -			 "   subql #1,%1\n\t" -			 "2: movesl %4@+,%2\n\t" -			 "3: movel %2,%/a0@+\n\t" -			 "   dbra %1,2b\n\t" -			 "   bral ret_from_signal\n" -			 "4:\n" -			 ".section __ex_table,\"a\"\n" -			 "   .align 4\n" -			 "   .long 2b,4b\n" -			 "   .long 3b,4b\n" -			 ".previous" -			 : /* no outputs, it doesn't ever return */ -			 : "a" (sw), "d" (fsize), "d" (frame_offset/4-1), -			   "n" (frame_offset), "a" (&uc->uc_extra) -			 : "a0"); -#undef frame_offset -		/* -		 * If we ever get here an exception occurred while -		 * building the above stack-frame. -		 */ +	if (mangle_kernel_stack(regs, temp, &uc->uc_extra))  		goto badframe; -	} -	*pd0 = regs->d0; -	return err; +	return 0;  badframe:  	return 1; @@ -514,7 +744,6 @@ asmlinkage int do_sigreturn(unsigned long __unused)  	unsigned long usp = rdusp();  	struct sigframe __user *frame = (struct sigframe __user *)(usp - 4);  	sigset_t set; -	int d0;  	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))  		goto badframe; @@ -524,13 +753,11 @@ asmlinkage int do_sigreturn(unsigned long __unused)  			      sizeof(frame->extramask))))  		goto badframe; -	sigdelsetmask(&set, ~_BLOCKABLE); -	current->blocked = set; -	recalc_sigpending(); +	set_current_blocked(&set); -	if (restore_sigcontext(regs, &frame->sc, frame + 1, &d0)) +	if (restore_sigcontext(regs, &frame->sc, frame + 1))  		goto badframe; -	return d0; +	return regs->d0;  badframe:  	force_sig(SIGSEGV, current); @@ -544,115 +771,23 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused)  	unsigned long usp = rdusp();  	struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(usp - 4);  	sigset_t set; -	int d0;  	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))  		goto badframe;  	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))  		goto badframe; -	sigdelsetmask(&set, ~_BLOCKABLE); -	current->blocked = set; -	recalc_sigpending(); +	set_current_blocked(&set); -	if (rt_restore_ucontext(regs, sw, &frame->uc, &d0)) +	if (rt_restore_ucontext(regs, sw, &frame->uc))  		goto badframe; -	return d0; +	return regs->d0;  badframe:  	force_sig(SIGSEGV, current);  	return 0;  } -/* - * Set up a signal frame. - */ - -static inline void save_fpu_state(struct sigcontext *sc, struct pt_regs *regs) -{ -	if (FPU_IS_EMU) { -		/* save registers */ -		memcpy(sc->sc_fpcntl, current->thread.fpcntl, 12); -		memcpy(sc->sc_fpregs, current->thread.fp, 24); -		return; -	} - -	__asm__ volatile (".chip 68k/68881\n\t" -			  "fsave %0\n\t" -			  ".chip 68k" -			  : : "m" (*sc->sc_fpstate) : "memory"); - -	if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) { -		fpu_version = sc->sc_fpstate[0]; -		if (CPU_IS_020_OR_030 && -		    regs->vector >= (VEC_FPBRUC * 4) && -		    regs->vector <= (VEC_FPNAN * 4)) { -			/* Clear pending exception in 68882 idle frame */ -			if (*(unsigned short *) sc->sc_fpstate == 0x1f38) -				sc->sc_fpstate[0x38] |= 1 << 3; -		} -		__asm__ volatile (".chip 68k/68881\n\t" -				  "fmovemx %%fp0-%%fp1,%0\n\t" -				  "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t" -				  ".chip 68k" -				  : "=m" (*sc->sc_fpregs), -				    "=m" (*sc->sc_fpcntl) -				  : /* no inputs */ -				  : "memory"); -	} -} - -static inline int rt_save_fpu_state(struct ucontext __user *uc, struct pt_regs *regs) -{ -	unsigned char fpstate[FPCONTEXT_SIZE]; -	int context_size = CPU_IS_060 ? 8 : 0; -	int err = 0; - -	if (FPU_IS_EMU) { -		/* save fpu control register */ -		err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpcntl, -				current->thread.fpcntl, 12); -		/* save all other fpu register */ -		err |= copy_to_user(uc->uc_mcontext.fpregs.f_fpregs, -				current->thread.fp, 96); -		return err; -	} - -	__asm__ volatile (".chip 68k/68881\n\t" -			  "fsave %0\n\t" -			  ".chip 68k" -			  : : "m" (*fpstate) : "memory"); - -	err |= __put_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate); -	if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { -		fpregset_t fpregs; -		if (!CPU_IS_060) -			context_size = fpstate[1]; -		fpu_version = fpstate[0]; -		if (CPU_IS_020_OR_030 && -		    regs->vector >= (VEC_FPBRUC * 4) && -		    regs->vector <= (VEC_FPNAN * 4)) { -			/* Clear pending exception in 68882 idle frame */ -			if (*(unsigned short *) fpstate == 0x1f38) -				fpstate[0x38] |= 1 << 3; -		} -		__asm__ volatile (".chip 68k/68881\n\t" -				  "fmovemx %%fp0-%%fp7,%0\n\t" -				  "fmoveml %%fpcr/%%fpsr/%%fpiar,%1\n\t" -				  ".chip 68k" -				  : "=m" (*fpregs.f_fpregs), -				    "=m" (*fpregs.f_fpcntl) -				  : /* no inputs */ -				  : "memory"); -		err |= copy_to_user(&uc->uc_mcontext.fpregs, &fpregs, -				    sizeof(fpregs)); -	} -	if (context_size) -		err |= copy_to_user((long __user *)&uc->uc_fpstate + 1, fpstate + 4, -				    context_size); -	return err; -} -  static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,  			     unsigned long mask)  { @@ -665,6 +800,7 @@ static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,  	sc->sc_sr = regs->sr;  	sc->sc_pc = regs->pc;  	sc->sc_formatvec = regs->format << 12 | regs->vector; +	save_a5_state(sc, regs);  	save_fpu_state(sc, regs);  } @@ -698,67 +834,6 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *  	return err;  } -static inline void push_cache (unsigned long vaddr) -{ -	/* -	 * Using the old cache_push_v() was really a big waste. -	 * -	 * What we are trying to do is to flush 8 bytes to ram. -	 * Flushing 2 cache lines of 16 bytes is much cheaper than -	 * flushing 1 or 2 pages, as previously done in -	 * cache_push_v(). -	 *                                                     Jes -	 */ -	if (CPU_IS_040) { -		unsigned long temp; - -		__asm__ __volatile__ (".chip 68040\n\t" -				      "nop\n\t" -				      "ptestr (%1)\n\t" -				      "movec %%mmusr,%0\n\t" -				      ".chip 68k" -				      : "=r" (temp) -				      : "a" (vaddr)); - -		temp &= PAGE_MASK; -		temp |= vaddr & ~PAGE_MASK; - -		__asm__ __volatile__ (".chip 68040\n\t" -				      "nop\n\t" -				      "cpushl %%bc,(%0)\n\t" -				      ".chip 68k" -				      : : "a" (temp)); -	} -	else if (CPU_IS_060) { -		unsigned long temp; -		__asm__ __volatile__ (".chip 68060\n\t" -				      "plpar (%0)\n\t" -				      ".chip 68k" -				      : "=a" (temp) -				      : "0" (vaddr)); -		__asm__ __volatile__ (".chip 68060\n\t" -				      "cpushl %%bc,(%0)\n\t" -				      ".chip 68k" -				      : : "a" (temp)); -	} -	else { -		/* -		 * 68030/68020 have no writeback cache; -		 * still need to clear icache. -		 * Note that vaddr is guaranteed to be long word aligned. -		 */ -		unsigned long temp; -		asm volatile ("movec %%cacr,%0" : "=r" (temp)); -		temp += 4; -		asm volatile ("movec %0,%%caar\n\t" -			      "movec %1,%%cacr" -			      : : "r" (vaddr), "r" (temp)); -		asm volatile ("movec %0,%%caar\n\t" -			      "movec %1,%%cacr" -			      : : "r" (vaddr + 4), "r" (temp)); -	} -} -  static inline void __user *  get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)  { @@ -775,11 +850,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)  	return (void __user *)((usp - frame_size) & -8UL);  } -static void setup_frame (int sig, struct k_sigaction *ka, +static int setup_frame (int sig, struct k_sigaction *ka,  			 sigset_t *set, struct pt_regs *regs)  {  	struct sigframe __user *frame; -	int fsize = frame_extra_sizes[regs->format]; +	int fsize = frame_extra_sizes(regs->format);  	struct sigcontext context;  	int err = 0; @@ -793,10 +868,8 @@ static void setup_frame (int sig, struct k_sigaction *ka,  	frame = get_sigframe(ka, regs, sizeof(*frame) + fsize); -	if (fsize) { +	if (fsize)  		err |= copy_to_user (frame + 1, regs + 1, fsize); -		regs->stkadj = fsize; -	}  	err |= __put_user((current_thread_info()->exec_domain  			   && current_thread_info()->exec_domain->signal_invmap @@ -816,21 +889,36 @@ static void setup_frame (int sig, struct k_sigaction *ka,  	err |= copy_to_user (&frame->sc, &context, sizeof(context));  	/* Set up to return from userspace.  */ +#ifdef CONFIG_MMU  	err |= __put_user(frame->retcode, &frame->pretcode);  	/* moveq #,d0; trap #0 */  	err |= __put_user(0x70004e40 + (__NR_sigreturn << 16),  			  (long __user *)(frame->retcode)); +#else +	err |= __put_user((void *) ret_from_user_signal, &frame->pretcode); +#endif  	if (err)  		goto give_sigsegv;  	push_cache ((unsigned long) &frame->retcode); -	/* Set up registers for signal handler */ +	/* +	 * Set up registers for signal handler.  All the state we are about +	 * to destroy is successfully copied to sigframe. +	 */  	wrusp ((unsigned long) frame);  	regs->pc = (unsigned long) ka->sa.sa_handler; +	adjustformat(regs); + +	/* +	 * This is subtle; if we build more than one sigframe, all but the +	 * first one will see frame format 0 and have fsize == 0, so we won't +	 * screw stkadj. +	 */ +	if (fsize) +		regs->stkadj = fsize; -adjust_stack:  	/* Prepare to skip over the extra stuff in the exception frame.  */  	if (regs->stkadj) {  		struct pt_regs *tregs = @@ -845,18 +933,18 @@ adjust_stack:  		tregs->pc = regs->pc;  		tregs->sr = regs->sr;  	} -	return; +	return 0;  give_sigsegv:  	force_sigsegv(sig, current); -	goto adjust_stack; +	return err;  } -static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, +static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,  			    sigset_t *set, struct pt_regs *regs)  {  	struct rt_sigframe __user *frame; -	int fsize = frame_extra_sizes[regs->format]; +	int fsize = frame_extra_sizes(regs->format);  	int err = 0;  	if (fsize < 0) { @@ -869,10 +957,8 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,  	frame = get_sigframe(ka, regs, sizeof(*frame)); -	if (fsize) { +	if (fsize)  		err |= copy_to_user (&frame->uc.uc_extra, regs + 1, fsize); -		regs->stkadj = fsize; -	}  	err |= __put_user((current_thread_info()->exec_domain  			   && current_thread_info()->exec_domain->signal_invmap @@ -887,15 +973,12 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,  	/* Create the ucontext.  */  	err |= __put_user(0, &frame->uc.uc_flags);  	err |= __put_user(NULL, &frame->uc.uc_link); -	err |= __put_user((void __user *)current->sas_ss_sp, -			  &frame->uc.uc_stack.ss_sp); -	err |= __put_user(sas_ss_flags(rdusp()), -			  &frame->uc.uc_stack.ss_flags); -	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); +	err |= __save_altstack(&frame->uc.uc_stack, rdusp());  	err |= rt_setup_ucontext(&frame->uc, regs);  	err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set));  	/* Set up to return from userspace.  */ +#ifdef CONFIG_MMU  	err |= __put_user(frame->retcode, &frame->pretcode);  #ifdef __mcoldfire__  	/* movel #__NR_rt_sigreturn,d0; trap #0 */ @@ -908,17 +991,31 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,  			  (long __user *)(frame->retcode + 0));  	err |= __put_user(0x4e40, (short __user *)(frame->retcode + 4));  #endif +#else +	err |= __put_user((void *) ret_from_user_rt_signal, &frame->pretcode); +#endif /* CONFIG_MMU */  	if (err)  		goto give_sigsegv;  	push_cache ((unsigned long) &frame->retcode); -	/* Set up registers for signal handler */ +	/* +	 * Set up registers for signal handler.  All the state we are about +	 * to destroy is successfully copied to sigframe. +	 */  	wrusp ((unsigned long) frame);  	regs->pc = (unsigned long) ka->sa.sa_handler; +	adjustformat(regs); + +	/* +	 * This is subtle; if we build more than one sigframe, all but the +	 * first one will see frame format 0 and have fsize == 0, so we won't +	 * screw stkadj. +	 */ +	if (fsize) +		regs->stkadj = fsize; -adjust_stack:  	/* Prepare to skip over the extra stuff in the exception frame.  */  	if (regs->stkadj) {  		struct pt_regs *tregs = @@ -933,11 +1030,11 @@ adjust_stack:  		tregs->pc = regs->pc;  		tregs->sr = regs->sr;  	} -	return; +	return 0;  give_sigsegv:  	force_sigsegv(sig, current); -	goto adjust_stack; +	return err;  }  static inline void @@ -973,28 +1070,15 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)  	}  } -void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) -{ -	if (regs->orig_d0 < 0) -		return; -	switch (regs->d0) { -	case -ERESTARTNOHAND: -	case -ERESTARTSYS: -	case -ERESTARTNOINTR: -		regs->d0 = regs->orig_d0; -		regs->orig_d0 = -1; -		regs->pc -= 2; -		break; -	} -} -  /*   * OK, we're invoking a handler   */  static void  handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, -	      sigset_t *oldset, struct pt_regs *regs) +	      struct pt_regs *regs)  { +	sigset_t *oldset = sigmask_to_save(); +	int err;  	/* are we from a system call? */  	if (regs->orig_d0 >= 0)  		/* If so, check system call restarting.. */ @@ -1002,17 +1086,19 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,  	/* set up the stack frame */  	if (ka->sa.sa_flags & SA_SIGINFO) -		setup_rt_frame(sig, ka, info, oldset, regs); +		err = setup_rt_frame(sig, ka, info, oldset, regs);  	else -		setup_frame(sig, ka, oldset, regs); +		err = setup_frame(sig, ka, oldset, regs); + +	if (err) +		return; -	if (ka->sa.sa_flags & SA_ONESHOT) -		ka->sa.sa_handler = SIG_DFL; +	signal_delivered(sig, info, ka, regs, 0); -	sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); -	if (!(ka->sa.sa_flags & SA_NODEFER)) -		sigaddset(¤t->blocked,sig); -	recalc_sigpending(); +	if (test_thread_flag(TIF_DELAYED_TRACE)) { +		regs->sr &= ~0x8000; +		send_sig(SIGTRAP, current, 1); +	}  }  /* @@ -1020,7 +1106,7 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,   * want to handle. Thus you cannot kill init even with a SIGKILL even by   * mistake.   */ -asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) +static void do_signal(struct pt_regs *regs)  {  	siginfo_t info;  	struct k_sigaction ka; @@ -1028,14 +1114,11 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)  	current->thread.esp0 = (unsigned long) regs; -	if (!oldset) -		oldset = ¤t->blocked; -  	signr = get_signal_to_deliver(&info, &ka, regs, NULL);  	if (signr > 0) {  		/* Whee!  Actually deliver the signal.  */ -		handle_signal(signr, &ka, &info, oldset, regs); -		return 1; +		handle_signal(signr, &ka, &info, regs); +		return;  	}  	/* Did we come from a system call? */ @@ -1043,5 +1126,15 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)  		/* Restart the system call - no handlers present */  		handle_restart(regs, NULL, 0); -	return 0; +	/* If there's no signal to deliver, we just restore the saved mask.  */ +	restore_saved_sigmask(); +} + +void do_notify_resume(struct pt_regs *regs) +{ +	if (test_thread_flag(TIF_SIGPENDING)) +		do_signal(regs); + +	if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) +		tracehook_notify_resume(regs);  } diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 3db2e7f902a..3a480b3df0d 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c @@ -27,7 +27,10 @@  #include <asm/traps.h>  #include <asm/page.h>  #include <asm/unistd.h> -#include <linux/elf.h> +#include <asm/cacheflush.h> + +#ifdef CONFIG_MMU +  #include <asm/tlb.h>  asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, @@ -447,39 +450,6 @@ out:  	return ret;  } -asmlinkage int sys_getpagesize(void) -{ -	return PAGE_SIZE; -} - -/* - * Do a system call from kernel instead of calling sys_execve so we - * end up with proper pt_regs. - */ -int kernel_execve(const char *filename, -		  const char *const argv[], -		  const char *const envp[]) -{ -	register long __res asm ("%d0") = __NR_execve; -	register long __a asm ("%d1") = (long)(filename); -	register long __b asm ("%d2") = (long)(argv); -	register long __c asm ("%d3") = (long)(envp); -	asm volatile ("trap  #0" : "+d" (__res) -			: "d" (__a), "d" (__b), "d" (__c)); -	return __res; -} - -asmlinkage unsigned long sys_get_thread_area(void) -{ -	return current_thread_info()->tp_value; -} - -asmlinkage int sys_set_thread_area(unsigned long tp) -{ -	current_thread_info()->tp_value = tp; -	return 0; -} -  /* This syscall gets its arguments in A0 (mem), D2 (oldval) and     D1 (newval).  */  asmlinkage int @@ -509,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,  			goto bad_access;  		} -		mem_value = *mem; +		/* +		 * No need to check for EFAULT; we know that the page is +		 * present and writable. +		 */ +		__get_user(mem_value, mem);  		if (mem_value == oldval) -			*mem = newval; +			__put_user(newval, mem);  		pte_unmap_unlock(pte, ptl);  		up_read(&mm->mmap_sem); @@ -539,6 +513,53 @@ sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,  	}  } +#else + +/* sys_cacheflush -- flush (part of) the processor cache.  */ +asmlinkage int +sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) +{ +	flush_cache_all(); +	return 0; +} + +/* This syscall gets its arguments in A0 (mem), D2 (oldval) and +   D1 (newval).  */ +asmlinkage int +sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5, +		      unsigned long __user * mem) +{ +	struct mm_struct *mm = current->mm; +	unsigned long mem_value; + +	down_read(&mm->mmap_sem); + +	mem_value = *mem; +	if (mem_value == oldval) +		*mem = newval; + +	up_read(&mm->mmap_sem); +	return mem_value; +} + +#endif /* CONFIG_MMU */ + +asmlinkage int sys_getpagesize(void) +{ +	return PAGE_SIZE; +} + +asmlinkage unsigned long sys_get_thread_area(void) +{ +	return current_thread_info()->tp_value; +} + +asmlinkage int sys_set_thread_area(unsigned long tp) +{ +	current_thread_info()->tp_value = tp; +	return 0; +} +  asmlinkage int sys_atomic_barrier(void)  {  	/* no code needed for uniprocs */ diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S new file mode 100644 index 00000000000..501e1021278 --- /dev/null +++ b/arch/m68k/kernel/syscalltable.S @@ -0,0 +1,375 @@ +/* + *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com) + * + *  Based on older entry.S files, the following copyrights apply: + * + *  Copyright (C) 1998  D. Jeff Dionne <jeff@lineo.ca>, + *                      Kenneth Albanowski <kjahds@kjahds.com>, + *  Copyright (C) 2000  Lineo Inc. (www.lineo.com)  + *  Copyright (C) 1991, 1992  Linus Torvalds + * + *  Linux/m68k support by Hamish Macdonald + */ + +#include <linux/linkage.h> + +#ifndef CONFIG_MMU +#define sys_mmap2		sys_mmap_pgoff +#endif + +.section .rodata +ALIGN +ENTRY(sys_call_table) +	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */ +	.long sys_exit +	.long __sys_fork +	.long sys_read +	.long sys_write +	.long sys_open			/* 5 */ +	.long sys_close +	.long sys_waitpid +	.long sys_creat +	.long sys_link +	.long sys_unlink		/* 10 */ +	.long sys_execve +	.long sys_chdir +	.long sys_time +	.long sys_mknod +	.long sys_chmod			/* 15 */ +	.long sys_chown16 +	.long sys_ni_syscall		/* old break syscall holder */ +	.long sys_stat +	.long sys_lseek +	.long sys_getpid		/* 20 */ +	.long sys_mount +	.long sys_oldumount +	.long sys_setuid16 +	.long sys_getuid16 +	.long sys_stime			/* 25 */ +	.long sys_ptrace +	.long sys_alarm +	.long sys_fstat +	.long sys_pause +	.long sys_utime			/* 30 */ +	.long sys_ni_syscall		/* old stty syscall holder */ +	.long sys_ni_syscall		/* old gtty syscall holder */ +	.long sys_access +	.long sys_nice +	.long sys_ni_syscall		/* 35 - old ftime syscall holder */ +	.long sys_sync +	.long sys_kill +	.long sys_rename +	.long sys_mkdir +	.long sys_rmdir			/* 40 */ +	.long sys_dup +	.long sys_pipe +	.long sys_times +	.long sys_ni_syscall		/* old prof syscall holder */ +	.long sys_brk			/* 45 */ +	.long sys_setgid16 +	.long sys_getgid16 +	.long sys_signal +	.long sys_geteuid16 +	.long sys_getegid16		/* 50 */ +	.long sys_acct +	.long sys_umount		/* recycled never used phys() */ +	.long sys_ni_syscall		/* old lock syscall holder */ +	.long sys_ioctl +	.long sys_fcntl			/* 55 */ +	.long sys_ni_syscall		/* old mpx syscall holder */ +	.long sys_setpgid +	.long sys_ni_syscall		/* old ulimit syscall holder */ +	.long sys_ni_syscall +	.long sys_umask			/* 60 */ +	.long sys_chroot +	.long sys_ustat +	.long sys_dup2 +	.long sys_getppid +	.long sys_getpgrp		/* 65 */ +	.long sys_setsid +	.long sys_sigaction +	.long sys_sgetmask +	.long sys_ssetmask +	.long sys_setreuid16		/* 70 */ +	.long sys_setregid16 +	.long sys_sigsuspend +	.long sys_sigpending +	.long sys_sethostname +	.long sys_setrlimit		/* 75 */ +	.long sys_old_getrlimit +	.long sys_getrusage +	.long sys_gettimeofday +	.long sys_settimeofday +	.long sys_getgroups16		/* 80 */ +	.long sys_setgroups16 +	.long sys_old_select +	.long sys_symlink +	.long sys_lstat +	.long sys_readlink		/* 85 */ +	.long sys_uselib +	.long sys_swapon +	.long sys_reboot +	.long sys_old_readdir +	.long sys_old_mmap		/* 90 */ +	.long sys_munmap +	.long sys_truncate +	.long sys_ftruncate +	.long sys_fchmod +	.long sys_fchown16		/* 95 */ +	.long sys_getpriority +	.long sys_setpriority +	.long sys_ni_syscall		/* old profil syscall holder */ +	.long sys_statfs +	.long sys_fstatfs		/* 100 */ +	.long sys_ni_syscall		/* ioperm for i386 */ +	.long sys_socketcall +	.long sys_syslog +	.long sys_setitimer +	.long sys_getitimer		/* 105 */ +	.long sys_newstat +	.long sys_newlstat +	.long sys_newfstat +	.long sys_ni_syscall +	.long sys_ni_syscall		/* 110 - iopl for i386 */ +	.long sys_vhangup +	.long sys_ni_syscall		/* obsolete idle() syscall */ +	.long sys_ni_syscall		/* vm86old for i386 */ +	.long sys_wait4 +	.long sys_swapoff		/* 115 */ +	.long sys_sysinfo +	.long sys_ipc +	.long sys_fsync +	.long sys_sigreturn +	.long __sys_clone		/* 120 */ +	.long sys_setdomainname +	.long sys_newuname +	.long sys_cacheflush		/* modify_ldt for i386 */ +	.long sys_adjtimex +	.long sys_mprotect		/* 125 */ +	.long sys_sigprocmask +	.long sys_ni_syscall		/* old "create_module" */ +	.long sys_init_module +	.long sys_delete_module +	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */ +	.long sys_quotactl +	.long sys_getpgid +	.long sys_fchdir +	.long sys_bdflush +	.long sys_sysfs			/* 135 */ +	.long sys_personality +	.long sys_ni_syscall		/* for afs_syscall */ +	.long sys_setfsuid16 +	.long sys_setfsgid16 +	.long sys_llseek		/* 140 */ +	.long sys_getdents +	.long sys_select +	.long sys_flock +	.long sys_msync +	.long sys_readv			/* 145 */ +	.long sys_writev +	.long sys_getsid +	.long sys_fdatasync +	.long sys_sysctl +	.long sys_mlock			/* 150 */ +	.long sys_munlock +	.long sys_mlockall +	.long sys_munlockall +	.long sys_sched_setparam +	.long sys_sched_getparam	/* 155 */ +	.long sys_sched_setscheduler +	.long sys_sched_getscheduler +	.long sys_sched_yield +	.long sys_sched_get_priority_max +	.long sys_sched_get_priority_min  /* 160 */ +	.long sys_sched_rr_get_interval +	.long sys_nanosleep +	.long sys_mremap +	.long sys_setresuid16 +	.long sys_getresuid16		/* 165 */ +	.long sys_getpagesize +	.long sys_ni_syscall		/* old "query_module" */ +	.long sys_poll +	.long sys_ni_syscall		/* old nfsservctl */ +	.long sys_setresgid16		/* 170 */ +	.long sys_getresgid16 +	.long sys_prctl +	.long sys_rt_sigreturn +	.long sys_rt_sigaction +	.long sys_rt_sigprocmask	/* 175 */ +	.long sys_rt_sigpending +	.long sys_rt_sigtimedwait +	.long sys_rt_sigqueueinfo +	.long sys_rt_sigsuspend +	.long sys_pread64		/* 180 */ +	.long sys_pwrite64 +	.long sys_lchown16 +	.long sys_getcwd +	.long sys_capget +	.long sys_capset		/* 185 */ +	.long sys_sigaltstack +	.long sys_sendfile +	.long sys_ni_syscall		/* streams1 */ +	.long sys_ni_syscall		/* streams2 */ +	.long __sys_vfork		/* 190 */ +	.long sys_getrlimit +	.long sys_mmap2 +	.long sys_truncate64 +	.long sys_ftruncate64 +	.long sys_stat64		/* 195 */ +	.long sys_lstat64 +	.long sys_fstat64 +	.long sys_chown +	.long sys_getuid +	.long sys_getgid		/* 200 */ +	.long sys_geteuid +	.long sys_getegid +	.long sys_setreuid +	.long sys_setregid +	.long sys_getgroups		/* 205 */ +	.long sys_setgroups +	.long sys_fchown +	.long sys_setresuid +	.long sys_getresuid +	.long sys_setresgid		/* 210 */ +	.long sys_getresgid +	.long sys_lchown +	.long sys_setuid +	.long sys_setgid +	.long sys_setfsuid		/* 215 */ +	.long sys_setfsgid +	.long sys_pivot_root +	.long sys_ni_syscall +	.long sys_ni_syscall +	.long sys_getdents64		/* 220 */ +	.long sys_gettid +	.long sys_tkill +	.long sys_setxattr +	.long sys_lsetxattr +	.long sys_fsetxattr		/* 225 */ +	.long sys_getxattr +	.long sys_lgetxattr +	.long sys_fgetxattr +	.long sys_listxattr +	.long sys_llistxattr		/* 230 */ +	.long sys_flistxattr +	.long sys_removexattr +	.long sys_lremovexattr +	.long sys_fremovexattr +	.long sys_futex			/* 235 */ +	.long sys_sendfile64 +	.long sys_mincore +	.long sys_madvise +	.long sys_fcntl64 +	.long sys_readahead		/* 240 */ +	.long sys_io_setup +	.long sys_io_destroy +	.long sys_io_getevents +	.long sys_io_submit +	.long sys_io_cancel		/* 245 */ +	.long sys_fadvise64 +	.long sys_exit_group +	.long sys_lookup_dcookie +	.long sys_epoll_create +	.long sys_epoll_ctl		/* 250 */ +	.long sys_epoll_wait +	.long sys_remap_file_pages +	.long sys_set_tid_address +	.long sys_timer_create +	.long sys_timer_settime		/* 255 */ +	.long sys_timer_gettime +	.long sys_timer_getoverrun +	.long sys_timer_delete +	.long sys_clock_settime +	.long sys_clock_gettime		/* 260 */ +	.long sys_clock_getres +	.long sys_clock_nanosleep +	.long sys_statfs64 +	.long sys_fstatfs64 +	.long sys_tgkill		/* 265 */ +	.long sys_utimes +	.long sys_fadvise64_64 +	.long sys_mbind +	.long sys_get_mempolicy +	.long sys_set_mempolicy		/* 270 */ +	.long sys_mq_open +	.long sys_mq_unlink +	.long sys_mq_timedsend +	.long sys_mq_timedreceive +	.long sys_mq_notify		/* 275 */ +	.long sys_mq_getsetattr +	.long sys_waitid +	.long sys_ni_syscall		/* for sys_vserver */ +	.long sys_add_key +	.long sys_request_key		/* 280 */ +	.long sys_keyctl +	.long sys_ioprio_set +	.long sys_ioprio_get +	.long sys_inotify_init +	.long sys_inotify_add_watch	/* 285 */ +	.long sys_inotify_rm_watch +	.long sys_migrate_pages +	.long sys_openat +	.long sys_mkdirat +	.long sys_mknodat		/* 290 */ +	.long sys_fchownat +	.long sys_futimesat +	.long sys_fstatat64 +	.long sys_unlinkat +	.long sys_renameat		/* 295 */ +	.long sys_linkat +	.long sys_symlinkat +	.long sys_readlinkat +	.long sys_fchmodat +	.long sys_faccessat		/* 300 */ +	.long sys_pselect6 +	.long sys_ppoll +	.long sys_unshare +	.long sys_set_robust_list +	.long sys_get_robust_list	/* 305 */ +	.long sys_splice +	.long sys_sync_file_range +	.long sys_tee +	.long sys_vmsplice +	.long sys_move_pages		/* 310 */ +	.long sys_sched_setaffinity +	.long sys_sched_getaffinity +	.long sys_kexec_load +	.long sys_getcpu +	.long sys_epoll_pwait		/* 315 */ +	.long sys_utimensat +	.long sys_signalfd +	.long sys_timerfd_create +	.long sys_eventfd +	.long sys_fallocate		/* 320 */ +	.long sys_timerfd_settime +	.long sys_timerfd_gettime +	.long sys_signalfd4 +	.long sys_eventfd2 +	.long sys_epoll_create1		/* 325 */ +	.long sys_dup3 +	.long sys_pipe2 +	.long sys_inotify_init1 +	.long sys_preadv +	.long sys_pwritev		/* 330 */ +	.long sys_rt_tgsigqueueinfo +	.long sys_perf_event_open +	.long sys_get_thread_area +	.long sys_set_thread_area +	.long sys_atomic_cmpxchg_32	/* 335 */ +	.long sys_atomic_barrier +	.long sys_fanotify_init +	.long sys_fanotify_mark +	.long sys_prlimit64 +	.long sys_name_to_handle_at	/* 340 */ +	.long sys_open_by_handle_at +	.long sys_clock_adjtime +	.long sys_syncfs +	.long sys_setns +	.long sys_process_vm_readv	/* 345 */ +	.long sys_process_vm_writev +	.long sys_kcmp +	.long sys_finit_module +	.long sys_sched_setattr +	.long sys_sched_getattr		/* 350 */ +	.long sys_renameat2 + diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 06438dac08f..3857737e395 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -11,6 +11,7 @@   */  #include <linux/errno.h> +#include <linux/export.h>  #include <linux/module.h>  #include <linux/sched.h>  #include <linux/kernel.h> @@ -28,20 +29,18 @@  #include <linux/timex.h>  #include <linux/profile.h> -static inline int set_rtc_mmss(unsigned long nowtime) -{ -  if (mach_set_clock_mmss) -    return mach_set_clock_mmss (nowtime); -  return -1; -} + +unsigned long (*mach_random_get_entropy)(void); +EXPORT_SYMBOL_GPL(mach_random_get_entropy); +  /*   * timer_interrupt() needs to keep up the real-time clock, - * as well as call the "do_timer()" routine every clocktick + * as well as call the "xtime_update()" routine every clocktick   */  static irqreturn_t timer_interrupt(int irq, void *dummy)  { -	do_timer(1); +	xtime_update(1);  	update_process_times(user_mode(get_irq_regs()));  	profile_tick(CPU_PROFILING); @@ -87,15 +86,7 @@ void read_persistent_clock(struct timespec *ts)  	}  } -void __init time_init(void) -{ -	mach_sched_init(timer_interrupt); -} - -u32 arch_gettimeoffset(void) -{ -	return mach_gettimeoffset() * 1000; -} +#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET  static int __init rtc_init(void)  { @@ -105,10 +96,14 @@ static int __init rtc_init(void)  		return -ENODEV;  	pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0); -	if (IS_ERR(pdev)) -		return PTR_ERR(pdev); - -	return 0; +	return PTR_ERR_OR_ZERO(pdev);  }  module_init(rtc_init); + +#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */ + +void __init time_init(void) +{ +	mach_sched_init(timer_interrupt); +} diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index ada4f4cca81..6c9ca24830e 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c @@ -32,126 +32,12 @@  #include <asm/setup.h>  #include <asm/fpu.h> -#include <asm/system.h>  #include <asm/uaccess.h>  #include <asm/traps.h>  #include <asm/pgalloc.h>  #include <asm/machdep.h>  #include <asm/siginfo.h> -/* assembler routines */ -asmlinkage void system_call(void); -asmlinkage void buserr(void); -asmlinkage void trap(void); -asmlinkage void nmihandler(void); -#ifdef CONFIG_M68KFPU_EMU -asmlinkage void fpu_emu(void); -#endif - -e_vector vectors[256] = { -	[VEC_BUSERR]	= buserr, -	[VEC_SYS]	= system_call, -}; - -/* nmi handler for the Amiga */ -asm(".text\n" -    __ALIGN_STR "\n" -    "nmihandler: rte"); - -/* - * this must be called very early as the kernel might - * use some instruction that are emulated on the 060 - */ -void __init base_trap_init(void) -{ -	if(MACH_IS_SUN3X) { -		extern e_vector *sun3x_prom_vbr; - -		__asm__ volatile ("movec %%vbr, %0" : "=r" (sun3x_prom_vbr)); -	} - -	/* setup the exception vector table */ -	__asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)vectors)); - -	if (CPU_IS_060) { -		/* set up ISP entry points */ -		asmlinkage void unimp_vec(void) asm ("_060_isp_unimp"); - -		vectors[VEC_UNIMPII] = unimp_vec; -	} -} - -void __init trap_init (void) -{ -	int i; - -	for (i = VEC_SPUR; i <= VEC_INT7; i++) -		vectors[i] = bad_inthandler; - -	for (i = 0; i < VEC_USER; i++) -		if (!vectors[i]) -			vectors[i] = trap; - -	for (i = VEC_USER; i < 256; i++) -		vectors[i] = bad_inthandler; - -#ifdef CONFIG_M68KFPU_EMU -	if (FPU_IS_EMU) -		vectors[VEC_LINE11] = fpu_emu; -#endif - -	if (CPU_IS_040 && !FPU_IS_EMU) { -		/* set up FPSP entry points */ -		asmlinkage void dz_vec(void) asm ("dz"); -		asmlinkage void inex_vec(void) asm ("inex"); -		asmlinkage void ovfl_vec(void) asm ("ovfl"); -		asmlinkage void unfl_vec(void) asm ("unfl"); -		asmlinkage void snan_vec(void) asm ("snan"); -		asmlinkage void operr_vec(void) asm ("operr"); -		asmlinkage void bsun_vec(void) asm ("bsun"); -		asmlinkage void fline_vec(void) asm ("fline"); -		asmlinkage void unsupp_vec(void) asm ("unsupp"); - -		vectors[VEC_FPDIVZ] = dz_vec; -		vectors[VEC_FPIR] = inex_vec; -		vectors[VEC_FPOVER] = ovfl_vec; -		vectors[VEC_FPUNDER] = unfl_vec; -		vectors[VEC_FPNAN] = snan_vec; -		vectors[VEC_FPOE] = operr_vec; -		vectors[VEC_FPBRUC] = bsun_vec; -		vectors[VEC_LINE11] = fline_vec; -		vectors[VEC_FPUNSUP] = unsupp_vec; -	} - -	if (CPU_IS_060 && !FPU_IS_EMU) { -		/* set up IFPSP entry points */ -		asmlinkage void snan_vec6(void) asm ("_060_fpsp_snan"); -		asmlinkage void operr_vec6(void) asm ("_060_fpsp_operr"); -		asmlinkage void ovfl_vec6(void) asm ("_060_fpsp_ovfl"); -		asmlinkage void unfl_vec6(void) asm ("_060_fpsp_unfl"); -		asmlinkage void dz_vec6(void) asm ("_060_fpsp_dz"); -		asmlinkage void inex_vec6(void) asm ("_060_fpsp_inex"); -		asmlinkage void fline_vec6(void) asm ("_060_fpsp_fline"); -		asmlinkage void unsupp_vec6(void) asm ("_060_fpsp_unsupp"); -		asmlinkage void effadd_vec6(void) asm ("_060_fpsp_effadd"); - -		vectors[VEC_FPNAN] = snan_vec6; -		vectors[VEC_FPOE] = operr_vec6; -		vectors[VEC_FPOVER] = ovfl_vec6; -		vectors[VEC_FPUNDER] = unfl_vec6; -		vectors[VEC_FPDIVZ] = dz_vec6; -		vectors[VEC_FPIR] = inex_vec6; -		vectors[VEC_LINE11] = fline_vec6; -		vectors[VEC_FPUNSUP] = unsupp_vec6; -		vectors[VEC_UNIMPEA] = effadd_vec6; -	} - -        /* if running on an amiga, make the NMI interrupt do nothing */ -	if (MACH_IS_AMIGA) { -		vectors[VEC_INT7] = nmihandler; -	} -} -  static const char *vec_names[] = {  	[VEC_RESETSP]	= "RESET SP", @@ -247,9 +133,7 @@ static inline void access_error060 (struct frame *fp)  {  	unsigned long fslw = fp->un.fmt4.pc; /* is really FSLW for access error */ -#ifdef DEBUG -	printk("fslw=%#lx, fa=%#lx\n", fslw, fp->un.fmt4.effaddr); -#endif +	pr_debug("fslw=%#lx, fa=%#lx\n", fslw, fp->un.fmt4.effaddr);  	if (fslw & MMU060_BPE) {  		/* branch prediction error -> clear branch cache */ @@ -276,9 +160,7 @@ static inline void access_error060 (struct frame *fp)  		}  		if (fslw & MMU060_W)  			errorcode |= 2; -#ifdef DEBUG -		printk("errorcode = %d\n", errorcode ); -#endif +		pr_debug("errorcode = %ld\n", errorcode);  		do_page_fault(&fp->ptregs, addr, errorcode);  	} else if (fslw & (MMU060_SEE)){  		/* Software Emulation Error. @@ -287,8 +169,9 @@ static inline void access_error060 (struct frame *fp)  		send_fault_sig(&fp->ptregs);  	} else if (!(fslw & (MMU060_RE|MMU060_WE)) ||  		   send_fault_sig(&fp->ptregs) > 0) { -		printk("pc=%#lx, fa=%#lx\n", fp->ptregs.pc, fp->un.fmt4.effaddr); -		printk( "68060 access error, fslw=%lx\n", fslw ); +		pr_err("pc=%#lx, fa=%#lx\n", fp->ptregs.pc, +		       fp->un.fmt4.effaddr); +		pr_err("68060 access error, fslw=%lx\n", fslw);  		trap_c( fp );  	}  } @@ -339,9 +222,7 @@ static inline int do_040writeback1(unsigned short wbs, unsigned long wba,  	set_fs(old_fs); -#ifdef DEBUG -	printk("do_040writeback1, res=%d\n",res); -#endif +	pr_debug("do_040writeback1, res=%d\n", res);  	return res;  } @@ -363,7 +244,7 @@ static inline void do_040writebacks(struct frame *fp)  	int res = 0;  #if 0  	if (fp->un.fmt7.wb1s & WBV_040) -		printk("access_error040: cannot handle 1st writeback. oops.\n"); +		pr_err("access_error040: cannot handle 1st writeback. oops.\n");  #endif  	if ((fp->un.fmt7.wb2s & WBV_040) && @@ -416,14 +297,12 @@ static inline void access_error040(struct frame *fp)  	unsigned short ssw = fp->un.fmt7.ssw;  	unsigned long mmusr; -#ifdef DEBUG -	printk("ssw=%#x, fa=%#lx\n", ssw, fp->un.fmt7.faddr); -        printk("wb1s=%#x, wb2s=%#x, wb3s=%#x\n", fp->un.fmt7.wb1s, +	pr_debug("ssw=%#x, fa=%#lx\n", ssw, fp->un.fmt7.faddr); +	pr_debug("wb1s=%#x, wb2s=%#x, wb3s=%#x\n", fp->un.fmt7.wb1s,  		fp->un.fmt7.wb2s, fp->un.fmt7.wb3s); -	printk ("wb2a=%lx, wb3a=%lx, wb2d=%lx, wb3d=%lx\n", +	pr_debug("wb2a=%lx, wb3a=%lx, wb2d=%lx, wb3d=%lx\n",  		fp->un.fmt7.wb2a, fp->un.fmt7.wb3a,  		fp->un.fmt7.wb2d, fp->un.fmt7.wb3d); -#endif  	if (ssw & ATC_040) {  		unsigned long addr = fp->un.fmt7.faddr; @@ -438,9 +317,7 @@ static inline void access_error040(struct frame *fp)  		/* MMU error, get the MMUSR info for this access */  		mmusr = probe040(!(ssw & RW_040), addr, ssw); -#ifdef DEBUG -		printk("mmusr = %lx\n", mmusr); -#endif +		pr_debug("mmusr = %lx\n", mmusr);  		errorcode = 1;  		if (!(mmusr & MMU_R_040)) {  			/* clear the invalid atc entry */ @@ -454,14 +331,10 @@ static inline void access_error040(struct frame *fp)  			errorcode |= 2;  		if (do_page_fault(&fp->ptregs, addr, errorcode)) { -#ifdef DEBUG -			printk("do_page_fault() !=0\n"); -#endif +			pr_debug("do_page_fault() !=0\n");  			if (user_mode(&fp->ptregs)){  				/* delay writebacks after signal delivery */ -#ifdef DEBUG -			        printk(".. was usermode - return\n"); -#endif +				pr_debug(".. was usermode - return\n");  				return;  			}  			/* disable writeback into user space from kernel @@ -469,9 +342,7 @@ static inline void access_error040(struct frame *fp)                           * the writeback won't do good)  			 */  disable_wb: -#ifdef DEBUG -			printk(".. disabling wb2\n"); -#endif +			pr_debug(".. disabling wb2\n");  			if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr)  				fp->un.fmt7.wb2s &= ~WBV_040;  			if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr) @@ -485,7 +356,7 @@ disable_wb:  		current->thread.signo = SIGBUS;  		current->thread.faddr = fp->un.fmt7.faddr;  		if (send_fault_sig(&fp->ptregs) >= 0) -			printk("68040 bus error (ssw=%x, faddr=%lx)\n", ssw, +			pr_err("68040 bus error (ssw=%x, faddr=%lx)\n", ssw,  			       fp->un.fmt7.faddr);  		goto disable_wb;  	} @@ -508,19 +379,17 @@ static inline void bus_error030 (struct frame *fp)  	unsigned short ssw = fp->un.fmtb.ssw;  	extern unsigned long _sun3_map_test_start, _sun3_map_test_end; -#ifdef DEBUG  	if (ssw & (FC | FB)) -		printk ("Instruction fault at %#010lx\n", +		pr_debug("Instruction fault at %#010lx\n",  			ssw & FC ?  			fp->ptregs.format == 0xa ? fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2  			:  			fp->ptregs.format == 0xa ? fp->ptregs.pc + 4 : fp->un.fmtb.baddr);  	if (ssw & DF) -		printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n", +		pr_debug("Data %s fault at %#010lx in %s (pc=%#lx)\n",  			ssw & RW ? "read" : "write",  			fp->un.fmtb.daddr,  			space_names[ssw & DFC], fp->ptregs.pc); -#endif  	/*  	 * Check if this page should be demand-mapped. This needs to go before @@ -543,7 +412,7 @@ static inline void bus_error030 (struct frame *fp)  			  return;  			/* instruction fault or kernel data fault! */  			if (ssw & (FC | FB)) -				printk ("Instruction fault at %#010lx\n", +				pr_err("Instruction fault at %#010lx\n",  					fp->ptregs.pc);  			if (ssw & DF) {  				/* was this fault incurred testing bus mappings? */ @@ -553,12 +422,12 @@ static inline void bus_error030 (struct frame *fp)  					return;  				} -				printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n", +				pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",  					ssw & RW ? "read" : "write",  					fp->un.fmtb.daddr,  					space_names[ssw & DFC], fp->ptregs.pc);  			} -			printk ("BAD KERNEL BUSERR\n"); +			pr_err("BAD KERNEL BUSERR\n");  			die_if_kernel("Oops", &fp->ptregs,0);  			force_sig(SIGKILL, current); @@ -587,12 +456,11 @@ static inline void bus_error030 (struct frame *fp)  		else if (buserr_type & SUN3_BUSERR_INVALID)  			errorcode = 0x00;  		else { -#ifdef DEBUG -			printk ("*** unexpected busfault type=%#04x\n", buserr_type); -			printk ("invalid %s access at %#lx from pc %#lx\n", -				!(ssw & RW) ? "write" : "read", addr, -				fp->ptregs.pc); -#endif +			pr_debug("*** unexpected busfault type=%#04x\n", +				 buserr_type); +			pr_debug("invalid %s access at %#lx from pc %#lx\n", +				 !(ssw & RW) ? "write" : "read", addr, +				 fp->ptregs.pc);  			die_if_kernel ("Oops", &fp->ptregs, buserr_type);  			force_sig (SIGBUS, current);  			return; @@ -620,12 +488,10 @@ static inline void bus_error030 (struct frame *fp)  		addr -= 2;  	if (buserr_type & SUN3_BUSERR_INVALID) { -		if (!mmu_emu_handle_fault (fp->un.fmtb.daddr, 1, 0)) +		if (!mmu_emu_handle_fault(addr, 1, 0))  			do_page_fault (&fp->ptregs, addr, 0);         } else { -#ifdef DEBUG -		printk ("protection fault on insn access (segv).\n"); -#endif +		pr_debug("protection fault on insn access (segv).\n");  		force_sig (SIGSEGV, current);         }  } @@ -639,22 +505,22 @@ static inline void bus_error030 (struct frame *fp)  	unsigned short ssw = fp->un.fmtb.ssw;  #ifdef DEBUG  	unsigned long desc; +#endif -	printk ("pid = %x  ", current->pid); -	printk ("SSW=%#06x  ", ssw); +	pr_debug("pid = %x  ", current->pid); +	pr_debug("SSW=%#06x  ", ssw);  	if (ssw & (FC | FB)) -		printk ("Instruction fault at %#010lx\n", +		pr_debug("Instruction fault at %#010lx\n",  			ssw & FC ?  			fp->ptregs.format == 0xa ? fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2  			:  			fp->ptregs.format == 0xa ? fp->ptregs.pc + 4 : fp->un.fmtb.baddr);  	if (ssw & DF) -		printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n", +		pr_debug("Data %s fault at %#010lx in %s (pc=%#lx)\n",  			ssw & RW ? "read" : "write",  			fp->un.fmtb.daddr,  			space_names[ssw & DFC], fp->ptregs.pc); -#endif  	/* ++andreas: If a data fault and an instruction fault happen  	   at the same time map in both pages.  */ @@ -665,30 +531,26 @@ static inline void bus_error030 (struct frame *fp)  #ifdef DEBUG  		asm volatile ("ptestr %3,%2@,#7,%0\n\t" -			      "pmove %%psr,%1@" -			      : "=a&" (desc) -			      : "a" (&temp), "a" (addr), "d" (ssw)); +			      "pmove %%psr,%1" +			      : "=a&" (desc), "=m" (temp) +			      : "a" (addr), "d" (ssw)); +		pr_debug("mmusr is %#x for addr %#lx in task %p\n", +			 temp, addr, current); +		pr_debug("descriptor address is 0x%p, contents %#lx\n", +			 __va(desc), *(unsigned long *)__va(desc));  #else  		asm volatile ("ptestr %2,%1@,#7\n\t" -			      "pmove %%psr,%0@" -			      : : "a" (&temp), "a" (addr), "d" (ssw)); +			      "pmove %%psr,%0" +			      : "=m" (temp) : "a" (addr), "d" (ssw));  #endif  		mmusr = temp; - -#ifdef DEBUG -		printk("mmusr is %#x for addr %#lx in task %p\n", -		       mmusr, addr, current); -		printk("descriptor address is %#lx, contents %#lx\n", -		       __va(desc), *(unsigned long *)__va(desc)); -#endif -  		errorcode = (mmusr & MMU_I) ? 0 : 1;  		if (!(ssw & RW) || (ssw & RM))  			errorcode |= 2;  		if (mmusr & (MMU_I | MMU_WP)) {  			if (ssw & 4) { -				printk("Data %s fault at %#010lx in %s (pc=%#lx)\n", +				pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",  				       ssw & RW ? "read" : "write",  				       fp->un.fmtb.daddr,  				       space_names[ssw & DFC], fp->ptregs.pc); @@ -701,9 +563,10 @@ static inline void bus_error030 (struct frame *fp)  		} else if (!(mmusr & MMU_I)) {  			/* probably a 020 cas fault */  			if (!(ssw & RM) && send_fault_sig(&fp->ptregs) > 0) -				printk("unexpected bus error (%#x,%#x)\n", ssw, mmusr); +				pr_err("unexpected bus error (%#x,%#x)\n", ssw, +				       mmusr);  		} else if (mmusr & (MMU_B|MMU_L|MMU_S)) { -			printk("invalid %s access at %#lx from pc %#lx\n", +			pr_err("invalid %s access at %#lx from pc %#lx\n",  			       !(ssw & RW) ? "write" : "read", addr,  			       fp->ptregs.pc);  			die_if_kernel("Oops",&fp->ptregs,mmusr); @@ -714,29 +577,25 @@ static inline void bus_error030 (struct frame *fp)  			static volatile long tlong;  #endif -			printk("weird %s access at %#lx from pc %#lx (ssw is %#x)\n", +			pr_err("weird %s access at %#lx from pc %#lx (ssw is %#x)\n",  			       !(ssw & RW) ? "write" : "read", addr,  			       fp->ptregs.pc, ssw);  			asm volatile ("ptestr #1,%1@,#0\n\t" -				      "pmove %%psr,%0@" -				      : /* no outputs */ -				      : "a" (&temp), "a" (addr)); +				      "pmove %%psr,%0" +				      : "=m" (temp) +				      : "a" (addr));  			mmusr = temp; -			printk ("level 0 mmusr is %#x\n", mmusr); +			pr_err("level 0 mmusr is %#x\n", mmusr);  #if 0 -			asm volatile ("pmove %%tt0,%0@" -				      : /* no outputs */ -				      : "a" (&tlong)); -			printk("tt0 is %#lx, ", tlong); -			asm volatile ("pmove %%tt1,%0@" -				      : /* no outputs */ -				      : "a" (&tlong)); -			printk("tt1 is %#lx\n", tlong); -#endif -#ifdef DEBUG -			printk("Unknown SIGSEGV - 1\n"); +			asm volatile ("pmove %%tt0,%0" +				      : "=m" (tlong)); +			pr_debug("tt0 is %#lx, ", tlong); +			asm volatile ("pmove %%tt1,%0" +				      : "=m" (tlong)); +			pr_debug("tt1 is %#lx\n", tlong);  #endif +			pr_debug("Unknown SIGSEGV - 1\n");  			die_if_kernel("Oops",&fp->ptregs,mmusr);  			force_sig(SIGSEGV, current);  			return; @@ -757,10 +616,9 @@ static inline void bus_error030 (struct frame *fp)  		return;  	if (fp->ptregs.sr & PS_S) { -		printk("Instruction fault at %#010lx\n", -			fp->ptregs.pc); +		pr_err("Instruction fault at %#010lx\n", fp->ptregs.pc);  	buserr: -		printk ("BAD KERNEL BUSERR\n"); +		pr_err("BAD KERNEL BUSERR\n");  		die_if_kernel("Oops",&fp->ptregs,0);  		force_sig(SIGKILL, current);  		return; @@ -781,31 +639,25 @@ static inline void bus_error030 (struct frame *fp)  #ifdef DEBUG  	asm volatile ("ptestr #1,%2@,#7,%0\n\t" -		      "pmove %%psr,%1@" -		      : "=a&" (desc) -		      : "a" (&temp), "a" (addr)); +		      "pmove %%psr,%1" +		      : "=a&" (desc), "=m" (temp) +		      : "a" (addr)); +	pr_debug("mmusr is %#x for addr %#lx in task %p\n", +		temp, addr, current); +	pr_debug("descriptor address is 0x%p, contents %#lx\n", +		__va(desc), *(unsigned long *)__va(desc));  #else  	asm volatile ("ptestr #1,%1@,#7\n\t" -		      "pmove %%psr,%0@" -		      : : "a" (&temp), "a" (addr)); +		      "pmove %%psr,%0" +		      : "=m" (temp) : "a" (addr));  #endif  	mmusr = temp; - -#ifdef DEBUG -	printk ("mmusr is %#x for addr %#lx in task %p\n", -		mmusr, addr, current); -	printk ("descriptor address is %#lx, contents %#lx\n", -		__va(desc), *(unsigned long *)__va(desc)); -#endif -  	if (mmusr & MMU_I)  		do_page_fault (&fp->ptregs, addr, 0);  	else if (mmusr & (MMU_B|MMU_L|MMU_S)) { -		printk ("invalid insn access at %#lx from pc %#lx\n", +		pr_err("invalid insn access at %#lx from pc %#lx\n",  			addr, fp->ptregs.pc); -#ifdef DEBUG -		printk("Unknown SIGSEGV - 2\n"); -#endif +		pr_debug("Unknown SIGSEGV - 2\n");  		die_if_kernel("Oops",&fp->ptregs,mmusr);  		force_sig(SIGSEGV, current);  		return; @@ -819,15 +671,117 @@ create_atc_entry:  #endif /* CPU_M68020_OR_M68030 */  #endif /* !CONFIG_SUN3 */ +#if defined(CONFIG_COLDFIRE) && defined(CONFIG_MMU) +#include <asm/mcfmmu.h> + +/* + *	The following table converts the FS encoding of a ColdFire + *	exception stack frame into the error_code value needed by + *	do_fault. +*/ +static const unsigned char fs_err_code[] = { +	0,  /* 0000 */ +	0,  /* 0001 */ +	0,  /* 0010 */ +	0,  /* 0011 */ +	1,  /* 0100 */ +	0,  /* 0101 */ +	0,  /* 0110 */ +	0,  /* 0111 */ +	2,  /* 1000 */ +	3,  /* 1001 */ +	2,  /* 1010 */ +	0,  /* 1011 */ +	1,  /* 1100 */ +	1,  /* 1101 */ +	0,  /* 1110 */ +	0   /* 1111 */ +}; + +static inline void access_errorcf(unsigned int fs, struct frame *fp) +{ +	unsigned long mmusr, addr; +	unsigned int err_code; +	int need_page_fault; + +	mmusr = mmu_read(MMUSR); +	addr = mmu_read(MMUAR); + +	/* +	 * error_code: +	 *	bit 0 == 0 means no page found, 1 means protection fault +	 *	bit 1 == 0 means read, 1 means write +	 */ +	switch (fs) { +	case  5:  /* 0101 TLB opword X miss */ +		need_page_fault = cf_tlb_miss(&fp->ptregs, 0, 0, 0); +		addr = fp->ptregs.pc; +		break; +	case  6:  /* 0110 TLB extension word X miss */ +		need_page_fault = cf_tlb_miss(&fp->ptregs, 0, 0, 1); +		addr = fp->ptregs.pc + sizeof(long); +		break; +	case 10:  /* 1010 TLB W miss */ +		need_page_fault = cf_tlb_miss(&fp->ptregs, 1, 1, 0); +		break; +	case 14: /* 1110 TLB R miss */ +		need_page_fault = cf_tlb_miss(&fp->ptregs, 0, 1, 0); +		break; +	default: +		/* 0000 Normal  */ +		/* 0001 Reserved */ +		/* 0010 Interrupt during debug service routine */ +		/* 0011 Reserved */ +		/* 0100 X Protection */ +		/* 0111 IFP in emulator mode */ +		/* 1000 W Protection*/ +		/* 1001 Write error*/ +		/* 1011 Reserved*/ +		/* 1100 R Protection*/ +		/* 1101 R Protection*/ +		/* 1111 OEP in emulator mode*/ +		need_page_fault = 1; +		break; +	} + +	if (need_page_fault) { +		err_code = fs_err_code[fs]; +		if ((fs == 13) && (mmusr & MMUSR_WF)) /* rd-mod-wr access */ +			err_code |= 2; /* bit1 - write, bit0 - protection */ +		do_page_fault(&fp->ptregs, addr, err_code); +	} +} +#endif /* CONFIG_COLDFIRE CONFIG_MMU */ +  asmlinkage void buserr_c(struct frame *fp)  {  	/* Only set esp0 if coming from user mode */  	if (user_mode(&fp->ptregs))  		current->thread.esp0 = (unsigned long) fp; -#ifdef DEBUG -	printk ("*** Bus Error *** Format is %x\n", fp->ptregs.format); -#endif +	pr_debug("*** Bus Error *** Format is %x\n", fp->ptregs.format); + +#if defined(CONFIG_COLDFIRE) && defined(CONFIG_MMU) +	if (CPU_IS_COLDFIRE) { +		unsigned int fs; +		fs = (fp->ptregs.vector & 0x3) | +			((fp->ptregs.vector & 0xc00) >> 8); +		switch (fs) { +		case 0x5: +		case 0x6: +		case 0x7: +		case 0x9: +		case 0xa: +		case 0xd: +		case 0xe: +		case 0xf: +			access_errorcf(fs, fp); +			return; +		default: +			break; +		} +	} +#endif /* CONFIG_COLDFIRE && CONFIG_MMU */  	switch (fp->ptregs.format) {  #if defined (CONFIG_M68060) @@ -848,9 +802,7 @@ asmlinkage void buserr_c(struct frame *fp)  #endif  	default:  	  die_if_kernel("bad frame format",&fp->ptregs,0); -#ifdef DEBUG -	  printk("Unknown SIGSEGV - 4\n"); -#endif +	  pr_debug("Unknown SIGSEGV - 4\n");  	  force_sig(SIGSEGV, current);  	}  } @@ -864,7 +816,7 @@ void show_trace(unsigned long *stack)  	unsigned long addr;  	int i; -	printk("Call Trace:"); +	pr_info("Call Trace:");  	addr = (unsigned long)stack + THREAD_SIZE - 1;  	endstack = (unsigned long *)(addr & -THREAD_SIZE);  	i = 0; @@ -881,13 +833,13 @@ void show_trace(unsigned long *stack)  		if (__kernel_text_address(addr)) {  #ifndef CONFIG_KALLSYMS  			if (i % 5 == 0) -				printk("\n       "); +				pr_cont("\n       ");  #endif -			printk(" [<%08lx>] %pS\n", addr, (void *)addr); +			pr_cont(" [<%08lx>] %pS\n", addr, (void *)addr);  			i++;  		}  	} -	printk("\n"); +	pr_cont("\n");  }  void show_registers(struct pt_regs *regs) @@ -899,81 +851,87 @@ void show_registers(struct pt_regs *regs)  	int i;  	print_modules(); -	printk("PC: [<%08lx>] %pS\n", regs->pc, (void *)regs->pc); -	printk("SR: %04x  SP: %p  a2: %08lx\n", regs->sr, regs, regs->a2); -	printk("d0: %08lx    d1: %08lx    d2: %08lx    d3: %08lx\n", +	pr_info("PC: [<%08lx>] %pS\n", regs->pc, (void *)regs->pc); +	pr_info("SR: %04x  SP: %p  a2: %08lx\n", regs->sr, regs, regs->a2); +	pr_info("d0: %08lx    d1: %08lx    d2: %08lx    d3: %08lx\n",  	       regs->d0, regs->d1, regs->d2, regs->d3); -	printk("d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n", +	pr_info("d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",  	       regs->d4, regs->d5, regs->a0, regs->a1); -	printk("Process %s (pid: %d, task=%p)\n", +	pr_info("Process %s (pid: %d, task=%p)\n",  		current->comm, task_pid_nr(current), current);  	addr = (unsigned long)&fp->un; -	printk("Frame format=%X ", regs->format); +	pr_info("Frame format=%X ", regs->format);  	switch (regs->format) {  	case 0x2: -		printk("instr addr=%08lx\n", fp->un.fmt2.iaddr); +		pr_cont("instr addr=%08lx\n", fp->un.fmt2.iaddr);  		addr += sizeof(fp->un.fmt2);  		break;  	case 0x3: -		printk("eff addr=%08lx\n", fp->un.fmt3.effaddr); +		pr_cont("eff addr=%08lx\n", fp->un.fmt3.effaddr);  		addr += sizeof(fp->un.fmt3);  		break;  	case 0x4: -		printk((CPU_IS_060 ? "fault addr=%08lx fslw=%08lx\n" -			: "eff addr=%08lx pc=%08lx\n"), -			fp->un.fmt4.effaddr, fp->un.fmt4.pc); +		if (CPU_IS_060) +			pr_cont("fault addr=%08lx fslw=%08lx\n", +				fp->un.fmt4.effaddr, fp->un.fmt4.pc); +		else +			pr_cont("eff addr=%08lx pc=%08lx\n", +				fp->un.fmt4.effaddr, fp->un.fmt4.pc);  		addr += sizeof(fp->un.fmt4);  		break;  	case 0x7: -		printk("eff addr=%08lx ssw=%04x faddr=%08lx\n", +		pr_cont("eff addr=%08lx ssw=%04x faddr=%08lx\n",  			fp->un.fmt7.effaddr, fp->un.fmt7.ssw, fp->un.fmt7.faddr); -		printk("wb 1 stat/addr/data: %04x %08lx %08lx\n", +		pr_info("wb 1 stat/addr/data: %04x %08lx %08lx\n",  			fp->un.fmt7.wb1s, fp->un.fmt7.wb1a, fp->un.fmt7.wb1dpd0); -		printk("wb 2 stat/addr/data: %04x %08lx %08lx\n", +		pr_info("wb 2 stat/addr/data: %04x %08lx %08lx\n",  			fp->un.fmt7.wb2s, fp->un.fmt7.wb2a, fp->un.fmt7.wb2d); -		printk("wb 3 stat/addr/data: %04x %08lx %08lx\n", +		pr_info("wb 3 stat/addr/data: %04x %08lx %08lx\n",  			fp->un.fmt7.wb3s, fp->un.fmt7.wb3a, fp->un.fmt7.wb3d); -		printk("push data: %08lx %08lx %08lx %08lx\n", +		pr_info("push data: %08lx %08lx %08lx %08lx\n",  			fp->un.fmt7.wb1dpd0, fp->un.fmt7.pd1, fp->un.fmt7.pd2,  			fp->un.fmt7.pd3);  		addr += sizeof(fp->un.fmt7);  		break;  	case 0x9: -		printk("instr addr=%08lx\n", fp->un.fmt9.iaddr); +		pr_cont("instr addr=%08lx\n", fp->un.fmt9.iaddr);  		addr += sizeof(fp->un.fmt9);  		break;  	case 0xa: -		printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n", +		pr_cont("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n",  			fp->un.fmta.ssw, fp->un.fmta.isc, fp->un.fmta.isb,  			fp->un.fmta.daddr, fp->un.fmta.dobuf);  		addr += sizeof(fp->un.fmta);  		break;  	case 0xb: -		printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n", +		pr_cont("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n",  			fp->un.fmtb.ssw, fp->un.fmtb.isc, fp->un.fmtb.isb,  			fp->un.fmtb.daddr, fp->un.fmtb.dobuf); -		printk("baddr=%08lx dibuf=%08lx ver=%x\n", +		pr_info("baddr=%08lx dibuf=%08lx ver=%x\n",  			fp->un.fmtb.baddr, fp->un.fmtb.dibuf, fp->un.fmtb.ver);  		addr += sizeof(fp->un.fmtb);  		break;  	default: -		printk("\n"); +		pr_cont("\n");  	}  	show_stack(NULL, (unsigned long *)addr); -	printk("Code:"); +	pr_info("Code:");  	set_fs(KERNEL_DS);  	cp = (u16 *)regs->pc;  	for (i = -8; i < 16; i++) {  		if (get_user(c, cp + i) && i >= 0) { -			printk(" Bad PC value."); +			pr_cont(" Bad PC value.");  			break;  		} -		printk(i ? " %04x" : " <%04x>", c); +		if (i) +			pr_cont(" %04x", c); +		else +			pr_cont(" <%04x>", c);  	}  	set_fs(old_fs); -	printk ("\n"); +	pr_cont("\n");  }  void show_stack(struct task_struct *task, unsigned long *stack) @@ -990,80 +948,80 @@ void show_stack(struct task_struct *task, unsigned long *stack)  	}  	endstack = (unsigned long *)(((unsigned long)stack + THREAD_SIZE - 1) & -THREAD_SIZE); -	printk("Stack from %08lx:", (unsigned long)stack); +	pr_info("Stack from %08lx:", (unsigned long)stack);  	p = stack;  	for (i = 0; i < kstack_depth_to_print; i++) {  		if (p + 1 > endstack)  			break;  		if (i % 8 == 0) -			printk("\n       "); -		printk(" %08lx", *p++); +			pr_cont("\n       "); +		pr_cont(" %08lx", *p++);  	} -	printk("\n"); +	pr_cont("\n");  	show_trace(stack);  }  /* - * The architecture-independent backtrace generator + * The vector number returned in the frame pointer may also contain + * the "fs" (Fault Status) bits on ColdFire. These are in the bottom + * 2 bits, and upper 2 bits. So we need to mask out the real vector + * number before using it in comparisons. You don't need to do this on + * real 68k parts, but it won't hurt either.   */ -void dump_stack(void) -{ -	unsigned long stack; - -	show_trace(&stack); -} - -EXPORT_SYMBOL(dump_stack);  void bad_super_trap (struct frame *fp)  { +	int vector = (fp->ptregs.vector >> 2) & 0xff; +  	console_verbose(); -	if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) -		printk ("*** %s ***   FORMAT=%X\n", -			vec_names[(fp->ptregs.vector) >> 2], +	if (vector < ARRAY_SIZE(vec_names)) +		pr_err("*** %s ***   FORMAT=%X\n", +			vec_names[vector],  			fp->ptregs.format);  	else -		printk ("*** Exception %d ***   FORMAT=%X\n", -			(fp->ptregs.vector) >> 2, -			fp->ptregs.format); -	if (fp->ptregs.vector >> 2 == VEC_ADDRERR && CPU_IS_020_OR_030) { +		pr_err("*** Exception %d ***   FORMAT=%X\n", +			vector, fp->ptregs.format); +	if (vector == VEC_ADDRERR && CPU_IS_020_OR_030) {  		unsigned short ssw = fp->un.fmtb.ssw; -		printk ("SSW=%#06x  ", ssw); +		pr_err("SSW=%#06x  ", ssw);  		if (ssw & RC) -			printk ("Pipe stage C instruction fault at %#010lx\n", +			pr_err("Pipe stage C instruction fault at %#010lx\n",  				(fp->ptregs.format) == 0xA ?  				fp->ptregs.pc + 2 : fp->un.fmtb.baddr - 2);  		if (ssw & RB) -			printk ("Pipe stage B instruction fault at %#010lx\n", +			pr_err("Pipe stage B instruction fault at %#010lx\n",  				(fp->ptregs.format) == 0xA ?  				fp->ptregs.pc + 4 : fp->un.fmtb.baddr);  		if (ssw & DF) -			printk ("Data %s fault at %#010lx in %s (pc=%#lx)\n", +			pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n",  				ssw & RW ? "read" : "write",  				fp->un.fmtb.daddr, space_names[ssw & DFC],  				fp->ptregs.pc);  	} -	printk ("Current process id is %d\n", task_pid_nr(current)); +	pr_err("Current process id is %d\n", task_pid_nr(current));  	die_if_kernel("BAD KERNEL TRAP", &fp->ptregs, 0);  }  asmlinkage void trap_c(struct frame *fp)  {  	int sig; +	int vector = (fp->ptregs.vector >> 2) & 0xff;  	siginfo_t info;  	if (fp->ptregs.sr & PS_S) { -		if ((fp->ptregs.vector >> 2) == VEC_TRACE) { -			/* traced a trapping instruction */ -		} else +		if (vector == VEC_TRACE) { +			/* traced a trapping instruction on a 68020/30, +			 * real exception will be executed afterwards. +			 */ +		} else if (!handle_kernel_fault(&fp->ptregs))  			bad_super_trap(fp);  		return;  	}  	/* send the appropriate signal to the user program */ -	switch ((fp->ptregs.vector) >> 2) { +	switch (vector) {  	    case VEC_ADDRERR:  		info.si_code = BUS_ADRALN;  		sig = SIGBUS; @@ -1174,12 +1132,17 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)  		return;  	console_verbose(); -	printk("%s: %08x\n",str,nr); +	pr_crit("%s: %08x\n", str, nr);  	show_registers(fp); -	add_taint(TAINT_DIE); +	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);  	do_exit(SIGSEGV);  } +asmlinkage void set_esp0(unsigned long ssp) +{ +	current->thread.esp0 = ssp; +} +  /*   * This function is called if an error occur while accessing   * user-space from the fpsp040 code. diff --git a/arch/m68k/kernel/vectors.c b/arch/m68k/kernel/vectors.c new file mode 100644 index 00000000000..322c977bb9e --- /dev/null +++ b/arch/m68k/kernel/vectors.c @@ -0,0 +1,144 @@ +/* + *  vectors.c + * + *  Copyright (C) 1993, 1994 by Hamish Macdonald + * + *  68040 fixes by Michael Rausch + *  68040 fixes by Martin Apel + *  68040 fixes and writeback by Richard Zidlicky + *  68060 fixes by Roman Hodek + *  68060 fixes by Jesper Skov + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +/* + * Sets up all exception vectors + */ +#include <linux/sched.h> +#include <linux/kernel.h> +#include <linux/linkage.h> +#include <linux/init.h> +#include <linux/kallsyms.h> + +#include <asm/setup.h> +#include <asm/fpu.h> +#include <asm/traps.h> + +/* assembler routines */ +asmlinkage void system_call(void); +asmlinkage void buserr(void); +asmlinkage void trap(void); +asmlinkage void nmihandler(void); +#ifdef CONFIG_M68KFPU_EMU +asmlinkage void fpu_emu(void); +#endif + +e_vector vectors[256]; + +/* nmi handler for the Amiga */ +asm(".text\n" +    __ALIGN_STR "\n" +    "nmihandler: rte"); + +/* + * this must be called very early as the kernel might + * use some instruction that are emulated on the 060 + * and so we're prepared for early probe attempts (e.g. nf_init). + */ +void __init base_trap_init(void) +{ +	if (MACH_IS_SUN3X) { +		extern e_vector *sun3x_prom_vbr; + +		__asm__ volatile ("movec %%vbr, %0" : "=r" (sun3x_prom_vbr)); +	} + +	/* setup the exception vector table */ +	__asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)vectors)); + +	if (CPU_IS_060) { +		/* set up ISP entry points */ +		asmlinkage void unimp_vec(void) asm ("_060_isp_unimp"); + +		vectors[VEC_UNIMPII] = unimp_vec; +	} + +	vectors[VEC_BUSERR] = buserr; +	vectors[VEC_ILLEGAL] = trap; +	vectors[VEC_SYS] = system_call; +} + +void __init trap_init (void) +{ +	int i; + +	for (i = VEC_SPUR; i <= VEC_INT7; i++) +		vectors[i] = bad_inthandler; + +	for (i = 0; i < VEC_USER; i++) +		if (!vectors[i]) +			vectors[i] = trap; + +	for (i = VEC_USER; i < 256; i++) +		vectors[i] = bad_inthandler; + +#ifdef CONFIG_M68KFPU_EMU +	if (FPU_IS_EMU) +		vectors[VEC_LINE11] = fpu_emu; +#endif + +	if (CPU_IS_040 && !FPU_IS_EMU) { +		/* set up FPSP entry points */ +		asmlinkage void dz_vec(void) asm ("dz"); +		asmlinkage void inex_vec(void) asm ("inex"); +		asmlinkage void ovfl_vec(void) asm ("ovfl"); +		asmlinkage void unfl_vec(void) asm ("unfl"); +		asmlinkage void snan_vec(void) asm ("snan"); +		asmlinkage void operr_vec(void) asm ("operr"); +		asmlinkage void bsun_vec(void) asm ("bsun"); +		asmlinkage void fline_vec(void) asm ("fline"); +		asmlinkage void unsupp_vec(void) asm ("unsupp"); + +		vectors[VEC_FPDIVZ] = dz_vec; +		vectors[VEC_FPIR] = inex_vec; +		vectors[VEC_FPOVER] = ovfl_vec; +		vectors[VEC_FPUNDER] = unfl_vec; +		vectors[VEC_FPNAN] = snan_vec; +		vectors[VEC_FPOE] = operr_vec; +		vectors[VEC_FPBRUC] = bsun_vec; +		vectors[VEC_LINE11] = fline_vec; +		vectors[VEC_FPUNSUP] = unsupp_vec; +	} + +	if (CPU_IS_060 && !FPU_IS_EMU) { +		/* set up IFPSP entry points */ +		asmlinkage void snan_vec6(void) asm ("_060_fpsp_snan"); +		asmlinkage void operr_vec6(void) asm ("_060_fpsp_operr"); +		asmlinkage void ovfl_vec6(void) asm ("_060_fpsp_ovfl"); +		asmlinkage void unfl_vec6(void) asm ("_060_fpsp_unfl"); +		asmlinkage void dz_vec6(void) asm ("_060_fpsp_dz"); +		asmlinkage void inex_vec6(void) asm ("_060_fpsp_inex"); +		asmlinkage void fline_vec6(void) asm ("_060_fpsp_fline"); +		asmlinkage void unsupp_vec6(void) asm ("_060_fpsp_unsupp"); +		asmlinkage void effadd_vec6(void) asm ("_060_fpsp_effadd"); + +		vectors[VEC_FPNAN] = snan_vec6; +		vectors[VEC_FPOE] = operr_vec6; +		vectors[VEC_FPOVER] = ovfl_vec6; +		vectors[VEC_FPUNDER] = unfl_vec6; +		vectors[VEC_FPDIVZ] = dz_vec6; +		vectors[VEC_FPIR] = inex_vec6; +		vectors[VEC_LINE11] = fline_vec6; +		vectors[VEC_FPUNSUP] = unsupp_vec6; +		vectors[VEC_UNIMPEA] = effadd_vec6; +	} + +        /* if running on an amiga, make the NMI interrupt do nothing */ +	if (MACH_IS_AMIGA) { +		vectors[VEC_INT7] = nmihandler; +	} +} + diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds new file mode 100644 index 00000000000..06a763f49fd --- /dev/null +++ b/arch/m68k/kernel/vmlinux-nommu.lds @@ -0,0 +1,91 @@ +/* + *	vmlinux.lds.S -- master linker script for m68knommu arch + * + *	(C) Copyright 2002-2012, Greg Ungerer <gerg@snapgear.com> + * + *	This linker script is equipped to build either ROM loaded or RAM + *	run kernels. + */ + +#if defined(CONFIG_RAMKERNEL) +#define	KTEXT_ADDR	CONFIG_KERNELBASE +#endif +#if defined(CONFIG_ROMKERNEL) +#define	KTEXT_ADDR	CONFIG_ROMSTART +#define	KDATA_ADDR	CONFIG_KERNELBASE +#define	LOAD_OFFSET	KDATA_ADDR + (ADDR(.text) + SIZEOF(.text)) +#endif + +#include <asm/page.h> +#include <asm/thread_info.h> +#include <asm-generic/vmlinux.lds.h> + +OUTPUT_ARCH(m68k) +ENTRY(_start) + +jiffies = jiffies_64 + 4; + +SECTIONS { + +#ifdef CONFIG_ROMVEC +	. = CONFIG_ROMVEC; +	.romvec : { +		__rom_start = .; +		_romvec = .; +		*(.romvec) +		*(.data..initvect) +	} +#endif + +	. = KTEXT_ADDR; + +	_text = .; +	_stext = .; +	.text : { +		HEAD_TEXT +		TEXT_TEXT +		SCHED_TEXT +		LOCK_TEXT +		*(.fixup) +		. = ALIGN(16); +	} +	_etext = .; + +#ifdef KDATA_ADDR +	. = KDATA_ADDR; +#endif + +	_sdata = .; +	RO_DATA_SECTION(PAGE_SIZE) +	RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) +	_edata = .; + +	EXCEPTION_TABLE(16) +	NOTES + +	. = ALIGN(PAGE_SIZE); +	__init_begin = .; +	INIT_TEXT_SECTION(PAGE_SIZE) +	INIT_DATA_SECTION(16) +	PERCPU_SECTION(16) +	.m68k_fixup : { +		__start_fixup = .; +		*(.m68k_fixup) +		__stop_fixup = .; +	} +	.init.data : { +		. = ALIGN(PAGE_SIZE); +		__init_end = .; +	} + +	BSS_SECTION(0, 0, 0) + +	_end = .; + +	STABS_DEBUG +	.comment 0 : { *(.comment) } + +	/* Sections to be discarded */ +	DISCARDS +} + diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds index 878be5f38ca..d0993594f55 100644 --- a/arch/m68k/kernel/vmlinux-std.lds +++ b/arch/m68k/kernel/vmlinux-std.lds @@ -25,6 +25,8 @@ SECTIONS    EXCEPTION_TABLE(16) +  _sdata = .;			/* Start of data section */ +    RODATA    RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 1ad6b7ad2c1..8080469ee6c 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds @@ -25,6 +25,7 @@ SECTIONS    _etext = .;			/* End of text section */    EXCEPTION_TABLE(16) :data +  _sdata = .;			/* Start of rw data section */    RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data    /* End of data goes *here* so that freeing init code works properly. */    _edata = .; diff --git a/arch/m68k/kernel/vmlinux.lds.S b/arch/m68k/kernel/vmlinux.lds.S index 99ba315bd0a..69ec7963887 100644 --- a/arch/m68k/kernel/vmlinux.lds.S +++ b/arch/m68k/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)  PHDRS  {    text PT_LOAD FILEHDR PHDRS FLAGS (7); @@ -8,3 +9,6 @@ PHDRS  #else  #include "vmlinux-std.lds"  #endif +#else +#include "vmlinux-nommu.lds" +#endif diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile index af9abf8d9d9..fcd8eb1d7c7 100644 --- a/arch/m68k/lib/Makefile +++ b/arch/m68k/lib/Makefile @@ -1,6 +1,16 @@ +  #  # Makefile for m68k-specific library files..  #  lib-y	:= ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ -	   checksum.o string.o uaccess.o +	   memcpy.o memset.o memmove.o + +lib-$(CONFIG_MMU) += uaccess.o +lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += mulsi3.o divsi3.o udivsi3.o +lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += modsi3.o umodsi3.o + +ifndef CONFIG_GENERIC_CSUM +lib-y	+= checksum.o +endif + diff --git a/arch/m68k/lib/divsi3.S b/arch/m68k/lib/divsi3.S new file mode 100644 index 00000000000..ec307b61991 --- /dev/null +++ b/arch/m68k/lib/divsi3.S @@ -0,0 +1,125 @@ +/* libgcc1 routines for 68000 w/o floating-point hardware. +   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file.  (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING.  If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA.  */ + +/* As a special exception, if you link this library with files +   compiled with GCC to produce an executable, this does not cause +   the resulting executable to be covered by the GNU General Public License. +   This exception does not however invalidate any other reasons why +   the executable file might be covered by the GNU General Public License.  */ + +/* Use this one for any 680x0; assumes no floating point hardware. +   The trailing " '" appearing on some lines is for ANSI preprocessors.  Yuk. +   Some of this code comes from MINIX, via the folks at ericsson. +   D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992 +*/ + +/* These are predefined by new versions of GNU cpp.  */ + +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ _ +#endif + +#ifndef __REGISTER_PREFIX__ +#define __REGISTER_PREFIX__ +#endif + +#ifndef __IMMEDIATE_PREFIX__ +#define __IMMEDIATE_PREFIX__ # +#endif + +/* ANSI concatenation macros.  */ + +#define CONCAT1(a, b) CONCAT2(a, b) +#define CONCAT2(a, b) a ## b + +/* Use the right prefix for global labels.  */ + +#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) + +/* Use the right prefix for registers.  */ + +#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) + +/* Use the right prefix for immediate values.  */ + +#define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x) + +#define d0 REG (d0) +#define d1 REG (d1) +#define d2 REG (d2) +#define d3 REG (d3) +#define d4 REG (d4) +#define d5 REG (d5) +#define d6 REG (d6) +#define d7 REG (d7) +#define a0 REG (a0) +#define a1 REG (a1) +#define a2 REG (a2) +#define a3 REG (a3) +#define a4 REG (a4) +#define a5 REG (a5) +#define a6 REG (a6) +#define fp REG (fp) +#define sp REG (sp) + +	.text +	.proc +	.globl	SYM (__divsi3) +SYM (__divsi3): +	movel	d2, sp@- + +	moveq	IMM (1), d2	/* sign of result stored in d2 (=1 or =-1) */ +	movel	sp@(12), d1	/* d1 = divisor */ +	jpl	L1 +	negl	d1 +#if !(defined(__mcf5200__) || defined(__mcoldfire__)) +	negb	d2		/* change sign because divisor <0  */ +#else +	negl	d2		/* change sign because divisor <0  */ +#endif +L1:	movel	sp@(8), d0	/* d0 = dividend */ +	jpl	L2 +	negl	d0 +#if !(defined(__mcf5200__) || defined(__mcoldfire__)) +	negb	d2 +#else +	negl	d2 +#endif + +L2:	movel	d1, sp@- +	movel	d0, sp@- +	jbsr	SYM (__udivsi3)	/* divide abs(dividend) by abs(divisor) */ +	addql	IMM (8), sp + +	tstb	d2 +	jpl	L3 +	negl	d0 + +L3:	movel	sp@+, d2 +	rts + diff --git a/arch/m68k/lib/memcpy.c b/arch/m68k/lib/memcpy.c new file mode 100644 index 00000000000..c1e2dfb206f --- /dev/null +++ b/arch/m68k/lib/memcpy.c @@ -0,0 +1,89 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/module.h> +#include <linux/string.h> + +void *memcpy(void *to, const void *from, size_t n) +{ +	void *xto = to; +	size_t temp; + +	if (!n) +		return xto; +	if ((long)to & 1) { +		char *cto = to; +		const char *cfrom = from; +		*cto++ = *cfrom++; +		to = cto; +		from = cfrom; +		n--; +	} +#if defined(CONFIG_M68000) +	if ((long)from & 1) { +		char *cto = to; +		const char *cfrom = from; +		for (; n; n--) +			*cto++ = *cfrom++; +		return xto; +	} +#endif +	if (n > 2 && (long)to & 2) { +		short *sto = to; +		const short *sfrom = from; +		*sto++ = *sfrom++; +		to = sto; +		from = sfrom; +		n -= 2; +	} +	temp = n >> 2; +	if (temp) { +		long *lto = to; +		const long *lfrom = from; +#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) +		for (; temp; temp--) +			*lto++ = *lfrom++; +#else +		size_t temp1; +		asm volatile ( +			"	movel %2,%3\n" +			"	andw  #7,%3\n" +			"	lsrl  #3,%2\n" +			"	negw  %3\n" +			"	jmp   %%pc@(1f,%3:w:2)\n" +			"4:	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"	movel %0@+,%1@+\n" +			"1:	dbra  %2,4b\n" +			"	clrw  %2\n" +			"	subql #1,%2\n" +			"	jpl   4b" +			: "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) +			: "0" (lfrom), "1" (lto), "2" (temp)); +#endif +		to = lto; +		from = lfrom; +	} +	if (n & 2) { +		short *sto = to; +		const short *sfrom = from; +		*sto++ = *sfrom++; +		to = sto; +		from = sfrom; +	} +	if (n & 1) { +		char *cto = to; +		const char *cfrom = from; +		*cto = *cfrom; +	} +	return xto; +} +EXPORT_SYMBOL(memcpy); diff --git a/arch/m68k/lib/memmove.c b/arch/m68k/lib/memmove.c new file mode 100644 index 00000000000..6519f7f349f --- /dev/null +++ b/arch/m68k/lib/memmove.c @@ -0,0 +1,103 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/module.h> +#include <linux/string.h> + +void *memmove(void *dest, const void *src, size_t n) +{ +	void *xdest = dest; +	size_t temp; + +	if (!n) +		return xdest; + +	if (dest < src) { +		if ((long)dest & 1) { +			char *cdest = dest; +			const char *csrc = src; +			*cdest++ = *csrc++; +			dest = cdest; +			src = csrc; +			n--; +		} +		if (n > 2 && (long)dest & 2) { +			short *sdest = dest; +			const short *ssrc = src; +			*sdest++ = *ssrc++; +			dest = sdest; +			src = ssrc; +			n -= 2; +		} +		temp = n >> 2; +		if (temp) { +			long *ldest = dest; +			const long *lsrc = src; +			temp--; +			do +				*ldest++ = *lsrc++; +			while (temp--); +			dest = ldest; +			src = lsrc; +		} +		if (n & 2) { +			short *sdest = dest; +			const short *ssrc = src; +			*sdest++ = *ssrc++; +			dest = sdest; +			src = ssrc; +		} +		if (n & 1) { +			char *cdest = dest; +			const char *csrc = src; +			*cdest = *csrc; +		} +	} else { +		dest = (char *)dest + n; +		src = (const char *)src + n; +		if ((long)dest & 1) { +			char *cdest = dest; +			const char *csrc = src; +			*--cdest = *--csrc; +			dest = cdest; +			src = csrc; +			n--; +		} +		if (n > 2 && (long)dest & 2) { +			short *sdest = dest; +			const short *ssrc = src; +			*--sdest = *--ssrc; +			dest = sdest; +			src = ssrc; +			n -= 2; +		} +		temp = n >> 2; +		if (temp) { +			long *ldest = dest; +			const long *lsrc = src; +			temp--; +			do +				*--ldest = *--lsrc; +			while (temp--); +			dest = ldest; +			src = lsrc; +		} +		if (n & 2) { +			short *sdest = dest; +			const short *ssrc = src; +			*--sdest = *--ssrc; +			dest = sdest; +			src = ssrc; +		} +		if (n & 1) { +			char *cdest = dest; +			const char *csrc = src; +			*--cdest = *--csrc; +		} +	} +	return xdest; +} +EXPORT_SYMBOL(memmove); diff --git a/arch/m68k/lib/memset.c b/arch/m68k/lib/memset.c new file mode 100644 index 00000000000..8a7639f0a2f --- /dev/null +++ b/arch/m68k/lib/memset.c @@ -0,0 +1,74 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/module.h> +#include <linux/string.h> + +void *memset(void *s, int c, size_t count) +{ +	void *xs = s; +	size_t temp; + +	if (!count) +		return xs; +	c &= 0xff; +	c |= c << 8; +	c |= c << 16; +	if ((long)s & 1) { +		char *cs = s; +		*cs++ = c; +		s = cs; +		count--; +	} +	if (count > 2 && (long)s & 2) { +		short *ss = s; +		*ss++ = c; +		s = ss; +		count -= 2; +	} +	temp = count >> 2; +	if (temp) { +		long *ls = s; +#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) +		for (; temp; temp--) +			*ls++ = c; +#else +		size_t temp1; +		asm volatile ( +			"	movel %1,%2\n" +			"	andw  #7,%2\n" +			"	lsrl  #3,%1\n" +			"	negw  %2\n" +			"	jmp   %%pc@(2f,%2:w:2)\n" +			"1:	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"	movel %3,%0@+\n" +			"2:	dbra  %1,1b\n" +			"	clrw  %1\n" +			"	subql #1,%1\n" +			"	jpl   1b" +			: "=a" (ls), "=d" (temp), "=&d" (temp1) +			: "d" (c), "0" (ls), "1" (temp)); +#endif +		s = ls; +	} +	if (count & 2) { +		short *ss = s; +		*ss++ = c; +		s = ss; +	} +	if (count & 1) { +		char *cs = s; +		*cs = c; +	} +	return xs; +} +EXPORT_SYMBOL(memset); diff --git a/arch/m68k/lib/modsi3.S b/arch/m68k/lib/modsi3.S new file mode 100644 index 00000000000..ef384943576 --- /dev/null +++ b/arch/m68k/lib/modsi3.S @@ -0,0 +1,113 @@ +/* libgcc1 routines for 68000 w/o floating-point hardware. +   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file.  (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING.  If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA.  */ + +/* As a special exception, if you link this library with files +   compiled with GCC to produce an executable, this does not cause +   the resulting executable to be covered by the GNU General Public License. +   This exception does not however invalidate any other reasons why +   the executable file might be covered by the GNU General Public License.  */ + +/* Use this one for any 680x0; assumes no floating point hardware. +   The trailing " '" appearing on some lines is for ANSI preprocessors.  Yuk. +   Some of this code comes from MINIX, via the folks at ericsson. +   D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992 +*/ + +/* These are predefined by new versions of GNU cpp.  */ + +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ _ +#endif + +#ifndef __REGISTER_PREFIX__ +#define __REGISTER_PREFIX__ +#endif + +#ifndef __IMMEDIATE_PREFIX__ +#define __IMMEDIATE_PREFIX__ # +#endif + +/* ANSI concatenation macros.  */ + +#define CONCAT1(a, b) CONCAT2(a, b) +#define CONCAT2(a, b) a ## b + +/* Use the right prefix for global labels.  */ + +#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) + +/* Use the right prefix for registers.  */ + +#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) + +/* Use the right prefix for immediate values.  */ + +#define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x) + +#define d0 REG (d0) +#define d1 REG (d1) +#define d2 REG (d2) +#define d3 REG (d3) +#define d4 REG (d4) +#define d5 REG (d5) +#define d6 REG (d6) +#define d7 REG (d7) +#define a0 REG (a0) +#define a1 REG (a1) +#define a2 REG (a2) +#define a3 REG (a3) +#define a4 REG (a4) +#define a5 REG (a5) +#define a6 REG (a6) +#define fp REG (fp) +#define sp REG (sp) + +	.text +	.proc +	.globl	SYM (__modsi3) +SYM (__modsi3): +	movel	sp@(8), d1	/* d1 = divisor */ +	movel	sp@(4), d0	/* d0 = dividend */ +	movel	d1, sp@- +	movel	d0, sp@- +	jbsr	SYM (__divsi3) +	addql	IMM (8), sp +	movel	sp@(8), d1	/* d1 = divisor */ +#if !(defined(__mcf5200__) || defined(__mcoldfire__)) +	movel	d1, sp@- +	movel	d0, sp@- +	jbsr	SYM (__mulsi3)	/* d0 = (a/b)*b */ +	addql	IMM (8), sp +#else +	mulsl	d1,d0 +#endif +	movel	sp@(4), d1	/* d1 = dividend */ +	subl	d0, d1		/* d1 = a - (a/b)*b */ +	movel	d1, d0 +	rts + diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c index be4f275649e..ee5f0b1b5c5 100644 --- a/arch/m68k/lib/muldi3.c +++ b/arch/m68k/lib/muldi3.c @@ -1,4 +1,4 @@ -/* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and +/* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and   			   gcc-2.7.2.3/longlong.h which is: */  /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. @@ -19,7 +19,39 @@ along with GNU CC; see the file COPYING.  If not, write to  the Free Software Foundation, 59 Temple Place - Suite 330,  Boston, MA 02111-1307, USA.  */ -#define BITS_PER_UNIT 8 +#ifdef CONFIG_CPU_HAS_NO_MULDIV64 + +#define SI_TYPE_SIZE 32 +#define __BITS4 (SI_TYPE_SIZE / 4) +#define __ll_B (1L << (SI_TYPE_SIZE / 2)) +#define __ll_lowpart(t) ((USItype) (t) % __ll_B) +#define __ll_highpart(t) ((USItype) (t) / __ll_B) + +#define umul_ppmm(w1, w0, u, v)						\ +  do {									\ +    USItype __x0, __x1, __x2, __x3;					\ +    USItype __ul, __vl, __uh, __vh;					\ +									\ +    __ul = __ll_lowpart (u);						\ +    __uh = __ll_highpart (u);						\ +    __vl = __ll_lowpart (v);						\ +    __vh = __ll_highpart (v);						\ +									\ +    __x0 = (USItype) __ul * __vl;					\ +    __x1 = (USItype) __ul * __vh;					\ +    __x2 = (USItype) __uh * __vl;					\ +    __x3 = (USItype) __uh * __vh;					\ +									\ +    __x1 += __ll_highpart (__x0);/* this can't give carry */		\ +    __x1 += __x2;		/* but this indeed can */		\ +    if (__x1 < __x2)		/* did we get it? */			\ +      __x3 += __ll_B;		/* yes, add it in the proper pos. */	\ +									\ +    (w1) = __x3 + __ll_highpart (__x1);					\ +    (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0);		\ +  } while (0) + +#else  #define umul_ppmm(w1, w0, u, v) \    __asm__ ("mulu%.l %3,%1:%0"						\ @@ -28,12 +60,14 @@ Boston, MA 02111-1307, USA.  */             : "%0" ((USItype)(u)),					\               "dmi" ((USItype)(v))) +#endif +  #define __umulsidi3(u, v) \    ({DIunion __w;							\      umul_ppmm (__w.s.high, __w.s.low, u, v);				\      __w.ll; }) -typedef		 int SItype	__attribute__ ((mode (SI))); +typedef 	 int SItype	__attribute__ ((mode (SI)));  typedef unsigned int USItype	__attribute__ ((mode (SI)));  typedef		 int DItype	__attribute__ ((mode (DI)));  typedef int word_type __attribute__ ((mode (__word__))); diff --git a/arch/m68k/lib/mulsi3.S b/arch/m68k/lib/mulsi3.S new file mode 100644 index 00000000000..ce29ea37b45 --- /dev/null +++ b/arch/m68k/lib/mulsi3.S @@ -0,0 +1,110 @@ +/* libgcc1 routines for 68000 w/o floating-point hardware. +   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file.  (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING.  If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA.  */ + +/* As a special exception, if you link this library with files +   compiled with GCC to produce an executable, this does not cause +   the resulting executable to be covered by the GNU General Public License. +   This exception does not however invalidate any other reasons why +   the executable file might be covered by the GNU General Public License.  */ + +/* Use this one for any 680x0; assumes no floating point hardware. +   The trailing " '" appearing on some lines is for ANSI preprocessors.  Yuk. +   Some of this code comes from MINIX, via the folks at ericsson. +   D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992 +*/ + +/* These are predefined by new versions of GNU cpp.  */ + +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ _ +#endif + +#ifndef __REGISTER_PREFIX__ +#define __REGISTER_PREFIX__ +#endif + +#ifndef __IMMEDIATE_PREFIX__ +#define __IMMEDIATE_PREFIX__ # +#endif + +/* ANSI concatenation macros.  */ + +#define CONCAT1(a, b) CONCAT2(a, b) +#define CONCAT2(a, b) a ## b + +/* Use the right prefix for global labels.  */ + +#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) + +/* Use the right prefix for registers.  */ + +#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) + +/* Use the right prefix for immediate values.  */ + +#define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x) + +#define d0 REG (d0) +#define d1 REG (d1) +#define d2 REG (d2) +#define d3 REG (d3) +#define d4 REG (d4) +#define d5 REG (d5) +#define d6 REG (d6) +#define d7 REG (d7) +#define a0 REG (a0) +#define a1 REG (a1) +#define a2 REG (a2) +#define a3 REG (a3) +#define a4 REG (a4) +#define a5 REG (a5) +#define a6 REG (a6) +#define fp REG (fp) +#define sp REG (sp) + +	.text +	.proc +	.globl	SYM (__mulsi3) +SYM (__mulsi3): +	movew	sp@(4), d0	/* x0 -> d0 */ +	muluw	sp@(10), d0	/* x0*y1 */ +	movew	sp@(6), d1	/* x1 -> d1 */ +	muluw	sp@(8), d1	/* x1*y0 */ +#if !(defined(__mcf5200__) || defined(__mcoldfire__)) +	addw	d1, d0 +#else +	addl	d1, d0 +#endif +	swap	d0 +	clrw	d0 +	movew	sp@(6), d1	/* x1 -> d1 */ +	muluw	sp@(10), d1	/* x1*y1 */ +	addl	d1, d0 + +	rts + diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c deleted file mode 100644 index 4253f870e54..00000000000 --- a/arch/m68k/lib/string.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License.  See the file COPYING in the main directory of this archive - * for more details. - */ - -#define __IN_STRING_C - -#include <linux/module.h> -#include <linux/string.h> - -char *strcpy(char *dest, const char *src) -{ -	return __kernel_strcpy(dest, src); -} -EXPORT_SYMBOL(strcpy); - -char *strcat(char *dest, const char *src) -{ -	return __kernel_strcpy(dest + __kernel_strlen(dest), src); -} -EXPORT_SYMBOL(strcat); - -void *memset(void *s, int c, size_t count) -{ -	void *xs = s; -	size_t temp, temp1; - -	if (!count) -		return xs; -	c &= 0xff; -	c |= c << 8; -	c |= c << 16; -	if ((long)s & 1) { -		char *cs = s; -		*cs++ = c; -		s = cs; -		count--; -	} -	if (count > 2 && (long)s & 2) { -		short *ss = s; -		*ss++ = c; -		s = ss; -		count -= 2; -	} -	temp = count >> 2; -	if (temp) { -		long *ls = s; - -		asm volatile ( -			"	movel %1,%2\n" -			"	andw  #7,%2\n" -			"	lsrl  #3,%1\n" -			"	negw  %2\n" -			"	jmp   %%pc@(2f,%2:w:2)\n" -			"1:	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"	movel %3,%0@+\n" -			"2:	dbra  %1,1b\n" -			"	clrw  %1\n" -			"	subql #1,%1\n" -			"	jpl   1b" -			: "=a" (ls), "=d" (temp), "=&d" (temp1) -			: "d" (c), "0" (ls), "1" (temp)); -		s = ls; -	} -	if (count & 2) { -		short *ss = s; -		*ss++ = c; -		s = ss; -	} -	if (count & 1) { -		char *cs = s; -		*cs = c; -	} -	return xs; -} -EXPORT_SYMBOL(memset); - -void *memcpy(void *to, const void *from, size_t n) -{ -	void *xto = to; -	size_t temp, temp1; - -	if (!n) -		return xto; -	if ((long)to & 1) { -		char *cto = to; -		const char *cfrom = from; -		*cto++ = *cfrom++; -		to = cto; -		from = cfrom; -		n--; -	} -	if (n > 2 && (long)to & 2) { -		short *sto = to; -		const short *sfrom = from; -		*sto++ = *sfrom++; -		to = sto; -		from = sfrom; -		n -= 2; -	} -	temp = n >> 2; -	if (temp) { -		long *lto = to; -		const long *lfrom = from; - -		asm volatile ( -			"	movel %2,%3\n" -			"	andw  #7,%3\n" -			"	lsrl  #3,%2\n" -			"	negw  %3\n" -			"	jmp   %%pc@(1f,%3:w:2)\n" -			"4:	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"	movel %0@+,%1@+\n" -			"1:	dbra  %2,4b\n" -			"	clrw  %2\n" -			"	subql #1,%2\n" -			"	jpl   4b" -			: "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) -			: "0" (lfrom), "1" (lto), "2" (temp)); -		to = lto; -		from = lfrom; -	} -	if (n & 2) { -		short *sto = to; -		const short *sfrom = from; -		*sto++ = *sfrom++; -		to = sto; -		from = sfrom; -	} -	if (n & 1) { -		char *cto = to; -		const char *cfrom = from; -		*cto = *cfrom; -	} -	return xto; -} -EXPORT_SYMBOL(memcpy); - -void *memmove(void *dest, const void *src, size_t n) -{ -	void *xdest = dest; -	size_t temp; - -	if (!n) -		return xdest; - -	if (dest < src) { -		if ((long)dest & 1) { -			char *cdest = dest; -			const char *csrc = src; -			*cdest++ = *csrc++; -			dest = cdest; -			src = csrc; -			n--; -		} -		if (n > 2 && (long)dest & 2) { -			short *sdest = dest; -			const short *ssrc = src; -			*sdest++ = *ssrc++; -			dest = sdest; -			src = ssrc; -			n -= 2; -		} -		temp = n >> 2; -		if (temp) { -			long *ldest = dest; -			const long *lsrc = src; -			temp--; -			do -				*ldest++ = *lsrc++; -			while (temp--); -			dest = ldest; -			src = lsrc; -		} -		if (n & 2) { -			short *sdest = dest; -			const short *ssrc = src; -			*sdest++ = *ssrc++; -			dest = sdest; -			src = ssrc; -		} -		if (n & 1) { -			char *cdest = dest; -			const char *csrc = src; -			*cdest = *csrc; -		} -	} else { -		dest = (char *)dest + n; -		src = (const char *)src + n; -		if ((long)dest & 1) { -			char *cdest = dest; -			const char *csrc = src; -			*--cdest = *--csrc; -			dest = cdest; -			src = csrc; -			n--; -		} -		if (n > 2 && (long)dest & 2) { -			short *sdest = dest; -			const short *ssrc = src; -			*--sdest = *--ssrc; -			dest = sdest; -			src = ssrc; -			n -= 2; -		} -		temp = n >> 2; -		if (temp) { -			long *ldest = dest; -			const long *lsrc = src; -			temp--; -			do -				*--ldest = *--lsrc; -			while (temp--); -			dest = ldest; -			src = lsrc; -		} -		if (n & 2) { -			short *sdest = dest; -			const short *ssrc = src; -			*--sdest = *--ssrc; -			dest = sdest; -			src = ssrc; -		} -		if (n & 1) { -			char *cdest = dest; -			const char *csrc = src; -			*--cdest = *--csrc; -		} -	} -	return xdest; -} -EXPORT_SYMBOL(memmove); - -int memcmp(const void *cs, const void *ct, size_t count) -{ -	const unsigned char *su1, *su2; - -	for (su1 = cs, su2 = ct; count > 0; ++su1, ++su2, count--) -		if (*su1 != *su2) -			return *su1 < *su2 ? -1 : +1; -	return 0; -} -EXPORT_SYMBOL(memcmp); diff --git a/arch/m68k/lib/uaccess.c b/arch/m68k/lib/uaccess.c index 13854ed8cd9..35d1442dee8 100644 --- a/arch/m68k/lib/uaccess.c +++ b/arch/m68k/lib/uaccess.c @@ -15,17 +15,17 @@ unsigned long __generic_copy_from_user(void *to, const void __user *from,  	asm volatile ("\n"  		"	tst.l	%0\n"  		"	jeq	2f\n" -		"1:	moves.l	(%1)+,%3\n" +		"1:	"MOVES".l	(%1)+,%3\n"  		"	move.l	%3,(%2)+\n"  		"	subq.l	#1,%0\n"  		"	jne	1b\n"  		"2:	btst	#1,%5\n"  		"	jeq	4f\n" -		"3:	moves.w	(%1)+,%3\n" +		"3:	"MOVES".w	(%1)+,%3\n"  		"	move.w	%3,(%2)+\n"  		"4:	btst	#0,%5\n"  		"	jeq	6f\n" -		"5:	moves.b	(%1)+,%3\n" +		"5:	"MOVES".b	(%1)+,%3\n"  		"	move.b  %3,(%2)+\n"  		"6:\n"  		"	.section .fixup,\"ax\"\n" @@ -52,7 +52,7 @@ unsigned long __generic_copy_from_user(void *to, const void __user *from,  		"	.long	3b,30b\n"  		"	.long	5b,50b\n"  		"	.previous" -		: "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp) +		: "=d" (res), "+a" (from), "+a" (to), "=&d" (tmp)  		: "0" (n / 4), "d" (n & 3));  	return res; @@ -68,17 +68,17 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,  		"	tst.l	%0\n"  		"	jeq	4f\n"  		"1:	move.l	(%1)+,%3\n" -		"2:	moves.l	%3,(%2)+\n" +		"2:	"MOVES".l	%3,(%2)+\n"  		"3:	subq.l	#1,%0\n"  		"	jne	1b\n"  		"4:	btst	#1,%5\n"  		"	jeq	6f\n"  		"	move.w	(%1)+,%3\n" -		"5:	moves.w	%3,(%2)+\n" +		"5:	"MOVES".w	%3,(%2)+\n"  		"6:	btst	#0,%5\n"  		"	jeq	8f\n"  		"	move.b	(%1)+,%3\n" -		"7:	moves.b  %3,(%2)+\n" +		"7:	"MOVES".b  %3,(%2)+\n"  		"8:\n"  		"	.section .fixup,\"ax\"\n"  		"	.even\n" @@ -96,7 +96,7 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,  		"	.long	7b,50b\n"  		"	.long	8b,50b\n"  		"	.previous" -		: "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp) +		: "=d" (res), "+a" (from), "+a" (to), "=&d" (tmp)  		: "0" (n / 4), "d" (n & 3));  	return res; @@ -104,80 +104,6 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,  EXPORT_SYMBOL(__generic_copy_to_user);  /* - * Copy a null terminated string from userspace. - */ -long strncpy_from_user(char *dst, const char __user *src, long count) -{ -	long res; -	char c; - -	if (count <= 0) -		return count; - -	asm volatile ("\n" -		"1:	moves.b	(%2)+,%4\n" -		"	move.b	%4,(%1)+\n" -		"	jeq	2f\n" -		"	subq.l	#1,%3\n" -		"	jne	1b\n" -		"2:	sub.l	%3,%0\n" -		"3:\n" -		"	.section .fixup,\"ax\"\n" -		"	.even\n" -		"10:	move.l	%5,%0\n" -		"	jra	3b\n" -		"	.previous\n" -		"\n" -		"	.section __ex_table,\"a\"\n" -		"	.align	4\n" -		"	.long	1b,10b\n" -		"	.previous" -		: "=d" (res), "+a" (dst), "+a" (src), "+r" (count), "=&d" (c) -		: "i" (-EFAULT), "0" (count)); - -	return res; -} -EXPORT_SYMBOL(strncpy_from_user); - -/* - * Return the size of a string (including the ending 0) - * - * Return 0 on exception, a value greater than N if too long - */ -long strnlen_user(const char __user *src, long n) -{ -	char c; -	long res; - -	asm volatile ("\n" -		"1:	subq.l	#1,%1\n" -		"	jmi	3f\n" -		"2:	moves.b	(%0)+,%2\n" -		"	tst.b	%2\n" -		"	jne	1b\n" -		"	jra	4f\n" -		"\n" -		"3:	addq.l	#1,%0\n" -		"4:	sub.l	%4,%0\n" -		"5:\n" -		"	.section .fixup,\"ax\"\n" -		"	.even\n" -		"20:	sub.l	%0,%0\n" -		"	jra	5b\n" -		"	.previous\n" -		"\n" -		"	.section __ex_table,\"a\"\n" -		"	.align	4\n" -		"	.long	2b,20b\n" -		"	.previous\n" -		: "=&a" (res), "+d" (n), "=&d" (c) -		: "0" (src), "r" (src)); - -	return res; -} -EXPORT_SYMBOL(strnlen_user); - -/*   * Zero Userspace   */ @@ -188,15 +114,15 @@ unsigned long __clear_user(void __user *to, unsigned long n)  	asm volatile ("\n"  		"	tst.l	%0\n"  		"	jeq	3f\n" -		"1:	moves.l	%2,(%1)+\n" +		"1:	"MOVES".l	%2,(%1)+\n"  		"2:	subq.l	#1,%0\n"  		"	jne	1b\n"  		"3:	btst	#1,%4\n"  		"	jeq	5f\n" -		"4:	moves.w	%2,(%1)+\n" +		"4:	"MOVES".w	%2,(%1)+\n"  		"5:	btst	#0,%4\n"  		"	jeq	7f\n" -		"6:	moves.b	%2,(%1)\n" +		"6:	"MOVES".b	%2,(%1)\n"  		"7:\n"  		"	.section .fixup,\"ax\"\n"  		"	.even\n" @@ -215,7 +141,7 @@ unsigned long __clear_user(void __user *to, unsigned long n)  		"	.long	7b,40b\n"  		"	.previous"  		: "=d" (res), "+a" (to) -		: "r" (0), "0" (n / 4), "d" (n & 3)); +		: "d" (0), "0" (n / 4), "d" (n & 3));      return res;  } diff --git a/arch/m68k/lib/udivsi3.S b/arch/m68k/lib/udivsi3.S new file mode 100644 index 00000000000..c424c4a1f0a --- /dev/null +++ b/arch/m68k/lib/udivsi3.S @@ -0,0 +1,162 @@ +/* libgcc1 routines for 68000 w/o floating-point hardware. +   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file.  (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING.  If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA.  */ + +/* As a special exception, if you link this library with files +   compiled with GCC to produce an executable, this does not cause +   the resulting executable to be covered by the GNU General Public License. +   This exception does not however invalidate any other reasons why +   the executable file might be covered by the GNU General Public License.  */ + +/* Use this one for any 680x0; assumes no floating point hardware. +   The trailing " '" appearing on some lines is for ANSI preprocessors.  Yuk. +   Some of this code comes from MINIX, via the folks at ericsson. +   D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992 +*/ + +/* These are predefined by new versions of GNU cpp.  */ + +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ _ +#endif + +#ifndef __REGISTER_PREFIX__ +#define __REGISTER_PREFIX__ +#endif + +#ifndef __IMMEDIATE_PREFIX__ +#define __IMMEDIATE_PREFIX__ # +#endif + +/* ANSI concatenation macros.  */ + +#define CONCAT1(a, b) CONCAT2(a, b) +#define CONCAT2(a, b) a ## b + +/* Use the right prefix for global labels.  */ + +#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) + +/* Use the right prefix for registers.  */ + +#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) + +/* Use the right prefix for immediate values.  */ + +#define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x) + +#define d0 REG (d0) +#define d1 REG (d1) +#define d2 REG (d2) +#define d3 REG (d3) +#define d4 REG (d4) +#define d5 REG (d5) +#define d6 REG (d6) +#define d7 REG (d7) +#define a0 REG (a0) +#define a1 REG (a1) +#define a2 REG (a2) +#define a3 REG (a3) +#define a4 REG (a4) +#define a5 REG (a5) +#define a6 REG (a6) +#define fp REG (fp) +#define sp REG (sp) + +	.text +	.proc +	.globl	SYM (__udivsi3) +SYM (__udivsi3): +#if !(defined(__mcf5200__) || defined(__mcoldfire__)) +	movel	d2, sp@- +	movel	sp@(12), d1	/* d1 = divisor */ +	movel	sp@(8), d0	/* d0 = dividend */ + +	cmpl	IMM (0x10000), d1 /* divisor >= 2 ^ 16 ?   */ +	jcc	L3		/* then try next algorithm */ +	movel	d0, d2 +	clrw	d2 +	swap	d2 +	divu	d1, d2          /* high quotient in lower word */ +	movew	d2, d0		/* save high quotient */ +	swap	d0 +	movew	sp@(10), d2	/* get low dividend + high rest */ +	divu	d1, d2		/* low quotient */ +	movew	d2, d0 +	jra	L6 + +L3:	movel	d1, d2		/* use d2 as divisor backup */ +L4:	lsrl	IMM (1), d1	/* shift divisor */ +	lsrl	IMM (1), d0	/* shift dividend */ +	cmpl	IMM (0x10000), d1 /* still divisor >= 2 ^ 16 ?  */ +	jcc	L4 +	divu	d1, d0		/* now we have 16 bit divisor */ +	andl	IMM (0xffff), d0 /* mask out divisor, ignore remainder */ + +/* Multiply the 16 bit tentative quotient with the 32 bit divisor.  Because of +   the operand ranges, this might give a 33 bit product.  If this product is +   greater than the dividend, the tentative quotient was too large. */ +	movel	d2, d1 +	mulu	d0, d1		/* low part, 32 bits */ +	swap	d2 +	mulu	d0, d2		/* high part, at most 17 bits */ +	swap	d2		/* align high part with low part */ +	tstw	d2		/* high part 17 bits? */ +	jne	L5		/* if 17 bits, quotient was too large */ +	addl	d2, d1		/* add parts */ +	jcs	L5		/* if sum is 33 bits, quotient was too large */ +	cmpl	sp@(8), d1	/* compare the sum with the dividend */ +	jls	L6		/* if sum > dividend, quotient was too large */ +L5:	subql	IMM (1), d0	/* adjust quotient */ + +L6:	movel	sp@+, d2 +	rts + +#else /* __mcf5200__ || __mcoldfire__ */ + +/* Coldfire implementation of non-restoring division algorithm from +   Hennessy & Patterson, Appendix A. */ +	link	a6,IMM (-12) +	moveml	d2-d4,sp@ +	movel	a6@(8),d0 +	movel	a6@(12),d1 +	clrl	d2		| clear p +	moveq	IMM (31),d4 +L1:	addl	d0,d0		| shift reg pair (p,a) one bit left +	addxl	d2,d2 +	movl	d2,d3		| subtract b from p, store in tmp. +	subl	d1,d3 +	jcs	L2		| if no carry, +	bset	IMM (0),d0	| set the low order bit of a to 1, +	movl	d3,d2		| and store tmp in p. +L2:	subql	IMM (1),d4 +	jcc	L1 +	moveml	sp@,d2-d4	| restore data registers +	unlk	a6		| and return +	rts +#endif /* __mcf5200__ || __mcoldfire__ */ + diff --git a/arch/m68k/lib/umodsi3.S b/arch/m68k/lib/umodsi3.S new file mode 100644 index 00000000000..5def5f62647 --- /dev/null +++ b/arch/m68k/lib/umodsi3.S @@ -0,0 +1,113 @@ +/* libgcc1 routines for 68000 w/o floating-point hardware. +   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file.  (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING.  If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA.  */ + +/* As a special exception, if you link this library with files +   compiled with GCC to produce an executable, this does not cause +   the resulting executable to be covered by the GNU General Public License. +   This exception does not however invalidate any other reasons why +   the executable file might be covered by the GNU General Public License.  */ + +/* Use this one for any 680x0; assumes no floating point hardware. +   The trailing " '" appearing on some lines is for ANSI preprocessors.  Yuk. +   Some of this code comes from MINIX, via the folks at ericsson. +   D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992 +*/ + +/* These are predefined by new versions of GNU cpp.  */ + +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ _ +#endif + +#ifndef __REGISTER_PREFIX__ +#define __REGISTER_PREFIX__ +#endif + +#ifndef __IMMEDIATE_PREFIX__ +#define __IMMEDIATE_PREFIX__ # +#endif + +/* ANSI concatenation macros.  */ + +#define CONCAT1(a, b) CONCAT2(a, b) +#define CONCAT2(a, b) a ## b + +/* Use the right prefix for global labels.  */ + +#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) + +/* Use the right prefix for registers.  */ + +#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) + +/* Use the right prefix for immediate values.  */ + +#define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x) + +#define d0 REG (d0) +#define d1 REG (d1) +#define d2 REG (d2) +#define d3 REG (d3) +#define d4 REG (d4) +#define d5 REG (d5) +#define d6 REG (d6) +#define d7 REG (d7) +#define a0 REG (a0) +#define a1 REG (a1) +#define a2 REG (a2) +#define a3 REG (a3) +#define a4 REG (a4) +#define a5 REG (a5) +#define a6 REG (a6) +#define fp REG (fp) +#define sp REG (sp) + +	.text +	.proc +	.globl	SYM (__umodsi3) +SYM (__umodsi3): +	movel	sp@(8), d1	/* d1 = divisor */ +	movel	sp@(4), d0	/* d0 = dividend */ +	movel	d1, sp@- +	movel	d0, sp@- +	jbsr	SYM (__udivsi3) +	addql	IMM (8), sp +	movel	sp@(8), d1	/* d1 = divisor */ +#if !(defined(__mcf5200__) || defined(__mcoldfire__)) +	movel	d1, sp@- +	movel	d0, sp@- +	jbsr	SYM (__mulsi3)	/* d0 = (a/b)*b */ +	addql	IMM (8), sp +#else +	mulsl	d1,d0 +#endif +	movel	sp@(4), d1	/* d1 = dividend */ +	subl	d0, d1		/* d1 = a - (a/b)*b */ +	movel	d1, d0 +	rts + diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 2a96bebd896..3fe0e43d44f 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -8,24 +8,16 @@  #include <linux/types.h>  #include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/delay.h> -#include <linux/init.h> +#include <linux/irq.h> -#include <asm/traps.h> -#include <asm/bootinfo.h>  #include <asm/macintosh.h>  #include <asm/macints.h>  #include <asm/mac_baboon.h>  /* #define DEBUG_IRQS */ -extern void mac_enable_irq(unsigned int); -extern void mac_disable_irq(unsigned int); -  int baboon_present;  static volatile struct baboon *baboon; -static unsigned char baboon_disabled;  #if 0  extern int macide_ack_intr(struct ata_channel *); @@ -53,7 +45,7 @@ void __init baboon_init(void)   * Baboon interrupt handler. This works a lot like a VIA.   */ -static irqreturn_t baboon_irq(int irq, void *dev_id) +static void baboon_irq(unsigned int irq, struct irq_desc *desc)  {  	int irq_bit, irq_num;  	unsigned char events; @@ -64,15 +56,16 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)  		(uint) baboon->mb_status);  #endif -	if (!(events = baboon->mb_ifr & 0x07)) -		return IRQ_NONE; +	events = baboon->mb_ifr & 0x07; +	if (!events) +		return;  	irq_num = IRQ_BABOON_0;  	irq_bit = 1;  	do {  	        if (events & irq_bit) {  			baboon->mb_ifr &= ~irq_bit; -			m68k_handle_int(irq_num); +			generic_handle_irq(irq_num);  		}  		irq_bit <<= 1;  		irq_num++; @@ -82,7 +75,6 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)  	/* for now we need to smash all interrupts */  	baboon->mb_ifr &= ~events;  #endif -	return IRQ_HANDLED;  }  /* @@ -91,52 +83,32 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)  void __init baboon_register_interrupts(void)  { -	baboon_disabled = 0; -	if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon)) -		pr_err("Couldn't register baboon interrupt\n"); +	irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq);  }  /* - * The means for masking individual baboon interrupts remains a mystery, so - * enable the umbrella interrupt only when no baboon interrupt is disabled. + * The means for masking individual Baboon interrupts remains a mystery. + * However, since we only use the IDE IRQ, we can just enable/disable all + * Baboon interrupts. If/when we handle more than one Baboon IRQ, we must + * either figure out how to mask them individually or else implement the + * same workaround that's used for NuBus slots (see nubus_disabled and + * via_nubus_irq_shutdown).   */  void baboon_irq_enable(int irq)  { -	int irq_idx = IRQ_IDX(irq); -  #ifdef DEBUG_IRQUSE  	printk("baboon_irq_enable(%d)\n", irq);  #endif -	baboon_disabled &= ~(1 << irq_idx); -	if (!baboon_disabled) -		mac_enable_irq(IRQ_NUBUS_C); +	mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));  }  void baboon_irq_disable(int irq)  { -	int irq_idx = IRQ_IDX(irq); -  #ifdef DEBUG_IRQUSE  	printk("baboon_irq_disable(%d)\n", irq);  #endif -	baboon_disabled |= 1 << irq_idx; -	if (baboon_disabled) -		mac_disable_irq(IRQ_NUBUS_C); -} - -void baboon_irq_clear(int irq) -{ -	int irq_idx = IRQ_IDX(irq); - -	baboon->mb_ifr &= ~(1 << irq_idx); -} - -int baboon_irq_pending(int irq) -{ -	int irq_idx = IRQ_IDX(irq); - -	return baboon->mb_ifr & (1 << irq_idx); +	mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));  } diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index c247de02bc7..a471eab1a4d 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -26,11 +26,11 @@  #include <linux/adb.h>  #include <linux/cuda.h> -#define BOOTINFO_COMPAT_1_0  #include <asm/setup.h>  #include <asm/bootinfo.h> +#include <asm/bootinfo-mac.h> +#include <asm/byteorder.h> -#include <asm/system.h>  #include <asm/io.h>  #include <asm/irq.h>  #include <asm/pgtable.h> @@ -53,7 +53,7 @@ struct mac_booter_data mac_bi_data;  static unsigned long mac_orig_videoaddr;  /* Mac specific timer functions */ -extern unsigned long mac_gettimeoffset(void); +extern u32 mac_gettimeoffset(void);  extern int mac_hwclk(int, struct rtc_time *);  extern int mac_set_clock_mmss(unsigned long);  extern void iop_preinit(void); @@ -83,45 +83,46 @@ static void __init mac_sched_init(irq_handler_t vector)  int __init mac_parse_bootinfo(const struct bi_record *record)  {  	int unknown = 0; -	const u_long *data = record->data; +	const void *data = record->data; -	switch (record->tag) { +	switch (be16_to_cpu(record->tag)) {  	case BI_MAC_MODEL: -		mac_bi_data.id = *data; +		mac_bi_data.id = be32_to_cpup(data);  		break;  	case BI_MAC_VADDR: -		mac_bi_data.videoaddr = *data; +		mac_bi_data.videoaddr = be32_to_cpup(data);  		break;  	case BI_MAC_VDEPTH: -		mac_bi_data.videodepth = *data; +		mac_bi_data.videodepth = be32_to_cpup(data);  		break;  	case BI_MAC_VROW: -		mac_bi_data.videorow = *data; +		mac_bi_data.videorow = be32_to_cpup(data);  		break;  	case BI_MAC_VDIM: -		mac_bi_data.dimensions = *data; +		mac_bi_data.dimensions = be32_to_cpup(data);  		break;  	case BI_MAC_VLOGICAL: -		mac_bi_data.videological = VIDEOMEMBASE + (*data & ~VIDEOMEMMASK); -		mac_orig_videoaddr = *data; +		mac_orig_videoaddr = be32_to_cpup(data); +		mac_bi_data.videological = +			VIDEOMEMBASE + (mac_orig_videoaddr & ~VIDEOMEMMASK);  		break;  	case BI_MAC_SCCBASE: -		mac_bi_data.sccbase = *data; +		mac_bi_data.sccbase = be32_to_cpup(data);  		break;  	case BI_MAC_BTIME: -		mac_bi_data.boottime = *data; +		mac_bi_data.boottime = be32_to_cpup(data);  		break;  	case BI_MAC_GMTBIAS: -		mac_bi_data.gmtbias = *data; +		mac_bi_data.gmtbias = be32_to_cpup(data);  		break;  	case BI_MAC_MEMSIZE: -		mac_bi_data.memsize = *data; +		mac_bi_data.memsize = be32_to_cpup(data);  		break;  	case BI_MAC_CPUID: -		mac_bi_data.cpuid = *data; +		mac_bi_data.cpuid = be32_to_cpup(data);  		break;  	case BI_MAC_ROMBASE: -		mac_bi_data.rombase = *data; +		mac_bi_data.rombase = be32_to_cpup(data);  		break;  	default:  		unknown = 1; @@ -153,7 +154,7 @@ void __init config_mac(void)  	mach_sched_init = mac_sched_init;  	mach_init_IRQ = mac_init_IRQ;  	mach_get_model = mac_get_model; -	mach_gettimeoffset = mac_gettimeoffset; +	arch_gettimeoffset = mac_gettimeoffset;  	mach_hwclk = mac_hwclk;  	mach_set_clock_mmss = mac_set_clock_mmss;  	mach_reset = mac_reset; @@ -192,7 +193,7 @@ void __init config_mac(void)   * inaccurate, so look here if a new Mac model won't run. Example: if   * a Mac crashes immediately after the VIA1 registers have been dumped   * to the screen, it probably died attempting to read DirB on a RBV. - * Meaning it should have MAC_VIA_IIci here :-) + * Meaning it should have MAC_VIA_IICI here :-)   */  struct mac_model *macintosh_config; @@ -267,7 +268,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_IICI,  		.name		= "IIci",  		.adb_type	= MAC_ADB_II, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -276,7 +277,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_IIFX,  		.name		= "IIfx",  		.adb_type	= MAC_ADB_IOP, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_IOP,  		.nubus_type	= MAC_NUBUS, @@ -285,7 +286,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_IISI,  		.name		= "IIsi",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -294,7 +295,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_IIVI,  		.name		= "IIvi",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -303,7 +304,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_IIVX,  		.name		= "IIvx",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -318,7 +319,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_CLII,  		.name		= "Classic II",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -327,7 +328,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_CCL,  		.name		= "Color Classic",  		.adb_type	= MAC_ADB_CUDA, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -336,7 +337,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_CCLII,  		.name		= "Color Classic II",  		.adb_type	= MAC_ADB_CUDA, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -351,7 +352,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_LC,  		.name		= "LC",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -360,7 +361,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_LCII,  		.name		= "LC II",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -369,7 +370,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_LCIII,  		.name		= "LC III",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -497,7 +498,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_P460,  		.name		= "Performa 460",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -524,7 +525,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_P520,  		.name		= "Performa 520",  		.adb_type	= MAC_ADB_CUDA, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -533,7 +534,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_P550,  		.name		= "Performa 550",  		.adb_type	= MAC_ADB_CUDA, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -565,7 +566,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_TV,  		.name		= "TV",  		.adb_type	= MAC_ADB_CUDA, -		.via_type	= MAC_VIA_QUADRA, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -574,7 +575,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_P600,  		.name		= "Performa 600",  		.adb_type	= MAC_ADB_IISI, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_II,  		.nubus_type	= MAC_NUBUS, @@ -645,8 +646,8 @@ static struct mac_model mac_data_table[] = {  	}, {  		.ident		= MAC_MODEL_PB150,  		.name		= "PowerBook 150", -		.adb_type	= MAC_ADB_PB1, -		.via_type	= MAC_VIA_IIci, +		.adb_type	= MAC_ADB_PB2, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.ide_type	= MAC_IDE_PB,  		.scc_type	= MAC_SCC_QUADRA, @@ -732,17 +733,13 @@ static struct mac_model mac_data_table[] = {  	 * PowerBook Duos are pretty much like normal PowerBooks  	 * All of these probably have onboard SONIC in the Dock which  	 * means we'll have to probe for it eventually. -	 * -	 * Are these really MAC_VIA_IIci? The developer notes for the -	 * Duos show pretty much the same custom parts as in most of -	 * the other PowerBooks which would imply MAC_VIA_QUADRA.  	 */  	{  		.ident		= MAC_MODEL_PB210,  		.name		= "PowerBook Duo 210",  		.adb_type	= MAC_ADB_PB2, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_QUADRA,  		.nubus_type	= MAC_NUBUS, @@ -751,7 +748,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_PB230,  		.name		= "PowerBook Duo 230",  		.adb_type	= MAC_ADB_PB2, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_QUADRA,  		.nubus_type	= MAC_NUBUS, @@ -760,7 +757,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_PB250,  		.name		= "PowerBook Duo 250",  		.adb_type	= MAC_ADB_PB2, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_QUADRA,  		.nubus_type	= MAC_NUBUS, @@ -769,7 +766,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_PB270C,  		.name		= "PowerBook Duo 270c",  		.adb_type	= MAC_ADB_PB2, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_QUADRA,  		.nubus_type	= MAC_NUBUS, @@ -778,7 +775,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_PB280,  		.name		= "PowerBook Duo 280",  		.adb_type	= MAC_ADB_PB2, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_QUADRA,  		.nubus_type	= MAC_NUBUS, @@ -787,7 +784,7 @@ static struct mac_model mac_data_table[] = {  		.ident		= MAC_MODEL_PB280C,  		.name		= "PowerBook Duo 280c",  		.adb_type	= MAC_ADB_PB2, -		.via_type	= MAC_VIA_IIci, +		.via_type	= MAC_VIA_IICI,  		.scsi_type	= MAC_SCSI_OLD,  		.scc_type	= MAC_SCC_QUADRA,  		.nubus_type	= MAC_NUBUS, @@ -864,8 +861,14 @@ static void __init mac_identify(void)  		scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC_B;  		break;  	default: -		scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; -		scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; +		/* On non-PSC machines, the serial ports share an IRQ. */ +		if (macintosh_config->ident == MAC_MODEL_IIFX) { +			scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_MAC_SCC; +			scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_MAC_SCC; +		} else { +			scc_a_rsrcs[1].start = scc_a_rsrcs[1].end = IRQ_AUTO_4; +			scc_b_rsrcs[1].start = scc_b_rsrcs[1].end = IRQ_AUTO_4; +		}  		break;  	} @@ -950,6 +953,9 @@ int __init mac_platform_init(void)  {  	u8 *swim_base; +	if (!MACH_IS_MAC) +		return -ENODEV; +  	/*  	 * Serial devices  	 */ diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 1ad4e9d80eb..4d2adfb32a2 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c @@ -111,17 +111,15 @@  #include <linux/init.h>  #include <linux/interrupt.h> -#include <asm/bootinfo.h>  #include <asm/macintosh.h>  #include <asm/macints.h>  #include <asm/mac_iop.h> -#include <asm/mac_oss.h>  /*#define DEBUG_IOP*/ -/* Set to non-zero if the IOPs are present. Set by iop_init() */ +/* Non-zero if the IOPs are present */ -int iop_scc_present,iop_ism_present; +int iop_scc_present, iop_ism_present;  /* structure for tracking channel listeners */ @@ -149,8 +147,6 @@ static struct listener iop_listeners[NUM_IOPS][NUM_IOP_CHAN];  irqreturn_t iop_ism_irq(int, void *); -extern void oss_irq_enable(int); -  /*   * Private access functions   */ @@ -304,16 +300,13 @@ void __init iop_init(void)  void __init iop_register_interrupts(void)  {  	if (iop_ism_present) { -		if (oss_present) { -			if (request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, -					IRQ_FLG_LOCK, "ISM IOP", -					(void *) IOP_NUM_ISM)) +		if (macintosh_config->ident == MAC_MODEL_IIFX) { +			if (request_irq(IRQ_MAC_ADB, iop_ism_irq, 0, +					"ISM IOP", (void *)IOP_NUM_ISM))  				pr_err("Couldn't register ISM IOP interrupt\n"); -			oss_irq_enable(IRQ_MAC_ADB);  		} else { -			if (request_irq(IRQ_VIA2_0, iop_ism_irq, -					IRQ_FLG_LOCK|IRQ_FLG_FAST, "ISM IOP", -					(void *) IOP_NUM_ISM)) +			if (request_irq(IRQ_VIA2_0, iop_ism_irq, 0, "ISM IOP", +					(void *)IOP_NUM_ISM))  				pr_err("Couldn't register ISM IOP interrupt\n");  		}  		if (!iop_alive(iop_base[IOP_NUM_ISM])) { diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index 900d899f332..5c1a6b2ff0a 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c @@ -26,10 +26,6 @@   *		  - slot 6: timer 1 (not on IIci)   *		  - slot 7: status of IRQ; signals 'any enabled int.'   * - *	2	- OSS (IIfx only?) - *		  - slot 0: SCSI interrupt - *		  - slot 1: Sound interrupt - *   * Levels 3-6 vary by machine type. For VIA or RBV Macintoshes:   *   *	3	- unused (?) @@ -42,21 +38,30 @@   *   *	6	- off switch (?)   * - * For OSS Macintoshes (IIfx only at this point): + * Machines with Quadra-like VIA hardware, except PSC and PMU machines, support + * an alternate interrupt mapping, as used by A/UX. It spreads ethernet and + * sound out to their own autovector IRQs and gives VIA1 a higher priority:   * - *	3	- Nubus interrupt - *		  - slot 0: Slot $9 - *		  - slot 1: Slot $A - *		  - slot 2: Slot $B - *		  - slot 3: Slot $C - *		  - slot 4: Slot $D - *		  - slot 5: Slot $E + *	1	- unused (?)   * - *	4	- SCC IOP + *	3	- on-board SONIC + * + *	5	- Apple Sound Chip (ASC) + * + *	6	- VIA1 + * + * For OSS Macintoshes (IIfx only), we apply an interrupt mapping similar to + * the Quadra (A/UX) mapping: + * + *	1	- ISM IOP (ADB)   * - *	5	- ISM IOP (ADB?) + *	2	- SCSI   * - *	6	- unused + *	3	- NuBus + * + *	4	- SCC IOP + * + *	6	- VIA1   *   * For PSC Macintoshes (660AV, 840AV):   * @@ -100,88 +105,29 @@   *   case. They're hidden behind the Nubus slot $C interrupt thus adding a   *   third layer of indirection. Why oh why did the Apple engineers do that?   * - * - We support "fast" and "slow" handlers, just like the Amiga port. The - *   fast handlers are called first and with all interrupts disabled. They - *   are expected to execute quickly (hence the name). The slow handlers are - *   called last with interrupts enabled and the interrupt level restored. - *   They must therefore be reentrant. - * - *   TODO: - *   */ -#include <linux/module.h>  #include <linux/types.h>  #include <linux/kernel.h>  #include <linux/sched.h> -#include <linux/kernel_stat.h> -#include <linux/interrupt.h> /* for intr_count */ +#include <linux/interrupt.h> +#include <linux/irq.h>  #include <linux/delay.h> -#include <linux/seq_file.h> -#include <asm/system.h>  #include <asm/irq.h> -#include <asm/traps.h> -#include <asm/bootinfo.h>  #include <asm/macintosh.h> +#include <asm/macints.h>  #include <asm/mac_via.h>  #include <asm/mac_psc.h> +#include <asm/mac_oss.h> +#include <asm/mac_iop.h> +#include <asm/mac_baboon.h>  #include <asm/hwtest.h> -#include <asm/errno.h> -#include <asm/macints.h>  #include <asm/irq_regs.h> -#include <asm/mac_oss.h>  #define SHUTUP_SONIC  /* - * VIA/RBV hooks - */ - -extern void via_register_interrupts(void); -extern void via_irq_enable(int); -extern void via_irq_disable(int); -extern void via_irq_clear(int); -extern int  via_irq_pending(int); - -/* - * OSS hooks - */ - -extern void oss_register_interrupts(void); -extern void oss_irq_enable(int); -extern void oss_irq_disable(int); -extern void oss_irq_clear(int); -extern int  oss_irq_pending(int); - -/* - * PSC hooks - */ - -extern void psc_register_interrupts(void); -extern void psc_irq_enable(int); -extern void psc_irq_disable(int); -extern void psc_irq_clear(int); -extern int  psc_irq_pending(int); - -/* - * IOP hooks - */ - -extern void iop_register_interrupts(void); - -/* - * Baboon hooks - */ - -extern int baboon_present; - -extern void baboon_register_interrupts(void); -extern void baboon_irq_enable(int); -extern void baboon_irq_disable(int); -extern void baboon_irq_clear(int); - -/*   * console_loglevel determines NMI handler function   */ @@ -190,14 +136,15 @@ irqreturn_t mac_debug_handler(int, void *);  /* #define DEBUG_MACINTS */ -void mac_enable_irq(unsigned int irq); -void mac_disable_irq(unsigned int irq); +static unsigned int mac_irq_startup(struct irq_data *); +static void mac_irq_shutdown(struct irq_data *); -static struct irq_controller mac_irq_controller = { +static struct irq_chip mac_irq_chip = {  	.name		= "mac", -	.lock		= __SPIN_LOCK_UNLOCKED(mac_irq_controller.lock), -	.enable		= mac_enable_irq, -	.disable	= mac_disable_irq, +	.irq_enable	= mac_irq_enable, +	.irq_disable	= mac_irq_disable, +	.irq_startup	= mac_irq_startup, +	.irq_shutdown	= mac_irq_shutdown,  };  void __init mac_init_IRQ(void) @@ -205,7 +152,7 @@ void __init mac_init_IRQ(void)  #ifdef DEBUG_MACINTS  	printk("mac_init_IRQ(): Setting things up...\n");  #endif -	m68k_setup_irq_controller(&mac_irq_controller, IRQ_USER, +	m68k_setup_irq_controller(&mac_irq_chip, handle_simple_irq, IRQ_USER,  				  NUM_MAC_SOURCES - IRQ_USER);  	/* Make sure the SONIC interrupt is cleared or things get ugly */  #ifdef SHUTUP_SONIC @@ -241,22 +188,19 @@ void __init mac_init_IRQ(void)  }  /* - *  mac_enable_irq - enable an interrupt source - * mac_disable_irq - disable an interrupt source - *   mac_clear_irq - clears a pending interrupt - * mac_pending_irq - Returns the pending status of an IRQ (nonzero = pending) + *  mac_irq_enable - enable an interrupt source + * mac_irq_disable - disable an interrupt source   *   * These routines are just dispatchers to the VIA/OSS/PSC routines.   */ -void mac_enable_irq(unsigned int irq) +void mac_irq_enable(struct irq_data *data)  { +	int irq = data->irq;  	int irq_src = IRQ_SRC(irq);  	switch(irq_src) {  	case 1: -		via_irq_enable(irq); -		break;  	case 2:  	case 7:  		if (oss_present) @@ -265,6 +209,7 @@ void mac_enable_irq(unsigned int irq)  			via_irq_enable(irq);  		break;  	case 3: +	case 4:  	case 5:  	case 6:  		if (psc_present) @@ -272,10 +217,6 @@ void mac_enable_irq(unsigned int irq)  		else if (oss_present)  			oss_irq_enable(irq);  		break; -	case 4: -		if (psc_present) -			psc_irq_enable(irq); -		break;  	case 8:  		if (baboon_present)  			baboon_irq_enable(irq); @@ -283,14 +224,13 @@ void mac_enable_irq(unsigned int irq)  	}  } -void mac_disable_irq(unsigned int irq) +void mac_irq_disable(struct irq_data *data)  { +	int irq = data->irq;  	int irq_src = IRQ_SRC(irq);  	switch(irq_src) {  	case 1: -		via_irq_disable(irq); -		break;  	case 2:  	case 7:  		if (oss_present) @@ -299,6 +239,7 @@ void mac_disable_irq(unsigned int irq)  			via_irq_disable(irq);  		break;  	case 3: +	case 4:  	case 5:  	case 6:  		if (psc_present) @@ -306,10 +247,6 @@ void mac_disable_irq(unsigned int irq)  		else if (oss_present)  			oss_irq_disable(irq);  		break; -	case 4: -		if (psc_present) -			psc_irq_disable(irq); -		break;  	case 8:  		if (baboon_present)  			baboon_irq_disable(irq); @@ -317,65 +254,27 @@ void mac_disable_irq(unsigned int irq)  	}  } -void mac_clear_irq(unsigned int irq) +static unsigned int mac_irq_startup(struct irq_data *data)  { -	switch(IRQ_SRC(irq)) { -	case 1: -		via_irq_clear(irq); -		break; -	case 2: -	case 7: -		if (oss_present) -			oss_irq_clear(irq); -		else -			via_irq_clear(irq); -		break; -	case 3: -	case 5: -	case 6: -		if (psc_present) -			psc_irq_clear(irq); -		else if (oss_present) -			oss_irq_clear(irq); -		break; -	case 4: -		if (psc_present) -			psc_irq_clear(irq); -		break; -	case 8: -		if (baboon_present) -			baboon_irq_clear(irq); -		break; -	} +	int irq = data->irq; + +	if (IRQ_SRC(irq) == 7 && !oss_present) +		via_nubus_irq_startup(irq); +	else +		mac_irq_enable(data); + +	return 0;  } -int mac_irq_pending(unsigned int irq) +static void mac_irq_shutdown(struct irq_data *data)  { -	switch(IRQ_SRC(irq)) { -	case 1: -		return via_irq_pending(irq); -	case 2: -	case 7: -		if (oss_present) -			return oss_irq_pending(irq); -		else -			return via_irq_pending(irq); -	case 3: -	case 5: -	case 6: -		if (psc_present) -			return psc_irq_pending(irq); -		else if (oss_present) -			return oss_irq_pending(irq); -		break; -	case 4: -		if (psc_present) -			psc_irq_pending(irq); -		break; -	} -	return 0; +	int irq = data->irq; + +	if (IRQ_SRC(irq) == 7 && !oss_present) +		via_nubus_irq_shutdown(irq); +	else +		mac_irq_disable(data);  } -EXPORT_SYMBOL(mac_irq_pending);  static int num_debug[8]; diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index e023fc6b37e..707b61aea20 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -19,15 +19,12 @@  #include <asm/uaccess.h>  #include <asm/io.h>  #include <asm/rtc.h> -#include <asm/system.h>  #include <asm/segment.h>  #include <asm/setup.h>  #include <asm/macintosh.h>  #include <asm/mac_via.h>  #include <asm/mac_oss.h> -#define BOOTINFO_COMPAT_1_0 -#include <asm/bootinfo.h>  #include <asm/machdep.h>  /* Offset between Unix time (1970-based) and Mac time (1904-based) */ @@ -304,35 +301,41 @@ static void via_write_pram(int offset, __u8 data)  static long via_read_time(void)  {  	union { -		__u8  cdata[4]; -		long  idata; +		__u8 cdata[4]; +		long idata;  	} result, last_result; -	int	ct; +	int count = 1; + +	via_pram_command(0x81, &last_result.cdata[3]); +	via_pram_command(0x85, &last_result.cdata[2]); +	via_pram_command(0x89, &last_result.cdata[1]); +	via_pram_command(0x8D, &last_result.cdata[0]);  	/*  	 * The NetBSD guys say to loop until you get the same reading  	 * twice in a row.  	 */ -	ct = 0; -	do { -		if (++ct > 10) { -			printk("via_read_time: couldn't get valid time, " -			       "last read = 0x%08lx and 0x%08lx\n", -			       last_result.idata, result.idata); -			break; -		} - -		last_result.idata = result.idata; -		result.idata = 0; - +	while (1) {  		via_pram_command(0x81, &result.cdata[3]);  		via_pram_command(0x85, &result.cdata[2]);  		via_pram_command(0x89, &result.cdata[1]);  		via_pram_command(0x8D, &result.cdata[0]); -	} while (result.idata != last_result.idata); -	return result.idata - RTC_OFFSET; +		if (result.idata == last_result.idata) +			return result.idata - RTC_OFFSET; + +		if (++count > 10) +			break; + +		last_result.idata = result.idata; +	} + +	pr_err("via_read_time: failed to read a stable value; " +	       "got 0x%08lx then 0x%08lx\n", +	       last_result.idata, result.idata); + +	return 0;  }  /* diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index a9c0f5ab4cc..54037125ebf 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c @@ -1,5 +1,5 @@  /* - *	OSS handling + *	Operating System Services (OSS) chip handling   *	Written by Joshua M. Thompson (funaho@jurai.org)   *   * @@ -19,8 +19,8 @@  #include <linux/mm.h>  #include <linux/delay.h>  #include <linux/init.h> +#include <linux/irq.h> -#include <asm/bootinfo.h>  #include <asm/macintosh.h>  #include <asm/macints.h>  #include <asm/mac_via.h> @@ -29,11 +29,6 @@  int oss_present;  volatile struct mac_oss *oss; -static irqreturn_t oss_irq(int, void *); -static irqreturn_t oss_nubus_irq(int, void *); - -extern irqreturn_t via1_irq(int, void *); -  /*   * Initialize the OSS   * @@ -53,30 +48,8 @@ void __init oss_init(void)  	/* do this by setting the source's interrupt level to zero. */  	for (i = 0; i <= OSS_NUM_SOURCES; i++) { -		oss->irq_level[i] = OSS_IRQLEV_DISABLED; +		oss->irq_level[i] = 0;  	} -	/* If we disable VIA1 here, we never really handle it... */ -	oss->irq_level[OSS_VIA1] = OSS_IRQLEV_VIA1; -} - -/* - * Register the OSS and NuBus interrupt dispatchers. - */ - -void __init oss_register_interrupts(void) -{ -	if (request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, -			"scsi", (void *) oss)) -		pr_err("Couldn't register %s interrupt\n", "scsi"); -	if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, -			"nubus", (void *) oss)) -		pr_err("Couldn't register %s interrupt\n", "nubus"); -	if (request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, -			"sound", (void *) oss)) -		pr_err("Couldn't register %s interrupt\n", "sound"); -	if (request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, -			"via1", (void *) via1)) -		pr_err("Couldn't register %s interrupt\n", "via1");  }  /* @@ -88,36 +61,35 @@ void __init oss_nubus_init(void)  }  /* - * Handle miscellaneous OSS interrupts. Right now that's just sound - * and SCSI; everything else is routed to its own autovector IRQ. + * Handle miscellaneous OSS interrupts.   */ -static irqreturn_t oss_irq(int irq, void *dev_id) +static void oss_irq(unsigned int irq, struct irq_desc *desc)  { -	int events; - -	events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI); -	if (!events) -		return IRQ_NONE; +	int events = oss->irq_pending & +	             (OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM);  #ifdef DEBUG_IRQS  	if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) { -		printk("oss_irq: irq %d events = 0x%04X\n", irq, +		printk("oss_irq: irq %u events = 0x%04X\n", irq,  			(int) oss->irq_pending);  	}  #endif -	/* FIXME: how do you clear a pending IRQ?    */ -	if (events & OSS_IP_SOUND) { -		oss->irq_pending &= ~OSS_IP_SOUND; -		/* FIXME: call sound handler */ -	} else if (events & OSS_IP_SCSI) { +	if (events & OSS_IP_IOPSCC) { +		oss->irq_pending &= ~OSS_IP_IOPSCC; +		generic_handle_irq(IRQ_MAC_SCC); +	} + +	if (events & OSS_IP_SCSI) {  		oss->irq_pending &= ~OSS_IP_SCSI; -		m68k_handle_int(IRQ_MAC_SCSI); -	} else { -		/* FIXME: error check here? */ +		generic_handle_irq(IRQ_MAC_SCSI); +	} + +	if (events & OSS_IP_IOPISM) { +		oss->irq_pending &= ~OSS_IP_IOPISM; +		generic_handle_irq(IRQ_MAC_ADB);  	} -	return IRQ_HANDLED;  }  /* @@ -126,13 +98,13 @@ static irqreturn_t oss_irq(int irq, void *dev_id)   * Unlike the VIA/RBV this is on its own autovector interrupt level.   */ -static irqreturn_t oss_nubus_irq(int irq, void *dev_id) +static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)  {  	int events, irq_bit, i;  	events = oss->irq_pending & OSS_IP_NUBUS;  	if (!events) -		return IRQ_NONE; +		return;  #ifdef DEBUG_NUBUS_INT  	if (console_loglevel > 7) { @@ -148,10 +120,36 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)  		irq_bit >>= 1;  		if (events & irq_bit) {  			oss->irq_pending &= ~irq_bit; -			m68k_handle_int(NUBUS_SOURCE_BASE + i); +			generic_handle_irq(NUBUS_SOURCE_BASE + i);  		}  	} while(events & (irq_bit - 1)); -	return IRQ_HANDLED; +} + +/* + * Register the OSS and NuBus interrupt dispatchers. + * + * This IRQ mapping is laid out with two things in mind: first, we try to keep + * things on their own levels to avoid having to do double-dispatches. Second, + * the levels match as closely as possible the alternate IRQ mapping mode (aka + * "A/UX mode") available on some VIA machines. + */ + +#define OSS_IRQLEV_IOPISM    IRQ_AUTO_1 +#define OSS_IRQLEV_SCSI      IRQ_AUTO_2 +#define OSS_IRQLEV_NUBUS     IRQ_AUTO_3 +#define OSS_IRQLEV_IOPSCC    IRQ_AUTO_4 +#define OSS_IRQLEV_VIA1      IRQ_AUTO_6 + +void __init oss_register_interrupts(void) +{ +	irq_set_chained_handler(OSS_IRQLEV_IOPISM, oss_irq); +	irq_set_chained_handler(OSS_IRQLEV_SCSI,   oss_irq); +	irq_set_chained_handler(OSS_IRQLEV_NUBUS,  oss_nubus_irq); +	irq_set_chained_handler(OSS_IRQLEV_IOPSCC, oss_irq); +	irq_set_chained_handler(OSS_IRQLEV_VIA1,   via1_irq); + +	/* OSS_VIA1 gets enabled here because it has no machspec interrupt. */ +	oss->irq_level[OSS_VIA1] = IRQ_AUTO_6;  }  /* @@ -170,13 +168,13 @@ void oss_irq_enable(int irq) {  	switch(irq) {  		case IRQ_MAC_SCC:  			oss->irq_level[OSS_IOPSCC] = OSS_IRQLEV_IOPSCC; -			break; +			return;  		case IRQ_MAC_ADB:  			oss->irq_level[OSS_IOPISM] = OSS_IRQLEV_IOPISM; -			break; +			return;  		case IRQ_MAC_SCSI:  			oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI; -			break; +			return;  		case IRQ_NUBUS_9:  		case IRQ_NUBUS_A:  		case IRQ_NUBUS_B: @@ -185,13 +183,11 @@ void oss_irq_enable(int irq) {  		case IRQ_NUBUS_E:  			irq -= NUBUS_SOURCE_BASE;  			oss->irq_level[irq] = OSS_IRQLEV_NUBUS; -			break; -#ifdef DEBUG_IRQUSE -		default: -			printk("%s unknown irq %d\n", __func__, irq); -			break; -#endif +			return;  	} + +	if (IRQ_SRC(irq) == 1) +		via_irq_enable(irq);  }  /* @@ -207,50 +203,14 @@ void oss_irq_disable(int irq) {  #endif  	switch(irq) {  		case IRQ_MAC_SCC: -			oss->irq_level[OSS_IOPSCC] = OSS_IRQLEV_DISABLED; -			break; -		case IRQ_MAC_ADB: -			oss->irq_level[OSS_IOPISM] = OSS_IRQLEV_DISABLED; -			break; -		case IRQ_MAC_SCSI: -			oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED; -			break; -		case IRQ_NUBUS_9: -		case IRQ_NUBUS_A: -		case IRQ_NUBUS_B: -		case IRQ_NUBUS_C: -		case IRQ_NUBUS_D: -		case IRQ_NUBUS_E: -			irq -= NUBUS_SOURCE_BASE; -			oss->irq_level[irq] = OSS_IRQLEV_DISABLED; -			break; -#ifdef DEBUG_IRQUSE -		default: -			printk("%s unknown irq %d\n", __func__, irq); -			break; -#endif -	} -} - -/* - * Clear an OSS interrupt - * - * Not sure if this works or not but it's the only method I could - * think of based on the contents of the mac_oss structure. - */ - -void oss_irq_clear(int irq) { -	/* FIXME: how to do this on OSS? */ -	switch(irq) { -		case IRQ_MAC_SCC: -			oss->irq_pending &= ~OSS_IP_IOPSCC; -			break; +			oss->irq_level[OSS_IOPSCC] = 0; +			return;  		case IRQ_MAC_ADB: -			oss->irq_pending &= ~OSS_IP_IOPISM; -			break; +			oss->irq_level[OSS_IOPISM] = 0; +			return;  		case IRQ_MAC_SCSI: -			oss->irq_pending &= ~OSS_IP_SCSI; -			break; +			oss->irq_level[OSS_SCSI] = 0; +			return;  		case IRQ_NUBUS_9:  		case IRQ_NUBUS_A:  		case IRQ_NUBUS_B: @@ -258,36 +218,10 @@ void oss_irq_clear(int irq) {  		case IRQ_NUBUS_D:  		case IRQ_NUBUS_E:  			irq -= NUBUS_SOURCE_BASE; -			oss->irq_pending &= ~(1 << irq); -			break; +			oss->irq_level[irq] = 0; +			return;  	} -} -/* - * Check to see if a specific OSS interrupt is pending - */ - -int oss_irq_pending(int irq) -{ -	switch(irq) { -		case IRQ_MAC_SCC: -			return oss->irq_pending & OSS_IP_IOPSCC; -			break; -		case IRQ_MAC_ADB: -			return oss->irq_pending & OSS_IP_IOPISM; -			break; -		case IRQ_MAC_SCSI: -			return oss->irq_pending & OSS_IP_SCSI; -			break; -		case IRQ_NUBUS_9: -		case IRQ_NUBUS_A: -		case IRQ_NUBUS_B: -		case IRQ_NUBUS_C: -		case IRQ_NUBUS_D: -		case IRQ_NUBUS_E: -			irq -= NUBUS_SOURCE_BASE; -			return oss->irq_pending & (1 << irq); -			break; -	} -	return 0; +	if (IRQ_SRC(irq) == 1) +		via_irq_disable(irq);  } diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index ba6ccab6401..835fa04511c 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c @@ -18,9 +18,9 @@  #include <linux/mm.h>  #include <linux/delay.h>  #include <linux/init.h> +#include <linux/irq.h>  #include <asm/traps.h> -#include <asm/bootinfo.h>  #include <asm/macintosh.h>  #include <asm/macints.h>  #include <asm/mac_psc.h> @@ -30,8 +30,6 @@  int psc_present;  volatile __u8 *psc; -irqreturn_t psc_irq(int, void *); -  /*   * Debugging dump, used in various places to see what's going on.   */ @@ -55,7 +53,7 @@ static void psc_debug_dump(void)   * expanded to cover what I think are the other 7 channels.   */ -static void psc_dma_die_die_die(void) +static __init void psc_dma_die_die_die(void)  {  	int i; @@ -88,7 +86,7 @@ void __init psc_init(void)  	/*  	 * The PSC is always at the same spot, but using psc -	 * keeps things consisant with the psc_xxxx functions. +	 * keeps things consistent with the psc_xxxx functions.  	 */  	psc = (void *) PSC_BASE; @@ -112,52 +110,52 @@ void __init psc_init(void)  }  /* - * Register the PSC interrupt dispatchers for autovector interrupts 3-6. - */ - -void __init psc_register_interrupts(void) -{ -	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30)) -		pr_err("Couldn't register psc%d interrupt\n", 3); -	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40)) -		pr_err("Couldn't register psc%d interrupt\n", 4); -	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50)) -		pr_err("Couldn't register psc%d interrupt\n", 5); -	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60)) -		pr_err("Couldn't register psc%d interrupt\n", 6); -} - -/*   * PSC interrupt handler. It's a lot like the VIA interrupt handler.   */ -irqreturn_t psc_irq(int irq, void *dev_id) +static void psc_irq(unsigned int irq, struct irq_desc *desc)  { -	int pIFR	= pIFRbase + ((int) dev_id); -	int pIER	= pIERbase + ((int) dev_id); +	unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); +	int pIFR	= pIFRbase + offset; +	int pIER	= pIERbase + offset;  	int irq_num;  	unsigned char irq_bit, events;  #ifdef DEBUG_IRQS -	printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n", +	printk("psc_irq: irq %u pIFR = 0x%02X pIER = 0x%02X\n",  		irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));  #endif  	events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;  	if (!events) -		return IRQ_NONE; +		return;  	irq_num = irq << 3;  	irq_bit = 1;  	do {  		if (events & irq_bit) {  			psc_write_byte(pIFR, irq_bit); -			m68k_handle_int(irq_num); +			generic_handle_irq(irq_num);  		}  		irq_num++;  		irq_bit <<= 1;  	} while (events >= irq_bit); -	return IRQ_HANDLED; +} + +/* + * Register the PSC interrupt dispatchers for autovector interrupts 3-6. + */ + +void __init psc_register_interrupts(void) +{ +	irq_set_chained_handler(IRQ_AUTO_3, psc_irq); +	irq_set_handler_data(IRQ_AUTO_3, (void *)0x30); +	irq_set_chained_handler(IRQ_AUTO_4, psc_irq); +	irq_set_handler_data(IRQ_AUTO_4, (void *)0x40); +	irq_set_chained_handler(IRQ_AUTO_5, psc_irq); +	irq_set_handler_data(IRQ_AUTO_5, (void *)0x50); +	irq_set_chained_handler(IRQ_AUTO_6, psc_irq); +	irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);  }  void psc_irq_enable(int irq) { @@ -181,20 +179,3 @@ void psc_irq_disable(int irq) {  #endif  	psc_write_byte(pIER, 1 << irq_idx);  } - -void psc_irq_clear(int irq) { -	int irq_src	= IRQ_SRC(irq); -	int irq_idx	= IRQ_IDX(irq); -	int pIFR	= pIERbase + (irq_src << 4); - -	psc_write_byte(pIFR, 1 << irq_idx); -} - -int psc_irq_pending(int irq) -{ -	int irq_src	= IRQ_SRC(irq); -	int irq_idx	= IRQ_IDX(irq); -	int pIFR	= pIERbase + (irq_src << 4); - -	return psc_read_byte(pIFR) & (1 << irq_idx); -} diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index e71166daec6..e198dec868e 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -28,8 +28,8 @@  #include <linux/delay.h>  #include <linux/init.h>  #include <linux/module.h> +#include <linux/irq.h> -#include <asm/bootinfo.h>  #include <asm/macintosh.h>  #include <asm/macints.h>  #include <asm/mac_via.h> @@ -62,27 +62,50 @@ static int gIER,gIFR,gBufA,gBufB;  #define MAC_CLOCK_LOW		(MAC_CLOCK_TICK&0xFF)  #define MAC_CLOCK_HIGH		(MAC_CLOCK_TICK>>8) -/* To disable a NuBus slot on Quadras we make that slot IRQ line an output set - * high. On RBV we just use the slot interrupt enable register. On Macs with - * genuine VIA chips we must use nubus_disabled to keep track of disabled slot - * interrupts. When any slot IRQ is disabled we mask the (edge triggered) CA1 - * or "SLOTS" interrupt. When no slot is disabled, we unmask the CA1 interrupt. - * So, on genuine VIAs, having more than one NuBus IRQ can mean trouble, - * because closing one of those drivers can mask all of the NuBus interrupts. - * Also, since we can't mask the unregistered slot IRQs on genuine VIAs, it's - * possible to get interrupts from cards that MacOS or the ROM has configured - * but we have not. FWIW, "Designing Cards and Drivers for Macintosh II and - * Macintosh SE", page 9-8, says, a slot IRQ with no driver would crash MacOS. + +/* + * On Macs with a genuine VIA chip there is no way to mask an individual slot + * interrupt. This limitation also seems to apply to VIA clone logic cores in + * Quadra-like ASICs. (RBV and OSS machines don't have this limitation.) + * + * We used to fake it by configuring the relevent VIA pin as an output + * (to mask the interrupt) or input (to unmask). That scheme did not work on + * (at least) the Quadra 700. A NuBus card's /NMRQ signal is an open-collector + * circuit (see Designing Cards and Drivers for Macintosh II and Macintosh SE, + * p. 10-11 etc) but VIA outputs are not (see datasheet). + * + * Driving these outputs high must cause the VIA to source current and the + * card to sink current when it asserts /NMRQ. Current will flow but the pin + * voltage is uncertain and so the /NMRQ condition may still cause a transition + * at the VIA2 CA1 input (which explains the lost interrupts). A side effect + * is that a disabled slot IRQ can never be tested as pending or not. + * + * Driving these outputs low doesn't work either. All the slot /NMRQ lines are + * (active low) OR'd together to generate the CA1 (aka "SLOTS") interrupt (see + * The Guide To Macintosh Family Hardware, 2nd edition p. 167). If we drive a + * disabled /NMRQ line low, the falling edge immediately triggers a CA1 + * interrupt and all slot interrupts after that will generate no transition + * and therefore no interrupt, even after being re-enabled. + * + * So we make the VIA port A I/O lines inputs and use nubus_disabled to keep + * track of their states. When any slot IRQ becomes disabled we mask the CA1 + * umbrella interrupt. Only when all slot IRQs become enabled do we unmask + * the CA1 interrupt. It must remain enabled even when cards have no interrupt + * handler registered. Drivers must therefore disable a slot interrupt at the + * device before they call free_irq (like shared and autovector interrupts). + * + * There is also a related problem when MacOS is used to boot Linux. A network + * card brought up by a MacOS driver may raise an interrupt while Linux boots. + * This can be fatal since it can't be handled until the right driver loads + * (if such a driver exists at all). Apparently related to this hardware + * limitation, "Designing Cards and Drivers", p. 9-8, says that a slot + * interrupt with no driver would crash MacOS (the book was written before + * the appearance of Macs with RBV or OSS).   */ +  static u8 nubus_disabled;  void via_debug_dump(void); -irqreturn_t via1_irq(int, void *); -irqreturn_t via2_irq(int, void *); -irqreturn_t via_nubus_irq(int, void *); -void via_irq_enable(int irq); -void via_irq_disable(int irq); -void via_irq_clear(int irq);  /*   * Initialize the VIAs @@ -102,7 +125,7 @@ void __init via_init(void)  		/* IIci, IIsi, IIvx, IIvi (P6xx), LC series */ -		case MAC_VIA_IIci: +		case MAC_VIA_IICI:  			via1 = (void *) VIA1_BASE;  			if (macintosh_config->ident == MAC_MODEL_IIFX) {  				via2 = NULL; @@ -199,38 +222,17 @@ void __init via_init(void)  	if (oss_present)  		return; -	/* Some machines support an alternate IRQ mapping that spreads  */ -	/* Ethernet and Sound out to their own autolevel IRQs and moves */ -	/* VIA1 to level 6. A/UX uses this mapping and we do too.  Note */ -	/* that the IIfx emulates this alternate mapping using the OSS. */ - -	via_alt_mapping = 0; -	if (macintosh_config->via_type == MAC_VIA_QUADRA) -		switch (macintosh_config->ident) { -		case MAC_MODEL_C660: -		case MAC_MODEL_Q840: -			/* not applicable */ -			break; -		case MAC_MODEL_P588: -		case MAC_MODEL_TV: -		case MAC_MODEL_PB140: -		case MAC_MODEL_PB145: -		case MAC_MODEL_PB160: -		case MAC_MODEL_PB165: -		case MAC_MODEL_PB165C: -		case MAC_MODEL_PB170: -		case MAC_MODEL_PB180: -		case MAC_MODEL_PB180C: -		case MAC_MODEL_PB190: -		case MAC_MODEL_PB520: -			/* not yet tested */ -			break; -		default: -			via_alt_mapping = 1; -			via1[vDirB] |= 0x40; -			via1[vBufB] &= ~0x40; -			break; -		} +	if ((macintosh_config->via_type == MAC_VIA_QUADRA) && +	    (macintosh_config->adb_type != MAC_ADB_PB1) && +	    (macintosh_config->adb_type != MAC_ADB_PB2) && +	    (macintosh_config->ident    != MAC_MODEL_C660) && +	    (macintosh_config->ident    != MAC_MODEL_Q840)) { +		via_alt_mapping = 1; +		via1[vDirB] |= 0x40; +		via1[vBufB] &= ~0x40; +	} else { +		via_alt_mapping = 0; +	}  	/*  	 * Now initialize VIA2. For RBV we just kill all interrupts; @@ -250,22 +252,28 @@ void __init via_init(void)  		via2[vACR] &= ~0x03; /* disable port A & B latches */  	} +	/* Everything below this point is VIA2 only... */ + +	if (rbv_present) +		return; +  	/* -	 * Set vPCR for control line interrupts (but not on RBV) +	 * Set vPCR for control line interrupts. +	 * +	 * CA1 (SLOTS IRQ), CB1 (ASC IRQ): negative edge trigger. +	 * +	 * Macs with ESP SCSI have a negative edge triggered SCSI interrupt. +	 * Testing reveals that PowerBooks do too. However, the SE/30 +	 * schematic diagram shows an active high NCR5380 IRQ line.  	 */ -	if (!rbv_present) { -		/* For all VIA types, CA1 (SLOTS IRQ) and CB1 (ASC IRQ) -		 * are made negative edge triggered here. -		 */ -		if (macintosh_config->scsi_type == MAC_SCSI_OLD) { -			/* CB2 (IRQ) indep. input, positive edge */ -			/* CA2 (DRQ) indep. input, positive edge */ -			via2[vPCR] = 0x66; -		} else { -			/* CB2 (IRQ) indep. input, negative edge */ -			/* CA2 (DRQ) indep. input, negative edge */ -			via2[vPCR] = 0x22; -		} + +	pr_debug("VIA2 vPCR is 0x%02X\n", via2[vPCR]); +	if (macintosh_config->via_type == MAC_VIA_II) { +		/* CA2 (SCSI DRQ), CB2 (SCSI IRQ): indep. input, pos. edge */ +		via2[vPCR] = 0x66; +	} else { +		/* CA2 (SCSI DRQ), CB2 (SCSI IRQ): indep. input, neg. edge */ +		via2[vPCR] = 0x22;  	}  } @@ -281,40 +289,11 @@ void __init via_init_clock(irq_handler_t func)  	via1[vT1CL] = MAC_CLOCK_LOW;  	via1[vT1CH] = MAC_CLOCK_HIGH; -	if (request_irq(IRQ_MAC_TIMER_1, func, IRQ_FLG_LOCK, "timer", func)) +	if (request_irq(IRQ_MAC_TIMER_1, func, 0, "timer", func))  		pr_err("Couldn't register %s interrupt\n", "timer");  }  /* - * Register the interrupt dispatchers for VIA or RBV machines only. - */ - -void __init via_register_interrupts(void) -{ -	if (via_alt_mapping) { -		if (request_irq(IRQ_AUTO_1, via1_irq, -				IRQ_FLG_LOCK|IRQ_FLG_FAST, "software", -				(void *) via1)) -			pr_err("Couldn't register %s interrupt\n", "software"); -		if (request_irq(IRQ_AUTO_6, via1_irq, -				IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", -				(void *) via1)) -			pr_err("Couldn't register %s interrupt\n", "via1"); -	} else { -		if (request_irq(IRQ_AUTO_1, via1_irq, -				IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", -				(void *) via1)) -			pr_err("Couldn't register %s interrupt\n", "via1"); -	} -	if (request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, -			"via2", (void *) via2)) -		pr_err("Couldn't register %s interrupt\n", "via2"); -	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, -			IRQ_FLG_LOCK|IRQ_FLG_FAST, "nubus", (void *) via2)) -		pr_err("Couldn't register %s interrupt\n", "nubus"); -} - -/*   * Debugging dump, used in various places to see what's going on.   */ @@ -347,7 +326,7 @@ void via_debug_dump(void)   * TBI: get time offset between scheduling timer ticks   */ -unsigned long mac_gettimeoffset (void) +u32 mac_gettimeoffset(void)  {  	unsigned long ticks, offset = 0; @@ -361,7 +340,7 @@ unsigned long mac_gettimeoffset (void)  	ticks = MAC_CLOCK_TICK - ticks;  	ticks = ticks * 10000L / MAC_CLOCK_TICK; -	return ticks + offset; +	return (ticks + offset) * 1000;  }  /* @@ -409,34 +388,55 @@ void __init via_nubus_init(void)  		via2[gBufB] |= 0x02;  	} -	/* Disable all the slot interrupts (where possible). */ +	/* +	 * Disable the slot interrupts. On some hardware that's not possible. +	 * On some hardware it's unclear what all of these I/O lines do. +	 */  	switch (macintosh_config->via_type) {  	case MAC_VIA_II: -		/* Just make the port A lines inputs. */ -		switch(macintosh_config->ident) { -		case MAC_MODEL_II: -		case MAC_MODEL_IIX: -		case MAC_MODEL_IICX: -		case MAC_MODEL_SE30: -			/* The top two bits are RAM size outputs. */ -			via2[vDirA] &= 0xC0; -			break; -		default: -			via2[vDirA] &= 0x80; -		} +	case MAC_VIA_QUADRA: +		pr_debug("VIA2 vDirA is 0x%02X\n", via2[vDirA]);  		break; -	case MAC_VIA_IIci: +	case MAC_VIA_IICI:  		/* RBV. Disable all the slot interrupts. SIER works like IER. */  		via2[rSIER] = 0x7F;  		break; +	} +} + +void via_nubus_irq_startup(int irq) +{ +	int irq_idx = IRQ_IDX(irq); + +	switch (macintosh_config->via_type) { +	case MAC_VIA_II:  	case MAC_VIA_QUADRA: -		/* Disable the inactive slot interrupts by making those lines outputs. */ -		if ((macintosh_config->adb_type != MAC_ADB_PB1) && -		    (macintosh_config->adb_type != MAC_ADB_PB2)) { -			via2[vBufA] |= 0x7F; -			via2[vDirA] |= 0x7F; +		/* Make the port A line an input. Probably redundant. */ +		if (macintosh_config->via_type == MAC_VIA_II) { +			/* The top two bits are RAM size outputs. */ +			via2[vDirA] &= 0xC0 | ~(1 << irq_idx); +		} else { +			/* Allow NuBus slots 9 through F. */ +			via2[vDirA] &= 0x80 | ~(1 << irq_idx);  		} +		/* fall through */ +	case MAC_VIA_IICI: +		via_irq_enable(irq); +		break; +	} +} + +void via_nubus_irq_shutdown(int irq) +{ +	switch (macintosh_config->via_type) { +	case MAC_VIA_II: +	case MAC_VIA_QUADRA: +		/* Ensure that the umbrella CA1 interrupt remains enabled. */ +		via_irq_enable(irq); +		break; +	case MAC_VIA_IICI: +		via_irq_disable(irq);  		break;  	}  } @@ -446,48 +446,46 @@ void __init via_nubus_init(void)   * via6522.c :-), disable/pending masks added.   */ -irqreturn_t via1_irq(int irq, void *dev_id) +void via1_irq(unsigned int irq, struct irq_desc *desc)  {  	int irq_num;  	unsigned char irq_bit, events;  	events = via1[vIFR] & via1[vIER] & 0x7F;  	if (!events) -		return IRQ_NONE; +		return;  	irq_num = VIA1_SOURCE_BASE;  	irq_bit = 1;  	do {  		if (events & irq_bit) {  			via1[vIFR] = irq_bit; -			m68k_handle_int(irq_num); +			generic_handle_irq(irq_num);  		}  		++irq_num;  		irq_bit <<= 1;  	} while (events >= irq_bit); -	return IRQ_HANDLED;  } -irqreturn_t via2_irq(int irq, void *dev_id) +static void via2_irq(unsigned int irq, struct irq_desc *desc)  {  	int irq_num;  	unsigned char irq_bit, events;  	events = via2[gIFR] & via2[gIER] & 0x7F;  	if (!events) -		return IRQ_NONE; +		return;  	irq_num = VIA2_SOURCE_BASE;  	irq_bit = 1;  	do {  		if (events & irq_bit) {  			via2[gIFR] = irq_bit | rbv_clear; -			m68k_handle_int(irq_num); +			generic_handle_irq(irq_num);  		}  		++irq_num;  		irq_bit <<= 1;  	} while (events >= irq_bit); -	return IRQ_HANDLED;  }  /* @@ -495,7 +493,7 @@ irqreturn_t via2_irq(int irq, void *dev_id)   * VIA2 dispatcher as a fast interrupt handler.   */ -irqreturn_t via_nubus_irq(int irq, void *dev_id) +void via_nubus_irq(unsigned int irq, struct irq_desc *desc)  {  	int slot_irq;  	unsigned char slot_bit, events; @@ -506,7 +504,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)  	else  		events &= ~via2[vDirA];  	if (!events) -		return IRQ_NONE; +		return;  	do {  		slot_irq = IRQ_NUBUS_F; @@ -514,7 +512,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)  		do {  			if (events & slot_bit) {  				events &= ~slot_bit; -				m68k_handle_int(slot_irq); +				generic_handle_irq(slot_irq);  			}  			--slot_irq;  			slot_bit >>= 1; @@ -528,7 +526,24 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)  		else  			events &= ~via2[vDirA];  	} while (events); -	return IRQ_HANDLED; +} + +/* + * Register the interrupt dispatchers for VIA or RBV machines only. + */ + +void __init via_register_interrupts(void) +{ +	if (via_alt_mapping) { +		/* software interrupt */ +		irq_set_chained_handler(IRQ_AUTO_1, via1_irq); +		/* via1 interrupt */ +		irq_set_chained_handler(IRQ_AUTO_6, via1_irq); +	} else { +		irq_set_chained_handler(IRQ_AUTO_1, via1_irq); +	} +	irq_set_chained_handler(IRQ_AUTO_2, via2_irq); +	irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);  }  void via_irq_enable(int irq) { @@ -547,25 +562,18 @@ void via_irq_enable(int irq) {  	} else if (irq_src == 7) {  		switch (macintosh_config->via_type) {  		case MAC_VIA_II: +		case MAC_VIA_QUADRA:  			nubus_disabled &= ~(1 << irq_idx);  			/* Enable the CA1 interrupt when no slot is disabled. */  			if (!nubus_disabled)  				via2[gIER] = IER_SET_BIT(1);  			break; -		case MAC_VIA_IIci: +		case MAC_VIA_IICI:  			/* On RBV, enable the slot interrupt.  			 * SIER works like IER.  			 */  			via2[rSIER] = IER_SET_BIT(irq_idx);  			break; -		case MAC_VIA_QUADRA: -			/* Make the port A line an input to enable the slot irq. -			 * But not on PowerBooks, that's ADB. -			 */ -			if ((macintosh_config->adb_type != MAC_ADB_PB1) && -			    (macintosh_config->adb_type != MAC_ADB_PB2)) -				via2[vDirA] &= ~(1 << irq_idx); -			break;  		}  	}  } @@ -585,60 +593,18 @@ void via_irq_disable(int irq) {  	} else if (irq_src == 7) {  		switch (macintosh_config->via_type) {  		case MAC_VIA_II: +		case MAC_VIA_QUADRA:  			nubus_disabled |= 1 << irq_idx;  			if (nubus_disabled)  				via2[gIER] = IER_CLR_BIT(1);  			break; -		case MAC_VIA_IIci: +		case MAC_VIA_IICI:  			via2[rSIER] = IER_CLR_BIT(irq_idx);  			break; -		case MAC_VIA_QUADRA: -			if ((macintosh_config->adb_type != MAC_ADB_PB1) && -			    (macintosh_config->adb_type != MAC_ADB_PB2)) -				via2[vDirA] |= 1 << irq_idx; -			break;  		}  	}  } -void via_irq_clear(int irq) { -	int irq_src	= IRQ_SRC(irq); -	int irq_idx	= IRQ_IDX(irq); -	int irq_bit	= 1 << irq_idx; - -	if (irq_src == 1) { -		via1[vIFR] = irq_bit; -	} else if (irq_src == 2) { -		via2[gIFR] = irq_bit | rbv_clear; -	} else if (irq_src == 7) { -		/* FIXME: There is no way to clear an individual nubus slot -		 * IRQ flag, other than getting the device to do it. -		 */ -	} -} - -/* - * Returns nonzero if an interrupt is pending on the given - * VIA/IRQ combination. - */ - -int via_irq_pending(int irq) -{ -	int irq_src	= IRQ_SRC(irq); -	int irq_idx	= IRQ_IDX(irq); -	int irq_bit	= 1 << irq_idx; - -	if (irq_src == 1) { -		return via1[vIFR] & irq_bit; -	} else if (irq_src == 2) { -		return via2[gIFR] & irq_bit; -	} else if (irq_src == 7) { -		/* Always 0 for MAC_VIA_QUADRA if the slot irq is disabled. */ -		return ~via2[gBufA] & irq_bit; -	} -	return 0; -} -  void via1_set_head(int head)  {  	if (head == 0) @@ -647,3 +613,9 @@ void via1_set_head(int head)  		via1[vBufA] |= VIA1A_vHeadSel;  }  EXPORT_SYMBOL(via1_set_head); + +int via2_scsi_drq_pending(void) +{ +	return via2[gIFR] & (1 << IRQ_IDX(IRQ_MAC_SCSIDRQ)); +} +EXPORT_SYMBOL(via2_scsi_drq_pending); diff --git a/arch/m68k/math-emu/Makefile b/arch/m68k/math-emu/Makefile index a0935bf9836..547c23c6e40 100644 --- a/arch/m68k/math-emu/Makefile +++ b/arch/m68k/math-emu/Makefile @@ -2,8 +2,8 @@  # Makefile for the linux kernel.  # -#EXTRA_AFLAGS += -DFPU_EMU_DEBUG -#EXTRA_CFLAGS += -DFPU_EMU_DEBUG +#asflags-y := -DFPU_EMU_DEBUG +#ccflags-y := -DFPU_EMU_DEBUG  obj-y		:= fp_entry.o fp_scan.o fp_util.o fp_move.o fp_movem.o \  			fp_cond.o fp_arith.o fp_log.o fp_trig.o diff --git a/arch/m68k/math-emu/fp_arith.c b/arch/m68k/math-emu/fp_arith.c index 08f286db3c5..239eb199018 100644 --- a/arch/m68k/math-emu/fp_arith.c +++ b/arch/m68k/math-emu/fp_arith.c @@ -519,7 +519,7 @@ static void fp_roundint(struct fp_ext *dest, int mode)  				return;  			break;  		case 0x401e: -			if (!(oldmant.m32[1] >= 0)) +			if (oldmant.m32[1] & 0x80000000)  				return;  			if (oldmant.m32[0] & 1)  				break; diff --git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c index 367ecee2f98..0663067870f 100644 --- a/arch/m68k/math-emu/fp_log.c +++ b/arch/m68k/math-emu/fp_log.c @@ -50,7 +50,7 @@ fp_fsqrt(struct fp_ext *dest, struct fp_ext *src)  	 * sqrt(m*2^e) =  	 *		 sqrt(2*m) * 2^(p)	, if e = 2*p + 1  	 * -	 * So we use the last bit of the exponent to decide wether to +	 * So we use the last bit of the exponent to decide whether to  	 * use the m or 2*m.  	 *  	 * Since only the fractional part of the mantissa is stored and @@ -105,9 +105,6 @@ fp_fetoxm1(struct fp_ext *dest, struct fp_ext *src)  	fp_monadic_check(dest, src); -	if (IS_ZERO(dest)) -		return dest; -  	return dest;  } diff --git a/arch/m68k/math-emu/multi_arith.h b/arch/m68k/math-emu/multi_arith.h index 4ad0ca918e2..4b5eb3d8563 100644 --- a/arch/m68k/math-emu/multi_arith.h +++ b/arch/m68k/math-emu/multi_arith.h @@ -19,246 +19,6 @@  #ifndef MULTI_ARITH_H  #define MULTI_ARITH_H -#if 0	/* old code... */ - -/* Unsigned only, because we don't need signs to multiply and divide. */ -typedef unsigned int int128[4]; - -/* Word order */ -enum { -	MSW128, -	NMSW128, -	NLSW128, -	LSW128 -}; - -/* big-endian */ -#define LO_WORD(ll) (((unsigned int *) &ll)[1]) -#define HI_WORD(ll) (((unsigned int *) &ll)[0]) - -/* Convenience functions to stuff various integer values into int128s */ - -static inline void zero128(int128 a) -{ -	a[LSW128] = a[NLSW128] = a[NMSW128] = a[MSW128] = 0; -} - -/* Human-readable word order in the arguments */ -static inline void set128(unsigned int i3, unsigned int i2, unsigned int i1, -			  unsigned int i0, int128 a) -{ -	a[LSW128] = i0; -	a[NLSW128] = i1; -	a[NMSW128] = i2; -	a[MSW128] = i3; -} - -/* Convenience functions (for testing as well) */ -static inline void int64_to_128(unsigned long long src, int128 dest) -{ -	dest[LSW128] = (unsigned int) src; -	dest[NLSW128] = src >> 32; -	dest[NMSW128] = dest[MSW128] = 0; -} - -static inline void int128_to_64(const int128 src, unsigned long long *dest) -{ -	*dest = src[LSW128] | (long long) src[NLSW128] << 32; -} - -static inline void put_i128(const int128 a) -{ -	printk("%08x %08x %08x %08x\n", a[MSW128], a[NMSW128], -	       a[NLSW128], a[LSW128]); -} - -/* Internal shifters: - -   Note that these are only good for 0 < count < 32. - */ - -static inline void _lsl128(unsigned int count, int128 a) -{ -	a[MSW128] = (a[MSW128] << count) | (a[NMSW128] >> (32 - count)); -	a[NMSW128] = (a[NMSW128] << count) | (a[NLSW128] >> (32 - count)); -	a[NLSW128] = (a[NLSW128] << count) | (a[LSW128] >> (32 - count)); -	a[LSW128] <<= count; -} - -static inline void _lsr128(unsigned int count, int128 a) -{ -	a[LSW128] = (a[LSW128] >> count) | (a[NLSW128] << (32 - count)); -	a[NLSW128] = (a[NLSW128] >> count) | (a[NMSW128] << (32 - count)); -	a[NMSW128] = (a[NMSW128] >> count) | (a[MSW128] << (32 - count)); -	a[MSW128] >>= count; -} - -/* Should be faster, one would hope */ - -static inline void lslone128(int128 a) -{ -	asm volatile ("lsl.l #1,%0\n" -		      "roxl.l #1,%1\n" -		      "roxl.l #1,%2\n" -		      "roxl.l #1,%3\n" -		      : -		      "=d" (a[LSW128]), -		      "=d"(a[NLSW128]), -		      "=d"(a[NMSW128]), -		      "=d"(a[MSW128]) -		      : -		      "0"(a[LSW128]), -		      "1"(a[NLSW128]), -		      "2"(a[NMSW128]), -		      "3"(a[MSW128])); -} - -static inline void lsrone128(int128 a) -{ -	asm volatile ("lsr.l #1,%0\n" -		      "roxr.l #1,%1\n" -		      "roxr.l #1,%2\n" -		      "roxr.l #1,%3\n" -		      : -		      "=d" (a[MSW128]), -		      "=d"(a[NMSW128]), -		      "=d"(a[NLSW128]), -		      "=d"(a[LSW128]) -		      : -		      "0"(a[MSW128]), -		      "1"(a[NMSW128]), -		      "2"(a[NLSW128]), -		      "3"(a[LSW128])); -} - -/* Generalized 128-bit shifters: - -   These bit-shift to a multiple of 32, then move whole longwords.  */ - -static inline void lsl128(unsigned int count, int128 a) -{ -	int wordcount, i; - -	if (count % 32) -		_lsl128(count % 32, a); - -	if (0 == (wordcount = count / 32)) -		return; - -	/* argh, gak, endian-sensitive */ -	for (i = 0; i < 4 - wordcount; i++) { -		a[i] = a[i + wordcount]; -	} -	for (i = 3; i >= 4 - wordcount; --i) { -		a[i] = 0; -	} -} - -static inline void lsr128(unsigned int count, int128 a) -{ -	int wordcount, i; - -	if (count % 32) -		_lsr128(count % 32, a); - -	if (0 == (wordcount = count / 32)) -		return; - -	for (i = 3; i >= wordcount; --i) { -		a[i] = a[i - wordcount]; -	} -	for (i = 0; i < wordcount; i++) { -		a[i] = 0; -	} -} - -static inline int orl128(int a, int128 b) -{ -	b[LSW128] |= a; -} - -static inline int btsthi128(const int128 a) -{ -	return a[MSW128] & 0x80000000; -} - -/* test bits (numbered from 0 = LSB) up to and including "top" */ -static inline int bftestlo128(int top, const int128 a) -{ -	int r = 0; - -	if (top > 31) -		r |= a[LSW128]; -	if (top > 63) -		r |= a[NLSW128]; -	if (top > 95) -		r |= a[NMSW128]; - -	r |= a[3 - (top / 32)] & ((1 << (top % 32 + 1)) - 1); - -	return (r != 0); -} - -/* Aargh.  We need these because GCC is broken */ -/* FIXME: do them in assembly, for goodness' sake! */ -static inline void mask64(int pos, unsigned long long *mask) -{ -	*mask = 0; - -	if (pos < 32) { -		LO_WORD(*mask) = (1 << pos) - 1; -		return; -	} -	LO_WORD(*mask) = -1; -	HI_WORD(*mask) = (1 << (pos - 32)) - 1; -} - -static inline void bset64(int pos, unsigned long long *dest) -{ -	/* This conditional will be optimized away.  Thanks, GCC! */ -	if (pos < 32) -		asm volatile ("bset %1,%0":"=m" -			      (LO_WORD(*dest)):"id"(pos)); -	else -		asm volatile ("bset %1,%0":"=m" -			      (HI_WORD(*dest)):"id"(pos - 32)); -} - -static inline int btst64(int pos, unsigned long long dest) -{ -	if (pos < 32) -		return (0 != (LO_WORD(dest) & (1 << pos))); -	else -		return (0 != (HI_WORD(dest) & (1 << (pos - 32)))); -} - -static inline void lsl64(int count, unsigned long long *dest) -{ -	if (count < 32) { -		HI_WORD(*dest) = (HI_WORD(*dest) << count) -		    | (LO_WORD(*dest) >> count); -		LO_WORD(*dest) <<= count; -		return; -	} -	count -= 32; -	HI_WORD(*dest) = LO_WORD(*dest) << count; -	LO_WORD(*dest) = 0; -} - -static inline void lsr64(int count, unsigned long long *dest) -{ -	if (count < 32) { -		LO_WORD(*dest) = (LO_WORD(*dest) >> count) -		    | (HI_WORD(*dest) << (32 - count)); -		HI_WORD(*dest) >>= count; -		return; -	} -	count -= 32; -	LO_WORD(*dest) = HI_WORD(*dest) >> count; -	HI_WORD(*dest) = 0; -} -#endif -  static inline void fp_denormalize(struct fp_ext *reg, unsigned int cnt)  {  	reg->exp += cnt; @@ -481,117 +241,6 @@ static inline void fp_dividemant(union fp_mant128 *dest, struct fp_ext *src,  	}  } -#if 0 -static inline unsigned int fp_fls128(union fp_mant128 *src) -{ -	unsigned long data; -	unsigned int res, off; - -	if ((data = src->m32[0])) -		off = 0; -	else if ((data = src->m32[1])) -		off = 32; -	else if ((data = src->m32[2])) -		off = 64; -	else if ((data = src->m32[3])) -		off = 96; -	else -		return 128; - -	asm ("bfffo %1{#0,#32},%0" : "=d" (res) : "dm" (data)); -	return res + off; -} - -static inline void fp_shiftmant128(union fp_mant128 *src, int shift) -{ -	unsigned long sticky; - -	switch (shift) { -	case 0: -		return; -	case 1: -		asm volatile ("lsl.l #1,%0" -			: "=d" (src->m32[3]) : "0" (src->m32[3])); -		asm volatile ("roxl.l #1,%0" -			: "=d" (src->m32[2]) : "0" (src->m32[2])); -		asm volatile ("roxl.l #1,%0" -			: "=d" (src->m32[1]) : "0" (src->m32[1])); -		asm volatile ("roxl.l #1,%0" -			: "=d" (src->m32[0]) : "0" (src->m32[0])); -		return; -	case 2 ... 31: -		src->m32[0] = (src->m32[0] << shift) | (src->m32[1] >> (32 - shift)); -		src->m32[1] = (src->m32[1] << shift) | (src->m32[2] >> (32 - shift)); -		src->m32[2] = (src->m32[2] << shift) | (src->m32[3] >> (32 - shift)); -		src->m32[3] = (src->m32[3] << shift); -		return; -	case 32 ... 63: -		shift -= 32; -		src->m32[0] = (src->m32[1] << shift) | (src->m32[2] >> (32 - shift)); -		src->m32[1] = (src->m32[2] << shift) | (src->m32[3] >> (32 - shift)); -		src->m32[2] = (src->m32[3] << shift); -		src->m32[3] = 0; -		return; -	case 64 ... 95: -		shift -= 64; -		src->m32[0] = (src->m32[2] << shift) | (src->m32[3] >> (32 - shift)); -		src->m32[1] = (src->m32[3] << shift); -		src->m32[2] = src->m32[3] = 0; -		return; -	case 96 ... 127: -		shift -= 96; -		src->m32[0] = (src->m32[3] << shift); -		src->m32[1] = src->m32[2] = src->m32[3] = 0; -		return; -	case -31 ... -1: -		shift = -shift; -		sticky = 0; -		if (src->m32[3] << (32 - shift)) -			sticky = 1; -		src->m32[3] = (src->m32[3] >> shift) | (src->m32[2] << (32 - shift)) | sticky; -		src->m32[2] = (src->m32[2] >> shift) | (src->m32[1] << (32 - shift)); -		src->m32[1] = (src->m32[1] >> shift) | (src->m32[0] << (32 - shift)); -		src->m32[0] = (src->m32[0] >> shift); -		return; -	case -63 ... -32: -		shift = -shift - 32; -		sticky = 0; -		if ((src->m32[2] << (32 - shift)) || src->m32[3]) -			sticky = 1; -		src->m32[3] = (src->m32[2] >> shift) | (src->m32[1] << (32 - shift)) | sticky; -		src->m32[2] = (src->m32[1] >> shift) | (src->m32[0] << (32 - shift)); -		src->m32[1] = (src->m32[0] >> shift); -		src->m32[0] = 0; -		return; -	case -95 ... -64: -		shift = -shift - 64; -		sticky = 0; -		if ((src->m32[1] << (32 - shift)) || src->m32[2] || src->m32[3]) -			sticky = 1; -		src->m32[3] = (src->m32[1] >> shift) | (src->m32[0] << (32 - shift)) | sticky; -		src->m32[2] = (src->m32[0] >> shift); -		src->m32[1] = src->m32[0] = 0; -		return; -	case -127 ... -96: -		shift = -shift - 96; -		sticky = 0; -		if ((src->m32[0] << (32 - shift)) || src->m32[1] || src->m32[2] || src->m32[3]) -			sticky = 1; -		src->m32[3] = (src->m32[0] >> shift) | sticky; -		src->m32[2] = src->m32[1] = src->m32[0] = 0; -		return; -	} - -	if (shift < 0 && (src->m32[0] || src->m32[1] || src->m32[2] || src->m32[3])) -		src->m32[3] = 1; -	else -		src->m32[3] = 0; -	src->m32[2] = 0; -	src->m32[1] = 0; -	src->m32[0] = 0; -} -#endif -  static inline void fp_putmant128(struct fp_ext *dest, union fp_mant128 *src,  				 int shift)  { @@ -637,183 +286,4 @@ static inline void fp_putmant128(struct fp_ext *dest, union fp_mant128 *src,  	}  } -#if 0 /* old code... */ -static inline int fls(unsigned int a) -{ -	int r; - -	asm volatile ("bfffo %1{#0,#32},%0" -		      : "=d" (r) : "md" (a)); -	return r; -} - -/* fls = "find last set" (cf. ffs(3)) */ -static inline int fls128(const int128 a) -{ -	if (a[MSW128]) -		return fls(a[MSW128]); -	if (a[NMSW128]) -		return fls(a[NMSW128]) + 32; -	/* XXX: it probably never gets beyond this point in actual -	   use, but that's indicative of a more general problem in the -	   algorithm (i.e. as per the actual 68881 implementation, we -	   really only need at most 67 bits of precision [plus -	   overflow]) so I'm not going to fix it. */ -	if (a[NLSW128]) -		return fls(a[NLSW128]) + 64; -	if (a[LSW128]) -		return fls(a[LSW128]) + 96; -	else -		return -1; -} - -static inline int zerop128(const int128 a) -{ -	return !(a[LSW128] | a[NLSW128] | a[NMSW128] | a[MSW128]); -} - -static inline int nonzerop128(const int128 a) -{ -	return (a[LSW128] | a[NLSW128] | a[NMSW128] | a[MSW128]); -} - -/* Addition and subtraction */ -/* Do these in "pure" assembly, because "extended" asm is unmanageable -   here */ -static inline void add128(const int128 a, int128 b) -{ -	/* rotating carry flags */ -	unsigned int carry[2]; - -	carry[0] = a[LSW128] > (0xffffffff - b[LSW128]); -	b[LSW128] += a[LSW128]; - -	carry[1] = a[NLSW128] > (0xffffffff - b[NLSW128] - carry[0]); -	b[NLSW128] = a[NLSW128] + b[NLSW128] + carry[0]; - -	carry[0] = a[NMSW128] > (0xffffffff - b[NMSW128] - carry[1]); -	b[NMSW128] = a[NMSW128] + b[NMSW128] + carry[1]; - -	b[MSW128] = a[MSW128] + b[MSW128] + carry[0]; -} - -/* Note: assembler semantics: "b -= a" */ -static inline void sub128(const int128 a, int128 b) -{ -	/* rotating borrow flags */ -	unsigned int borrow[2]; - -	borrow[0] = b[LSW128] < a[LSW128]; -	b[LSW128] -= a[LSW128]; - -	borrow[1] = b[NLSW128] < a[NLSW128] + borrow[0]; -	b[NLSW128] = b[NLSW128] - a[NLSW128] - borrow[0]; - -	borrow[0] = b[NMSW128] < a[NMSW128] + borrow[1]; -	b[NMSW128] = b[NMSW128] - a[NMSW128] - borrow[1]; - -	b[MSW128] = b[MSW128] - a[MSW128] - borrow[0]; -} - -/* Poor man's 64-bit expanding multiply */ -static inline void mul64(unsigned long long a, unsigned long long b, int128 c) -{ -	unsigned long long acc; -	int128 acc128; - -	zero128(acc128); -	zero128(c); - -	/* first the low words */ -	if (LO_WORD(a) && LO_WORD(b)) { -		acc = (long long) LO_WORD(a) * LO_WORD(b); -		c[NLSW128] = HI_WORD(acc); -		c[LSW128] = LO_WORD(acc); -	} -	/* Next the high words */ -	if (HI_WORD(a) && HI_WORD(b)) { -		acc = (long long) HI_WORD(a) * HI_WORD(b); -		c[MSW128] = HI_WORD(acc); -		c[NMSW128] = LO_WORD(acc); -	} -	/* The middle words */ -	if (LO_WORD(a) && HI_WORD(b)) { -		acc = (long long) LO_WORD(a) * HI_WORD(b); -		acc128[NMSW128] = HI_WORD(acc); -		acc128[NLSW128] = LO_WORD(acc); -		add128(acc128, c); -	} -	/* The first and last words */ -	if (HI_WORD(a) && LO_WORD(b)) { -		acc = (long long) HI_WORD(a) * LO_WORD(b); -		acc128[NMSW128] = HI_WORD(acc); -		acc128[NLSW128] = LO_WORD(acc); -		add128(acc128, c); -	} -} - -/* Note: unsigned */ -static inline int cmp128(int128 a, int128 b) -{ -	if (a[MSW128] < b[MSW128]) -		return -1; -	if (a[MSW128] > b[MSW128]) -		return 1; -	if (a[NMSW128] < b[NMSW128]) -		return -1; -	if (a[NMSW128] > b[NMSW128]) -		return 1; -	if (a[NLSW128] < b[NLSW128]) -		return -1; -	if (a[NLSW128] > b[NLSW128]) -		return 1; - -	return (signed) a[LSW128] - b[LSW128]; -} - -inline void div128(int128 a, int128 b, int128 c) -{ -	int128 mask; - -	/* Algorithm: - -	   Shift the divisor until it's at least as big as the -	   dividend, keeping track of the position to which we've -	   shifted it, i.e. the power of 2 which we've multiplied it -	   by. - -	   Then, for this power of 2 (the mask), and every one smaller -	   than it, subtract the mask from the dividend and add it to -	   the quotient until the dividend is smaller than the raised -	   divisor.  At this point, divide the dividend and the mask -	   by 2 (i.e. shift one place to the right).  Lather, rinse, -	   and repeat, until there are no more powers of 2 left. */ - -	/* FIXME: needless to say, there's room for improvement here too. */ - -	/* Shift up */ -	/* XXX: since it just has to be "at least as big", we can -	   probably eliminate this horribly wasteful loop.  I will -	   have to prove this first, though */ -	set128(0, 0, 0, 1, mask); -	while (cmp128(b, a) < 0 && !btsthi128(b)) { -		lslone128(b); -		lslone128(mask); -	} - -	/* Shift down */ -	zero128(c); -	do { -		if (cmp128(a, b) >= 0) { -			sub128(b, a); -			add128(mask, c); -		} -		lsrone128(mask); -		lsrone128(b); -	} while (nonzerop128(mask)); - -	/* The remainder is in a... */ -} -#endif -  #endif	/* MULTI_ARITH_H */ diff --git a/arch/m68k/mm/Makefile b/arch/m68k/mm/Makefile index 5eaa43c4cb3..cfbf3205724 100644 --- a/arch/m68k/mm/Makefile +++ b/arch/m68k/mm/Makefile @@ -2,7 +2,10 @@  # Makefile for the linux m68k-specific parts of the memory manager.  # -obj-y		:= cache.o init.o fault.o hwtest.o +obj-y	:= init.o + +obj-$(CONFIG_MMU)		+= cache.o fault.o +obj-$(CONFIG_MMU_MOTOROLA)	+= kmap.o memory.o motorola.o hwtest.o +obj-$(CONFIG_MMU_SUN3)		+= sun3kmap.o sun3mmu.o hwtest.o +obj-$(CONFIG_MMU_COLDFIRE)	+= kmap.o memory.o mcfmmu.o -obj-$(CONFIG_MMU_MOTOROLA)	+= kmap.o memory.o motorola.o -obj-$(CONFIG_MMU_SUN3)		+= sun3kmap.o sun3mmu.o diff --git a/arch/m68k/mm/cache.c b/arch/m68k/mm/cache.c index 5437fff5fe0..3d84c1f2ffb 100644 --- a/arch/m68k/mm/cache.c +++ b/arch/m68k/mm/cache.c @@ -52,9 +52,9 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)  		unsigned long *descaddr;  		asm volatile ("ptestr %3,%2@,#7,%0\n\t" -			      "pmove %%psr,%1@" -			      : "=a&" (descaddr) -			      : "a" (&mmusr), "a" (vaddr), "d" (get_fs().seg)); +			      "pmove %%psr,%1" +			      : "=a&" (descaddr), "=m" (mmusr) +			      : "a" (vaddr), "d" (get_fs().seg));  		if (mmusr & (MMU_I|MMU_B|MMU_L))  			return 0;  		descaddr = phys_to_virt((unsigned long)descaddr); @@ -74,8 +74,16 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)  /* RZ: use cpush %bc instead of cpush %dc, cinv %ic */  void flush_icache_range(unsigned long address, unsigned long endaddr)  { - -	if (CPU_IS_040_OR_060) { +	if (CPU_IS_COLDFIRE) { +		unsigned long start, end; +		start = address & ICACHE_SET_MASK; +		end = endaddr & ICACHE_SET_MASK; +		if (start > end) { +			flush_cf_icache(0, end); +			end = ICACHE_MAX_ADDR; +		} +		flush_cf_icache(start, end); +	} else if (CPU_IS_040_OR_060) {  		address &= PAGE_MASK;  		do { @@ -100,7 +108,17 @@ EXPORT_SYMBOL(flush_icache_range);  void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,  			     unsigned long addr, int len)  { -	if (CPU_IS_040_OR_060) { +	if (CPU_IS_COLDFIRE) { +		unsigned long start, end; +		start = addr & ICACHE_SET_MASK; +		end = (addr + len) & ICACHE_SET_MASK; +		if (start > end) { +			flush_cf_icache(0, end); +			end = ICACHE_MAX_ADDR; +		} +		flush_cf_icache(start, end); + +	} else if (CPU_IS_040_OR_060) {  		asm volatile ("nop\n\t"  			      ".chip 68040\n\t"  			      "cpushp %%bc,(%0)\n\t" diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index a96394a0333..2bd7487440c 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c @@ -13,12 +13,10 @@  #include <asm/setup.h>  #include <asm/traps.h> -#include <asm/system.h>  #include <asm/uaccess.h>  #include <asm/pgalloc.h>  extern void die_if_kernel(char *, struct pt_regs *, long); -extern const int frame_extra_sizes[]; /* in m68k/kernel/signal.c */  int send_fault_sig(struct pt_regs *regs)  { @@ -27,29 +25,15 @@ int send_fault_sig(struct pt_regs *regs)  	siginfo.si_signo = current->thread.signo;  	siginfo.si_code = current->thread.code;  	siginfo.si_addr = (void *)current->thread.faddr; -#ifdef DEBUG -	printk("send_fault_sig: %p,%d,%d\n", siginfo.si_addr, siginfo.si_signo, siginfo.si_code); -#endif +	pr_debug("send_fault_sig: %p,%d,%d\n", siginfo.si_addr, +		 siginfo.si_signo, siginfo.si_code);  	if (user_mode(regs)) {  		force_sig_info(siginfo.si_signo,  			       &siginfo, current);  	} else { -		const struct exception_table_entry *fixup; - -		/* Are we prepared to handle this kernel fault? */ -		if ((fixup = search_exception_tables(regs->pc))) { -			struct pt_regs *tregs; -			/* Create a new four word stack frame, discarding the old -			   one.  */ -			regs->stkadj = frame_extra_sizes[regs->format]; -			tregs =	(struct pt_regs *)((ulong)regs + regs->stkadj); -			tregs->vector = regs->vector; -			tregs->format = 0; -			tregs->pc = fixup->fixup; -			tregs->sr = regs->sr; +		if (handle_kernel_fault(regs))  			return -1; -		}  		//if (siginfo.si_signo == SIGBUS)  		//	force_sig_info(siginfo.si_signo, @@ -60,10 +44,10 @@ int send_fault_sig(struct pt_regs *regs)  		 * terminate things with extreme prejudice.  		 */  		if ((unsigned long)siginfo.si_addr < PAGE_SIZE) -			printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); +			pr_alert("Unable to handle kernel NULL pointer dereference");  		else -			printk(KERN_ALERT "Unable to handle kernel access"); -		printk(" at virtual address %p\n", siginfo.si_addr); +			pr_alert("Unable to handle kernel access"); +		pr_cont(" at virtual address %p\n", siginfo.si_addr);  		die_if_kernel("Oops", regs, 0 /*error_code*/);  		do_exit(SIGKILL);  	} @@ -87,13 +71,11 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,  {  	struct mm_struct *mm = current->mm;  	struct vm_area_struct * vma; -	int write, fault; +	int fault; +	unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; -#ifdef DEBUG -	printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", -		regs->sr, regs->pc, address, error_code, -		current->mm->pgd); -#endif +	pr_debug("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", +		regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL);  	/*  	 * If we're in an interrupt or have no user @@ -102,6 +84,9 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,  	if (in_atomic() || !mm)  		goto no_context; +	if (user_mode(regs)) +		flags |= FAULT_FLAG_USER; +retry:  	down_read(&mm->mmap_sem);  	vma = find_vma(mm, address); @@ -129,17 +114,14 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,   * we can handle it..   */  good_area: -#ifdef DEBUG -	printk("do_page_fault: good_area\n"); -#endif -	write = 0; +	pr_debug("do_page_fault: good_area\n");  	switch (error_code & 3) {  		default:	/* 3: write, present */  			/* fall through */  		case 2:		/* write, not present */  			if (!(vma->vm_flags & VM_WRITE))  				goto acc_err; -			write++; +			flags |= FAULT_FLAG_WRITE;  			break;  		case 1:		/* read, present */  			goto acc_err; @@ -154,10 +136,12 @@ good_area:  	 * the fault.  	 */ -	fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); -#ifdef DEBUG -	printk("handle_mm_fault returns %d\n",fault); -#endif +	fault = handle_mm_fault(mm, vma, address, flags); +	pr_debug("handle_mm_fault returns %d\n", fault); + +	if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) +		return 0; +  	if (unlikely(fault & VM_FAULT_ERROR)) {  		if (fault & VM_FAULT_OOM)  			goto out_of_memory; @@ -165,10 +149,32 @@ good_area:  			goto bus_err;  		BUG();  	} -	if (fault & VM_FAULT_MAJOR) -		current->maj_flt++; -	else -		current->min_flt++; + +	/* +	 * Major/minor page fault accounting is only done on the +	 * initial attempt. If we go through a retry, it is extremely +	 * likely that the page will be found in page cache at that point. +	 */ +	if (flags & FAULT_FLAG_ALLOW_RETRY) { +		if (fault & VM_FAULT_MAJOR) +			current->maj_flt++; +		else +			current->min_flt++; +		if (fault & VM_FAULT_RETRY) { +			/* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk +			 * of starvation. */ +			flags &= ~FAULT_FLAG_ALLOW_RETRY; +			flags |= FAULT_FLAG_TRIED; + +			/* +			 * No need to up_read(&mm->mmap_sem) as we would +			 * have already released it in __lock_page_or_retry +			 * in mm/filemap.c. +			 */ + +			goto retry; +		} +	}  	up_read(&mm->mmap_sem);  	return 0; diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 8bc842554e5..acaff6a49e3 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c @@ -23,7 +23,7 @@  #include <asm/uaccess.h>  #include <asm/page.h>  #include <asm/pgalloc.h> -#include <asm/system.h> +#include <asm/traps.h>  #include <asm/machdep.h>  #include <asm/io.h>  #ifdef CONFIG_ATARI @@ -32,7 +32,19 @@  #include <asm/sections.h>  #include <asm/tlb.h> -DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); +/* + * ZERO_PAGE is a special page that is used for zero-initialized + * data and COW. + */ +void *empty_zero_page; +EXPORT_SYMBOL(empty_zero_page); + +#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) +extern void init_pointer_table(unsigned long ptable); +extern pmd_t *zero_pgtable; +#endif + +#ifdef CONFIG_MMU  pg_data_t pg_data_map[MAX_NUMNODES];  EXPORT_SYMBOL(pg_data_map); @@ -47,7 +59,7 @@ EXPORT_SYMBOL(pg_data_table);  void __init m68k_setup_node(int node)  {  #ifndef CONFIG_SINGLE_MEMORY_CHUNK -	struct mem_info *info = m68k_memory + node; +	struct m68k_mem_info *info = m68k_memory + node;  	int i, end;  	i = (unsigned long)phys_to_virt(info->addr) >> __virt_to_node_shift(); @@ -62,58 +74,83 @@ void __init m68k_setup_node(int node)  	node_set_online(node);  } +#else /* CONFIG_MMU */  /* - * ZERO_PAGE is a special page that is used for zero-initialized - * data and COW. + * paging_init() continues the virtual memory environment setup which + * was begun by the code in arch/head.S. + * The parameters are pointers to where to stick the starting and ending + * addresses of available kernel virtual memory.   */ +void __init paging_init(void) +{ +	/* +	 * Make sure start_mem is page aligned, otherwise bootmem and +	 * page_alloc get different views of the world. +	 */ +	unsigned long end_mem = memory_end & PAGE_MASK; +	unsigned long zones_size[MAX_NR_ZONES] = { 0, }; -void *empty_zero_page; -EXPORT_SYMBOL(empty_zero_page); +	high_memory = (void *) end_mem; -extern void init_pointer_table(unsigned long ptable); +	empty_zero_page = alloc_bootmem_pages(PAGE_SIZE); +	memset(empty_zero_page, 0, PAGE_SIZE); -/* References to section boundaries */ +	/* +	 * Set up SFC/DFC registers (user data space). +	 */ +	set_fs (USER_DS); -extern pmd_t *zero_pgtable; +	zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT; +	free_area_init(zones_size); +} -void __init mem_init(void) +#endif /* CONFIG_MMU */ + +void free_initmem(void)  { -	pg_data_t *pgdat; -	int codepages = 0; -	int datapages = 0; -	int initpages = 0; -	int i; +#ifndef CONFIG_MMU_SUN3 +	free_initmem_default(-1); +#endif /* CONFIG_MMU_SUN3 */ +} -#ifdef CONFIG_ATARI -	if (MACH_IS_ATARI) -		atari_stram_mem_init_hook(); +#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE) +#define VECTORS	&vectors[0] +#else +#define VECTORS	_ramvec  #endif -	/* this will put all memory onto the freelists */ -	totalram_pages = num_physpages = 0; -	for_each_online_pgdat(pgdat) { -		num_physpages += pgdat->node_present_pages; - -		totalram_pages += free_all_bootmem_node(pgdat); -		for (i = 0; i < pgdat->node_spanned_pages; i++) { -			struct page *page = pgdat->node_mem_map + i; -			char *addr = page_to_virt(page); - -			if (!PageReserved(page)) -				continue; -			if (addr >= _text && -			    addr < _etext) -				codepages++; -			else if (addr >= __init_begin && -				 addr < __init_end) -				initpages++; -			else -				datapages++; -		} -	} +void __init print_memmap(void) +{ +#define UL(x) ((unsigned long) (x)) +#define MLK(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 10 +#define MLM(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 20 +#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024) + +	pr_notice("Virtual kernel memory layout:\n" +		"    vector  : 0x%08lx - 0x%08lx   (%4ld KiB)\n" +		"    kmap    : 0x%08lx - 0x%08lx   (%4ld MiB)\n" +		"    vmalloc : 0x%08lx - 0x%08lx   (%4ld MiB)\n" +		"    lowmem  : 0x%08lx - 0x%08lx   (%4ld MiB)\n" +		"      .init : 0x%p" " - 0x%p" "   (%4d KiB)\n" +		"      .text : 0x%p" " - 0x%p" "   (%4d KiB)\n" +		"      .data : 0x%p" " - 0x%p" "   (%4d KiB)\n" +		"      .bss  : 0x%p" " - 0x%p" "   (%4d KiB)\n", +		MLK(VECTORS, VECTORS + 256), +		MLM(KMAP_START, KMAP_END), +		MLM(VMALLOC_START, VMALLOC_END), +		MLM(PAGE_OFFSET, (unsigned long)high_memory), +		MLK_ROUNDUP(__init_begin, __init_end), +		MLK_ROUNDUP(_stext, _etext), +		MLK_ROUNDUP(_sdata, _edata), +		MLK_ROUNDUP(__bss_start, __bss_stop)); +} + +static inline void init_pointer_tables(void) +{ +#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) +	int i; -#ifndef CONFIG_SUN3  	/* insert pointer tables allocated so far into the tablelist */  	init_pointer_table((unsigned long)kernel_pg_dir);  	for (i = 0; i < PTRS_PER_PGD; i++) { @@ -125,26 +162,20 @@ void __init mem_init(void)  	if (zero_pgtable)  		init_pointer_table((unsigned long)zero_pgtable);  #endif +} -	printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n", -	       nr_free_pages() << (PAGE_SHIFT-10), -	       totalram_pages << (PAGE_SHIFT-10), -	       codepages << (PAGE_SHIFT-10), -	       datapages << (PAGE_SHIFT-10), -	       initpages << (PAGE_SHIFT-10)); +void __init mem_init(void) +{ +	/* this will put all memory onto the freelists */ +	free_all_bootmem(); +	init_pointer_tables(); +	mem_init_print_info(NULL); +	print_memmap();  }  #ifdef CONFIG_BLK_DEV_INITRD  void free_initrd_mem(unsigned long start, unsigned long end)  { -	int pages = 0; -	for (; start < end; start += PAGE_SIZE) { -		ClearPageReserved(virt_to_page(start)); -		init_page_count(virt_to_page(start)); -		free_page(start); -		totalram_pages++; -		pages++; -	} -	printk ("Freeing initrd memory: %dk freed\n", pages); +	free_reserved_area((void *)start, (void *)end, -1, "initrd");  }  #endif diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index 69345849454..6e4955bc542 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c @@ -20,7 +20,6 @@  #include <asm/page.h>  #include <asm/pgalloc.h>  #include <asm/io.h> -#include <asm/system.h>  #undef DEBUG @@ -28,9 +27,9 @@  /*   * For 040/060 we can use the virtual memory area like other architectures, - * but for 020/030 we want to use early termination page descriptor and we + * but for 020/030 we want to use early termination page descriptors and we   * can't mix this with normal page descriptors, so we have to copy that code - * (mm/vmalloc.c) and return appriorate aligned addresses. + * (mm/vmalloc.c) and return appropriately aligned addresses.   */  #ifdef CPU_M68040_OR_M68060_ONLY @@ -171,7 +170,8 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla  			break;  		}  	} else { -		physaddr |= (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY); +		physaddr |= (_PAGE_PRESENT | _PAGE_ACCESSED | +			     _PAGE_DIRTY | _PAGE_READWRITE);  		switch (cacheflag) {  		case IOMAP_NOCACHE_SER:  		case IOMAP_NOCACHE_NONSER: @@ -224,7 +224,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla  EXPORT_SYMBOL(__ioremap);  /* - * Unmap a ioremap()ed region again + * Unmap an ioremap()ed region again   */  void iounmap(void __iomem *addr)  { @@ -241,8 +241,8 @@ EXPORT_SYMBOL(iounmap);  /*   * __iounmap unmaps nearly everything, so be careful - * it doesn't free currently pointer/page tables anymore but it - * wans't used anyway and might be added later. + * Currently it doesn't free pointer/page tables anymore but this + * wasn't used anyway and might be added later.   */  void __iounmap(void *addr, unsigned long size)  { diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c new file mode 100644 index 00000000000..f58fafe7e4c --- /dev/null +++ b/arch/m68k/mm/mcfmmu.c @@ -0,0 +1,195 @@ +/* + * Based upon linux/arch/m68k/mm/sun3mmu.c + * Based upon linux/arch/ppc/mm/mmu_context.c + * + * Implementations of mm routines specific to the Coldfire MMU. + * + * Copyright (c) 2008 Freescale Semiconductor, Inc. + */ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/mm.h> +#include <linux/init.h> +#include <linux/string.h> +#include <linux/bootmem.h> + +#include <asm/setup.h> +#include <asm/page.h> +#include <asm/pgtable.h> +#include <asm/mmu_context.h> +#include <asm/mcf_pgalloc.h> +#include <asm/tlbflush.h> + +#define KMAPAREA(x)	((x >= VMALLOC_START) && (x < KMAP_END)) + +mm_context_t next_mmu_context; +unsigned long context_map[LAST_CONTEXT / BITS_PER_LONG + 1]; +atomic_t nr_free_contexts; +struct mm_struct *context_mm[LAST_CONTEXT+1]; +extern unsigned long num_pages; + +/* + * ColdFire paging_init derived from sun3. + */ +void __init paging_init(void) +{ +	pgd_t *pg_dir; +	pte_t *pg_table; +	unsigned long address, size; +	unsigned long next_pgtable, bootmem_end; +	unsigned long zones_size[MAX_NR_ZONES]; +	enum zone_type zone; +	int i; + +	empty_zero_page = (void *) alloc_bootmem_pages(PAGE_SIZE); +	memset((void *) empty_zero_page, 0, PAGE_SIZE); + +	pg_dir = swapper_pg_dir; +	memset(swapper_pg_dir, 0, sizeof(swapper_pg_dir)); + +	size = num_pages * sizeof(pte_t); +	size = (size + PAGE_SIZE) & ~(PAGE_SIZE-1); +	next_pgtable = (unsigned long) alloc_bootmem_pages(size); + +	bootmem_end = (next_pgtable + size + PAGE_SIZE) & PAGE_MASK; +	pg_dir += PAGE_OFFSET >> PGDIR_SHIFT; + +	address = PAGE_OFFSET; +	while (address < (unsigned long)high_memory) { +		pg_table = (pte_t *) next_pgtable; +		next_pgtable += PTRS_PER_PTE * sizeof(pte_t); +		pgd_val(*pg_dir) = (unsigned long) pg_table; +		pg_dir++; + +		/* now change pg_table to kernel virtual addresses */ +		for (i = 0; i < PTRS_PER_PTE; ++i, ++pg_table) { +			pte_t pte = pfn_pte(virt_to_pfn(address), PAGE_INIT); +			if (address >= (unsigned long) high_memory) +				pte_val(pte) = 0; + +			set_pte(pg_table, pte); +			address += PAGE_SIZE; +		} +	} + +	current->mm = NULL; + +	for (zone = 0; zone < MAX_NR_ZONES; zone++) +		zones_size[zone] = 0x0; +	zones_size[ZONE_DMA] = num_pages; +	free_area_init(zones_size); +} + +int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word) +{ +	unsigned long flags, mmuar, mmutr; +	struct mm_struct *mm; +	pgd_t *pgd; +	pmd_t *pmd; +	pte_t *pte; +	int asid; + +	local_irq_save(flags); + +	mmuar = (dtlb) ? mmu_read(MMUAR) : +		regs->pc + (extension_word * sizeof(long)); + +	mm = (!user_mode(regs) && KMAPAREA(mmuar)) ? &init_mm : current->mm; +	if (!mm) { +		local_irq_restore(flags); +		return -1; +	} + +	pgd = pgd_offset(mm, mmuar); +	if (pgd_none(*pgd))  { +		local_irq_restore(flags); +		return -1; +	} + +	pmd = pmd_offset(pgd, mmuar); +	if (pmd_none(*pmd)) { +		local_irq_restore(flags); +		return -1; +	} + +	pte = (KMAPAREA(mmuar)) ? pte_offset_kernel(pmd, mmuar) +				: pte_offset_map(pmd, mmuar); +	if (pte_none(*pte) || !pte_present(*pte)) { +		local_irq_restore(flags); +		return -1; +	} + +	if (write) { +		if (!pte_write(*pte)) { +			local_irq_restore(flags); +			return -1; +		} +		set_pte(pte, pte_mkdirty(*pte)); +	} + +	set_pte(pte, pte_mkyoung(*pte)); +	asid = mm->context & 0xff; +	if (!pte_dirty(*pte) && !KMAPAREA(mmuar)) +		set_pte(pte, pte_wrprotect(*pte)); + +	mmutr = (mmuar & PAGE_MASK) | (asid << MMUTR_IDN) | MMUTR_V; +	if ((mmuar < TASK_UNMAPPED_BASE) || (mmuar >= TASK_SIZE)) +		mmutr |= (pte->pte & CF_PAGE_MMUTR_MASK) >> CF_PAGE_MMUTR_SHIFT; +	mmu_write(MMUTR, mmutr); + +	mmu_write(MMUDR, (pte_val(*pte) & PAGE_MASK) | +		((pte->pte) & CF_PAGE_MMUDR_MASK) | MMUDR_SZ_8KB | MMUDR_X); + +	if (dtlb) +		mmu_write(MMUOR, MMUOR_ACC | MMUOR_UAA); +	else +		mmu_write(MMUOR, MMUOR_ITLB | MMUOR_ACC | MMUOR_UAA); + +	local_irq_restore(flags); +	return 0; +} + +/* + * Initialize the context management stuff. + * The following was taken from arch/ppc/mmu_context.c + */ +void __init mmu_context_init(void) +{ +	/* +	 * Some processors have too few contexts to reserve one for +	 * init_mm, and require using context 0 for a normal task. +	 * Other processors reserve the use of context zero for the kernel. +	 * This code assumes FIRST_CONTEXT < 32. +	 */ +	context_map[0] = (1 << FIRST_CONTEXT) - 1; +	next_mmu_context = FIRST_CONTEXT; +	atomic_set(&nr_free_contexts, LAST_CONTEXT - FIRST_CONTEXT + 1); +} + +/* + * Steal a context from a task that has one at the moment. + * This is only used on 8xx and 4xx and we presently assume that + * they don't do SMP.  If they do then thicfpgalloc.hs will have to check + * whether the MM we steal is in use. + * We also assume that this is only used on systems that don't + * use an MMU hash table - this is true for 8xx and 4xx. + * This isn't an LRU system, it just frees up each context in + * turn (sort-of pseudo-random replacement :).  This would be the + * place to implement an LRU scheme if anyone was motivated to do it. + *  -- paulus + */ +void steal_context(void) +{ +	struct mm_struct *mm; +	/* +	 * free up context `next_mmu_context' +	 * if we shouldn't free context 0, don't... +	 */ +	if (next_mmu_context < FIRST_CONTEXT) +		next_mmu_context = FIRST_CONTEXT; +	mm = context_mm[next_mmu_context]; +	flush_tlb_mm(mm); +	destroy_context(mm); +} + diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index 34c77ce24fb..51bc9d258ed 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c @@ -17,7 +17,6 @@  #include <asm/segment.h>  #include <asm/page.h>  #include <asm/pgalloc.h> -#include <asm/system.h>  #include <asm/traps.h>  #include <asm/machdep.h> @@ -203,7 +202,9 @@ static inline void pushcl040(unsigned long paddr)  void cache_clear (unsigned long paddr, int len)  { -    if (CPU_IS_040_OR_060) { +    if (CPU_IS_COLDFIRE) { +	clear_cf_bcache(0, DCACHE_MAX_ADDR); +    } else if (CPU_IS_040_OR_060) {  	int tmp;  	/* @@ -250,7 +251,9 @@ EXPORT_SYMBOL(cache_clear);  void cache_push (unsigned long paddr, int len)  { -    if (CPU_IS_040_OR_060) { +    if (CPU_IS_COLDFIRE) { +	flush_cf_bcache(0, DCACHE_MAX_ADDR); +    } else if (CPU_IS_040_OR_060) {  	int tmp = PAGE_SIZE;  	/* diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 02b7a03e422..b958916e5ea 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -24,7 +24,6 @@  #include <asm/uaccess.h>  #include <asm/page.h>  #include <asm/pgalloc.h> -#include <asm/system.h>  #include <asm/machdep.h>  #include <asm/io.h>  #include <asm/dma.h> @@ -46,7 +45,7 @@ EXPORT_SYMBOL(mm_cachebits);  #endif  /* size of memory already mapped in head.S */ -#define INIT_MAPPED_SIZE	(4UL<<20) +extern __initdata unsigned long m68k_init_mapped_size;  extern unsigned long availmem; @@ -234,7 +233,7 @@ void __init paging_init(void)  			printk("Fix your bootloader or use a memfile to make use of this area!\n");  			m68k_num_memory--;  			memmove(m68k_memory + i, m68k_memory + i + 1, -				(m68k_num_memory - i) * sizeof(struct mem_info)); +				(m68k_num_memory - i) * sizeof(struct m68k_mem_info));  			continue;  		}  		addr = m68k_memory[i].addr + m68k_memory[i].size; @@ -272,10 +271,12 @@ void __init paging_init(void)  	 */  	addr = m68k_memory[0].addr;  	size = m68k_memory[0].size; -	free_bootmem_node(NODE_DATA(0), availmem, min(INIT_MAPPED_SIZE, size) - (availmem - addr)); +	free_bootmem_node(NODE_DATA(0), availmem, +			  min(m68k_init_mapped_size, size) - (availmem - addr));  	map_node(0); -	if (size > INIT_MAPPED_SIZE) -		free_bootmem_node(NODE_DATA(0), addr + INIT_MAPPED_SIZE, size - INIT_MAPPED_SIZE); +	if (size > m68k_init_mapped_size) +		free_bootmem_node(NODE_DATA(0), addr + m68k_init_mapped_size, +				  size - m68k_init_mapped_size);  	for (i = 1; i < m68k_num_memory; i++)  		map_node(i); @@ -300,20 +301,8 @@ void __init paging_init(void)  		zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT;  		free_area_init_node(i, zones_size,  				    m68k_memory[i].addr >> PAGE_SHIFT, NULL); +		if (node_present_pages(i)) +			node_set_state(i, N_NORMAL_MEMORY);  	}  } -void free_initmem(void) -{ -	unsigned long addr; - -	addr = (unsigned long)__init_begin; -	for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { -		virt_to_page(addr)->flags &= ~(1 << PG_reserved); -		init_page_count(virt_to_page(addr)); -		free_page(addr); -		totalram_pages++; -	} -} - - diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c index 1b902dbd437..269f81158a3 100644 --- a/arch/m68k/mm/sun3mmu.c +++ b/arch/m68k/mm/sun3mmu.c @@ -21,7 +21,6 @@  #include <asm/uaccess.h>  #include <asm/page.h>  #include <asm/pgtable.h> -#include <asm/system.h>  #include <asm/machdep.h>  #include <asm/io.h> @@ -31,10 +30,6 @@ const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n";  extern unsigned long num_pages; -void free_initmem(void) -{ -} -  /* For the sun3 we try to follow the i386 paging_init() more closely */  /* start_mem and end_mem have PAGE_OFFSET added already */  /* now sets up tables using sun3 PTEs rather than i386 as before. --m */ diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c index 100baaa692a..1bb3ce6634d 100644 --- a/arch/m68k/mvme147/config.c +++ b/arch/m68k/mvme147/config.c @@ -26,7 +26,8 @@  #include <linux/interrupt.h>  #include <asm/bootinfo.h> -#include <asm/system.h> +#include <asm/bootinfo-vme.h> +#include <asm/byteorder.h>  #include <asm/pgtable.h>  #include <asm/setup.h>  #include <asm/irq.h> @@ -38,7 +39,7 @@  static void mvme147_get_model(char *model);  extern void mvme147_sched_init(irq_handler_t handler); -extern unsigned long mvme147_gettimeoffset (void); +extern u32 mvme147_gettimeoffset(void);  extern int mvme147_hwclk (int, struct rtc_time *);  extern int mvme147_set_clock_mmss (unsigned long);  extern void mvme147_reset (void); @@ -46,15 +47,16 @@ extern void mvme147_reset (void);  static int bcd2int (unsigned char b); -/* Save tick handler routine pointer, will point to do_timer() in - * kernel/sched.c, called via mvme147_process_int() */ +/* Save tick handler routine pointer, will point to xtime_update() in + * kernel/time/timekeeping.c, called via mvme147_process_int() */  irq_handler_t tick_handler; -int mvme147_parse_bootinfo(const struct bi_record *bi) +int __init mvme147_parse_bootinfo(const struct bi_record *bi)  { -	if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO) +	uint16_t tag = be16_to_cpu(bi->tag); +	if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)  		return 0;  	else  		return 1; @@ -81,7 +83,7 @@ static void mvme147_get_model(char *model)  void __init mvme147_init_IRQ(void)  { -	m68k_setup_user_interrupt(VEC_USER, 192, NULL); +	m68k_setup_user_interrupt(VEC_USER, 192);  }  void __init config_mvme147(void) @@ -89,7 +91,7 @@ void __init config_mvme147(void)  	mach_max_dma_address	= 0x01000000;  	mach_sched_init		= mvme147_sched_init;  	mach_init_IRQ		= mvme147_init_IRQ; -	mach_gettimeoffset	= mvme147_gettimeoffset; +	arch_gettimeoffset	= mvme147_gettimeoffset;  	mach_hwclk		= mvme147_hwclk;  	mach_set_clock_mmss	= mvme147_set_clock_mmss;  	mach_reset		= mvme147_reset; @@ -114,8 +116,7 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id)  void mvme147_sched_init (irq_handler_t timer_routine)  {  	tick_handler = timer_routine; -	if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQ_FLG_REPLACE, -			"timer 1", NULL)) +	if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1", NULL))  		pr_err("Couldn't register timer interrupt\n");  	/* Init the clock with a value */ @@ -129,7 +130,7 @@ void mvme147_sched_init (irq_handler_t timer_routine)  /* This is always executed with interrupts disabled.  */  /* XXX There are race hazards in this code XXX */ -unsigned long mvme147_gettimeoffset (void) +u32 mvme147_gettimeoffset(void)  {  	volatile unsigned short *cp = (volatile unsigned short *)0xfffe1012;  	unsigned short n; @@ -139,7 +140,7 @@ unsigned long mvme147_gettimeoffset (void)  		n = *cp;  	n -= PCC_TIMER_PRELOAD; -	return (unsigned long)n * 25 / 4; +	return ((unsigned long)n * 25 / 4) * 1000;  }  static int bcd2int (unsigned char b) diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index 11edf61cc2c..a53803cc66c 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c @@ -29,7 +29,8 @@  #include <linux/module.h>  #include <asm/bootinfo.h> -#include <asm/system.h> +#include <asm/bootinfo-vme.h> +#include <asm/byteorder.h>  #include <asm/pgtable.h>  #include <asm/setup.h>  #include <asm/irq.h> @@ -44,15 +45,15 @@ static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;  static void mvme16x_get_model(char *model);  extern void mvme16x_sched_init(irq_handler_t handler); -extern unsigned long mvme16x_gettimeoffset (void); +extern u32 mvme16x_gettimeoffset(void);  extern int mvme16x_hwclk (int, struct rtc_time *);  extern int mvme16x_set_clock_mmss (unsigned long);  extern void mvme16x_reset (void);  int bcd2int (unsigned char b); -/* Save tick handler routine pointer, will point to do_timer() in - * kernel/sched.c, called via mvme16x_process_int() */ +/* Save tick handler routine pointer, will point to xtime_update() in + * kernel/time/timekeeping.c, called via mvme16x_process_int() */  static irq_handler_t tick_handler; @@ -61,9 +62,10 @@ unsigned short mvme16x_config;  EXPORT_SYMBOL(mvme16x_config); -int mvme16x_parse_bootinfo(const struct bi_record *bi) +int __init mvme16x_parse_bootinfo(const struct bi_record *bi)  { -	if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO) +	uint16_t tag = be16_to_cpu(bi->tag); +	if (tag == BI_VME_TYPE || tag == BI_VME_BRDINFO)  		return 0;  	else  		return 1; @@ -88,15 +90,15 @@ static void mvme16x_get_model(char *model)      suf[3] = '\0';      suf[0] = suf[1] ? '-' : '\0'; -    sprintf(model, "Motorola MVME%x%s", p->brdno, suf); +    sprintf(model, "Motorola MVME%x%s", be16_to_cpu(p->brdno), suf);  }  static void mvme16x_get_hardware_list(struct seq_file *m)  { -    p_bdid p = &mvme_bdid; +    uint16_t brdno = be16_to_cpu(mvme_bdid.brdno); -    if (p->brdno == 0x0162 || p->brdno == 0x0172) +    if (brdno == 0x0162 || brdno == 0x0172)      {  	unsigned char rev = *(unsigned char *)MVME162_VERSION_REG; @@ -117,23 +119,167 @@ static void mvme16x_get_hardware_list(struct seq_file *m)  static void __init mvme16x_init_IRQ (void)  { -	m68k_setup_user_interrupt(VEC_USER, 192, NULL); +	m68k_setup_user_interrupt(VEC_USER, 192);  }  #define pcc2chip	((volatile u_char *)0xfff42000)  #define PccSCCMICR	0x1d  #define PccSCCTICR	0x1e  #define PccSCCRICR	0x1f +#define PccTPIACKR	0x25 + +#ifdef CONFIG_EARLY_PRINTK + +/**** cd2401 registers ****/ +#define CD2401_ADDR	(0xfff45000) + +#define CyGFRCR         (0x81) +#define CyCCR		(0x13) +#define      CyCLR_CHAN		(0x40) +#define      CyINIT_CHAN	(0x20) +#define      CyCHIP_RESET	(0x10) +#define      CyENB_XMTR		(0x08) +#define      CyDIS_XMTR		(0x04) +#define      CyENB_RCVR		(0x02) +#define      CyDIS_RCVR		(0x01) +#define CyCAR		(0xee) +#define CyIER		(0x11) +#define      CyMdmCh		(0x80) +#define      CyRxExc		(0x20) +#define      CyRxData		(0x08) +#define      CyTxMpty		(0x02) +#define      CyTxRdy		(0x01) +#define CyLICR		(0x26) +#define CyRISR		(0x89) +#define      CyTIMEOUT		(0x80) +#define      CySPECHAR		(0x70) +#define      CyOVERRUN		(0x08) +#define      CyPARITY		(0x04) +#define      CyFRAME		(0x02) +#define      CyBREAK		(0x01) +#define CyREOIR		(0x84) +#define CyTEOIR		(0x85) +#define CyMEOIR		(0x86) +#define      CyNOTRANS		(0x08) +#define CyRFOC		(0x30) +#define CyRDR		(0xf8) +#define CyTDR		(0xf8) +#define CyMISR		(0x8b) +#define CyRISR		(0x89) +#define CyTISR		(0x8a) +#define CyMSVR1		(0xde) +#define CyMSVR2		(0xdf) +#define      CyDSR		(0x80) +#define      CyDCD		(0x40) +#define      CyCTS		(0x20) +#define      CyDTR		(0x02) +#define      CyRTS		(0x01) +#define CyRTPRL		(0x25) +#define CyRTPRH		(0x24) +#define CyCOR1		(0x10) +#define      CyPARITY_NONE	(0x00) +#define      CyPARITY_E		(0x40) +#define      CyPARITY_O		(0xC0) +#define      Cy_5_BITS		(0x04) +#define      Cy_6_BITS		(0x05) +#define      Cy_7_BITS		(0x06) +#define      Cy_8_BITS		(0x07) +#define CyCOR2		(0x17) +#define      CyETC		(0x20) +#define      CyCtsAE		(0x02) +#define CyCOR3		(0x16) +#define      Cy_1_STOP		(0x02) +#define      Cy_2_STOP		(0x04) +#define CyCOR4		(0x15) +#define      CyREC_FIFO		(0x0F)  /* Receive FIFO threshold */ +#define CyCOR5		(0x14) +#define CyCOR6		(0x18) +#define CyCOR7		(0x07) +#define CyRBPR		(0xcb) +#define CyRCOR		(0xc8) +#define CyTBPR		(0xc3) +#define CyTCOR		(0xc0) +#define CySCHR1		(0x1f) +#define CySCHR2 	(0x1e) +#define CyTPR		(0xda) +#define CyPILR1		(0xe3) +#define CyPILR2		(0xe0) +#define CyPILR3		(0xe1) +#define CyCMR		(0x1b) +#define      CyASYNC		(0x02) +#define CyLICR          (0x26) +#define CyLIVR          (0x09) +#define CySCRL		(0x23) +#define CySCRH		(0x22) +#define CyTFTC		(0x80) + +void mvme16x_cons_write(struct console *co, const char *str, unsigned count) +{ +	volatile unsigned char *base_addr = (u_char *)CD2401_ADDR; +	volatile u_char sink; +	u_char ier; +	int port; +	u_char do_lf = 0; +	int i = 0; + +	/* Ensure transmitter is enabled! */ + +	port = 0; +	base_addr[CyCAR] = (u_char)port; +	while (base_addr[CyCCR]) +		; +	base_addr[CyCCR] = CyENB_XMTR; + +	ier = base_addr[CyIER]; +	base_addr[CyIER] = CyTxMpty; + +	while (1) { +		if (pcc2chip[PccSCCTICR] & 0x20) +		{ +			/* We have a Tx int. Acknowledge it */ +			sink = pcc2chip[PccTPIACKR]; +			if ((base_addr[CyLICR] >> 2) == port) { +				if (i == count) { +					/* Last char of string is now output */ +					base_addr[CyTEOIR] = CyNOTRANS; +					break; +				} +				if (do_lf) { +					base_addr[CyTDR] = '\n'; +					str++; +					i++; +					do_lf = 0; +				} +				else if (*str == '\n') { +					base_addr[CyTDR] = '\r'; +					do_lf = 1; +				} +				else { +					base_addr[CyTDR] = *str++; +					i++; +				} +				base_addr[CyTEOIR] = 0; +			} +			else +				base_addr[CyTEOIR] = CyNOTRANS; +		} +	} + +	base_addr[CyIER] = ier; +} + +#endif  void __init config_mvme16x(void)  {      p_bdid p = &mvme_bdid;      char id[40]; +    uint16_t brdno = be16_to_cpu(p->brdno);      mach_max_dma_address = 0xffffffff;      mach_sched_init      = mvme16x_sched_init;      mach_init_IRQ        = mvme16x_init_IRQ; -    mach_gettimeoffset   = mvme16x_gettimeoffset; +    arch_gettimeoffset   = mvme16x_gettimeoffset;      mach_hwclk           = mvme16x_hwclk;      mach_set_clock_mmss	 = mvme16x_set_clock_mmss;      mach_reset		 = mvme16x_reset; @@ -150,18 +296,18 @@ void __init config_mvme16x(void)      }      /* Board type is only set by newer versions of vmelilo/tftplilo */      if (vme_brdtype == 0) -	vme_brdtype = p->brdno; +	vme_brdtype = brdno;      mvme16x_get_model(id);      printk ("\nBRD_ID: %s   BUG %x.%x %02x/%02x/%02x\n", id, p->rev>>4,  					p->rev&0xf, p->yr, p->mth, p->day); -    if (p->brdno == 0x0162 || p->brdno == 0x172) +    if (brdno == 0x0162 || brdno == 0x172)      {  	unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;  	mvme16x_config = rev | MVME16x_CONFIG_GOT_SCCA; -	printk ("MVME%x Hardware status:\n", p->brdno); +	printk ("MVME%x Hardware status:\n", brdno);  	printk ("    CPU Type           68%s040\n",  			rev & MVME16x_CONFIG_GOT_FPU ? "" : "LC");  	printk ("    CPU clock          %dMHz\n", @@ -176,24 +322,17 @@ void __init config_mvme16x(void)      else      {  	mvme16x_config = MVME16x_CONFIG_GOT_LP | MVME16x_CONFIG_GOT_CD2401; - -	/* Dont allow any interrupts from the CD2401 until the interrupt */ -	/* handlers are installed					 */ - -	pcc2chip[PccSCCMICR] = 0x10; -	pcc2chip[PccSCCTICR] = 0x10; -	pcc2chip[PccSCCRICR] = 0x10;      }  }  static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)  { -	p_bdid p = &mvme_bdid;  	unsigned long *new = (unsigned long *)vectors;  	unsigned long *old = (unsigned long *)0xffe00000;  	volatile unsigned char uc, *ucp; +	uint16_t brdno = be16_to_cpu(mvme_bdid.brdno); -	if (p->brdno == 0x0162 || p->brdno == 0x172) +	if (brdno == 0x0162 || brdno == 0x172)  	{  		ucp = (volatile unsigned char *)0xfff42043;  		uc = *ucp | 8; @@ -207,7 +346,7 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)  	*(new+9) = *(old+9);		/* Trace */  	*(new+47) = *(old+47);		/* Trap #15 */ -	if (p->brdno == 0x0162 || p->brdno == 0x172) +	if (brdno == 0x0162 || brdno == 0x172)  		*(new+0x5e) = *(old+0x5e);	/* ABORT switch */  	else  		*(new+0x6e) = *(old+0x6e);	/* ABORT switch */ @@ -222,7 +361,7 @@ static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)  void mvme16x_sched_init (irq_handler_t timer_routine)  { -    p_bdid p = &mvme_bdid; +    uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);      int irq;      tick_handler = timer_routine; @@ -235,7 +374,7 @@ void mvme16x_sched_init (irq_handler_t timer_routine)  				"timer", mvme16x_timer_int))  	panic ("Couldn't register timer int"); -    if (p->brdno == 0x0162 || p->brdno == 0x172) +    if (brdno == 0x0162 || brdno == 0x172)  	irq = MVME162_IRQ_ABORT;      else          irq = MVME167_IRQ_ABORT; @@ -246,9 +385,9 @@ void mvme16x_sched_init (irq_handler_t timer_routine)  /* This is always executed with interrupts disabled.  */ -unsigned long mvme16x_gettimeoffset (void) +u32 mvme16x_gettimeoffset(void)  { -    return (*(volatile unsigned long *)0xfff42008); +    return (*(volatile u32 *)0xfff42008) * 1000;  }  int bcd2int (unsigned char b) diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index 39c79ebcd18..6ef7a81a3b1 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c @@ -20,7 +20,6 @@  #include <asm/io.h>  #include <asm/uaccess.h> -#include <asm/system.h>  #include <asm/setup.h>  /* diff --git a/arch/m68k/platform/68000/Makefile b/arch/m68k/platform/68000/Makefile new file mode 100644 index 00000000000..1eab70c7194 --- /dev/null +++ b/arch/m68k/platform/68000/Makefile @@ -0,0 +1,18 @@ +################################################## +# +# Makefile for 68000 core based cpus +# +# 2012.10.21, Luis Alves <ljalvs@gmail.com> +#             Merged all 68000 based cpu's config +#             files into a single directory. +# + +# 68328, 68EZ328, 68VZ328 + +obj-y			+= entry.o ints.o timers.o +obj-$(CONFIG_M68328)	+= m68328.o +obj-$(CONFIG_M68EZ328)	+= m68EZ328.o +obj-$(CONFIG_M68VZ328)	+= m68VZ328.o +obj-$(CONFIG_ROM)	+= romvec.o + +extra-y 		:= head.o diff --git a/arch/m68k/platform/68000/bootlogo-vz.h b/arch/m68k/platform/68000/bootlogo-vz.h new file mode 100644 index 00000000000..b38e2b25514 --- /dev/null +++ b/arch/m68k/platform/68000/bootlogo-vz.h @@ -0,0 +1,3204 @@ +#define splash_width 640 +#define splash_height 480 +unsigned char __attribute__ ((aligned(16))) bootlogo_bits[] = { +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0xfe, 0xff, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x7c, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +  0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0xe0, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3e, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, +  0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xfe, 0xff, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, +  0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0xe0, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0xe0, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, +  0xf0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, +  0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0xe0, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0x07, 0xfe, 0xff, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, +  0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0xff, 0x01, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, +  0x00, 0xf0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0xe0, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x03, +  0x3f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x3f, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0x00, 0x00, 0x00, +  0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, +  0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0xff, 0xff, 0xff, 0x3f, 0xf0, 0x01, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x80, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0xc0, 0xff, +  0xc1, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x07, 0x00, 0x00, +  0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, +  0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0x07, 0x00, 0x00, 0xe0, 0x07, 0x0e, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, +  0x3f, 0x1c, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x38, 0x00, 0x00, +  0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, +  0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, +  0x00, 0x00, 0x00, 0x00, 0x78, 0x70, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, +  0xf0, 0xe0, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc3, 0x01, 0x00, +  0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, +  0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, +  0x00, 0x00, 0x00, 0x00, 0x80, 0xc7, 0x03, 0x00, 0xf8, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x80, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x87, 0x03, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x3f, 0x00, 0xc0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x07, 0x00, +  0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, +  0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0xf0, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0xf0, 0xff, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x30, 0x0c, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0xff, 0x01, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1c, 0x00, +  0xf0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x07, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x38, 0x00, 0xf0, 0xff, 0x7f, 0xe0, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x80, 0x38, 0x00, 0xf0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, +  0xe0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0xe0, 0xff, 0x7f, 0xe0, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe2, 0x00, 0xe0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, +  0xe0, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xc0, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x01, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, +  0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x80, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0x03, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, +  0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0x07, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, +  0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0xfe, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0x07, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, +  0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0xf8, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0x07, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, +  0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xf0, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x07, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +  0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x9f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1c, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +  0xf8, 0xff, 0x1f, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0xff, 0xff, 0x00, +  0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x38, 0x00, 0xfe, 0xff, 0x0f, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x00, 0xf8, 0xff, 0xff, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0xff, 0xff, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xfc, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x03, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, +  0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0xc0, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +  0xfe, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf0, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x38, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x00, 0xf8, 0xff, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0xff, 0x01, +  0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xfc, 0x01, 0xff, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0x41, 0x08, 0x04, 0xb3, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x00, 0xe0, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0x41, 0x08, 0x04, 0xb3, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +  0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x18, 0x8e, 0x31, 0x7b, 0x30, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x18, 0x8e, 0x31, 0x7b, 0x30, 0x30, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xf8, +  0x41, 0xc6, 0x84, 0x0c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xf8, 0x41, 0xc6, 0x84, 0x0c, +  0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +  0x0f, 0x00, 0x00, 0x18, 0x0c, 0x08, 0x00, 0x40, 0xc0, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xe4, +  0xb1, 0xc1, 0x98, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x09, 0x00, 0x00, 0xe4, 0xb1, 0xc1, 0x98, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, +  0x08, 0x00, 0x00, 0x1c, 0x02, 0x08, 0x04, 0x4c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0xff, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1c, +  0x02, 0x08, 0x04, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x1f, 0xc0, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x10, 0x80, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x64, 0x4c, 0x00, 0x00, 0x00, +  0x36, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x09, 0x00, 0x00, 0x64, 0x4c, 0x00, 0x00, 0x00, 0x36, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0xff, 0x03, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x9c, +  0x01, 0x08, 0x83, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0xf0, 0xff, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x64, 0x8c, 0x01, 0x18, 0x40, +  0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x0f, 0x00, 0x00, 0x64, 0x8c, 0x01, 0x18, 0x40, 0x30, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0xff, 0x03, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x9b, +  0x01, 0xc0, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x40, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x09, 0x00, 0x00, 0x9b, 0x01, 0xc0, 0x00, 0x00, +  0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, +  0x00, 0x00, 0x00, 0x07, 0x32, 0x06, 0x18, 0x43, 0x00, 0x06, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +  0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xf0, 0xc1, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x02, 0x02, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x07, +  0x32, 0x06, 0x18, 0x43, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x10, 0xe0, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, 0x7b, 0x00, 0x30, 0x03, 0x0c, +  0x08, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0x07, 0x03, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x09, 0x00, 0xc0, 0x84, 0x8d, 0x01, 0x80, 0x00, 0xc0, 0x06, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0xfd, 0x03, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xc0, 0x84, +  0x8d, 0x01, 0x80, 0x00, 0xc0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfd, 0x03, 0xf0, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xc0, 0x1b, 0x00, 0x30, 0x00, 0x40, +  0x08, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xfc, 0x01, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0xc0, 0x1b, 0x00, 0x30, 0x00, 0x40, 0x08, 0x18, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x07, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, +  0xf8, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xc0, 0x64, +  0x42, 0x06, 0x1b, 0x03, 0x00, 0x61, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xc0, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x10, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x64, 0x42, 0x06, 0x1b, 0x03, +  0x00, 0x61, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0x0f, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x80, 0x30, 0x08, 0x86, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0x3f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x1b, +  0x00, 0x00, 0x80, 0x30, 0x08, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xc3, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0xe0, 0x84, 0x31, 0x30, 0x04, 0x80, +  0xc1, 0x18, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1c, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x09, 0x00, 0xc0, 0x63, 0x02, 0x06, 0x00, 0x00, 0x00, 0x60, 0x6c, 0xfc, +  0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, +  0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x08, 0x00, 0xc0, 0x63, +  0x02, 0x06, 0x00, 0x00, 0x00, 0x60, 0x6c, 0xfc, 0xff, 0x03, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xff, 0xff, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xe0, 0x1c, 0x40, 0x00, 0x1b, 0x4c, +  0x06, 0x81, 0x80, 0xfd, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x70, 0x00, 0xf0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x00, 0x00, 0xe0, 0x1c, 0x40, 0x00, 0x1b, 0x4c, 0x06, 0x81, 0x80, 0xfd, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +  0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x20, 0x63, +  0x0c, 0x08, 0x80, 0x00, 0x30, 0x06, 0x0c, 0xfc, 0xff, 0x7f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x30, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x20, 0x63, 0x0c, 0x08, 0x80, 0x00, +  0x30, 0x06, 0x0c, 0xfc, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0x0f, 0x00, 0xd8, 0x84, 0x01, 0xc0, 0x00, 0x00, 0x06, 0x00, 0x80, 0xf1, +  0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0xf8, 0x1b, +  0x40, 0x08, 0x84, 0x0c, 0xc0, 0x18, 0x13, 0xcc, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xe0, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0xf8, 0x1b, 0x40, 0x08, 0x84, 0x0c, +  0xc0, 0x18, 0x13, 0xcc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xf0, 0xe4, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x09, 0x00, 0x38, 0x80, 0x01, 0x00, 0x18, 0x30, 0x06, 0x01, 0x00, 0xc0, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, +  0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0x07, 0x00, 0x30, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x38, 0x80, +  0x01, 0x00, 0x18, 0x30, 0x06, 0x01, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x10, 0x84, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xd8, 0x1f, 0x30, 0x36, 0x80, 0x00, +  0x00, 0x00, 0x03, 0xf2, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x4f, 0x0e, 0x00, 0x10, 0x84, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x08, 0x00, 0xd8, 0x1f, 0x30, 0x36, 0x80, 0x00, 0x00, 0x00, 0x03, 0xf2, +  0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +  0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, +  0x08, 0x00, 0x10, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x3e, 0x00, +  0x82, 0x01, 0x03, 0x40, 0x30, 0x98, 0x10, 0xf0, 0xe7, 0xff, 0xff, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0xc0, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x08, 0x00, 0x10, 0xe4, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xe6, 0x1b, 0x00, 0x00, 0x18, 0x0c, +  0x00, 0x00, 0x00, 0xfc, 0xff, 0xfb, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x41, 0x08, 0x00, 0x30, 0x7c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0xe6, 0x1b, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0xfc, +  0xff, 0xfb, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +  0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, +  0x08, 0x00, 0x20, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1e, 0x64, +  0x30, 0xc6, 0x80, 0x80, 0x09, 0x06, 0x63, 0xfe, 0xf9, 0xff, 0xff, 0xff, +  0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf8, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x00, 0xc0, 0x3c, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1e, 0x64, 0x30, 0xc6, 0x80, 0x80, +  0x09, 0x06, 0x63, 0xfe, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1c, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc3, 0x07, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0e, 0x00, 0x39, 0x03, 0x00, 0x00, 0x04, 0x0c, 0xc0, 0x60, 0x80, 0x3f, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +  0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x39, 0x03, +  0x00, 0x00, 0x04, 0x0c, 0xc0, 0x60, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3e, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x80, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0xe7, 0x04, 0x42, 0xc6, 0x00, 0x00, +  0x00, 0x00, 0xec, 0xcf, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x0f, 0xc0, 0x1f, 0x80, 0x01, 0x00, 0x98, 0x4c, 0x06, 0x06, 0xf0, 0x01, +  0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +  0x01, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x09, 0xc0, 0x1f, 0x80, +  0x01, 0x00, 0x98, 0x4c, 0x06, 0x06, 0xf0, 0x01, 0x00, 0xe0, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3f, 0x08, 0xc0, 0xe6, 0x04, 0x0c, 0x08, 0x00, 0x00, +  0xc0, 0x60, 0x7c, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x1f, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, +  0x00, 0xc0, 0xe6, 0x04, 0x0c, 0x08, 0x00, 0x00, 0xc0, 0x60, 0x7c, 0x00, +  0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xc0, 0x19, 0x60, +  0x40, 0x00, 0x63, 0x30, 0x08, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0xff, 0xf3, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x09, 0xc0, 0x19, 0x60, 0x40, 0x00, 0x63, 0x30, +  0x08, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xf3, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x78, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0f, 0xc0, 0x27, 0x03, 0x00, 0x30, 0x00, 0x03, 0x00, 0xe6, 0x1f, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +  0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0xcf, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xc0, 0x27, 0x03, +  0x00, 0x30, 0x00, 0x03, 0x00, 0xe6, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x0f, 0xc0, 0xde, 0x04, 0x0c, 0x06, 0x03, 0x80, +  0xc1, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0f, 0x03, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x0f, 0xc0, 0x19, 0x00, 0x32, 0x00, 0x60, 0x30, 0x08, 0xff, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9f, +  0x07, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x09, 0xc0, 0x19, 0x00, +  0x32, 0x00, 0x60, 0x30, 0x08, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9f, 0x07, 0x00, 0x18, 0x40, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3f, 0x00, 0xc0, 0x27, 0x63, 0x80, 0x31, 0x04, 0x03, +  0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +  0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1c, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x1f, 0x07, 0x00, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, +  0x00, 0xc0, 0x27, 0x63, 0x80, 0x31, 0x04, 0x03, 0xf0, 0xff, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0x7f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, +  0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, +  0x04, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x00, 0xd9, 0x04, +  0x00, 0x08, 0x00, 0x80, 0xf9, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xf0, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x1e, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xfe, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x04, 0x00, 0x60, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0xd9, 0x04, 0x00, 0x08, 0x00, 0x80, +  0xf9, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0x7f, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x78, 0x00, 0xf0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0f, 0xc0, 0x27, 0x00, 0x30, 0xc0, 0x60, 0xb0, 0xff, 0x7f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, +  0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, +  0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0xde, 0x9b, +  0x8d, 0x01, 0x04, 0xc3, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x80, 0xf1, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x03, 0x00, 0xf0, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0xde, 0x9b, 0x8d, 0x01, 0x04, 0xc3, +  0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf1, 0xff, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3e, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xc0, 0x39, 0x04, 0x00, 0xc8, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xf8, 0xff, 0x3f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x39, 0x04, +  0x00, 0xc8, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc6, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1f, 0x00, 0xc0, 0xc7, 0x60, 0x42, 0x00, 0x60, 0xff, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, +  0x00, 0xc0, 0xc7, 0x60, 0x42, 0x00, 0x60, 0xff, 0xff, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0xc0, 0xff, 0x07, +  0xb0, 0x09, 0xe4, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x30, 0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0xde, 0x78, 0x02, 0x00, 0xfb, 0xff, +  0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xc0, 0xde, 0x78, 0x02, 0x00, 0xfb, 0xff, 0xff, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x1f, 0xf8, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x08, +  0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0x3f, 0x07, +  0xb0, 0xc9, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xc0, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0x3f, 0x07, 0xb0, 0xc9, 0xf8, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, +  0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x0f, 0x00, 0xe7, 0xfb, 0x43, 0x30, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, +  0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x07, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0xe7, 0xfb, +  0x43, 0x30, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x08, 0x70, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0xe0, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xfe, 0x1c, 0xb2, 0x0f, 0xe0, 0xff, +  0x07, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xc0, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0xf8, 0xe7, 0xfd, 0x01, 0xe0, 0xff, 0x07, 0x00, 0xe0, 0xff, +  0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xe0, +  0xb1, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf0, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xf8, 0xe7, +  0xfd, 0x01, 0xe0, 0xff, 0x07, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xe0, 0xb1, 0x3f, 0x00, 0x00, +  0xf8, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x80, 0xff, +  0x01, 0x00, 0xe0, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x98, 0x4f, 0x0e, 0x18, 0x00, 0xf8, 0xff, 0xff, 0xff, +  0x07, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +  0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x80, 0xff, 0x01, 0x00, 0xe0, 0x03, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, +  0x4f, 0x0e, 0xf8, 0x1f, 0xf6, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x08, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0xff, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xb1, 0x01, 0xff, 0x1f, +  0xf6, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x04, 0x08, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0xb1, 0x01, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, +  0x00, 0xce, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0xe3, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xe0, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0xce, 0xff, 0x7f, +  0x00, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x20, 0x1b, 0xb2, 0x31, 0xff, 0x7f, 0x00, 0xff, 0xff, 0xff, +  0x3f, 0x00, 0x00, 0xe0, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x1c, +  0x00, 0xc0, 0xff, 0x73, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf0, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, +  0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +  0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc0, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x1c, 0x00, 0xc0, 0x7f, 0x1c, +  0x30, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x78, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x38, 0x87, 0x31, 0x06, 0x7c, 0x1c, 0x30, 0xff, 0xff, 0xff, +  0xff, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x87, +  0x31, 0x06, 0xfc, 0x0f, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x38, +  0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, +  0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xc0, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe6, 0x04, 0x00, 0x30, 0xe3, 0x0f, +  0xc8, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xe0, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x30, 0xe6, 0x04, 0x00, 0x30, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, +  0xff, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0x07, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1b, +  0x4c, 0x00, 0x04, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x10, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x01, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0xc0, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x04, 0x00, 0x06, 0x18, 0x80, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0f, 0x0e, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x02, 0x07, 0x04, 0x00, 0x06, 0x78, 0xf3, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x07, 0x00, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +  0x08, 0x00, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3e, 0x04, +  0x02, 0x30, 0x60, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0xf8, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc0, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3e, 0x04, 0x02, 0x30, 0xe0, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc6, 0x04, 0x40, 0x00, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x07, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x08, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x04, +  0x40, 0x00, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x08, +  0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x39, 0x67, 0x00, 0x06, 0xe0, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x06, 0x04, 0x30, 0x00, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +  0x0f, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, +  0x30, 0x00, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x08, +  0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, +  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x7e, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3e, 0x9b, 0x01, 0x30, 0xe0, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x08, 0x60, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x06, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x30, 0x3e, 0x9b, 0x01, 0x30, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x1c, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0x02, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x01, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x1c, +  0x0c, 0x06, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x38, +  0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xe0, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xf0, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x1c, 0x0c, 0x06, 0xfb, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x68, 0x7c, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf8, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x38, 0x18, 0x00, 0x00, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0xc0, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x18, 0xfe, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0xff, 0x03, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc6, 0x9b, +  0x81, 0x01, 0x60, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x80, +  0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xc0, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc6, 0x9b, 0x81, 0x01, 0x00, 0x00, +  0xf6, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x38, 0x78, 0x0c, 0x30, 0x04, 0x00, 0xf6, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0xe8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +  0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x78, +  0x0c, 0x30, 0x04, 0x00, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, +  0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, +  0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x80, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x64, 0x40, 0x00, 0x1c, 0x00, +  0xc8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0x58, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x04, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0x64, 0x40, 0x00, 0xfc, 0x03, 0xc0, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x08, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, +  0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xe0, +  0x01, 0x36, 0xfc, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x38, +  0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xff, +  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x80, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xe0, 0x01, 0x36, 0xfc, 0x1f, +  0x30, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x18, 0x40, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x8f, 0x01, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc6, 0x87, 0x0f, 0x00, 0xff, 0x1f, 0x30, 0xff, 0xff, 0xff, +  0xff, 0x07, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0xcf, 0x03, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, +  0x40, 0xc0, 0xff, 0x7f, 0xc0, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x00, 0x08, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xcf, 0x03, 0x00, 0xff, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xc0, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x40, 0xc0, 0xff, 0x7f, +  0x00, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x8f, 0x01, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x0e, 0xc6, 0xff, 0x7f, 0x00, 0xff, 0xff, 0xff, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +  0x0e, 0xc6, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, +  0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xf0, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x9c, 0x01, 0x30, 0xff, 0x7f, +  0x00, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x20, 0x9c, 0x01, 0x30, 0xff, 0x63, 0x30, 0xff, 0xff, 0xff, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x08, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0x07, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +  0x4c, 0x00, 0xff, 0x63, 0x30, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xff, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x31, 0xfc, 0x1f, +  0x00, 0xff, 0xff, 0xfd, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xb2, 0x31, 0xfc, 0x0f, 0x00, 0xff, 0xff, 0x03, +  0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, +  0x41, 0x00, 0xe0, 0x0f, 0x00, 0xff, 0xff, 0x03, 0xff, 0x03, 0x00, 0x38, +  0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x41, 0x00, 0x00, 0x80, +  0xc9, 0xf9, 0xff, 0x3d, 0xff, 0x03, 0x00, 0x78, 0xc0, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x60, 0x32, 0x08, 0x00, 0x80, 0xc9, 0xf9, 0xff, 0x3d, +  0xff, 0x03, 0x00, 0xf8, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x02, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +  0x32, 0x08, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xcf, 0xff, 0x00, 0x00, 0xf8, +  0x81, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xff, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xe0, 0x01, 0xf8, 0x00, 0x00, +  0xf0, 0xff, 0xff, 0xcf, 0xff, 0x00, 0x00, 0x38, 0x03, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x60, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0xff, 0xff, +  0x3f, 0x00, 0x00, 0x38, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0c, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x38, +  0x1e, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x18, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0xff, +  0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0xfc, +  0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x38, 0xfc, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x70, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x1f, 0x00, 0x00, 0x38, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, +  0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x78, +  0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xe0, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, +  0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xf8, 0xc1, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x60, 0xf8, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, +  0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc0, 0xff, +  0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x67, +  0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x13, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xc0, 0xff, +  0xff, 0xff, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x67, 0xfe, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf0, 0xff, 0xff, 0x98, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, +  0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0x0f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x08, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x98, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x70, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xf8, 0xff, +  0xff, 0xff, 0x7f, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x3f, 0xe7, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xff, 0xfc, 0xff, 0xff, 0xff, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0xff, 0xff, 0x3f, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +  0x00, 0xc0, 0xff, 0x67, 0x8c, 0xf9, 0xfb, 0x73, 0x00, 0x67, 0x10, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xf8, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0xff, 0x67, +  0x8c, 0xf9, 0xfb, 0x73, 0x00, 0x67, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0xe7, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x27, 0xfc, 0x73, 0xc6, 0x1c, 0x8c, +  0x37, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, +  0xff, 0xff, 0x1f, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, +  0x00, 0xc0, 0x27, 0xfc, 0x73, 0xc6, 0x1c, 0x8c, 0x37, 0x80, 0x0c, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xfc, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0xc0, 0xfe, 0x03, +  0x8c, 0x09, 0xe3, 0x73, 0xc8, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0xc0, 0xfe, 0x03, 0x8c, 0x09, 0xe3, 0x73, +  0xc8, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0xc0, 0x27, 0xe7, 0x31, 0x36, 0x04, 0x8c, 0x01, 0x60, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, +  0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0xc0, 0xde, 0x18, +  0x42, 0xc0, 0x98, 0x30, 0x08, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0xc0, 0xde, 0x18, 0x42, 0xc0, 0x98, 0x30, +  0x08, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0xc0, 0x27, 0x63, 0x00, 0x08, 0x63, 0x03, 0x06, 0x60, 0x10, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x27, 0x63, +  0x00, 0x08, 0x63, 0x03, 0x06, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0xd9, 0x04, 0xb2, 0x01, 0x00, 0xb0, +  0x31, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xff, +  0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x08, 0xc0, 0xd9, 0x04, 0xb2, 0x01, 0x00, 0xb0, 0x31, 0x19, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0c, 0xc0, 0x1e, 0x63, +  0x00, 0x30, 0x04, 0x03, 0xc8, 0x60, 0x00, 0x0e, 0x00, 0x00, 0xfc, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x0e, 0xc0, 0xe1, 0x18, 0x80, 0x01, 0x60, 0xb0, +  0x01, 0xe7, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +  0x0f, 0xc0, 0xe1, 0x18, 0x80, 0x01, 0x60, 0xb0, 0x01, 0xe7, 0xf3, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x0f, 0xc0, 0x1e, 0x03, +  0x02, 0x08, 0x04, 0x00, 0xc8, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xd8, 0x0f, 0xc0, 0x1e, 0x03, 0x02, 0x08, 0x04, 0x00, +  0xc8, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xc0, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x0b, 0x00, 0x21, 0x64, 0x40, 0xc0, 0x00, 0xb3, 0xf1, 0xfe, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfb, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x21, 0x64, +  0x40, 0xc0, 0x00, 0xb3, 0xf1, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xfb, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfc, 0xfb, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfd, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0x06, 0x60, 0x00, +  0x0e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0xf9, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, +  0x01, 0xc0, 0xdf, 0x00, 0x00, 0x06, 0x60, 0x00, 0x0e, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, +  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf0, 0x03, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0b, 0xc0, 0xc0, 0x84, +  0x31, 0xc0, 0x00, 0x4c, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x83, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x1e, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0f, 0x0e, 0xc0, 0x3f, 0x18, 0x00, 0x06, 0x84, 0x80, +  0x09, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0xc3, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +  0x0c, 0xc0, 0x3f, 0x18, 0x00, 0x06, 0x84, 0x80, 0x09, 0xff, 0xff, 0x3f, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, +  0xc1, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x08, 0xc0, 0xc1, 0x03, +  0x4c, 0x00, 0x00, 0x30, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x90, 0x13, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x08, 0xc0, 0xc1, 0x03, 0x4c, 0x00, 0x00, 0x30, +  0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x00, 0xc0, 0x3f, 0x98, 0x01, 0x08, 0x1b, 0x43, 0xc8, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, +  0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x98, +  0x01, 0x08, 0x1b, 0x43, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x18, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0xc6, 0x03, 0x40, 0x00, 0x00, 0x80, +  0x31, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, +  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0xef, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, +  0x00, 0x00, 0x3f, 0x18, 0x0c, 0x30, 0x60, 0x0c, 0xce, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0xef, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x18, +  0x0c, 0x30, 0x60, 0x0c, 0xce, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xc7, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xde, 0x63, 0x40, 0x06, 0x03, 0x30, +  0x30, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, +  0x00, 0x00, 0xde, 0x63, 0x40, 0x06, 0x03, 0x30, 0x30, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, +  0x02, 0x00, 0x00, 0x83, 0xc9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x38, 0x04, 0x02, 0x00, 0x00, 0x83, +  0xc9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0x03, 0x00, 0xe0, 0x1b, 0x0c, 0x08, 0x18, 0x40, 0x30, 0xfe, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0xc0, 0x84, +  0x81, 0x01, 0x03, 0x0c, 0xc6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0xc0, 0x84, 0x81, 0x01, 0x03, 0x0c, +  0xc6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +  0x0e, 0x00, 0x00, 0x1b, 0x0c, 0x30, 0x80, 0x00, 0x30, 0xf8, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, +  0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x1b, +  0x0c, 0x30, 0x80, 0x00, 0x30, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +  0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x67, 0xc0, 0x01, 0x04, 0x40, +  0x00, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x08, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x08, 0x00, 0x00, 0x67, 0xc0, 0x01, 0x04, 0x40, 0x00, 0xe1, 0xff, 0xff, +  0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, +  0x30, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x9c, +  0x01, 0x08, 0x60, 0x0c, 0x06, 0x86, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, +  0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbf, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x18, 0x0c, 0xc0, 0x00, 0x00, +  0xc0, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf0, 0x9f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, +  0x07, 0x00, 0x00, 0x18, 0x0c, 0xc0, 0x00, 0x00, 0xc0, 0x00, 0xfc, 0xff, +  0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xe0, +  0x01, 0x06, 0x00, 0x30, 0x06, 0x86, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, +  0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x06, 0x00, 0x30, +  0x06, 0x86, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, +  0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x63, 0x03, 0x30, 0x00, 0xe0, 0xff, +  0xff, 0xff, 0xff, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, +  0x30, 0x00, 0x63, 0x03, 0x30, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x80, 0x83, 0x09, 0x18, 0x00, +  0x00, 0x06, 0x83, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x08, 0x00, 0x00, 0x80, 0x83, 0x09, 0x18, 0x00, 0x00, 0x06, 0x83, 0xff, +  0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x00, 0xc0, 0x00, 0x8c, 0xc9, 0x60, 0x00, 0xfe, 0xff, 0xff, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x8e, 0x01, 0x84, 0x40, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0x0f, 0x00, 0x00, 0x00, 0x8e, 0x01, 0x84, 0x40, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, +  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +  0x04, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x60, 0x83, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, +  0x00, 0xc8, 0x60, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x0c, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0f, 0x00, 0x00, 0x00, 0x80, 0xc1, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, +  0x80, 0xc1, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x60, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc6, +  0x03, 0x00, 0x00, 0x00, 0x40, 0x08, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xef, 0x07, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xd8, 0xef, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x1c, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xf3, +  0x0f, 0x00, 0x00, 0x00, 0x80, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x33, 0x0c, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x88, 0x13, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x13, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x33, 0x0c, 0x00, 0x00, 0x00, +  0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x88, 0xf3, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xe3, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xe1, 0x1f, 0x00, 0x00, 0x00, +  0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xf0, 0xc1, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, +  0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x60, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfc, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0xfe, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  }; diff --git a/arch/m68k/platform/68000/bootlogo.h b/arch/m68k/platform/68000/bootlogo.h new file mode 100644 index 00000000000..b896c933faf --- /dev/null +++ b/arch/m68k/platform/68000/bootlogo.h @@ -0,0 +1,270 @@ +#define bootlogo_width 160 +#define bootlogo_height 160 +unsigned char __attribute__ ((aligned(16))) bootlogo_bits[] = { +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x40, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x80, 0x08, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, +  0x00, 0xff, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0xf8, 0x80, 0x0f, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x50, 0x04, 0x00, 0x00, 0x00, 0x78, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x00, +  0x00, 0x78, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x40, +  0xa8, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x70, 0x28, 0x01, 0x00, 0x00, +  0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x20, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x70, +  0x54, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x80, 0x01, 0x3a, 0x78, 0x80, 0x0e, +  0x50, 0xc0, 0x03, 0x0e, 0x00, 0x20, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, +  0x00, 0x3e, 0xf0, 0x83, 0x1f, 0xfc, 0xe0, 0x0f, 0x78, 0xf8, 0x87, 0x1f, +  0x00, 0x18, 0x00, 0x30, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xf8, 0xc3, +  0x1f, 0xfc, 0xe0, 0x0f, 0x78, 0xf8, 0x87, 0x0f, 0x00, 0x20, 0x00, 0x10, +  0x55, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xc0, 0x03, 0x9f, 0xf3, 0x80, 0x0f, +  0x78, 0x80, 0xc7, 0x0e, 0x00, 0x18, 0x00, 0x20, 0xaa, 0x00, 0x00, 0x00, +  0x00, 0x1e, 0xe0, 0x03, 0x9f, 0xf1, 0x80, 0x07, 0x78, 0x80, 0x67, 0x00, +  0x00, 0x24, 0x00, 0x18, 0x55, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x01, +  0x5e, 0xf0, 0x80, 0x07, 0x3c, 0x00, 0x2f, 0x00, 0x00, 0x14, 0x00, 0x20, +  0xaa, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x01, 0x7f, 0xf0, 0x80, 0x07, +  0x3c, 0x00, 0x3f, 0x00, 0x00, 0x08, 0x00, 0x18, 0x55, 0x00, 0x00, 0x00, +  0x00, 0x0f, 0xe0, 0x00, 0x3f, 0xf0, 0xc0, 0x03, 0x1e, 0x00, 0x1f, 0x00, +  0x00, 0x14, 0x00, 0x28, 0xaa, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xf0, 0x00, +  0x1f, 0xf0, 0xc0, 0x03, 0x1f, 0x00, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x0c, +  0x54, 0x00, 0x00, 0x00, 0x80, 0x07, 0x78, 0x00, 0x1f, 0x78, 0xc0, 0x03, +  0x1f, 0x00, 0x1e, 0x00, 0x00, 0x0a, 0x00, 0x12, 0xa8, 0x00, 0x00, 0x00, +  0x80, 0x07, 0x78, 0x00, 0x1f, 0x78, 0xe0, 0x03, 0x1f, 0x00, 0x1f, 0x00, +  0x00, 0x04, 0x00, 0x0a, 0x54, 0x00, 0x00, 0x00, 0x80, 0x07, 0x78, 0x80, +  0x0f, 0x78, 0xe0, 0x03, 0x1f, 0x00, 0x1e, 0x00, 0x00, 0x0a, 0x00, 0x08, +  0x50, 0x01, 0x00, 0x00, 0x84, 0x03, 0x78, 0x80, 0x07, 0x3c, 0xe0, 0xc1, +  0x0f, 0x00, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x06, 0xa8, 0x00, 0x00, 0x00, +  0xc0, 0x03, 0x78, 0xc0, 0x07, 0x3c, 0xe0, 0xc1, 0x0f, 0x00, 0x1f, 0x00, +  0x00, 0x0a, 0x00, 0x08, 0x50, 0x01, 0x00, 0x00, 0xc2, 0x01, 0x38, 0xc0, +  0x07, 0x3c, 0xe0, 0x60, 0x0f, 0x80, 0x1e, 0x00, 0x00, 0x05, 0x00, 0x07, +  0xa0, 0x00, 0x00, 0x80, 0xe0, 0x01, 0x3c, 0xc0, 0x07, 0x3c, 0xf0, 0xa0, +  0x07, 0xc0, 0x1c, 0x00, 0x00, 0x0a, 0x80, 0x08, 0xa0, 0x02, 0x00, 0xa0, +  0xe0, 0x21, 0x1c, 0xc0, 0x03, 0x1c, 0x71, 0x90, 0x47, 0x40, 0x3c, 0x04, +  0x00, 0x05, 0x80, 0x06, 0xa0, 0x02, 0x00, 0x20, 0xe0, 0x31, 0x1e, 0xc3, +  0x03, 0x1e, 0x79, 0x98, 0x47, 0x60, 0x38, 0x04, 0x00, 0x15, 0x40, 0x0a, +  0xa0, 0x0a, 0x00, 0x1a, 0xe0, 0x19, 0x9e, 0xe1, 0x01, 0x9e, 0x78, 0xcc, +  0xa7, 0x32, 0x78, 0x02, 0x80, 0x2a, 0x40, 0x05, 0x80, 0x2a, 0x00, 0x05, +  0xe0, 0x0d, 0x9e, 0xe0, 0x01, 0xde, 0x78, 0xc6, 0x97, 0x1b, 0x78, 0x03, +  0x80, 0x52, 0x30, 0x0a, 0x00, 0x95, 0xd2, 0x0a, 0xe0, 0x0f, 0xfe, 0xe0, +  0x00, 0x7e, 0xf8, 0x87, 0x9f, 0x0f, 0xf8, 0x01, 0x00, 0xa1, 0x0e, 0x15, +  0x80, 0x55, 0x55, 0x01, 0xe0, 0x01, 0x3c, 0xf0, 0x00, 0x3c, 0xf0, 0x80, +  0x8f, 0x0f, 0x70, 0x00, 0x00, 0x81, 0x02, 0x14, 0x00, 0x54, 0x55, 0x00, +  0xc0, 0x01, 0x3c, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x07, 0x03, 0x70, 0x00, +  0x80, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x40, 0x01, 0x00, 0x11, 0x09, 0x00, 0x04, 0x00, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, +  0x00, 0x20, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x49, 0x32, 0x49, 0x49, 0x91, +  0x24, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x20, 0x49, 0x0a, 0x09, 0xc9, 0x92, 0x14, 0x81, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x49, +  0x18, 0x01, 0x49, 0x92, 0x0c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x49, 0x30, 0x01, 0x49, 0x92, +  0x14, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x08, 0x69, 0x22, 0x09, 0x49, 0xd2, 0x24, 0x24, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x51, +  0x1a, 0x09, 0x49, 0xa2, 0x44, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +  0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x87, 0x08, 0x00, 0x00, 0x00, +  0xf2, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, +  0x09, 0x01, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80, +  0x88, 0x86, 0x48, 0x04, 0x09, 0x08, 0x01, 0x01, 0x09, 0x01, 0x10, 0x71, +  0x88, 0x66, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80, 0x88, 0x89, 0x48, 0x84, +  0x08, 0x08, 0x01, 0x01, 0x09, 0x01, 0x10, 0x89, 0x88, 0x99, 0x00, 0x00, +  0x00, 0x40, 0x24, 0x80, 0x88, 0x88, 0x88, 0x82, 0xf8, 0xf0, 0xe0, 0x80, +  0xf0, 0xf8, 0x13, 0x81, 0x88, 0x88, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80, +  0x88, 0x88, 0x08, 0x81, 0x08, 0x09, 0x01, 0x41, 0x08, 0x01, 0xf0, 0xf0, +  0x88, 0x88, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80, 0x88, 0x88, 0x88, 0x42, +  0x08, 0x09, 0x01, 0x21, 0x08, 0x01, 0x10, 0x88, 0x88, 0x88, 0x00, 0x00, +  0x00, 0x40, 0x46, 0x88, 0x88, 0x88, 0x4c, 0x44, 0x08, 0x09, 0x09, 0x11, +  0x08, 0x01, 0x10, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x80, 0x85, 0x87, +  0x88, 0x08, 0x4b, 0x24, 0xf0, 0xf0, 0xf0, 0xf8, 0xf1, 0x00, 0x10, 0x70, +  0x89, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, +  0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, +  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0xff, 0x3f, 0x0f, 0x00, 0x00, 0x08, 0x02, 0x04, 0x00, +  0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, +  0xff, 0x1f, 0x00, 0x00, 0x48, 0x62, 0xc4, 0x31, 0x4a, 0x18, 0x3c, 0x03, +  0x21, 0x45, 0x92, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00, +  0x48, 0x92, 0x24, 0x48, 0xb6, 0x24, 0x88, 0x04, 0x21, 0x4b, 0x92, 0x00, +  0x00, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xa8, 0xf2, 0x24, 0x48, +  0x92, 0x3c, 0x88, 0x04, 0x21, 0x49, 0x62, 0x00, 0x00, 0x00, 0x80, 0xff, +  0xff, 0x3f, 0x00, 0x00, 0x10, 0x11, 0x24, 0x48, 0x92, 0x04, 0x88, 0x04, +  0x21, 0x49, 0x62, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, +  0x10, 0x11, 0x24, 0x48, 0x92, 0x04, 0x88, 0x04, 0x21, 0x49, 0x93, 0x00, +  0x00, 0x00, 0x80, 0xff, 0xcf, 0x7e, 0x00, 0x00, 0x10, 0xe1, 0xc4, 0x31, +  0x92, 0x38, 0x30, 0x03, 0x2f, 0x89, 0x92, 0x00, 0x00, 0x00, 0x80, 0xe3, +  0x07, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc1, 0x03, 0x7e, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0xc9, 0x23, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x95, +  0x33, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0xfb, 0x7e, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x80, 0x1d, 0xf8, 0x7e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, +  0x02, 0x00, 0x40, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9b, +  0x70, 0x7e, 0x00, 0x00, 0x08, 0x00, 0xe0, 0x00, 0x02, 0x00, 0x47, 0x80, +  0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80, 0x03, 0x00, 0x7e, 0x00, 0x00, +  0x3c, 0xa3, 0x20, 0x31, 0x52, 0x02, 0x49, 0xcc, 0x3f, 0xa3, 0x94, 0x08, +  0x00, 0x00, 0x00, 0x27, 0x02, 0x7e, 0x00, 0x00, 0x88, 0xe4, 0x20, 0x41, +  0xb2, 0x05, 0x49, 0x90, 0x88, 0xe4, 0x6c, 0x09, 0x00, 0x00, 0x00, 0x01, +  0x00, 0x7e, 0x00, 0x00, 0x88, 0x24, 0xe0, 0x70, 0x92, 0x04, 0x47, 0x9c, +  0x88, 0x24, 0x24, 0x09, 0x00, 0x00, 0x00, 0x13, 0x48, 0x7e, 0x00, 0x00, +  0x88, 0x24, 0x20, 0x48, 0x92, 0x04, 0x41, 0x92, 0x88, 0x24, 0x24, 0x01, +  0x00, 0x00, 0x00, 0x43, 0x00, 0xfe, 0x00, 0x00, 0x88, 0x24, 0x20, 0x48, +  0x92, 0x04, 0x41, 0x92, 0x88, 0x24, 0x24, 0x09, 0x00, 0x00, 0x00, 0x07, +  0x94, 0xce, 0x00, 0x00, 0x08, 0x23, 0x20, 0xb0, 0x92, 0x04, 0x41, 0x2c, +  0x0b, 0x23, 0x24, 0x09, 0x00, 0x00, 0x00, 0x49, 0x02, 0xce, 0x01, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x11, 0x08, 0xdc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, +  0x01, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xf8, 0x07, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0xc0, 0x01, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, +  0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xf0, 0x1f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x70, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, +  0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xe0, 0x7f, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x3c, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, +  0x00, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0x01, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, +  0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x07, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, +  0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0xfe, 0x0f, +  0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x80, 0x08, 0x00, +  0x00, 0xc0, 0x03, 0x00, 0x78, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x40, 0x10, +  0x12, 0x10, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, +  0x84, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x20, 0x26, 0x0a, 0x10, 0x9d, 0x39, +  0xa6, 0xb2, 0x0a, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x02, 0x00, 0xfe, 0x0f, +  0x00, 0x00, 0x20, 0x21, 0x06, 0x28, 0x25, 0x4a, 0xa9, 0x8a, 0x09, 0x00, +  0x00, 0xe0, 0x01, 0x22, 0x02, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x20, 0x21, +  0x0e, 0x38, 0xa5, 0x4b, 0xa9, 0xb2, 0x09, 0x00, 0x00, 0xf0, 0x01, 0x22, +  0x02, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x20, 0x21, 0x12, 0x44, 0xa5, 0x4a, +  0x49, 0xa1, 0x0a, 0x00, 0x00, 0xf8, 0x01, 0x22, 0x02, 0x00, 0xfc, 0x1f, +  0x00, 0x00, 0x20, 0x26, 0x52, 0x44, 0x9d, 0x4d, 0x46, 0x99, 0x0a, 0x00, +  0x00, 0xfc, 0x01, 0x22, 0x02, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x40, 0x10, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0xb2, +  0x84, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x6e, 0x78, 0x00, 0xfc, 0x1f, +  0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0xfc, 0x01, 0x02, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x02, +  0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0xfc, 0x0f, +  0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x20, 0x01, 0x02, 0x00, 0x00, 0x00, +  0x00, 0x24, 0x06, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x40, 0x10, +  0x1e, 0x20, 0x90, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, +  0x00, 0x80, 0xfc, 0x03, 0x00, 0x00, 0x20, 0x26, 0x22, 0x20, 0xf9, 0x89, +  0x32, 0xe7, 0x08, 0x00, 0x00, 0x92, 0x38, 0x00, 0x00, 0x00, 0xfc, 0x01, +  0x00, 0x00, 0x20, 0x21, 0x22, 0xa0, 0x92, 0x88, 0x4a, 0x29, 0x15, 0x00, +  0x00, 0x00, 0x78, 0x00, 0x00, 0x40, 0xfa, 0x04, 0x00, 0x00, 0x20, 0x21, +  0x22, 0xa0, 0x93, 0x88, 0x4a, 0x29, 0x1d, 0x00, 0x00, 0x11, 0xf2, 0x00, +  0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x20, 0x21, 0x22, 0xa8, 0x90, 0x88, +  0x4a, 0x29, 0x05, 0x00, 0x48, 0x40, 0xf0, 0x01, 0x00, 0x80, 0x14, 0x04, +  0x00, 0x00, 0x20, 0x26, 0x9e, 0x10, 0x93, 0x78, 0x32, 0x29, 0x19, 0x00, +  0x00, 0x09, 0xe0, 0x03, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x40, 0x10, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xc5, 0x03, +  0x00, 0x40, 0x22, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0xc0, 0x07, 0x00, 0x20, 0x08, 0x04, +  0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x08, 0x50, 0x90, 0x03, 0x00, 0xb0, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +  0x00, 0x38, 0x22, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x48, 0x04, 0x44, 0x00, 0x00, 0x3c, 0x08, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x20, 0x00, 0x00, 0x00, 0xbf, 0x40, 0x42, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24, 0x80, 0x48, 0x02, +  0xc0, 0x1f, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x05, 0xf0, 0x3f, 0x09, 0x00, +  0x00, 0x10, 0x24, 0x48, 0x10, 0x12, 0x41, 0x52, 0x24, 0x09, 0x46, 0x71, +  0x90, 0x20, 0x02, 0xfc, 0xff, 0x1f, 0x80, 0x22, 0x00, 0x90, 0x24, 0x49, +  0x12, 0x92, 0x40, 0xb2, 0x24, 0x09, 0xc9, 0x49, 0x04, 0x80, 0x90, 0xfc, +  0xff, 0xbf, 0x24, 0x00, 0x00, 0x90, 0x24, 0x49, 0x12, 0x92, 0x40, 0x92, +  0x24, 0x06, 0x49, 0x48, 0x50, 0x0a, 0x02, 0xfe, 0xff, 0x3f, 0x00, 0x05, +  0x00, 0x50, 0xa5, 0x4a, 0x15, 0x92, 0x40, 0x92, 0x24, 0x06, 0x49, 0x48, +  0x80, 0x40, 0x48, 0xfe, 0xff, 0x3f, 0x49, 0x00, 0x00, 0x20, 0x42, 0x84, +  0x88, 0x1a, 0x41, 0x92, 0x34, 0x49, 0x49, 0x68, 0x00, 0x38, 0x10, 0x07, +  0x00, 0x60, 0x80, 0x00, 0x00, 0x20, 0x42, 0x84, 0x88, 0x14, 0x4e, 0x92, +  0x28, 0x49, 0x46, 0x50, 0x00, 0x80, 0x83, 0x01, 0x00, 0xa0, 0x6a, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +  0x00, 0x00, 0xfc, 0x00, 0x00, 0xc0, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, }; diff --git a/arch/m68k/platform/68000/entry.S b/arch/m68k/platform/68000/entry.S new file mode 100644 index 00000000000..23ac054c6e1 --- /dev/null +++ b/arch/m68k/platform/68000/entry.S @@ -0,0 +1,244 @@ +/* + *  linux/arch/m68knommu/platform/68328/entry.S + * + *  Copyright (C) 1991, 1992  Linus Torvalds + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file README.legal in the main directory of this archive + * for more details. + * + * Linux/m68k support by Hamish Macdonald + */ + +#include <linux/linkage.h> +#include <asm/thread_info.h> +#include <asm/unistd.h> +#include <asm/errno.h> +#include <asm/setup.h> +#include <asm/segment.h> +#include <asm/traps.h> +#include <asm/asm-offsets.h> +#include <asm/entry.h> + +.text + +.globl system_call +.globl resume +.globl ret_from_exception +.globl ret_from_signal +.globl sys_call_table +.globl bad_interrupt +.globl inthandler1 +.globl inthandler2 +.globl inthandler3 +.globl inthandler4 +.globl inthandler5 +.globl inthandler6 +.globl inthandler7 + +badsys: +	movel	#-ENOSYS,%sp@(PT_OFF_D0) +	jra	ret_from_exception + +do_trace: +	movel	#-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ +	subql	#4,%sp +	SAVE_SWITCH_STACK +	jbsr	syscall_trace_enter +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	movel	%sp@(PT_OFF_ORIG_D0),%d1 +	movel	#-ENOSYS,%d0 +	cmpl	#NR_syscalls,%d1 +	jcc	1f +	lsl	#2,%d1 +	lea	sys_call_table, %a0 +	jbsr	%a0@(%d1) + +1:	movel	%d0,%sp@(PT_OFF_D0)	/* save the return value */ +	subql	#4,%sp			/* dummy return address */ +	SAVE_SWITCH_STACK +	jbsr	syscall_trace_leave + +ret_from_signal: +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	jra	ret_from_exception + +ENTRY(system_call) +	SAVE_ALL_SYS + +	/* save top of frame*/ +	pea	%sp@ +	jbsr	set_esp0 +	addql	#4,%sp + +	movel	%sp@(PT_OFF_ORIG_D0),%d0 + +	movel	%sp,%d1			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d1 +	movel	%d1,%a2 +	btst	#(TIF_SYSCALL_TRACE%8),%a2@(TINFO_FLAGS+(31-TIF_SYSCALL_TRACE)/8) +	jne	do_trace +	cmpl	#NR_syscalls,%d0 +	jcc	badsys +	lsl	#2,%d0 +	lea	sys_call_table,%a0 +	movel	%a0@(%d0), %a0 +	jbsr	%a0@ +	movel	%d0,%sp@(PT_OFF_D0)	/* save the return value*/ + +ret_from_exception: +	btst	#5,%sp@(PT_OFF_SR)	/* check if returning to kernel*/ +	jeq	Luser_return		/* if so, skip resched, signals*/ + +Lkernel_return: +	RESTORE_ALL + +Luser_return: +	/* only allow interrupts when we are really the last one on the*/ +	/* kernel stack, otherwise stack overflow can occur during*/ +	/* heavy interrupt load*/ +	andw	#ALLOWINT,%sr + +	movel	%sp,%d1			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d1 +	movel	%d1,%a2 +1: +	move	%a2@(TINFO_FLAGS),%d1	/* thread_info->flags */ +	jne	Lwork_to_do +	RESTORE_ALL + +Lwork_to_do: +	movel	%a2@(TINFO_FLAGS),%d1	/* thread_info->flags */ +	btst	#TIF_NEED_RESCHED,%d1 +	jne	reschedule + +Lsignal_return: +	subql	#4,%sp			/* dummy return address*/ +	SAVE_SWITCH_STACK +	pea	%sp@(SWITCH_STACK_SIZE) +	bsrw	do_notify_resume +	addql	#4,%sp +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	jra	1b + +/* + * This is the main interrupt handler, responsible for calling process_int() + */ +inthandler1: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#65,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler2: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#66,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler3: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#67,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler4: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#68,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler5: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#69,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler6: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#70,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler7: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	#71,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +inthandler: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and	#0x3ff, %d0 + +	movel	%sp,%sp@- +	movel	%d0,%sp@- 		/*  put vector # on stack*/ +	jbsr	process_int		/*  process the IRQ*/ +3:     	addql	#8,%sp			/*  pop parameters off stack*/ +	bra	ret_from_exception + +/* + * Handler for uninitialized and spurious interrupts. + */ +ENTRY(bad_interrupt) +	addql	#1,irq_err_count +	rte + +/* + * Beware - when entering resume, prev (the current task) is + * in a0, next (the new task) is in a1, so don't change these + * registers until their contents are no longer needed. + */ +ENTRY(resume) +	movel	%a0,%d1				/* save prev thread in d1 */ +	movew	%sr,%a0@(TASK_THREAD+THREAD_SR)	/* save sr */ +	SAVE_SWITCH_STACK +	movel	%sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack */ +	movel	%usp,%a3			/* save usp */ +	movel	%a3,%a0@(TASK_THREAD+THREAD_USP) + +	movel	%a1@(TASK_THREAD+THREAD_USP),%a3 /* restore user stack */ +	movel	%a3,%usp +	movel	%a1@(TASK_THREAD+THREAD_KSP),%sp /* restore new thread stack */ +	RESTORE_SWITCH_STACK +	movew	%a1@(TASK_THREAD+THREAD_SR),%sr	/* restore thread status reg */ +	rts + diff --git a/arch/m68k/platform/68000/head.S b/arch/m68k/platform/68000/head.S new file mode 100644 index 00000000000..536ef9616da --- /dev/null +++ b/arch/m68k/platform/68000/head.S @@ -0,0 +1,240 @@ +/* + * head.S - Common startup code for 68000 core based CPU's + * + * 2012.10.21, Luis Alves <ljalvs@gmail.com>, Single head.S file for all + *             68000 core based CPU's. Based on the sources from: + *             Coldfire by Greg Ungerer <gerg@snapgear.com> + *             68328 by D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>, + *                      Kenneth Albanowski <kjahds@kjahds.com>, + *                      The Silver Hammer Group, Ltd. + * + */ + +#include <linux/linkage.h> +#include <linux/init.h> +#include <asm/asm-offsets.h> +#include <asm/thread_info.h> + + +/***************************************************************************** + * UCSIMM and UCDIMM use CONFIG_MEMORY_RESERVE to reserve some RAM + *****************************************************************************/ +#ifdef CONFIG_MEMORY_RESERVE +#define RAMEND (CONFIG_RAMBASE+CONFIG_RAMSIZE)-(CONFIG_MEMORY_RESERVE*0x100000) +#else +#define RAMEND (CONFIG_RAMBASE+CONFIG_RAMSIZE) +#endif +/*****************************************************************************/ + +.global _start +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +#if defined(CONFIG_PILOT) || defined(CONFIG_INIT_LCD) +.global bootlogo_bits +#endif + +/* Defining DEBUG_HEAD_CODE, serial port in 68x328 is inited */ +/* #define DEBUG_HEAD_CODE */ +#undef DEBUG_HEAD_CODE + +.data + +/***************************************************************************** + * RAM setup pointers. Used by the kernel to determine RAM location and size. + *****************************************************************************/ + +_rambase: +	.long	0 +_ramvec: +	.long	0 +_ramstart: +	.long	0 +_ramend: +	.long	0 + +__HEAD + +/***************************************************************************** + * Entry point, where all begins! + *****************************************************************************/ + +_start: + +/* Pilot need this specific signature at the start of ROM */ +#ifdef CONFIG_PILOT +	.byte	0x4e, 0xfa, 0x00, 0x0a		/* bra opcode (jmp 10 bytes) */ +	.byte	'b', 'o', 'o', 't' +	.word	10000 +	nop +	moveq	#0, %d0 +	movew	%d0, 0xfffff618			/* Watchdog off */ +	movel	#0x00011f07, 0xfffff114		/* CS A1 Mask */ +#endif /* CONFIG_PILOT */ + +	movew	#0x2700, %sr			/* disable all interrupts */ + +/***************************************************************************** + * Setup PLL and wait for it to settle (in 68x328 cpu's). + * Also, if enabled, init serial port. + *****************************************************************************/ +#if defined(CONFIG_M68328) || \ +    defined(CONFIG_M68EZ328) || \ +    defined(CONFIG_M68VZ328) + +/* Serial port setup. Should only be needed if debugging this startup code. */ +#ifdef DEBUG_HEAD_CODE +	movew	#0x0800, 0xfffff906		/* Ignore CTS */ +	movew	#0x010b, 0xfffff902		/* BAUD to 9600 */ +	movew	#0xe100, 0xfffff900		/* enable */ +#endif /* DEBUG_HEAD */ + +#ifdef CONFIG_PILOT +	movew	#0x2410, 0xfffff200		/* PLLCR */ +#else +	movew	#0x2400, 0xfffff200		/* PLLCR */ +#endif +	movew	#0x0123, 0xfffff202		/* PLLFSR */ +	moveq	#0, %d0 +	movew	#16384, %d0			/* PLL settle wait loop */ +_pll_settle: +	subw	#1, %d0 +	bne	_pll_settle +#endif /* CONFIG_M68x328 */ + + +/***************************************************************************** + * If running kernel from ROM some specific initialization has to be done. + * (Assuming that everything is already init'ed when running from RAM) + *****************************************************************************/ +#ifdef CONFIG_ROMKERNEL + +/***************************************************************************** + * Init chip registers (uCsimm specific) + *****************************************************************************/ +#ifdef CONFIG_UCSIMM +	moveb	#0x00, 0xfffffb0b	/* Watchdog off */ +	moveb	#0x10, 0xfffff000	/* SCR */ +	moveb	#0x00, 0xfffff40b	/* enable chip select */ +	moveb	#0x00, 0xfffff423	/* enable /DWE */ +	moveb	#0x08, 0xfffffd0d	/* disable hardmap */ +	moveb	#0x07, 0xfffffd0e	/* level 7 interrupt clear */ +	movew	#0x8600, 0xfffff100	/* FLASH at 0x10c00000 */ +	movew	#0x018b, 0xfffff110	/* 2Meg, enable, 0ws */ +	movew	#0x8f00, 0xfffffc00	/* DRAM configuration */ +	movew	#0x9667, 0xfffffc02	/* DRAM control */ +	movew	#0x0000, 0xfffff106	/* DRAM at 0x00000000 */ +	movew	#0x068f, 0xfffff116	/* 8Meg, enable, 0ws */ +	moveb	#0x40, 0xfffff300	/* IVR */ +	movel	#0x007FFFFF, %d0	/* IMR */ +	movel	%d0, 0xfffff304 +	moveb	0xfffff42b, %d0 +	andb	#0xe0, %d0 +	moveb	%d0, 0xfffff42b +#endif + +/***************************************************************************** + * Init LCD controller. + * (Assuming that LCD controller is already init'ed when running from RAM) + *****************************************************************************/ +#ifdef CONFIG_INIT_LCD +#ifdef CONFIG_PILOT +	moveb	#0, 0xfffffA27			/* LCKCON */ +	movel	#_start, 0xfffffA00		/* LSSA */ +	moveb	#0xa, 0xfffffA05		/* LVPW */ +	movew	#0x9f, 0xFFFFFa08		/* LXMAX */ +	movew	#0x9f, 0xFFFFFa0a		/* LYMAX */ +	moveb	#9, 0xfffffa29			/* LBAR */ +	moveb	#0, 0xfffffa25			/* LPXCD */ +	moveb	#0x04, 0xFFFFFa20		/* LPICF */ +	moveb	#0x58, 0xfffffA27		/* LCKCON */ +	moveb	#0x85, 0xfffff429		/* PFDATA */ +	moveb	#0xd8, 0xfffffA27		/* LCKCON */ +	moveb	#0xc5, 0xfffff429		/* PFDATA */ +	moveb	#0xd5, 0xfffff429		/* PFDATA */ +	movel	#bootlogo_bits, 0xFFFFFA00	/* LSSA */ +	moveb	#10, 0xFFFFFA05			/* LVPW */ +	movew	#160, 0xFFFFFA08		/* LXMAX */ +	movew	#160, 0xFFFFFA0A		/* LYMAX */ +#else /* CONFIG_PILOT */ +	movel	#bootlogo_bits, 0xfffffA00	/* LSSA */ +	moveb	#0x28, 0xfffffA05		/* LVPW */ +	movew	#0x280, 0xFFFFFa08		/* LXMAX */ +	movew	#0x1df, 0xFFFFFa0a		/* LYMAX */ +	moveb	#0, 0xfffffa29			/* LBAR */ +	moveb	#0, 0xfffffa25			/* LPXCD */ +	moveb	#0x08, 0xFFFFFa20		/* LPICF */ +	moveb	#0x01, 0xFFFFFA21		/* -ve pol */ +	moveb	#0x81, 0xfffffA27		/* LCKCON */ +	movew	#0xff00, 0xfffff412		/* LCD pins */ +#endif /* CONFIG_PILOT */ +#endif /* CONFIG_INIT_LCD */ + +/***************************************************************************** + * Kernel is running from FLASH/ROM (XIP) + * Copy init text & data to RAM + *****************************************************************************/ +	moveal	#_etext, %a0 +	moveal	#_sdata, %a1 +	moveal	#__bss_start, %a2 +_copy_initmem: +	movel	%a0@+, %a1@+ +	cmpal	%a1, %a2 +	bhi	_copy_initmem +#endif /* CONFIG_ROMKERNEL */ + +/***************************************************************************** + * Setup basic memory information for kernel + *****************************************************************************/ +	movel	#CONFIG_VECTORBASE,_ramvec	/* set vector base location */ +	movel	#CONFIG_RAMBASE,_rambase	/* set the base of RAM */ +	movel	#RAMEND, _ramend		/* set end ram addr */ +	lea	__bss_stop,%a1 +	movel	%a1,_ramstart + +/***************************************************************************** + * If the kernel is in RAM, move romfs to right above bss and + * adjust _ramstart to where romfs ends. + * + * (Do this only if CONFIG_MTD_UCLINUX is true) + *****************************************************************************/ + +#if defined(CONFIG_ROMFS_FS) && defined(CONFIG_RAMKERNEL) && \ +    defined(CONFIG_MTD_UCLINUX) +	lea	__bss_start, %a0		/* get start of bss */ +	lea	__bss_stop, %a1			/* set up destination  */ +	movel	%a0, %a2			/* copy of bss start */ + +	movel	8(%a0), %d0			/* get size of ROMFS */ +	addql	#8, %d0				/* allow for rounding */ +	andl	#0xfffffffc, %d0		/* whole words */ + +	addl	%d0, %a0			/* copy from end */ +	addl	%d0, %a1			/* copy from end */ +	movel	%a1, _ramstart			/* set start of ram */ +_copy_romfs: +	movel	-(%a0), -(%a1)			/* copy dword */ +	cmpl	%a0, %a2			/* check if at end */ +	bne	_copy_romfs +#endif /* CONFIG_ROMFS_FS && CONFIG_RAMKERNEL && CONFIG_MTD_UCLINUX */ + +/***************************************************************************** + * Clear bss region + *****************************************************************************/ +	lea	__bss_start, %a0		/* get start of bss */ +	lea	__bss_stop, %a1			/* get end of bss */ +_clear_bss: +	movel	#0, (%a0)+			/* clear each word */ +	cmpl	%a0, %a1			/* check if at end */ +	bne	_clear_bss + +/***************************************************************************** + * Load the current task pointer and stack. + *****************************************************************************/ +	lea	init_thread_union,%a0 +	lea	THREAD_SIZE(%a0),%sp +	jsr	start_kernel			/* start Linux kernel */ +_exit: +	jmp	_exit				/* should never get here */ diff --git a/arch/m68k/platform/68000/ints.c b/arch/m68k/platform/68000/ints.c new file mode 100644 index 00000000000..cda49b12d7b --- /dev/null +++ b/arch/m68k/platform/68000/ints.c @@ -0,0 +1,186 @@ +/* + * ints.c - Generic interrupt controller support + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + * + * Copyright 1996 Roman Zippel + * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com> + */ + +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <asm/traps.h> +#include <asm/io.h> +#include <asm/machdep.h> + +#if defined(CONFIG_M68328) +#include <asm/MC68328.h> +#elif defined(CONFIG_M68EZ328) +#include <asm/MC68EZ328.h> +#elif defined(CONFIG_M68VZ328) +#include <asm/MC68VZ328.h> +#endif + +/* assembler routines */ +asmlinkage void system_call(void); +asmlinkage void buserr(void); +asmlinkage void trap(void); +asmlinkage void trap3(void); +asmlinkage void trap4(void); +asmlinkage void trap5(void); +asmlinkage void trap6(void); +asmlinkage void trap7(void); +asmlinkage void trap8(void); +asmlinkage void trap9(void); +asmlinkage void trap10(void); +asmlinkage void trap11(void); +asmlinkage void trap12(void); +asmlinkage void trap13(void); +asmlinkage void trap14(void); +asmlinkage void trap15(void); +asmlinkage void trap33(void); +asmlinkage void trap34(void); +asmlinkage void trap35(void); +asmlinkage void trap36(void); +asmlinkage void trap37(void); +asmlinkage void trap38(void); +asmlinkage void trap39(void); +asmlinkage void trap40(void); +asmlinkage void trap41(void); +asmlinkage void trap42(void); +asmlinkage void trap43(void); +asmlinkage void trap44(void); +asmlinkage void trap45(void); +asmlinkage void trap46(void); +asmlinkage void trap47(void); +asmlinkage irqreturn_t bad_interrupt(int, void *); +asmlinkage irqreturn_t inthandler(void); +asmlinkage irqreturn_t inthandler1(void); +asmlinkage irqreturn_t inthandler2(void); +asmlinkage irqreturn_t inthandler3(void); +asmlinkage irqreturn_t inthandler4(void); +asmlinkage irqreturn_t inthandler5(void); +asmlinkage irqreturn_t inthandler6(void); +asmlinkage irqreturn_t inthandler7(void); + +/* The 68k family did not have a good way to determine the source + * of interrupts until later in the family.  The EC000 core does + * not provide the vector number on the stack, we vector everything + * into one vector and look in the blasted mask register... + * This code is designed to be fast, almost constant time, not clean! + */ +void process_int(int vec, struct pt_regs *fp) +{ +	int irq; +	int mask; + +	unsigned long pend = ISR; + +	while (pend) { +		if (pend & 0x0000ffff) { +			if (pend & 0x000000ff) { +				if (pend & 0x0000000f) { +					mask = 0x00000001; +					irq = 0; +				} else { +					mask = 0x00000010; +					irq = 4; +				} +			} else { +				if (pend & 0x00000f00) { +					mask = 0x00000100; +					irq = 8; +				} else { +					mask = 0x00001000; +					irq = 12; +				} +			} +		} else { +			if (pend & 0x00ff0000) { +				if (pend & 0x000f0000) { +					mask = 0x00010000; +					irq = 16; +				} else { +					mask = 0x00100000; +					irq = 20; +				} +			} else { +				if (pend & 0x0f000000) { +					mask = 0x01000000; +					irq = 24; +				} else { +					mask = 0x10000000; +					irq = 28; +				} +			} +		} + +		while (! (mask & pend)) { +			mask <<=1; +			irq++; +		} + +		do_IRQ(irq, fp); +		pend &= ~mask; +	} +} + +static void intc_irq_unmask(struct irq_data *d) +{ +	IMR &= ~(1 << d->irq); +} + +static void intc_irq_mask(struct irq_data *d) +{ +	IMR |= (1 << d->irq); +} + +static struct irq_chip intc_irq_chip = { +	.name		= "M68K-INTC", +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +}; + +/* + * This function should be called during kernel startup to initialize + * the machine vector table. + */ +void __init trap_init(void) +{ +	int i; + +	/* set up the vectors */ +	for (i = 72; i < 256; ++i) +		_ramvec[i] = (e_vector) bad_interrupt; + +	_ramvec[32] = system_call; + +	_ramvec[65] = (e_vector) inthandler1; +	_ramvec[66] = (e_vector) inthandler2; +	_ramvec[67] = (e_vector) inthandler3; +	_ramvec[68] = (e_vector) inthandler4; +	_ramvec[69] = (e_vector) inthandler5; +	_ramvec[70] = (e_vector) inthandler6; +	_ramvec[71] = (e_vector) inthandler7; +} + +void __init init_IRQ(void) +{ +	int i; + +	IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */ + +	/* turn off all interrupts */ +	IMR = ~0; + +	for (i = 0; (i < NR_IRQS); i++) { +		irq_set_chip(i, &intc_irq_chip); +		irq_set_handler(i, handle_level_irq); +	} +} + diff --git a/arch/m68k/platform/68000/m68328.c b/arch/m68k/platform/68000/m68328.c new file mode 100644 index 00000000000..e53caf4c3bf --- /dev/null +++ b/arch/m68k/platform/68000/m68328.c @@ -0,0 +1,56 @@ +/***************************************************************************/ + +/* + *  m68328.c - 68328 specific config + * + *  Copyright (C) 1993 Hamish Macdonald + *  Copyright (C) 1999 D. Jeff Dionne + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + * + * VZ Support/Fixes             Evan Stawnyczy <e@lineo.ca> + */ + +/***************************************************************************/ + +#include <linux/init.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/rtc.h> +#include <asm/machdep.h> +#include <asm/MC68328.h> +#if defined(CONFIG_PILOT) || defined(CONFIG_INIT_LCD) +#include "bootlogo.h" +#endif + +/***************************************************************************/ + +int m68328_hwclk(int set, struct rtc_time *t); + +/***************************************************************************/ + +void m68328_reset (void) +{ +  local_irq_disable(); +  asm volatile ("moveal #0x10c00000, %a0;\n\t" +		"moveb #0, 0xFFFFF300;\n\t" +		"moveal 0(%a0), %sp;\n\t" +		"moveal 4(%a0), %a0;\n\t" +		"jmp (%a0);"); +} + +/***************************************************************************/ + +void __init config_BSP(char *command, int len) +{ +  printk(KERN_INFO "\n68328 support D. Jeff Dionne <jeff@uclinux.org>\n"); +  printk(KERN_INFO "68328 support Kenneth Albanowski <kjahds@kjshds.com>\n"); +  printk(KERN_INFO "68328/Pilot support Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de>\n"); + +  mach_hwclk = m68328_hwclk; +  mach_reset = m68328_reset; +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/68000/m68EZ328.c b/arch/m68k/platform/68000/m68EZ328.c new file mode 100644 index 00000000000..21952906e9e --- /dev/null +++ b/arch/m68k/platform/68000/m68EZ328.c @@ -0,0 +1,78 @@ +/***************************************************************************/ + +/* + *  m68EZ328.c - 68EZ328 specific config + * + *  Copyright (C) 1993 Hamish Macdonald + *  Copyright (C) 1999 D. Jeff Dionne + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +/***************************************************************************/ + +#include <linux/init.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/rtc.h> +#include <asm/pgtable.h> +#include <asm/machdep.h> +#include <asm/MC68EZ328.h> +#ifdef CONFIG_UCSIMM +#include <asm/bootstd.h> +#endif + +/***************************************************************************/ + +int m68328_hwclk(int set, struct rtc_time *t); + +/***************************************************************************/ + +void m68ez328_reset(void) +{ +  local_irq_disable(); +  asm volatile ( +    "moveal #0x10c00000, %a0;\n" +    "moveb #0, 0xFFFFF300;\n" +    "moveal 0(%a0), %sp;\n" +    "moveal 4(%a0), %a0;\n" +    "jmp (%a0);\n" +    ); +} + +/***************************************************************************/ + +unsigned char *cs8900a_hwaddr; +static int errno; + +#ifdef CONFIG_UCSIMM +_bsc0(char *, getserialnum) +_bsc1(unsigned char *, gethwaddr, int, a) +_bsc1(char *, getbenv, char *, a) +#endif + +void __init config_BSP(char *command, int len) +{ +  unsigned char *p; + +  printk(KERN_INFO "\n68EZ328 DragonBallEZ support (C) 1999 Rt-Control, Inc\n"); + +#ifdef CONFIG_UCSIMM +  printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum()); +  p = cs8900a_hwaddr = gethwaddr(0); +  printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", +         p[0], p[1], p[2], p[3], p[4], p[5]); + +  p = getbenv("APPEND"); +  if (p) strcpy(p,command); +  else command[0] = 0; +#endif + +  mach_sched_init = hw_timer_init; +  mach_hwclk = m68328_hwclk; +  mach_reset = m68ez328_reset; +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/68000/m68VZ328.c b/arch/m68k/platform/68000/m68VZ328.c new file mode 100644 index 00000000000..0e5e5a10a02 --- /dev/null +++ b/arch/m68k/platform/68000/m68VZ328.c @@ -0,0 +1,190 @@ +/***************************************************************************/ + +/* + *  m68VZ328.c - 68VZ328 specific config + * + *  Copyright (C) 1993 Hamish Macdonald + *  Copyright (C) 1999 D. Jeff Dionne + *  Copyright (C) 2001 Georges Menie, Ken Desmet + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +/***************************************************************************/ + +#include <linux/init.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/kd.h> +#include <linux/netdevice.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/rtc.h> + +#include <asm/pgtable.h> +#include <asm/machdep.h> +#include <asm/MC68VZ328.h> +#include <asm/bootstd.h> + +#ifdef CONFIG_INIT_LCD +#include "bootlogo-vz.h" +#endif + +/***************************************************************************/ + +int m68328_hwclk(int set, struct rtc_time *t); + +/***************************************************************************/ +/*                        Init Drangon Engine hardware                     */ +/***************************************************************************/ +#if defined(CONFIG_DRAGEN2) + +static void m68vz328_reset(void) +{ +	local_irq_disable(); + +#ifdef CONFIG_INIT_LCD +	PBDATA |= 0x20;				/* disable CCFL light */ +	PKDATA |= 0x4;				/* disable LCD controller */ +	LCKCON = 0; +#endif + +	__asm__ __volatile__( +		"reset\n\t" +		"moveal #0x04000000, %a0\n\t" +		"moveal 0(%a0), %sp\n\t" +		"moveal 4(%a0), %a0\n\t" +		"jmp (%a0)" +	); +} + +static void __init init_hardware(char *command, int size) +{ +#ifdef CONFIG_DIRECT_IO_ACCESS +	SCR = 0x10;					/* allow user access to internal registers */ +#endif + +	/* CSGB Init */ +	CSGBB = 0x4000; +	CSB = 0x1a1; + +	/* CS8900 init */ +	/* PK3: hardware sleep function pin, active low */ +	PKSEL |= PK(3);				/* select pin as I/O */ +	PKDIR |= PK(3);				/* select pin as output */ +	PKDATA |= PK(3);			/* set pin high */ + +	/* PF5: hardware reset function pin, active high */ +	PFSEL |= PF(5);				/* select pin as I/O */ +	PFDIR |= PF(5);				/* select pin as output */ +	PFDATA &= ~PF(5);			/* set pin low */ + +	/* cs8900 hardware reset */ +	PFDATA |= PF(5); +	{ int i; for (i = 0; i < 32000; ++i); } +	PFDATA &= ~PF(5); + +	/* INT1 enable (cs8900 IRQ) */ +	PDPOL &= ~PD(1);			/* active high signal */ +	PDIQEG &= ~PD(1); +	PDIRQEN |= PD(1);			/* IRQ enabled */ + +#ifdef CONFIG_INIT_LCD +	/* initialize LCD controller */ +	LSSA = (long) screen_bits; +	LVPW = 0x14; +	LXMAX = 0x140; +	LYMAX = 0xef; +	LRRA = 0; +	LPXCD = 3; +	LPICF = 0x08; +	LPOLCF = 0; +	LCKCON = 0x80; +	PCPDEN = 0xff; +	PCSEL = 0; + +	/* Enable LCD controller */ +	PKDIR |= 0x4; +	PKSEL |= 0x4; +	PKDATA &= ~0x4; + +	/* Enable CCFL backlighting circuit */ +	PBDIR |= 0x20; +	PBSEL |= 0x20; +	PBDATA &= ~0x20; + +	/* contrast control register */ +	PFDIR |= 0x1; +	PFSEL &= ~0x1; +	PWMR = 0x037F; +#endif +} + +/***************************************************************************/ +/*                      Init RT-Control uCdimm hardware                    */ +/***************************************************************************/ +#elif defined(CONFIG_UCDIMM) + +static void m68vz328_reset(void) +{ +	local_irq_disable(); +	asm volatile ( +		"moveal #0x10c00000, %a0;\n\t" +		"moveb #0, 0xFFFFF300;\n\t" +		"moveal 0(%a0), %sp;\n\t" +		"moveal 4(%a0), %a0;\n\t" +		"jmp (%a0);\n" +	); +} + +unsigned char *cs8900a_hwaddr; +static int errno; + +_bsc0(char *, getserialnum) +_bsc1(unsigned char *, gethwaddr, int, a) +_bsc1(char *, getbenv, char *, a) + +static void __init init_hardware(char *command, int size) +{ +	char *p; + +	printk(KERN_INFO "uCdimm serial string [%s]\n", getserialnum()); +	p = cs8900a_hwaddr = gethwaddr(0); +	printk(KERN_INFO "uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", +		p[0], p[1], p[2], p[3], p[4], p[5]); +	p = getbenv("APPEND"); +	if (p) +		strcpy(p, command); +	else +		command[0] = 0; +} + +/***************************************************************************/ +#else + +static void m68vz328_reset(void) +{ +} + +static void __init init_hardware(char *command, int size) +{ +} + +/***************************************************************************/ +#endif +/***************************************************************************/ + +void __init config_BSP(char *command, int size) +{ +	printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n"); + +	init_hardware(command, size); + +	mach_sched_init = hw_timer_init; +	mach_hwclk = m68328_hwclk; +	mach_reset = m68vz328_reset; +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/68000/romvec.S b/arch/m68k/platform/68000/romvec.S new file mode 100644 index 00000000000..15c70cd6453 --- /dev/null +++ b/arch/m68k/platform/68000/romvec.S @@ -0,0 +1,35 @@ +/* + * romvec.S - Vector table for 68000 cpus + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + * + * Copyright 1996 Roman Zippel + * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com> + * Copyright 2006 Greg Ungerer <gerg@snapgear.com> + */ + +.global _start +.global _buserr +.global trap +.global system_call + +.section .romvec + +e_vectors: +.long CONFIG_RAMBASE+CONFIG_RAMSIZE-4, _start, buserr, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +/* TRAP #0-15 */ +.long system_call, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long trap, trap, trap, trap +.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + diff --git a/arch/m68k/platform/68000/timers.c b/arch/m68k/platform/68000/timers.c new file mode 100644 index 00000000000..99a98698bc9 --- /dev/null +++ b/arch/m68k/platform/68000/timers.c @@ -0,0 +1,137 @@ +/***************************************************************************/ + +/* + *  timers.c - Generic hardware timer support. + * + *  Copyright (C) 1993 Hamish Macdonald + *  Copyright (C) 1999 D. Jeff Dionne + *  Copyright (C) 2001 Georges Menie, Ken Desmet + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +/***************************************************************************/ + +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/mm.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/clocksource.h> +#include <linux/rtc.h> +#include <asm/setup.h> +#include <asm/pgtable.h> +#include <asm/machdep.h> +#include <asm/MC68VZ328.h> + +/***************************************************************************/ + +#if defined(CONFIG_DRAGEN2) +/* with a 33.16 MHz clock, this will give usec resolution to the time functions */ +#define CLOCK_SOURCE	TCTL_CLKSOURCE_SYSCLK +#define CLOCK_PRE	7 +#define TICKS_PER_JIFFY	41450 + +#elif defined(CONFIG_XCOPILOT_BUGS) +/* + * The only thing I know is that CLK32 is not available on Xcopilot + * I have little idea about what frequency SYSCLK has on Xcopilot. + * The values for prescaler and compare registers were simply + * taken from the original source + */ +#define CLOCK_SOURCE	TCTL_CLKSOURCE_SYSCLK +#define CLOCK_PRE	2 +#define TICKS_PER_JIFFY	0xd7e4 + +#else +/* default to using the 32Khz clock */ +#define CLOCK_SOURCE	TCTL_CLKSOURCE_32KHZ +#define CLOCK_PRE	31 +#define TICKS_PER_JIFFY	10 +#endif + +static u32 m68328_tick_cnt; +static irq_handler_t timer_interrupt; + +/***************************************************************************/ + +static irqreturn_t hw_tick(int irq, void *dummy) +{ +	/* Reset Timer1 */ +	TSTAT &= 0; + +	m68328_tick_cnt += TICKS_PER_JIFFY; +	return timer_interrupt(irq, dummy); +} + +/***************************************************************************/ + +static struct irqaction m68328_timer_irq = { +	.name	 = "timer", +	.flags	 = IRQF_TIMER, +	.handler = hw_tick, +}; + +/***************************************************************************/ + +static cycle_t m68328_read_clk(struct clocksource *cs) +{ +	unsigned long flags; +	u32 cycles; + +	local_irq_save(flags); +	cycles = m68328_tick_cnt + TCN; +	local_irq_restore(flags); + +	return cycles; +} + +/***************************************************************************/ + +static struct clocksource m68328_clk = { +	.name	= "timer", +	.rating	= 250, +	.read	= m68328_read_clk, +	.mask	= CLOCKSOURCE_MASK(32), +	.flags	= CLOCK_SOURCE_IS_CONTINUOUS, +}; + +/***************************************************************************/ + +void hw_timer_init(irq_handler_t handler) +{ +	/* disable timer 1 */ +	TCTL = 0; + +	/* set ISR */ +	setup_irq(TMR_IRQ_NUM, &m68328_timer_irq); + +	/* Restart mode, Enable int, Set clock source */ +	TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE; +	TPRER = CLOCK_PRE; +	TCMP = TICKS_PER_JIFFY; + +	/* Enable timer 1 */ +	TCTL |= TCTL_TEN; +	clocksource_register_hz(&m68328_clk, TICKS_PER_JIFFY*HZ); +	timer_interrupt = handler; +} + +/***************************************************************************/ + +int m68328_hwclk(int set, struct rtc_time *t) +{ +	if (!set) { +		long now = RTCTIME; +		t->tm_year = t->tm_mon = t->tm_mday = 1; +		t->tm_hour = (now >> 24) % 24; +		t->tm_min = (now >> 16) % 60; +		t->tm_sec = now % 60; +	} + +	return 0; +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/68360/Makefile b/arch/m68k/platform/68360/Makefile new file mode 100644 index 00000000000..f6f43438304 --- /dev/null +++ b/arch/m68k/platform/68360/Makefile @@ -0,0 +1,12 @@ +# +# Makefile for arch/m68knommu/platform/68360. +# +model-y			  := ram +model-$(CONFIG_ROMKERNEL) := rom + +obj-y := config.o commproc.o entry.o ints.o + +extra-y := head.o + +$(obj)/head.o: $(obj)/head-$(model-y).o +	ln -sf head-$(model-y).o $(obj)/head.o diff --git a/arch/m68k/platform/68360/commproc.c b/arch/m68k/platform/68360/commproc.c new file mode 100644 index 00000000000..315727b7ff4 --- /dev/null +++ b/arch/m68k/platform/68360/commproc.c @@ -0,0 +1,309 @@ +/* + * General Purpose functions for the global management of the + * Communication Processor Module. + * + * Copyright (c) 2000 Michael Leslie <mleslie@lineo.com> + * Copyright (c) 1997 Dan Malek (dmalek@jlc.net) + * + * In addition to the individual control of the communication + * channels, there are a few functions that globally affect the + * communication processor. + * + * Buffer descriptors must be allocated from the dual ported memory + * space.  The allocator for that is here.  When the communication + * process is reset, we reclaim the memory available.  There is + * currently no deallocator for this memory. + * The amount of space available is platform dependent.  On the + * MBX, the EPPC software loads additional microcode into the + * communication processor, and uses some of the DP ram for this + * purpose.  Current, the first 512 bytes and the last 256 bytes of + * memory are used.  Right now I am conservative and only use the + * memory that can never be used for microcode.  If there are + * applications that require more DP ram, we can expand the boundaries + * but then we have to be careful of any downloaded microcode. + * + */ + +/* + * Michael Leslie <mleslie@lineo.com> + * adapted Dan Malek's ppc8xx drivers to M68360 + * + */ + +#include <linux/errno.h> +#include <linux/init.h> +#include <linux/sched.h> +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/string.h> +#include <linux/mm.h> +#include <linux/interrupt.h> +#include <asm/irq.h> +#include <asm/m68360.h> +#include <asm/commproc.h> + +/* #include <asm/page.h> */ +/* #include <asm/pgtable.h> */ +extern void *_quicc_base; +extern unsigned int system_clock; + + +static uint dp_alloc_base;	/* Starting offset in DP ram */ +static uint dp_alloc_top;	/* Max offset + 1 */ + +#if 0 +static	void	*host_buffer;	/* One page of host buffer */ +static	void	*host_end;	    /* end + 1 */ +#endif + +/* struct  cpm360_t *cpmp; */         /* Pointer to comm processor space */ + +QUICC  *pquicc; +/* QUICC  *quicc_dpram; */ /* mleslie - temporary; use extern pquicc elsewhere instead */ + + +/* CPM interrupt vector functions. */ +struct	cpm_action { +	void	(*handler)(void *); +	void	*dev_id; +}; +static	struct	cpm_action cpm_vecs[CPMVEC_NR]; +static	void	cpm_interrupt(int irq, void * dev, struct pt_regs * regs); +static	void	cpm_error_interrupt(void *); + +/* prototypes: */ +void cpm_install_handler(int vec, void (*handler)(), void *dev_id); +void m360_cpm_reset(void); + + + + +void __init m360_cpm_reset() +{ +/* 	pte_t		   *pte; */ + +	pquicc = (struct quicc *)(_quicc_base); /* initialized in crt0_rXm.S */ + +	/* Perform a CPM reset. */ +	pquicc->cp_cr = (SOFTWARE_RESET | CMD_FLAG); + +	/* Wait for CPM to become ready (should be 2 clocks). */ +	while (pquicc->cp_cr & CMD_FLAG); + +	/* On the recommendation of the 68360 manual, p. 7-60 +	 * - Set sdma interrupt service mask to 7 +	 * - Set sdma arbitration ID to 4 +	 */ +	pquicc->sdma_sdcr = 0x0740; + + +	/* Claim the DP memory for our use. +	 */ +	dp_alloc_base = CPM_DATAONLY_BASE; +	dp_alloc_top = dp_alloc_base + CPM_DATAONLY_SIZE; + + +	/* Set the host page for allocation. +	 */ +	/* 	host_buffer = host_page_addr; */ +	/* 	host_end = host_page_addr + PAGE_SIZE; */ + +	/* 	pte = find_pte(&init_mm, host_page_addr); */ +	/* 	pte_val(*pte) |= _PAGE_NO_CACHE; */ +	/* 	flush_tlb_page(current->mm->mmap, host_buffer); */ + +	/* Tell everyone where the comm processor resides. +	*/ +/* 	cpmp = (cpm360_t *)commproc; */ +} + + +/* This is called during init_IRQ.  We used to do it above, but this + * was too early since init_IRQ was not yet called. + */ +void +cpm_interrupt_init(void) +{ +	/* Initialize the CPM interrupt controller. +	 * NOTE THAT pquicc had better have been initialized! +	 * reference: MC68360UM p. 7-377 +	 */ +	pquicc->intr_cicr = +		(CICR_SCD_SCC4 | CICR_SCC_SCC3 | CICR_SCB_SCC2 | CICR_SCA_SCC1) | +		(CPM_INTERRUPT << 13) | +		CICR_HP_MASK | +		(CPM_VECTOR_BASE << 5) | +		CICR_SPS; + +	/* mask all CPM interrupts from reaching the cpu32 core: */ +	pquicc->intr_cimr = 0; + + +	/* mles - If I understand correctly, the 360 just pops over to the CPM +	 * specific vector, obviating the necessity to vector through the IRQ +	 * whose priority the CPM is set to. This needs a closer look, though. +	 */ + +	/* Set our interrupt handler with the core CPU. */ +/* 	if (request_irq(CPM_INTERRUPT, cpm_interrupt, 0, "cpm", NULL) != 0) */ +/* 		panic("Could not allocate CPM IRQ!"); */ + +	/* Install our own error handler. +	 */ +	/* I think we want to hold off on this one for the moment - mles */ +	/* cpm_install_handler(CPMVEC_ERROR, cpm_error_interrupt, NULL); */ + +	/* master CPM interrupt enable */ +	/* pquicc->intr_cicr |= CICR_IEN; */ /* no such animal for 360 */ +} + + + +/* CPM interrupt controller interrupt. +*/ +static	void +cpm_interrupt(int irq, void * dev, struct pt_regs * regs) +{ +	/* uint	vec; */ + +	/* mles: Note that this stuff is currently being performed by +	 * M68360_do_irq(int vec, struct pt_regs *fp), in ../ints.c  */ + +	/* figure out the vector */ +	/* call that vector's handler */ +	/* clear the irq's bit in the service register */ + +#if 0 /* old 860 stuff: */ +	/* Get the vector by setting the ACK bit and then reading +	 * the register. +	 */ +	((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr = 1; +	vec = ((volatile immap_t *)IMAP_ADDR)->im_cpic.cpic_civr; +	vec >>= 11; + + +	if (cpm_vecs[vec].handler != 0) +		(*cpm_vecs[vec].handler)(cpm_vecs[vec].dev_id); +	else +		((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec); + +	/* After servicing the interrupt, we have to remove the status +	 * indicator. +	 */ +	((immap_t *)IMAP_ADDR)->im_cpic.cpic_cisr |= (1 << vec); +#endif + +} + +/* The CPM can generate the error interrupt when there is a race condition + * between generating and masking interrupts.  All we have to do is ACK it + * and return.  This is a no-op function so we don't need any special + * tests in the interrupt handler. + */ +static	void +cpm_error_interrupt(void *dev) +{ +} + +/* Install a CPM interrupt handler. +*/ +void +cpm_install_handler(int vec, void (*handler)(), void *dev_id) +{ + +	request_irq(vec, handler, 0, "timer", dev_id); + +/* 	if (cpm_vecs[vec].handler != 0) */ +/* 		printk(KERN_INFO "CPM interrupt %x replacing %x\n", */ +/* 			(uint)handler, (uint)cpm_vecs[vec].handler); */ +/* 	cpm_vecs[vec].handler = handler; */ +/* 	cpm_vecs[vec].dev_id = dev_id; */ + +	/*              ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr |= (1 << vec); */ +/* 	pquicc->intr_cimr |= (1 << vec); */ + +} + +/* Free a CPM interrupt handler. +*/ +void +cpm_free_handler(int vec) +{ +	cpm_vecs[vec].handler = NULL; +	cpm_vecs[vec].dev_id = NULL; +	/* ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr &= ~(1 << vec); */ +	pquicc->intr_cimr &= ~(1 << vec); +} + + + + +/* Allocate some memory from the dual ported ram.  We may want to + * enforce alignment restrictions, but right now everyone is a good + * citizen. + */ +uint +m360_cpm_dpalloc(uint size) +{ +        uint    retloc; + +        if ((dp_alloc_base + size) >= dp_alloc_top) +                return(CPM_DP_NOSPACE); + +        retloc = dp_alloc_base; +        dp_alloc_base += size; + +        return(retloc); +} + + +#if 0 /* mleslie - for now these are simply kmalloc'd */ +/* We also own one page of host buffer space for the allocation of + * UART "fifos" and the like. + */ +uint +m360_cpm_hostalloc(uint size) +{ +	uint	retloc; + +	if ((host_buffer + size) >= host_end) +		return(0); + +	retloc = host_buffer; +	host_buffer += size; + +	return(retloc); +} +#endif + + +/* Set a baud rate generator.  This needs lots of work.  There are + * four BRGs, any of which can be wired to any channel. + * The internal baud rate clock is the system clock divided by 16. + * This assumes the baudrate is 16x oversampled by the uart. + */ +/* #define BRG_INT_CLK	(((bd_t *)__res)->bi_intfreq * 1000000) */ +#define BRG_INT_CLK		system_clock +#define BRG_UART_CLK	(BRG_INT_CLK/16) + +void +m360_cpm_setbrg(uint brg, uint rate) +{ +	volatile uint	*bp; + +	/* This is good enough to get SMCs running..... +	 */ +	/* bp = (uint *)&cpmp->cp_brgc1; */ +	bp = (volatile uint *)(&pquicc->brgc[0].l); +	bp += brg; +	*bp = ((BRG_UART_CLK / rate - 1) << 1) | CPM_BRG_EN; +} + + +/* + * Local variables: + *  c-indent-level: 4 + *  c-basic-offset: 4 + *  tab-width: 4 + * End: + */ diff --git a/arch/m68k/platform/68360/config.c b/arch/m68k/platform/68360/config.c new file mode 100644 index 00000000000..d493ac43fe3 --- /dev/null +++ b/arch/m68k/platform/68360/config.c @@ -0,0 +1,183 @@ +/* + *  linux/arch/m68knommu/platform/68360/config.c + * + *  Copyright (c) 2000 Michael Leslie <mleslie@lineo.com> + *  Copyright (C) 1993 Hamish Macdonald + *  Copyright (C) 1999 D. Jeff Dionne <jeff@uclinux.org> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <stdarg.h> +#include <linux/init.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/mm.h> +#include <linux/interrupt.h> +#include <linux/irq.h> + +#include <asm/setup.h> +#include <asm/pgtable.h> +#include <asm/machdep.h> +#include <asm/m68360.h> + +#ifdef CONFIG_UCQUICC +#include <asm/bootstd.h> +#endif + +extern void m360_cpm_reset(void); + +// Mask to select if the PLL prescaler is enabled. +#define MCU_PREEN   ((unsigned short)(0x0001 << 13)) + +#if defined(CONFIG_UCQUICC) +#define OSCILLATOR  (unsigned long int)33000000 +#endif + +static irq_handler_t timer_interrupt; +unsigned long int system_clock; + +extern QUICC *pquicc; + +/* TODO  DON"T Hard Code this */ +/* calculate properly using the right PLL and prescaller */ +// unsigned int system_clock = 33000000l; +extern unsigned long int system_clock; //In kernel setup.c + + +static irqreturn_t hw_tick(int irq, void *dummy) +{ +  /* Reset Timer1 */ +  /* TSTAT &= 0; */ + +  pquicc->timer_ter1 = 0x0002; /* clear timer event */ + +  return timer_interrupt(irq, dummy); +} + +static struct irqaction m68360_timer_irq = { +	.name	 = "timer", +	.flags	 = IRQF_TIMER, +	.handler = hw_tick, +}; + +void hw_timer_init(irq_handler_t handler) +{ +  unsigned char prescaler; +  unsigned short tgcr_save; + +#if 0 +  /* Restart mode, Enable int, 32KHz, Enable timer */ +  TCTL = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_32KHZ | TCTL_TEN; +  /* Set prescaler (Divide 32KHz by 32)*/ +  TPRER = 31; +  /* Set compare register  32Khz / 32 / 10 = 100 */ +  TCMP = 10;                                                               + +  request_irq(IRQ_MACHSPEC | 1, timer_routine, 0, "timer", NULL); +#endif + +  /* General purpose quicc timers: MC68360UM p7-20 */ + +  /* Set up timer 1 (in [1..4]) to do 100Hz */ +  tgcr_save = pquicc->timer_tgcr & 0xfff0; +  pquicc->timer_tgcr  = tgcr_save; /* stop and reset timer 1 */ +  /* pquicc->timer_tgcr |= 0x4444; */ /* halt timers when FREEZE (ie bdm freeze) */ + +  prescaler = 8; +  pquicc->timer_tmr1 = 0x001a | /* or=1, frr=1, iclk=01b */ +                           (unsigned short)((prescaler - 1) << 8); +     +  pquicc->timer_tcn1 = 0x0000; /* initial count */ +  /* calculate interval for 100Hz based on the _system_clock: */ +  pquicc->timer_trr1 = (system_clock/ prescaler) / HZ; /* reference count */ + +  pquicc->timer_ter1 = 0x0003; /* clear timer events */ + +  timer_interrupt = handler; + +  /* enable timer 1 interrupt in CIMR */ +  setup_irq(CPMVEC_TIMER1, &m68360_timer_irq); + +  /* Start timer 1: */ +  tgcr_save = (pquicc->timer_tgcr & 0xfff0) | 0x0001; +  pquicc->timer_tgcr  = tgcr_save; +} + +int BSP_set_clock_mmss(unsigned long nowtime) +{ +#if 0 +  short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60; + +  tod->second1 = real_seconds / 10; +  tod->second2 = real_seconds % 10; +  tod->minute1 = real_minutes / 10; +  tod->minute2 = real_minutes % 10; +#endif +  return 0; +} + +void BSP_reset (void) +{ +  local_irq_disable(); +  asm volatile ( +    "moveal #_start, %a0;\n" +    "moveb #0, 0xFFFFF300;\n" +    "moveal 0(%a0), %sp;\n" +    "moveal 4(%a0), %a0;\n" +    "jmp (%a0);\n" +    ); +} + +unsigned char *scc1_hwaddr; +static int errno; + +#if defined (CONFIG_UCQUICC) +_bsc0(char *, getserialnum) +_bsc1(unsigned char *, gethwaddr, int, a) +_bsc1(char *, getbenv, char *, a) +#endif + + +void __init config_BSP(char *command, int len) +{ +  unsigned char *p; + +  m360_cpm_reset(); + +  /* Calculate the real system clock value. */ +  { +     unsigned int local_pllcr = (unsigned int)(pquicc->sim_pllcr); +     if( local_pllcr & MCU_PREEN ) // If the prescaler is dividing by 128 +     { +         int mf = (int)(pquicc->sim_pllcr & 0x0fff); +         system_clock = (OSCILLATOR / 128) * (mf + 1); +     } +     else +     { +         int mf = (int)(pquicc->sim_pllcr & 0x0fff); +         system_clock = (OSCILLATOR) * (mf + 1); +     } +  } + +  printk(KERN_INFO "\n68360 QUICC support (C) 2000 Lineo Inc.\n"); + +#if defined(CONFIG_UCQUICC) && 0 +  printk(KERN_INFO "uCquicc serial string [%s]\n",getserialnum()); +  p = scc1_hwaddr = gethwaddr(0); +  printk(KERN_INFO "uCquicc hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", +         p[0], p[1], p[2], p[3], p[4], p[5]); + +  p = getbenv("APPEND"); +  if (p) +    strcpy(p,command); +  else +    command[0] = 0; +#else +  scc1_hwaddr = "\00\01\02\03\04\05"; +#endif +  +  mach_reset = BSP_reset; +} diff --git a/arch/m68k/platform/68360/entry.S b/arch/m68k/platform/68360/entry.S new file mode 100644 index 00000000000..447c33ef37f --- /dev/null +++ b/arch/m68k/platform/68360/entry.S @@ -0,0 +1,164 @@ +/* + *  linux/arch/m68knommu/platform/68360/entry.S + * + *  Copyright (C) 1991, 1992  Linus Torvalds + *  Copyright (C) 2001 SED Systems, a Division of Calian Ltd. + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file README.legal in the main directory of this archive + * for more details. + * + * Linux/m68k support by Hamish Macdonald + * M68360 Port by SED Systems, and Lineo. + */ + +#include <linux/linkage.h> +#include <asm/thread_info.h> +#include <asm/unistd.h> +#include <asm/errno.h> +#include <asm/setup.h> +#include <asm/segment.h> +#include <asm/traps.h> +#include <asm/asm-offsets.h> +#include <asm/entry.h> + +.text + +.globl system_call +.globl resume +.globl ret_from_exception +.globl ret_from_signal +.globl sys_call_table +.globl bad_interrupt +.globl inthandler + +badsys: +	movel	#-ENOSYS,%sp@(PT_OFF_D0) +	jra	ret_from_exception + +do_trace: +	movel	#-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ +	subql	#4,%sp +	SAVE_SWITCH_STACK +	jbsr	syscall_trace_enter +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	movel	%sp@(PT_OFF_ORIG_D0),%d1 +	movel	#-ENOSYS,%d0 +	cmpl	#NR_syscalls,%d1 +	jcc	1f +	lsl	#2,%d1 +	lea	sys_call_table, %a0 +	jbsr	%a0@(%d1) + +1:	movel	%d0,%sp@(PT_OFF_D0)	/* save the return value */ +	subql	#4,%sp			/* dummy return address */ +	SAVE_SWITCH_STACK +	jbsr	syscall_trace_leave + +ret_from_signal: +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	jra	ret_from_exception + +ENTRY(system_call) +	SAVE_ALL_SYS + +	/* save top of frame*/ +	pea	%sp@ +	jbsr	set_esp0 +	addql	#4,%sp + +	movel	%sp@(PT_OFF_ORIG_D0),%d0 + +	movel	%sp,%d1			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d1 +	movel	%d1,%a2 +	btst	#(TIF_SYSCALL_TRACE%8),%a2@(TINFO_FLAGS+(31-TIF_SYSCALL_TRACE)/8) +	jne	do_trace +	cmpl	#NR_syscalls,%d0 +	jcc	badsys +	lsl	#2,%d0 +	lea	sys_call_table,%a0 +	movel	%a0@(%d0), %a0 +	jbsr	%a0@ +	movel	%d0,%sp@(PT_OFF_D0)	/* save the return value*/ + +ret_from_exception: +	btst	#5,%sp@(PT_OFF_SR)	/* check if returning to kernel*/ +	jeq	Luser_return		/* if so, skip resched, signals*/ + +Lkernel_return: +	RESTORE_ALL + +Luser_return: +	/* only allow interrupts when we are really the last one on the*/ +	/* kernel stack, otherwise stack overflow can occur during*/ +	/* heavy interrupt load*/ +	andw	#ALLOWINT,%sr + +	movel	%sp,%d1			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d1 +	movel	%d1,%a2 +1: +	move	%a2@(TINFO_FLAGS),%d1	/* thread_info->flags */ +	jne	Lwork_to_do +	RESTORE_ALL + +Lwork_to_do: +	movel	%a2@(TINFO_FLAGS),%d1	/* thread_info->flags */ +	btst	#TIF_NEED_RESCHED,%d1 +	jne	reschedule + +Lsignal_return: +	subql	#4,%sp			/* dummy return address*/ +	SAVE_SWITCH_STACK +	pea	%sp@(SWITCH_STACK_SIZE) +	bsrw	do_notify_resume +	addql	#4,%sp +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	jra	1b + +/* + * This is the main interrupt handler, responsible for calling do_IRQ() + */ +inthandler: +	SAVE_ALL_INT +	movew	%sp@(PT_OFF_FORMATVEC), %d0 +	and.l	#0x3ff, %d0 +	lsr.l   #0x02,  %d0 + +	movel	%sp,%sp@- +	movel	%d0,%sp@- 		/*  put vector # on stack*/ +	jbsr	do_IRQ			/*  process the IRQ */ +	addql	#8,%sp			/*  pop parameters off stack*/ +	jra	ret_from_exception + +/* + * Handler for uninitialized and spurious interrupts. + */ +bad_interrupt: +	addql	#1,irq_err_count +	rte + +/* + * Beware - when entering resume, prev (the current task) is + * in a0, next (the new task) is in a1, so don't change these + * registers until their contents are no longer needed. + */ +ENTRY(resume) +	movel	%a0,%d1				/* save prev thread in d1 */ +	movew	%sr,%a0@(TASK_THREAD+THREAD_SR)	/* save sr */ +	SAVE_SWITCH_STACK +	movel	%sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack */ +	movel	%usp,%a3			/* save usp */ +	movel	%a3,%a0@(TASK_THREAD+THREAD_USP) + +	movel	%a1@(TASK_THREAD+THREAD_USP),%a3 /* restore user stack */ +	movel	%a3,%usp +	movel	%a1@(TASK_THREAD+THREAD_KSP),%sp /* restore new thread stack */ +	RESTORE_SWITCH_STACK +	movew	%a1@(TASK_THREAD+THREAD_SR),%sr	/* restore thread status reg */ +	rts + diff --git a/arch/m68k/platform/68360/head-ram.S b/arch/m68k/platform/68360/head-ram.S new file mode 100644 index 00000000000..acd213170d8 --- /dev/null +++ b/arch/m68k/platform/68360/head-ram.S @@ -0,0 +1,403 @@ +/* arch/m68knommu/platform/68360/head-ram.S + * + * Startup code for Motorola 68360 + * + * Copyright 2001 (C) SED Systems, a Division of Calian Ltd. + * Based on: arch/m68knommu/platform/68328/pilot/crt0_rom.S + * Based on: arch/m68knommu/platform/68360/uCquicc/crt0_rom.S, 2.0.38.1.pre7 + *           uClinux Kernel + * Copyright (C) Michael Leslie <mleslie@lineo.com> + * Based on: arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S + * Copyright (C) 1998  D. Jeff Dionne <jeff@uclinux.org>, + * + */ +#define ASSEMBLY + +.global _stext +.global _start + +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +.global _quicc_base +.global _periph_base + +#define	RAMEND                      (CONFIG_RAMBASE + CONFIG_RAMSIZE) +#define	ROMEND                      (CONFIG_ROMBASE + CONFIG_ROMSIZE) + +#define REGB                        0x1000 +#define PEPAR                       (_dprbase + REGB + 0x0016) +#define GMR                         (_dprbase + REGB + 0x0040) +#define OR0                         (_dprbase + REGB + 0x0054) +#define BR0                         (_dprbase + REGB + 0x0050) +#define OR1                         (_dprbase + REGB + 0x0064) +#define BR1                         (_dprbase + REGB + 0x0060) +#define OR4                         (_dprbase + REGB + 0x0094) +#define BR4                         (_dprbase + REGB + 0x0090) +#define OR6                         (_dprbase + REGB + 0x00b4) +#define BR6                         (_dprbase + REGB + 0x00b0) +#define OR7                         (_dprbase + REGB + 0x00c4) +#define BR7                         (_dprbase + REGB + 0x00c0) + +#define MCR                         (_dprbase + REGB + 0x0000) +#define AVR                         (_dprbase + REGB + 0x0008) + +#define SYPCR                       (_dprbase + REGB + 0x0022) + +#define PLLCR                       (_dprbase + REGB + 0x0010) +#define CLKOCR                      (_dprbase + REGB + 0x000C) +#define CDVCR                       (_dprbase + REGB + 0x0014) + +#define BKAR                        (_dprbase + REGB + 0x0030) +#define BKCR                        (_dprbase + REGB + 0x0034) +#define SWIV                        (_dprbase + REGB + 0x0023) +#define PICR                        (_dprbase + REGB + 0x0026) +#define PITR                        (_dprbase + REGB + 0x002A) + +/* Define for all memory configuration */ +#define MCU_SIM_GMR                 0x00000000 +#define SIM_OR_MASK                 0x0fffffff + +/* Defines for chip select zero - the flash */ +#define SIM_OR0_MASK                0x20000002 +#define SIM_BR0_MASK                0x00000001 + + +/* Defines for chip select one - the RAM */ +#define SIM_OR1_MASK                0x10000000 +#define SIM_BR1_MASK                0x00000001 + +#define MCU_SIM_MBAR_ADRS           0x0003ff00 +#define MCU_SIM_MBAR_BA_MASK        0xfffff000 +#define MCU_SIM_MBAR_AS_MASK        0x00000001 + +#define MCU_SIM_PEPAR               0x00B4 +     +#define MCU_DISABLE_INTRPTS         0x2700 +#define MCU_SIM_AVR                 0x00 +     +#define MCU_SIM_MCR                 0x00005cff + +#define MCU_SIM_CLKOCR              0x00 +#define MCU_SIM_PLLCR               0x8000 +#define MCU_SIM_CDVCR               0x0000 + +#define MCU_SIM_SYPCR               0x0000 +#define MCU_SIM_SWIV                0x00 +#define MCU_SIM_PICR                0x0000 +#define MCU_SIM_PITR                0x0000 + + +#include <asm/m68360_regs.h> + +	 +/* + * By the time this RAM specific code begins to execute, DPRAM + * and DRAM should already be mapped and accessible. + */ + +	.text +_start: +_stext: +	nop +	ori.w	#MCU_DISABLE_INTRPTS, %sr	/* disable interrupts: */ +	/* We should not need to setup the boot stack the reset should do it. */ +	movea.l	#RAMEND, %sp			/*set up stack at the end of DRAM:*/ + +set_mbar_register: +	moveq.l	#0x07, %d1			/* Setup MBAR */ +	movec	%d1, %dfc + +	lea.l	MCU_SIM_MBAR_ADRS, %a0 +	move.l	#_dprbase, %d0 +	andi.l	#MCU_SIM_MBAR_BA_MASK, %d0 +	ori.l	#MCU_SIM_MBAR_AS_MASK, %d0 +	moves.l	%d0, %a0@ + +	moveq.l	#0x05, %d1 +	movec.l	%d1, %dfc + +	/* Now we can begin to access registers in DPRAM */ + +set_sim_mcr: +	/* Set Module Configuration Register */ +	move.l	#MCU_SIM_MCR, MCR + +	/* to do:	Determine cause of reset */ + +	/* +	 *       configure system clock MC68360 p. 6-40 +	 *       (value +1)*osc/128 = system clock +	 */ +set_sim_clock: +	move.w	#MCU_SIM_PLLCR, PLLCR +	move.b	#MCU_SIM_CLKOCR, CLKOCR +	move.w	#MCU_SIM_CDVCR, CDVCR + +	/* Wait for the PLL to settle */ +	move.w	#16384, %d0 +pll_settle_wait: +	subi.w	#1, %d0 +	bne	pll_settle_wait + +	/* Setup the system protection register, and watchdog timer register */ +	move.b	#MCU_SIM_SWIV, SWIV +	move.w	#MCU_SIM_PICR, PICR +	move.w	#MCU_SIM_PITR, PITR +	move.w	#MCU_SIM_SYPCR, SYPCR + +	/* Clear DPRAM - system + parameter */ +	movea.l	#_dprbase, %a0 +	movea.l	#_dprbase+0x2000, %a1 + +	/* Copy 0 to %a0 until %a0 == %a1 */ +clear_dpram: +	movel	#0, %a0@+ +	cmpal	%a0, %a1 +	bhi	clear_dpram + +configure_memory_controller:     +	/* Set up Global Memory Register (GMR) */ +	move.l	#MCU_SIM_GMR, %d0 +	move.l	%d0, GMR + +configure_chip_select_0: +	move.l	#RAMEND, %d0 +	subi.l	#__ramstart, %d0 +	subq.l	#0x01, %d0 +	eori.l	#SIM_OR_MASK, %d0 +	ori.l	#SIM_OR0_MASK, %d0 +	move.l	%d0, OR0 + +	move.l	#__ramstart, %d0 +	ori.l	#SIM_BR0_MASK, %d0 +	move.l	%d0, BR0 + +configure_chip_select_1: +	move.l	#ROMEND, %d0 +	subi.l	#__rom_start, %d0 +	subq.l	#0x01, %d0 +	eori.l	#SIM_OR_MASK, %d0 +	ori.l	#SIM_OR1_MASK, %d0 +	move.l	%d0, OR1 + +	move.l	#__rom_start, %d0 +	ori.l	#SIM_BR1_MASK, %d0 +	move.l	%d0, BR1 + +	move.w	#MCU_SIM_PEPAR, PEPAR  + +	/* point to vector table: */ +	move.l	#_romvec, %a0 +	move.l	#_ramvec, %a1 +copy_vectors: +	move.l	%a0@, %d0 +	move.l	%d0, %a1@ +	move.l	%a0@, %a1@ +	addq.l	#0x04, %a0 +	addq.l	#0x04, %a1 +	cmp.l	#_start, %a0 +	blt	copy_vectors + +	move.l	#_ramvec, %a1 +	movec	%a1, %vbr + + +	/* Copy data segment from ROM to RAM */ +	moveal	#_stext, %a0 +	moveal	#_sdata, %a1 +	moveal	#_edata, %a2 + +	/* Copy %a0 to %a1 until %a1 == %a2 */ +LD1: +	move.l	%a0@, %d0 +	addq.l	#0x04, %a0 +	move.l	%d0, %a1@ +	addq.l	#0x04, %a1 +	cmp.l	#_edata, %a1 +	blt     LD1 + +	moveal	#__bss_start, %a0 +	moveal	#__bss_stop, %a1 + +	/* Copy 0 to %a0 until %a0 == %a1 */ +L1: +	movel	#0, %a0@+ +	cmpal	%a0, %a1 +	bhi	L1 + +load_quicc: +	move.l	#_dprbase, _quicc_base + +store_ram_size: +	/* Set ram size information */ +	move.l	#_sdata, _rambase +	move.l	#__bss_stop, _ramstart +	move.l	#RAMEND, %d0 +	sub.l	#0x1000, %d0			/* Reserve 4K for stack space.*/ +	move.l	%d0, _ramend			/* Different from RAMEND.*/ + +	pea	0 +	pea	env +	pea	%sp@(4) +	pea	0 + +	lea	init_thread_union, %a2 +	lea	0x2000(%a2), %sp + +lp: +	jsr	start_kernel + +_exit: +	jmp	_exit + + +	.data +	.align 4 +env: +	.long	0 +_quicc_base: +	.long	0 +_periph_base: +	.long	0 +_ramvec: +	.long   0 +_rambase: +	.long   0 +_ramstart: +	.long   0 +_ramend: +	.long   0 +_dprbase: +	.long	0xffffe000 + +	.text + +    /* +     * These are the exception vectors at boot up, they are copied into RAM +     * and then overwritten as needed. +     */ +  +.section ".data..initvect","awx" +    .long   RAMEND	/* Reset: Initial Stack Pointer                 - 0.  */ +    .long   _start      /* Reset: Initial Program Counter               - 1.  */ +    .long   buserr      /* Bus Error                                    - 2.  */ +    .long   trap        /* Address Error                                - 3.  */ +    .long   trap        /* Illegal Instruction                          - 4.  */ +    .long   trap        /* Divide by zero                               - 5.  */ +    .long   trap        /* CHK, CHK2 Instructions                       - 6.  */ +    .long   trap        /* TRAPcc, TRAPV Instructions                   - 7.  */ +    .long   trap        /* Privilege Violation                          - 8.  */ +    .long   trap        /* Trace                                        - 9.  */ +    .long   trap        /* Line 1010 Emulator                           - 10. */ +    .long   trap        /* Line 1111 Emualtor                           - 11. */ +    .long   trap        /* Harware Breakpoint                           - 12. */ +    .long   trap        /* (Reserved for Coprocessor Protocol Violation)- 13. */ +    .long   trap        /* Format Error                                 - 14. */ +    .long   trap        /* Uninitialized Interrupt                      - 15. */ +    .long   trap        /* (Unassigned, Reserver)                       - 16. */ +    .long   trap        /* (Unassigned, Reserver)                       - 17. */ +    .long   trap        /* (Unassigned, Reserver)                       - 18. */ +    .long   trap        /* (Unassigned, Reserver)                       - 19. */ +    .long   trap        /* (Unassigned, Reserver)                       - 20. */ +    .long   trap        /* (Unassigned, Reserver)                       - 21. */ +    .long   trap        /* (Unassigned, Reserver)                       - 22. */ +    .long   trap        /* (Unassigned, Reserver)                       - 23. */ +    .long   trap        /* Spurious Interrupt                           - 24. */ +    .long   trap        /* Level 1 Interrupt Autovector                 - 25. */ +    .long   trap        /* Level 2 Interrupt Autovector                 - 26. */ +    .long   trap        /* Level 3 Interrupt Autovector                 - 27. */ +    .long   trap        /* Level 4 Interrupt Autovector                 - 28. */ +    .long   trap        /* Level 5 Interrupt Autovector                 - 29. */ +    .long   trap        /* Level 6 Interrupt Autovector                 - 30. */ +    .long   trap        /* Level 7 Interrupt Autovector                 - 31. */ +    .long   system_call /* Trap Instruction Vectors 0                   - 32. */ +    .long   trap        /* Trap Instruction Vectors 1                   - 33. */ +    .long   trap        /* Trap Instruction Vectors 2                   - 34. */ +    .long   trap        /* Trap Instruction Vectors 3                   - 35. */ +    .long   trap        /* Trap Instruction Vectors 4                   - 36. */ +    .long   trap        /* Trap Instruction Vectors 5                   - 37. */ +    .long   trap        /* Trap Instruction Vectors 6                   - 38. */ +    .long   trap        /* Trap Instruction Vectors 7                   - 39. */ +    .long   trap        /* Trap Instruction Vectors 8                   - 40. */ +    .long   trap        /* Trap Instruction Vectors 9                   - 41. */ +    .long   trap        /* Trap Instruction Vectors 10                  - 42. */ +    .long   trap        /* Trap Instruction Vectors 11                  - 43. */ +    .long   trap        /* Trap Instruction Vectors 12                  - 44. */ +    .long   trap        /* Trap Instruction Vectors 13                  - 45. */ +    .long   trap        /* Trap Instruction Vectors 14                  - 46. */ +    .long   trap        /* Trap Instruction Vectors 15                  - 47. */ +    .long   0           /* (Reserved for Coprocessor)                   - 48. */ +    .long   0           /* (Reserved for Coprocessor)                   - 49. */ +    .long   0           /* (Reserved for Coprocessor)                   - 50. */ +    .long   0           /* (Reserved for Coprocessor)                   - 51. */ +    .long   0           /* (Reserved for Coprocessor)                   - 52. */ +    .long   0           /* (Reserved for Coprocessor)                   - 53. */ +    .long   0           /* (Reserved for Coprocessor)                   - 54. */ +    .long   0           /* (Reserved for Coprocessor)                   - 55. */ +    .long   0           /* (Reserved for Coprocessor)                   - 56. */ +    .long   0           /* (Reserved for Coprocessor)                   - 57. */ +    .long   0           /* (Reserved for Coprocessor)                   - 58. */ +    .long   0           /* (Unassigned, Reserved)                       - 59. */ +    .long   0           /* (Unassigned, Reserved)                       - 60. */ +    .long   0           /* (Unassigned, Reserved)                       - 61. */ +    .long   0           /* (Unassigned, Reserved)                       - 62. */ +    .long   0           /* (Unassigned, Reserved)                       - 63. */ +    /*                  The assignment of these vectors to the CPM is         */ +    /*                  dependent on the configuration of the CPM vba         */ +    /*                          fields.                                       */ +    .long   0           /* (User-Defined Vectors 1) CPM Error           - 64. */ +    .long   0           /* (User-Defined Vectors 2) CPM Parallel IO PC11- 65. */ +    .long   0           /* (User-Defined Vectors 3) CPM Parallel IO PC10- 66. */ +    .long   0           /* (User-Defined Vectors 4) CPM SMC2 / PIP      - 67. */ +    .long   0           /* (User-Defined Vectors 5) CPM SMC1            - 68. */ +    .long   0           /* (User-Defined Vectors 6) CPM SPI             - 69. */ +    .long   0           /* (User-Defined Vectors 7) CPM Parallel IO PC9 - 70. */ +    .long   0           /* (User-Defined Vectors 8) CPM Timer 4         - 71. */ +    .long   0           /* (User-Defined Vectors 9) CPM Reserved        - 72. */ +    .long   0           /* (User-Defined Vectors 10) CPM Parallel IO PC8- 73. */ +    .long   0           /* (User-Defined Vectors 11) CPM Parallel IO PC7- 74. */ +    .long   0           /* (User-Defined Vectors 12) CPM Parallel IO PC6- 75. */ +    .long   0           /* (User-Defined Vectors 13) CPM Timer 3        - 76. */ +    .long   0           /* (User-Defined Vectors 14) CPM Reserved       - 77. */ +    .long   0           /* (User-Defined Vectors 15) CPM Parallel IO PC5- 78. */ +    .long   0           /* (User-Defined Vectors 16) CPM Parallel IO PC4- 79. */ +    .long   0           /* (User-Defined Vectors 17) CPM Reserved       - 80. */ +    .long   0           /* (User-Defined Vectors 18) CPM RISC Timer Tbl - 81. */ +    .long   0           /* (User-Defined Vectors 19) CPM Timer 2        - 82. */ +    .long   0           /* (User-Defined Vectors 21) CPM Reserved       - 83. */ +    .long   0           /* (User-Defined Vectors 22) CPM IDMA2          - 84. */ +    .long   0           /* (User-Defined Vectors 23) CPM IDMA1          - 85. */ +    .long   0           /* (User-Defined Vectors 24) CPM SDMA Bus Err   - 86. */ +    .long   0           /* (User-Defined Vectors 25) CPM Parallel IO PC3- 87. */ +    .long   0           /* (User-Defined Vectors 26) CPM Parallel IO PC2- 88. */ +    .long   0           /* (User-Defined Vectors 27) CPM Timer 1        - 89. */ +    .long   0           /* (User-Defined Vectors 28) CPM Parallel IO PC1- 90. */ +    .long   0           /* (User-Defined Vectors 29) CPM SCC 4          - 91. */ +    .long   0           /* (User-Defined Vectors 30) CPM SCC 3          - 92. */ +    .long   0           /* (User-Defined Vectors 31) CPM SCC 2          - 93. */ +    .long   0           /* (User-Defined Vectors 32) CPM SCC 1          - 94. */ +    .long   0           /* (User-Defined Vectors 33) CPM Parallel IO PC0- 95. */ +    /*                  I don't think anything uses the vectors after here.   */ +    .long   0           /* (User-Defined Vectors 34)                    - 96. */ +    .long   0,0,0,0,0               /* (User-Defined Vectors 35  -  39). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 40  -  49). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 50  -  59). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 60  -  69). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 70  -  79). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 80  -  89). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 90  -  99). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 100 - 109). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 110 - 119). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 120 - 129). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 130 - 139). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 140 - 149). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 150 - 159). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 160 - 169). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 170 - 179). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 180 - 189). */ +    .long   0,0,0                   /* (User-Defined Vectors 190 - 192). */ +.text +ignore: rte diff --git a/arch/m68k/platform/68360/head-rom.S b/arch/m68k/platform/68360/head-rom.S new file mode 100644 index 00000000000..dfc756d9988 --- /dev/null +++ b/arch/m68k/platform/68360/head-rom.S @@ -0,0 +1,414 @@ +/* arch/m68knommu/platform/68360/head-rom.S + * + * Startup code for Motorola 68360 + * + * Copyright (C) SED Systems, a Division of Calian Ltd. + * Based on: arch/m68knommu/platform/68328/pilot/crt0_rom.S + * Based on: arch/m68knommu/platform/68360/uCquicc/crt0_rom.S, 2.0.38.1.pre7 + *           uClinux Kernel + * Copyright (C) Michael Leslie <mleslie@lineo.com> + * Based on: arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S + * Copyright (C) 1998  D. Jeff Dionne <jeff@uclinux.org>, + * + */ + +.global _stext +.global __bss_start +.global _start + +.global _rambase +.global _ramvec +.global _ramstart +.global _ramend + +.global _quicc_base +.global _periph_base + +#define	RAMEND                      (CONFIG_RAMBASE + CONFIG_RAMSIZE) + +#define REGB                        0x1000 +#define PEPAR                       (_dprbase + REGB + 0x0016) +#define GMR                         (_dprbase + REGB + 0x0040) +#define OR0                         (_dprbase + REGB + 0x0054) +#define BR0                         (_dprbase + REGB + 0x0050) + +#define OR1                         (_dprbase + REGB + 0x0064) +#define BR1                         (_dprbase + REGB + 0x0060) + +#define OR2                         (_dprbase + REGB + 0x0074) +#define BR2                         (_dprbase + REGB + 0x0070) + +#define OR3                         (_dprbase + REGB + 0x0084) +#define BR3                         (_dprbase + REGB + 0x0080) + +#define OR4                         (_dprbase + REGB + 0x0094) +#define BR4                         (_dprbase + REGB + 0x0090) + +#define OR5                         (_dprbase + REGB + 0x00A4) +#define BR5                         (_dprbase + REGB + 0x00A0) + +#define OR6                         (_dprbase + REGB + 0x00b4) +#define BR6                         (_dprbase + REGB + 0x00b0) + +#define OR7                         (_dprbase + REGB + 0x00c4) +#define BR7                         (_dprbase + REGB + 0x00c0) + +#define MCR                         (_dprbase + REGB + 0x0000) +#define AVR                         (_dprbase + REGB + 0x0008) + +#define SYPCR                       (_dprbase + REGB + 0x0022) + +#define PLLCR                       (_dprbase + REGB + 0x0010) +#define CLKOCR                      (_dprbase + REGB + 0x000C) +#define CDVCR                       (_dprbase + REGB + 0x0014) + +#define BKAR                        (_dprbase + REGB + 0x0030) +#define BKCR                        (_dprbase + REGB + 0x0034) +#define SWIV                        (_dprbase + REGB + 0x0023) +#define PICR                        (_dprbase + REGB + 0x0026) +#define PITR                        (_dprbase + REGB + 0x002A) + +/* Define for all memory configuration */ +#define MCU_SIM_GMR                 0x00000000 +#define SIM_OR_MASK                 0x0fffffff + +/* Defines for chip select zero - the flash */ +#define SIM_OR0_MASK                0x20000000 +#define SIM_BR0_MASK                0x00000001 + +/* Defines for chip select one - the RAM */ +#define SIM_OR1_MASK                0x10000000 +#define SIM_BR1_MASK                0x00000001 + +#define MCU_SIM_MBAR_ADRS           0x0003ff00 +#define MCU_SIM_MBAR_BA_MASK        0xfffff000 +#define MCU_SIM_MBAR_AS_MASK        0x00000001 + +#define MCU_SIM_PEPAR               0x00B4 +     +#define MCU_DISABLE_INTRPTS         0x2700 +#define MCU_SIM_AVR                 0x00 +     +#define MCU_SIM_MCR                 0x00005cff + +#define MCU_SIM_CLKOCR              0x00 +#define MCU_SIM_PLLCR               0x8000 +#define MCU_SIM_CDVCR               0x0000 + +#define MCU_SIM_SYPCR               0x0000 +#define MCU_SIM_SWIV                0x00 +#define MCU_SIM_PICR                0x0000 +#define MCU_SIM_PITR                0x0000 + + +#include <asm/m68360_regs.h> + +	 +/* + * By the time this RAM specific code begins to execute, DPRAM + * and DRAM should already be mapped and accessible. + */ + +	.text +_start: +_stext: +	nop +	ori.w	#MCU_DISABLE_INTRPTS, %sr	/* disable interrupts: */ +	/* We should not need to setup the boot stack the reset should do it. */ +	movea.l	#RAMEND, %sp		/* set up stack at the end of DRAM:*/ + + +set_mbar_register: +	moveq.l	#0x07, %d1			/* Setup MBAR */ +	movec	%d1, %dfc + +	lea.l	MCU_SIM_MBAR_ADRS, %a0 +	move.l	#_dprbase, %d0 +	andi.l	#MCU_SIM_MBAR_BA_MASK, %d0 +	ori.l	#MCU_SIM_MBAR_AS_MASK, %d0 +	moves.l	%d0, %a0@ + +	moveq.l	#0x05, %d1 +	movec.l	%d1, %dfc + +	/* Now we can begin to access registers in DPRAM */ + +set_sim_mcr: +	/* Set Module Configuration Register */ +	move.l	#MCU_SIM_MCR, MCR + +	/* to do:	Determine cause of reset */ + +	/* +	 *	configure system clock MC68360 p. 6-40 +	 *	(value +1)*osc/128 = system clock +	 *                    or +	 *	(value + 1)*osc = system clock +	 *	You do not need to divide the oscillator by 128 unless you want to. +	 */ +set_sim_clock: +	move.w	#MCU_SIM_PLLCR, PLLCR +	move.b	#MCU_SIM_CLKOCR, CLKOCR +	move.w	#MCU_SIM_CDVCR, CDVCR + +	/* Wait for the PLL to settle */ +	move.w	#16384, %d0 +pll_settle_wait: +	subi.w	#1, %d0 +	bne	pll_settle_wait + +	/* Setup the system protection register, and watchdog timer register */ +	move.b	#MCU_SIM_SWIV, SWIV +	move.w	#MCU_SIM_PICR, PICR +	move.w	#MCU_SIM_PITR, PITR +	move.w	#MCU_SIM_SYPCR, SYPCR + +	/* Clear DPRAM - system + parameter */ +	movea.l	#_dprbase, %a0 +	movea.l	#_dprbase+0x2000, %a1 + +	/* Copy 0 to %a0 until %a0 == %a1 */ +clear_dpram: +	movel	#0, %a0@+ +	cmpal	%a0, %a1 +	bhi	clear_dpram + +configure_memory_controller:     +	/* Set up Global Memory Register (GMR) */ +	move.l	#MCU_SIM_GMR, %d0 +	move.l	%d0, GMR + +configure_chip_select_0: +	move.l	#0x00400000, %d0 +	subq.l	#0x01, %d0 +	eori.l	#SIM_OR_MASK, %d0 +	ori.l	#SIM_OR0_MASK, %d0 +	move.l	%d0, OR0 + +	move.l	#__rom_start, %d0 +	ori.l	#SIM_BR0_MASK, %d0 +	move.l	%d0, BR0 + +	move.l	#0x0, BR1 +	move.l	#0x0, BR2 +	move.l	#0x0, BR3 +	move.l	#0x0, BR4 +	move.l	#0x0, BR5 +	move.l	#0x0, BR6 +	move.l	#0x0, BR7 + +	move.w	#MCU_SIM_PEPAR, PEPAR  + +	/* point to vector table: */ +	move.l	#_romvec, %a0 +	move.l	#_ramvec, %a1 +copy_vectors: +	move.l	%a0@, %d0 +	move.l	%d0, %a1@ +	move.l	%a0@, %a1@ +	addq.l	#0x04, %a0 +	addq.l	#0x04, %a1 +	cmp.l	#_start, %a0 +	blt	copy_vectors + +	move.l	#_ramvec, %a1 +	movec	%a1, %vbr + + +	/* Copy data segment from ROM to RAM */ +	moveal	#_etext, %a0 +	moveal	#_sdata, %a1 +	moveal	#_edata, %a2 + +	/* Copy %a0 to %a1 until %a1 == %a2 */ +LD1: +	move.l	%a0@, %d0 +	addq.l	#0x04, %a0 +	move.l	%d0, %a1@ +	addq.l	#0x04, %a1 +	cmp.l	#_edata, %a1 +	blt	LD1 + +	moveal	#__bss_start, %a0 +	moveal	#__bss_stop, %a1 + +	/* Copy 0 to %a0 until %a0 == %a1 */ +L1: +	movel	#0, %a0@+ +	cmpal	%a0, %a1 +	bhi	L1 + +load_quicc: +	move.l	#_dprbase, _quicc_base + +store_ram_size: +	/* Set ram size information */ +	move.l	#_sdata, _rambase +	move.l	#__bss_stop, _ramstart +	move.l	#RAMEND, %d0 +	sub.l	#0x1000, %d0			/* Reserve 4K for stack space.*/ +	move.l	%d0, _ramend			/* Different from RAMEND.*/ + +	pea	0 +	pea	env +	pea	%sp@(4) +	pea	0 + +	lea	init_thread_union, %a2 +	lea	0x2000(%a2), %sp + +lp: +	jsr	start_kernel + +_exit: +	jmp	_exit + + +	.data +	.align 4 +env: +	.long	0 +_quicc_base: +	.long	0 +_periph_base: +	.long	0 +_ramvec: +	.long   0 +_rambase: +	.long   0 +_ramstart: +	.long   0 +_ramend: +	.long   0 +_dprbase: +	.long	0xffffe000 + + +	.text + +    /* +     * These are the exception vectors at boot up, they are copied into RAM +     * and then overwritten as needed. +     */ +  +.section ".data..initvect","awx" +    .long   RAMEND	/* Reset: Initial Stack Pointer                 - 0.  */ +    .long   _start      /* Reset: Initial Program Counter               - 1.  */ +    .long   buserr      /* Bus Error                                    - 2.  */ +    .long   trap        /* Address Error                                - 3.  */ +    .long   trap        /* Illegal Instruction                          - 4.  */ +    .long   trap        /* Divide by zero                               - 5.  */ +    .long   trap        /* CHK, CHK2 Instructions                       - 6.  */ +    .long   trap        /* TRAPcc, TRAPV Instructions                   - 7.  */ +    .long   trap        /* Privilege Violation                          - 8.  */ +    .long   trap        /* Trace                                        - 9.  */ +    .long   trap        /* Line 1010 Emulator                           - 10. */ +    .long   trap        /* Line 1111 Emualtor                           - 11. */ +    .long   trap        /* Harware Breakpoint                           - 12. */ +    .long   trap        /* (Reserved for Coprocessor Protocol Violation)- 13. */ +    .long   trap        /* Format Error                                 - 14. */ +    .long   trap        /* Uninitialized Interrupt                      - 15. */ +    .long   trap        /* (Unassigned, Reserver)                       - 16. */ +    .long   trap        /* (Unassigned, Reserver)                       - 17. */ +    .long   trap        /* (Unassigned, Reserver)                       - 18. */ +    .long   trap        /* (Unassigned, Reserver)                       - 19. */ +    .long   trap        /* (Unassigned, Reserver)                       - 20. */ +    .long   trap        /* (Unassigned, Reserver)                       - 21. */ +    .long   trap        /* (Unassigned, Reserver)                       - 22. */ +    .long   trap        /* (Unassigned, Reserver)                       - 23. */ +    .long   trap        /* Spurious Interrupt                           - 24. */ +    .long   trap        /* Level 1 Interrupt Autovector                 - 25. */ +    .long   trap        /* Level 2 Interrupt Autovector                 - 26. */ +    .long   trap        /* Level 3 Interrupt Autovector                 - 27. */ +    .long   trap        /* Level 4 Interrupt Autovector                 - 28. */ +    .long   trap        /* Level 5 Interrupt Autovector                 - 29. */ +    .long   trap        /* Level 6 Interrupt Autovector                 - 30. */ +    .long   trap        /* Level 7 Interrupt Autovector                 - 31. */ +    .long   system_call /* Trap Instruction Vectors 0                   - 32. */ +    .long   trap        /* Trap Instruction Vectors 1                   - 33. */ +    .long   trap        /* Trap Instruction Vectors 2                   - 34. */ +    .long   trap        /* Trap Instruction Vectors 3                   - 35. */ +    .long   trap        /* Trap Instruction Vectors 4                   - 36. */ +    .long   trap        /* Trap Instruction Vectors 5                   - 37. */ +    .long   trap        /* Trap Instruction Vectors 6                   - 38. */ +    .long   trap        /* Trap Instruction Vectors 7                   - 39. */ +    .long   trap        /* Trap Instruction Vectors 8                   - 40. */ +    .long   trap        /* Trap Instruction Vectors 9                   - 41. */ +    .long   trap        /* Trap Instruction Vectors 10                  - 42. */ +    .long   trap        /* Trap Instruction Vectors 11                  - 43. */ +    .long   trap        /* Trap Instruction Vectors 12                  - 44. */ +    .long   trap        /* Trap Instruction Vectors 13                  - 45. */ +    .long   trap        /* Trap Instruction Vectors 14                  - 46. */ +    .long   trap        /* Trap Instruction Vectors 15                  - 47. */ +    .long   0           /* (Reserved for Coprocessor)                   - 48. */ +    .long   0           /* (Reserved for Coprocessor)                   - 49. */ +    .long   0           /* (Reserved for Coprocessor)                   - 50. */ +    .long   0           /* (Reserved for Coprocessor)                   - 51. */ +    .long   0           /* (Reserved for Coprocessor)                   - 52. */ +    .long   0           /* (Reserved for Coprocessor)                   - 53. */ +    .long   0           /* (Reserved for Coprocessor)                   - 54. */ +    .long   0           /* (Reserved for Coprocessor)                   - 55. */ +    .long   0           /* (Reserved for Coprocessor)                   - 56. */ +    .long   0           /* (Reserved for Coprocessor)                   - 57. */ +    .long   0           /* (Reserved for Coprocessor)                   - 58. */ +    .long   0           /* (Unassigned, Reserved)                       - 59. */ +    .long   0           /* (Unassigned, Reserved)                       - 60. */ +    .long   0           /* (Unassigned, Reserved)                       - 61. */ +    .long   0           /* (Unassigned, Reserved)                       - 62. */ +    .long   0           /* (Unassigned, Reserved)                       - 63. */ +    /*                  The assignment of these vectors to the CPM is         */ +    /*                  dependent on the configuration of the CPM vba         */ +    /*                          fields.                                       */ +    .long   0           /* (User-Defined Vectors 1) CPM Error           - 64. */ +    .long   0           /* (User-Defined Vectors 2) CPM Parallel IO PC11- 65. */ +    .long   0           /* (User-Defined Vectors 3) CPM Parallel IO PC10- 66. */ +    .long   0           /* (User-Defined Vectors 4) CPM SMC2 / PIP      - 67. */ +    .long   0           /* (User-Defined Vectors 5) CPM SMC1            - 68. */ +    .long   0           /* (User-Defined Vectors 6) CPM SPI             - 69. */ +    .long   0           /* (User-Defined Vectors 7) CPM Parallel IO PC9 - 70. */ +    .long   0           /* (User-Defined Vectors 8) CPM Timer 4         - 71. */ +    .long   0           /* (User-Defined Vectors 9) CPM Reserved        - 72. */ +    .long   0           /* (User-Defined Vectors 10) CPM Parallel IO PC8- 73. */ +    .long   0           /* (User-Defined Vectors 11) CPM Parallel IO PC7- 74. */ +    .long   0           /* (User-Defined Vectors 12) CPM Parallel IO PC6- 75. */ +    .long   0           /* (User-Defined Vectors 13) CPM Timer 3        - 76. */ +    .long   0           /* (User-Defined Vectors 14) CPM Reserved       - 77. */ +    .long   0           /* (User-Defined Vectors 15) CPM Parallel IO PC5- 78. */ +    .long   0           /* (User-Defined Vectors 16) CPM Parallel IO PC4- 79. */ +    .long   0           /* (User-Defined Vectors 17) CPM Reserved       - 80. */ +    .long   0           /* (User-Defined Vectors 18) CPM RISC Timer Tbl - 81. */ +    .long   0           /* (User-Defined Vectors 19) CPM Timer 2        - 82. */ +    .long   0           /* (User-Defined Vectors 21) CPM Reserved       - 83. */ +    .long   0           /* (User-Defined Vectors 22) CPM IDMA2          - 84. */ +    .long   0           /* (User-Defined Vectors 23) CPM IDMA1          - 85. */ +    .long   0           /* (User-Defined Vectors 24) CPM SDMA Bus Err   - 86. */ +    .long   0           /* (User-Defined Vectors 25) CPM Parallel IO PC3- 87. */ +    .long   0           /* (User-Defined Vectors 26) CPM Parallel IO PC2- 88. */ +    .long   0           /* (User-Defined Vectors 27) CPM Timer 1        - 89. */ +    .long   0           /* (User-Defined Vectors 28) CPM Parallel IO PC1- 90. */ +    .long   0           /* (User-Defined Vectors 29) CPM SCC 4          - 91. */ +    .long   0           /* (User-Defined Vectors 30) CPM SCC 3          - 92. */ +    .long   0           /* (User-Defined Vectors 31) CPM SCC 2          - 93. */ +    .long   0           /* (User-Defined Vectors 32) CPM SCC 1          - 94. */ +    .long   0           /* (User-Defined Vectors 33) CPM Parallel IO PC0- 95. */ +    /*                  I don't think anything uses the vectors after here.   */ +    .long   0           /* (User-Defined Vectors 34)                    - 96. */ +    .long   0,0,0,0,0               /* (User-Defined Vectors 35  -  39). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 40  -  49). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 50  -  59). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 60  -  69). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 70  -  79). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 80  -  89). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 90  -  99). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 100 - 109). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 110 - 119). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 120 - 129). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 130 - 139). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 140 - 149). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 150 - 159). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 160 - 169). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 170 - 179). */ +    .long   0,0,0,0,0,0,0,0,0,0     /* (User-Defined Vectors 180 - 189). */ +    .long   0,0,0                   /* (User-Defined Vectors 190 - 192). */ +.text +ignore: rte diff --git a/arch/m68k/platform/68360/ints.c b/arch/m68k/platform/68360/ints.c new file mode 100644 index 00000000000..8cd42692331 --- /dev/null +++ b/arch/m68k/platform/68360/ints.c @@ -0,0 +1,138 @@ +/* + * linux/arch/$(ARCH)/platform/$(PLATFORM)/ints.c + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + * + * Copyright (c) 2000  Michael Leslie <mleslie@lineo.com> + * Copyright (c) 1996 Roman Zippel + * Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org> + */ + +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <asm/traps.h> +#include <asm/machdep.h> +#include <asm/m68360.h> + +/* from quicc/commproc.c: */ +extern QUICC *pquicc; +extern void cpm_interrupt_init(void); + +#define INTERNAL_IRQS (96) + +/* assembler routines */ +asmlinkage void system_call(void); +asmlinkage void buserr(void); +asmlinkage void trap(void); +asmlinkage void bad_interrupt(void); +asmlinkage void inthandler(void); + +static void intc_irq_unmask(struct irq_data *d) +{ +	pquicc->intr_cimr |= (1 << d->irq); +} + +static void intc_irq_mask(struct irq_data *d) +{ +	pquicc->intr_cimr &= ~(1 << d->irq); +} + +static void intc_irq_ack(struct irq_data *d) +{ +	pquicc->intr_cisr = (1 << d->irq); +} + +static struct irq_chip intc_irq_chip = { +	.name		= "M68K-INTC", +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +	.irq_ack	= intc_irq_ack, +}; + +/* + * This function should be called during kernel startup to initialize + * the vector table. + */ +void __init trap_init(void) +{ +	int vba = (CPM_VECTOR_BASE<<4); + +	/* set up the vectors */ +	_ramvec[2] = buserr; +	_ramvec[3] = trap; +	_ramvec[4] = trap; +	_ramvec[5] = trap; +	_ramvec[6] = trap; +	_ramvec[7] = trap; +	_ramvec[8] = trap; +	_ramvec[9] = trap; +	_ramvec[10] = trap; +	_ramvec[11] = trap; +	_ramvec[12] = trap; +	_ramvec[13] = trap; +	_ramvec[14] = trap; +	_ramvec[15] = trap; + +	_ramvec[32] = system_call; +	_ramvec[33] = trap; + +	cpm_interrupt_init(); + +	/* set up CICR for vector base address and irq level */ +	/* irl = 4, hp = 1f - see MC68360UM p 7-377 */ +	pquicc->intr_cicr = 0x00e49f00 | vba; + +	/* CPM interrupt vectors: (p 7-376) */ +	_ramvec[vba+CPMVEC_ERROR]       = bad_interrupt; /* Error */ +	_ramvec[vba+CPMVEC_PIO_PC11]    = inthandler;   /* pio - pc11 */ +	_ramvec[vba+CPMVEC_PIO_PC10]    = inthandler;   /* pio - pc10 */ +	_ramvec[vba+CPMVEC_SMC2]        = inthandler;   /* smc2/pip */ +	_ramvec[vba+CPMVEC_SMC1]        = inthandler;   /* smc1 */ +	_ramvec[vba+CPMVEC_SPI]         = inthandler;   /* spi */ +	_ramvec[vba+CPMVEC_PIO_PC9]     = inthandler;   /* pio - pc9 */ +	_ramvec[vba+CPMVEC_TIMER4]      = inthandler;   /* timer 4 */ +	_ramvec[vba+CPMVEC_RESERVED1]   = inthandler;   /* reserved */ +	_ramvec[vba+CPMVEC_PIO_PC8]     = inthandler;   /* pio - pc8 */ +	_ramvec[vba+CPMVEC_PIO_PC7]     = inthandler;  /* pio - pc7 */ +	_ramvec[vba+CPMVEC_PIO_PC6]     = inthandler;  /* pio - pc6 */ +	_ramvec[vba+CPMVEC_TIMER3]      = inthandler;  /* timer 3 */ +	_ramvec[vba+CPMVEC_PIO_PC5]     = inthandler;  /* pio - pc5 */ +	_ramvec[vba+CPMVEC_PIO_PC4]     = inthandler;  /* pio - pc4 */ +	_ramvec[vba+CPMVEC_RESERVED2]   = inthandler;  /* reserved */ +	_ramvec[vba+CPMVEC_RISCTIMER]   = inthandler;  /* timer table */ +	_ramvec[vba+CPMVEC_TIMER2]      = inthandler;  /* timer 2 */ +	_ramvec[vba+CPMVEC_RESERVED3]   = inthandler;  /* reserved */ +	_ramvec[vba+CPMVEC_IDMA2]       = inthandler;  /* idma 2 */ +	_ramvec[vba+CPMVEC_IDMA1]       = inthandler;  /* idma 1 */ +	_ramvec[vba+CPMVEC_SDMA_CB_ERR] = inthandler;  /* sdma channel bus error */ +	_ramvec[vba+CPMVEC_PIO_PC3]     = inthandler;  /* pio - pc3 */ +	_ramvec[vba+CPMVEC_PIO_PC2]     = inthandler;  /* pio - pc2 */ +	/* _ramvec[vba+CPMVEC_TIMER1]      = cpm_isr_timer1; */  /* timer 1 */ +	_ramvec[vba+CPMVEC_TIMER1]      = inthandler;  /* timer 1 */ +	_ramvec[vba+CPMVEC_PIO_PC1]     = inthandler;  /* pio - pc1 */ +	_ramvec[vba+CPMVEC_SCC4]        = inthandler;  /* scc 4 */ +	_ramvec[vba+CPMVEC_SCC3]        = inthandler;  /* scc 3 */ +	_ramvec[vba+CPMVEC_SCC2]        = inthandler;  /* scc 2 */ +	_ramvec[vba+CPMVEC_SCC1]        = inthandler;  /* scc 1 */ +	_ramvec[vba+CPMVEC_PIO_PC0]     = inthandler;  /* pio - pc0 */ + + +	/* turn off all CPM interrupts */ +	pquicc->intr_cimr = 0x00000000; +} + +void init_IRQ(void) +{ +	int i; + +	for (i = 0; (i < NR_IRQS); i++) { +		irq_set_chip(i, &intc_irq_chip); +		irq_set_handler(i, handle_level_irq); +	} +} + diff --git a/arch/m68k/platform/Makefile b/arch/m68k/platform/Makefile new file mode 100644 index 00000000000..fc932bf65d3 --- /dev/null +++ b/arch/m68k/platform/Makefile @@ -0,0 +1,3 @@ +# +# Makefile for the arch/m68knommu/platform. +# diff --git a/arch/m68k/platform/coldfire/Makefile b/arch/m68k/platform/coldfire/Makefile new file mode 100644 index 00000000000..68f0fac6009 --- /dev/null +++ b/arch/m68k/platform/coldfire/Makefile @@ -0,0 +1,41 @@ +# +# Makefile for the m68knommu kernel. +# + +# +# If you want to play with the HW breakpoints then you will +# need to add define this,  which will give you a stack backtrace +# on the console port whenever a DBG interrupt occurs. You have to +# set up you HW breakpoints to trigger a DBG interrupt: +# +# ccflags-y := -DTRAP_DBG_INTERRUPT +# asflags-y := -DTRAP_DBG_INTERRUPT +# + +asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 + +obj-$(CONFIG_COLDFIRE)	+= cache.o clk.o device.o dma.o entry.o vectors.o +obj-$(CONFIG_M5206)	+= m5206.o timers.o intc.o reset.o +obj-$(CONFIG_M5206e)	+= m5206.o timers.o intc.o reset.o +obj-$(CONFIG_M520x)	+= m520x.o pit.o intc-simr.o reset.o +obj-$(CONFIG_M523x)	+= m523x.o pit.o dma_timer.o intc-2.o reset.o +obj-$(CONFIG_M5249)	+= m5249.o timers.o intc.o intc-5249.o reset.o +obj-$(CONFIG_M525x)	+= m525x.o timers.o intc.o intc-525x.o reset.o +obj-$(CONFIG_M527x)	+= m527x.o pit.o intc-2.o reset.o +obj-$(CONFIG_M5272)	+= m5272.o intc-5272.o timers.o +obj-$(CONFIG_M528x)	+= m528x.o pit.o intc-2.o reset.o +obj-$(CONFIG_M5307)	+= m5307.o timers.o intc.o reset.o +obj-$(CONFIG_M53xx)	+= m53xx.o timers.o intc-simr.o reset.o +obj-$(CONFIG_M5407)	+= m5407.o timers.o intc.o reset.o +obj-$(CONFIG_M54xx)	+= m54xx.o sltimers.o intc-2.o +obj-$(CONFIG_M5441x)	+= m5441x.o pit.o intc-simr.o reset.o + +obj-$(CONFIG_NETtel)	+= nettel.o +obj-$(CONFIG_CLEOPATRA)	+= nettel.o +obj-$(CONFIG_FIREBEE)	+= firebee.o +obj-$(CONFIG_MCF8390)	+= mcf8390.o + +obj-$(CONFIG_PCI)	+= pci.o + +obj-y			+= gpio.o +extra-y := head.o diff --git a/arch/m68k/platform/coldfire/cache.c b/arch/m68k/platform/coldfire/cache.c new file mode 100644 index 00000000000..71beeaf0c5c --- /dev/null +++ b/arch/m68k/platform/coldfire/cache.c @@ -0,0 +1,48 @@ +/***************************************************************************/ + +/* + *	cache.c -- general ColdFire Cache maintenance code + * + *	Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> + +/***************************************************************************/ +#ifdef CACHE_PUSH +/***************************************************************************/ + +/* + *	Use cpushl to push all dirty cache lines back to memory. + *	Older versions of GAS don't seem to know how to generate the + *	ColdFire cpushl instruction... Oh well, bit stuff it for now. + */ + +void mcf_cache_push(void) +{ +	__asm__ __volatile__ ( +		"clrl	%%d0\n\t" +		"1:\n\t" +		"movel	%%d0,%%a0\n\t" +		"2:\n\t" +		".word	0xf468\n\t" +		"addl	%0,%%a0\n\t" +		"cmpl	%1,%%a0\n\t" +		"blt	2b\n\t" +		"addql	#1,%%d0\n\t" +		"cmpil	%2,%%d0\n\t" +		"bne	1b\n\t" +		: /* No output */ +		: "i" (CACHE_LINE_SIZE), +		  "i" (DCACHE_SIZE / CACHE_WAYS), +		  "i" (CACHE_WAYS) +		: "d0", "a0" ); +} + +/***************************************************************************/ +#endif /* CACHE_PUSH */ +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/clk.c b/arch/m68k/platform/coldfire/clk.c new file mode 100644 index 00000000000..fddfdccae63 --- /dev/null +++ b/arch/m68k/platform/coldfire/clk.c @@ -0,0 +1,124 @@ +/***************************************************************************/ + +/* + *	clk.c -- general ColdFire CPU kernel clk handling + * + *	Copyright (C) 2009, Greg Ungerer (gerg@snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/mutex.h> +#include <linux/clk.h> +#include <linux/io.h> +#include <linux/err.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfclk.h> + +static DEFINE_SPINLOCK(clk_lock); + +#ifdef MCFPM_PPMCR0 +/* + *	For more advanced ColdFire parts that have clocks that can be enabled + *	we supply enable/disable functions. These must properly define their + *	clocks in their platform specific code. + */ +void __clk_init_enabled(struct clk *clk) +{ +	clk->enabled = 1; +	clk->clk_ops->enable(clk); +} + +void __clk_init_disabled(struct clk *clk) +{ +	clk->enabled = 0; +	clk->clk_ops->disable(clk); +} + +static void __clk_enable0(struct clk *clk) +{ +	__raw_writeb(clk->slot, MCFPM_PPMCR0); +} + +static void __clk_disable0(struct clk *clk) +{ +	__raw_writeb(clk->slot, MCFPM_PPMSR0); +} + +struct clk_ops clk_ops0 = { +	.enable		= __clk_enable0, +	.disable	= __clk_disable0, +}; + +#ifdef MCFPM_PPMCR1 +static void __clk_enable1(struct clk *clk) +{ +	__raw_writeb(clk->slot, MCFPM_PPMCR1); +} + +static void __clk_disable1(struct clk *clk) +{ +	__raw_writeb(clk->slot, MCFPM_PPMSR1); +} + +struct clk_ops clk_ops1 = { +	.enable		= __clk_enable1, +	.disable	= __clk_disable1, +}; +#endif /* MCFPM_PPMCR1 */ +#endif /* MCFPM_PPMCR0 */ + +struct clk *clk_get(struct device *dev, const char *id) +{ +	const char *clk_name = dev ? dev_name(dev) : id ? id : NULL; +	struct clk *clk; +	unsigned i; + +	for (i = 0; (clk = mcf_clks[i]) != NULL; ++i) +		if (!strcmp(clk->name, clk_name)) +			return clk; +	pr_warn("clk_get: didn't find clock %s\n", clk_name); +	return ERR_PTR(-ENOENT); +} +EXPORT_SYMBOL(clk_get); + +int clk_enable(struct clk *clk) +{ +	unsigned long flags; +	spin_lock_irqsave(&clk_lock, flags); +	if ((clk->enabled++ == 0) && clk->clk_ops) +		clk->clk_ops->enable(clk); +	spin_unlock_irqrestore(&clk_lock, flags); + +	return 0; +} +EXPORT_SYMBOL(clk_enable); + +void clk_disable(struct clk *clk) +{ +	unsigned long flags; +	spin_lock_irqsave(&clk_lock, flags); +	if ((--clk->enabled == 0) && clk->clk_ops) +		clk->clk_ops->disable(clk); +	spin_unlock_irqrestore(&clk_lock, flags); +} +EXPORT_SYMBOL(clk_disable); + +void clk_put(struct clk *clk) +{ +	if (clk->enabled != 0) +		pr_warn("clk_put %s still enabled\n", clk->name); +} +EXPORT_SYMBOL(clk_put); + +unsigned long clk_get_rate(struct clk *clk) +{ +	return clk->rate; +} +EXPORT_SYMBOL(clk_get_rate); + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/device.c b/arch/m68k/platform/coldfire/device.c new file mode 100644 index 00000000000..71ea4c02795 --- /dev/null +++ b/arch/m68k/platform/coldfire/device.c @@ -0,0 +1,369 @@ +/* + * device.c  -- common ColdFire SoC device support + * + * (C) Copyright 2011, Greg Ungerer <gerg@uclinux.org> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/spi/spi.h> +#include <linux/gpio.h> +#include <linux/fec.h> +#include <asm/traps.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfqspi.h> + +/* + *	All current ColdFire parts contain from 2, 3, 4 or 10 UARTS. + */ +static struct mcf_platform_uart mcf_uart_platform_data[] = { +	{ +		.mapbase	= MCFUART_BASE0, +		.irq		= MCF_IRQ_UART0, +	}, +	{ +		.mapbase	= MCFUART_BASE1, +		.irq		= MCF_IRQ_UART1, +	}, +#ifdef MCFUART_BASE2 +	{ +		.mapbase	= MCFUART_BASE2, +		.irq		= MCF_IRQ_UART2, +	}, +#endif +#ifdef MCFUART_BASE3 +	{ +		.mapbase	= MCFUART_BASE3, +		.irq		= MCF_IRQ_UART3, +	}, +#endif +#ifdef MCFUART_BASE4 +	{ +		.mapbase	= MCFUART_BASE4, +		.irq		= MCF_IRQ_UART4, +	}, +#endif +#ifdef MCFUART_BASE5 +	{ +		.mapbase	= MCFUART_BASE5, +		.irq		= MCF_IRQ_UART5, +	}, +#endif +#ifdef MCFUART_BASE6 +	{ +		.mapbase	= MCFUART_BASE6, +		.irq		= MCF_IRQ_UART6, +	}, +#endif +#ifdef MCFUART_BASE7 +	{ +		.mapbase	= MCFUART_BASE7, +		.irq		= MCF_IRQ_UART7, +	}, +#endif +#ifdef MCFUART_BASE8 +	{ +		.mapbase	= MCFUART_BASE8, +		.irq		= MCF_IRQ_UART8, +	}, +#endif +#ifdef MCFUART_BASE9 +	{ +		.mapbase	= MCFUART_BASE9, +		.irq		= MCF_IRQ_UART9, +	}, +#endif +	{ }, +}; + +static struct platform_device mcf_uart = { +	.name			= "mcfuart", +	.id			= 0, +	.dev.platform_data	= mcf_uart_platform_data, +}; + +#ifdef CONFIG_FEC + +#ifdef CONFIG_M5441x +#define FEC_NAME	"enet-fec" +static struct fec_platform_data fec_pdata = { +	.phy		= PHY_INTERFACE_MODE_RMII, +}; +#define FEC_PDATA	(&fec_pdata) +#else +#define FEC_NAME	"fec" +#define FEC_PDATA	NULL +#endif + +/* + *	Some ColdFire cores contain the Fast Ethernet Controller (FEC) + *	block. It is Freescale's own hardware block. Some ColdFires + *	have 2 of these. + */ +static struct resource mcf_fec0_resources[] = { +	{ +		.start		= MCFFEC_BASE0, +		.end		= MCFFEC_BASE0 + MCFFEC_SIZE0 - 1, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= MCF_IRQ_FECRX0, +		.end		= MCF_IRQ_FECRX0, +		.flags		= IORESOURCE_IRQ, +	}, +	{ +		.start		= MCF_IRQ_FECTX0, +		.end		= MCF_IRQ_FECTX0, +		.flags		= IORESOURCE_IRQ, +	}, +	{ +		.start		= MCF_IRQ_FECENTC0, +		.end		= MCF_IRQ_FECENTC0, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device mcf_fec0 = { +	.name			= FEC_NAME, +	.id			= 0, +	.num_resources		= ARRAY_SIZE(mcf_fec0_resources), +	.resource		= mcf_fec0_resources, +	.dev.platform_data	= FEC_PDATA, +}; + +#ifdef MCFFEC_BASE1 +static struct resource mcf_fec1_resources[] = { +	{ +		.start		= MCFFEC_BASE1, +		.end		= MCFFEC_BASE1 + MCFFEC_SIZE1 - 1, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= MCF_IRQ_FECRX1, +		.end		= MCF_IRQ_FECRX1, +		.flags		= IORESOURCE_IRQ, +	}, +	{ +		.start		= MCF_IRQ_FECTX1, +		.end		= MCF_IRQ_FECTX1, +		.flags		= IORESOURCE_IRQ, +	}, +	{ +		.start		= MCF_IRQ_FECENTC1, +		.end		= MCF_IRQ_FECENTC1, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device mcf_fec1 = { +	.name			= FEC_NAME, +	.id			= 1, +	.num_resources		= ARRAY_SIZE(mcf_fec1_resources), +	.resource		= mcf_fec1_resources, +	.dev.platform_data	= FEC_PDATA, +}; +#endif /* MCFFEC_BASE1 */ +#endif /* CONFIG_FEC */ + +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +/* + *	The ColdFire QSPI module is an SPI protocol hardware block used + *	on a number of different ColdFire CPUs. + */ +static struct resource mcf_qspi_resources[] = { +	{ +		.start		= MCFQSPI_BASE, +		.end		= MCFQSPI_BASE + MCFQSPI_SIZE - 1, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= MCF_IRQ_QSPI, +		.end		= MCF_IRQ_QSPI, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static int mcf_cs_setup(struct mcfqspi_cs_control *cs_control) +{ +	int status; + +	status = gpio_request(MCFQSPI_CS0, "MCFQSPI_CS0"); +	if (status) { +		pr_debug("gpio_request for MCFQSPI_CS0 failed\n"); +		goto fail0; +	} +	status = gpio_direction_output(MCFQSPI_CS0, 1); +	if (status) { +		pr_debug("gpio_direction_output for MCFQSPI_CS0 failed\n"); +		goto fail1; +	} + +	status = gpio_request(MCFQSPI_CS1, "MCFQSPI_CS1"); +	if (status) { +		pr_debug("gpio_request for MCFQSPI_CS1 failed\n"); +		goto fail1; +	} +	status = gpio_direction_output(MCFQSPI_CS1, 1); +	if (status) { +		pr_debug("gpio_direction_output for MCFQSPI_CS1 failed\n"); +		goto fail2; +	} + +	status = gpio_request(MCFQSPI_CS2, "MCFQSPI_CS2"); +	if (status) { +		pr_debug("gpio_request for MCFQSPI_CS2 failed\n"); +		goto fail2; +	} +	status = gpio_direction_output(MCFQSPI_CS2, 1); +	if (status) { +		pr_debug("gpio_direction_output for MCFQSPI_CS2 failed\n"); +		goto fail3; +	} + +#ifdef MCFQSPI_CS3 +	status = gpio_request(MCFQSPI_CS3, "MCFQSPI_CS3"); +	if (status) { +		pr_debug("gpio_request for MCFQSPI_CS3 failed\n"); +		goto fail3; +	} +	status = gpio_direction_output(MCFQSPI_CS3, 1); +	if (status) { +		pr_debug("gpio_direction_output for MCFQSPI_CS3 failed\n"); +		gpio_free(MCFQSPI_CS3); +		goto fail3; +	} +#endif + +	return 0; + +fail3: +	gpio_free(MCFQSPI_CS2); +fail2: +	gpio_free(MCFQSPI_CS1); +fail1: +	gpio_free(MCFQSPI_CS0); +fail0: +	return status; +} + +static void mcf_cs_teardown(struct mcfqspi_cs_control *cs_control) +{ +#ifdef MCFQSPI_CS3 +	gpio_free(MCFQSPI_CS3); +#endif +	gpio_free(MCFQSPI_CS2); +	gpio_free(MCFQSPI_CS1); +	gpio_free(MCFQSPI_CS0); +} + +static void mcf_cs_select(struct mcfqspi_cs_control *cs_control, +			  u8 chip_select, bool cs_high) +{ +	switch (chip_select) { +	case 0: +		gpio_set_value(MCFQSPI_CS0, cs_high); +		break; +	case 1: +		gpio_set_value(MCFQSPI_CS1, cs_high); +		break; +	case 2: +		gpio_set_value(MCFQSPI_CS2, cs_high); +		break; +#ifdef MCFQSPI_CS3 +	case 3: +		gpio_set_value(MCFQSPI_CS3, cs_high); +		break; +#endif +	} +} + +static void mcf_cs_deselect(struct mcfqspi_cs_control *cs_control, +			    u8 chip_select, bool cs_high) +{ +	switch (chip_select) { +	case 0: +		gpio_set_value(MCFQSPI_CS0, !cs_high); +		break; +	case 1: +		gpio_set_value(MCFQSPI_CS1, !cs_high); +		break; +	case 2: +		gpio_set_value(MCFQSPI_CS2, !cs_high); +		break; +#ifdef MCFQSPI_CS3 +	case 3: +		gpio_set_value(MCFQSPI_CS3, !cs_high); +		break; +#endif +	} +} + +static struct mcfqspi_cs_control mcf_cs_control = { +	.setup			= mcf_cs_setup, +	.teardown		= mcf_cs_teardown, +	.select			= mcf_cs_select, +	.deselect		= mcf_cs_deselect, +}; + +static struct mcfqspi_platform_data mcf_qspi_data = { +	.bus_num		= 0, +	.num_chipselect		= 4, +	.cs_control		= &mcf_cs_control, +}; + +static struct platform_device mcf_qspi = { +	.name			= "mcfqspi", +	.id			= 0, +	.num_resources		= ARRAY_SIZE(mcf_qspi_resources), +	.resource		= mcf_qspi_resources, +	.dev.platform_data	= &mcf_qspi_data, +}; +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ + +static struct platform_device *mcf_devices[] __initdata = { +	&mcf_uart, +#ifdef CONFIG_FEC +	&mcf_fec0, +#ifdef MCFFEC_BASE1 +	&mcf_fec1, +#endif +#endif +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	&mcf_qspi, +#endif +}; + +/* + *	Some ColdFire UARTs let you set the IRQ line to use. + */ +static void __init mcf_uart_set_irq(void) +{ +#ifdef MCFUART_UIVR +	/* UART0 interrupt setup */ +	writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCFSIM_UART1ICR); +	writeb(MCF_IRQ_UART0, MCFUART_BASE0 + MCFUART_UIVR); +	mcf_mapirq2imr(MCF_IRQ_UART0, MCFINTC_UART0); + +	/* UART1 interrupt setup */ +	writeb(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI2, MCFSIM_UART2ICR); +	writeb(MCF_IRQ_UART1, MCFUART_BASE1 + MCFUART_UIVR); +	mcf_mapirq2imr(MCF_IRQ_UART1, MCFINTC_UART1); +#endif +} + +static int __init mcf_init_devices(void) +{ +	mcf_uart_set_irq(); +	platform_add_devices(mcf_devices, ARRAY_SIZE(mcf_devices)); +	return 0; +} + +arch_initcall(mcf_init_devices); + diff --git a/arch/m68k/platform/coldfire/dma.c b/arch/m68k/platform/coldfire/dma.c new file mode 100644 index 00000000000..df5ce20d181 --- /dev/null +++ b/arch/m68k/platform/coldfire/dma.c @@ -0,0 +1,42 @@ +/***************************************************************************/ + +/* + *	dma.c -- Freescale ColdFire DMA support + * + *	Copyright (C) 2007, Greg Ungerer (gerg@snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <asm/dma.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfdma.h> + +/***************************************************************************/ + +/* + *      DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { +#ifdef MCFDMA_BASE0 +	MCFDMA_BASE0, +#endif +#ifdef MCFDMA_BASE1 +	MCFDMA_BASE1, +#endif +#ifdef MCFDMA_BASE2 +	MCFDMA_BASE2, +#endif +#ifdef MCFDMA_BASE3 +	MCFDMA_BASE3, +#endif +}; +EXPORT_SYMBOL(dma_base_addr); + +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; +EXPORT_SYMBOL(dma_device_address); + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/dma_timer.c b/arch/m68k/platform/coldfire/dma_timer.c new file mode 100644 index 00000000000..235ad57c470 --- /dev/null +++ b/arch/m68k/platform/coldfire/dma_timer.c @@ -0,0 +1,81 @@ +/* + * dma_timer.c -- Freescale ColdFire DMA Timer. + * + * Copyright (C) 2007, Benedikt Spranger <b.spranger@linutronix.de> + * Copyright (C) 2008. Sebastian Siewior, Linutronix + * + */ + +#include <linux/clocksource.h> +#include <linux/io.h> + +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfpit.h> +#include <asm/mcfsim.h> + +#define DMA_TIMER_0	(0x00) +#define DMA_TIMER_1	(0x40) +#define DMA_TIMER_2	(0x80) +#define DMA_TIMER_3	(0xc0) + +#define DTMR0	(MCF_IPSBAR + DMA_TIMER_0 + 0x400) +#define DTXMR0	(MCF_IPSBAR + DMA_TIMER_0 + 0x402) +#define DTER0	(MCF_IPSBAR + DMA_TIMER_0 + 0x403) +#define DTRR0	(MCF_IPSBAR + DMA_TIMER_0 + 0x404) +#define DTCR0	(MCF_IPSBAR + DMA_TIMER_0 + 0x408) +#define DTCN0	(MCF_IPSBAR + DMA_TIMER_0 + 0x40c) + +#define DMA_FREQ    ((MCF_CLK / 2) / 16) + +/* DTMR */ +#define DMA_DTMR_RESTART	(1 << 3) +#define DMA_DTMR_CLK_DIV_1	(1 << 1) +#define DMA_DTMR_CLK_DIV_16	(2 << 1) +#define DMA_DTMR_ENABLE		(1 << 0) + +static cycle_t cf_dt_get_cycles(struct clocksource *cs) +{ +	return __raw_readl(DTCN0); +} + +static struct clocksource clocksource_cf_dt = { +	.name		= "coldfire_dma_timer", +	.rating		= 200, +	.read		= cf_dt_get_cycles, +	.mask		= CLOCKSOURCE_MASK(32), +	.flags		= CLOCK_SOURCE_IS_CONTINUOUS, +}; + +static int __init  init_cf_dt_clocksource(void) +{ +	/* +	 * We setup DMA timer 0 in free run mode. This incrementing counter is +	 * used as a highly precious clock source. With MCF_CLOCK = 150 MHz we +	 * get a ~213 ns resolution and the 32bit register will overflow almost +	 * every 15 minutes. +	 */ +	__raw_writeb(0x00, DTXMR0); +	__raw_writeb(0x00, DTER0); +	__raw_writel(0x00000000, DTRR0); +	__raw_writew(DMA_DTMR_CLK_DIV_16 | DMA_DTMR_ENABLE, DTMR0); +	return clocksource_register_hz(&clocksource_cf_dt, DMA_FREQ); +} + +arch_initcall(init_cf_dt_clocksource); + +#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ +#define CYC2NS_SCALE	((1000000 << CYC2NS_SCALE_FACTOR) / (DMA_FREQ / 1000)) + +static unsigned long long cycles2ns(unsigned long cycl) +{ +	return (unsigned long long) ((unsigned long long)cycl * +			CYC2NS_SCALE) >> CYC2NS_SCALE_FACTOR; +} + +unsigned long long sched_clock(void) +{ +	unsigned long cycl = __raw_readl(DTCN0); + +	return cycles2ns(cycl); +} diff --git a/arch/m68k/platform/coldfire/entry.S b/arch/m68k/platform/coldfire/entry.S new file mode 100644 index 00000000000..881ab8e379d --- /dev/null +++ b/arch/m68k/platform/coldfire/entry.S @@ -0,0 +1,203 @@ +/* + *  linux/arch/m68knommu/platform/5307/entry.S + * + *  Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com) + *  Copyright (C) 1998  D. Jeff Dionne <jeff@lineo.ca>, + *                      Kenneth Albanowski <kjahds@kjahds.com>, + *  Copyright (C) 2000  Lineo Inc. (www.lineo.com) + *  Copyright (C) 2004-2006  Macq Electronique SA. (www.macqel.com) + * + * Based on: + * + *  linux/arch/m68k/kernel/entry.S + * + *  Copyright (C) 1991, 1992  Linus Torvalds + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file README.legal in the main directory of this archive + * for more details. + * + * Linux/m68k support by Hamish Macdonald + * + * 68060 fixes by Jesper Skov + * ColdFire support by Greg Ungerer (gerg@snapgear.com) + * 5307 fixes by David W. Miller + * linux 2.4 support David McCullough <davidm@snapgear.com> + * Bug, speed and maintainability fixes by Philippe De Muyter <phdm@macqel.be> + */ + +#include <linux/linkage.h> +#include <asm/unistd.h> +#include <asm/thread_info.h> +#include <asm/errno.h> +#include <asm/setup.h> +#include <asm/segment.h> +#include <asm/asm-offsets.h> +#include <asm/entry.h> + +#ifdef CONFIG_COLDFIRE_SW_A7 +/* + *	Define software copies of the supervisor and user stack pointers. + */ +.bss +sw_ksp: +.long	0 +sw_usp: +.long	0 +#endif /* CONFIG_COLDFIRE_SW_A7 */ + +.text + +.globl system_call +.globl resume +.globl ret_from_exception +.globl ret_from_signal +.globl sys_call_table +.globl inthandler + +enosys: +	mov.l	#sys_ni_syscall,%d3 +	bra	1f + +ENTRY(system_call) +	SAVE_ALL_SYS +	move	#0x2000,%sr		/* enable intrs again */ +	GET_CURRENT(%d2) + +	cmpl	#NR_syscalls,%d0 +	jcc	enosys +	lea	sys_call_table,%a0 +	lsll	#2,%d0			/* movel %a0@(%d0:l:4),%d3 */ +	movel	%a0@(%d0),%d3 +	jeq	enosys + +1: +	movel	%sp,%d2			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d2	/* at start of kernel stack */ +	movel	%d2,%a0 +	movel	%a0@,%a1		/* save top of frame */ +	movel	%sp,%a1@(TASK_THREAD+THREAD_ESP0) +	btst	#(TIF_SYSCALL_TRACE%8),%a0@(TINFO_FLAGS+(31-TIF_SYSCALL_TRACE)/8) +	bnes	1f + +	movel	%d3,%a0 +	jbsr	%a0@ +	movel	%d0,%sp@(PT_OFF_D0)	/* save the return value */ +	jra	ret_from_exception +1: +	movel	#-ENOSYS,%d2		/* strace needs -ENOSYS in PT_OFF_D0 */ +	movel	%d2,PT_OFF_D0(%sp)	/* on syscall entry */ +	subql	#4,%sp +	SAVE_SWITCH_STACK +	jbsr	syscall_trace_enter +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	movel	%d3,%a0 +	jbsr	%a0@ +	movel	%d0,%sp@(PT_OFF_D0)		/* save the return value */ +	subql	#4,%sp			/* dummy return address */ +	SAVE_SWITCH_STACK +	jbsr	syscall_trace_leave + +ret_from_signal: +	RESTORE_SWITCH_STACK +	addql	#4,%sp + +ret_from_exception: +	move	#0x2700,%sr		/* disable intrs */ +	btst	#5,%sp@(PT_OFF_SR)	/* check if returning to kernel */ +	jeq	Luser_return		/* if so, skip resched, signals */ + +#ifdef CONFIG_PREEMPT +	movel	%sp,%d1			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d1	/* at base of kernel stack */ +	movel	%d1,%a0 +	movel	%a0@(TINFO_FLAGS),%d1	/* get thread_info->flags */ +	andl	#(1<<TIF_NEED_RESCHED),%d1 +	jeq	Lkernel_return + +	movel	%a0@(TINFO_PREEMPT),%d1 +	cmpl	#0,%d1 +	jne	Lkernel_return + +	pea	Lkernel_return +	jmp	preempt_schedule_irq	/* preempt the kernel */ +#endif + +Lkernel_return: +	moveml	%sp@,%d1-%d5/%a0-%a2 +	lea	%sp@(32),%sp		/* space for 8 regs */ +	movel	%sp@+,%d0 +	addql	#4,%sp			/* orig d0 */ +	addl	%sp@+,%sp		/* stk adj */ +	rte + +Luser_return: +	movel	%sp,%d1			/* get thread_info pointer */ +	andl	#-THREAD_SIZE,%d1	/* at base of kernel stack */ +	movel	%d1,%a0 +	moveb	%a0@(TINFO_FLAGS+3),%d1	/* thread_info->flags (low 8 bits) */ +	jne	Lwork_to_do		/* still work to do */ + +Lreturn: +	RESTORE_USER + +Lwork_to_do: +	movel	%a0@(TINFO_FLAGS),%d1	/* get thread_info->flags */ +	move	#0x2000,%sr		/* enable intrs again */ +	btst	#TIF_NEED_RESCHED,%d1 +	jne	reschedule + +Lsignal_return: +	subql	#4,%sp			/* dummy return address */ +	SAVE_SWITCH_STACK +	pea	%sp@(SWITCH_STACK_SIZE) +	jsr	do_notify_resume +	addql	#4,%sp +	RESTORE_SWITCH_STACK +	addql	#4,%sp +	jmp	Luser_return + +/* + * This is the generic interrupt handler (for all hardware interrupt + * sources). Calls up to high level code to do all the work. + */ +ENTRY(inthandler) +	SAVE_ALL_INT +	GET_CURRENT(%d2) + +	movew	%sp@(PT_OFF_FORMATVEC),%d0 /* put exception # in d0 */ +	andl	#0x03fc,%d0		/* mask out vector only */ + +	movel	%sp,%sp@-		/* push regs arg */ +	lsrl	#2,%d0			/* calculate real vector # */ +	movel	%d0,%sp@-		/* push vector number */ +	jbsr	do_IRQ			/* call high level irq handler */ +	lea	%sp@(8),%sp		/* pop args off stack */ + +	bra	ret_from_exception + +/* + * Beware - when entering resume, prev (the current task) is + * in a0, next (the new task) is in a1, so don't change these + * registers until their contents are no longer needed. + */ +ENTRY(resume) +	movew	%sr,%d1				 /* save current status */ +	movew	%d1,%a0@(TASK_THREAD+THREAD_SR) +	movel	%a0,%d1				 /* get prev thread in d1 */ +	SAVE_SWITCH_STACK +	movel	%sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ +	RDUSP					 /* movel %usp,%a3 */ +	movel	%a3,%a0@(TASK_THREAD+THREAD_USP) /* save thread user stack */ +#ifdef CONFIG_MMU +	movel	%a1,%a2				 /* set new current */ +#endif +	movel	%a1@(TASK_THREAD+THREAD_USP),%a3 /* restore thread user stack */ +	WRUSP					 /* movel %a3,%usp */ +	movel	%a1@(TASK_THREAD+THREAD_KSP),%sp /* restore new kernel stack */ +	movew	%a1@(TASK_THREAD+THREAD_SR),%d7	 /* restore new status */ +	movew	%d7,%sr +	RESTORE_SWITCH_STACK +	rts + diff --git a/arch/m68k/platform/coldfire/firebee.c b/arch/m68k/platform/coldfire/firebee.c new file mode 100644 index 00000000000..46d50534f98 --- /dev/null +++ b/arch/m68k/platform/coldfire/firebee.c @@ -0,0 +1,86 @@ +/***************************************************************************/ + +/* + *	firebee.c -- extra startup code support for the FireBee boards + * + *	Copyright (C) 2011, Greg Ungerer (gerg@snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/platform_device.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/partitions.h> +#include <linux/mtd/physmap.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> + +/***************************************************************************/ + +/* + *	8MB of NOR flash fitted to the FireBee board. + */ +#define	FLASH_PHYS_ADDR		0xe0000000	/* Physical address of flash */ +#define	FLASH_PHYS_SIZE		0x00800000	/* Size of flash */ + +#define	PART_BOOT_START		0x00000000	/* Start at bottom of flash */ +#define	PART_BOOT_SIZE		0x00040000	/* 256k in size */ +#define	PART_IMAGE_START	0x00040000	/* Start after boot loader */ +#define	PART_IMAGE_SIZE		0x006c0000	/* Most of flash */ +#define	PART_FPGA_START		0x00700000	/* Start at offset 7MB */ +#define	PART_FPGA_SIZE		0x00100000	/* 1MB in size */ + +static struct mtd_partition firebee_flash_parts[] = { +	{ +		.name	= "dBUG", +		.offset	= PART_BOOT_START, +		.size	= PART_BOOT_SIZE, +	}, +	{ +		.name	= "FPGA", +		.offset	= PART_FPGA_START, +		.size	= PART_FPGA_SIZE, +	}, +	{ +		.name	= "image", +		.offset	= PART_IMAGE_START, +		.size	= PART_IMAGE_SIZE, +	}, +}; + +static struct physmap_flash_data firebee_flash_data = { +	.width		= 2, +	.nr_parts	= ARRAY_SIZE(firebee_flash_parts), +	.parts		= firebee_flash_parts, +}; + +static struct resource firebee_flash_resource = { +	.start		= FLASH_PHYS_ADDR, +	.end		= FLASH_PHYS_ADDR + FLASH_PHYS_SIZE, +	.flags		= IORESOURCE_MEM, +}; + +static struct platform_device firebee_flash = { +	.name		= "physmap-flash", +	.id		= 0, +	.dev		= { +		.platform_data = &firebee_flash_data, +	}, +	.num_resources	= 1, +	.resource	= &firebee_flash_resource, +}; + +/***************************************************************************/ + +static int __init init_firebee(void) +{ +	platform_device_register(&firebee_flash); +	return 0; +} + +arch_initcall(init_firebee); + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/gpio.c b/arch/m68k/platform/coldfire/gpio.c new file mode 100644 index 00000000000..e7e428681ec --- /dev/null +++ b/arch/m68k/platform/coldfire/gpio.c @@ -0,0 +1,186 @@ +/* + * Coldfire generic GPIO support. + * + * (C) Copyright 2009, Steven King <sfking@fdwdc.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + */ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/device.h> + +#include <linux/io.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfgpio.h> + +int __mcfgpio_get_value(unsigned gpio) +{ +	return mcfgpio_read(__mcfgpio_ppdr(gpio)) & mcfgpio_bit(gpio); +} +EXPORT_SYMBOL(__mcfgpio_get_value); + +void __mcfgpio_set_value(unsigned gpio, int value) +{ +	if (gpio < MCFGPIO_SCR_START) { +		unsigned long flags; +		MCFGPIO_PORTTYPE data; + +		local_irq_save(flags); +		data = mcfgpio_read(__mcfgpio_podr(gpio)); +		if (value) +			data |= mcfgpio_bit(gpio); +		else +			data &= ~mcfgpio_bit(gpio); +		mcfgpio_write(data, __mcfgpio_podr(gpio)); +		local_irq_restore(flags); +	} else { +		if (value) +			mcfgpio_write(mcfgpio_bit(gpio), +					MCFGPIO_SETR_PORT(gpio)); +		else +			mcfgpio_write(~mcfgpio_bit(gpio), +					MCFGPIO_CLRR_PORT(gpio)); +	} +} +EXPORT_SYMBOL(__mcfgpio_set_value); + +int __mcfgpio_direction_input(unsigned gpio) +{ +	unsigned long flags; +	MCFGPIO_PORTTYPE dir; + +	local_irq_save(flags); +	dir = mcfgpio_read(__mcfgpio_pddr(gpio)); +	dir &= ~mcfgpio_bit(gpio); +	mcfgpio_write(dir, __mcfgpio_pddr(gpio)); +	local_irq_restore(flags); + +	return 0; +} +EXPORT_SYMBOL(__mcfgpio_direction_input); + +int __mcfgpio_direction_output(unsigned gpio, int value) +{ +	unsigned long flags; +	MCFGPIO_PORTTYPE data; + +	local_irq_save(flags); +	data = mcfgpio_read(__mcfgpio_pddr(gpio)); +	data |= mcfgpio_bit(gpio); +	mcfgpio_write(data, __mcfgpio_pddr(gpio)); + +	/* now set the data to output */ +	if (gpio < MCFGPIO_SCR_START) { +		data = mcfgpio_read(__mcfgpio_podr(gpio)); +		if (value) +			data |= mcfgpio_bit(gpio); +		else +			data &= ~mcfgpio_bit(gpio); +		mcfgpio_write(data, __mcfgpio_podr(gpio)); +	} else { +		 if (value) +			mcfgpio_write(mcfgpio_bit(gpio), +					MCFGPIO_SETR_PORT(gpio)); +		 else +			 mcfgpio_write(~mcfgpio_bit(gpio), +					 MCFGPIO_CLRR_PORT(gpio)); +	} +	local_irq_restore(flags); +	return 0; +} +EXPORT_SYMBOL(__mcfgpio_direction_output); + +int __mcfgpio_request(unsigned gpio) +{ +	return 0; +} +EXPORT_SYMBOL(__mcfgpio_request); + +void __mcfgpio_free(unsigned gpio) +{ +	__mcfgpio_direction_input(gpio); +} +EXPORT_SYMBOL(__mcfgpio_free); + +#ifdef CONFIG_GPIOLIB + +static int mcfgpio_direction_input(struct gpio_chip *chip, unsigned offset) +{ +	return __mcfgpio_direction_input(offset); +} + +static int mcfgpio_get_value(struct gpio_chip *chip, unsigned offset) +{ +	return __mcfgpio_get_value(offset); +} + +static int mcfgpio_direction_output(struct gpio_chip *chip, unsigned offset, +				    int value) +{ +	return __mcfgpio_direction_output(offset, value); +} + +static void mcfgpio_set_value(struct gpio_chip *chip, unsigned offset, +			      int value) +{ +	__mcfgpio_set_value(offset, value); +} + +static int mcfgpio_request(struct gpio_chip *chip, unsigned offset) +{ +	return __mcfgpio_request(offset); +} + +static void mcfgpio_free(struct gpio_chip *chip, unsigned offset) +{ +	__mcfgpio_free(offset); +} + +static int mcfgpio_to_irq(struct gpio_chip *chip, unsigned offset) +{ +#if defined(MCFGPIO_IRQ_MIN) +	if ((offset >= MCFGPIO_IRQ_MIN) && (offset < MCFGPIO_IRQ_MAX)) +#else +	if (offset < MCFGPIO_IRQ_MAX) +#endif +		return MCFGPIO_IRQ_VECBASE + offset; +	else +		return -EINVAL; +} + +static struct bus_type mcfgpio_subsys = { +	.name		= "gpio", +	.dev_name	= "gpio", +}; + +static struct gpio_chip mcfgpio_chip = { +	.label			= "mcfgpio", +	.request		= mcfgpio_request, +	.free			= mcfgpio_free, +	.direction_input	= mcfgpio_direction_input, +	.direction_output	= mcfgpio_direction_output, +	.get			= mcfgpio_get_value, +	.set			= mcfgpio_set_value, +	.to_irq			= mcfgpio_to_irq, +	.base			= 0, +	.ngpio			= MCFGPIO_PIN_MAX, +}; + +static int __init mcfgpio_sysinit(void) +{ +	gpiochip_add(&mcfgpio_chip); +	return subsys_system_register(&mcfgpio_subsys, NULL); +} + +core_initcall(mcfgpio_sysinit); +#endif diff --git a/arch/m68k/platform/coldfire/head.S b/arch/m68k/platform/coldfire/head.S new file mode 100644 index 00000000000..fa31be297b8 --- /dev/null +++ b/arch/m68k/platform/coldfire/head.S @@ -0,0 +1,298 @@ +/*****************************************************************************/ + +/* + *	head.S -- common startup code for ColdFire CPUs. + * + *	(C) Copyright 1999-2011, Greg Ungerer <gerg@snapgear.com>. + */ + +/*****************************************************************************/ + +#include <linux/linkage.h> +#include <linux/init.h> +#include <asm/asm-offsets.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfmmu.h> +#include <asm/thread_info.h> + +/*****************************************************************************/ + +/* + *	If we don't have a fixed memory size, then lets build in code + *	to auto detect the DRAM size. Obviously this is the preferred + *	method, and should work for most boards. It won't work for those + *	that do not have their RAM starting at address 0, and it only + *	works on SDRAM (not boards fitted with SRAM). + */ +#if CONFIG_RAMSIZE != 0 +.macro GET_MEM_SIZE +	movel	#CONFIG_RAMSIZE,%d0	/* hard coded memory size */ +.endm + +#elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ +      defined(CONFIG_M5249) || defined(CONFIG_M525x) || \ +      defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ +      defined(CONFIG_M5307) || defined(CONFIG_M5407) +/* + *	Not all these devices have exactly the same DRAM controller, + *	but the DCMR register is virtually identical - give or take + *	a couple of bits. The only exception is the 5272 devices, their + *	DRAM controller is quite different. + */ +.macro GET_MEM_SIZE +	movel	MCFSIM_DMR0,%d0		/* get mask for 1st bank */ +	btst	#0,%d0			/* check if region enabled */ +	beq	1f +	andl	#0xfffc0000,%d0 +	beq	1f +	addl	#0x00040000,%d0		/* convert mask to size */ +1: +	movel	MCFSIM_DMR1,%d1		/* get mask for 2nd bank */ +	btst	#0,%d1			/* check if region enabled */ +	beq	2f +	andl	#0xfffc0000,%d1 +	beq	2f +	addl	#0x00040000,%d1 +	addl	%d1,%d0			/* total mem size in d0 */ +2: +.endm + +#elif defined(CONFIG_M5272) +.macro GET_MEM_SIZE +	movel	MCFSIM_CSOR7,%d0	/* get SDRAM address mask */ +	andil	#0xfffff000,%d0		/* mask out chip select options */ +	negl	%d0			/* negate bits */ +.endm + +#elif defined(CONFIG_M520x) +.macro GET_MEM_SIZE +	clrl	%d0 +	movel	MCFSIM_SDCS0, %d2	/* Get SDRAM chip select 0 config */ +	andl	#0x1f, %d2		/* Get only the chip select size */ +	beq	3f			/* Check if it is enabled */ +	addql	#1, %d2			/* Form exponent */ +	moveql	#1, %d0 +	lsll	%d2, %d0		/* 2 ^ exponent */ +3: +	movel	MCFSIM_SDCS1, %d2	/* Get SDRAM chip select 1 config */ +	andl	#0x1f, %d2		/* Get only the chip select size */ +	beq	4f			/* Check if it is enabled */ +	addql	#1, %d2			/* Form exponent */ +	moveql	#1, %d1 +	lsll	%d2, %d1		/* 2 ^ exponent */ +	addl	%d1, %d0		/* Total size of SDRAM in d0 */ +4: +.endm + +#else +#error "ERROR: I don't know how to probe your boards memory size?" +#endif + +/*****************************************************************************/ + +/* + *	Boards and platforms can do specific early hardware setup if + *	they need to. Most don't need this, define away if not required. + */ +#ifndef PLATFORM_SETUP +#define	PLATFORM_SETUP +#endif + +/*****************************************************************************/ + +.global	_start +.global _rambase +.global _ramvec +.global	_ramstart +.global	_ramend +#if defined(CONFIG_UBOOT) +.global	_init_sp +#endif + +/*****************************************************************************/ + +.data + +/* + *	During startup we store away the RAM setup. These are not in the + *	bss, since their values are determined and written before the bss + *	has been cleared. + */ +_rambase: +.long	0 +_ramvec: +.long	0 +_ramstart: +.long	0 +_ramend: +.long	0 +#if defined(CONFIG_UBOOT) +_init_sp: +.long	0 +#endif + +/*****************************************************************************/ + +__HEAD + +#ifdef CONFIG_MMU +_start0: +	jmp	_start +.global kernel_pg_dir +.equ	kernel_pg_dir,_start0 +.equ	.,_start0+0x1000 +#endif + +/* + *	This is the codes first entry point. This is where it all + *	begins... + */ + +_start: +	nop					/* filler */ +	movew	#0x2700, %sr			/* no interrupts */ +	movel	#CACHE_INIT,%d0			/* disable cache */ +	movec	%d0,%CACR +	nop +#if defined(CONFIG_UBOOT) +	movel	%sp,_init_sp			/* save initial stack pointer */ +#endif +#ifdef CONFIG_MBAR +	movel	#CONFIG_MBAR+1,%d0		/* configured MBAR address */ +	movec	%d0,%MBAR			/* set it */ +#endif + +	/* +	 *	Do any platform or board specific setup now. Most boards +	 *	don't need anything. Those exceptions are define this in +	 *	their board specific includes. +	 */ +	PLATFORM_SETUP + +	/* +	 *	Create basic memory configuration. Set VBR accordingly, +	 *	and size memory. +	 */ +	movel	#CONFIG_VECTORBASE,%a7 +	movec   %a7,%VBR			/* set vectors addr */ +	movel	%a7,_ramvec + +	movel	#CONFIG_RAMBASE,%a7		/* mark the base of RAM */ +	movel	%a7,_rambase + +	GET_MEM_SIZE				/* macro code determines size */ +	addl	%a7,%d0 +	movel	%d0,_ramend			/* set end ram addr */ + +	/* +	 *	Now that we know what the memory is, lets enable cache +	 *	and get things moving. This is Coldfire CPU specific. Not +	 *	all version cores have identical cache register setup. But +	 *	it is very similar. Define the exact settings in the headers +	 *	then the code here is the same for all. +	 */ +	movel	#ACR0_MODE,%d0			/* set RAM region for caching */ +	movec	%d0,%ACR0 +	movel	#ACR1_MODE,%d0			/* anything else to cache? */ +	movec	%d0,%ACR1 +#ifdef ACR2_MODE +	movel	#ACR2_MODE,%d0 +	movec	%d0,%ACR2 +	movel	#ACR3_MODE,%d0 +	movec	%d0,%ACR3 +#endif +	movel	#CACHE_MODE,%d0			/* enable cache */ +	movec	%d0,%CACR +	nop + +#ifdef CONFIG_MMU +	/* +	 *	Identity mapping for the kernel region. +	 */ +	movel	#(MMUBASE+1),%d0		/* enable MMUBAR registers */ +	movec	%d0,%MMUBAR +	movel	#MMUOR_CA,%d0			/* clear TLB entries */ +	movel	%d0,MMUOR +	movel	#0,%d0				/* set ASID to 0 */ +	movec	%d0,%asid + +	movel	#MMUCR_EN,%d0			/* Enable the identity map */ +	movel	%d0,MMUCR +	nop					/* sync i-pipeline */ + +	movel	#_vstart,%a0			/* jump to "virtual" space */ +	jmp	%a0@ +_vstart: +#endif /* CONFIG_MMU */ + +#ifdef CONFIG_ROMFS_FS +	/* +	 *	Move ROM filesystem above bss :-) +	 */ +	lea	__bss_start,%a0			/* get start of bss */ +	lea	__bss_stop,%a1			/* set up destination  */ +	movel	%a0,%a2				/* copy of bss start */ + +	movel	8(%a0),%d0			/* get size of ROMFS */ +	addql	#8,%d0				/* allow for rounding */ +	andl	#0xfffffffc, %d0		/* whole words */ + +	addl	%d0,%a0				/* copy from end */ +	addl	%d0,%a1				/* copy from end */ +	movel	%a1,_ramstart			/* set start of ram */ + +_copy_romfs: +	movel	-(%a0),%d0			/* copy dword */ +	movel	%d0,-(%a1) +	cmpl	%a0,%a2				/* check if at end */ +	bne	_copy_romfs + +#else /* CONFIG_ROMFS_FS */ +	lea	__bss_stop,%a1 +	movel	%a1,_ramstart +#endif /* CONFIG_ROMFS_FS */ + + +	/* +	 *	Zero out the bss region. +	 */ +	lea	__bss_start,%a0			/* get start of bss */ +	lea	__bss_stop,%a1			/* get end of bss */ +	clrl	%d0				/* set value */ +_clear_bss: +	movel	%d0,(%a0)+			/* clear each word */ +	cmpl	%a0,%a1				/* check if at end */ +	bne	_clear_bss + +	/* +	 *	Load the current task pointer and stack. +	 */ +	lea	init_thread_union,%a0 +	lea	THREAD_SIZE(%a0),%sp + +#ifdef CONFIG_MMU +.global m68k_cputype +.global m68k_mmutype +.global m68k_fputype +.global m68k_machtype +	movel	#CPU_COLDFIRE,%d0 +	movel	%d0,m68k_cputype		/* Mark us as a ColdFire */ +	movel	#MMU_COLDFIRE,%d0 +	movel	%d0,m68k_mmutype +	movel	#FPU_COLDFIRE,%d0 +	movel	%d0,m68k_fputype +	movel	#MACH_M54XX,%d0 +	movel	%d0,m68k_machtype		/* Mark us as a 54xx machine */ +	lea	init_task,%a2			/* Set "current" init task */ +#endif + +	/* +	 *	Assember start up done, start code proper. +	 */ +	jsr	start_kernel			/* start Linux kernel */ + +_exit: +	jmp	_exit				/* should never get here */ + +/*****************************************************************************/ diff --git a/arch/m68k/platform/coldfire/intc-2.c b/arch/m68k/platform/coldfire/intc-2.c new file mode 100644 index 00000000000..995093357c5 --- /dev/null +++ b/arch/m68k/platform/coldfire/intc-2.c @@ -0,0 +1,212 @@ +/* + * intc-2.c + * + * General interrupt controller code for the many ColdFire cores that use + * interrupt controllers with 63 interrupt sources, organized as 56 fully- + * programmable + 7 fixed-level interrupt sources. This includes the 523x + * family, the 5270, 5271, 5274, 5275, and the 528x family which have two such + * controllers, and the 547x and 548x families which have only one of them. + * + * The external 7 fixed interrupts are part the the Edge Port unit of these + * ColdFire parts. They can be configured as level or edge triggered. + * + * (C) Copyright 2009-2011, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/traps.h> + +/* + * Bit definitions for the ICR family of registers. + */ +#define MCFSIM_ICR_LEVEL(l)	((l)<<3)	/* Level l intr */ +#define MCFSIM_ICR_PRI(p)	(p)		/* Priority p intr */ + +/* + *	The EDGE Port interrupts are the fixed 7 external interrupts. + *	They need some special treatment, for example they need to be acked. + */ +#define	EINT0	64	/* Is not actually used, but spot reserved for it */ +#define	EINT1	65	/* EDGE Port interrupt 1 */ +#define	EINT7	71	/* EDGE Port interrupt 7 */ + +#ifdef MCFICM_INTC1 +#define NR_VECS	128 +#else +#define NR_VECS	64 +#endif + +static void intc_irq_mask(struct irq_data *d) +{ +	unsigned int irq = d->irq - MCFINT_VECBASE; +	unsigned long imraddr; +	u32 val, imrbit; + +#ifdef MCFICM_INTC1 +	imraddr = (irq & 0x40) ? MCFICM_INTC1 : MCFICM_INTC0; +#else +	imraddr = MCFICM_INTC0; +#endif +	imraddr += (irq & 0x20) ? MCFINTC_IMRH : MCFINTC_IMRL; +	imrbit = 0x1 << (irq & 0x1f); + +	val = __raw_readl(imraddr); +	__raw_writel(val | imrbit, imraddr); +} + +static void intc_irq_unmask(struct irq_data *d) +{ +	unsigned int irq = d->irq - MCFINT_VECBASE; +	unsigned long imraddr; +	u32 val, imrbit; + +#ifdef MCFICM_INTC1 +	imraddr = (irq & 0x40) ? MCFICM_INTC1 : MCFICM_INTC0; +#else +	imraddr = MCFICM_INTC0; +#endif +	imraddr += ((irq & 0x20) ? MCFINTC_IMRH : MCFINTC_IMRL); +	imrbit = 0x1 << (irq & 0x1f); + +	/* Don't set the "maskall" bit! */ +	if ((irq & 0x20) == 0) +		imrbit |= 0x1; + +	val = __raw_readl(imraddr); +	__raw_writel(val & ~imrbit, imraddr); +} + +/* + *	Only the external (or EDGE Port) interrupts need to be acknowledged + *	here, as part of the IRQ handler. They only really need to be ack'ed + *	if they are in edge triggered mode, but there is no harm in doing it + *	for all types. + */ +static void intc_irq_ack(struct irq_data *d) +{ +	unsigned int irq = d->irq; + +	__raw_writeb(0x1 << (irq - EINT0), MCFEPORT_EPFR); +} + +/* + *	Each vector needs a unique priority and level associated with it. + *	We don't really care so much what they are, we don't rely on the + *	traditional priority interrupt scheme of the m68k/ColdFire. This + *	only needs to be set once for an interrupt, and we will never change + *	these values once we have set them. + */ +static u8 intc_intpri = MCFSIM_ICR_LEVEL(6) | MCFSIM_ICR_PRI(6); + +static unsigned int intc_irq_startup(struct irq_data *d) +{ +	unsigned int irq = d->irq - MCFINT_VECBASE; +	unsigned long icraddr; + +#ifdef MCFICM_INTC1 +	icraddr = (irq & 0x40) ? MCFICM_INTC1 : MCFICM_INTC0; +#else +	icraddr = MCFICM_INTC0; +#endif +	icraddr += MCFINTC_ICR0 + (irq & 0x3f); +	if (__raw_readb(icraddr) == 0) +		__raw_writeb(intc_intpri--, icraddr); + +	irq = d->irq; +	if ((irq >= EINT1) && (irq <= EINT7)) { +		u8 v; + +		irq -= EINT0; + +		/* Set EPORT line as input */ +		v = __raw_readb(MCFEPORT_EPDDR); +		__raw_writeb(v & ~(0x1 << irq), MCFEPORT_EPDDR); + +		/* Set EPORT line as interrupt source */ +		v = __raw_readb(MCFEPORT_EPIER); +		__raw_writeb(v | (0x1 << irq), MCFEPORT_EPIER); +	} + +	intc_irq_unmask(d); +	return 0; +} + +static int intc_irq_set_type(struct irq_data *d, unsigned int type) +{ +	unsigned int irq = d->irq; +	u16 pa, tb; + +	switch (type) { +	case IRQ_TYPE_EDGE_RISING: +		tb = 0x1; +		break; +	case IRQ_TYPE_EDGE_FALLING: +		tb = 0x2; +		break; +	case IRQ_TYPE_EDGE_BOTH: +		tb = 0x3; +		break; +	default: +		/* Level triggered */ +		tb = 0; +		break; +	} + +	if (tb) +		irq_set_handler(irq, handle_edge_irq); + +	irq -= EINT0; +	pa = __raw_readw(MCFEPORT_EPPAR); +	pa = (pa & ~(0x3 << (irq * 2))) | (tb << (irq * 2)); +	__raw_writew(pa, MCFEPORT_EPPAR); +	 +	return 0; +} + +static struct irq_chip intc_irq_chip = { +	.name		= "CF-INTC", +	.irq_startup	= intc_irq_startup, +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +}; + +static struct irq_chip intc_irq_chip_edge_port = { +	.name		= "CF-INTC-EP", +	.irq_startup	= intc_irq_startup, +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +	.irq_ack	= intc_irq_ack, +	.irq_set_type	= intc_irq_set_type, +}; + +void __init init_IRQ(void) +{ +	int irq; + +	/* Mask all interrupt sources */ +	__raw_writel(0x1, MCFICM_INTC0 + MCFINTC_IMRL); +#ifdef MCFICM_INTC1 +	__raw_writel(0x1, MCFICM_INTC1 + MCFINTC_IMRL); +#endif + +	for (irq = MCFINT_VECBASE; (irq < MCFINT_VECBASE + NR_VECS); irq++) { +		if ((irq >= EINT1) && (irq <=EINT7)) +			irq_set_chip(irq, &intc_irq_chip_edge_port); +		else +			irq_set_chip(irq, &intc_irq_chip); +		irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH); +		irq_set_handler(irq, handle_level_irq); +	} +} + diff --git a/arch/m68k/platform/coldfire/intc-5249.c b/arch/m68k/platform/coldfire/intc-5249.c new file mode 100644 index 00000000000..b0d1641053e --- /dev/null +++ b/arch/m68k/platform/coldfire/intc-5249.c @@ -0,0 +1,61 @@ +/* + * intc2.c  -- support for the 2nd INTC controller of the 5249 + * + * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> + +static void intc2_irq_gpio_mask(struct irq_data *d) +{ +	u32 imr; +	imr = readl(MCFSIM2_GPIOINTENABLE); +	imr &= ~(0x1 << (d->irq - MCF_IRQ_GPIO0)); +	writel(imr, MCFSIM2_GPIOINTENABLE); +} + +static void intc2_irq_gpio_unmask(struct irq_data *d) +{ +	u32 imr; +	imr = readl(MCFSIM2_GPIOINTENABLE); +	imr |= (0x1 << (d->irq - MCF_IRQ_GPIO0)); +	writel(imr, MCFSIM2_GPIOINTENABLE); +} + +static void intc2_irq_gpio_ack(struct irq_data *d) +{ +	writel(0x1 << (d->irq - MCF_IRQ_GPIO0), MCFSIM2_GPIOINTCLEAR); +} + +static struct irq_chip intc2_irq_gpio_chip = { +	.name		= "CF-INTC2", +	.irq_mask	= intc2_irq_gpio_mask, +	.irq_unmask	= intc2_irq_gpio_unmask, +	.irq_ack	= intc2_irq_gpio_ack, +}; + +static int __init mcf_intc2_init(void) +{ +	int irq; + +	/* GPIO interrupt sources */ +	for (irq = MCF_IRQ_GPIO0; (irq <= MCF_IRQ_GPIO7); irq++) { +		irq_set_chip(irq, &intc2_irq_gpio_chip); +		irq_set_handler(irq, handle_edge_irq); +	} + +	return 0; +} + +arch_initcall(mcf_intc2_init); diff --git a/arch/m68k/platform/coldfire/intc-525x.c b/arch/m68k/platform/coldfire/intc-525x.c new file mode 100644 index 00000000000..b23204d059a --- /dev/null +++ b/arch/m68k/platform/coldfire/intc-525x.c @@ -0,0 +1,91 @@ +/* + * intc2.c  -- support for the 2nd INTC controller of the 525x + * + * (C) Copyright 2012, Steven King <sfking@fdwdc.com> + * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> + +static void intc2_irq_gpio_mask(struct irq_data *d) +{ +	u32 imr = readl(MCFSIM2_GPIOINTENABLE); +	u32 type = irqd_get_trigger_type(d); +	int irq = d->irq - MCF_IRQ_GPIO0; + +	if (type & IRQ_TYPE_EDGE_RISING) +		imr &= ~(0x001 << irq); +	if (type & IRQ_TYPE_EDGE_FALLING) +		imr &= ~(0x100 << irq); +	writel(imr, MCFSIM2_GPIOINTENABLE); +} + +static void intc2_irq_gpio_unmask(struct irq_data *d) +{ +	u32 imr = readl(MCFSIM2_GPIOINTENABLE); +	u32 type = irqd_get_trigger_type(d); +	int irq = d->irq - MCF_IRQ_GPIO0; + +	if (type & IRQ_TYPE_EDGE_RISING) +		imr |= (0x001 << irq); +	if (type & IRQ_TYPE_EDGE_FALLING) +		imr |= (0x100 << irq); +	writel(imr, MCFSIM2_GPIOINTENABLE); +} + +static void intc2_irq_gpio_ack(struct irq_data *d) +{ +	u32 imr = 0; +	u32 type = irqd_get_trigger_type(d); +	int irq = d->irq - MCF_IRQ_GPIO0; + +	if (type & IRQ_TYPE_EDGE_RISING) +		imr |= (0x001 << irq); +	if (type & IRQ_TYPE_EDGE_FALLING) +		imr |= (0x100 << irq); +	writel(imr, MCFSIM2_GPIOINTCLEAR); +} + +static int intc2_irq_gpio_set_type(struct irq_data *d, unsigned int f) +{ +	if (f & ~IRQ_TYPE_EDGE_BOTH) +		return -EINVAL; +	return 0; +} + +static struct irq_chip intc2_irq_gpio_chip = { +	.name		= "CF-INTC2", +	.irq_mask	= intc2_irq_gpio_mask, +	.irq_unmask	= intc2_irq_gpio_unmask, +	.irq_ack	= intc2_irq_gpio_ack, +	.irq_set_type	= intc2_irq_gpio_set_type, +}; + +static int __init mcf_intc2_init(void) +{ +	int irq; + +	/* set the interrupt base for the second interrupt controller */ +	writel(MCFINTC2_VECBASE, MCFINTC2_INTBASE); + +	/* GPIO interrupt sources */ +	for (irq = MCF_IRQ_GPIO0; (irq <= MCF_IRQ_GPIO6); irq++) { +		irq_set_chip(irq, &intc2_irq_gpio_chip); +		irq_set_handler(irq, handle_edge_irq); +	} + +	return 0; +} + +arch_initcall(mcf_intc2_init); diff --git a/arch/m68k/platform/coldfire/intc-5272.c b/arch/m68k/platform/coldfire/intc-5272.c new file mode 100644 index 00000000000..d7b695629a7 --- /dev/null +++ b/arch/m68k/platform/coldfire/intc-5272.c @@ -0,0 +1,185 @@ +/* + * intc.c  --  interrupt controller or ColdFire 5272 SoC + * + * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/kernel_stat.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/traps.h> + +/* + * The 5272 ColdFire interrupt controller is nothing like any other + * ColdFire interrupt controller - it truly is completely different. + * Given its age it is unlikely to be used on any other ColdFire CPU. + */ + +/* + * The masking and priproty setting of interrupts on the 5272 is done + * via a set of 4 "Interrupt Controller Registers" (ICR). There is a + * loose mapping of vector number to register and internal bits, but + * a table is the easiest and quickest way to map them. + * + * Note that the external interrupts are edge triggered (unlike the + * internal interrupt sources which are level triggered). Which means + * they also need acknowledging via acknowledge bits. + */ +struct irqmap { +	unsigned char	icr; +	unsigned char	index; +	unsigned char	ack; +}; + +static struct irqmap intc_irqmap[MCFINT_VECMAX - MCFINT_VECBASE] = { +	/*MCF_IRQ_SPURIOUS*/	{ .icr = 0,           .index = 0,  .ack = 0, }, +	/*MCF_IRQ_EINT1*/	{ .icr = MCFSIM_ICR1, .index = 28, .ack = 1, }, +	/*MCF_IRQ_EINT2*/	{ .icr = MCFSIM_ICR1, .index = 24, .ack = 1, }, +	/*MCF_IRQ_EINT3*/	{ .icr = MCFSIM_ICR1, .index = 20, .ack = 1, }, +	/*MCF_IRQ_EINT4*/	{ .icr = MCFSIM_ICR1, .index = 16, .ack = 1, }, +	/*MCF_IRQ_TIMER1*/	{ .icr = MCFSIM_ICR1, .index = 12, .ack = 0, }, +	/*MCF_IRQ_TIMER2*/	{ .icr = MCFSIM_ICR1, .index = 8,  .ack = 0, }, +	/*MCF_IRQ_TIMER3*/	{ .icr = MCFSIM_ICR1, .index = 4,  .ack = 0, }, +	/*MCF_IRQ_TIMER4*/	{ .icr = MCFSIM_ICR1, .index = 0,  .ack = 0, }, +	/*MCF_IRQ_UART1*/	{ .icr = MCFSIM_ICR2, .index = 28, .ack = 0, }, +	/*MCF_IRQ_UART2*/	{ .icr = MCFSIM_ICR2, .index = 24, .ack = 0, }, +	/*MCF_IRQ_PLIP*/	{ .icr = MCFSIM_ICR2, .index = 20, .ack = 0, }, +	/*MCF_IRQ_PLIA*/	{ .icr = MCFSIM_ICR2, .index = 16, .ack = 0, }, +	/*MCF_IRQ_USB0*/	{ .icr = MCFSIM_ICR2, .index = 12, .ack = 0, }, +	/*MCF_IRQ_USB1*/	{ .icr = MCFSIM_ICR2, .index = 8,  .ack = 0, }, +	/*MCF_IRQ_USB2*/	{ .icr = MCFSIM_ICR2, .index = 4,  .ack = 0, }, +	/*MCF_IRQ_USB3*/	{ .icr = MCFSIM_ICR2, .index = 0,  .ack = 0, }, +	/*MCF_IRQ_USB4*/	{ .icr = MCFSIM_ICR3, .index = 28, .ack = 0, }, +	/*MCF_IRQ_USB5*/	{ .icr = MCFSIM_ICR3, .index = 24, .ack = 0, }, +	/*MCF_IRQ_USB6*/	{ .icr = MCFSIM_ICR3, .index = 20, .ack = 0, }, +	/*MCF_IRQ_USB7*/	{ .icr = MCFSIM_ICR3, .index = 16, .ack = 0, }, +	/*MCF_IRQ_DMA*/		{ .icr = MCFSIM_ICR3, .index = 12, .ack = 0, }, +	/*MCF_IRQ_ERX*/		{ .icr = MCFSIM_ICR3, .index = 8,  .ack = 0, }, +	/*MCF_IRQ_ETX*/		{ .icr = MCFSIM_ICR3, .index = 4,  .ack = 0, }, +	/*MCF_IRQ_ENTC*/	{ .icr = MCFSIM_ICR3, .index = 0,  .ack = 0, }, +	/*MCF_IRQ_QSPI*/	{ .icr = MCFSIM_ICR4, .index = 28, .ack = 0, }, +	/*MCF_IRQ_EINT5*/	{ .icr = MCFSIM_ICR4, .index = 24, .ack = 1, }, +	/*MCF_IRQ_EINT6*/	{ .icr = MCFSIM_ICR4, .index = 20, .ack = 1, }, +	/*MCF_IRQ_SWTO*/	{ .icr = MCFSIM_ICR4, .index = 16, .ack = 0, }, +}; + +/* + * The act of masking the interrupt also has a side effect of 'ack'ing + * an interrupt on this irq (for the external irqs). So this mask function + * is also an ack_mask function. + */ +static void intc_irq_mask(struct irq_data *d) +{ +	unsigned int irq = d->irq; + +	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { +		u32 v; +		irq -= MCFINT_VECBASE; +		v = 0x8 << intc_irqmap[irq].index; +		writel(v, intc_irqmap[irq].icr); +	} +} + +static void intc_irq_unmask(struct irq_data *d) +{ +	unsigned int irq = d->irq; + +	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { +		u32 v; +		irq -= MCFINT_VECBASE; +		v = 0xd << intc_irqmap[irq].index; +		writel(v, intc_irqmap[irq].icr); +	} +} + +static void intc_irq_ack(struct irq_data *d) +{ +	unsigned int irq = d->irq; + +	/* Only external interrupts are acked */ +	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { +		irq -= MCFINT_VECBASE; +		if (intc_irqmap[irq].ack) { +			u32 v; +			v = readl(intc_irqmap[irq].icr); +			v &= (0x7 << intc_irqmap[irq].index); +			v |= (0x8 << intc_irqmap[irq].index); +			writel(v, intc_irqmap[irq].icr); +		} +	} +} + +static int intc_irq_set_type(struct irq_data *d, unsigned int type) +{ +	unsigned int irq = d->irq; + +	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) { +		irq -= MCFINT_VECBASE; +		if (intc_irqmap[irq].ack) { +			u32 v; +			v = readl(MCFSIM_PITR); +			if (type == IRQ_TYPE_EDGE_FALLING) +				v &= ~(0x1 << (32 - irq)); +			else +				v |= (0x1 << (32 - irq)); +			writel(v, MCFSIM_PITR); +		} +	} +	return 0; +} + +/* + * Simple flow handler to deal with the external edge triggered interrupts. + * We need to be careful with the masking/acking due to the side effects + * of masking an interrupt. + */ +static void intc_external_irq(unsigned int irq, struct irq_desc *desc) +{ +	irq_desc_get_chip(desc)->irq_ack(&desc->irq_data); +	handle_simple_irq(irq, desc); +} + +static struct irq_chip intc_irq_chip = { +	.name		= "CF-INTC", +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +	.irq_mask_ack	= intc_irq_mask, +	.irq_ack	= intc_irq_ack, +	.irq_set_type	= intc_irq_set_type, +}; + +void __init init_IRQ(void) +{ +	int irq, edge; + +	/* Mask all interrupt sources */ +	writel(0x88888888, MCFSIM_ICR1); +	writel(0x88888888, MCFSIM_ICR2); +	writel(0x88888888, MCFSIM_ICR3); +	writel(0x88888888, MCFSIM_ICR4); + +	for (irq = 0; (irq < NR_IRQS); irq++) { +		irq_set_chip(irq, &intc_irq_chip); +		edge = 0; +		if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) +			edge = intc_irqmap[irq - MCFINT_VECBASE].ack; +		if (edge) { +			irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); +			irq_set_handler(irq, intc_external_irq); +		} else { +			irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH); +			irq_set_handler(irq, handle_level_irq); +		} +	} +} + diff --git a/arch/m68k/platform/coldfire/intc-simr.c b/arch/m68k/platform/coldfire/intc-simr.c new file mode 100644 index 00000000000..7cf2c156f72 --- /dev/null +++ b/arch/m68k/platform/coldfire/intc-simr.c @@ -0,0 +1,199 @@ +/* + * intc-simr.c + * + * Interrupt controller code for the ColdFire 5208, 5207 & 532x parts. + * + * (C) Copyright 2009-2011, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/traps.h> + +/* + *	The EDGE Port interrupts are the fixed 7 external interrupts. + *	They need some special treatment, for example they need to be acked. + */ +#ifdef CONFIG_M520x +/* + *	The 520x parts only support a limited range of these external + *	interrupts, only 1, 4 and 7 (as interrupts 65, 66 and 67). + */ +#define	EINT0	64	/* Is not actually used, but spot reserved for it */ +#define	EINT1	65	/* EDGE Port interrupt 1 */ +#define	EINT4	66	/* EDGE Port interrupt 4 */ +#define	EINT7	67	/* EDGE Port interrupt 7 */ + +static unsigned int irqebitmap[] = { 0, 1, 4, 7 }; +static unsigned int inline irq2ebit(unsigned int irq) +{ +	return irqebitmap[irq - EINT0]; +} + +#else + +/* + *	Most of the ColdFire parts with the EDGE Port module just have + *	a strait direct mapping of the 7 external interrupts. Although + *	there is a bit reserved for 0, it is not used. + */ +#define	EINT0	64	/* Is not actually used, but spot reserved for it */ +#define	EINT1	65	/* EDGE Port interrupt 1 */ +#define	EINT7	71	/* EDGE Port interrupt 7 */ + +static unsigned int inline irq2ebit(unsigned int irq) +{ +	return irq - EINT0; +} + +#endif + +/* + *	There maybe one, two or three interrupt control units, each has 64 + *	interrupts. If there is no second or third unit then MCFINTC1_* or + *	MCFINTC2_* defines will be 0 (and code for them optimized away). + */ + +static void intc_irq_mask(struct irq_data *d) +{ +	unsigned int irq = d->irq - MCFINT_VECBASE; + +	if (MCFINTC2_SIMR && (irq > 128)) +		__raw_writeb(irq - 128, MCFINTC2_SIMR); +	else if (MCFINTC1_SIMR && (irq > 64)) +		__raw_writeb(irq - 64, MCFINTC1_SIMR); +	else +		__raw_writeb(irq, MCFINTC0_SIMR); +} + +static void intc_irq_unmask(struct irq_data *d) +{ +	unsigned int irq = d->irq - MCFINT_VECBASE; + +	if (MCFINTC2_CIMR && (irq > 128)) +		__raw_writeb(irq - 128, MCFINTC2_CIMR); +	else if (MCFINTC1_CIMR && (irq > 64)) +		__raw_writeb(irq - 64, MCFINTC1_CIMR); +	else +		__raw_writeb(irq, MCFINTC0_CIMR); +} + +static void intc_irq_ack(struct irq_data *d) +{ +	unsigned int ebit = irq2ebit(d->irq); + +	__raw_writeb(0x1 << ebit, MCFEPORT_EPFR); +} + +static unsigned int intc_irq_startup(struct irq_data *d) +{ +	unsigned int irq = d->irq; + +	if ((irq >= EINT1) && (irq <= EINT7)) { +		unsigned int ebit = irq2ebit(irq); +		u8 v; + +#if defined(MCFEPORT_EPDDR) +		/* Set EPORT line as input */ +		v = __raw_readb(MCFEPORT_EPDDR); +		__raw_writeb(v & ~(0x1 << ebit), MCFEPORT_EPDDR); +#endif + +		/* Set EPORT line as interrupt source */ +		v = __raw_readb(MCFEPORT_EPIER); +		__raw_writeb(v | (0x1 << ebit), MCFEPORT_EPIER); +	} + +	irq -= MCFINT_VECBASE; +	if (MCFINTC2_ICR0 && (irq > 128)) +		__raw_writeb(5, MCFINTC2_ICR0 + irq - 128); +	else if (MCFINTC1_ICR0 && (irq > 64)) +		__raw_writeb(5, MCFINTC1_ICR0 + irq - 64); +	else +		__raw_writeb(5, MCFINTC0_ICR0 + irq); + +	intc_irq_unmask(d); +	return 0; +} + +static int intc_irq_set_type(struct irq_data *d, unsigned int type) +{ +	unsigned int ebit, irq = d->irq; +	u16 pa, tb; + +	switch (type) { +	case IRQ_TYPE_EDGE_RISING: +		tb = 0x1; +		break; +	case IRQ_TYPE_EDGE_FALLING: +		tb = 0x2; +		break; +	case IRQ_TYPE_EDGE_BOTH: +		tb = 0x3; +		break; +	default: +		/* Level triggered */ +		tb = 0; +		break; +	} + +	if (tb) +		irq_set_handler(irq, handle_edge_irq); + +	ebit = irq2ebit(irq) * 2; +	pa = __raw_readw(MCFEPORT_EPPAR); +	pa = (pa & ~(0x3 << ebit)) | (tb << ebit); +	__raw_writew(pa, MCFEPORT_EPPAR); +	 +	return 0; +} + +static struct irq_chip intc_irq_chip = { +	.name		= "CF-INTC", +	.irq_startup	= intc_irq_startup, +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +}; + +static struct irq_chip intc_irq_chip_edge_port = { +	.name		= "CF-INTC-EP", +	.irq_startup	= intc_irq_startup, +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +	.irq_ack	= intc_irq_ack, +	.irq_set_type	= intc_irq_set_type, +}; + +void __init init_IRQ(void) +{ +	int irq, eirq; + +	/* Mask all interrupt sources */ +	__raw_writeb(0xff, MCFINTC0_SIMR); +	if (MCFINTC1_SIMR) +		__raw_writeb(0xff, MCFINTC1_SIMR); +	if (MCFINTC2_SIMR) +		__raw_writeb(0xff, MCFINTC2_SIMR); + +	eirq = MCFINT_VECBASE + 64 + (MCFINTC1_ICR0 ? 64 : 0) + +						(MCFINTC2_ICR0 ? 64 : 0); +	for (irq = MCFINT_VECBASE; (irq < eirq); irq++) { +		if ((irq >= EINT1) && (irq <= EINT7)) +			irq_set_chip(irq, &intc_irq_chip_edge_port); +		else +			irq_set_chip(irq, &intc_irq_chip); +		irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH); +		irq_set_handler(irq, handle_level_irq); +	} +} + diff --git a/arch/m68k/platform/coldfire/intc.c b/arch/m68k/platform/coldfire/intc.c new file mode 100644 index 00000000000..cce25742038 --- /dev/null +++ b/arch/m68k/platform/coldfire/intc.c @@ -0,0 +1,150 @@ +/* + * intc.c  -- support for the old ColdFire interrupt controller + * + * (C) Copyright 2009, Greg Ungerer <gerg@snapgear.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <asm/traps.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> + +/* + * The mapping of irq number to a mask register bit is not one-to-one. + * The irq numbers are either based on "level" of interrupt or fixed + * for an autovector-able interrupt. So we keep a local data structure + * that maps from irq to mask register. Not all interrupts will have + * an IMR bit. + */ +unsigned char mcf_irq2imr[NR_IRQS]; + +/* + * Define the miniumun and maximum external interrupt numbers. + * This is also used as the "level" interrupt numbers. + */ +#define	EIRQ1	25 +#define	EIRQ7	31 + +/* + * In the early version 2 core ColdFire parts the IMR register was 16 bits + * in size. Version 3 (and later version 2) core parts have a 32 bit + * sized IMR register. Provide some size independent methods to access the + * IMR register. + */ +#ifdef MCFSIM_IMR_IS_16BITS + +void mcf_setimr(int index) +{ +	u16 imr; +	imr = __raw_readw(MCFSIM_IMR); +	__raw_writew(imr | (0x1 << index), MCFSIM_IMR); +} + +void mcf_clrimr(int index) +{ +	u16 imr; +	imr = __raw_readw(MCFSIM_IMR); +	__raw_writew(imr & ~(0x1 << index), MCFSIM_IMR); +} + +void mcf_maskimr(unsigned int mask) +{ +	u16 imr; +	imr = __raw_readw(MCFSIM_IMR); +	imr |= mask; +	__raw_writew(imr, MCFSIM_IMR); +} + +#else + +void mcf_setimr(int index) +{ +	u32 imr; +	imr = __raw_readl(MCFSIM_IMR); +	__raw_writel(imr | (0x1 << index), MCFSIM_IMR); +} + +void mcf_clrimr(int index) +{ +	u32 imr; +	imr = __raw_readl(MCFSIM_IMR); +	__raw_writel(imr & ~(0x1 << index), MCFSIM_IMR); +} + +void mcf_maskimr(unsigned int mask) +{ +	u32 imr; +	imr = __raw_readl(MCFSIM_IMR); +	imr |= mask; +	__raw_writel(imr, MCFSIM_IMR); +} + +#endif + +/* + * Interrupts can be "vectored" on the ColdFire cores that support this old + * interrupt controller. That is, the device raising the interrupt can also + * supply the vector number to interrupt through. The AVR register of the + * interrupt controller enables or disables this for each external interrupt, + * so provide generic support for this. Setting this up is out-of-band for + * the interrupt system API's, and needs to be done by the driver that + * supports this device. Very few devices actually use this. + */ +void mcf_autovector(int irq) +{ +#ifdef MCFSIM_AVR +	if ((irq >= EIRQ1) && (irq <= EIRQ7)) { +		u8 avec; +		avec = __raw_readb(MCFSIM_AVR); +		avec |= (0x1 << (irq - EIRQ1 + 1)); +		__raw_writeb(avec, MCFSIM_AVR); +	} +#endif +} + +static void intc_irq_mask(struct irq_data *d) +{ +	if (mcf_irq2imr[d->irq]) +		mcf_setimr(mcf_irq2imr[d->irq]); +} + +static void intc_irq_unmask(struct irq_data *d) +{ +	if (mcf_irq2imr[d->irq]) +		mcf_clrimr(mcf_irq2imr[d->irq]); +} + +static int intc_irq_set_type(struct irq_data *d, unsigned int type) +{ +	return 0; +} + +static struct irq_chip intc_irq_chip = { +	.name		= "CF-INTC", +	.irq_mask	= intc_irq_mask, +	.irq_unmask	= intc_irq_unmask, +	.irq_set_type	= intc_irq_set_type, +}; + +void __init init_IRQ(void) +{ +	int irq; + +	mcf_maskimr(0xffffffff); + +	for (irq = 0; (irq < NR_IRQS); irq++) { +		irq_set_chip(irq, &intc_irq_chip); +		irq_set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH); +		irq_set_handler(irq, handle_level_irq); +	} +} + diff --git a/arch/m68k/platform/coldfire/m5206.c b/arch/m68k/platform/coldfire/m5206.c new file mode 100644 index 00000000000..0e55f449a88 --- /dev/null +++ b/arch/m68k/platform/coldfire/m5206.c @@ -0,0 +1,58 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/5206/config.c + * + *	Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) + * 	Copyright (C) 2000-2001, Lineo Inc. (www.lineo.com)  + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcftmr0, +	&clk_mcftmr1, +	&clk_mcfuart0, +	&clk_mcfuart1, +	NULL +}; + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +#if defined(CONFIG_NETtel) +	/* Copy command line from FLASH to local buffer... */ +	memcpy(commandp, (char *) 0xf0004000, size); +	commandp[size-1] = 0; +#endif /* CONFIG_NETtel */ + +	mach_sched_init = hw_timer_init; + +	/* Only support the external interrupts on their primary level */ +	mcf_mapirq2imr(25, MCFINTC_EINT1); +	mcf_mapirq2imr(28, MCFINTC_EINT4); +	mcf_mapirq2imr(31, MCFINTC_EINT7); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m520x.c b/arch/m68k/platform/coldfire/m520x.c new file mode 100644 index 00000000000..4040a3c9373 --- /dev/null +++ b/arch/m68k/platform/coldfire/m520x.c @@ -0,0 +1,180 @@ +/***************************************************************************/ + +/* + *  linux/arch/m68knommu/platform/520x/config.c + * + *  Copyright (C) 2005,      Freescale (www.freescale.com) + *  Copyright (C) 2005,      Intec Automation (mike@steroidmicros.com) + *  Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com) + *  Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(0, "flexbus", 2, MCF_CLK); +DEFINE_CLK(0, "fec.0", 12, MCF_CLK); +DEFINE_CLK(0, "edma", 17, MCF_CLK); +DEFINE_CLK(0, "intc.0", 18, MCF_CLK); +DEFINE_CLK(0, "iack.0", 21, MCF_CLK); +DEFINE_CLK(0, "mcfi2c.0", 22, MCF_CLK); +DEFINE_CLK(0, "mcfqspi.0", 23, MCF_CLK); +DEFINE_CLK(0, "mcfuart.0", 24, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.1", 25, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.2", 26, MCF_BUSCLK); +DEFINE_CLK(0, "mcftmr.0", 28, MCF_CLK); +DEFINE_CLK(0, "mcftmr.1", 29, MCF_CLK); +DEFINE_CLK(0, "mcftmr.2", 30, MCF_CLK); +DEFINE_CLK(0, "mcftmr.3", 31, MCF_CLK); + +DEFINE_CLK(0, "mcfpit.0", 32, MCF_CLK); +DEFINE_CLK(0, "mcfpit.1", 33, MCF_CLK); +DEFINE_CLK(0, "mcfeport.0", 34, MCF_CLK); +DEFINE_CLK(0, "mcfwdt.0", 35, MCF_CLK); +DEFINE_CLK(0, "pll.0", 36, MCF_CLK); +DEFINE_CLK(0, "sys.0", 40, MCF_BUSCLK); +DEFINE_CLK(0, "gpio.0", 41, MCF_BUSCLK); +DEFINE_CLK(0, "sdram.0", 42, MCF_CLK); + +struct clk *mcf_clks[] = { +	&__clk_0_2, /* flexbus */ +	&__clk_0_12, /* fec.0 */ +	&__clk_0_17, /* edma */ +	&__clk_0_18, /* intc.0 */ +	&__clk_0_21, /* iack.0 */ +	&__clk_0_22, /* mcfi2c.0 */ +	&__clk_0_23, /* mcfqspi.0 */ +	&__clk_0_24, /* mcfuart.0 */ +	&__clk_0_25, /* mcfuart.1 */ +	&__clk_0_26, /* mcfuart.2 */ +	&__clk_0_28, /* mcftmr.0 */ +	&__clk_0_29, /* mcftmr.1 */ +	&__clk_0_30, /* mcftmr.2 */ +	&__clk_0_31, /* mcftmr.3 */ + +	&__clk_0_32, /* mcfpit.0 */ +	&__clk_0_33, /* mcfpit.1 */ +	&__clk_0_34, /* mcfeport.0 */ +	&__clk_0_35, /* mcfwdt.0 */ +	&__clk_0_36, /* pll.0 */ +	&__clk_0_40, /* sys.0 */ +	&__clk_0_41, /* gpio.0 */ +	&__clk_0_42, /* sdram.0 */ +NULL, +}; + +static struct clk * const enable_clks[] __initconst = { +	&__clk_0_2, /* flexbus */ +	&__clk_0_18, /* intc.0 */ +	&__clk_0_21, /* iack.0 */ +	&__clk_0_24, /* mcfuart.0 */ +	&__clk_0_25, /* mcfuart.1 */ +	&__clk_0_26, /* mcfuart.2 */ + +	&__clk_0_32, /* mcfpit.0 */ +	&__clk_0_33, /* mcfpit.1 */ +	&__clk_0_34, /* mcfeport.0 */ +	&__clk_0_36, /* pll.0 */ +	&__clk_0_40, /* sys.0 */ +	&__clk_0_41, /* gpio.0 */ +	&__clk_0_42, /* sdram.0 */ +}; + +static struct clk * const disable_clks[] __initconst = { +	&__clk_0_12, /* fec.0 */ +	&__clk_0_17, /* edma */ +	&__clk_0_22, /* mcfi2c.0 */ +	&__clk_0_23, /* mcfqspi.0 */ +	&__clk_0_28, /* mcftmr.0 */ +	&__clk_0_29, /* mcftmr.1 */ +	&__clk_0_30, /* mcftmr.2 */ +	&__clk_0_31, /* mcftmr.3 */ +	&__clk_0_35, /* mcfwdt.0 */ +}; + + +static void __init m520x_clk_init(void) +{ +	unsigned i; + +	/* make sure these clocks are enabled */ +	for (i = 0; i < ARRAY_SIZE(enable_clks); ++i) +		__clk_init_enabled(enable_clks[i]); +	/* make sure these clocks are disabled */ +	for (i = 0; i < ARRAY_SIZE(disable_clks); ++i) +		__clk_init_disabled(disable_clks[i]); +} + +/***************************************************************************/ + +static void __init m520x_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	u16 par; +	/* setup Port QS for QSPI with gpio CS control */ +	writeb(0x3f, MCF_GPIO_PAR_QSPI); +	/* make U1CTS and U2RTS gpio for cs_control */ +	par = readw(MCF_GPIO_PAR_UART); +	par &= 0x00ff; +	writew(par, MCF_GPIO_PAR_UART); +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +/***************************************************************************/ + +static void __init m520x_uarts_init(void) +{ +	u16 par; +	u8 par2; + +	/* UART0 and UART1 GPIO pin setup */ +	par = readw(MCF_GPIO_PAR_UART); +	par |= MCF_GPIO_PAR_UART_PAR_UTXD0 | MCF_GPIO_PAR_UART_PAR_URXD0; +	par |= MCF_GPIO_PAR_UART_PAR_UTXD1 | MCF_GPIO_PAR_UART_PAR_URXD1; +	writew(par, MCF_GPIO_PAR_UART); + +	/* UART1 GPIO pin setup */ +	par2 = readb(MCF_GPIO_PAR_FECI2C); +	par2 &= ~0x0F; +	par2 |= MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 | +		MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2; +	writeb(par2, MCF_GPIO_PAR_FECI2C); +} + +/***************************************************************************/ + +static void __init m520x_fec_init(void) +{ +	u8 v; + +	/* Set multi-function pins to ethernet mode */ +	v = readb(MCF_GPIO_PAR_FEC); +	writeb(v | 0xf0, MCF_GPIO_PAR_FEC); + +	v = readb(MCF_GPIO_PAR_FECI2C); +	writeb(v | 0x0f, MCF_GPIO_PAR_FECI2C); +} + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +	mach_sched_init = hw_timer_init; +	m520x_clk_init(); +	m520x_uarts_init(); +	m520x_fec_init(); +	m520x_qspi_init(); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m523x.c b/arch/m68k/platform/coldfire/m523x.c new file mode 100644 index 00000000000..6b7135e6d5b --- /dev/null +++ b/arch/m68k/platform/coldfire/m523x.c @@ -0,0 +1,86 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/523x/config.c + * + *	Sub-architcture dependent initialization code for the Freescale + *	523x CPUs. + * + *	Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK); +DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK); +DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK); +DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); +DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); +DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcfpit0, +	&clk_mcfpit1, +	&clk_mcfpit2, +	&clk_mcfpit3, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfuart2, +	&clk_mcfqspi0, +	&clk_fec0, +	NULL +}; + +/***************************************************************************/ + +static void __init m523x_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	u16 par; + +	/* setup QSPS pins for QSPI with gpio CS control */ +	writeb(0x1f, MCFGPIO_PAR_QSPI); +	/* and CS2 & CS3 as gpio */ +	par = readw(MCFGPIO_PAR_TIMER); +	par &= 0x3f3f; +	writew(par, MCFGPIO_PAR_TIMER); +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +/***************************************************************************/ + +static void __init m523x_fec_init(void) +{ +	/* Set multi-function pins to ethernet use */ +	writeb(readb(MCFGPIO_PAR_FECI2C) | 0xf0, MCFGPIO_PAR_FECI2C); +} + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +	mach_sched_init = hw_timer_init; +	m523x_fec_init(); +	m523x_qspi_init(); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m5249.c b/arch/m68k/platform/coldfire/m5249.c new file mode 100644 index 00000000000..f6253a3313b --- /dev/null +++ b/arch/m68k/platform/coldfire/m5249.c @@ -0,0 +1,126 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/5249/config.c + * + *	Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/platform_device.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcftmr0, +	&clk_mcftmr1, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfqspi0, +	NULL +}; + +/***************************************************************************/ + +#ifdef CONFIG_M5249C3 + +static struct resource m5249_smc91x_resources[] = { +	{ +		.start		= 0xe0000300, +		.end		= 0xe0000300 + 0x100, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= MCF_IRQ_GPIO6, +		.end		= MCF_IRQ_GPIO6, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device m5249_smc91x = { +	.name			= "smc91x", +	.id			= 0, +	.num_resources		= ARRAY_SIZE(m5249_smc91x_resources), +	.resource		= m5249_smc91x_resources, +}; + +#endif /* CONFIG_M5249C3 */ + +static struct platform_device *m5249_devices[] __initdata = { +#ifdef CONFIG_M5249C3 +	&m5249_smc91x, +#endif +}; + +/***************************************************************************/ + +static void __init m5249_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	/* QSPI irq setup */ +	writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI0, +	       MCFSIM_QSPIICR); +	mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI); +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +/***************************************************************************/ + +#ifdef CONFIG_M5249C3 + +static void __init m5249_smc91x_init(void) +{ +	u32  gpio; + +	/* Set the GPIO line as interrupt source for smc91x device */ +	gpio = readl(MCFSIM2_GPIOINTENABLE); +	writel(gpio | 0x40, MCFSIM2_GPIOINTENABLE); + +	gpio = readl(MCFINTC2_INTPRI5); +	writel(gpio | 0x04000000, MCFINTC2_INTPRI5); +} + +#endif /* CONFIG_M5249C3 */ + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +	mach_sched_init = hw_timer_init; + +#ifdef CONFIG_M5249C3 +	m5249_smc91x_init(); +#endif +	m5249_qspi_init(); +} + +/***************************************************************************/ + +static int __init init_BSP(void) +{ +	platform_add_devices(m5249_devices, ARRAY_SIZE(m5249_devices)); +	return 0; +} + +arch_initcall(init_BSP); + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m525x.c b/arch/m68k/platform/coldfire/m525x.c new file mode 100644 index 00000000000..1adba390903 --- /dev/null +++ b/arch/m68k/platform/coldfire/m525x.c @@ -0,0 +1,88 @@ +/***************************************************************************/ + +/* + *	525x.c + * + *	Copyright (C) 2012, Steven King <sfking@fdwdc.com> + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/platform_device.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcftmr0, +	&clk_mcftmr1, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfqspi0, +	NULL +}; + +/***************************************************************************/ + +static void __init m525x_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	/* set the GPIO function for the qspi cs gpios */ +	/* FIXME: replace with pinmux/pinctl support */ +	u32 f = readl(MCFSIM2_GPIOFUNC); +	f |= (1 << MCFQSPI_CS2) | (1 << MCFQSPI_CS1) | (1 << MCFQSPI_CS0); +	writel(f, MCFSIM2_GPIOFUNC); + +	/* QSPI irq setup */ +	writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI0, +	       MCFSIM_QSPIICR); +	mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI); +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +static void __init m525x_i2c_init(void) +{ +#if IS_ENABLED(CONFIG_I2C_COLDFIRE) +	u32 r; + +	/* first I2C controller uses regular irq setup */ +	writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI0, +		MCFSIM_I2CICR); +	mcf_mapirq2imr(MCF_IRQ_I2C0, MCFINTC_I2C); + +	/* second I2C controller is completely different */ +	r = readl(MCFINTC2_INTPRI_REG(MCF_IRQ_I2C1)); +	r &= ~MCFINTC2_INTPRI_BITS(0xf, MCF_IRQ_I2C1); +	r |= MCFINTC2_INTPRI_BITS(0x5, MCF_IRQ_I2C1); +	writel(r, MCFINTC2_INTPRI_REG(MCF_IRQ_I2C1)); +#endif /* IS_ENABLED(CONFIG_I2C_COLDFIRE) */ +} + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +	mach_sched_init = hw_timer_init; + +	m525x_qspi_init(); +	m525x_i2c_init(); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m5272.c b/arch/m68k/platform/coldfire/m5272.c new file mode 100644 index 00000000000..8a4d3cc322c --- /dev/null +++ b/arch/m68k/platform/coldfire/m5272.c @@ -0,0 +1,135 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/5272/config.c + * + *	Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2001-2002, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/phy.h> +#include <linux/phy_fixed.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +/* + *	Some platforms need software versions of the GPIO data registers. + */ +unsigned short ppdata; +unsigned char ledbank = 0xff; + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); +DEFINE_CLK(mcftmr2, "mcftmr.2", MCF_BUSCLK); +DEFINE_CLK(mcftmr3, "mcftmr.3", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); +DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcftmr0, +	&clk_mcftmr1, +	&clk_mcftmr2, +	&clk_mcftmr3, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfqspi0, +	&clk_fec0, +	NULL +}; + +/***************************************************************************/ + +static void __init m5272_uarts_init(void) +{ +	u32 v; + +	/* Enable the output lines for the serial ports */ +	v = readl(MCFSIM_PBCNT); +	v = (v & ~0x000000ff) | 0x00000055; +	writel(v, MCFSIM_PBCNT); + +	v = readl(MCFSIM_PDCNT); +	v = (v & ~0x000003fc) | 0x000002a8; +	writel(v, MCFSIM_PDCNT); +} + +/***************************************************************************/ + +static void m5272_cpu_reset(void) +{ +	local_irq_disable(); +	/* Set watchdog to reset, and enabled */ +	__raw_writew(0, MCFSIM_WIRR); +	__raw_writew(1, MCFSIM_WRRR); +	__raw_writew(0, MCFSIM_WCR); +	for (;;) +		/* wait for watchdog to timeout */; +} + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +#if defined (CONFIG_MOD5272) +	/* Set base of device vectors to be 64 */ +	writeb(0x40, MCFSIM_PIVR); +#endif + +#if defined(CONFIG_NETtel) || defined(CONFIG_SCALES) +	/* Copy command line from FLASH to local buffer... */ +	memcpy(commandp, (char *) 0xf0004000, size); +	commandp[size-1] = 0; +#elif defined(CONFIG_CANCam) +	/* Copy command line from FLASH to local buffer... */ +	memcpy(commandp, (char *) 0xf0010000, size); +	commandp[size-1] = 0; +#endif + +	mach_reset = m5272_cpu_reset; +	mach_sched_init = hw_timer_init; +} + +/***************************************************************************/ + +/* + * Some 5272 based boards have the FEC ethernet diectly connected to + * an ethernet switch. In this case we need to use the fixed phy type, + * and we need to declare it early in boot. + */ +static struct fixed_phy_status nettel_fixed_phy_status __initdata = { +	.link	= 1, +	.speed	= 100, +	.duplex	= 0, +}; + +/***************************************************************************/ + +static int __init init_BSP(void) +{ +	m5272_uarts_init(); +	fixed_phy_add(PHY_POLL, 0, &nettel_fixed_phy_status); +	return 0; +} + +arch_initcall(init_BSP); + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m527x.c b/arch/m68k/platform/coldfire/m527x.c new file mode 100644 index 00000000000..62d81ef016f --- /dev/null +++ b/arch/m68k/platform/coldfire/m527x.c @@ -0,0 +1,126 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/527x/config.c + * + *	Sub-architcture dependent initialization code for the Freescale + *	5270/5271 CPUs. + * + *	Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK); +DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK); +DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK); +DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); +DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); +DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); +DEFINE_CLK(fec1, "fec.1", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcfpit0, +	&clk_mcfpit1, +	&clk_mcfpit2, +	&clk_mcfpit3, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfuart2, +	&clk_mcfqspi0, +	&clk_fec0, +	&clk_fec1, +	NULL +}; + +/***************************************************************************/ + +static void __init m527x_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +#if defined(CONFIG_M5271) +	u16 par; + +	/* setup QSPS pins for QSPI with gpio CS control */ +	writeb(0x1f, MCFGPIO_PAR_QSPI); +	/* and CS2 & CS3 as gpio */ +	par = readw(MCFGPIO_PAR_TIMER); +	par &= 0x3f3f; +	writew(par, MCFGPIO_PAR_TIMER); +#elif defined(CONFIG_M5275) +	/* setup QSPS pins for QSPI with gpio CS control */ +	writew(0x003e, MCFGPIO_PAR_QSPI); +#endif +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +/***************************************************************************/ + +static void __init m527x_uarts_init(void) +{ +	u16 sepmask; + +	/* +	 * External Pin Mask Setting & Enable External Pin for Interface +	 */ +	sepmask = readw(MCFGPIO_PAR_UART); +	sepmask |= UART0_ENABLE_MASK | UART1_ENABLE_MASK | UART2_ENABLE_MASK; +	writew(sepmask, MCFGPIO_PAR_UART); +} + +/***************************************************************************/ + +static void __init m527x_fec_init(void) +{ +	u16 par; +	u8 v; + +	/* Set multi-function pins to ethernet mode for fec0 */ +#if defined(CONFIG_M5271) +	v = readb(MCFGPIO_PAR_FECI2C); +	writeb(v | 0xf0, MCFGPIO_PAR_FECI2C); +#else +	par = readw(MCFGPIO_PAR_FECI2C); +	writew(par | 0xf00, MCFGPIO_PAR_FECI2C); +	v = readb(MCFGPIO_PAR_FEC0HL); +	writeb(v | 0xc0, MCFGPIO_PAR_FEC0HL); + +	/* Set multi-function pins to ethernet mode for fec1 */ +	par = readw(MCFGPIO_PAR_FECI2C); +	writew(par | 0xa0, MCFGPIO_PAR_FECI2C); +	v = readb(MCFGPIO_PAR_FEC1HL); +	writeb(v | 0xc0, MCFGPIO_PAR_FEC1HL); +#endif +} + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +	mach_sched_init = hw_timer_init; +	m527x_uarts_init(); +	m527x_fec_init(); +	m527x_qspi_init(); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m528x.c b/arch/m68k/platform/coldfire/m528x.c new file mode 100644 index 00000000000..21cd161d36f --- /dev/null +++ b/arch/m68k/platform/coldfire/m528x.c @@ -0,0 +1,132 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/528x/config.c + * + *	Sub-architcture dependent initialization code for the Freescale + *	5280, 5281 and 5282 CPUs. + * + *	Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK); +DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK); +DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK); +DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); +DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); +DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcfpit0, +	&clk_mcfpit1, +	&clk_mcfpit2, +	&clk_mcfpit3, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfuart2, +	&clk_mcfqspi0, +	&clk_fec0, +	NULL +}; + +/***************************************************************************/ + +static void __init m528x_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	/* setup Port QS for QSPI with gpio CS control */ +	__raw_writeb(0x07, MCFGPIO_PQSPAR); +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +/***************************************************************************/ + +static void __init m528x_uarts_init(void) +{ +	u8 port; + +	/* make sure PUAPAR is set for UART0 and UART1 */ +	port = readb(MCFGPIO_PUAPAR); +	port |= 0x03 | (0x03 << 2); +	writeb(port, MCFGPIO_PUAPAR); +} + +/***************************************************************************/ + +static void __init m528x_fec_init(void) +{ +	u16 v16; + +	/* Set multi-function pins to ethernet mode for fec0 */ +	v16 = readw(MCFGPIO_PASPAR); +	writew(v16 | 0xf00, MCFGPIO_PASPAR); +	writeb(0xc0, MCFGPIO_PEHLPAR); +} + +/***************************************************************************/ + +#ifdef CONFIG_WILDFIRE +void wildfire_halt(void) +{ +	writeb(0, 0x30000007); +	writeb(0x2, 0x30000007); +} +#endif + +#ifdef CONFIG_WILDFIREMOD +void wildfiremod_halt(void) +{ +	printk(KERN_INFO "WildFireMod hibernating...\n"); + +	/* Set portE.5 to Digital IO */ +	MCF5282_GPIO_PEPAR &= ~(1 << (5 * 2)); + +	/* Make portE.5 an output */ +	MCF5282_GPIO_DDRE |= (1 << 5); + +	/* Now toggle portE.5 from low to high */ +	MCF5282_GPIO_PORTE &= ~(1 << 5); +	MCF5282_GPIO_PORTE |= (1 << 5); + +	printk(KERN_EMERG "Failed to hibernate. Halting!\n"); +} +#endif + +void __init config_BSP(char *commandp, int size) +{ +#ifdef CONFIG_WILDFIRE +	mach_halt = wildfire_halt; +#endif +#ifdef CONFIG_WILDFIREMOD +	mach_halt = wildfiremod_halt; +#endif +	mach_sched_init = hw_timer_init; +	m528x_uarts_init(); +	m528x_fec_init(); +	m528x_qspi_init(); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m5307.c b/arch/m68k/platform/coldfire/m5307.c new file mode 100644 index 00000000000..88743536138 --- /dev/null +++ b/arch/m68k/platform/coldfire/m5307.c @@ -0,0 +1,78 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/5307/config.c + * + *	Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2000, Lineo (www.lineo.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfwdebug.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +/* + *	Some platforms need software versions of the GPIO data registers. + */ +unsigned short ppdata; +unsigned char ledbank = 0xff; + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcftmr0, +	&clk_mcftmr1, +	&clk_mcfuart0, +	&clk_mcfuart1, +	NULL +}; + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +#if defined(CONFIG_NETtel) || \ +    defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA) +	/* Copy command line from FLASH to local buffer... */ +	memcpy(commandp, (char *) 0xf0004000, size); +	commandp[size-1] = 0; +#endif + +	mach_sched_init = hw_timer_init; + +	/* Only support the external interrupts on their primary level */ +	mcf_mapirq2imr(25, MCFINTC_EINT1); +	mcf_mapirq2imr(27, MCFINTC_EINT3); +	mcf_mapirq2imr(29, MCFINTC_EINT5); +	mcf_mapirq2imr(31, MCFINTC_EINT7); + +#ifdef CONFIG_BDM_DISABLE +	/* +	 * Disable the BDM clocking.  This also turns off most of the rest of +	 * the BDM device.  This is good for EMC reasons. This option is not +	 * incompatible with the memory protection option. +	 */ +	wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK); +#endif +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m53xx.c b/arch/m68k/platform/coldfire/m53xx.c new file mode 100644 index 00000000000..80879a7fe3d --- /dev/null +++ b/arch/m68k/platform/coldfire/m53xx.c @@ -0,0 +1,588 @@ +/***************************************************************************/ + +/* + *	m53xx.c -- platform support for ColdFire 53xx based boards + * + *	Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2000, Lineo (www.lineo.com) + *	Yaroslav Vinogradov yaroslav.vinogradov@freescale.com + *	Copyright Freescale Semiconductor, Inc 2006 + *	Copyright (c) 2006, emlix, Sebastian Hess <shess@hessware.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfdma.h> +#include <asm/mcfwdebug.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(0, "flexbus", 2, MCF_CLK); +DEFINE_CLK(0, "mcfcan.0", 8, MCF_CLK); +DEFINE_CLK(0, "fec.0", 12, MCF_CLK); +DEFINE_CLK(0, "edma", 17, MCF_CLK); +DEFINE_CLK(0, "intc.0", 18, MCF_CLK); +DEFINE_CLK(0, "intc.1", 19, MCF_CLK); +DEFINE_CLK(0, "iack.0", 21, MCF_CLK); +DEFINE_CLK(0, "mcfi2c.0", 22, MCF_CLK); +DEFINE_CLK(0, "mcfqspi.0", 23, MCF_CLK); +DEFINE_CLK(0, "mcfuart.0", 24, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.1", 25, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.2", 26, MCF_BUSCLK); +DEFINE_CLK(0, "mcftmr.0", 28, MCF_CLK); +DEFINE_CLK(0, "mcftmr.1", 29, MCF_CLK); +DEFINE_CLK(0, "mcftmr.2", 30, MCF_CLK); +DEFINE_CLK(0, "mcftmr.3", 31, MCF_CLK); + +DEFINE_CLK(0, "mcfpit.0", 32, MCF_CLK); +DEFINE_CLK(0, "mcfpit.1", 33, MCF_CLK); +DEFINE_CLK(0, "mcfpit.2", 34, MCF_CLK); +DEFINE_CLK(0, "mcfpit.3", 35, MCF_CLK); +DEFINE_CLK(0, "mcfpwm.0", 36, MCF_CLK); +DEFINE_CLK(0, "mcfeport.0", 37, MCF_CLK); +DEFINE_CLK(0, "mcfwdt.0", 38, MCF_CLK); +DEFINE_CLK(0, "sys.0", 40, MCF_BUSCLK); +DEFINE_CLK(0, "gpio.0", 41, MCF_BUSCLK); +DEFINE_CLK(0, "mcfrtc.0", 42, MCF_CLK); +DEFINE_CLK(0, "mcflcd.0", 43, MCF_CLK); +DEFINE_CLK(0, "mcfusb-otg.0", 44, MCF_CLK); +DEFINE_CLK(0, "mcfusb-host.0", 45, MCF_CLK); +DEFINE_CLK(0, "sdram.0", 46, MCF_CLK); +DEFINE_CLK(0, "ssi.0", 47, MCF_CLK); +DEFINE_CLK(0, "pll.0", 48, MCF_CLK); + +DEFINE_CLK(1, "mdha.0", 32, MCF_CLK); +DEFINE_CLK(1, "skha.0", 33, MCF_CLK); +DEFINE_CLK(1, "rng.0", 34, MCF_CLK); + +struct clk *mcf_clks[] = { +	&__clk_0_2,	/* flexbus */ +	&__clk_0_8,	/* mcfcan.0 */ +	&__clk_0_12,	/* fec.0 */ +	&__clk_0_17,	/* edma */ +	&__clk_0_18,	/* intc.0 */ +	&__clk_0_19,	/* intc.1 */ +	&__clk_0_21,	/* iack.0 */ +	&__clk_0_22,	/* mcfi2c.0 */ +	&__clk_0_23,	/* mcfqspi.0 */ +	&__clk_0_24,	/* mcfuart.0 */ +	&__clk_0_25,	/* mcfuart.1 */ +	&__clk_0_26,	/* mcfuart.2 */ +	&__clk_0_28,	/* mcftmr.0 */ +	&__clk_0_29,	/* mcftmr.1 */ +	&__clk_0_30,	/* mcftmr.2 */ +	&__clk_0_31,	/* mcftmr.3 */ + +	&__clk_0_32,	/* mcfpit.0 */ +	&__clk_0_33,	/* mcfpit.1 */ +	&__clk_0_34,	/* mcfpit.2 */ +	&__clk_0_35,	/* mcfpit.3 */ +	&__clk_0_36,	/* mcfpwm.0 */ +	&__clk_0_37,	/* mcfeport.0 */ +	&__clk_0_38,	/* mcfwdt.0 */ +	&__clk_0_40,	/* sys.0 */ +	&__clk_0_41,	/* gpio.0 */ +	&__clk_0_42,	/* mcfrtc.0 */ +	&__clk_0_43,	/* mcflcd.0 */ +	&__clk_0_44,	/* mcfusb-otg.0 */ +	&__clk_0_45,	/* mcfusb-host.0 */ +	&__clk_0_46,	/* sdram.0 */ +	&__clk_0_47,	/* ssi.0 */ +	&__clk_0_48,	/* pll.0 */ + +	&__clk_1_32,	/* mdha.0 */ +	&__clk_1_33,	/* skha.0 */ +	&__clk_1_34,	/* rng.0 */ +	NULL, +}; + +static struct clk * const enable_clks[] __initconst = { +	&__clk_0_2,	/* flexbus */ +	&__clk_0_18,	/* intc.0 */ +	&__clk_0_19,	/* intc.1 */ +	&__clk_0_21,	/* iack.0 */ +	&__clk_0_24,	/* mcfuart.0 */ +	&__clk_0_25,	/* mcfuart.1 */ +	&__clk_0_26,	/* mcfuart.2 */ +	&__clk_0_28,	/* mcftmr.0 */ +	&__clk_0_29,	/* mcftmr.1 */ +	&__clk_0_32,	/* mcfpit.0 */ +	&__clk_0_33,	/* mcfpit.1 */ +	&__clk_0_37,	/* mcfeport.0 */ +	&__clk_0_40,	/* sys.0 */ +	&__clk_0_41,	/* gpio.0 */ +	&__clk_0_46,	/* sdram.0 */ +	&__clk_0_48,	/* pll.0 */ +}; + +static struct clk * const disable_clks[] __initconst = { +	&__clk_0_8,	/* mcfcan.0 */ +	&__clk_0_12,	/* fec.0 */ +	&__clk_0_17,	/* edma */ +	&__clk_0_22,	/* mcfi2c.0 */ +	&__clk_0_23,	/* mcfqspi.0 */ +	&__clk_0_30,	/* mcftmr.2 */ +	&__clk_0_31,	/* mcftmr.3 */ +	&__clk_0_34,	/* mcfpit.2 */ +	&__clk_0_35,	/* mcfpit.3 */ +	&__clk_0_36,	/* mcfpwm.0 */ +	&__clk_0_38,	/* mcfwdt.0 */ +	&__clk_0_42,	/* mcfrtc.0 */ +	&__clk_0_43,	/* mcflcd.0 */ +	&__clk_0_44,	/* mcfusb-otg.0 */ +	&__clk_0_45,	/* mcfusb-host.0 */ +	&__clk_0_47,	/* ssi.0 */ +	&__clk_1_32,	/* mdha.0 */ +	&__clk_1_33,	/* skha.0 */ +	&__clk_1_34,	/* rng.0 */ +}; + + +static void __init m53xx_clk_init(void) +{ +	unsigned i; + +	/* make sure these clocks are enabled */ +	for (i = 0; i < ARRAY_SIZE(enable_clks); ++i) +		__clk_init_enabled(enable_clks[i]); +	/* make sure these clocks are disabled */ +	for (i = 0; i < ARRAY_SIZE(disable_clks); ++i) +		__clk_init_disabled(disable_clks[i]); +} + +/***************************************************************************/ + +static void __init m53xx_qspi_init(void) +{ +#if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) +	/* setup QSPS pins for QSPI with gpio CS control */ +	writew(0x01f0, MCFGPIO_PAR_QSPI); +#endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ +} + +/***************************************************************************/ + +static void __init m53xx_uarts_init(void) +{ +	/* UART GPIO initialization */ +	writew(readw(MCFGPIO_PAR_UART) | 0x0FFF, MCFGPIO_PAR_UART); +} + +/***************************************************************************/ + +static void __init m53xx_fec_init(void) +{ +	u8 v; + +	/* Set multi-function pins to ethernet mode for fec0 */ +	v = readb(MCFGPIO_PAR_FECI2C); +	v |= MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC | +		MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO; +	writeb(v, MCFGPIO_PAR_FECI2C); + +	v = readb(MCFGPIO_PAR_FEC); +	v = MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC | MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC; +	writeb(v, MCFGPIO_PAR_FEC); +} + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +#if !defined(CONFIG_BOOTPARAM) +	/* Copy command line from FLASH to local buffer... */ +	memcpy(commandp, (char *) 0x4000, 4); +	if(strncmp(commandp, "kcl ", 4) == 0){ +		memcpy(commandp, (char *) 0x4004, size); +		commandp[size-1] = 0; +	} else { +		memset(commandp, 0, size); +	} +#endif +	mach_sched_init = hw_timer_init; +	m53xx_clk_init(); +	m53xx_uarts_init(); +	m53xx_fec_init(); +	m53xx_qspi_init(); + +#ifdef CONFIG_BDM_DISABLE +	/* +	 * Disable the BDM clocking.  This also turns off most of the rest of +	 * the BDM device.  This is good for EMC reasons. This option is not +	 * incompatible with the memory protection option. +	 */ +	wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK); +#endif +} + +/***************************************************************************/ +/* Board initialization */ +/***************************************************************************/ +/*  + * PLL min/max specifications + */ +#define MAX_FVCO	500000	/* KHz */ +#define MAX_FSYS	80000 	/* KHz */ +#define MIN_FSYS	58333 	/* KHz */ +#define FREF		16000   /* KHz */ + + +#define MAX_MFD		135     /* Multiplier */ +#define MIN_MFD		88      /* Multiplier */ +#define BUSDIV		6       /* Divider */ + +/* + * Low Power Divider specifications + */ +#define MIN_LPD		(1 << 0)    /* Divider (not encoded) */ +#define MAX_LPD		(1 << 15)   /* Divider (not encoded) */ +#define DEFAULT_LPD	(1 << 1)	/* Divider (not encoded) */ + +#define SYS_CLK_KHZ	80000 +#define SYSTEM_PERIOD	12.5 +/* + *  SDRAM Timing Parameters + */   +#define SDRAM_BL	8	/* # of beats in a burst */ +#define SDRAM_TWR	2	/* in clocks */ +#define SDRAM_CASL	2.5	/* CASL in clocks */ +#define SDRAM_TRCD	2	/* in clocks */ +#define SDRAM_TRP	2	/* in clocks */ +#define SDRAM_TRFC	7	/* in clocks */ +#define SDRAM_TREFI	7800	/* in ns */ + +#define EXT_SRAM_ADDRESS	(0xC0000000) +#define FLASH_ADDRESS		(0x00000000) +#define SDRAM_ADDRESS		(0x40000000) + +#define NAND_FLASH_ADDRESS	(0xD0000000) + +int sys_clk_khz = 0; +int sys_clk_mhz = 0; + +void wtm_init(void); +void scm_init(void); +void gpio_init(void); +void fbcs_init(void); +void sdramc_init(void); +int  clock_pll (int fsys, int flags); +int  clock_limp (int); +int  clock_exit_limp (void); +int  get_sys_clock (void); + +asmlinkage void __init sysinit(void) +{ +	sys_clk_khz = clock_pll(0, 0); +	sys_clk_mhz = sys_clk_khz/1000; +	 +	wtm_init(); +	scm_init(); +	gpio_init(); +	fbcs_init(); +	sdramc_init(); +} + +void wtm_init(void) +{ +	/* Disable watchdog timer */ +	writew(0, MCF_WTM_WCR); +} + +#define MCF_SCM_BCR_GBW		(0x00000100) +#define MCF_SCM_BCR_GBR		(0x00000200) + +void scm_init(void) +{ +	/* All masters are trusted */ +	writel(0x77777777, MCF_SCM_MPR); +     +	/* Allow supervisor/user, read/write, and trusted/untrusted +	   access to all slaves */ +	writel(0, MCF_SCM_PACRA); +	writel(0, MCF_SCM_PACRB); +	writel(0, MCF_SCM_PACRC); +	writel(0, MCF_SCM_PACRD); +	writel(0, MCF_SCM_PACRE); +	writel(0, MCF_SCM_PACRF); + +	/* Enable bursts */ +	writel(MCF_SCM_BCR_GBR | MCF_SCM_BCR_GBW, MCF_SCM_BCR); +} + + +void fbcs_init(void) +{ +	writeb(0x3E, MCFGPIO_PAR_CS); + +	/* Latch chip select */ +	writel(0x10080000, MCF_FBCS1_CSAR); + +	writel(0x002A3780, MCF_FBCS1_CSCR); +	writel(MCF_FBCS_CSMR_BAM_2M | MCF_FBCS_CSMR_V, MCF_FBCS1_CSMR); + +	/* Initialize latch to drive signals to inactive states */ +	writew(0xffff, 0x10080000); + +	/* External SRAM */ +	writel(EXT_SRAM_ADDRESS, MCF_FBCS1_CSAR); +	writel(MCF_FBCS_CSCR_PS_16 | +		MCF_FBCS_CSCR_AA | +		MCF_FBCS_CSCR_SBM | +		MCF_FBCS_CSCR_WS(1), +		MCF_FBCS1_CSCR); +	writel(MCF_FBCS_CSMR_BAM_512K | MCF_FBCS_CSMR_V, MCF_FBCS1_CSMR); + +	/* Boot Flash connected to FBCS0 */ +	writel(FLASH_ADDRESS, MCF_FBCS0_CSAR); +	writel(MCF_FBCS_CSCR_PS_16 | +		MCF_FBCS_CSCR_BEM | +		MCF_FBCS_CSCR_AA | +		MCF_FBCS_CSCR_SBM | +		MCF_FBCS_CSCR_WS(7), +		MCF_FBCS0_CSCR); +	writel(MCF_FBCS_CSMR_BAM_32M | MCF_FBCS_CSMR_V, MCF_FBCS0_CSMR); +} + +void sdramc_init(void) +{ +	/* +	 * Check to see if the SDRAM has already been initialized +	 * by a run control tool +	 */ +	if (!(readl(MCF_SDRAMC_SDCR) & MCF_SDRAMC_SDCR_REF)) { +		/* SDRAM chip select initialization */ +		 +		/* Initialize SDRAM chip select */ +		writel(MCF_SDRAMC_SDCS_BA(SDRAM_ADDRESS) | +			MCF_SDRAMC_SDCS_CSSZ(MCF_SDRAMC_SDCS_CSSZ_32MBYTE), +			MCF_SDRAMC_SDCS0); + +	/* +	 * Basic configuration and initialization +	 */ +	writel(MCF_SDRAMC_SDCFG1_SRD2RW((int)((SDRAM_CASL + 2) + 0.5)) | +		MCF_SDRAMC_SDCFG1_SWT2RD(SDRAM_TWR + 1) | +		MCF_SDRAMC_SDCFG1_RDLAT((int)((SDRAM_CASL * 2) + 2)) | +		MCF_SDRAMC_SDCFG1_ACT2RW((int)(SDRAM_TRCD + 0.5)) | +		MCF_SDRAMC_SDCFG1_PRE2ACT((int)(SDRAM_TRP + 0.5)) | +		MCF_SDRAMC_SDCFG1_REF2ACT((int)(SDRAM_TRFC + 0.5)) | +		MCF_SDRAMC_SDCFG1_WTLAT(3), +		MCF_SDRAMC_SDCFG1); +	writel(MCF_SDRAMC_SDCFG2_BRD2PRE(SDRAM_BL / 2 + 1) | +		MCF_SDRAMC_SDCFG2_BWT2RW(SDRAM_BL / 2 + SDRAM_TWR) | +		MCF_SDRAMC_SDCFG2_BRD2WT((int)((SDRAM_CASL + SDRAM_BL / 2 - 1.0) + 0.5)) | +		MCF_SDRAMC_SDCFG2_BL(SDRAM_BL - 1), +		MCF_SDRAMC_SDCFG2); + +             +	/* +	 * Precharge and enable write to SDMR +	 */ +	writel(MCF_SDRAMC_SDCR_MODE_EN | +		MCF_SDRAMC_SDCR_CKE | +		MCF_SDRAMC_SDCR_DDR | +		MCF_SDRAMC_SDCR_MUX(1) | +		MCF_SDRAMC_SDCR_RCNT((int)(((SDRAM_TREFI / (SYSTEM_PERIOD * 64)) - 1) + 0.5)) | +		MCF_SDRAMC_SDCR_PS_16 | +		MCF_SDRAMC_SDCR_IPALL, +		MCF_SDRAMC_SDCR); + +	/* +	 * Write extended mode register +	 */ +	writel(MCF_SDRAMC_SDMR_BNKAD_LEMR | +		MCF_SDRAMC_SDMR_AD(0x0) | +		MCF_SDRAMC_SDMR_CMD, +		MCF_SDRAMC_SDMR); + +	/* +	 * Write mode register and reset DLL +	 */ +	writel(MCF_SDRAMC_SDMR_BNKAD_LMR | +		MCF_SDRAMC_SDMR_AD(0x163) | +		MCF_SDRAMC_SDMR_CMD, +		MCF_SDRAMC_SDMR); + +	/* +	 * Execute a PALL command +	 */ +	writel(readl(MCF_SDRAMC_SDCR) | MCF_SDRAMC_SDCR_IPALL, MCF_SDRAMC_SDCR); + +	/* +	 * Perform two REF cycles +	 */ +	writel(readl(MCF_SDRAMC_SDCR) | MCF_SDRAMC_SDCR_IREF, MCF_SDRAMC_SDCR); +	writel(readl(MCF_SDRAMC_SDCR) | MCF_SDRAMC_SDCR_IREF, MCF_SDRAMC_SDCR); + +	/* +	 * Write mode register and clear reset DLL +	 */ +	writel(MCF_SDRAMC_SDMR_BNKAD_LMR | +		MCF_SDRAMC_SDMR_AD(0x063) | +		MCF_SDRAMC_SDMR_CMD, +		MCF_SDRAMC_SDMR); +				 +	/* +	 * Enable auto refresh and lock SDMR +	 */ +	writel(readl(MCF_SDRAMC_SDCR) & ~MCF_SDRAMC_SDCR_MODE_EN, +		MCF_SDRAMC_SDCR); +	writel(MCF_SDRAMC_SDCR_REF | MCF_SDRAMC_SDCR_DQS_OE(0xC), +		MCF_SDRAMC_SDCR); +	} +} + +void gpio_init(void) +{ +	/* Enable UART0 pins */ +	writew(MCF_GPIO_PAR_UART_PAR_URXD0 | MCF_GPIO_PAR_UART_PAR_UTXD0, +		MCFGPIO_PAR_UART); + +	/* +	 * Initialize TIN3 as a GPIO output to enable the write +	 * half of the latch. +	 */ +	writeb(0x00, MCFGPIO_PAR_TIMER); +	writeb(0x08, MCFGPIO_PDDR_TIMER); +	writeb(0x00, MCFGPIO_PCLRR_TIMER); +} + +int clock_pll(int fsys, int flags) +{ +	int fref, temp, fout, mfd; +	u32 i; + +	fref = FREF; +         +	if (fsys == 0) { +		/* Return current PLL output */ +		mfd = readb(MCF_PLL_PFDR); + +		return (fref * mfd / (BUSDIV * 4)); +	} + +	/* Check bounds of requested system clock */ +	if (fsys > MAX_FSYS) +		fsys = MAX_FSYS; +	if (fsys < MIN_FSYS) +		fsys = MIN_FSYS; + +	/* Multiplying by 100 when calculating the temp value, +	   and then dividing by 100 to calculate the mfd allows +	   for exact values without needing to include floating +	   point libraries. */ +	temp = 100 * fsys / fref; +	mfd = 4 * BUSDIV * temp / 100; +    	    	    	 +	/* Determine the output frequency for selected values */ +	fout = (fref * mfd / (BUSDIV * 4)); + +	/* +	 * Check to see if the SDRAM has already been initialized. +	 * If it has then the SDRAM needs to be put into self refresh +	 * mode before reprogramming the PLL. +	 */ +	if (readl(MCF_SDRAMC_SDCR) & MCF_SDRAMC_SDCR_REF) +		/* Put SDRAM into self refresh mode */ +		writel(readl(MCF_SDRAMC_SDCR) & ~MCF_SDRAMC_SDCR_CKE, +			MCF_SDRAMC_SDCR); + +	/* +	 * Initialize the PLL to generate the new system clock frequency. +	 * The device must be put into LIMP mode to reprogram the PLL. +	 */ + +	/* Enter LIMP mode */ +	clock_limp(DEFAULT_LPD); +     					 +	/* Reprogram PLL for desired fsys */ +	writeb(MCF_PLL_PODR_CPUDIV(BUSDIV/3) | MCF_PLL_PODR_BUSDIV(BUSDIV), +		MCF_PLL_PODR); +						 +	writeb(mfd, MCF_PLL_PFDR); +		 +	/* Exit LIMP mode */ +	clock_exit_limp(); +	 +	/* +	 * Return the SDRAM to normal operation if it is in use. +	 */ +	if (readl(MCF_SDRAMC_SDCR) & MCF_SDRAMC_SDCR_REF) +		/* Exit self refresh mode */ +		writel(readl(MCF_SDRAMC_SDCR) | MCF_SDRAMC_SDCR_CKE, +			MCF_SDRAMC_SDCR); + +	/* Errata - workaround for SDRAM opeartion after exiting LIMP mode */ +	writel(MCF_SDRAMC_REFRESH, MCF_SDRAMC_LIMP_FIX); + +	/* wait for DQS logic to relock */ +	for (i = 0; i < 0x200; i++) +		; + +	return fout; +} + +int clock_limp(int div) +{ +	u32 temp; + +	/* Check bounds of divider */ +	if (div < MIN_LPD) +		div = MIN_LPD; +	if (div > MAX_LPD) +		div = MAX_LPD; +     +	/* Save of the current value of the SSIDIV so we don't +	   overwrite the value*/ +	temp = readw(MCF_CCM_CDR) & MCF_CCM_CDR_SSIDIV(0xF); +       +	/* Apply the divider to the system clock */ +	writew(MCF_CCM_CDR_LPDIV(div) | MCF_CCM_CDR_SSIDIV(temp), MCF_CCM_CDR); +     +	writew(readw(MCF_CCM_MISCCR) | MCF_CCM_MISCCR_LIMP, MCF_CCM_MISCCR); +     +	return (FREF/(3*(1 << div))); +} + +int clock_exit_limp(void) +{ +	int fout; +	 +	/* Exit LIMP mode */ +	writew(readw(MCF_CCM_MISCCR) & ~MCF_CCM_MISCCR_LIMP, MCF_CCM_MISCCR); + +	/* Wait for PLL to lock */ +	while (!(readw(MCF_CCM_MISCCR) & MCF_CCM_MISCCR_PLL_LOCK)) +		; +	 +	fout = get_sys_clock(); + +	return fout; +} + +int get_sys_clock(void) +{ +	int divider; +	 +	/* Test to see if device is in LIMP mode */ +	if (readw(MCF_CCM_MISCCR) & MCF_CCM_MISCCR_LIMP) { +		divider = readw(MCF_CCM_CDR) & MCF_CCM_CDR_LPDIV(0xF); +		return (FREF/(2 << divider)); +	} +	else +		return (FREF * readb(MCF_PLL_PFDR)) / (BUSDIV * 4); +} diff --git a/arch/m68k/platform/coldfire/m5407.c b/arch/m68k/platform/coldfire/m5407.c new file mode 100644 index 00000000000..2fb3cdbfde3 --- /dev/null +++ b/arch/m68k/platform/coldfire/m5407.c @@ -0,0 +1,53 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/5407/config.c + * + *	Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2000, Lineo (www.lineo.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfclk.h> + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); +DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcftmr0, +	&clk_mcftmr1, +	&clk_mcfuart0, +	&clk_mcfuart1, +	NULL +}; + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +	mach_sched_init = hw_timer_init; + +	/* Only support the external interrupts on their primary level */ +	mcf_mapirq2imr(25, MCFINTC_EINT1); +	mcf_mapirq2imr(27, MCFINTC_EINT3); +	mcf_mapirq2imr(29, MCFINTC_EINT5); +	mcf_mapirq2imr(31, MCFINTC_EINT7); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/m5441x.c b/arch/m68k/platform/coldfire/m5441x.c new file mode 100644 index 00000000000..98a13cce93d --- /dev/null +++ b/arch/m68k/platform/coldfire/m5441x.c @@ -0,0 +1,261 @@ +/* + *	m5441x.c -- support for Coldfire m5441x processors + * + *	(C) Copyright Steven King <sfking@fdwdc.com> + */ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/clk.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfdma.h> +#include <asm/mcfclk.h> + +DEFINE_CLK(0, "flexbus", 2, MCF_CLK); +DEFINE_CLK(0, "mcfcan.0", 8, MCF_CLK); +DEFINE_CLK(0, "mcfcan.1", 9, MCF_CLK); +DEFINE_CLK(0, "mcfi2c.1", 14, MCF_CLK); +DEFINE_CLK(0, "mcfdspi.1", 15, MCF_CLK); +DEFINE_CLK(0, "edma", 17, MCF_CLK); +DEFINE_CLK(0, "intc.0", 18, MCF_CLK); +DEFINE_CLK(0, "intc.1", 19, MCF_CLK); +DEFINE_CLK(0, "intc.2", 20, MCF_CLK); +DEFINE_CLK(0, "mcfi2c.0", 22, MCF_CLK); +DEFINE_CLK(0, "mcfdspi.0", 23, MCF_CLK); +DEFINE_CLK(0, "mcfuart.0", 24, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.1", 25, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.2", 26, MCF_BUSCLK); +DEFINE_CLK(0, "mcfuart.3", 27, MCF_BUSCLK); +DEFINE_CLK(0, "mcftmr.0", 28, MCF_CLK); +DEFINE_CLK(0, "mcftmr.1", 29, MCF_CLK); +DEFINE_CLK(0, "mcftmr.2", 30, MCF_CLK); +DEFINE_CLK(0, "mcftmr.3", 31, MCF_CLK); +DEFINE_CLK(0, "mcfpit.0", 32, MCF_CLK); +DEFINE_CLK(0, "mcfpit.1", 33, MCF_CLK); +DEFINE_CLK(0, "mcfpit.2", 34, MCF_CLK); +DEFINE_CLK(0, "mcfpit.3", 35, MCF_CLK); +DEFINE_CLK(0, "mcfeport.0", 37, MCF_CLK); +DEFINE_CLK(0, "mcfadc.0", 38, MCF_CLK); +DEFINE_CLK(0, "mcfdac.0", 39, MCF_CLK); +DEFINE_CLK(0, "mcfrtc.0", 42, MCF_CLK); +DEFINE_CLK(0, "mcfsim.0", 43, MCF_CLK); +DEFINE_CLK(0, "mcfusb-otg.0", 44, MCF_CLK); +DEFINE_CLK(0, "mcfusb-host.0", 45, MCF_CLK); +DEFINE_CLK(0, "mcfddr-sram.0", 46, MCF_CLK); +DEFINE_CLK(0, "mcfssi.0", 47, MCF_CLK); +DEFINE_CLK(0, "pll.0", 48, MCF_CLK); +DEFINE_CLK(0, "mcfrng.0", 49, MCF_CLK); +DEFINE_CLK(0, "mcfssi.1", 50, MCF_CLK); +DEFINE_CLK(0, "mcfsdhc.0", 51, MCF_CLK); +DEFINE_CLK(0, "enet-fec.0", 53, MCF_CLK); +DEFINE_CLK(0, "enet-fec.1", 54, MCF_CLK); +DEFINE_CLK(0, "switch.0", 55, MCF_CLK); +DEFINE_CLK(0, "switch.1", 56, MCF_CLK); +DEFINE_CLK(0, "nand.0", 63, MCF_CLK); + +DEFINE_CLK(1, "mcfow.0", 2, MCF_CLK); +DEFINE_CLK(1, "mcfi2c.2", 4, MCF_CLK); +DEFINE_CLK(1, "mcfi2c.3", 5, MCF_CLK); +DEFINE_CLK(1, "mcfi2c.4", 6, MCF_CLK); +DEFINE_CLK(1, "mcfi2c.5", 7, MCF_CLK); +DEFINE_CLK(1, "mcfuart.4", 24, MCF_BUSCLK); +DEFINE_CLK(1, "mcfuart.5", 25, MCF_BUSCLK); +DEFINE_CLK(1, "mcfuart.6", 26, MCF_BUSCLK); +DEFINE_CLK(1, "mcfuart.7", 27, MCF_BUSCLK); +DEFINE_CLK(1, "mcfuart.8", 28, MCF_BUSCLK); +DEFINE_CLK(1, "mcfuart.9", 29, MCF_BUSCLK); +DEFINE_CLK(1, "mcfpwm.0", 34, MCF_BUSCLK); +DEFINE_CLK(1, "sys.0", 36, MCF_BUSCLK); +DEFINE_CLK(1, "gpio.0", 37, MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&__clk_0_2, +	&__clk_0_8, +	&__clk_0_9, +	&__clk_0_14, +	&__clk_0_15, +	&__clk_0_17, +	&__clk_0_18, +	&__clk_0_19, +	&__clk_0_20, +	&__clk_0_22, +	&__clk_0_23, +	&__clk_0_24, +	&__clk_0_25, +	&__clk_0_26, +	&__clk_0_27, +	&__clk_0_28, +	&__clk_0_29, +	&__clk_0_30, +	&__clk_0_31, +	&__clk_0_32, +	&__clk_0_33, +	&__clk_0_34, +	&__clk_0_35, +	&__clk_0_37, +	&__clk_0_38, +	&__clk_0_39, +	&__clk_0_42, +	&__clk_0_43, +	&__clk_0_44, +	&__clk_0_45, +	&__clk_0_46, +	&__clk_0_47, +	&__clk_0_48, +	&__clk_0_49, +	&__clk_0_50, +	&__clk_0_51, +	&__clk_0_53, +	&__clk_0_54, +	&__clk_0_55, +	&__clk_0_56, +	&__clk_0_63, + +	&__clk_1_2, +	&__clk_1_4, +	&__clk_1_5, +	&__clk_1_6, +	&__clk_1_7, +	&__clk_1_24, +	&__clk_1_25, +	&__clk_1_26, +	&__clk_1_27, +	&__clk_1_28, +	&__clk_1_29, +	&__clk_1_34, +	&__clk_1_36, +	&__clk_1_37, +	NULL, +}; + + +static struct clk * const enable_clks[] __initconst = { +	/* make sure these clocks are enabled */ +	&__clk_0_18, /* intc0 */ +	&__clk_0_19, /* intc0 */ +	&__clk_0_20, /* intc0 */ +	&__clk_0_24, /* uart0 */ +	&__clk_0_25, /* uart1 */ +	&__clk_0_26, /* uart2 */ +	&__clk_0_27, /* uart3 */ + +	&__clk_0_33, /* pit.1 */ +	&__clk_0_37, /* eport */ +	&__clk_0_48, /* pll */ + +	&__clk_1_36, /* CCM/reset module/Power management */ +	&__clk_1_37, /* gpio */ +}; +static struct clk * const disable_clks[] __initconst = { +	&__clk_0_8, /* can.0 */ +	&__clk_0_9, /* can.1 */ +	&__clk_0_14, /* i2c.1 */ +	&__clk_0_15, /* dspi.1 */ +	&__clk_0_17, /* eDMA */ +	&__clk_0_22, /* i2c.0 */ +	&__clk_0_23, /* dspi.0 */ +	&__clk_0_28, /* tmr.1 */ +	&__clk_0_29, /* tmr.2 */ +	&__clk_0_30, /* tmr.2 */ +	&__clk_0_31, /* tmr.3 */ +	&__clk_0_32, /* pit.0 */ +	&__clk_0_34, /* pit.2 */ +	&__clk_0_35, /* pit.3 */ +	&__clk_0_38, /* adc */ +	&__clk_0_39, /* dac */ +	&__clk_0_44, /* usb otg */ +	&__clk_0_45, /* usb host */ +	&__clk_0_47, /* ssi.0 */ +	&__clk_0_49, /* rng */ +	&__clk_0_50, /* ssi.1 */ +	&__clk_0_51, /* eSDHC */ +	&__clk_0_53, /* enet-fec */ +	&__clk_0_54, /* enet-fec */ +	&__clk_0_55, /* switch.0 */ +	&__clk_0_56, /* switch.1 */ + +	&__clk_1_2, /* 1-wire */ +	&__clk_1_4, /* i2c.2 */ +	&__clk_1_5, /* i2c.3 */ +	&__clk_1_6, /* i2c.4 */ +	&__clk_1_7, /* i2c.5 */ +	&__clk_1_24, /* uart 4 */ +	&__clk_1_25, /* uart 5 */ +	&__clk_1_26, /* uart 6 */ +	&__clk_1_27, /* uart 7 */ +	&__clk_1_28, /* uart 8 */ +	&__clk_1_29, /* uart 9 */ +}; + +static void __init m5441x_clk_init(void) +{ +	unsigned i; + +	for (i = 0; i < ARRAY_SIZE(enable_clks); ++i) +		__clk_init_enabled(enable_clks[i]); +	/* make sure these clocks are disabled */ +	for (i = 0; i < ARRAY_SIZE(disable_clks); ++i) +		__clk_init_disabled(disable_clks[i]); +} + +static void __init m5441x_uarts_init(void) +{ +	__raw_writeb(0x0f, MCFGPIO_PAR_UART0); +	__raw_writeb(0x00, MCFGPIO_PAR_UART1); +	__raw_writeb(0x00, MCFGPIO_PAR_UART2); +} + +static void __init m5441x_fec_init(void) +{ +	__raw_writeb(0x03, MCFGPIO_PAR_FEC); +} + +void __init config_BSP(char *commandp, int size) +{ +	m5441x_clk_init(); +	mach_sched_init = hw_timer_init; +	m5441x_uarts_init(); +	m5441x_fec_init(); +} + + +#if IS_ENABLED(CONFIG_RTC_DRV_M5441x) +static struct resource m5441x_rtc_resources[] = { +	{ +		.start		= MCFRTC_BASE, +		.end		= MCFRTC_BASE + MCFRTC_SIZE - 1, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= MCF_IRQ_RTC, +		.end		= MCF_IRQ_RTC, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device m5441x_rtc = { +	.name			= "mcfrtc", +	.id			= 0, +	.resource		= m5441x_rtc_resources, +	.num_resources		= ARRAY_SIZE(m5441x_rtc_resources), +}; +#endif + +static struct platform_device *m5441x_devices[] __initdata = { +#if IS_ENABLED(CONFIG_RTC_DRV_M5441x) +	&m5441x_rtc, +#endif +}; + +static int __init init_BSP(void) +{ +	platform_add_devices(m5441x_devices, ARRAY_SIZE(m5441x_devices)); +	return 0; +} + +arch_initcall(init_BSP); diff --git a/arch/m68k/platform/coldfire/m54xx.c b/arch/m68k/platform/coldfire/m54xx.c new file mode 100644 index 00000000000..952da53aa0b --- /dev/null +++ b/arch/m68k/platform/coldfire/m54xx.c @@ -0,0 +1,129 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/54xx/config.c + * + *	Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/io.h> +#include <linux/mm.h> +#include <linux/clk.h> +#include <linux/bootmem.h> +#include <asm/pgalloc.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/m54xxsim.h> +#include <asm/mcfuart.h> +#include <asm/mcfclk.h> +#include <asm/m54xxgpt.h> +#include <asm/mcfclk.h> +#ifdef CONFIG_MMU +#include <asm/mmu_context.h> +#endif + +/***************************************************************************/ + +DEFINE_CLK(pll, "pll.0", MCF_CLK); +DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); +DEFINE_CLK(mcfslt0, "mcfslt.0", MCF_BUSCLK); +DEFINE_CLK(mcfslt1, "mcfslt.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); +DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); +DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); +DEFINE_CLK(mcfuart3, "mcfuart.3", MCF_BUSCLK); + +struct clk *mcf_clks[] = { +	&clk_pll, +	&clk_sys, +	&clk_mcfslt0, +	&clk_mcfslt1, +	&clk_mcfuart0, +	&clk_mcfuart1, +	&clk_mcfuart2, +	&clk_mcfuart3, +	NULL +}; + +/***************************************************************************/ + +static void __init m54xx_uarts_init(void) +{ +	/* enable io pins */ +	__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD, MCFGPIO_PAR_PSC0); +	__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD | MCF_PAR_PSC_RTS_RTS, +		MCFGPIO_PAR_PSC1); +	__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD | MCF_PAR_PSC_RTS_RTS | +		MCF_PAR_PSC_CTS_CTS, MCFGPIO_PAR_PSC2); +	__raw_writeb(MCF_PAR_PSC_TXD | MCF_PAR_PSC_RXD, MCFGPIO_PAR_PSC3); +} + +/***************************************************************************/ + +static void mcf54xx_reset(void) +{ +	/* disable interrupts and enable the watchdog */ +	asm("movew #0x2700, %sr\n"); +	__raw_writel(0, MCF_GPT_GMS0); +	__raw_writel(MCF_GPT_GCIR_CNT(1), MCF_GPT_GCIR0); +	__raw_writel(MCF_GPT_GMS_WDEN | MCF_GPT_GMS_CE | MCF_GPT_GMS_TMS(4), +		MCF_GPT_GMS0); +} + +/***************************************************************************/ + +#ifdef CONFIG_MMU + +unsigned long num_pages; + +static void __init mcf54xx_bootmem_alloc(void) +{ +	unsigned long start_pfn; +	unsigned long memstart; + +	/* _rambase and _ramend will be naturally page aligned */ +	m68k_memory[0].addr = _rambase; +	m68k_memory[0].size = _ramend - _rambase; + +	/* compute total pages in system */ +	num_pages = (_ramend - _rambase) >> PAGE_SHIFT; + +	/* page numbers */ +	memstart = PAGE_ALIGN(_ramstart); +	min_low_pfn = _rambase >> PAGE_SHIFT; +	start_pfn = memstart >> PAGE_SHIFT; +	max_low_pfn = _ramend >> PAGE_SHIFT; +	high_memory = (void *)_ramend; + +	m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6; +	module_fixup(NULL, __start_fixup, __stop_fixup); + +	/* setup bootmem data */ +	m68k_setup_node(0); +	memstart += init_bootmem_node(NODE_DATA(0), start_pfn, +		min_low_pfn, max_low_pfn); +	free_bootmem_node(NODE_DATA(0), memstart, _ramend - memstart); +} + +#endif /* CONFIG_MMU */ + +/***************************************************************************/ + +void __init config_BSP(char *commandp, int size) +{ +#ifdef CONFIG_MMU +	mcf54xx_bootmem_alloc(); +	mmu_context_init(); +#endif +	mach_reset = mcf54xx_reset; +	mach_sched_init = hw_timer_init; +	m54xx_uarts_init(); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/mcf8390.c b/arch/m68k/platform/coldfire/mcf8390.c new file mode 100644 index 00000000000..23a6874a324 --- /dev/null +++ b/arch/m68k/platform/coldfire/mcf8390.c @@ -0,0 +1,38 @@ +/* + * mcf8390.c  -- platform support for 8390 ethernet on many boards + * + * (C) Copyright 2012, Greg Ungerer <gerg@uclinux.org> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/resource.h> +#include <linux/platform_device.h> +#include <asm/mcf8390.h> + +static struct resource mcf8390_resources[] = { +	{ +		.start	= NE2000_ADDR, +		.end	= NE2000_ADDR + NE2000_ADDRSIZE - 1, +		.flags	= IORESOURCE_MEM, +	}, +	{ +		.start	= NE2000_IRQ_VECTOR, +		.end	= NE2000_IRQ_VECTOR, +		.flags	= IORESOURCE_IRQ, +	}, +}; + +static int __init mcf8390_platform_init(void) +{ +	platform_device_register_simple("mcf8390", -1, mcf8390_resources, +		ARRAY_SIZE(mcf8390_resources)); +	return 0; +} + +arch_initcall(mcf8390_platform_init); diff --git a/arch/m68k/platform/coldfire/nettel.c b/arch/m68k/platform/coldfire/nettel.c new file mode 100644 index 00000000000..ddc48ec1b80 --- /dev/null +++ b/arch/m68k/platform/coldfire/nettel.c @@ -0,0 +1,153 @@ +/***************************************************************************/ + +/* + *	nettel.c -- startup code support for the NETtel boards + * + *	Copyright (C) 2009, Greg Ungerer (gerg@snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/platform_device.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/nettel.h> + +/***************************************************************************/ + +/* + * Define the IO and interrupt resources of the 2 SMC9196 interfaces. + */ +#define	NETTEL_SMC0_ADDR	0x30600300 +#define	NETTEL_SMC0_IRQ		29 + +#define	NETTEL_SMC1_ADDR	0x30600000 +#define	NETTEL_SMC1_IRQ		27 + +/* + * We need some access into the SMC9196 registers. Define those registers + * we will need here (including the smc91x.h doesn't seem to give us these + * in a simple form). + */ +#define	SMC91xx_BANKSELECT	14 +#define	SMC91xx_BASEADDR	2 +#define	SMC91xx_BASEMAC		4 + +/***************************************************************************/ + +static struct resource nettel_smc91x_0_resources[] = { +	{ +		.start		= NETTEL_SMC0_ADDR, +		.end		= NETTEL_SMC0_ADDR + 0x20, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= NETTEL_SMC0_IRQ, +		.end		= NETTEL_SMC0_IRQ, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static struct resource nettel_smc91x_1_resources[] = { +	{ +		.start		= NETTEL_SMC1_ADDR, +		.end		= NETTEL_SMC1_ADDR + 0x20, +		.flags		= IORESOURCE_MEM, +	}, +	{ +		.start		= NETTEL_SMC1_IRQ, +		.end		= NETTEL_SMC1_IRQ, +		.flags		= IORESOURCE_IRQ, +	}, +}; + +static struct platform_device nettel_smc91x[] = { +	{ +		.name			= "smc91x", +		.id			= 0, +		.num_resources		= ARRAY_SIZE(nettel_smc91x_0_resources), +		.resource		= nettel_smc91x_0_resources, +	}, +	{ +		.name			= "smc91x", +		.id			= 1, +		.num_resources		= ARRAY_SIZE(nettel_smc91x_1_resources), +		.resource		= nettel_smc91x_1_resources, +	}, +}; + +static struct platform_device *nettel_devices[] __initdata = { +	&nettel_smc91x[0], +	&nettel_smc91x[1], +}; + +/***************************************************************************/ + +static u8 nettel_macdefault[] __initdata = { +	0x00, 0xd0, 0xcf, 0x00, 0x00, 0x01, +}; + +/* + * Set flash contained MAC address into SMC9196 core. Make sure the flash + * MAC address is sane, and not an empty flash. If no good use the Moreton + * Bay default MAC address instead. + */ + +static void __init nettel_smc91x_setmac(unsigned int ioaddr, unsigned int flashaddr) +{ +	u16 *macp; + +	macp = (u16 *) flashaddr; +	if ((macp[0] == 0xffff) && (macp[1] == 0xffff) && (macp[2] == 0xffff)) +		macp = (u16 *) &nettel_macdefault[0]; + +	writew(1, NETTEL_SMC0_ADDR + SMC91xx_BANKSELECT); +	writew(macp[0], ioaddr + SMC91xx_BASEMAC); +	writew(macp[1], ioaddr + SMC91xx_BASEMAC + 2); +	writew(macp[2], ioaddr + SMC91xx_BASEMAC + 4); +} + +/***************************************************************************/ + +/* + * Re-map the address space of at least one of the SMC ethernet + * parts. Both parts power up decoding the same address, so we + * need to move one of them first, before doing anything else. + */ + +static void __init nettel_smc91x_init(void) +{ +	writew(0x00ec, MCFSIM_PADDR); +	mcf_setppdata(0, 0x0080); +	writew(1, NETTEL_SMC0_ADDR + SMC91xx_BANKSELECT); +	writew(0x0067, NETTEL_SMC0_ADDR + SMC91xx_BASEADDR); +	mcf_setppdata(0x0080, 0); + +	/* Set correct chip select timing for SMC9196 accesses */ +	writew(0x1180, MCFSIM_CSCR3); + +	/* Set the SMC interrupts to be auto-vectored */ +	mcf_autovector(NETTEL_SMC0_IRQ); +	mcf_autovector(NETTEL_SMC1_IRQ); + +	/* Set MAC addresses from flash for both interfaces */ +	nettel_smc91x_setmac(NETTEL_SMC0_ADDR, 0xf0006000); +	nettel_smc91x_setmac(NETTEL_SMC1_ADDR, 0xf0006006); +} + +/***************************************************************************/ + +static int __init init_nettel(void) +{ +	nettel_smc91x_init(); +	platform_add_devices(nettel_devices, ARRAY_SIZE(nettel_devices)); +	return 0; +} + +arch_initcall(init_nettel); + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/pci.c b/arch/m68k/platform/coldfire/pci.c new file mode 100644 index 00000000000..df9679238b6 --- /dev/null +++ b/arch/m68k/platform/coldfire/pci.c @@ -0,0 +1,325 @@ +/* + * pci.c -- PCI bus support for ColdFire processors + * + * (C) Copyright 2012, Greg Ungerer <gerg@uclinux.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/types.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <linux/pci.h> +#include <linux/delay.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/m54xxpci.h> + +/* + * Memory and IO mappings. We use a 1:1 mapping for local host memory to + * PCI bus memory (no reason not to really). IO space doesn't matter, we + * always use access functions for that. The device configuration space is + * mapped over the IO map space when we enable it in the PCICAR register. + */ +#define	PCI_MEM_PA	0xf0000000		/* Host physical address */ +#define	PCI_MEM_BA	0xf0000000		/* Bus physical address */ +#define	PCI_MEM_SIZE	0x08000000		/* 128 MB */ +#define	PCI_MEM_MASK	(PCI_MEM_SIZE - 1) + +#define	PCI_IO_PA	0xf8000000		/* Host physical address */ +#define	PCI_IO_BA	0x00000000		/* Bus physical address */ +#define	PCI_IO_SIZE	0x00010000		/* 64k */ +#define	PCI_IO_MASK	(PCI_IO_SIZE - 1) + +static struct pci_bus *rootbus; +static unsigned long iospace; + +/* + * We need to be carefull probing on bus 0 (directly connected to host + * bridge). We should only acccess the well defined possible devices in + * use, ignore aliases and the like. + */ +static unsigned char mcf_host_slot2sid[32] = { +	0, 0, 0, 0, 0, 0, 0, 0, +	0, 0, 0, 0, 0, 0, 0, 0, +	0, 1, 2, 0, 3, 4, 0, 0, +	0, 0, 0, 0, 0, 0, 0, 0, +}; + +static unsigned char mcf_host_irq[] = { +	0, 69, 69, 71, 71, +}; + + +static inline void syncio(void) +{ +	/* The ColdFire "nop" instruction waits for all bus IO to complete */ +	__asm__ __volatile__ ("nop"); +} + +/* + * Configuration space access functions. Configuration space access is + * through the IO mapping window, enabling it via the PCICAR register. + */ +static unsigned long mcf_mk_pcicar(int bus, unsigned int devfn, int where) +{ +	return (bus << PCICAR_BUSN) | (devfn << PCICAR_DEVFNN) | (where & 0xfc); +} + +static int mcf_pci_readconfig(struct pci_bus *bus, unsigned int devfn, +	int where, int size, u32 *value) +{ +	unsigned long addr; + +	*value = 0xffffffff; + +	if (bus->number == 0) { +		if (mcf_host_slot2sid[PCI_SLOT(devfn)] == 0) +			return PCIBIOS_SUCCESSFUL; +	} + +	syncio(); +	addr = mcf_mk_pcicar(bus->number, devfn, where); +	__raw_writel(PCICAR_E | addr, PCICAR); +	addr = iospace + (where & 0x3); + +	switch (size) { +	case 1: +		*value = __raw_readb(addr); +		break; +	case 2: +		*value = le16_to_cpu(__raw_readw(addr)); +		break; +	default: +		*value = le32_to_cpu(__raw_readl(addr)); +		break; +	} + +	syncio(); +	__raw_writel(0, PCICAR); +	return PCIBIOS_SUCCESSFUL; +} + +static int mcf_pci_writeconfig(struct pci_bus *bus, unsigned int devfn, +	int where, int size, u32 value) +{ +	unsigned long addr; + +	if (bus->number == 0) { +		if (mcf_host_slot2sid[PCI_SLOT(devfn)] == 0) +			return PCIBIOS_SUCCESSFUL; +	} + +	syncio(); +	addr = mcf_mk_pcicar(bus->number, devfn, where); +	__raw_writel(PCICAR_E | addr, PCICAR); +	addr = iospace + (where & 0x3); + +	switch (size) { +	case 1: +		 __raw_writeb(value, addr); +		break; +	case 2: +		__raw_writew(cpu_to_le16(value), addr); +		break; +	default: +		__raw_writel(cpu_to_le32(value), addr); +		break; +	} + +	syncio(); +	__raw_writel(0, PCICAR); +	return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops mcf_pci_ops = { +	.read	= mcf_pci_readconfig, +	.write	= mcf_pci_writeconfig, +}; + +/* + *	IO address space access functions. Pretty strait forward, these are + *	directly mapped in to the IO mapping window. And that is mapped into + *	virtual address space. + */ +u8 mcf_pci_inb(u32 addr) +{ +	return __raw_readb(iospace + (addr & PCI_IO_MASK)); +} +EXPORT_SYMBOL(mcf_pci_inb); + +u16 mcf_pci_inw(u32 addr) +{ +	return le16_to_cpu(__raw_readw(iospace + (addr & PCI_IO_MASK))); +} +EXPORT_SYMBOL(mcf_pci_inw); + +u32 mcf_pci_inl(u32 addr) +{ +	return le32_to_cpu(__raw_readl(iospace + (addr & PCI_IO_MASK))); +} +EXPORT_SYMBOL(mcf_pci_inl); + +void mcf_pci_insb(u32 addr, u8 *buf, u32 len) +{ +	for (; len; len--) +		*buf++ = mcf_pci_inb(addr); +} +EXPORT_SYMBOL(mcf_pci_insb); + +void mcf_pci_insw(u32 addr, u16 *buf, u32 len) +{ +	for (; len; len--) +		*buf++ = mcf_pci_inw(addr); +} +EXPORT_SYMBOL(mcf_pci_insw); + +void mcf_pci_insl(u32 addr, u32 *buf, u32 len) +{ +	for (; len; len--) +		*buf++ = mcf_pci_inl(addr); +} +EXPORT_SYMBOL(mcf_pci_insl); + +void mcf_pci_outb(u8 v, u32 addr) +{ +	__raw_writeb(v, iospace + (addr & PCI_IO_MASK)); +} +EXPORT_SYMBOL(mcf_pci_outb); + +void mcf_pci_outw(u16 v, u32 addr) +{ +	__raw_writew(cpu_to_le16(v), iospace + (addr & PCI_IO_MASK)); +} +EXPORT_SYMBOL(mcf_pci_outw); + +void mcf_pci_outl(u32 v, u32 addr) +{ +	__raw_writel(cpu_to_le32(v), iospace + (addr & PCI_IO_MASK)); +} +EXPORT_SYMBOL(mcf_pci_outl); + +void mcf_pci_outsb(u32 addr, const u8 *buf, u32 len) +{ +	for (; len; len--) +		mcf_pci_outb(*buf++, addr); +} +EXPORT_SYMBOL(mcf_pci_outsb); + +void mcf_pci_outsw(u32 addr, const u16 *buf, u32 len) +{ +	for (; len; len--) +		mcf_pci_outw(*buf++, addr); +} +EXPORT_SYMBOL(mcf_pci_outsw); + +void mcf_pci_outsl(u32 addr, const u32 *buf, u32 len) +{ +	for (; len; len--) +		mcf_pci_outl(*buf++, addr); +} +EXPORT_SYMBOL(mcf_pci_outsl); + +/* + * Initialize the PCI bus registers, and scan the bus. + */ +static struct resource mcf_pci_mem = { +	.name	= "PCI Memory space", +	.start	= PCI_MEM_PA, +	.end	= PCI_MEM_PA + PCI_MEM_SIZE - 1, +	.flags	= IORESOURCE_MEM, +}; + +static struct resource mcf_pci_io = { +	.name	= "PCI IO space", +	.start	= 0x400, +	.end	= 0x10000 - 1, +	.flags	= IORESOURCE_IO, +}; + +/* + * Interrupt mapping and setting. + */ +static int mcf_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) +{ +	int sid; + +	sid = mcf_host_slot2sid[slot]; +	if (sid) +		return mcf_host_irq[sid]; +	return 0; +} + +static int __init mcf_pci_init(void) +{ +	pr_info("ColdFire: PCI bus initialization...\n"); + +	/* Reset the external PCI bus */ +	__raw_writel(PCIGSCR_RESET, PCIGSCR); +	__raw_writel(0, PCITCR); + +	request_resource(&iomem_resource, &mcf_pci_mem); +	request_resource(&iomem_resource, &mcf_pci_io); + +	/* Configure PCI arbiter */ +	__raw_writel(PACR_INTMPRI | PACR_INTMINTE | PACR_EXTMPRI(0x1f) | +		PACR_EXTMINTE(0x1f), PACR); + +	/* Set required multi-function pins for PCI bus use */ +	__raw_writew(0x3ff, MCFGPIO_PAR_PCIBG); +	__raw_writew(0x3ff, MCFGPIO_PAR_PCIBR); + +	/* Set up config space for local host bus controller */ +	__raw_writel(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | +		PCI_COMMAND_INVALIDATE, PCISCR); +	__raw_writel(PCICR1_LT(32) | PCICR1_CL(8), PCICR1); +	__raw_writel(0, PCICR2); + +	/* +	 * Set up the initiator windows for memory and IO mapping. +	 * These give the CPU bus access onto the PCI bus. One for each of +	 * PCI memory and IO address spaces. +	 */ +	__raw_writel(WXBTAR(PCI_MEM_PA, PCI_MEM_BA, PCI_MEM_SIZE), +		PCIIW0BTAR); +	__raw_writel(WXBTAR(PCI_IO_PA, PCI_IO_BA, PCI_IO_SIZE), +		PCIIW1BTAR); +	__raw_writel(PCIIWCR_W0_MEM /*| PCIIWCR_W0_MRDL*/ | PCIIWCR_W0_E | +		PCIIWCR_W1_IO | PCIIWCR_W1_E, PCIIWCR); + +	/* +	 * Set up the target windows for access from the PCI bus back to the +	 * CPU bus. All we need is access to system RAM (for mastering). +	 */ +	__raw_writel(CONFIG_RAMBASE, PCIBAR1); +	__raw_writel(CONFIG_RAMBASE | PCITBATR1_E, PCITBATR1); + +	/* Keep a virtual mapping to IO/config space active */ +	iospace = (unsigned long) ioremap(PCI_IO_PA, PCI_IO_SIZE); +	if (iospace == 0) +		return -ENODEV; +	pr_info("Coldfire: PCI IO/config window mapped to 0x%x\n", +		(u32) iospace); + +	/* Turn of PCI reset, and wait for devices to settle */ +	__raw_writel(0, PCIGSCR); +	set_current_state(TASK_UNINTERRUPTIBLE); +	schedule_timeout(msecs_to_jiffies(200)); + +	rootbus = pci_scan_bus(0, &mcf_pci_ops, NULL); +	rootbus->resource[0] = &mcf_pci_io; +	rootbus->resource[1] = &mcf_pci_mem; + +	pci_fixup_irqs(pci_common_swizzle, mcf_pci_map_irq); +	pci_bus_size_bridges(rootbus); +	pci_bus_assign_resources(rootbus); +	return 0; +} + +subsys_initcall(mcf_pci_init); diff --git a/arch/m68k/platform/coldfire/pit.c b/arch/m68k/platform/coldfire/pit.c new file mode 100644 index 00000000000..493b3111d4c --- /dev/null +++ b/arch/m68k/platform/coldfire/pit.c @@ -0,0 +1,167 @@ +/***************************************************************************/ + +/* + *	pit.c -- Freescale ColdFire PIT timer. Currently this type of + *	         hardware timer only exists in the Freescale ColdFire + *		 5270/5271, 5282 and 5208 CPUs. No doubt newer ColdFire + *		 family members will probably use it too. + * + *	Copyright (C) 1999-2008, Greg Ungerer (gerg@snapgear.com) + *	Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/sched.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/clockchips.h> +#include <asm/machdep.h> +#include <asm/io.h> +#include <asm/coldfire.h> +#include <asm/mcfpit.h> +#include <asm/mcfsim.h> + +/***************************************************************************/ + +/* + *	By default use timer1 as the system clock timer. + */ +#define	FREQ	((MCF_CLK / 2) / 64) +#define	TA(a)	(MCFPIT_BASE1 + (a)) +#define PIT_CYCLES_PER_JIFFY (FREQ / HZ) + +static u32 pit_cnt; + +/* + * Initialize the PIT timer. + * + * This is also called after resume to bring the PIT into operation again. + */ + +static void init_cf_pit_timer(enum clock_event_mode mode, +                             struct clock_event_device *evt) +{ +	switch (mode) { +	case CLOCK_EVT_MODE_PERIODIC: + +		__raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); +		__raw_writew(PIT_CYCLES_PER_JIFFY, TA(MCFPIT_PMR)); +		__raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | \ +				MCFPIT_PCSR_OVW | MCFPIT_PCSR_RLD | \ +				MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR)); +		break; + +	case CLOCK_EVT_MODE_SHUTDOWN: +	case CLOCK_EVT_MODE_UNUSED: + +		__raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); +		break; + +	case CLOCK_EVT_MODE_ONESHOT: + +		__raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); +		__raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | \ +				MCFPIT_PCSR_OVW | MCFPIT_PCSR_CLK64, \ +				TA(MCFPIT_PCSR)); +		break; + +	case CLOCK_EVT_MODE_RESUME: +		/* Nothing to do here */ +		break; +	} +} + +/* + * Program the next event in oneshot mode + * + * Delta is given in PIT ticks + */ +static int cf_pit_next_event(unsigned long delta, +		struct clock_event_device *evt) +{ +	__raw_writew(delta, TA(MCFPIT_PMR)); +	return 0; +} + +struct clock_event_device cf_pit_clockevent = { +	.name		= "pit", +	.features	= CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, +	.set_mode	= init_cf_pit_timer, +	.set_next_event	= cf_pit_next_event, +	.shift		= 32, +	.irq		= MCF_IRQ_PIT1, +}; + + + +/***************************************************************************/ + +static irqreturn_t pit_tick(int irq, void *dummy) +{ +	struct clock_event_device *evt = &cf_pit_clockevent; +	u16 pcsr; + +	/* Reset the ColdFire timer */ +	pcsr = __raw_readw(TA(MCFPIT_PCSR)); +	__raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); + +	pit_cnt += PIT_CYCLES_PER_JIFFY; +	evt->event_handler(evt); +	return IRQ_HANDLED; +} + +/***************************************************************************/ + +static struct irqaction pit_irq = { +	.name	 = "timer", +	.flags	 = IRQF_TIMER, +	.handler = pit_tick, +}; + +/***************************************************************************/ + +static cycle_t pit_read_clk(struct clocksource *cs) +{ +	unsigned long flags; +	u32 cycles; +	u16 pcntr; + +	local_irq_save(flags); +	pcntr = __raw_readw(TA(MCFPIT_PCNTR)); +	cycles = pit_cnt; +	local_irq_restore(flags); + +	return cycles + PIT_CYCLES_PER_JIFFY - pcntr; +} + +/***************************************************************************/ + +static struct clocksource pit_clk = { +	.name	= "pit", +	.rating	= 100, +	.read	= pit_read_clk, +	.mask	= CLOCKSOURCE_MASK(32), +}; + +/***************************************************************************/ + +void hw_timer_init(irq_handler_t handler) +{ +	cf_pit_clockevent.cpumask = cpumask_of(smp_processor_id()); +	cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32); +	cf_pit_clockevent.max_delta_ns = +		clockevent_delta2ns(0xFFFF, &cf_pit_clockevent); +	cf_pit_clockevent.min_delta_ns = +		clockevent_delta2ns(0x3f, &cf_pit_clockevent); +	clockevents_register_device(&cf_pit_clockevent); + +	setup_irq(MCF_IRQ_PIT1, &pit_irq); + +	clocksource_register_hz(&pit_clk, FREQ); +} + +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/reset.c b/arch/m68k/platform/coldfire/reset.c new file mode 100644 index 00000000000..f30952f0cbe --- /dev/null +++ b/arch/m68k/platform/coldfire/reset.c @@ -0,0 +1,50 @@ +/* + * reset.c  -- common ColdFire SoC reset support + * + * (C) Copyright 2012, Greg Ungerer <gerg@uclinux.org> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file COPYING in the main directory of this archive + * for more details. + */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/io.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> + +/* + *	There are 2 common methods amongst the ColdFure parts for reseting + *	the CPU. But there are couple of exceptions, the 5272 and the 547x + *	have something completely special to them, and we let their specific + *	subarch code handle them. + */ + +#ifdef MCFSIM_SYPCR +static void mcf_cpu_reset(void) +{ +	local_irq_disable(); +	/* Set watchdog to soft reset, and enabled */ +	__raw_writeb(0xc0, MCFSIM_SYPCR); +	for (;;) +		/* wait for watchdog to timeout */; +} +#endif + +#ifdef MCF_RCR +static void mcf_cpu_reset(void) +{ +	local_irq_disable(); +	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR); +} +#endif + +static int __init mcf_setup_reset(void) +{ +	mach_reset = mcf_cpu_reset; +	return 0; +} + +arch_initcall(mcf_setup_reset); diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c new file mode 100644 index 00000000000..831a08cf6f4 --- /dev/null +++ b/arch/m68k/platform/coldfire/sltimers.c @@ -0,0 +1,149 @@ +/***************************************************************************/ + +/* + *	sltimers.c -- generic ColdFire slice timer support. + * + *	Copyright (C) 2009-2010, Philippe De Muyter <phdm@macqel.be> + *	based on + *	timers.c -- generic ColdFire hardware timer support. + *	Copyright (C) 1999-2008, Greg Ungerer <gerg@snapgear.com> + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/sched.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/profile.h> +#include <linux/clocksource.h> +#include <asm/io.h> +#include <asm/traps.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfslt.h> +#include <asm/mcfsim.h> + +/***************************************************************************/ + +#ifdef CONFIG_HIGHPROFILE + +/* + *	By default use Slice Timer 1 as the profiler clock timer. + */ +#define	PA(a)	(MCFSLT_TIMER1 + (a)) + +/* + *	Choose a reasonably fast profile timer. Make it an odd value to + *	try and get good coverage of kernel operations. + */ +#define	PROFILEHZ	1013 + +irqreturn_t mcfslt_profile_tick(int irq, void *dummy) +{ +	/* Reset Slice Timer 1 */ +	__raw_writel(MCFSLT_SSR_BE | MCFSLT_SSR_TE, PA(MCFSLT_SSR)); +	if (current->pid) +		profile_tick(CPU_PROFILING); +	return IRQ_HANDLED; +} + +static struct irqaction mcfslt_profile_irq = { +	.name	 = "profile timer", +	.flags	 = IRQF_TIMER, +	.handler = mcfslt_profile_tick, +}; + +void mcfslt_profile_init(void) +{ +	printk(KERN_INFO "PROFILE: lodging TIMER 1 @ %dHz as profile timer\n", +	       PROFILEHZ); + +	setup_irq(MCF_IRQ_PROFILER, &mcfslt_profile_irq); + +	/* Set up TIMER 2 as high speed profile clock */ +	__raw_writel(MCF_BUSCLK / PROFILEHZ - 1, PA(MCFSLT_STCNT)); +	__raw_writel(MCFSLT_SCR_RUN | MCFSLT_SCR_IEN | MCFSLT_SCR_TEN, +								PA(MCFSLT_SCR)); + +} + +#endif	/* CONFIG_HIGHPROFILE */ + +/***************************************************************************/ + +/* + *	By default use Slice Timer 0 as the system clock timer. + */ +#define	TA(a)	(MCFSLT_TIMER0 + (a)) + +static u32 mcfslt_cycles_per_jiffy; +static u32 mcfslt_cnt; + +static irq_handler_t timer_interrupt; + +static irqreturn_t mcfslt_tick(int irq, void *dummy) +{ +	/* Reset Slice Timer 0 */ +	__raw_writel(MCFSLT_SSR_BE | MCFSLT_SSR_TE, TA(MCFSLT_SSR)); +	mcfslt_cnt += mcfslt_cycles_per_jiffy; +	return timer_interrupt(irq, dummy); +} + +static struct irqaction mcfslt_timer_irq = { +	.name	 = "timer", +	.flags	 = IRQF_TIMER, +	.handler = mcfslt_tick, +}; + +static cycle_t mcfslt_read_clk(struct clocksource *cs) +{ +	unsigned long flags; +	u32 cycles, scnt; + +	local_irq_save(flags); +	scnt = __raw_readl(TA(MCFSLT_SCNT)); +	cycles = mcfslt_cnt; +	if (__raw_readl(TA(MCFSLT_SSR)) & MCFSLT_SSR_TE) { +		cycles += mcfslt_cycles_per_jiffy; +		scnt = __raw_readl(TA(MCFSLT_SCNT)); +	} +	local_irq_restore(flags); + +	/* subtract because slice timers count down */ +	return cycles + ((mcfslt_cycles_per_jiffy - 1) - scnt); +} + +static struct clocksource mcfslt_clk = { +	.name	= "slt", +	.rating	= 250, +	.read	= mcfslt_read_clk, +	.mask	= CLOCKSOURCE_MASK(32), +	.flags	= CLOCK_SOURCE_IS_CONTINUOUS, +}; + +void hw_timer_init(irq_handler_t handler) +{ +	mcfslt_cycles_per_jiffy = MCF_BUSCLK / HZ; +	/* +	 *	The coldfire slice timer (SLT) runs from STCNT to 0 included, +	 *	then STCNT again and so on.  It counts thus actually +	 *	STCNT + 1 steps for 1 tick, not STCNT.  So if you want +	 *	n cycles, initialize STCNT with n - 1. +	 */ +	__raw_writel(mcfslt_cycles_per_jiffy - 1, TA(MCFSLT_STCNT)); +	__raw_writel(MCFSLT_SCR_RUN | MCFSLT_SCR_IEN | MCFSLT_SCR_TEN, +								TA(MCFSLT_SCR)); +	/* initialize mcfslt_cnt knowing that slice timers count down */ +	mcfslt_cnt = mcfslt_cycles_per_jiffy; + +	timer_interrupt = handler; +	setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); + +	clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK); + +#ifdef CONFIG_HIGHPROFILE +	mcfslt_profile_init(); +#endif +} diff --git a/arch/m68k/platform/coldfire/timers.c b/arch/m68k/platform/coldfire/timers.c new file mode 100644 index 00000000000..cd496a20fcc --- /dev/null +++ b/arch/m68k/platform/coldfire/timers.c @@ -0,0 +1,195 @@ +/***************************************************************************/ + +/* + *	timers.c -- generic ColdFire hardware timer support. + * + *	Copyright (C) 1999-2008, Greg Ungerer <gerg@snapgear.com> + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/sched.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <linux/profile.h> +#include <linux/clocksource.h> +#include <asm/io.h> +#include <asm/traps.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcftimer.h> +#include <asm/mcfsim.h> + +/***************************************************************************/ + +/* + *	By default use timer1 as the system clock timer. + */ +#define	FREQ	(MCF_BUSCLK / 16) +#define	TA(a)	(MCFTIMER_BASE1 + (a)) + +/* + *	These provide the underlying interrupt vector support. + *	Unfortunately it is a little different on each ColdFire. + */ +void coldfire_profile_init(void); + +#if defined(CONFIG_M53xx) || defined(CONFIG_M5441x) +#define	__raw_readtrr	__raw_readl +#define	__raw_writetrr	__raw_writel +#else +#define	__raw_readtrr	__raw_readw +#define	__raw_writetrr	__raw_writew +#endif + +static u32 mcftmr_cycles_per_jiffy; +static u32 mcftmr_cnt; + +static irq_handler_t timer_interrupt; + +/***************************************************************************/ + +static void init_timer_irq(void) +{ +#ifdef MCFSIM_ICR_AUTOVEC +	/* Timer1 is always used as system timer */ +	writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3, +		MCFSIM_TIMER1ICR); +	mcf_mapirq2imr(MCF_IRQ_TIMER, MCFINTC_TIMER1); + +#ifdef CONFIG_HIGHPROFILE +	/* Timer2 is to be used as a high speed profile timer  */ +	writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3, +		MCFSIM_TIMER2ICR); +	mcf_mapirq2imr(MCF_IRQ_PROFILER, MCFINTC_TIMER2); +#endif +#endif /* MCFSIM_ICR_AUTOVEC */ +} + +/***************************************************************************/ + +static irqreturn_t mcftmr_tick(int irq, void *dummy) +{ +	/* Reset the ColdFire timer */ +	__raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER)); + +	mcftmr_cnt += mcftmr_cycles_per_jiffy; +	return timer_interrupt(irq, dummy); +} + +/***************************************************************************/ + +static struct irqaction mcftmr_timer_irq = { +	.name	 = "timer", +	.flags	 = IRQF_TIMER, +	.handler = mcftmr_tick, +}; + +/***************************************************************************/ + +static cycle_t mcftmr_read_clk(struct clocksource *cs) +{ +	unsigned long flags; +	u32 cycles; +	u16 tcn; + +	local_irq_save(flags); +	tcn = __raw_readw(TA(MCFTIMER_TCN)); +	cycles = mcftmr_cnt; +	local_irq_restore(flags); + +	return cycles + tcn; +} + +/***************************************************************************/ + +static struct clocksource mcftmr_clk = { +	.name	= "tmr", +	.rating	= 250, +	.read	= mcftmr_read_clk, +	.mask	= CLOCKSOURCE_MASK(32), +	.flags	= CLOCK_SOURCE_IS_CONTINUOUS, +}; + +/***************************************************************************/ + +void hw_timer_init(irq_handler_t handler) +{ +	__raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); +	mcftmr_cycles_per_jiffy = FREQ / HZ; +	/* +	 *	The coldfire timer runs from 0 to TRR included, then 0 +	 *	again and so on.  It counts thus actually TRR + 1 steps +	 *	for 1 tick, not TRR.  So if you want n cycles, +	 *	initialize TRR with n - 1. +	 */ +	__raw_writetrr(mcftmr_cycles_per_jiffy - 1, TA(MCFTIMER_TRR)); +	__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | +		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); + +	clocksource_register_hz(&mcftmr_clk, FREQ); + +	timer_interrupt = handler; +	init_timer_irq(); +	setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq); + +#ifdef CONFIG_HIGHPROFILE +	coldfire_profile_init(); +#endif +} + +/***************************************************************************/ +#ifdef CONFIG_HIGHPROFILE +/***************************************************************************/ + +/* + *	By default use timer2 as the profiler clock timer. + */ +#define	PA(a)	(MCFTIMER_BASE2 + (a)) + +/* + *	Choose a reasonably fast profile timer. Make it an odd value to + *	try and get good coverage of kernel operations. + */ +#define	PROFILEHZ	1013 + +/* + *	Use the other timer to provide high accuracy profiling info. + */ +irqreturn_t coldfire_profile_tick(int irq, void *dummy) +{ +	/* Reset ColdFire timer2 */ +	__raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER)); +	if (current->pid) +		profile_tick(CPU_PROFILING); +	return IRQ_HANDLED; +} + +/***************************************************************************/ + +static struct irqaction coldfire_profile_irq = { +	.name	 = "profile timer", +	.flags	 = IRQF_TIMER, +	.handler = coldfire_profile_tick, +}; + +void coldfire_profile_init(void) +{ +	printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", +	       PROFILEHZ); + +	/* Set up TIMER 2 as high speed profile clock */ +	__raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR)); + +	__raw_writetrr(((MCF_BUSCLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR)); +	__raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | +		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); + +	setup_irq(MCF_IRQ_PROFILER, &coldfire_profile_irq); +} + +/***************************************************************************/ +#endif	/* CONFIG_HIGHPROFILE */ +/***************************************************************************/ diff --git a/arch/m68k/platform/coldfire/vectors.c b/arch/m68k/platform/coldfire/vectors.c new file mode 100644 index 00000000000..a4dbdecbec7 --- /dev/null +++ b/arch/m68k/platform/coldfire/vectors.c @@ -0,0 +1,70 @@ +/***************************************************************************/ + +/* + *	linux/arch/m68knommu/platform/coldfire/vectors.c + * + *	Copyright (C) 1999-2007, Greg Ungerer <gerg@snapgear.com> + */ + +/***************************************************************************/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/irq.h> +#include <asm/traps.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfwdebug.h> + +/***************************************************************************/ + +#ifdef TRAP_DBG_INTERRUPT + +asmlinkage void dbginterrupt_c(struct frame *fp) +{ +	extern void dump(struct pt_regs *fp); +	printk(KERN_DEBUG "%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__); +	dump((struct pt_regs *) fp); +	asm("halt"); +} + +#endif + +/***************************************************************************/ + +/* Assembler routines */ +asmlinkage void buserr(void); +asmlinkage void trap(void); +asmlinkage void system_call(void); +asmlinkage void inthandler(void); + +void __init trap_init(void) +{ +	int i; + +	/* +	 *	There is a common trap handler and common interrupt +	 *	handler that handle almost every vector. We treat +	 *	the system call and bus error special, they get their +	 *	own first level handlers. +	 */ +	for (i = 3; (i <= 23); i++) +		_ramvec[i] = trap; +	for (i = 33; (i <= 63); i++) +		_ramvec[i] = trap; +	for (i = 24; (i <= 31); i++) +		_ramvec[i] = inthandler; +	for (i = 64; (i < 255); i++) +		_ramvec[i] = inthandler; +	_ramvec[255] = 0; + +	_ramvec[2] = buserr; +	_ramvec[32] = system_call; + +#ifdef TRAP_DBG_INTERRUPT +	_ramvec[12] = dbginterrupt; +#endif +} + +/***************************************************************************/ diff --git a/arch/m68k/q40/README b/arch/m68k/q40/README index f877b724979..93f4c4cd3c4 100644 --- a/arch/m68k/q40/README +++ b/arch/m68k/q40/README @@ -31,7 +31,7 @@ drivers used by the Q40, apart from the very obvious (console etc.):  		char/joystick/*		# most of this should work, not  				        # in default config.in  	        block/q40ide.c		# startup for ide -		      ide*		# see Documentation/ide.txt +		      ide*		# see Documentation/ide/ide.txt  		      floppy.c		# normal PC driver, DMA emu in asm/floppy.h  					# and arch/m68k/kernel/entry.S  					# see drivers/block/README.fd @@ -89,7 +89,7 @@ The main interrupt register IIRQ_REG will indicate whether an IRQ was internal  or from some ISA devices, EIRQ_REG can distinguish up to 8 ISA IRQs.  The Q40 custom chip is programmable to provide 2 periodic timers: -	- 50 or 200 Hz - level 2, !!THIS CANT BE DISABLED!! +	- 50 or 200 Hz - level 2, !!THIS CAN'T BE DISABLED!!  	- 10 or 20 KHz - level 4, used for dma-sound  Linux uses the 200 Hz interrupt for timer and beep by default. diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index ad10fecec2f..e90fe903613 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c @@ -24,11 +24,11 @@  #include <linux/rtc.h>  #include <linux/vt_kern.h>  #include <linux/bcd.h> +#include <linux/platform_device.h>  #include <asm/io.h>  #include <asm/rtc.h>  #include <asm/bootinfo.h> -#include <asm/system.h>  #include <asm/pgtable.h>  #include <asm/setup.h>  #include <asm/irq.h> @@ -40,7 +40,7 @@ extern void q40_init_IRQ(void);  static void q40_get_model(char *model);  extern void q40_sched_init(irq_handler_t handler); -static unsigned long q40_gettimeoffset(void); +static u32 q40_gettimeoffset(void);  static int q40_hwclk(int, struct rtc_time *);  static unsigned int q40_get_ss(void);  static int q40_set_clock_mmss(unsigned long); @@ -154,7 +154,7 @@ static unsigned int serports[] =  	0x3f8,0x2f8,0x3e8,0x2e8,0  }; -static void q40_disable_irqs(void) +static void __init q40_disable_irqs(void)  {  	unsigned i, j; @@ -170,7 +170,7 @@ void __init config_q40(void)  	mach_sched_init = q40_sched_init;  	mach_init_IRQ = q40_init_IRQ; -	mach_gettimeoffset = q40_gettimeoffset; +	arch_gettimeoffset = q40_gettimeoffset;  	mach_hwclk = q40_hwclk;  	mach_get_ss = q40_get_ss;  	mach_get_rtc_pll = q40_get_rtc_pll; @@ -198,15 +198,15 @@ void __init config_q40(void)  } -int q40_parse_bootinfo(const struct bi_record *rec) +int __init q40_parse_bootinfo(const struct bi_record *rec)  {  	return 1;  } -static unsigned long q40_gettimeoffset(void) +static u32 q40_gettimeoffset(void)  { -	return 5000 * (ql_ticks != 0); +	return 5000 * (ql_ticks != 0) * 1000;  } @@ -329,3 +329,15 @@ static int q40_set_rtc_pll(struct rtc_pll_info *pll)  	} else  		return -EINVAL;  } + +static __init int q40_add_kbd_device(void) +{ +	struct platform_device *pdev; + +	if (!MACH_IS_Q40) +		return -ENODEV; + +	pdev = platform_device_register_simple("q40kbd", -1, NULL, 0); +	return PTR_ERR_OR_ZERO(pdev); +} +arch_initcall(q40_add_kbd_device); diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index 9f0e3d59bf9..513f9bb17b9 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c @@ -15,10 +15,9 @@  #include <linux/kernel.h>  #include <linux/errno.h>  #include <linux/interrupt.h> +#include <linux/irq.h>  #include <asm/ptrace.h> -#include <asm/system.h> -#include <asm/irq.h>  #include <asm/traps.h>  #include <asm/q40_master.h> @@ -35,35 +34,36 @@  */  static void q40_irq_handler(unsigned int, struct pt_regs *fp); -static void q40_enable_irq(unsigned int); -static void q40_disable_irq(unsigned int); +static void q40_irq_enable(struct irq_data *data); +static void q40_irq_disable(struct irq_data *data);  unsigned short q40_ablecount[35];  unsigned short q40_state[35]; -static int q40_irq_startup(unsigned int irq) +static unsigned int q40_irq_startup(struct irq_data *data)  { +	unsigned int irq = data->irq; +  	/* test for ISA ints not implemented by HW */  	switch (irq) {  	case 1: case 2: case 8: case 9:  	case 11: case 12: case 13:  		printk("%s: ISA IRQ %d not implemented by HW\n", __func__, irq); -		return -ENXIO; +		/* FIXME return -ENXIO; */  	}  	return 0;  } -static void q40_irq_shutdown(unsigned int irq) +static void q40_irq_shutdown(struct irq_data *data)  {  } -static struct irq_controller q40_irq_controller = { +static struct irq_chip q40_irq_chip = {  	.name		= "q40", -	.lock		= __SPIN_LOCK_UNLOCKED(q40_irq_controller.lock), -	.startup	= q40_irq_startup, -	.shutdown	= q40_irq_shutdown, -	.enable		= q40_enable_irq, -	.disable	= q40_disable_irq, +	.irq_startup	= q40_irq_startup, +	.irq_shutdown	= q40_irq_shutdown, +	.irq_enable	= q40_irq_enable, +	.irq_disable	= q40_irq_disable,  };  /* @@ -81,13 +81,14 @@ static int disabled;  void __init q40_init_IRQ(void)  { -	m68k_setup_irq_controller(&q40_irq_controller, 1, Q40_IRQ_MAX); +	m68k_setup_irq_controller(&q40_irq_chip, handle_simple_irq, 1, +				  Q40_IRQ_MAX);  	/* setup handler for ISA ints */  	m68k_setup_auto_interrupt(q40_irq_handler); -	m68k_irq_startup(IRQ_AUTO_2); -	m68k_irq_startup(IRQ_AUTO_4); +	m68k_irq_startup_irq(IRQ_AUTO_2); +	m68k_irq_startup_irq(IRQ_AUTO_4);  	/* now enable some ints.. */  	master_outb(1, EXT_ENABLE_REG);  /* ISA IRQ 5-15 */ @@ -218,11 +219,11 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)  	switch (irq) {  	case 4:  	case 6: -		__m68k_handle_int(Q40_IRQ_SAMPLE, fp); +		do_IRQ(Q40_IRQ_SAMPLE, fp);  		return;  	}  	if (mir & Q40_IRQ_FRAME_MASK) { -		__m68k_handle_int(Q40_IRQ_FRAME, fp); +		do_IRQ(Q40_IRQ_FRAME, fp);  		master_outb(-1, FRAME_CLEAR_REG);  	}  	if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) { @@ -257,7 +258,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)  					goto iirq;  				}  				q40_state[irq] |= IRQ_INPROGRESS; -				__m68k_handle_int(irq, fp); +				do_IRQ(irq, fp);  				q40_state[irq] &= ~IRQ_INPROGRESS;  				/* naively enable everything, if that fails than    */ @@ -288,25 +289,29 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)  	mir = master_inb(IIRQ_REG);  	/* should test whether keyboard irq is really enabled, doing it in defhand */  	if (mir & Q40_IRQ_KEYB_MASK) -		__m68k_handle_int(Q40_IRQ_KEYBOARD, fp); +		do_IRQ(Q40_IRQ_KEYBOARD, fp);  	return;  } -void q40_enable_irq(unsigned int irq) +void q40_irq_enable(struct irq_data *data)  { +	unsigned int irq = data->irq; +  	if (irq >= 5 && irq <= 15) {  		mext_disabled--;  		if (mext_disabled > 0) -			printk("q40_enable_irq : nested disable/enable\n"); +			printk("q40_irq_enable : nested disable/enable\n");  		if (mext_disabled == 0)  			master_outb(1, EXT_ENABLE_REG);  	}  } -void q40_disable_irq(unsigned int irq) +void q40_irq_disable(struct irq_data *data)  { +	unsigned int irq = data->irq; +  	/* disable ISA iqs : only do something if the driver has been  	 * verified to be Q40 "compatible" - right now IDE, NE2K  	 * Any driver should not attempt to sleep across disable_irq !! @@ -319,13 +324,3 @@ void q40_disable_irq(unsigned int irq)  			printk("disable_irq nesting count %d\n",mext_disabled);  	}  } - -unsigned long q40_probe_irq_on(void) -{ -	printk("irq probing not working - reconfigure the driver to avoid this\n"); -	return -1; -} -int q40_probe_irq_off(unsigned long irqs) -{ -	return -1; -} diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c index 2ca25bd01a9..f59ec58083f 100644 --- a/arch/m68k/sun3/config.c +++ b/arch/m68k/sun3/config.c @@ -36,7 +36,7 @@  char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; -extern unsigned long sun3_gettimeoffset(void); +extern u32 sun3_gettimeoffset(void);  static void sun3_sched_init(irq_handler_t handler);  extern void sun3_get_model (char* model);  extern int sun3_hwclk(int set, struct rtc_time *t); @@ -141,7 +141,7 @@ void __init config_sun3(void)          mach_sched_init      =  sun3_sched_init;          mach_init_IRQ        =  sun3_init_IRQ;          mach_reset           =  sun3_reboot; -	mach_gettimeoffset   =  sun3_gettimeoffset; +	arch_gettimeoffset   =  sun3_gettimeoffset;  	mach_get_model	     =  sun3_get_model;  	mach_hwclk           =  sun3_hwclk;  	mach_halt	     =  sun3_halt; diff --git a/arch/m68k/sun3/dvma.c b/arch/m68k/sun3/dvma.c index d522eaab455..d95506e06c2 100644 --- a/arch/m68k/sun3/dvma.c +++ b/arch/m68k/sun3/dvma.c @@ -7,6 +7,7 @@   *   */ +#include <linux/init.h>  #include <linux/kernel.h>  #include <linux/mm.h>  #include <linux/bootmem.h> @@ -62,10 +63,7 @@ int dvma_map_iommu(unsigned long kaddr, unsigned long baddr,  } -void sun3_dvma_init(void) +void __init sun3_dvma_init(void)  { -  	memset(ptelist, 0, sizeof(ptelist)); - -  } diff --git a/arch/m68k/sun3/intersil.c b/arch/m68k/sun3/intersil.c index 0116d208d30..889829e11f1 100644 --- a/arch/m68k/sun3/intersil.c +++ b/arch/m68k/sun3/intersil.c @@ -14,7 +14,6 @@  #include <linux/rtc.h>  #include <asm/errno.h> -#include <asm/system.h>  #include <asm/rtc.h>  #include <asm/intersil.h> @@ -24,9 +23,9 @@  #define START_VAL (INTERSIL_RUN | INTERSIL_INT_ENABLE | INTERSIL_24H_MODE)  /* does this need to be implemented? */ -unsigned long sun3_gettimeoffset(void) +u32 sun3_gettimeoffset(void)  { -  return 1; +  return 1000;  } diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c index 94f81ecfe3f..3f258e230ba 100644 --- a/arch/m68k/sun3/mmu_emu.c +++ b/arch/m68k/sun3/mmu_emu.c @@ -6,6 +6,7 @@  ** Started 1/16/98 @ 2:22 am  */ +#include <linux/init.h>  #include <linux/mman.h>  #include <linux/mm.h>  #include <linux/kernel.h> @@ -17,7 +18,6 @@  #include <asm/setup.h>  #include <asm/traps.h> -#include <asm/system.h>  #include <asm/uaccess.h>  #include <asm/page.h>  #include <asm/pgtable.h> @@ -123,7 +123,7 @@ void print_pte_vaddr (unsigned long vaddr)  /*   * Initialise the MMU emulator.   */ -void mmu_emu_init(unsigned long bootmem_end) +void __init mmu_emu_init(unsigned long bootmem_end)  {  	unsigned long seg, num;  	int i,j; diff --git a/arch/m68k/sun3/prom/console.c b/arch/m68k/sun3/prom/console.c index 2bcb6e4bfe5..e92364373b0 100644 --- a/arch/m68k/sun3/prom/console.c +++ b/arch/m68k/sun3/prom/console.c @@ -10,7 +10,6 @@  #include <linux/sched.h>  #include <asm/openprom.h>  #include <asm/oplib.h> -#include <asm/system.h>  #include <linux/string.h>  /* Non blocking get character from console input device, returns -1 diff --git a/arch/m68k/sun3/prom/init.c b/arch/m68k/sun3/prom/init.c index d8e6349336b..eeba067d565 100644 --- a/arch/m68k/sun3/prom/init.c +++ b/arch/m68k/sun3/prom/init.c @@ -22,57 +22,13 @@ int prom_root_node;  struct linux_nodeops *prom_nodeops;  /* You must call prom_init() before you attempt to use any of the - * routines in the prom library.  It returns 0 on success, 1 on - * failure.  It gets passed the pointer to the PROM vector. + * routines in the prom library. + * It gets passed the pointer to the PROM vector.   */ -extern void prom_meminit(void); -extern void prom_ranges_init(void); -  void __init prom_init(struct linux_romvec *rp)  {  	romvec = rp; -#ifndef CONFIG_SUN3 -	switch(romvec->pv_romvers) { -	case 0: -		prom_vers = PROM_V0; -		break; -	case 2: -		prom_vers = PROM_V2; -		break; -	case 3: -		prom_vers = PROM_V3; -		break; -	case 4: -		prom_vers = PROM_P1275; -		prom_printf("PROMLIB: Sun IEEE Prom not supported yet\n"); -		prom_halt(); -		break; -	default: -		prom_printf("PROMLIB: Bad PROM version %d\n", -			    romvec->pv_romvers); -		prom_halt(); -		break; -	}; - -	prom_rev = romvec->pv_plugin_revision; -	prom_prev = romvec->pv_printrev; -	prom_nodeops = romvec->pv_nodeops; - -	prom_root_node = prom_getsibling(0); -	if((prom_root_node == 0) || (prom_root_node == -1)) -		prom_halt(); - -	if((((unsigned long) prom_nodeops) == 0) || -	   (((unsigned long) prom_nodeops) == -1)) -		prom_halt(); - -	prom_meminit(); - -	prom_ranges_init(); -#endif -//	printk("PROMLIB: Sun Boot Prom Version %d Revision %d\n", -//	       romvec->pv_romvers, prom_rev);  	/* Initialization successful. */  	return; diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c index ca0966cac72..b37521a5259 100644 --- a/arch/m68k/sun3/sun3dvma.c +++ b/arch/m68k/sun3/sun3dvma.c @@ -6,6 +6,8 @@   * Contains common routines for sun3/sun3x DVMA management.   */ +#include <linux/bootmem.h> +#include <linux/init.h>  #include <linux/module.h>  #include <linux/kernel.h>  #include <linux/gfp.h> @@ -30,7 +32,7 @@ static inline void dvma_unmap_iommu(unsigned long a, int b)  extern void sun3_dvma_init(void);  #endif -static unsigned long iommu_use[IOMMU_TOTAL_ENTRIES]; +static unsigned long *iommu_use;  #define dvma_index(baddr) ((baddr - DVMA_START) >> DVMA_PAGE_SHIFT) @@ -245,7 +247,7 @@ static inline int free_baddr(unsigned long baddr)  } -void dvma_init(void) +void __init dvma_init(void)  {  	struct hole *hole; @@ -265,7 +267,7 @@ void dvma_init(void)  	list_add(&(hole->list), &hole_list); -	memset(iommu_use, 0, sizeof(iommu_use)); +	iommu_use = alloc_bootmem(IOMMU_TOTAL_ENTRIES * sizeof(unsigned long));  	dvma_unmap_iommu(DVMA_START, DVMA_SIZE); @@ -275,7 +277,7 @@ void dvma_init(void)  } -inline unsigned long dvma_map_align(unsigned long kaddr, int len, int align) +unsigned long dvma_map_align(unsigned long kaddr, int len, int align)  {  	unsigned long baddr; diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 2d9e21bd313..6bbca30c918 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c @@ -51,61 +51,48 @@ void sun3_disable_irq(unsigned int irq)  static irqreturn_t sun3_int7(int irq, void *dev_id)  { -	*sun3_intreg |=  (1 << irq); -	if (!(kstat_cpu(0).irqs[irq] % 2000)) -		sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 16000) / 2000]); +	unsigned int cnt; + +	cnt = kstat_irqs_cpu(irq, 0); +	if (!(cnt % 2000)) +		sun3_leds(led_pattern[cnt % 16000 / 2000]);  	return IRQ_HANDLED;  }  static irqreturn_t sun3_int5(int irq, void *dev_id)  { +	unsigned int cnt; +  #ifdef CONFIG_SUN3  	intersil_clear();  #endif -        *sun3_intreg |=  (1 << irq); +	sun3_disable_irq(5); +	sun3_enable_irq(5);  #ifdef CONFIG_SUN3  	intersil_clear();  #endif -        do_timer(1); +	xtime_update(1);  	update_process_times(user_mode(get_irq_regs())); -        if (!(kstat_cpu(0).irqs[irq] % 20)) -                sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]); +	cnt = kstat_irqs_cpu(irq, 0); +	if (!(cnt % 20)) +		sun3_leds(led_pattern[cnt % 160 / 20]);  	return IRQ_HANDLED;  }  static irqreturn_t sun3_vec255(int irq, void *dev_id)  { -//	intersil_clear();  	return IRQ_HANDLED;  } -static void sun3_inthandle(unsigned int irq, struct pt_regs *fp) -{ -        *sun3_intreg &= ~(1 << irq); - -	__m68k_handle_int(irq, fp); -} - -static struct irq_controller sun3_irq_controller = { -	.name		= "sun3", -	.lock		= __SPIN_LOCK_UNLOCKED(sun3_irq_controller.lock), -	.startup	= m68k_irq_startup, -	.shutdown	= m68k_irq_shutdown, -	.enable		= sun3_enable_irq, -	.disable	= sun3_disable_irq, -}; -  void __init sun3_init_IRQ(void)  {  	*sun3_intreg = 1; -	m68k_setup_auto_interrupt(sun3_inthandle); -	m68k_setup_irq_controller(&sun3_irq_controller, IRQ_AUTO_1, 7); -	m68k_setup_user_interrupt(VEC_USER, 128, NULL); +	m68k_setup_user_interrupt(VEC_USER, 128); -	if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL)) +	if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "clock", NULL))  		pr_err("Couldn't register %s interrupt\n", "int5"); -	if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "int7", NULL)) +	if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "nmi", NULL))  		pr_err("Couldn't register %s interrupt\n", "int7");  	if (request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL))  		pr_err("Couldn't register %s interrupt\n", "vec255"); diff --git a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c index fc599fad4a5..0532d64d191 100644 --- a/arch/m68k/sun3x/config.c +++ b/arch/m68k/sun3x/config.c @@ -12,7 +12,6 @@  #include <linux/console.h>  #include <linux/init.h> -#include <asm/system.h>  #include <asm/machdep.h>  #include <asm/irq.h>  #include <asm/sun3xprom.h> @@ -49,7 +48,7 @@ void __init config_sun3x(void)  	mach_sched_init      = sun3x_sched_init;  	mach_init_IRQ        = sun3_init_IRQ; -	mach_gettimeoffset   = sun3x_gettimeoffset; +	arch_gettimeoffset   = sun3x_gettimeoffset;  	mach_reset           = sun3x_reboot;  	mach_hwclk           = sun3x_hwclk; diff --git a/arch/m68k/sun3x/prom.c b/arch/m68k/sun3x/prom.c index a7b7e818d62..0898c3f8150 100644 --- a/arch/m68k/sun3x/prom.c +++ b/arch/m68k/sun3x/prom.c @@ -10,7 +10,6 @@  #include <asm/page.h>  #include <asm/pgtable.h> -#include <asm/bootinfo.h>  #include <asm/setup.h>  #include <asm/traps.h>  #include <asm/sun3xprom.h> diff --git a/arch/m68k/sun3x/time.c b/arch/m68k/sun3x/time.c index 536a04aaf22..c8eb08add6b 100644 --- a/arch/m68k/sun3x/time.c +++ b/arch/m68k/sun3x/time.c @@ -15,7 +15,6 @@  #include <asm/irq.h>  #include <asm/io.h> -#include <asm/system.h>  #include <asm/traps.h>  #include <asm/sun3x.h>  #include <asm/sun3ints.h> @@ -72,7 +71,7 @@ int sun3x_hwclk(int set, struct rtc_time *t)  	return 0;  }  /* Not much we can do here */ -unsigned long sun3x_gettimeoffset (void) +u32 sun3x_gettimeoffset(void)  {      return 0L;  } diff --git a/arch/m68k/sun3x/time.h b/arch/m68k/sun3x/time.h index 6909e129753..a4f9126be7e 100644 --- a/arch/m68k/sun3x/time.h +++ b/arch/m68k/sun3x/time.h @@ -2,7 +2,7 @@  #define SUN3X_TIME_H  extern int sun3x_hwclk(int set, struct rtc_time *t); -unsigned long sun3x_gettimeoffset (void); +u32 sun3x_gettimeoffset(void);  void sun3x_sched_init(irq_handler_t vector);  struct mostek_dt {  | 
