uncompress.h
来自「Linux Kernel 2.6.9 for OMAP1710」· C头文件 代码 · 共 88 行
H
88 行
/* * linux/include/asm-arm/arch-omap2/uncompress.h * * uncompress and ugly serial code to startup the bootup of the board. * * Copyright (C) 2000 RidgeRun, Inc. (http://www.ridgerun.com) * Author: RidgeRun, Inc. * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com * * Copyright (C) 2004 Texas Instruments, Inc. * * This package is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */#ifndef __ASM_ARM_ARCH_OMAP2_UNCOMPRESS_H#define __ASM_ARM_ARCH_OMAP2_UNCOMPRESS_H#define CONSOLE_CHANNEL 0#define IO_ADDRESS(x) (*(unsigned char *)x)#define RBR 0x00#define THR 0x00#define DLL 0x00#define IER 0x01#define DLM 0x01#define IIR 0x02#define FCR 0x02#define LCR 0x03#define MCR 0x04#define LSR 0x05#define MSR 0x06#define SCR 0x07#if defined (CONFIG_ARCH_OMAP24XX)#define DUART 0x4806a000#define DUART_DELTA 0x4#define CHANNELOFFSET 0x0#endif#define LCR_DLAB 0x80#define XTAL 1843200#define LSR_THRE 0x20#define LSR_BI 0x10#define LSR_DR 0x01#define MCR_LOOP 0x10#define ACCESS_DELAY 0x10000/* Register operations */#define inreg(channel,reg) (*((volatile unsigned char *)DUART + \ ((channel) * CHANNELOFFSET) + ((reg) * DUART_DELTA)))#define outreg(channel,reg,val) (*((volatile unsigned char *)DUART + \ ((channel) * CHANNELOFFSET) + ((reg) * DUART_DELTA)) = (val))/* Transmit a character. */static void serial_putc(int channel, int c){ int count = 0; while (((inreg(channel, LSR) & LSR_THRE) == 0) && (count++ < 50000)) ; outreg(channel, THR, c);}static int putstr(const char *s){ while (*s) { serial_putc(CONSOLE_CHANNEL, *s); if (*s == '\n') { serial_putc(CONSOLE_CHANNEL, '\r'); } s++; } return 0;}#define arch_decomp_setup()#define arch_decomp_wdog()#endif /* __ASM_ARM_ARCH_OMAP2_UNCOMPRESS_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?