diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-06-21 19:23:38 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-06-21 19:23:38 +0000 |
commit | 1d0c4edda14e0be05362dc7c63de2eb378676a13 (patch) | |
tree | 0246c4e2ef7b0a463d75d49bdf1305c60ee48f9d /target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch | |
parent | 6cacd1932f77b4026e00e1d170ecca9c1d388867 (diff) | |
download | upstream-1d0c4edda14e0be05362dc7c63de2eb378676a13.tar.gz upstream-1d0c4edda14e0be05362dc7c63de2eb378676a13.tar.bz2 upstream-1d0c4edda14e0be05362dc7c63de2eb378676a13.zip |
brcm63xx: allow bcm963xx and livebox support at the same time
Use the CFE_EPTSEAL to tell them apart at runtime. Added for now only
for the 3.14 until properly tested.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41296 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch b/target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch new file mode 100644 index 0000000000..7e408f69fb --- /dev/null +++ b/target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch @@ -0,0 +1,61 @@ +From 8a30097a899b975709f728666d5ad20c8b832d21 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Sun, 9 Mar 2014 04:28:14 +0100 +Subject: [PATCH 43/44] MIPS: BCM63XX: allow board implementations to force + flash address + +Allow board implementations to force the physmap address. + +Signed-off-by: Jonas Gorski <jogo@openwrt.org> +--- + arch/mips/bcm63xx/dev-flash.c | 19 ++++++++++++++----- + .../mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++ + 2 files changed, 16 insertions(+), 5 deletions(-) + +--- a/arch/mips/bcm63xx/dev-flash.c ++++ b/arch/mips/bcm63xx/dev-flash.c +@@ -57,6 +57,12 @@ static struct platform_device mtd_dev = + }, + }; + ++void __init bcm63xx_flash_force_phys_base_address(u32 start, u32 end) ++{ ++ mtd_resources[0].start = start; ++ mtd_resources[0].end = end; ++} ++ + static int __init bcm63xx_detect_flash_type(void) + { + u32 val; +@@ -158,12 +164,15 @@ int __init bcm63xx_flash_register(void) + + switch (flash_type) { + case BCM63XX_FLASH_TYPE_PARALLEL: +- /* read base address of boot chip select (0) */ +- val = bcm_mpi_readl(MPI_CSBASE_REG(0)); +- val &= MPI_CSBASE_BASE_MASK; + +- mtd_resources[0].start = val; +- mtd_resources[0].end = 0x1FFFFFFF; ++ if (!mtd_resources[0].start) { ++ /* read base address of boot chip select (0) */ ++ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); ++ val &= MPI_CSBASE_BASE_MASK; ++ ++ mtd_resources[0].start = val; ++ mtd_resources[0].end = 0x1FFFFFFF; ++ } + + return platform_device_register(&mtd_dev); + case BCM63XX_FLASH_TYPE_SERIAL: +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h +@@ -9,6 +9,8 @@ enum { + + void bcm63xx_flash_detect(void); + ++void bcm63xx_flash_force_phys_base_address(u32 start, u32 end); ++ + int __init bcm63xx_flash_register(void); + + #endif /* __BCM63XX_FLASH_H */ |