3 * James F. Dougherty, Broadcom Corporation, jfd@broadcom.com
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 #include <asm/processor.h>
35 #include <linux/mtd/doc2000.h>
44 ulong busfreq
= get_bus_freq(0);
47 puts ("Board: BMW MPC8245/KAHLUA2 - CHRP (MAP B)\n");
48 printf("Built: %s at %s\n", __DATE__
, __TIME__
);
49 /* printf("MPLD: Revision %d\n", SYS_REVID_GET()); */
50 printf("Local Bus at %s MHz\n", strmhz(buf
, busfreq
));
54 long int initdram(int board_type
)
63 int year
, month
, day
, hour
, minute
, second
;
72 printf(" Current date/time: %d/%d/%d %d:%d:%d \n",
73 month
, day
, year
, hour
, minute
, second
);
78 * EPIC, PCI, and I/O devices.
79 * Initialize Mousse Platform, probe for PCI devices,
80 * Query configuration parameters if not set.
82 int misc_init_f (void)
85 m48_tod_init(); /* Init SGS M48T59Y TOD/NVRAM */
86 printf("RTC: M48T589 TOD/NVRAM (%d) bytes\n",
97 * Initialize PCI Devices, report devices found.
99 struct pci_controller hose
;
101 void pci_init_board (void)
103 pci_mpc824x_init(&hose
);
104 /* pci_dev_init(0); */
108 * Write characters to LCD display.
109 * Note that the bytes for the first character is the last address.
112 sys_led_msg(char* msg
)
121 * Map onboard TSOP-16MB DOC FLASH chip.
125 doc_probe(DOC_BASE_ADDR
);
128 #define NV_ADDR ((volatile unsigned char *) CFG_ENV_ADDR)
130 /* Read from NVRAM */
132 nvram_read(void *dest
, const long src
, size_t count
)
135 volatile unsigned char* d
= (unsigned char*)dest
;
136 volatile unsigned char* s
= (unsigned char*)src
;
138 for( i
= 0; i
< count
;i
++)
146 nvram_write(long dest
, const void *src
, size_t count
)
149 volatile unsigned char* d
= (unsigned char*)dest
;
150 volatile unsigned char* s
= (unsigned char*)src
;
154 for( i
= 0; i
< count
;i
++)