mbr.c: In function 'get_ebr_table':
mbr.c:140: warning: implicit declaration of function 'mmc_read_blocks'
mbr.c:133: warning: unused variable 'cylinder'
mbr.c:133: warning: unused variable 'sector'
mbr.c:132: warning: unused variable 'msg'
mbr.c:353: warning: initialization from incompatible pointer type
cmd_usbd.c: In function 'set_mbr_info':
cmd_usbd.c:726: warning: implicit declaration of function 'set_mbr_table'
cmd_usbd.c: In function 'do_usbd_down':
cmd_usbd.c:1401: warning: implicit declaration of function 'get_mbr_table'
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
#include <ubinize.h>
#endif
#include <ubinize.h>
#endif
static const char pszMe[] = "usbd: ";
static struct usbd_ops usbd_ops;
static const char pszMe[] = "usbd: ";
static struct usbd_ops usbd_ops;
unsigned short signature;
};
unsigned short signature;
};
-void set_chs_value(struct mbr_partition *part, int part_num)
+static inline void set_chs_value(struct mbr_partition *part, int part_num)
{
/* FIXME */
if (part_num == 0) {
{
/* FIXME */
if (part_num == 0) {
{
struct mbr *ebr;
struct mbr_partition *p;
{
struct mbr *ebr;
struct mbr_partition *p;
- char buf[512], msg[512];
- int ret, i, sector, cylinder;
+ char buf[512];
+ int ret, i;
int lba = 0;
if (ebr_next)
lba = extended_lba;
lba += mp->lba;
int lba = 0;
if (ebr_next)
lba = extended_lba;
lba += mp->lba;
- ret = mmc_read_blocks(mmc, buf, lba , 1);
+ ret = mmc->block_dev.block_read(0, lba, 1, buf);
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return 0;
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return 0;
- ret = mmc_read_blocks(mmc, buf, 0, 1);
+ ret = mmc->block_dev.block_read(0, 0, 1, buf);
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return 0;
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return 0;
lba += mp->lba;
printf(">>> Read sector from 0x%08x (LBA: 0x%08x + 0x%x)\n",
lba, mp->lba, (lba == mp->lba) ? 0 : lba - mp->lba);
lba += mp->lba;
printf(">>> Read sector from 0x%08x (LBA: 0x%08x + 0x%x)\n",
lba, mp->lba, (lba == mp->lba) ? 0 : lba - mp->lba);
- ret = mmc_read_blocks(mmc, buf, lba , 1);
+
+ ret = mmc->block_dev.block_read(0, lba, 1, buf);
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return;
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return;
- ret = mmc_read_blocks(mmc, msg, lba, 1);
+ ret = mmc->block_dev.block_read(0, lba, 1, msg);
for (i = 0; i < 8; i++)
putc(msg[i]);
for (i = 0; i < 8; i++)
putc(msg[i]);
- ret = mmc_read_blocks(mmc, buf, 0, 1);
+ ret = mmc->block_dev.block_read(0, 0, 1, buf);
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return;
if (ret != 1) {
printf("%s[%d] mmc_read_blocks %d\n", __func__, __LINE__, ret);
return;
-static int do_mbr(cmd_tbl_t *cmdtp, int flag, int argc, const char *argv[])
+static int do_mbr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
case 2:
{
switch (argc) {
case 2:
--- /dev/null
+/*
+ * Copyright (C) 2010 Samsung Electrnoics
+ */
+
+void set_mbr_table(unsigned int start_addr, int parts,
+ unsigned int *blocks, unsigned int *part_offset);
+int get_mbr_table(unsigned int *part_offset);