Łukasz Dałek | 56110a3 | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 1 | /* |
| 2 | * iPAQ h2200 board configuration |
| 3 | * |
| 4 | * Copyright (C) 2012 Lukasz Dalek <luk0104@gmail.com> |
| 5 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Łukasz Dałek | 56110a3 | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | #include <asm/arch/pxa.h> |
| 11 | #include <asm/arch/pxa-regs.h> |
| 12 | #include <asm/io.h> |
Lukasz Dalek | d81c72e | 2012-11-29 15:55:16 +0100 | [diff] [blame] | 13 | #include <usb.h> |
Simon Glass | 0ffb9d6 | 2017-05-31 19:47:48 -0600 | [diff] [blame] | 14 | #include <asm/mach-types.h> |
Łukasz Dałek | 56110a3 | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 15 | |
| 16 | DECLARE_GLOBAL_DATA_PTR; |
| 17 | |
Lukasz Dalek | d81c72e | 2012-11-29 15:55:16 +0100 | [diff] [blame] | 18 | int board_eth_init(bd_t *bis) |
| 19 | { |
| 20 | usb_eth_initialize(bis); |
| 21 | return 0; |
| 22 | } |
| 23 | |
Łukasz Dałek | 3d0c523 | 2013-01-12 15:32:31 +0000 | [diff] [blame] | 24 | void reset_cpu(ulong ignore) |
| 25 | { |
| 26 | /* Enable VLIO interface on Hamcop */ |
| 27 | writeb(0x1, 0x4000); |
| 28 | |
| 29 | /* Reset board (cold reset) */ |
| 30 | writeb(0xff, 0x4002); |
| 31 | } |
| 32 | |
Łukasz Dałek | 56110a3 | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 33 | int board_init(void) |
| 34 | { |
| 35 | /* We have RAM, disable cache */ |
| 36 | dcache_disable(); |
| 37 | icache_disable(); |
| 38 | |
| 39 | gd->bd->bi_arch_number = MACH_TYPE_H2200; |
| 40 | |
| 41 | /* adress of boot parameters */ |
| 42 | gd->bd->bi_boot_params = 0xa0000100; |
| 43 | |
Lukasz Dalek | d81c72e | 2012-11-29 15:55:16 +0100 | [diff] [blame] | 44 | /* Let host see that device is disconnected */ |
| 45 | udc_disconnect(); |
| 46 | mdelay(500); |
| 47 | |
Łukasz Dałek | 56110a3 | 2012-10-15 07:46:54 +0000 | [diff] [blame] | 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | int dram_init(void) |
| 52 | { |
| 53 | /* |
| 54 | * Everything except MSC0 was already set up by |
| 55 | * 1st stage bootloader. |
| 56 | * |
| 57 | * This setting enables access to companion chip. |
| 58 | */ |
| 59 | clrsetbits_le32(MSC0, 0xffffffff, CONFIG_SYS_MSC0_VAL); |
| 60 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE; |
| 61 | return 0; |
| 62 | } |
Kishon Vijay Abraham I | 44220e0 | 2015-08-21 11:02:04 +0530 | [diff] [blame] | 63 | |
| 64 | #ifdef CONFIG_USB_GADGET_PXA2XX |
| 65 | int board_usb_init(int index, enum usb_init_type init) |
| 66 | { |
| 67 | return 0; |
| 68 | } |
| 69 | |
| 70 | int board_usb_cleanup(int index, enum usb_init_type init) |
| 71 | { |
| 72 | return 0; |
| 73 | } |
| 74 | #endif |