Commit 3595ac49 authored by wdenk's avatar wdenk
Browse files

* Patch by Rune Torgersen, 4 Jun 2003:

  add large memory support for MPC8266ADS board

* Patch by Richard Woodruff, 19 June 03:
  - Enabled standard u-boot device abstraction for ARM
  - Enabled console device for ARM
  - Initilized bi_baudrate for ARM

* Patch by Bill Hargen, 23 Apr 2003:
  fix byte order for 824x I2C addresses (write op)
parent 9a0e21a3
......@@ -2,6 +2,17 @@
Changes since U-Boot 0.3.1:
======================================================================
* Patch by Rune Torgersen, 4 Jun 2003:
add large memory support for MPC8266ADS board
* Patch by Richard Woodruff, 19 June 03:
- Enabled standard u-boot device abstraction for ARM
- Enabled console device for ARM
- Initilized bi_baudrate for ARM
* Patch by Bill Hargen, 23 Apr 2003:
fix byte order for 824x I2C addresses (write op)
* Patch by Murray Jensen, 20 Jun 2003:
- hymod update
- cleanup (especially for gcc-3.x compilers)
......
......@@ -46,7 +46,7 @@
* PSDMR_BUFCMD adds a clock
* 0 no extra clock
*/
#define CONFIG_PBI 0
#define CONFIG_PBI PSDMR_PBI
#define PESSIMISTIC_SDRAM 0
#define EAMUX 0 /* EST requires EAMUX */
#define BUFCMD 0
......@@ -379,6 +379,25 @@ long int initdram(int board_type)
sdram_size = 1 << (rows + cols + banks + width);
/* hack for high density memory (512MB per CS) */
/* !!!!! Will ONLY work with Page Based Interleave !!!!!
( PSDMR[PBI] = 1 )
*/
/* mamory actually has 11 column addresses, but the memory controller
doesn't really care.
the calculations that follow will however move the rows so that
they are muxed one bit off if you use 11 bit columns.
The solution is to tell the memory controller the correct size of the memory
but change the number of columns to 10 afterwards.
The 11th column addre will still be mucxed correctly onto the bus.
Also be aware that the MPC8266ADS board Rev B has not connected
Row addres 13 to anything.
The fix is to connect ADD16 (from U37-47) to SADDR12 (U28-126)
*/
if (cols > 10)
cols = 10;
#if(CONFIG_PBI == 0) /* bank-based interleaving */
rowst = ((32 - 6) - (rows + cols + width)) * 2;
......
......@@ -160,14 +160,16 @@ int devices_init (void)
{
DECLARE_GLOBAL_DATA_PTR;
int i;
#ifndef CONFIG_ARM /* already relocated for current ARM implementation */
ulong relocation_offset = gd->reloc_off;
int i;
/* relocate device name pointers */
for (i = 0; i < (sizeof (stdio_names) / sizeof (char *)); ++i) {
stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
relocation_offset);
}
#endif
/* Initialize the list */
devlist = ListCreate (sizeof (device_t));
......
......@@ -1193,14 +1193,17 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)
int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len)
{
I2CStatus status;
unsigned char dummy_buffer[I2C_RXTX_LEN + 2];
uchar dummy_buffer[I2C_RXTX_LEN + 2];
uchar *p;
int i;
dummy_buffer[0] = addr & 0xFF;
if (alen == 2)
dummy_buffer[1] = (addr >> 8) & 0xFF;
for (i = 0; i < len; i++)
dummy_buffer[i + alen] = buffer[i];
p = dummy_buffer;
/* fill in address in big endian order */
for (i=0; i<alen; ++i)
*p++ = (addr >> (i * 8)) & 0xFF;
/* fill in data */
for (i=0; i<len; ++i)
*p++ = *buffer;
status = I2C_do_buffer (0, I2C_MASTER_XMIT, chip, alen + len,
dummy_buffer, I2C_STOP, 1, I2C_NO_RESTART);
......
......@@ -27,7 +27,9 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
#include <devices.h>
#include <syscall.h>
#include <version.h>
#include <net.h>
......@@ -101,8 +103,7 @@ static int init_baudrate (void)
uchar tmp[64]; /* long enough for environment variables */
int i = getenv_r ("baudrate", tmp, sizeof (tmp));
gd->baudrate = (i > 0)
gd->bd->bi_baudrate = gd->baudrate = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
: CONFIG_BAUDRATE;
......@@ -186,6 +187,7 @@ init_fnc_t *init_sequence[] = {
env_init, /* initialize environment */
init_baudrate, /* initialze baudrate settings */
serial_init, /* serial communications setup */
console_init_f, /* stage 1 init of console */
display_banner, /* say that we are here */
dram_init, /* configure available RAM banks */
display_dram_config,
......@@ -283,6 +285,15 @@ void start_armboot (void)
}
}
devices_init (); /* get the devices list going. */
/* Syscalls are not implemented for ARM. But allocating
* this allows the console_init routines to work without #ifdefs
*/
syscall_tbl = (void **) malloc (NR_SYSCALLS * sizeof (void *));
console_init_r (); /* fully init console as a device */
#if defined(CONFIG_MISC_INIT_R)
/* miscellaneous platform dependent initialisations */
misc_init_r ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment