Code cleanup.
parent
bea8e84b52
commit
efe2a4d5cf
|
@ -85,12 +85,8 @@
|
||||||
#define FLASH_OFFSET_USER_PROTECTION 0x85
|
#define FLASH_OFFSET_USER_PROTECTION 0x85
|
||||||
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
|
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
|
||||||
|
|
||||||
|
|
||||||
#define FLASH_MAN_CFI 0x01000000
|
#define FLASH_MAN_CFI 0x01000000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
unsigned short w;
|
unsigned short w;
|
||||||
|
@ -107,13 +103,10 @@ typedef union {
|
||||||
|
|
||||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Functions
|
* Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
|
static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
|
||||||
static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
|
static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
|
||||||
static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
|
static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
|
||||||
|
|
|
@ -68,4 +68,3 @@ typedef struct /**** BMP file info structure ****/
|
||||||
unsigned int biClrUsed; /* Number of colors used */
|
unsigned int biClrUsed; /* Number of colors used */
|
||||||
unsigned int biClrImportant; /* Number of important colors */
|
unsigned int biClrImportant; /* Number of important colors */
|
||||||
} BITMAPINFOHEADER;
|
} BITMAPINFOHEADER;
|
||||||
|
|
||||||
|
|
|
@ -123,4 +123,3 @@ static S1D_REGS regs_13806_1024_768_8bpp[] =
|
||||||
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
||||||
{0x01FC,0x01}, /* Display Mode Register */
|
{0x01FC,0x01}, /* Display Mode Register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -123,4 +123,3 @@ static S1D_REGS regs_13806_320_240_4bpp[] =
|
||||||
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
||||||
{0x01FC,0x01}, /* Display Mode Register */
|
{0x01FC,0x01}, /* Display Mode Register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -123,4 +123,3 @@ static S1D_REGS regs_13806_640_480_16bpp[] =
|
||||||
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
||||||
{0x01FC,0x01}, /* Display Mode Register */
|
{0x01FC,0x01}, /* Display Mode Register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -123,4 +123,3 @@ static S1D_REGS regs_13806_640_320_16bpp[] =
|
||||||
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
{0x01F4,0x00}, /* CPU-to-Memory Access Watchdog Timer Register */
|
||||||
{0x01FC,0x01}, /* Display Mode Register */
|
{0x01FC,0x01}, /* Display Mode Register */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,40 +32,33 @@
|
||||||
|
|
||||||
extern ulong ide_bus_offset[CFG_IDE_MAXBUS];
|
extern ulong ide_bus_offset[CFG_IDE_MAXBUS];
|
||||||
|
|
||||||
int ide_preinit
|
int ide_preinit (void)
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
pci_dev_t devbusfn;
|
pci_dev_t devbusfn;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
status = 1;
|
status = 1;
|
||||||
for(l=0;l<CFG_IDE_MAXBUS;l++)
|
for (l = 0; l < CFG_IDE_MAXBUS; l++) {
|
||||||
{
|
|
||||||
ide_bus_offset[l] = -ATA_STATUS;
|
ide_bus_offset[l] = -ATA_STATUS;
|
||||||
}
|
}
|
||||||
devbusfn = pci_find_device (0x1103, 0x0004, 0);
|
devbusfn = pci_find_device (0x1103, 0x0004, 0);
|
||||||
if (devbusfn != -1)
|
if (devbusfn != -1) {
|
||||||
{
|
|
||||||
status = 0;
|
status = 0;
|
||||||
|
|
||||||
pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, (u32 *)&ide_bus_offset[0]);
|
pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
|
||||||
|
(u32 *) & ide_bus_offset[0]);
|
||||||
ide_bus_offset[0] &= 0xfffffffe;
|
ide_bus_offset[0] &= 0xfffffffe;
|
||||||
ide_bus_offset[0] += CFG_PCI0_IO_SPACE;
|
ide_bus_offset[0] += CFG_PCI0_IO_SPACE;
|
||||||
pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_2, (u32 *)&ide_bus_offset[1]);
|
pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_2,
|
||||||
|
(u32 *) & ide_bus_offset[1]);
|
||||||
ide_bus_offset[1] &= 0xfffffffe;
|
ide_bus_offset[1] &= 0xfffffffe;
|
||||||
ide_bus_offset[1] += CFG_PCI0_IO_SPACE;
|
ide_bus_offset[1] += CFG_PCI0_IO_SPACE;
|
||||||
}
|
}
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ide_set_reset
|
void ide_set_reset (int flag) {
|
||||||
(
|
|
||||||
int flag
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -293,7 +293,7 @@ int misc_init_r (void)
|
||||||
*/
|
*/
|
||||||
#define PCI0_BRDGOPT1 0x4a
|
#define PCI0_BRDGOPT1 0x4a
|
||||||
pci_write_config_word(PCIDEVID_405GP, PCI0_BRDGOPT1, 0x3f20);
|
pci_write_config_word(PCIDEVID_405GP, PCI0_BRDGOPT1, 0x3f20);
|
||||||
// pci_write_config_word(PCIDEVID_405GP, PCI0_BRDGOPT1, 0x3f60);
|
/* pci_write_config_word(PCIDEVID_405GP, PCI0_BRDGOPT1, 0x3f60); */
|
||||||
|
|
||||||
#define plb0_acr 0x87
|
#define plb0_acr 0x87
|
||||||
/*
|
/*
|
||||||
|
@ -303,10 +303,10 @@ int misc_init_r (void)
|
||||||
|
|
||||||
#if 0 /* test-only */
|
#if 0 /* test-only */
|
||||||
printf("CCR0=%08x\n", mfspr(ccr0)); /* test-only */
|
printf("CCR0=%08x\n", mfspr(ccr0)); /* test-only */
|
||||||
// mtspr(ccr0, (mfspr(ccr0) & 0xff8fffff) | 0x00100000);
|
/* mtspr(ccr0, (mfspr(ccr0) & 0xff8fffff) | 0x00100000); */
|
||||||
mtspr(ccr0, (mfspr(ccr0) & 0xff8fffff) | 0x00000000);
|
mtspr(ccr0, (mfspr(ccr0) & 0xff8fffff) | 0x00000000);
|
||||||
#endif
|
#endif
|
||||||
// printf("CCR0=%08x\n", mfspr(ccr0)); /* test-only */
|
/* printf("CCR0=%08x\n", mfspr(ccr0)); /* test-only */ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
free(dst);
|
free(dst);
|
||||||
|
|
|
@ -75,8 +75,6 @@ start1:
|
||||||
*/
|
*/
|
||||||
/* subsystem id */
|
/* subsystem id */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
li r4,0x002C
|
li r4,0x002C
|
||||||
oris r4,r4,0x8000
|
oris r4,r4,0x8000
|
||||||
lis r3,0xEEC0
|
lis r3,0xEEC0
|
||||||
|
@ -90,8 +88,6 @@ start1:
|
||||||
|
|
||||||
blr /* never reached !!!! */
|
blr /* never reached !!!! */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.globl write_with_sync
|
.globl write_with_sync
|
||||||
write_with_sync:
|
write_with_sync:
|
||||||
/*
|
/*
|
||||||
|
@ -121,8 +117,6 @@ start2:
|
||||||
*/
|
*/
|
||||||
/* subsystem id */
|
/* subsystem id */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
li r4,0x002C
|
li r4,0x002C
|
||||||
oris r4,r4,0x8000
|
oris r4,r4,0x8000
|
||||||
lis r3,0xEEC0
|
lis r3,0xEEC0
|
||||||
|
@ -138,7 +132,6 @@ start2:
|
||||||
|
|
||||||
blr /* never reached !!!! */
|
blr /* never reached !!!! */
|
||||||
|
|
||||||
|
|
||||||
.globl write_with_less_sync
|
.globl write_with_less_sync
|
||||||
write_with_less_sync:
|
write_with_less_sync:
|
||||||
/*
|
/*
|
||||||
|
@ -168,8 +161,6 @@ start2b:
|
||||||
*/
|
*/
|
||||||
/* subsystem id */
|
/* subsystem id */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
li r4,0x002C
|
li r4,0x002C
|
||||||
oris r4,r4,0x8000
|
oris r4,r4,0x8000
|
||||||
lis r3,0xEEC0
|
lis r3,0xEEC0
|
||||||
|
@ -185,7 +176,6 @@ start2b:
|
||||||
|
|
||||||
blr /* never reached !!!! */
|
blr /* never reached !!!! */
|
||||||
|
|
||||||
|
|
||||||
.globl write_with_more_sync
|
.globl write_with_more_sync
|
||||||
write_with_more_sync:
|
write_with_more_sync:
|
||||||
/*
|
/*
|
||||||
|
@ -217,8 +207,6 @@ start3:
|
||||||
*/
|
*/
|
||||||
/* subsystem id (PCIC0_SBSYSVID)*/
|
/* subsystem id (PCIC0_SBSYSVID)*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
li r4,0x002C
|
li r4,0x002C
|
||||||
oris r4,r4,0x8000
|
oris r4,r4,0x8000
|
||||||
lis r3,0xEEC0
|
lis r3,0xEEC0
|
||||||
|
|
|
@ -85,12 +85,8 @@
|
||||||
#define FLASH_OFFSET_USER_PROTECTION 0x85
|
#define FLASH_OFFSET_USER_PROTECTION 0x85
|
||||||
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
|
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
|
||||||
|
|
||||||
|
|
||||||
#define FLASH_MAN_CFI 0x01000000
|
#define FLASH_MAN_CFI 0x01000000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
unsigned short w;
|
unsigned short w;
|
||||||
|
@ -107,13 +103,10 @@ typedef union {
|
||||||
|
|
||||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Functions
|
* Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
|
static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
|
||||||
static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
|
static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
|
||||||
static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
|
static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
|
||||||
|
|
||||||
#define MEM_MCOPT1_INIT_VAL 0x00800000
|
#define MEM_MCOPT1_INIT_VAL 0x00800000
|
||||||
#define MEM_RTR_INIT_VAL 0x04070000
|
#define MEM_RTR_INIT_VAL 0x04070000
|
||||||
#define MEM_PMIT_INIT_VAL 0x07c00000
|
#define MEM_PMIT_INIT_VAL 0x07c00000
|
||||||
|
@ -34,11 +33,8 @@
|
||||||
#define MEM_SDTR1_INIT_VAL 0x00854005
|
#define MEM_SDTR1_INIT_VAL 0x00854005
|
||||||
#define SDRAM0_CFG_ENABLE 0x80000000
|
#define SDRAM0_CFG_ENABLE 0x80000000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CFG_SDRAM_SIZE 0x04000000 /* 64 MB */
|
#define CFG_SDRAM_SIZE 0x04000000 /* 64 MB */
|
||||||
|
|
||||||
|
|
||||||
int board_early_init_f (void)
|
int board_early_init_f (void)
|
||||||
{
|
{
|
||||||
#if 0 /* test-only */
|
#if 0 /* test-only */
|
||||||
|
|
|
@ -85,12 +85,8 @@
|
||||||
#define FLASH_OFFSET_USER_PROTECTION 0x85
|
#define FLASH_OFFSET_USER_PROTECTION 0x85
|
||||||
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
|
#define FLASH_OFFSET_INTEL_PROTECTION 0x81
|
||||||
|
|
||||||
|
|
||||||
#define FLASH_MAN_CFI 0x01000000
|
#define FLASH_MAN_CFI 0x01000000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
unsigned short w;
|
unsigned short w;
|
||||||
|
@ -107,13 +103,10 @@ typedef union {
|
||||||
|
|
||||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Functions
|
* Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
|
static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
|
||||||
static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
|
static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
|
||||||
static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
|
static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
|
||||||
|
|
|
@ -176,4 +176,3 @@ void flash_preinit(void)
|
||||||
*/
|
*/
|
||||||
*(vu_long *)MPC5XXX_BOOTCS_CFG &= ~0x1; /* clear RO */
|
*(vu_long *)MPC5XXX_BOOTCS_CFG &= ~0x1; /* clear RO */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,25 +34,18 @@ static block_dev_desc_t *ext2fs_block_dev_desc;
|
||||||
static disk_partition_t part_info;
|
static disk_partition_t part_info;
|
||||||
|
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
int ext2fs_set_blk_dev
|
int ext2fs_set_blk_dev (block_dev_desc_t * rbdd, int part)
|
||||||
(
|
|
||||||
block_dev_desc_t *rbdd,
|
|
||||||
int part
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
ext2fs_block_dev_desc = rbdd;
|
ext2fs_block_dev_desc = rbdd;
|
||||||
|
|
||||||
if (part == 0)
|
if (part == 0) {
|
||||||
{
|
|
||||||
/* disk doesn't use partition table */
|
/* disk doesn't use partition table */
|
||||||
part_info.start = 0;
|
part_info.start = 0;
|
||||||
part_info.size = rbdd->lba;
|
part_info.size = rbdd->lba;
|
||||||
part_info.blksz = rbdd->blksz;
|
part_info.blksz = rbdd->blksz;
|
||||||
}
|
} else {
|
||||||
else
|
if (get_partition_info
|
||||||
{
|
(ext2fs_block_dev_desc, part, &part_info)) {
|
||||||
if (get_partition_info (ext2fs_block_dev_desc, part, &part_info))
|
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,21 +53,16 @@ int ext2fs_set_blk_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int ext2fs_devread
|
int ext2fs_devread (int sector, int byte_offset, int byte_len, char *buf) {
|
||||||
(
|
|
||||||
int sector,
|
|
||||||
int byte_offset,
|
|
||||||
int byte_len,
|
|
||||||
char *buf
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char sec_buf[SECTOR_SIZE];
|
char sec_buf[SECTOR_SIZE];
|
||||||
unsigned block_len;
|
unsigned block_len;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check partition boundaries
|
* Check partition boundaries
|
||||||
*/
|
*/
|
||||||
if ((sector < 0) || ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS)) >= part_info.size))
|
if ((sector < 0)
|
||||||
{
|
|| ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS)) >=
|
||||||
|
part_info.size)) {
|
||||||
/* errnum = ERR_OUTSIDE_PART; */
|
/* errnum = ERR_OUTSIDE_PART; */
|
||||||
printf (" ** ext2fs_devread() read outside partition sector %d\n", sector);
|
printf (" ** ext2fs_devread() read outside partition sector %d\n", sector);
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -90,21 +78,22 @@ int ext2fs_devread
|
||||||
printf (" <%d, %d, %d>\n", sector, byte_offset, byte_len);
|
printf (" <%d, %d, %d>\n", sector, byte_offset, byte_len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ext2fs_block_dev_desc == NULL)
|
if (ext2fs_block_dev_desc == NULL) {
|
||||||
{
|
|
||||||
printf ("** Invalid Block Device Descriptor (NULL)\n");
|
printf ("** Invalid Block Device Descriptor (NULL)\n");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (byte_offset != 0)
|
if (byte_offset != 0) {
|
||||||
{
|
|
||||||
/* read first part which isn't aligned with start of sector */
|
/* read first part which isn't aligned with start of sector */
|
||||||
if (ext2fs_block_dev_desc->block_read(ext2fs_block_dev_desc->dev, part_info.start+sector, 1, (unsigned long *)sec_buf) != 1)
|
if (ext2fs_block_dev_desc->
|
||||||
{
|
block_read (ext2fs_block_dev_desc->dev,
|
||||||
|
part_info.start + sector, 1,
|
||||||
|
(unsigned long *) sec_buf) != 1) {
|
||||||
printf (" ** ext2fs_devread() read error **\n");
|
printf (" ** ext2fs_devread() read error **\n");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
memcpy(buf, sec_buf+byte_offset, min(SECTOR_SIZE-byte_offset, byte_len));
|
memcpy (buf, sec_buf + byte_offset,
|
||||||
|
min (SECTOR_SIZE - byte_offset, byte_len));
|
||||||
buf += min (SECTOR_SIZE - byte_offset, byte_len);
|
buf += min (SECTOR_SIZE - byte_offset, byte_len);
|
||||||
byte_len -= min (SECTOR_SIZE - byte_offset, byte_len);
|
byte_len -= min (SECTOR_SIZE - byte_offset, byte_len);
|
||||||
sector++;
|
sector++;
|
||||||
|
@ -115,8 +104,8 @@ int ext2fs_devread
|
||||||
if (ext2fs_block_dev_desc->block_read (ext2fs_block_dev_desc->dev,
|
if (ext2fs_block_dev_desc->block_read (ext2fs_block_dev_desc->dev,
|
||||||
part_info.start + sector,
|
part_info.start + sector,
|
||||||
block_len / SECTOR_SIZE,
|
block_len / SECTOR_SIZE,
|
||||||
(unsigned long *)buf) != block_len/SECTOR_SIZE)
|
(unsigned long *) buf) !=
|
||||||
{
|
block_len / SECTOR_SIZE) {
|
||||||
printf (" ** ext2fs_devread() read error - block\n");
|
printf (" ** ext2fs_devread() read error - block\n");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@ -124,14 +113,12 @@ int ext2fs_devread
|
||||||
byte_len -= block_len;
|
byte_len -= block_len;
|
||||||
sector += block_len / SECTOR_SIZE;
|
sector += block_len / SECTOR_SIZE;
|
||||||
|
|
||||||
if (byte_len != 0)
|
if (byte_len != 0) {
|
||||||
{
|
|
||||||
/* read rest of data which are not in whole sector */
|
/* read rest of data which are not in whole sector */
|
||||||
if (ext2fs_block_dev_desc->block_read(ext2fs_block_dev_desc->dev,
|
if (ext2fs_block_dev_desc->
|
||||||
part_info.start+sector,
|
block_read (ext2fs_block_dev_desc->dev,
|
||||||
1,
|
part_info.start + sector, 1,
|
||||||
(unsigned long *)sec_buf) != 1)
|
(unsigned long *) sec_buf) != 1) {
|
||||||
{
|
|
||||||
printf (" ** ext2fs_devread() read error - last part\n");
|
printf (" ** ext2fs_devread() read error - last part\n");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
538
fs/ext2/ext2fs.c
538
fs/ext2/ext2fs.c
File diff suppressed because it is too large
Load Diff
|
@ -143,8 +143,6 @@
|
||||||
|
|
||||||
#define MCFSIM_PLLCR 0x180 /* PLL Control register */
|
#define MCFSIM_PLLCR 0x180 /* PLL Control register */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some symbol defines for the above...
|
* Some symbol defines for the above...
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -392,8 +392,6 @@
|
||||||
#define CFG_PCI0_0_MEM_SPACE (CFG_PCI0_MEM_BASE)
|
#define CFG_PCI0_0_MEM_SPACE (CFG_PCI0_MEM_BASE)
|
||||||
#define CFG_PCI1_0_MEM_SPACE (CFG_PCI1_MEM_BASE)
|
#define CFG_PCI1_0_MEM_SPACE (CFG_PCI1_MEM_BASE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* PCI I/O MAP section */
|
/* PCI I/O MAP section */
|
||||||
#define CFG_PCI0_IO_BASE 0xfa000000
|
#define CFG_PCI0_IO_BASE 0xfa000000
|
||||||
#define CFG_PCI0_IO_SIZE _16M
|
#define CFG_PCI0_IO_SIZE _16M
|
||||||
|
|
|
@ -23,12 +23,10 @@
|
||||||
#ifndef _universe_h
|
#ifndef _universe_h
|
||||||
#define _universe_h
|
#define _universe_h
|
||||||
|
|
||||||
|
|
||||||
typedef struct _UNIVERSE UNIVERSE;
|
typedef struct _UNIVERSE UNIVERSE;
|
||||||
typedef struct _SLAVE_IMAGE SLAVE_IMAGE;
|
typedef struct _SLAVE_IMAGE SLAVE_IMAGE;
|
||||||
typedef struct _TDMA_CMD_PACKET TDMA_CMD_PACKET;
|
typedef struct _TDMA_CMD_PACKET TDMA_CMD_PACKET;
|
||||||
|
|
||||||
|
|
||||||
struct _SLAVE_IMAGE {
|
struct _SLAVE_IMAGE {
|
||||||
unsigned int ctl; /* Control */
|
unsigned int ctl; /* Control */
|
||||||
unsigned int bs; /* Base */
|
unsigned int bs; /* Base */
|
||||||
|
@ -148,10 +146,3 @@ struct _TDMA_CMD_PACKET {
|
||||||
#define PCI_MS_Mxx 0x03
|
#define PCI_MS_Mxx 0x03
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue