Haiying Wang | 765547d | 2009-03-27 17:02:45 -0400 | [diff] [blame] | 1 | /* |
Kumar Gala | 4c2e3da | 2009-07-28 21:49:52 -0500 | [diff] [blame] | 2 | * Copyright (C) 2009 Freescale Semiconductor, Inc. |
Haiying Wang | 765547d | 2009-03-27 17:02:45 -0400 | [diff] [blame] | 3 | * |
| 4 | * See file CREDITS for list of people who contributed to this |
| 5 | * project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 20 | * MA 02111-1307 USA |
| 21 | */ |
| 22 | |
| 23 | #ifndef __BCSR_H_ |
| 24 | #define __BCSR_H_ |
| 25 | |
| 26 | #include <common.h> |
| 27 | |
| 28 | /* BCSR Bit definitions*/ |
| 29 | /****************************************/ |
| 30 | /* BCSR defines */ |
| 31 | /****************************************/ |
| 32 | #define BCSR6_UPC1_EN 0x80 |
| 33 | #define BCSR6_UPC1_POS_EN 0x40 |
| 34 | #define BCSR6_UPC1_ADDR_EN 0x20 |
| 35 | #define BCSR6_UPC1_DEV2 0x10 |
Anton Vorontsov | 7f52ed5 | 2009-10-15 17:47:06 +0400 | [diff] [blame] | 36 | #define BCSR6_SD_CARD_1BIT 0x08 |
| 37 | #define BCSR6_SD_CARD_4BITS 0x04 |
Haiying Wang | 765547d | 2009-03-27 17:02:45 -0400 | [diff] [blame] | 38 | #define BCSR6_TDM2G_EN 0x02 |
| 39 | #define BCSR6_UCC7_RMII_EN 0x01 |
| 40 | |
| 41 | #define BCSR7_UCC1_GETH_EN 0x80 |
| 42 | #define BCSR7_UCC1_RGMII_EN 0x40 |
| 43 | #define BCSR7_UCC1_RTBI_EN 0x20 |
| 44 | #define BCSR7_GETHRST_MRVL 0x04 |
| 45 | #define BCSR7_BRD_WRT_PROTECT 0x02 |
| 46 | |
| 47 | #define BCSR8_UCC2_GETH_EN 0x80 |
| 48 | #define BCSR8_UCC2_RGMII_EN 0x40 |
| 49 | #define BCSR8_UCC2_RTBI_EN 0x20 |
| 50 | #define BCSR8_UEM_MARVEL_RESET 0x02 |
| 51 | |
| 52 | #define BCSR9_UCC3_GETH_EN 0x80 |
| 53 | #define BCSR9_UCC3_RGMII_EN 0x40 |
| 54 | #define BCSR9_UCC3_RTBI_EN 0x20 |
| 55 | #define BCSR9_UCC3_RMII_EN 0x10 |
| 56 | #define BCSR9_UCC3_UEM_MICREL 0x01 |
| 57 | |
| 58 | #define BCSR10_UCC4_GETH_EN 0x80 |
| 59 | #define BCSR10_UCC4_RGMII_EN 0x40 |
| 60 | #define BCSR10_UCC4_RTBI_EN 0x20 |
| 61 | |
| 62 | #define BCSR11_LED0 0x40 |
| 63 | #define BCSR11_LED1 0x20 |
| 64 | #define BCSR11_LED2 0x10 |
| 65 | |
| 66 | #define BCSR12_UCC6_RMII_EN 0x20 |
| 67 | #define BCSR12_UCC8_RMII_EN 0x20 |
| 68 | |
| 69 | #define BCSR15_SMII6_DIS 0x08 |
| 70 | #define BCSR15_SMII8_DIS 0x04 |
Anton Vorontsov | 14809b6 | 2009-10-15 17:47:13 +0400 | [diff] [blame] | 71 | #define BCSR15_QEUART_EN 0x01 |
Haiying Wang | 765547d | 2009-03-27 17:02:45 -0400 | [diff] [blame] | 72 | |
| 73 | #define BCSR16_UPC1_DEV2 0x02 |
| 74 | |
Anton Vorontsov | 3fca803 | 2009-10-15 17:47:16 +0400 | [diff] [blame] | 75 | #define BCSR17_nUSBEN 0x80 |
| 76 | #define BCSR17_nUSBLOWSPD 0x40 |
| 77 | #define BCSR17_USBVCC 0x20 |
| 78 | #define BCSR17_USBMODE 0x10 |
Haiying Wang | 765547d | 2009-03-27 17:02:45 -0400 | [diff] [blame] | 79 | #define BCSR17_FLASH_nWP 0x01 |
| 80 | |
| 81 | /*BCSR Utils functions*/ |
| 82 | |
| 83 | void enable_8569mds_flash_write(void); |
| 84 | void disable_8569mds_flash_write(void); |
Haiying Wang | f82107f | 2009-05-20 12:30:37 -0400 | [diff] [blame] | 85 | void enable_8569mds_qe_uec(void); |
Haiying Wang | 765547d | 2009-03-27 17:02:45 -0400 | [diff] [blame] | 86 | void disable_8569mds_brd_eeprom_write_protect(void); |
| 87 | |
| 88 | #endif /* __BCSR_H_ */ |