mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-20 00:09:43 +02:00
[ifxmips]
* remove references to gpio_dev * make vmmc driver register its own memory and dont rely on arch code to do so * makes any Danube board with a CFI commandset 2 NOR flash chip functional again * fixes filenames of downloaded firmwares thanks, Ithamar R. Adema git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22515 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
661d697285
commit
0b10449413
@ -72,6 +72,7 @@ FW_DIR:=lib/firmware
|
|||||||
ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE_extract),y)
|
ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE_extract),y)
|
||||||
CONFIGURE_ARGS += --with-device=DANUBE
|
CONFIGURE_ARGS += --with-device=DANUBE
|
||||||
FW_TARGET:=danube_firmware.bin
|
FW_TARGET:=danube_firmware.bin
|
||||||
|
FW_SOURCE:=danube_firmware.bin
|
||||||
FW_URL:=http://www.arcor.de/hilfe/files/pdf/
|
FW_URL:=http://www.arcor.de/hilfe/files/pdf/
|
||||||
FW_FILE=arcor_A800_452CPW_FW_1.02.206(20081201).bin
|
FW_FILE=arcor_A800_452CPW_FW_1.02.206(20081201).bin
|
||||||
FW_MD5SUM:=19d9af4e369287a0f0abaed415cdac10
|
FW_MD5SUM:=19d9af4e369287a0f0abaed415cdac10
|
||||||
@ -82,6 +83,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE),y)
|
ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE),y)
|
||||||
CONFIGURE_ARGS += --with-device=DANUBE
|
CONFIGURE_ARGS += --with-device=DANUBE
|
||||||
|
FW_SOURCE:=voip_R12.1.0.1.0-enc.bin
|
||||||
FW_TARGET:=danube_firmware.bin
|
FW_TARGET:=danube_firmware.bin
|
||||||
FW_FILE=fw_voip_danube-12.1.0.1.0.tar.gz
|
FW_FILE=fw_voip_danube-12.1.0.1.0.tar.gz
|
||||||
FW_MD5SUM:=51868b88dee9dbc65d3dbba355ded91c
|
FW_MD5SUM:=51868b88dee9dbc65d3dbba355ded91c
|
||||||
@ -152,7 +154,7 @@ endef
|
|||||||
define KernelPackage/ifx-vmmc/install
|
define KernelPackage/ifx-vmmc/install
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/$(FW_DIR)
|
$(INSTALL_DIR) $(1)/etc/init.d $(1)/$(FW_DIR)
|
||||||
$(INSTALL_BIN) ./files/vmmc.init $(1)/etc/init.d/vmmc
|
$(INSTALL_BIN) ./files/vmmc.init $(1)/etc/init.d/vmmc
|
||||||
$(CP) $(PKG_BUILD_DIR)/firmware/$(FW_TARGET) $(1)/$(FW_DIR)/$(FW_TARGET)
|
$(CP) $(PKG_BUILD_DIR)/firmware/$(FW_SOURCE) $(1)/$(FW_DIR)/$(FW_TARGET)
|
||||||
$(CP) $(PKG_BUILD_DIR)/coef/$(COEF_TARGET) $(1)/$(FW_DIR)/$(COEF_TARGET)
|
$(CP) $(PKG_BUILD_DIR)/coef/$(COEF_TARGET) $(1)/$(FW_DIR)/$(COEF_TARGET)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@
|
|||||||
timer = TIMER1A;
|
timer = TIMER1A;
|
||||||
--- a/src/mps/drv_mps_vmmc_danube.c
|
--- a/src/mps/drv_mps_vmmc_danube.c
|
||||||
+++ b/src/mps/drv_mps_vmmc_danube.c
|
+++ b/src/mps/drv_mps_vmmc_danube.c
|
||||||
@@ -32,9 +32,22 @@
|
@@ -32,9 +32,20 @@
|
||||||
#include "ifxos_select.h"
|
#include "ifxos_select.h"
|
||||||
#include "ifxos_interrupt.h"
|
#include "ifxos_interrupt.h"
|
||||||
|
|
||||||
@ -363,12 +363,10 @@
|
|||||||
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
+# include <asm/mach-ifxmips/ifxmips_irq.h>
|
||||||
+# include <asm/mach-ifxmips/ifxmips_gptu.h>
|
+# include <asm/mach-ifxmips/ifxmips_gptu.h>
|
||||||
+# include <asm/mach-ifxmips/ifxmips_prom.h>
|
+# include <asm/mach-ifxmips/ifxmips_prom.h>
|
||||||
|
+# include <linux/dma-mapping.h>
|
||||||
+
|
+
|
||||||
+# define IFX_RCU_RST_REQ IFXMIPS_RCU_RST
|
+# define IFX_RCU_RST_REQ IFXMIPS_RCU_RST
|
||||||
+# define IFX_RCU_RST_REQ_CPU1 IFXMIPS_RCU_RST_CPU1
|
+# define IFX_RCU_RST_REQ_CPU1 IFXMIPS_RCU_RST_CPU1
|
||||||
+
|
|
||||||
+# define ifx_get_cp1_base prom_get_cp1_base
|
|
||||||
+# define ifx_get_cp1_size prom_get_cp1_size
|
|
||||||
+#else
|
+#else
|
||||||
+# include <asm/ifx/ifx_regs.h>
|
+# include <asm/ifx/ifx_regs.h>
|
||||||
+# include <asm/ifx_vpe.h>
|
+# include <asm/ifx_vpe.h>
|
||||||
@ -377,6 +375,30 @@
|
|||||||
|
|
||||||
#include "drv_mps_vmmc.h"
|
#include "drv_mps_vmmc.h"
|
||||||
#include "drv_mps_vmmc_dbg.h"
|
#include "drv_mps_vmmc_dbg.h"
|
||||||
|
@@ -72,6 +71,23 @@ volatile IFX_uint32_t *danube_cp1_base;
|
||||||
|
/* Local function definition */
|
||||||
|
/* ============================= */
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||||
|
+IFX_uint32_t ifx_get_cp1_size(IFX_void_t)
|
||||||
|
+{
|
||||||
|
+ return 2;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+IFX_uint32_t *ifx_get_cp1_base(IFX_void_t)
|
||||||
|
+{
|
||||||
|
+ if (!danube_cp1_base) {
|
||||||
|
+ dma_addr_t dma;
|
||||||
|
+ danube_cp1_base = dma_alloc_coherent(NULL, ifx_get_cp1_size()<<20, &dma, GFP_ATOMIC);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return (IFX_uint32_t*)danube_cp1_base;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/******************************************************************************
|
||||||
|
* DANUBE Specific Routines
|
||||||
|
******************************************************************************/
|
||||||
@@ -119,6 +132,15 @@ IFX_int32_t ifx_mps_download_firmware (m
|
@@ -119,6 +132,15 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,9 +60,6 @@ easy50812_init(void)
|
|||||||
{
|
{
|
||||||
ifxmips_register_gpio();
|
ifxmips_register_gpio();
|
||||||
|
|
||||||
//printk("ifxmips_register_gpio_dev\n");
|
|
||||||
//ifxmips_register_gpio_dev();
|
|
||||||
|
|
||||||
ifxmips_register_mtd(&easy50812_flash_data);
|
ifxmips_register_mtd(&easy50812_flash_data);
|
||||||
|
|
||||||
ifxmips_register_leds(easy50812_leds, ARRAY_SIZE(easy50812_leds));
|
ifxmips_register_leds(easy50812_leds, ARRAY_SIZE(easy50812_leds));
|
||||||
|
@ -20,19 +20,6 @@
|
|||||||
#include <ifxmips.h>
|
#include <ifxmips.h>
|
||||||
#include <ifxmips_irq.h>
|
#include <ifxmips_irq.h>
|
||||||
|
|
||||||
/* gpiodev */
|
|
||||||
static struct platform_device ifxmips_gpio_dev =
|
|
||||||
{
|
|
||||||
.name = "GPIODEV",
|
|
||||||
.num_resources = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init
|
|
||||||
ifxmips_register_gpio_dev(void)
|
|
||||||
{
|
|
||||||
platform_device_register(&ifxmips_gpio_dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* gpio leds */
|
/* gpio leds */
|
||||||
#ifdef CONFIG_LEDS_GPIO
|
#ifdef CONFIG_LEDS_GPIO
|
||||||
static struct gpio_led_platform_data ifxmips_gpio_led_data;
|
static struct gpio_led_platform_data ifxmips_gpio_led_data;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <ifxmips_platform.h>
|
#include <ifxmips_platform.h>
|
||||||
|
|
||||||
void __init ifxmips_register_gpio_dev(void);
|
|
||||||
void __init ifxmips_register_gpio_leds(struct gpio_led *leds, int cnt);
|
void __init ifxmips_register_gpio_leds(struct gpio_led *leds, int cnt);
|
||||||
void __init ifxmips_register_leds(struct gpio_led *leds, int cnt);
|
void __init ifxmips_register_leds(struct gpio_led *leds, int cnt);
|
||||||
void __init ifxmips_register_mtd(struct physmap_flash_data *pdata);
|
void __init ifxmips_register_mtd(struct physmap_flash_data *pdata);
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
#include <ifxmips.h>
|
#include <ifxmips.h>
|
||||||
#include <ifxmips_prom.h>
|
#include <ifxmips_prom.h>
|
||||||
|
|
||||||
/* for voice cpu (MIPS24K) */
|
|
||||||
unsigned int *prom_cp1_base;
|
|
||||||
unsigned int prom_cp1_size = 0;
|
|
||||||
|
|
||||||
/* for Multithreading (APRP) on MIPS34K */
|
/* for Multithreading (APRP) on MIPS34K */
|
||||||
unsigned long physical_memsize;
|
unsigned long physical_memsize;
|
||||||
|
|
||||||
@ -21,21 +17,6 @@ prom_free_prom_memory(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int*
|
|
||||||
prom_get_cp1_base(void)
|
|
||||||
{
|
|
||||||
return prom_cp1_base;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(prom_get_cp1_base);
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
prom_get_cp1_size(void)
|
|
||||||
{
|
|
||||||
/* return size im MB */
|
|
||||||
return prom_cp1_size>>20;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(prom_get_cp1_size);
|
|
||||||
|
|
||||||
extern unsigned char ifxmips_ethaddr[6];
|
extern unsigned char ifxmips_ethaddr[6];
|
||||||
int cmdline_mac = 0;
|
int cmdline_mac = 0;
|
||||||
|
|
||||||
@ -115,18 +96,6 @@ static void __init prom_init_cmdline(void)
|
|||||||
}
|
}
|
||||||
memsize *= 1024 * 1024;
|
memsize *= 1024 * 1024;
|
||||||
|
|
||||||
/* only on Twinpass/Danube a second CPU is used for Voice */
|
|
||||||
if ((cpu_data[0].cputype == CPU_24K) && (prom_cp1_size))
|
|
||||||
{
|
|
||||||
#define CP1_SIZE 2 << 20
|
|
||||||
prom_cp1_size = CP1_SIZE;
|
|
||||||
memsize -= prom_cp1_size;
|
|
||||||
prom_cp1_base = (unsigned int *)KSEG1ADDR(memsize);
|
|
||||||
|
|
||||||
early_printf("Using %dMB Ram and reserving %dMB for cp1\n",
|
|
||||||
memsize>>20, prom_cp1_size>>20);
|
|
||||||
}
|
|
||||||
|
|
||||||
add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
|
add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,6 @@ easy4010_init(void)
|
|||||||
{
|
{
|
||||||
ifxmips_register_gpio();
|
ifxmips_register_gpio();
|
||||||
|
|
||||||
ifxmips_register_gpio_dev();
|
|
||||||
|
|
||||||
ifxmips_register_mtd(&easy4010_flash_data);
|
ifxmips_register_mtd(&easy4010_flash_data);
|
||||||
|
|
||||||
ifxmips_register_leds(easy4010_leds, ARRAY_SIZE(easy4010_leds));
|
ifxmips_register_leds(easy4010_leds, ARRAY_SIZE(easy4010_leds));
|
||||||
|
@ -61,8 +61,6 @@ easy50712_init(void)
|
|||||||
{
|
{
|
||||||
ifxmips_register_gpio();
|
ifxmips_register_gpio();
|
||||||
|
|
||||||
ifxmips_register_gpio_dev();
|
|
||||||
|
|
||||||
ifxmips_register_mtd(&easy50712_flash_data);
|
ifxmips_register_mtd(&easy50712_flash_data);
|
||||||
|
|
||||||
ifxmips_register_leds(easy50712_leds, ARRAY_SIZE(easy50712_leds));
|
ifxmips_register_leds(easy50712_leds, ARRAY_SIZE(easy50712_leds));
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
#define _IFXPROM_H__
|
#define _IFXPROM_H__
|
||||||
|
|
||||||
extern void early_printf(const char *fmt, ...);
|
extern void early_printf(const char *fmt, ...);
|
||||||
extern u32 *prom_get_cp1_base(void);
|
|
||||||
extern u32 prom_get_cp1_size(void);
|
|
||||||
extern int ifxmips_has_brn_block(void);
|
extern int ifxmips_has_brn_block(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,7 +25,20 @@
|
|||||||
case FL_WRITING:
|
case FL_WRITING:
|
||||||
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||||
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||||
@@ -1068,7 +1068,9 @@ static int __xipram do_write_oneword(str
|
@@ -39,7 +39,11 @@
|
||||||
|
#include <linux/mtd/xip.h>
|
||||||
|
|
||||||
|
#define AMD_BOOTLOC_BUG
|
||||||
|
-#define FORCE_WORD_WRITE 0
|
||||||
|
+#ifdef CONFIG_IFXMIPS
|
||||||
|
+# define FORCE_WORD_WRITE 1
|
||||||
|
+#else
|
||||||
|
+# define FORCE_WORD_WRITE 0
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define MAX_WORD_RETRIES 3
|
||||||
|
|
||||||
|
@@ -1096,7 +1096,9 @@ static int __xipram do_write_oneword(str
|
||||||
int retry_cnt = 0;
|
int retry_cnt = 0;
|
||||||
|
|
||||||
adr += chip->start;
|
adr += chip->start;
|
||||||
|
Loading…
Reference in New Issue
Block a user