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