diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2005-07-18 00:21:27 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-18 00:21:27 +0000 |
commit | cd85f60d54d9d56e5cae3d1180120f3d7e82a29d (patch) | |
tree | 7d3687cb687587a5095051025aba545c51bc4bea /packages/linux | |
parent | d974a5a9ea1437acad1346ab1ee7b170690a179c (diff) |
Fix for the hardware reset hang problem - shut down the flash memory
device (ensure it is in read mode, not write) on halt/reboot.
Diffstat (limited to 'packages/linux')
-rw-r--r-- | packages/linux/nslu2-kernel.inc | 2 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel_2.6.12.2.bb | 3 | ||||
-rw-r--r-- | packages/linux/nslu2-kernel_2.6.12.bb | 3 | ||||
-rw-r--r-- | packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch | 66 | ||||
-rw-r--r-- | packages/linux/openslug-kernel_2.6.11.2.bb | 3 |
5 files changed, 74 insertions, 3 deletions
diff --git a/packages/linux/nslu2-kernel.inc b/packages/linux/nslu2-kernel.inc index 991805e1ab..44f466ef49 100644 --- a/packages/linux/nslu2-kernel.inc +++ b/packages/linux/nslu2-kernel.inc @@ -25,6 +25,7 @@ # file://ixp4xx_copy_from.patch;patch=1 # file://anonymiser.patch;patch=1 # file://xscale-reset.patch;patch=1 +# file://mtd-shutdown.patch;patch=1 # ${N2K_EXTRA_PATCHES} # # N2K_SUFFIX - the suffix to add after 'zImage-' in the @@ -194,6 +195,7 @@ N2K_PATCHES ?= "\ file://ixp4xx_copy_from.patch;patch=1 \ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ ${N2K_EXTRA_PATCHES}" N2K_SUFFIX ?= "openslug" diff --git a/packages/linux/nslu2-kernel_2.6.12.2.bb b/packages/linux/nslu2-kernel_2.6.12.2.bb index afd0ec8321..6fbb5d02ae 100644 --- a/packages/linux/nslu2-kernel_2.6.12.2.bb +++ b/packages/linux/nslu2-kernel_2.6.12.2.bb @@ -1,5 +1,5 @@ # Kernel for NSLU2 -PR = "r2" +PR = "r3" include nslu2-kernel.inc # N2K_EXTRA_PATCHES - list of patches to apply (can include @@ -20,4 +20,5 @@ N2K_PATCHES = "\ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ file://x1205-rtc.c-id.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ " diff --git a/packages/linux/nslu2-kernel_2.6.12.bb b/packages/linux/nslu2-kernel_2.6.12.bb index 8ab9379708..6cea8a4daa 100644 --- a/packages/linux/nslu2-kernel_2.6.12.bb +++ b/packages/linux/nslu2-kernel_2.6.12.bb @@ -1,5 +1,5 @@ # Kernel for NSLU2 -PR = "r1" +PR = "r2" include nslu2-kernel.inc # N2K_EXTRA_PATCHES - list of patches to apply (can include @@ -20,4 +20,5 @@ N2K_PATCHES = "\ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ file://x1205-rtc.c-id.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ " diff --git a/packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch b/packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch new file mode 100644 index 0000000000..e7cce4ebc0 --- /dev/null +++ b/packages/linux/openslug-kernel-2.6.11.2/mtd-shutdown.patch @@ -0,0 +1,66 @@ +# Ensure that the MTD is shut down on halt/reboot, otherwise the +# hardware reset hangs + +--- linux-2.6.12.2/drivers/mtd/maps/ixp4xx.c.orig 2005-07-17 15:07:47.790388300 -0700 ++++ linux-2.6.12.2/drivers/mtd/maps/ixp4xx.c 2005-07-17 17:00:08.082672710 -0700 +@@ -144,6 +144,52 @@ + return 0; + } + ++static void ixp4xx_flash_shutdown(struct device *_dev) ++{ ++ struct platform_device *dev = to_platform_device(_dev); ++ struct flash_platform_data *plat = dev->dev.platform_data; ++ struct ixp4xx_flash_info *info = dev_get_drvdata(&dev->dev); ++ map_word d; ++ ++ dev_set_drvdata(&dev->dev, NULL); ++ ++ if(!info) ++ return; ++ ++ /* ++ * This is required for a soft reboot to work. ++ */ ++ d.x[0] = 0xff; ++ ixp4xx_write16(&info->map, d, 0x55 * 0x2); ++ ++#if 0 ++ /* This is commented out because it seems to cause a kernel ++ * panic (at least if it isn't commented out the kernel fails ++ * to shut down). Should be investigated. ++ */ ++ if (info->mtd) { ++ del_mtd_partitions(info->mtd); ++ map_destroy(info->mtd); ++ } ++#endif ++ if (info->map.map_priv_1) ++ iounmap((void *) info->map.map_priv_1); ++ ++ if (info->partitions) ++ kfree(info->partitions); ++ ++ if (info->res) { ++ release_resource(info->res); ++ kfree(info->res); ++ } ++ ++ if (plat->exit) ++ plat->exit(); ++ ++ /* Disable flash write */ ++ *IXP4XX_EXP_CS0 &= ~IXP4XX_FLASH_WRITABLE; ++} ++ + static int ixp4xx_flash_probe(struct device *_dev) + { + struct platform_device *dev = to_platform_device(_dev); +@@ -243,6 +289,7 @@ + .bus = &platform_bus_type, + .probe = ixp4xx_flash_probe, + .remove = ixp4xx_flash_remove, ++ .shutdown = ixp4xx_flash_shutdown, + }; + + static int __init ixp4xx_flash_init(void) diff --git a/packages/linux/openslug-kernel_2.6.11.2.bb b/packages/linux/openslug-kernel_2.6.11.2.bb index 1fe7da7344..8e2555d014 100644 --- a/packages/linux/openslug-kernel_2.6.11.2.bb +++ b/packages/linux/openslug-kernel_2.6.11.2.bb @@ -2,7 +2,7 @@ SECTION = "kernel" DESCRIPTION = "Linux kernel for the Linksys NSLU2 device" LICENSE = "GPL" MAINTAINER = "Chris Larson <kergoth@handhelds.org>" -PR = "r14" +PR = "r15" KERNEL_SUFFIX = "openslug" @@ -12,6 +12,7 @@ SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.2.tar.bz2 \ file://ixp4xx_copy_from.patch;patch=1 \ file://anonymiser.patch;patch=1 \ file://xscale-reset.patch;patch=1 \ + file://mtd-shutdown.patch;patch=1 \ file://defconfig \ file://x1205-rtc.c \ file://nslu2-io.c \ |