generate package for the new IXP4xx crpyto driver
[openwrt.git] / target / linux / ixp4xx / patches / 520-compex_mtd_microcode.patch
1 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/compex-setup.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/compex-setup.c
4 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/compex-setup.c
5 @@ -17,6 +17,7 @@
6 #include <linux/serial.h>
7 #include <linux/tty.h>
8 #include <linux/serial_8250.h>
9 +#include <linux/mtd/mtd.h>
10 #include <linux/slab.h>
11
12 #include <asm/types.h>
13 @@ -136,11 +137,34 @@ static struct platform_device mac1 = {
14 .resource = &res_mac1,
15 };
16
17 +struct npe_ucode_platform_data compex_npe_ucode_data = {
18 + .mtd_partition = "RedBoot",
19 +};
20 +
21 +static struct platform_device compex_npe_ucode = {
22 + .name = "ixp4xx_npe_ucode",
23 + .id = 0,
24 + .dev.platform_data = &compex_npe_ucode_data,
25 +};
26 +
27 static struct platform_device *compex_devices[] __initdata = {
28 &compex_flash,
29 &compex_uart,
30 &mac0,
31 &mac1,
32 + &compex_npe_ucode,
33 +};
34 +
35 +static void compex_flash_add(struct mtd_info *mtd)
36 +{
37 +}
38 +
39 +static void compex_flash_remove(struct mtd_info *mtd) {
40 +}
41 +
42 +static struct mtd_notifier compex_flash_notifier = {
43 + .add = compex_flash_add,
44 + .remove = compex_flash_remove,
45 };
46
47 static void __init compex_init(void)
48 @@ -152,6 +176,8 @@ static void __init compex_init(void)
49 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
50
51 platform_add_devices(compex_devices, ARRAY_SIZE(compex_devices));
52 +
53 + register_mtd_user(&compex_flash_notifier);
54 }
55
56 #ifdef CONFIG_MACH_COMPEX
This page took 0.042327 seconds and 5 git commands to generate.