2 * Copyright (C) 2009 Cisco Systems, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef __ASM_MACH_POWERTV_ASIC_H_
20 #define __ASM_MACH_POWERTV_ASIC_H_
33 /* hardcoded values read from Chip Version registers */
34 #define CRONUS_10 0x0B4C1C20
35 #define CRONUS_11 0x0B4C1C21
36 #define CRONUSLITE_10 0x0B4C1C40
38 #define NAND_FLASH_BASE 0x03000000
39 #define ZEUS_IO_BASE 0x09000000
40 #define CALLIOPE_IO_BASE 0x08000000
41 #define CRONUS_IO_BASE 0x09000000
42 #define ASIC_IO_SIZE 0x01000000
44 /* Definitions for backward compatibility */
45 #define UART1_INTSTAT uart1_intstat
46 #define UART1_INTEN uart1_inten
47 #define UART1_CONFIG1 uart1_config1
48 #define UART1_CONFIG2 uart1_config2
49 #define UART1_DIVISORHI uart1_divisorhi
50 #define UART1_DIVISORLO uart1_divisorlo
51 #define UART1_DATA uart1_data
52 #define UART1_STATUS uart1_status
54 /* ASIC register enumeration */
56 u32 eic_slow0_strt_add
;
106 u32 usb2_ohci_int_mask
;
109 u32 ohci_hc_revision
;
110 u32 bcm1_bs_lmi_steer
;
113 u32 usb2_stbus_mess_size
;
114 u32 usb2_stbus_chunk_size
;
128 extern enum asic_type asic
;
129 extern const struct register_map
*register_map
;
130 extern unsigned long asic_phy_base
; /* Physical address of ASIC */
131 extern unsigned long asic_base
; /* Virtual address of ASIC */
134 * Macros to interface to registers through their ioremapped address
135 * asic_reg_offset Returns the offset of a given register from the start
136 * of the ASIC address space
137 * asic_reg_phys_addr Returns the physical address of the given register
138 * asic_reg_addr Returns the iomapped virtual address of the given
141 #define asic_reg_offset(x) (register_map->x)
142 #define asic_reg_phys_addr(x) (asic_phy_base + asic_reg_offset(x))
143 #define asic_reg_addr(x) \
144 ((unsigned int *) (asic_base + asic_reg_offset(x)))
147 * The asic_reg macro is gone. It should be replaced by either asic_read or
148 * asic_write, as appropriate.
151 #define asic_read(x) readl(asic_reg_addr(x))
152 #define asic_write(v, x) writel(v, asic_reg_addr(x))
154 extern void asic_irq_init(void);