| 1 | /* |
| 2 | * "Ingenic flash tool" - flash the Ingenic CPU via USB |
| 3 | * |
| 4 | * Copyright 2009 (C) Qi Hardware Inc., |
| 5 | * Author: Xiangfu Liu <xiangfu@qi-hardware.com> |
| 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 |
| 9 | * version 3 as published by the Free Software Foundation. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 | * Boston, MA 02110-1301, USA |
| 20 | */ |
| 21 | |
| 22 | #ifndef __USB_BOOT_H__ |
| 23 | #define __USB_BOOT_H__ |
| 24 | |
| 25 | #define BULK_BUF_SIZE (128 * (4096 + 128)) |
| 26 | |
| 27 | enum UDC_STATE |
| 28 | { |
| 29 | IDLE, |
| 30 | BULK_IN, |
| 31 | BULK_OUT |
| 32 | }; |
| 33 | |
| 34 | enum USB_JZ4740_REQUEST /* add for USB_BOOT */ |
| 35 | { |
| 36 | VR_GET_CUP_INFO = 0, |
| 37 | VR_SET_DATA_ADDERSS, |
| 38 | VR_SET_DATA_LENGTH, |
| 39 | VR_FLUSH_CACHES, |
| 40 | VR_PROGRAM_START1, |
| 41 | VR_PROGRAM_START2, |
| 42 | VR_NOR_OPS, |
| 43 | VR_NAND_OPS, |
| 44 | VR_SDRAM_OPS, |
| 45 | VR_CONFIGRATION, |
| 46 | VR_MEM_OPS, |
| 47 | }; |
| 48 | |
| 49 | #endif /* __USB_BOOT_H__ */ |
| 50 | |