mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
Finish A10 Timer register definitions
This commit is contained in:
@@ -98,6 +98,7 @@ int nandmodel_find(FAR const struct nand_model_s *modeltab, size_t size,
|
||||
{
|
||||
if (modeltab[i].devid == id2)
|
||||
{
|
||||
fvdbg("NAND Model found: ID2=0x%02x ID4=0x%02x\n", id2, id4);
|
||||
found = true;
|
||||
|
||||
if (model)
|
||||
@@ -106,9 +107,8 @@ int nandmodel_find(FAR const struct nand_model_s *modeltab, size_t size,
|
||||
|
||||
if (model->blocksize == 0 || model->pagesize == 0)
|
||||
{
|
||||
fvdbg("Fetch from ID4(0x%.2x):\n", id4);
|
||||
|
||||
/* Fetch from the extended ID4
|
||||
/* Decode the extended ID4
|
||||
*
|
||||
* ID4 D5 D4 BlockSize || D1 D0 PageSize
|
||||
* 0 0 64K || 0 0 1K
|
||||
* 0 1 128K || 0 1 2K
|
||||
@@ -154,14 +154,13 @@ int nandmodel_find(FAR const struct nand_model_s *modeltab, size_t size,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fvdbg("NAND Model found:\n");
|
||||
fvdbg(" devid: 0x%02x\n", model->devid);
|
||||
fvdbg(" devsize: %d (MB)\n", model->devsize);
|
||||
fvdbg(" blocksize: %d (KB)\n", model->blocksize);
|
||||
fvdbg(" pagesize: %d (B)\n", model->pagesize);
|
||||
fvdbg(" options: 0x%02x\n", model->options);
|
||||
fvdbg(" devid: 0x%02x\n", model->devid);
|
||||
fvdbg(" devsize: %d (MB)\n", model->devsize);
|
||||
fvdbg(" blocksize: %d (KB)\n", model->blocksize);
|
||||
fvdbg(" pagesize: %d (B)\n", model->pagesize);
|
||||
fvdbg(" options: 0x%02x\n", model->options);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-4
@@ -2153,6 +2153,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, const char *partname)
|
||||
ret = -EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
dev->freesectors = (uint16_t) totalsectors;
|
||||
|
||||
/* Mark the device format status an unknown */
|
||||
@@ -2176,9 +2177,13 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, const char *partname)
|
||||
|
||||
#ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS
|
||||
if (partname != NULL)
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%d%sd1", minor, partname);
|
||||
{
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%d%sd1", minor, partname);
|
||||
}
|
||||
else
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%dd1", minor);
|
||||
{
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%dd1", minor);
|
||||
}
|
||||
|
||||
/* Inode private data is a reference to a struct containing
|
||||
* the SMART device structure and the root directory number.
|
||||
@@ -2203,9 +2208,13 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, const char *partname)
|
||||
|
||||
#else
|
||||
if (partname != NULL)
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%d%s", minor, partname);
|
||||
{
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%d%s", minor, partname);
|
||||
}
|
||||
else
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%d", minor);
|
||||
{
|
||||
snprintf(dev->rwbuffer, 18, "/dev/smart%d", minor);
|
||||
}
|
||||
|
||||
/* Inode private data is a reference to the SMART device structure */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user