summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-06 15:56:03 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-06 15:56:03 +0000
commit282cd9f4b252f53fac44c04ee788f06e13be28b5 (patch)
tree28cb20ca179619f334b1093fc62ff7e0ba359a3f /target/linux/ar71xx/files/arch
parentdd385a9449d326f4abdc774b8474c9bf88fa821b (diff)
[ar71xx] update flash locking code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16359 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c12
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h1
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h1
4 files changed, 4 insertions, 12 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c b/target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c
index ea7ae143b..a13c92812 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/ar71xx.c
@@ -17,7 +17,6 @@
#include <asm/mach-ar71xx/ar71xx.h>
static DEFINE_MUTEX(ar71xx_flash_mutex);
-static int ar71xx_flash_lock_enabled;
void __iomem *ar71xx_ddr_base;
EXPORT_SYMBOL_GPL(ar71xx_ddr_base);
@@ -102,21 +101,14 @@ void ar71xx_ddr_flush(u32 reg)
}
EXPORT_SYMBOL_GPL(ar71xx_ddr_flush);
-void __init ar71xx_flash_lock_enable(void)
-{
- ar71xx_flash_lock_enabled = 1;
-}
-
void ar71xx_flash_acquire(void)
{
- if (ar71xx_flash_lock_enabled)
- mutex_lock(&ar71xx_flash_mutex);
+ mutex_lock(&ar71xx_flash_mutex);
}
EXPORT_SYMBOL_GPL(ar71xx_flash_acquire);
void ar71xx_flash_release(void)
{
- if (ar71xx_flash_lock_enabled)
- mutex_unlock(&ar71xx_flash_mutex);
+ mutex_unlock(&ar71xx_flash_mutex);
}
EXPORT_SYMBOL_GPL(ar71xx_flash_release);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
index c88f68a41..8564b01a6 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
@@ -221,7 +221,7 @@ static void __init ap83_generic_setup(void)
static void __init ap83_040_setup(void)
{
- ar71xx_flash_lock_enable();
+ ap83_flash_data.is_shared=1;
ap83_generic_setup();
platform_device_register(&ap83_040_spi_device);
}
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
index 19a546e56..51afcecb5 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
@@ -422,7 +422,6 @@ void ar71xx_device_start(u32 mask);
#define SPI_IOC_CS2 SPI_IOC_CS(2)
#define SPI_IOC_CS_ALL (SPI_IOC_CS0 | SPI_IOC_CS1 | SPI_IOC_CS2)
-void ar71xx_flash_lock_enable(void) __init;
void ar71xx_flash_acquire(void);
void ar71xx_flash_release(void);
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h
index b008abd8d..5644fc956 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h
@@ -55,6 +55,7 @@ struct ar71xx_spi_platform_data {
struct ar91xx_flash_platform_data {
unsigned int width;
+ u8 is_shared:1;
#ifdef CONFIG_MTD_PARTITIONS
unsigned int nr_parts;
struct mtd_partition *parts;