[lantiq]
[openwrt/svn-archive/archive.git] / target / linux / lantiq / patches-2.6.39 / 530-register_tapi.patch
1 --- a/arch/mips/lantiq/devices.c
2 +++ b/arch/mips/lantiq/devices.c
3 @@ -120,3 +120,20 @@ void __init ltq_register_pci(struct ltq_
4 pr_err("kernel is compiled without PCI support\n");
5 }
6 #endif
7 +
8 +static unsigned int *cp1_base = 0;
9 +unsigned int*
10 +ltq_get_cp1_base(void)
11 +{
12 + return cp1_base;
13 +}
14 +EXPORT_SYMBOL(ltq_get_cp1_base);
15 +
16 +void __init
17 +ltq_register_tapi(void)
18 +{
19 +#define CP1_SIZE (1 << 20)
20 + dma_addr_t dma;
21 + cp1_base =
22 + (void*)CPHYSADDR(dma_alloc_coherent(NULL, CP1_SIZE, &dma, GFP_ATOMIC));
23 +}
24 --- a/arch/mips/lantiq/devices.h
25 +++ b/arch/mips/lantiq/devices.h
26 @@ -19,5 +19,6 @@ extern void ltq_register_nor(struct phys
27 extern void ltq_register_wdt(void);
28 extern void ltq_register_asc(int port);
29 extern void ltq_register_pci(struct ltq_pci_data *data);
30 +extern void ltq_register_tapi(void);
31
32 #endif
33 --- a/arch/mips/lantiq/xway/mach-easy50712.c
34 +++ b/arch/mips/lantiq/xway/mach-easy50712.c
35 @@ -66,6 +66,7 @@ static void __init easy50712_init(void)
36 ltq_register_nor(&easy50712_flash_data);
37 ltq_register_pci(&ltq_pci_data);
38 ltq_register_etop(&ltq_eth_data);
39 + ltq_register_tapi();
40 }
41
42 MIPS_MACHINE(LTQ_MACH_EASY50712,