linux/arch/arm/mach-orion5x/include/mach/uncompress.h
<<
>>
Prefs
   1/*
   2 * arch/arm/mach-orion5x/include/mach/uncompress.h
   3 *
   4 * Tzachi Perelstein <tzachi@marvell.com>
   5 *
   6 * This file is licensed under the terms of the GNU General Public
   7 * License version 2.  This program is licensed "as is" without any
   8 * warranty of any kind, whether express or implied.
   9 */
  10
  11#include <linux/serial_reg.h>
  12#include <mach/orion5x.h>
  13
  14#define SERIAL_BASE     ((unsigned char *)UART0_PHYS_BASE)
  15
  16static void putc(const char c)
  17{
  18        unsigned char *base = SERIAL_BASE;
  19        int i;
  20
  21        for (i = 0; i < 0x1000; i++) {
  22                if (base[UART_LSR << 2] & UART_LSR_THRE)
  23                        break;
  24                barrier();
  25        }
  26
  27        base[UART_TX << 2] = c;
  28}
  29
  30static void flush(void)
  31{
  32        unsigned char *base = SERIAL_BASE;
  33        unsigned char mask;
  34        int i;
  35
  36        mask = UART_LSR_TEMT | UART_LSR_THRE;
  37
  38        for (i = 0; i < 0x1000; i++) {
  39                if ((base[UART_LSR << 2] & mask) == mask)
  40                        break;
  41                barrier();
  42        }
  43}
  44
  45/*
  46 * nothing to do
  47 */
  48#define arch_decomp_setup()
  49#define arch_decomp_wdog()
  50
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.