Merge branch 'master' into next
This commit is contained in:
commit
1096fa4eca
|
@ -290,21 +290,21 @@ mem_initcall(beagle_mem_init);
|
|||
static int beagle_devices_init(void)
|
||||
{
|
||||
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
|
||||
add_generic_device("i2c-omap", -1, NULL, 0x4809C000, SZ_4K,
|
||||
add_generic_device("i2c-omap", -1, NULL, OMAP_I2C1_BASE, SZ_4K,
|
||||
IORESOURCE_MEM, NULL);
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_OMAP
|
||||
if (ehci_omap_init(&omap_ehci_pdata) >= 0)
|
||||
add_usb_ehci_device(-1, 0x48064700 + 0x100,
|
||||
0x48064700 + 0x110, &ehci_pdata);
|
||||
add_usb_ehci_device(-1, OMAP_EHCI_BASE,
|
||||
OMAP_EHCI_BASE + 0x10, &ehci_pdata);
|
||||
#endif /* CONFIG_USB_EHCI_OMAP */
|
||||
#ifdef CONFIG_GPMC
|
||||
#ifdef CONFIG_OMAP_GPMC
|
||||
/* WP is made high and WAIT1 active Low */
|
||||
gpmc_generic_init(0x10);
|
||||
#endif
|
||||
gpmc_generic_nand_devices_init(0, 16, OMAP_ECC_HAMMING_CODE_HW_ROMCODE);
|
||||
|
||||
add_generic_device("omap-hsmmc", -1, NULL, OMAP_I2C1_BASE, 0,
|
||||
add_generic_device("omap-hsmmc", -1, NULL, OMAP_MMC1_BASE, SZ_4K,
|
||||
IORESOURCE_MEM, NULL);
|
||||
|
||||
armlinux_set_bootparams((void *)0x80000100);
|
||||
|
|
|
@ -246,7 +246,7 @@ mem_initcall(omap3evm_mem_init);
|
|||
|
||||
static int omap3evm_init_devices(void)
|
||||
{
|
||||
#ifdef CONFIG_GPMC
|
||||
#ifdef CONFIG_OMAP_GPMC
|
||||
/*
|
||||
* WP is made high and WAIT1 active Low
|
||||
*/
|
||||
|
|
|
@ -635,7 +635,7 @@ mem_initcall(sdp3430_mem_init);
|
|||
|
||||
static int sdp3430_devices_init(void)
|
||||
{
|
||||
#ifdef CONFIG_GPMC
|
||||
#ifdef CONFIG_OMAP_GPMC
|
||||
/* WP is made high and WAIT1 active Low */
|
||||
gpmc_generic_init(0x10);
|
||||
#endif
|
||||
|
|
|
@ -286,7 +286,7 @@ static void pcaal1_setup_net_chip(void)
|
|||
static int pcaal1_mem_init(void)
|
||||
{
|
||||
|
||||
#ifdef CONFIG_GPMC
|
||||
#ifdef CONFIG_OMAP_GPMC
|
||||
/*
|
||||
* WP is made high and WAIT1 active Low
|
||||
*/
|
||||
|
|
|
@ -178,6 +178,7 @@ config CMD_NANDTEST
|
|||
depends on NAND
|
||||
depends on PARTITION
|
||||
depends on NAND_ECC_HW || NAND_ECC_SOFT
|
||||
select PARTITION_NEED_MTD
|
||||
prompt "nandtest"
|
||||
|
||||
endmenu
|
||||
|
|
|
@ -349,7 +349,7 @@ err:
|
|||
|
||||
/* String for usage of nandtest */
|
||||
static const __maybe_unused char cmd_nandtest_help[] =
|
||||
"Usage: nand [OPTION] <device>\n"
|
||||
"Usage: nandtest [OPTION] <device>\n"
|
||||
" -t, Really do a nandtest on device.\n"
|
||||
" -m, Mark blocks bad if they appear so.\n"
|
||||
" -s <seed>, Supply random seed.\n"
|
||||
|
|
|
@ -116,17 +116,22 @@ out:
|
|||
|
||||
int mtd_ioctl(struct cdev *cdev, int request, void *buf)
|
||||
{
|
||||
int ret = 0;
|
||||
struct mtd_info *mtd = cdev->priv;
|
||||
struct mtd_info_user *user = buf;
|
||||
struct mtd_ecc_stats *ecc = buf;
|
||||
struct region_info_user *reg = buf;
|
||||
|
||||
switch (request) {
|
||||
case MEMGETBADBLOCK:
|
||||
dev_dbg(cdev->dev, "MEMGETBADBLOCK: 0x%08lx\n", (off_t)buf);
|
||||
return mtd->block_isbad(mtd, (off_t)buf);
|
||||
ret = mtd->block_isbad(mtd, (off_t)buf);
|
||||
break;
|
||||
#ifdef CONFIG_MTD_WRITE
|
||||
case MEMSETBADBLOCK:
|
||||
dev_dbg(cdev->dev, "MEMSETBADBLOCK: 0x%08lx\n", (off_t)buf);
|
||||
return mtd->block_markbad(mtd, (off_t)buf);
|
||||
ret = mtd->block_markbad(mtd, (off_t)buf);
|
||||
break;
|
||||
#endif
|
||||
case MEMGETINFO:
|
||||
user->type = mtd->type;
|
||||
|
@ -138,10 +143,28 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
|
|||
/* The below fields are obsolete */
|
||||
user->ecctype = -1;
|
||||
user->eccsize = 0;
|
||||
return 0;
|
||||
break;
|
||||
#if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
|
||||
case ECCGETSTATS:
|
||||
ecc->corrected = mtd->ecc_stats.corrected;
|
||||
ecc->failed = mtd->ecc_stats.failed;
|
||||
ecc->badblocks = mtd->ecc_stats.badblocks;
|
||||
ecc->bbtblocks = mtd->ecc_stats.bbtblocks;
|
||||
break;
|
||||
#endif
|
||||
case MEMGETREGIONINFO:
|
||||
if (cdev->mtd) {
|
||||
reg->offset = cdev->offset;
|
||||
reg->erasesize = cdev->mtd->erasesize;
|
||||
reg->numblocks = cdev->size/reg->erasesize;
|
||||
reg->regionindex = cdev->mtd->index;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MTD_WRITE
|
||||
|
|
|
@ -103,15 +103,18 @@ int cdev_flush(struct cdev *cdev)
|
|||
|
||||
static int partition_ioctl(struct cdev *cdev, int request, void *buf)
|
||||
{
|
||||
int ret = 0;
|
||||
size_t offset;
|
||||
struct mtd_info_user *user = buf;
|
||||
struct region_info_user *reg = buf;
|
||||
|
||||
switch (request) {
|
||||
case MEMSETBADBLOCK:
|
||||
case MEMGETBADBLOCK:
|
||||
offset = (off_t)buf;
|
||||
offset += cdev->offset;
|
||||
return cdev->ops->ioctl(cdev, request, (void *)offset);
|
||||
ret = cdev->ops->ioctl(cdev, request, (void *)offset);
|
||||
break;
|
||||
case MEMGETINFO:
|
||||
if (cdev->mtd) {
|
||||
user->type = cdev->mtd->type;
|
||||
|
@ -123,14 +126,38 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf)
|
|||
/* The below fields are obsolete */
|
||||
user->ecctype = -1;
|
||||
user->eccsize = 0;
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
if (!cdev->ops->ioctl)
|
||||
return -EINVAL;
|
||||
return cdev->ops->ioctl(cdev, request, buf);
|
||||
if (!cdev->ops->ioctl) {
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
ret = cdev->ops->ioctl(cdev, request, buf);
|
||||
break;
|
||||
#if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
|
||||
case ECCGETSTATS:
|
||||
if (!cdev->ops->ioctl) {
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
ret = cdev->ops->ioctl(cdev, request, buf);
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_PARTITION
|
||||
case MEMGETREGIONINFO:
|
||||
if (cdev->mtd) {
|
||||
reg->offset = cdev->offset;
|
||||
reg->erasesize = cdev->mtd->erasesize;
|
||||
reg->numblocks = cdev->size/reg->erasesize;
|
||||
reg->regionindex = cdev->mtd->index;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int cdev_ioctl(struct cdev *cdev, int request, void *buf)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* TWL6030 header file.
|
||||
*/
|
||||
|
||||
#ifndef __MCI_TWL6030_H__
|
||||
#define __MCI_TWL6030_H__
|
||||
|
||||
void twl6030_mci_power_init(void);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue