Date:2010-08-06 17:49:42 (13 years 7 months ago)
Author:blogic
Commit:0b10449413b37ef9db55ec1dba598a6e16f0c466
Message:[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
Files: package/ifx-vmmc/Makefile (3 diffs)
package/ifx-vmmc/patches-2.6.33/100-ifxmips.patch (3 diffs)
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/ar9/mach-easy50812.c (1 diff)
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/common/devices.c (1 diff)
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/common/devices.h (1 diff)
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/common/prom.c (3 diffs)
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/mach-easy4010.c (1 diff)
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/mach-easy50712.c (1 diff)
target/linux/ifxmips/files-2.6.33/arch/mips/include/asm/mach-ifxmips/ifxmips_prom.h (1 diff)
target/linux/ifxmips/patches-2.6.33/200-cfi-swap.patch (1 diff)

Change Details

package/ifx-vmmc/Makefile
7272ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE_extract),y)
7373  CONFIGURE_ARGS += --with-device=DANUBE
7474  FW_TARGET:=danube_firmware.bin
75  FW_SOURCE:=danube_firmware.bin
7576  FW_URL:=http://www.arcor.de/hilfe/files/pdf/
7677  FW_FILE=arcor_A800_452CPW_FW_1.02.206(20081201).bin
7778  FW_MD5SUM:=19d9af4e369287a0f0abaed415cdac10
...... 
8283
8384ifeq ($(CONFIG_VOICE_CPE_VMMC_WITH_DEVICE_DANUBE),y)
8485  CONFIGURE_ARGS += --with-device=DANUBE
86  FW_SOURCE:=voip_R12.1.0.1.0-enc.bin
8587  FW_TARGET:=danube_firmware.bin
8688  FW_FILE=fw_voip_danube-12.1.0.1.0.tar.gz
8789  FW_MD5SUM:=51868b88dee9dbc65d3dbba355ded91c
...... 
152154define KernelPackage/ifx-vmmc/install
153155    $(INSTALL_DIR) $(1)/etc/init.d $(1)/$(FW_DIR)
154156    $(INSTALL_BIN) ./files/vmmc.init $(1)/etc/init.d/vmmc
155    $(CP) $(PKG_BUILD_DIR)/firmware/$(FW_TARGET) $(1)/$(FW_DIR)/$(FW_TARGET)
157    $(CP) $(PKG_BUILD_DIR)/firmware/$(FW_SOURCE) $(1)/$(FW_DIR)/$(FW_TARGET)
156158    $(CP) $(PKG_BUILD_DIR)/coef/$(COEF_TARGET) $(1)/$(FW_DIR)/$(COEF_TARGET)
157159endef
158160
package/ifx-vmmc/patches-2.6.33/100-ifxmips.patch
351351    timer = TIMER1A;
352352--- a/src/mps/drv_mps_vmmc_danube.c
353353+++ b/src/mps/drv_mps_vmmc_danube.c
354@@ -32,9 +32,22 @@
354@@ -32,9 +32,20 @@
355355 #include "ifxos_select.h"
356356 #include "ifxos_interrupt.h"
357357
...... 
363363+# include <asm/mach-ifxmips/ifxmips_irq.h>
364364+# include <asm/mach-ifxmips/ifxmips_gptu.h>
365365+# include <asm/mach-ifxmips/ifxmips_prom.h>
366+# include <linux/dma-mapping.h>
366367+
367368+# define IFX_RCU_RST_REQ IFXMIPS_RCU_RST
368369+# define IFX_RCU_RST_REQ_CPU1 IFXMIPS_RCU_RST_CPU1
369+
370+# define ifx_get_cp1_base prom_get_cp1_base
371+# define ifx_get_cp1_size prom_get_cp1_size
372370+#else
373371+# include <asm/ifx/ifx_regs.h>
374372+# include <asm/ifx_vpe.h>
...... 
377375
378376 #include "drv_mps_vmmc.h"
379377 #include "drv_mps_vmmc_dbg.h"
378@@ -72,6 +71,23 @@ volatile IFX_uint32_t *danube_cp1_base;
379 /* Local function definition */
380 /* ============================= */
381
382+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
383+IFX_uint32_t ifx_get_cp1_size(IFX_void_t)
384+{
385+ return 2;
386+}
387+
388+IFX_uint32_t *ifx_get_cp1_base(IFX_void_t)
389+{
390+ if (!danube_cp1_base) {
391+ dma_addr_t dma;
392+ danube_cp1_base = dma_alloc_coherent(NULL, ifx_get_cp1_size()<<20, &dma, GFP_ATOMIC);
393+ }
394+
395+ return (IFX_uint32_t*)danube_cp1_base;
396+}
397+#endif
398+
399 /******************************************************************************
400  * DANUBE Specific Routines
401  ******************************************************************************/
380402@@ -119,6 +132,15 @@ IFX_int32_t ifx_mps_download_firmware (m
381403    }
382404
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/ar9/mach-easy50812.c
6060{
6161    ifxmips_register_gpio();
6262
63    //printk("ifxmips_register_gpio_dev\n");
64    //ifxmips_register_gpio_dev();
65
6663    ifxmips_register_mtd(&easy50812_flash_data);
6764
6865    ifxmips_register_leds(easy50812_leds, ARRAY_SIZE(easy50812_leds));
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/common/devices.c
2020#include <ifxmips.h>
2121#include <ifxmips_irq.h>
2222
23/* gpiodev */
24static struct platform_device ifxmips_gpio_dev =
25{
26    .name = "GPIODEV",
27    .num_resources = 1,
28};
29
30void __init
31ifxmips_register_gpio_dev(void)
32{
33    platform_device_register(&ifxmips_gpio_dev);
34}
35
3623/* gpio leds */
3724#ifdef CONFIG_LEDS_GPIO
3825static struct gpio_led_platform_data ifxmips_gpio_led_data;
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/common/devices.h
33
44#include <ifxmips_platform.h>
55
6void __init ifxmips_register_gpio_dev(void);
76void __init ifxmips_register_gpio_leds(struct gpio_led *leds, int cnt);
87void __init ifxmips_register_leds(struct gpio_led *leds, int cnt);
98void __init ifxmips_register_mtd(struct physmap_flash_data *pdata);
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/common/prom.c
99#include <ifxmips.h>
1010#include <ifxmips_prom.h>
1111
12/* for voice cpu (MIPS24K) */
13unsigned int *prom_cp1_base;
14unsigned int prom_cp1_size = 0;
15
1612/* for Multithreading (APRP) on MIPS34K */
1713unsigned long physical_memsize;
1814
...... 
2117{
2218}
2319
24unsigned int*
25prom_get_cp1_base(void)
26{
27    return prom_cp1_base;
28}
29EXPORT_SYMBOL(prom_get_cp1_base);
30
31unsigned int
32prom_get_cp1_size(void)
33{
34    /* return size im MB */
35    return prom_cp1_size>>20;
36}
37EXPORT_SYMBOL(prom_get_cp1_size);
38
3920extern unsigned char ifxmips_ethaddr[6];
4021int cmdline_mac = 0;
4122
...... 
11596    }
11697    memsize *= 1024 * 1024;
11798
118    /* only on Twinpass/Danube a second CPU is used for Voice */
119    if ((cpu_data[0].cputype == CPU_24K) && (prom_cp1_size))
120    {
121#define CP1_SIZE 2 << 20
122        prom_cp1_size = CP1_SIZE;
123        memsize -= prom_cp1_size;
124        prom_cp1_base = (unsigned int *)KSEG1ADDR(memsize);
125
126        early_printf("Using %dMB Ram and reserving %dMB for cp1\n",
127            memsize>>20, prom_cp1_size>>20);
128    }
129
13099    add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
131100}
132101
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/mach-easy4010.c
6161{
6262    ifxmips_register_gpio();
6363
64    ifxmips_register_gpio_dev();
65
6664    ifxmips_register_mtd(&easy4010_flash_data);
6765
6866    ifxmips_register_leds(easy4010_leds, ARRAY_SIZE(easy4010_leds));
target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/mach-easy50712.c
6161{
6262    ifxmips_register_gpio();
6363
64    ifxmips_register_gpio_dev();
65
6664    ifxmips_register_mtd(&easy50712_flash_data);
6765
6866    ifxmips_register_leds(easy50712_leds, ARRAY_SIZE(easy50712_leds));
target/linux/ifxmips/files-2.6.33/arch/mips/include/asm/mach-ifxmips/ifxmips_prom.h
1919#define _IFXPROM_H__
2020
2121extern void early_printf(const char *fmt, ...);
22extern u32 *prom_get_cp1_base(void);
23extern u32 prom_get_cp1_size(void);
2422extern int ifxmips_has_brn_block(void);
2523
2624#endif
target/linux/ifxmips/patches-2.6.33/200-cfi-swap.patch
2525     case FL_WRITING:
2626--- a/drivers/mtd/chips/cfi_cmdset_0002.c
2727+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
28@@ -1068,7 +1068,9 @@ static int __xipram do_write_oneword(str
28@@ -39,7 +39,11 @@
29 #include <linux/mtd/xip.h>
30
31 #define AMD_BOOTLOC_BUG
32-#define FORCE_WORD_WRITE 0
33+#ifdef CONFIG_IFXMIPS
34+# define FORCE_WORD_WRITE 1
35+#else
36+# define FORCE_WORD_WRITE 0
37+#endif
38
39 #define MAX_WORD_RETRIES 3
40
41@@ -1096,7 +1096,9 @@ static int __xipram do_write_oneword(str
2942     int retry_cnt = 0;
3043
3144     adr += chip->start;

Archive Download the corresponding diff file



interactive