[lantiq]
[openwrt/svn-archive/archive.git] / target / linux / lantiq / patches-2.6.39 / 500-register_ebu.patch
1 --- a/arch/mips/lantiq/xway/devices.c
2 +++ b/arch/mips/lantiq/xway/devices.c
3 @@ -121,6 +121,29 @@
4 }
5 }
6
7 +/* ebu */
8 +static struct resource ltq_ebu_resource =
9 +{
10 + .name = "gpio_ebu",
11 + .start = LTQ_EBU_GPIO_START,
12 + .end = LTQ_EBU_GPIO_START + LTQ_EBU_GPIO_SIZE - 1,
13 + .flags = IORESOURCE_MEM,
14 +};
15 +
16 +static struct platform_device ltq_ebu =
17 +{
18 + .name = "ltq_ebu",
19 + .resource = &ltq_ebu_resource,
20 + .num_resources = 1,
21 +};
22 +
23 +void __init
24 +ltq_register_gpio_ebu(unsigned int value)
25 +{
26 + ltq_ebu.dev.platform_data = (void*) value;
27 + platform_device_register(&ltq_ebu);
28 +}
29 +
30 static struct resource ltq_spi_resources[] = {
31 {
32 .start = LTQ_SSC_BASE_ADDR,
33 --- a/arch/mips/lantiq/xway/devices.h
34 +++ b/arch/mips/lantiq/xway/devices.h
35 @@ -16,5 +16,6 @@
36 extern void ltq_register_gpio_stp(void);
37 extern void ltq_register_ase_asc(void);
38 extern void ltq_register_etop(struct ltq_eth_data *eth);
39 +extern void ltq_register_gpio_ebu(unsigned int value);
40
41 #endif