1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-29 17:05:00 +02:00

fix-wild-comment-GLAMO_FB_.patch

Some crud leaked in last commits.  Plus more nice printing.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-11-28 10:16:37 +00:00 committed by Andy Green
parent 1b043e0fe5
commit b6dd949b0e

View File

@ -158,7 +158,7 @@ static int mmc_cmd(int opcode, int arg, int flags,
GLAMO_REGOFS_MMC + GLAMO_REG_MMC_WDATADS1); GLAMO_REGOFS_MMC + GLAMO_REG_MMC_WDATADS1);
glamo_reg_write((u16)(GLAMO_FB_SIZE >> 16), glamo_reg_write((u16)(GLAMO_FB_SIZE >> 16),
GLAMO_REGOFS_MMC + GLAMO_REG_MMC_WDATADS2); GLAMO_REGOFS_MMC + GLAMO_REG_MMC_WDATADS2);
glamo_reg_write((u16)GLAMO_FB_/*SIZE*/, glamo_reg_write((u16)GLAMO_FB_SIZE,
GLAMO_REGOFS_MMC + GLAMO_REG_MMC_RDATADS1); GLAMO_REGOFS_MMC + GLAMO_REG_MMC_RDATADS1);
glamo_reg_write((u16)(GLAMO_FB_SIZE >> 16), glamo_reg_write((u16)(GLAMO_FB_SIZE >> 16),
GLAMO_REGOFS_MMC + GLAMO_REG_MMC_RDATADS2); GLAMO_REGOFS_MMC + GLAMO_REG_MMC_RDATADS2);
@ -521,7 +521,7 @@ static void print_mmc_cid(mmc_cid_t *cid)
#endif #endif
static void print_sd_cid(const struct sd_cid *cid) static void print_sd_cid(const struct sd_cid *cid)
{ {
puts("Card Type: "); puts(" Card Type: ");
switch (card_type) { switch (card_type) {
case CARDTYPE_NONE: case CARDTYPE_NONE:
puts("(None)\n"); puts("(None)\n");
@ -539,19 +539,33 @@ static void print_sd_cid(const struct sd_cid *cid)
puts("SD 2.0 SDHC\n"); puts("SD 2.0 SDHC\n");
break; break;
} }
#if 0
printf("Manufacturer: 0x%02x, OEM \"%c%c\"\n", puts(" Manufacturer: 0x");
cid->mid, cid->oid_0, cid->oid_1); print8(cid->mid);
printf("Product name: \"%c%c%c%c%c\", revision %d.%d\n", puts(", OEM \"");
cid->pnm_0, cid->pnm_1, cid->pnm_2, cid->pnm_3, cid->pnm_4, this_board->putc(cid->oid_0);
cid->prv >> 4, cid->prv & 15); this_board->putc(cid->oid_1);
printf("Serial number: %u\n", puts("\"\n");
cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 |
puts(" Product name: \"");
this_board->putc(cid->pnm_0);
this_board->putc(cid->pnm_1);
this_board->putc(cid->pnm_2);
this_board->putc(cid->pnm_3);
this_board->putc(cid->pnm_4);
puts("\", revision ");
printdec(cid->prv >> 4);
puts(".");
printdec(cid->prv & 15);
puts("\nSerial number: ");
printdec(cid->psn_0 << 24 | cid->psn_1 << 16 | cid->psn_2 << 8 |
cid->psn_3); cid->psn_3);
printf("Manufacturing date: %d/%d\n", puts("\n Manf. date: ");
cid->mdt_1 & 15, printdec(cid->mdt_1 & 15);
2000+((cid->mdt_0 & 15) << 4)+((cid->mdt_1 & 0xf0) >> 4)); puts("/");
#endif printdec(2000 + ((cid->mdt_0 & 15) << 4)+((cid->mdt_1 & 0xf0) >> 4));
puts("\n");
/* printf("CRC: 0x%02x, b0 = %d\n", /* printf("CRC: 0x%02x, b0 = %d\n",
cid->crc >> 1, cid->crc & 1); */ cid->crc >> 1, cid->crc & 1); */
} }
@ -563,7 +577,7 @@ int mmc_init(int verbose)
int resp; int resp;
u8 response[16]; u8 response[16];
// mmc_cid_t *mmc_cid = (mmc_cid_t *)response; // mmc_cid_t *mmc_cid = (mmc_cid_t *)response;
// struct sd_cid *sd_cid = (struct sd_cid *)response; struct sd_cid *sd_cid = (struct sd_cid *)response;
u32 hcs = 0; u32 hcs = 0;
card_type = CARDTYPE_NONE; card_type = CARDTYPE_NONE;
@ -711,6 +725,7 @@ int mmc_init(int verbose)
case CARDTYPE_SD: case CARDTYPE_SD:
case CARDTYPE_SD20: case CARDTYPE_SD20:
case CARDTYPE_SDHC: case CARDTYPE_SDHC:
if (verbose) if (verbose)
print_sd_cid(sd_cid); print_sd_cid(sd_cid);
#if 0 #if 0
@ -754,7 +769,7 @@ int mmc_init(int verbose)
// mmc_dev.lba = (((unsigned long)1 << csd->c_size_mult1) * // mmc_dev.lba = (((unsigned long)1 << csd->c_size_mult1) *
// (unsigned long)csd->c_size) >> 9; // (unsigned long)csd->c_size) >> 9;
puts(" MMC/SD size: "); puts(" MMC/SD size: ");
print32((((unsigned long)1 << csd->c_size_mult1) * printdec((((unsigned long)1 << csd->c_size_mult1) *
(unsigned long)csd->c_size) >> 10); (unsigned long)csd->c_size) >> 10);
puts(" MiB\n"); puts(" MiB\n");
} }