driver: add dev_name inline
[barebox-mini2440.git] / include / ns16550.h
blobb40d1fa5ae6e9367d3a152dea2bcd6b1c3c6d89d
1 /**
2 * @file
3 * @brief Serial NS16550 platform specific header
5 * FileName: include/ns16550.h
6 * @code struct NS16550_plat @endcode
7 * represents The specifics of the device present in the system.
8 */
9 /*
10 * (C) Copyright 2008
11 * Texas Instruments, <www.ti.com>
12 * Nishanth Menon <x0nishan@ti.com>
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 * MA 02111-1307 USA
30 #ifndef __NS16650_PLATFORM_H_
31 #define __NS16650_PLATFORM_H_
33 /**
34 * @brief Platform dependent feature:
35 * Pass pointer to this structure as part of device_d -> platform_data
37 struct NS16550_plat {
38 /** Clock speed */
39 unsigned int clock;
40 /** Console capabilities:
41 * CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR @see console.h
43 unsigned char f_caps;
44 /**
45 * register read access capability
47 unsigned int (*reg_read) (unsigned long base, unsigned char reg_offset);
48 /**
49 * register write access capability
51 void (*reg_write) (unsigned int val, unsigned long base,
52 unsigned char reg_offset);
55 #endif /* __NS16650_PLATFORM_H_ */