18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights
38c2ecf20Sopenharmony_ci * reserved.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two
68c2ecf20Sopenharmony_ci * licenses.  You may choose to be licensed under the terms of the GNU
78c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file
88c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the NetLogic
98c2ecf20Sopenharmony_ci * license below:
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
128c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions
138c2ecf20Sopenharmony_ci * are met:
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright
168c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer.
178c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright
188c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer in
198c2ecf20Sopenharmony_ci *    the documentation and/or other materials provided with the
208c2ecf20Sopenharmony_ci *    distribution.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY NETLOGIC ``AS IS'' AND ANY EXPRESS OR
238c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
248c2ecf20Sopenharmony_ci * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
258c2ecf20Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE LIABLE
268c2ecf20Sopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
278c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
288c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
298c2ecf20Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
308c2ecf20Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
318c2ecf20Sopenharmony_ci * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
328c2ecf20Sopenharmony_ci * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#ifndef _ASM_NLM_IOMAP_H
368c2ecf20Sopenharmony_ci#define _ASM_NLM_IOMAP_H
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#define DEFAULT_NETLOGIC_IO_BASE	   CKSEG1ADDR(0x1ef00000)
398c2ecf20Sopenharmony_ci#define NETLOGIC_IO_DDR2_CHN0_OFFSET	   0x01000
408c2ecf20Sopenharmony_ci#define NETLOGIC_IO_DDR2_CHN1_OFFSET	   0x02000
418c2ecf20Sopenharmony_ci#define NETLOGIC_IO_DDR2_CHN2_OFFSET	   0x03000
428c2ecf20Sopenharmony_ci#define NETLOGIC_IO_DDR2_CHN3_OFFSET	   0x04000
438c2ecf20Sopenharmony_ci#define NETLOGIC_IO_PIC_OFFSET		   0x08000
448c2ecf20Sopenharmony_ci#define NETLOGIC_IO_UART_0_OFFSET	   0x14000
458c2ecf20Sopenharmony_ci#define NETLOGIC_IO_UART_1_OFFSET	   0x15100
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SIZE		   0x1000
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#define NETLOGIC_IO_BRIDGE_OFFSET	   0x00000
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define NETLOGIC_IO_RLD2_CHN0_OFFSET	   0x05000
528c2ecf20Sopenharmony_ci#define NETLOGIC_IO_RLD2_CHN1_OFFSET	   0x06000
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SRAM_OFFSET		   0x07000
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define NETLOGIC_IO_PCIX_OFFSET		   0x09000
578c2ecf20Sopenharmony_ci#define NETLOGIC_IO_HT_OFFSET		   0x0A000
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SECURITY_OFFSET	   0x0B000
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_0_OFFSET	   0x0C000
628c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_1_OFFSET	   0x0D000
638c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_2_OFFSET	   0x0E000
648c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_3_OFFSET	   0x0F000
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci/* XLS devices */
678c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_4_OFFSET	   0x20000
688c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_5_OFFSET	   0x21000
698c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_6_OFFSET	   0x22000
708c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GMAC_7_OFFSET	   0x23000
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci#define NETLOGIC_IO_PCIE_0_OFFSET	   0x1E000
738c2ecf20Sopenharmony_ci#define NETLOGIC_IO_PCIE_1_OFFSET	   0x1F000
748c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SRIO_0_OFFSET	   0x1E000
758c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SRIO_1_OFFSET	   0x1F000
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci#define NETLOGIC_IO_USB_0_OFFSET	   0x24000
788c2ecf20Sopenharmony_ci#define NETLOGIC_IO_USB_1_OFFSET	   0x25000
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci#define NETLOGIC_IO_COMP_OFFSET		   0x1D000
818c2ecf20Sopenharmony_ci/* end XLS devices */
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci/* XLR devices */
848c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SPI4_0_OFFSET	   0x10000
858c2ecf20Sopenharmony_ci#define NETLOGIC_IO_XGMAC_0_OFFSET	   0x11000
868c2ecf20Sopenharmony_ci#define NETLOGIC_IO_SPI4_1_OFFSET	   0x12000
878c2ecf20Sopenharmony_ci#define NETLOGIC_IO_XGMAC_1_OFFSET	   0x13000
888c2ecf20Sopenharmony_ci/* end XLR devices */
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci#define NETLOGIC_IO_I2C_0_OFFSET	   0x16000
918c2ecf20Sopenharmony_ci#define NETLOGIC_IO_I2C_1_OFFSET	   0x17000
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci#define NETLOGIC_IO_GPIO_OFFSET		   0x18000
948c2ecf20Sopenharmony_ci#define NETLOGIC_IO_FLASH_OFFSET	   0x19000
958c2ecf20Sopenharmony_ci#define NETLOGIC_IO_TB_OFFSET		   0x1C000
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci#define NETLOGIC_CPLD_OFFSET		   KSEG1ADDR(0x1d840000)
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci/*
1008c2ecf20Sopenharmony_ci * Base Address (Virtual) of the PCI Config address space
1018c2ecf20Sopenharmony_ci * For now, choose 256M phys in kseg1 = 0xA0000000 + (1<<28)
1028c2ecf20Sopenharmony_ci * Config space spans 256 (num of buses) * 256 (num functions) * 256 bytes
1038c2ecf20Sopenharmony_ci * ie 1<<24 = 16M
1048c2ecf20Sopenharmony_ci */
1058c2ecf20Sopenharmony_ci#define DEFAULT_PCI_CONFIG_BASE		0x18000000
1068c2ecf20Sopenharmony_ci#define DEFAULT_HT_TYPE0_CFG_BASE	0x16000000
1078c2ecf20Sopenharmony_ci#define DEFAULT_HT_TYPE1_CFG_BASE	0x17000000
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci#endif
110