blob: 2a2b7979f1ca06bc6654bfcaae0e6385ea86707e [file] [log] [blame]
Łukasz Dałek56110a32012-10-15 07:46:54 +00001/*
2 * iPAQ h2200 board configuration
3 *
4 * Copyright (C) 2012 Lukasz Dalek <luk0104@gmail.com>
5 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Łukasz Dałek56110a32012-10-15 07:46:54 +00007 */
8
9#include <common.h>
10#include <asm/arch/pxa.h>
11#include <asm/arch/pxa-regs.h>
12#include <asm/io.h>
Lukasz Dalekd81c72e2012-11-29 15:55:16 +010013#include <usb.h>
Simon Glass0ffb9d62017-05-31 19:47:48 -060014#include <asm/mach-types.h>
Łukasz Dałek56110a32012-10-15 07:46:54 +000015
16DECLARE_GLOBAL_DATA_PTR;
17
Lukasz Dalekd81c72e2012-11-29 15:55:16 +010018int board_eth_init(bd_t *bis)
19{
20 usb_eth_initialize(bis);
21 return 0;
22}
23
Łukasz Dałek3d0c5232013-01-12 15:32:31 +000024void 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łek56110a32012-10-15 07:46:54 +000033int 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 Dalekd81c72e2012-11-29 15:55:16 +010044 /* Let host see that device is disconnected */
45 udc_disconnect();
46 mdelay(500);
47
Łukasz Dałek56110a32012-10-15 07:46:54 +000048 return 0;
49}
50
51int 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 I44220e02015-08-21 11:02:04 +053063
64#ifdef CONFIG_USB_GADGET_PXA2XX
65int board_usb_init(int index, enum usb_init_type init)
66{
67 return 0;
68}
69
70int board_usb_cleanup(int index, enum usb_init_type init)
71{
72 return 0;
73}
74#endif