diff options
author | Greg Watson <jarrah@users.sourceforge.net> | 2003-06-13 22:07:53 +0000 |
---|---|---|
committer | Greg Watson <jarrah@users.sourceforge.net> | 2003-06-13 22:07:53 +0000 |
commit | f7092040fd4aba081aad75116c2b9594149d5c66 (patch) | |
tree | 9fff13449dd1e397292668313b57537ade1739d8 /src/northbridge/motorola | |
parent | 26ba0f5f9bb04e296c3a6320a855639c2f14e83c (diff) | |
download | coreboot-f7092040fd4aba081aad75116c2b9594149d5c66.tar.xz |
More FB2 stuff
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@877 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/motorola')
-rw-r--r-- | src/northbridge/motorola/mpc107/i2c.c | 6 | ||||
-rw-r--r-- | src/northbridge/motorola/mpc107/i2c.h | 8 | ||||
-rw-r--r-- | src/northbridge/motorola/mpc107/mpc107.c | 33 | ||||
-rw-r--r-- | src/northbridge/motorola/mpc107/mpc107_smp.c | 6 |
4 files changed, 26 insertions, 27 deletions
diff --git a/src/northbridge/motorola/mpc107/i2c.c b/src/northbridge/motorola/mpc107/i2c.c index 4ead02331b..5f06a5136f 100644 --- a/src/northbridge/motorola/mpc107/i2c.c +++ b/src/northbridge/motorola/mpc107/i2c.c @@ -18,8 +18,8 @@ * MA 02111-1307 USA */ -#include <types.h> #include <stdlib.h> +#include <stdint.h> #include <string.h> #include "i2c.h" @@ -80,7 +80,7 @@ void i2c_stop(struct i2c_bus *bus) } int i2c_master_write(struct i2c_bus *bus, int target, int address, - const u8 *data, int length) + const uint8_t *data, int length) { if (! bus) bus = first_i2c; @@ -89,7 +89,7 @@ int i2c_master_write(struct i2c_bus *bus, int target, int address, } int i2c_master_read(struct i2c_bus *bus, int target, int address, - u8 *data, int length) + uint8_t *data, int length) { if (! bus) bus = first_i2c; diff --git a/src/northbridge/motorola/mpc107/i2c.h b/src/northbridge/motorola/mpc107/i2c.h index 868c94a082..c335a6f9ee 100644 --- a/src/northbridge/motorola/mpc107/i2c.h +++ b/src/northbridge/motorola/mpc107/i2c.h @@ -28,9 +28,9 @@ typedef struct i2c_fn void (* start)(struct i2c_bus *bus); void (* stop)(struct i2c_bus *bus); int (* master_write)(struct i2c_bus *bus, int target, int address, - const u8 *data, int length); + const uint8_t *data, int length); int (* master_read)(struct i2c_bus *bus, int target, int address, - u8 *data, int length); + uint8_t *data, int length); } i2c_fn; typedef struct i2c_bus @@ -47,9 +47,9 @@ int register_i2c_bus(const i2c_fn *fn, char *tag, void *data); void i2c_start(struct i2c_bus *bus); void i2c_stop(struct i2c_bus *bus); int i2c_master_write(struct i2c_bus *bus, int target, int address, - const u8 *data, int length); + const uint8_t *data, int length); int i2c_master_read(struct i2c_bus *bus, int target, int address, - u8 *data, int length); + uint8_t *data, int length); void init_i2c_nvram(const char *i2c_tag); extern i2c_fn mpc107_i2c_fn; diff --git a/src/northbridge/motorola/mpc107/mpc107.c b/src/northbridge/motorola/mpc107/mpc107.c index ed02fb73d1..e0460ba90a 100644 --- a/src/northbridge/motorola/mpc107/mpc107.c +++ b/src/northbridge/motorola/mpc107/mpc107.c @@ -17,12 +17,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include <stdint.h> #include <bsp.h> #include <ppc.h> -#include <types.h> #include <device/pci.h> #include <mem.h> -#include <types.h> #include <string.h> #include <console/console.h> #include <arch/io.h> @@ -88,16 +87,16 @@ hostbridge_config_memory(int no_banks, sdram_bank_info * bank, int for_real) unsigned acttorw, acttopre; unsigned pretoact, bstopre; enum sdram_error_detect error_detect; - u32 mccr1; - u32 mccr2; - u32 mccr3; - u32 mccr4; - u8 bank_enable; - u32 memstart1, memstart2; - u32 extmemstart1, extmemstart2; - u32 memend1, memend2; - u32 extmemend1, extmemend2; - u32 address; + uint32_t mccr1; + uint32_t mccr2; + uint32_t mccr3; + uint32_t mccr4; + uint8_t bank_enable; + uint32_t memstart1, memstart2; + uint32_t extmemstart1, extmemstart2; + uint32_t memend1, memend2; + uint32_t extmemend1, extmemend2; + uint32_t address; struct device *dev; if ((dev = dev_find_slot(0, 0)) == NULL ) @@ -248,7 +247,7 @@ hostbridge_config_memory(int no_banks, sdram_bank_info * bank, int for_real) bank_enable = 0; for (i = 0; i < no_banks; i++) { if (! ignore[i]) { - u32 end = address + bank[i].size - 1; + uint32_t end = address + bank[i].size - 1; bank_enable |= 1 << i; if (i < 4) { memstart1 |= ((address >> 20) & 0xff) << (8 * i); @@ -290,7 +289,7 @@ hostbridge_config_memory(int no_banks, sdram_bank_info * bank, int for_real) static int i2c_wait(unsigned timeout, int writing) { - u32 x; + uint32_t x; while (((x = readl(MPC107_BASE + MPC107_I2CSR)) & (MPC107_I2C_CSR_MCF | MPC107_I2C_CSR_MIF)) != (MPC107_I2C_CSR_MCF | MPC107_I2C_CSR_MIF)) { if (ticks_since_boot() > timeout) @@ -327,7 +326,7 @@ mpc107_i2c_stop(struct i2c_bus *bus) } static int -mpc107_i2c_byte_write(struct i2c_bus *bus, int target, int address, u8 data) +mpc107_i2c_byte_write(struct i2c_bus *bus, int target, int address, uint8_t data) { unsigned timeout = ticks_since_boot() + 3 * get_hz(); @@ -361,7 +360,7 @@ mpc107_i2c_byte_write(struct i2c_bus *bus, int target, int address, u8 data) } static int -mpc107_i2c_master_write(struct i2c_bus *bus, int target, int address, const u8 *data, int length) +mpc107_i2c_master_write(struct i2c_bus *bus, int target, int address, const uint8_t *data, int length) { unsigned count; for(count = 0; count < length; count++) @@ -376,7 +375,7 @@ mpc107_i2c_master_write(struct i2c_bus *bus, int target, int address, const u8 * static int mpc107_i2c_master_read(struct i2c_bus *bus, int target, int address, - u8 *data, int length) + uint8_t *data, int length) { unsigned timeout = ticks_since_boot() + 3 * get_hz(); unsigned count; diff --git a/src/northbridge/motorola/mpc107/mpc107_smp.c b/src/northbridge/motorola/mpc107/mpc107_smp.c index c23e686334..afdd538fde 100644 --- a/src/northbridge/motorola/mpc107/mpc107_smp.c +++ b/src/northbridge/motorola/mpc107/mpc107_smp.c @@ -1,4 +1,4 @@ -#include <types.h> +#include <stdint.h> #include <device/pci.h> #include "mpc107.h" @@ -10,10 +10,10 @@ wait_for_other_cpus(void) unsigned long this_processors_id(void) { - u32 pic1; + uint32_t pic1; struct device *dev; - if ((dev = dev_find_slot(0, 0)) == NULL) + if ((dev = dev_find_slot(0, 0)) == 0) return 0; pic1 = pci_read_config32(dev, MPC107_PIC1); |