1 activate serial driver for ASC1 if "use_asc1=x" is given on kernel commandline
2 mux setup for pins is done via late_initcall, when the gpio driver is initialized
4 only implemented for EASY98000, generic version t.b.d.
5 --- a/arch/mips/lantiq/falcon/devices.c
6 +++ b/arch/mips/lantiq/falcon/devices.c
7 @@ -75,6 +75,7 @@ void __init falcon_register_asc(int port
9 platform_device_register_simple("ltq_asc", 1,
10 falcon_asc1_resources, ARRAY_SIZE(falcon_asc1_resources));
11 + sys1_hw_activate(ACTS_ASC1_ACT);
15 --- a/arch/mips/lantiq/falcon/mach-easy98000.c
16 +++ b/arch/mips/lantiq/falcon/mach-easy98000.c
18 #include <linux/spi/spi.h>
19 #include <linux/spi/spi_gpio.h>
20 #include <linux/spi/eeprom.h>
21 +#include <falcon/lantiq_soc.h>
23 #include "../machtypes.h"
25 @@ -206,9 +207,34 @@ static void __init easy98000_spi_gpio_in
26 platform_device_register(&easy98000_spi_gpio_device);
29 +static int register_asc1 = 0;
30 +static int __init parse_asc1(char *p)
35 +__setup("use_asc1", parse_asc1);
37 +#define MUXC_SIF_RX_PIN 112
38 +#define MUXC_SIF_TX_PIN 113
40 +static int __init asc1_mux_setup(void)
42 + if (register_asc1) {
43 + if (ltq_gpio_request(MUXC_SIF_RX_PIN, 1, 1, 0, "asc1-rx"))
45 + if (ltq_gpio_request(MUXC_SIF_TX_PIN, 1, 1, 1, "asc1-tx"))
50 +late_initcall(asc1_mux_setup);
52 static void __init easy98000_init_common(void)
54 falcon_register_asc(0);
56 + falcon_register_asc(1);
57 falcon_register_gpio();
58 falcon_register_wdt();
59 falcon_register_i2c();