| Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 1 | /* | 
|  | 2 | * include/asm-arm/arch-ixp23xx/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 |  | 
| Adrian Bunk | 3859810 | 2007-08-27 23:28:17 +0200 | [diff] [blame] | 17 | static inline unsigned long ixp2000_reg_read(volatile void *reg) | 
| Lennert Buytenhek | 8b76a68 | 2006-06-22 10:30:56 +0100 | [diff] [blame] | 18 | { | 
|  | 19 | return *((volatile unsigned long *)reg); | 
|  | 20 | } | 
|  | 21 |  | 
| Adrian Bunk | 3859810 | 2007-08-27 23:28:17 +0200 | [diff] [blame] | 22 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) | 
| Lennert Buytenhek | 8b76a68 | 2006-06-22 10:30:56 +0100 | [diff] [blame] | 23 | { | 
|  | 24 | *((volatile unsigned long *)reg) = val; | 
|  | 25 | } | 
|  | 26 |  | 
| Adrian Bunk | 3859810 | 2007-08-27 23:28:17 +0200 | [diff] [blame] | 27 | static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) | 
| Lennert Buytenhek | 8b76a68 | 2006-06-22 10:30:56 +0100 | [diff] [blame] | 28 | { | 
|  | 29 | *((volatile unsigned long *)reg) = val; | 
|  | 30 | } | 
|  | 31 |  | 
| Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 32 | struct pci_sys_data; | 
|  | 33 |  | 
|  | 34 | void ixp23xx_map_io(void); | 
|  | 35 | void ixp23xx_init_irq(void); | 
|  | 36 | void ixp23xx_sys_init(void); | 
|  | 37 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | 
|  | 38 | void ixp23xx_pci_preinit(void); | 
|  | 39 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | 
| Lennert Buytenhek | 532bda5 | 2006-04-01 18:33:35 +0100 | [diff] [blame] | 40 | void ixp23xx_pci_slave_init(void); | 
| Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 41 |  | 
|  | 42 | extern struct sys_timer ixp23xx_timer; | 
|  | 43 |  | 
|  | 44 | #define IXP23XX_UART_XTAL		14745600 | 
|  | 45 |  | 
| Lennert Buytenhek | 02c4293 | 2006-06-27 22:56:16 +0100 | [diff] [blame] | 46 | #ifndef __ASSEMBLY__ | 
|  | 47 | /* | 
|  | 48 | * Is system memory on the XSI or CPP bus? | 
|  | 49 | */ | 
|  | 50 | static inline unsigned ixp23xx_cpp_boot(void) | 
|  | 51 | { | 
|  | 52 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | 
|  | 53 | } | 
|  | 54 | #endif | 
|  | 55 |  | 
| Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 56 |  | 
|  | 57 | #endif |