diff --git a/[refs] b/[refs]
index 453eb7538873..e4be59c001fc 100644
--- a/[refs]
+++ b/[refs]
@@ -1,2 +1,2 @@
---
-refs/heads/master: b8be634e01b400fa2528848ad0cd6a5580a15bc4
+refs/heads/master: a1ee06b72968d80ab9362ec61143c4f090cc2d1b
diff --git a/trunk/arch/arm/mach-s3c6410/mach-hmt.c b/trunk/arch/arm/mach-s3c6410/mach-hmt.c
index 7619456f2ae8..cdd4b5378552 100644
--- a/trunk/arch/arm/mach-s3c6410/mach-hmt.c
+++ b/trunk/arch/arm/mach-s3c6410/mach-hmt.c
@@ -82,7 +82,7 @@ static int hmt_bl_init(struct device *dev)
return ret;
}
-static int hmt_bl_notify(struct device *dev, int brightness)
+static int hmt_bl_notify(int brightness)
{
/*
* translate from CIELUV/CIELAB L*->brightness, E.G. from
diff --git a/trunk/drivers/i2c/busses/i2c-imx.c b/trunk/drivers/i2c/busses/i2c-imx.c
index e3654d683e15..602b30e32cf3 100644
--- a/trunk/drivers/i2c/busses/i2c-imx.c
+++ b/trunk/drivers/i2c/busses/i2c-imx.c
@@ -226,7 +226,6 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
temp = readb(i2c_imx->base + IMX_I2C_I2CR);
temp &= ~(I2CR_MSTA | I2CR_MTX);
writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
- i2c_imx->stopped = 1;
}
if (cpu_is_mx1()) {
/*
@@ -236,8 +235,10 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
udelay(i2c_imx->disable_delay);
}
- if (!i2c_imx->stopped)
+ if (!i2c_imx->stopped) {
i2c_imx_bus_busy(i2c_imx, 0);
+ i2c_imx->stopped = 1;
+ }
/* Disable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2CR);
diff --git a/trunk/drivers/mtd/maps/Kconfig b/trunk/drivers/mtd/maps/Kconfig
index 2de0cc823d60..4c364d44ad59 100644
--- a/trunk/drivers/mtd/maps/Kconfig
+++ b/trunk/drivers/mtd/maps/Kconfig
@@ -549,21 +549,4 @@ config MTD_VMU
To build this as a module select M here, the module will be called
vmu-flash.
-config MTD_PISMO
- tristate "MTD discovery driver for PISMO modules"
- depends on I2C
- depends on ARCH_VERSATILE
- help
- This driver allows for discovery of PISMO modules - see
- . These are small modules containing
- up to five memory devices (eg, SRAM, flash, DOC) described by an
- I2C EEPROM.
-
- This driver does not create any MTD maps itself; instead it
- creates MTD physmap and MTD SRAM platform devices. If you
- enable this option, you should consider enabling MTD_PHYSMAP
- and/or MTD_PLATRAM according to the devices on your module.
-
- When built as a module, it will be called pismo.ko
-
endmenu
diff --git a/trunk/drivers/mtd/maps/pismo.c b/trunk/drivers/mtd/maps/pismo.c
deleted file mode 100644
index c48cad271f5d..000000000000
--- a/trunk/drivers/mtd/maps/pismo.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * PISMO memory driver - http://www.pismoworld.org/
- *
- * For ARM Realview and Versatile platforms
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License.
- */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define PISMO_NUM_CS 5
-
-struct pismo_cs_block {
- u8 type;
- u8 width;
- __le16 access;
- __le32 size;
- u32 reserved[2];
- char device[32];
-} __packed;
-
-struct pismo_eeprom {
- struct pismo_cs_block cs[PISMO_NUM_CS];
- char board[15];
- u8 sum;
-} __packed;
-
-struct pismo_mem {
- phys_addr_t base;
- u32 size;
- u16 access;
- u8 width;
- u8 type;
-};
-
-struct pismo_data {
- struct i2c_client *client;
- void (*vpp)(void *, int);
- void *vpp_data;
- struct platform_device *dev[PISMO_NUM_CS];
-};
-
-/* FIXME: set_vpp could do with a better calling convention */
-static struct pismo_data *vpp_pismo;
-static DEFINE_MUTEX(pismo_mutex);
-
-static int pismo_setvpp_probe_fix(struct pismo_data *pismo)
-{
- mutex_lock(&pismo_mutex);
- if (vpp_pismo) {
- mutex_unlock(&pismo_mutex);
- kfree(pismo);
- return -EBUSY;
- }
- vpp_pismo = pismo;
- mutex_unlock(&pismo_mutex);
- return 0;
-}
-
-static void pismo_setvpp_remove_fix(struct pismo_data *pismo)
-{
- mutex_lock(&pismo_mutex);
- if (vpp_pismo == pismo)
- vpp_pismo = NULL;
- mutex_unlock(&pismo_mutex);
-}
-
-static void pismo_set_vpp(struct map_info *map, int on)
-{
- struct pismo_data *pismo = vpp_pismo;
-
- pismo->vpp(pismo->vpp_data, on);
-}
-/* end of hack */
-
-
-static unsigned int __devinit pismo_width_to_bytes(unsigned int width)
-{
- width &= 15;
- if (width > 2)
- return 0;
- return 1 << width;
-}
-
-static int __devinit pismo_eeprom_read(struct i2c_client *client, void *buf,
- u8 addr, size_t size)
-{
- int ret;
- struct i2c_msg msg[] = {
- {
- .addr = client->addr,
- .len = sizeof(addr),
- .buf = &addr,
- }, {
- .addr = client->addr,
- .flags = I2C_M_RD,
- .len = size,
- .buf = buf,
- },
- };
-
- ret = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
-
- return ret == ARRAY_SIZE(msg) ? size : -EIO;
-}
-
-static int __devinit pismo_add_device(struct pismo_data *pismo, int i,
- struct pismo_mem *region, const char *name, void *pdata, size_t psize)
-{
- struct platform_device *dev;
- struct resource res = { };
- phys_addr_t base = region.base;
- int ret;
-
- if (base == ~0)
- return -ENXIO;
-
- res.start = base;
- res.end = base + region->size - 1;
- res.flags = IORESOURCE_MEM;
-
- dev = platform_device_alloc(name, i);
- if (!dev)
- return -ENOMEM;
- dev->dev.parent = &pismo->client->dev;
-
- do {
- ret = platform_device_add_resources(dev, &res, 1);
- if (ret)
- break;
-
- ret = platform_device_add_data(dev, pdata, psize);
- if (ret)
- break;
-
- ret = platform_device_add(dev);
- if (ret)
- break;
-
- pismo->dev[i] = dev;
- return 0;
- } while (0);
-
- platform_device_put(dev);
- return ret;
-}
-
-static int __devinit pismo_add_nor(struct pismo_data *pismo, int i,
- struct pismo_mem *region)
-{
- struct physmap_flash_data data = {
- .width = region->width,
- };
-
- if (pismo->vpp)
- data.set_vpp = pismo_set_vpp;
-
- return pismo_add_device(pismo, i, region, "physmap-flash",
- &data, sizeof(data));
-}
-
-static int __devinit pismo_add_sram(struct pismo_data *pismo, int i,
- struct pismo_mem *region)
-{
- struct platdata_mtd_ram data = {
- .bankwidth = region->width,
- };
-
- return pismo_add_device(pismo, i, region, "mtd-ram",
- &data, sizeof(data));
-}
-
-static void __devinit pismo_add_one(struct pismo_data *pismo, int i,
- const struct pismo_cs_block *cs, phys_addr_t base)
-{
- struct device *dev = &pismo->client->dev;
- struct pismo_mem region;
-
- region.base = base;
- region.type = cs->type;
- region.width = pismo_width_to_bytes(cs->width);
- region.access = le16_to_cpu(cs->access);
- region.size = le32_to_cpu(cs->size);
-
- if (region.width == 0) {
- dev_err(dev, "cs%u: bad width: %02x, ignoring\n", i, cs->width);
- return;
- }
-
- /*
- * FIXME: may need to the platforms memory controller here, but at
- * the moment we assume that it has already been correctly setup.
- * The memory controller can also tell us the base address as well.
- */
-
- dev_info(dev, "cs%u: %.32s: type %02x access %u00ps size %uK\n",
- i, cs->device, region.type, region.access, region.size / 1024);
-
- switch (region.type) {
- case 0:
- break;
- case 1:
- /* static DOC */
- break;
- case 2:
- /* static NOR */
- pismo_add_nor(pismo, i, ®ion);
- break;
- case 3:
- /* static RAM */
- pismo_add_sram(pismo, i, ®ion);
- break;
- }
-}
-
-static int __devexit pismo_remove(struct i2c_client *client)
-{
- struct pismo_data *pismo = i2c_get_clientdata(client);
- int i;
-
- for (i = 0; i < ARRAY_SIZE(pismo->dev); i++)
- platform_device_unregister(pismo->dev[i]);
-
- /* FIXME: set_vpp needs saner arguments */
- pismo_setvpp_remove_fix(pismo);
-
- kfree(pismo);
-
- return 0;
-}
-
-static int __devinit pismo_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
-{
- struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
- struct pismo_pdata *pdata = client->dev.platform_data;
- struct pismo_eeprom eeprom;
- struct pismo_data *pismo;
- int ret, i;
-
- if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
- dev_err(&client->dev, "functionality mismatch\n");
- return -EIO;
- }
-
- pismo = kzalloc(sizeof(*pismo), GFP_KERNEL);
- if (!pismo)
- return -ENOMEM;
-
- /* FIXME: set_vpp needs saner arguments */
- ret = pismo_setvpp_probe_fix(pismo);
- if (ret)
- return ret;
-
- pismo->client = client;
- if (pdata) {
- pismo->vpp = pdata->set_vpp;
- pismo->vpp_data = pdata->vpp_data;
- }
- i2c_set_clientdata(client, pismo);
-
- ret = pismo_eeprom_read(client, &eeprom, 0, sizeof(eeprom));
- if (ret < 0) {
- dev_err(&client->dev, "error reading EEPROM: %d\n", ret);
- return ret;
- }
-
- dev_info(&client->dev, "%.15s board found\n", eeprom.board);
-
- for (i = 0; i < ARRAY_SIZE(eeprom.cs); i++)
- if (eeprom.cs[i].type != 0xff)
- pismo_add_one(pismo, i, &eeprom.cs[i],
- pdata->cs_addrs[i]);
-
- return 0;
-}
-
-static const struct i2c_device_id pismo_id[] = {
- { "pismo" },
- { },
-};
-MODULE_DEVICE_TABLE(i2c, pismo_id);
-
-static struct i2c_driver pismo_driver = {
- .driver = {
- .name = "pismo",
- .owner = THIS_MODULE,
- },
- .probe = pismo_probe,
- .remove = __devexit_p(pismo_remove),
- .id_table = pismo_id,
-};
-
-static int __init pismo_init(void)
-{
- BUILD_BUG_ON(sizeof(struct pismo_cs_block) != 48);
- BUILD_BUG_ON(sizeof(struct pismo_eeprom) != 256);
-
- return i2c_add_driver(&pismo_driver);
-}
-module_init(pismo_init);
-
-static void __exit pismo_exit(void)
-{
- i2c_del_driver(&pismo_driver);
-}
-module_exit(pismo_exit);
-
-MODULE_AUTHOR("Russell King ");
-MODULE_DESCRIPTION("PISMO memory driver");
-MODULE_LICENSE("GPL");
diff --git a/trunk/drivers/mtd/mtdoops.c b/trunk/drivers/mtd/mtdoops.c
index 92e12df0917f..a714ec482761 100644
--- a/trunk/drivers/mtd/mtdoops.c
+++ b/trunk/drivers/mtd/mtdoops.c
@@ -322,7 +322,7 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper,
memcpy(dst + l1_cpy, s2 + s2_start, l2_cpy);
/* Panics must be written immediately */
- if (reason != KMSG_DUMP_OOPS) {
+ if (reason == KMSG_DUMP_PANIC) {
if (!cxt->mtd->panic_write)
printk(KERN_ERR "mtdoops: Cannot write from panic without panic_write\n");
else
diff --git a/trunk/drivers/mtd/tests/mtd_readtest.c b/trunk/drivers/mtd/tests/mtd_readtest.c
index 25c5dd03a837..79fc4530987b 100644
--- a/trunk/drivers/mtd/tests/mtd_readtest.c
+++ b/trunk/drivers/mtd/tests/mtd_readtest.c
@@ -147,10 +147,6 @@ static int scan_for_bad_eraseblocks(void)
}
memset(bbt, 0 , ebcnt);
- /* NOR flash does not implement block_isbad */
- if (mtd->block_isbad == NULL)
- return 0;
-
printk(PRINT_PREF "scanning for bad eraseblocks\n");
for (i = 0; i < ebcnt; ++i) {
bbt[i] = is_block_bad(i) ? 1 : 0;
@@ -188,7 +184,7 @@ static int __init mtd_readtest_init(void)
tmp = mtd->size;
do_div(tmp, mtd->erasesize);
ebcnt = tmp;
- pgcnt = mtd->erasesize / pgsize;
+ pgcnt = mtd->erasesize / mtd->writesize;
printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, "
"page size %u, count of eraseblocks %u, pages per "
diff --git a/trunk/drivers/mtd/tests/mtd_speedtest.c b/trunk/drivers/mtd/tests/mtd_speedtest.c
index 7fbb51d4eabe..141363a7e805 100644
--- a/trunk/drivers/mtd/tests/mtd_speedtest.c
+++ b/trunk/drivers/mtd/tests/mtd_speedtest.c
@@ -301,10 +301,6 @@ static int scan_for_bad_eraseblocks(void)
}
memset(bbt, 0 , ebcnt);
- /* NOR flash does not implement block_isbad */
- if (mtd->block_isbad == NULL)
- goto out;
-
printk(PRINT_PREF "scanning for bad eraseblocks\n");
for (i = 0; i < ebcnt; ++i) {
bbt[i] = is_block_bad(i) ? 1 : 0;
@@ -313,7 +309,6 @@ static int scan_for_bad_eraseblocks(void)
cond_resched();
}
printk(PRINT_PREF "scanned %d eraseblocks, %d are bad\n", i, bad);
-out:
goodebcnt = ebcnt - bad;
return 0;
}
@@ -345,7 +340,7 @@ static int __init mtd_speedtest_init(void)
tmp = mtd->size;
do_div(tmp, mtd->erasesize);
ebcnt = tmp;
- pgcnt = mtd->erasesize / pgsize;
+ pgcnt = mtd->erasesize / mtd->writesize;
printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, "
"page size %u, count of eraseblocks %u, pages per "
diff --git a/trunk/drivers/mtd/tests/mtd_stresstest.c b/trunk/drivers/mtd/tests/mtd_stresstest.c
index a99d3cd737d8..63920476b57a 100644
--- a/trunk/drivers/mtd/tests/mtd_stresstest.c
+++ b/trunk/drivers/mtd/tests/mtd_stresstest.c
@@ -227,10 +227,6 @@ static int scan_for_bad_eraseblocks(void)
}
memset(bbt, 0 , ebcnt);
- /* NOR flash does not implement block_isbad */
- if (mtd->block_isbad == NULL)
- return 0;
-
printk(PRINT_PREF "scanning for bad eraseblocks\n");
for (i = 0; i < ebcnt; ++i) {
bbt[i] = is_block_bad(i) ? 1 : 0;
@@ -269,7 +265,7 @@ static int __init mtd_stresstest_init(void)
tmp = mtd->size;
do_div(tmp, mtd->erasesize);
ebcnt = tmp;
- pgcnt = mtd->erasesize / pgsize;
+ pgcnt = mtd->erasesize / mtd->writesize;
printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, "
"page size %u, count of eraseblocks %u, pages per "
diff --git a/trunk/include/linux/kmsg_dump.h b/trunk/include/linux/kmsg_dump.h
index 24b44145a886..e32aa268efac 100644
--- a/trunk/include/linux/kmsg_dump.h
+++ b/trunk/include/linux/kmsg_dump.h
@@ -17,7 +17,6 @@
enum kmsg_dump_reason {
KMSG_DUMP_OOPS,
KMSG_DUMP_PANIC,
- KMSG_DUMP_KEXEC,
};
/**
diff --git a/trunk/include/linux/mtd/pismo.h b/trunk/include/linux/mtd/pismo.h
deleted file mode 100644
index 8dfb7e1421c5..000000000000
--- a/trunk/include/linux/mtd/pismo.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * PISMO memory driver - http://www.pismoworld.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License.
- */
-#ifndef __LINUX_MTD_PISMO_H
-#define __LINUX_MTD_PISMO_H
-
-struct pismo_pdata {
- void (*set_vpp)(void *, int);
- void *vpp_data;
- phys_addr_t cs_addrs[5];
-};
-
-#endif
diff --git a/trunk/kernel/kexec.c b/trunk/kernel/kexec.c
index ef077fb73155..a9a93d9ee7a7 100644
--- a/trunk/kernel/kexec.c
+++ b/trunk/kernel/kexec.c
@@ -32,7 +32,6 @@
#include
#include
#include
-#include
#include
#include
@@ -1075,9 +1074,6 @@ void crash_kexec(struct pt_regs *regs)
if (mutex_trylock(&kexec_mutex)) {
if (kexec_crash_image) {
struct pt_regs fixed_regs;
-
- kmsg_dump(KMSG_DUMP_KEXEC);
-
crash_setup_regs(&fixed_regs, regs);
crash_save_vmcoreinfo();
machine_crash_shutdown(&fixed_regs);
diff --git a/trunk/kernel/panic.c b/trunk/kernel/panic.c
index c787333282b8..5827f7b97254 100644
--- a/trunk/kernel/panic.c
+++ b/trunk/kernel/panic.c
@@ -75,6 +75,7 @@ NORET_TYPE void panic(const char * fmt, ...)
dump_stack();
#endif
+ kmsg_dump(KMSG_DUMP_PANIC);
/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
@@ -82,8 +83,6 @@ NORET_TYPE void panic(const char * fmt, ...)
*/
crash_kexec(NULL);
- kmsg_dump(KMSG_DUMP_PANIC);
-
/*
* Note smp_send_stop is the usual smp shutdown function, which
* unfortunately means it may not be hardened to work in a panic
diff --git a/trunk/kernel/printk.c b/trunk/kernel/printk.c
index 1751c456b71f..17463ca2e229 100644
--- a/trunk/kernel/printk.c
+++ b/trunk/kernel/printk.c
@@ -1467,7 +1467,6 @@ EXPORT_SYMBOL_GPL(kmsg_dump_unregister);
static const char const *kmsg_reasons[] = {
[KMSG_DUMP_OOPS] = "oops",
[KMSG_DUMP_PANIC] = "panic",
- [KMSG_DUMP_KEXEC] = "kexec",
};
static const char *kmsg_to_str(enum kmsg_dump_reason reason)