blob: 50de558e722e940ab1671cf0d96815841065ca03 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
2 * arch/arm/mach-ixp23xx/include/mach/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASSEMBLY__
16
17static inline unsigned long ixp2000_reg_read(volatile void *reg)
18{
19 return *((volatile unsigned long *)reg);
20}
21
22static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23{
24 *((volatile unsigned long *)reg) = val;
25}
26
27static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28{
29 *((volatile unsigned long *)reg) = val;
30}
31
32struct pci_sys_data;
33
34void ixp23xx_map_io(void);
35void ixp23xx_init_irq(void);
36void ixp23xx_sys_init(void);
Russell Kingb2194152011-11-05 11:35:32 +000037void ixp23xx_restart(char, const char *);
Russell Kinga09e64f2008-08-05 16:14:15 +010038int ixp23xx_pci_setup(int, struct pci_sys_data *);
39void ixp23xx_pci_preinit(void);
40struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
41void ixp23xx_pci_slave_init(void);
42
43extern struct sys_timer ixp23xx_timer;
44
45#define IXP23XX_UART_XTAL 14745600
46
47#ifndef __ASSEMBLY__
48/*
49 * Is system memory on the XSI or CPP bus?
50 */
51static inline unsigned ixp23xx_cpp_boot(void)
52{
53 return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
54}
55#endif
56
57
58#endif