1 --- a/arch/mips/ralink/rt288x.c
2 +++ b/arch/mips/ralink/rt288x.c
4 #include <asm/mipsregs.h>
5 #include <asm/mach-ralink/ralink_regs.h>
6 #include <asm/mach-ralink/rt288x.h>
7 +#include <asm/mach-ralink/pinmux.h>
11 -static struct ralink_pinmux_grp mode_mux[] = {
14 - .mask = RT2880_GPIO_MODE_I2C,
19 - .mask = RT2880_GPIO_MODE_SPI,
24 - .mask = RT2880_GPIO_MODE_UART0,
29 - .mask = RT2880_GPIO_MODE_JTAG,
34 - .mask = RT2880_GPIO_MODE_MDIO,
39 - .mask = RT2880_GPIO_MODE_SDRAM,
44 - .mask = RT2880_GPIO_MODE_PCI,
48 +static struct rt2880_pmx_func i2c_func[] = { FUNC("i2c", 0, 1, 2) };
49 +static struct rt2880_pmx_func spi_func[] = { FUNC("spi", 0, 3, 4) };
50 +static struct rt2880_pmx_func uartlite_func[] = { FUNC("uartlite", 0, 7, 8) };
51 +static struct rt2880_pmx_func jtag_func[] = { FUNC("jtag", 0, 17, 5) };
52 +static struct rt2880_pmx_func mdio_func[] = { FUNC("mdio", 0, 22, 2) };
53 +static struct rt2880_pmx_func sdram_func[] = { FUNC("sdram", 0, 24, 16) };
54 +static struct rt2880_pmx_func pci_func[] = { FUNC("pci", 0, 40, 32) };
56 +static struct rt2880_pmx_group rt2880_pinmux_data_act[] = {
57 + GRP("i2c", i2c_func, 1, RT2880_GPIO_MODE_I2C),
58 + GRP("spi", spi_func, 1, RT2880_GPIO_MODE_SPI),
59 + GRP("uartlite", uartlite_func, 1, RT2880_GPIO_MODE_UART0),
60 + GRP("jtag", jtag_func, 1, RT2880_GPIO_MODE_JTAG),
61 + GRP("mdio", mdio_func, 1, RT2880_GPIO_MODE_MDIO),
62 + GRP("sdram", sdram_func, 1, RT2880_GPIO_MODE_SDRAM),
63 + GRP("pci", pci_func, 1, RT2880_GPIO_MODE_PCI),
67 static void rt288x_wdt_reset(void)
68 @@ -69,11 +50,6 @@ static void rt288x_wdt_reset(void)
69 rt_sysc_w32(t, SYSC_REG_CLKCFG);
72 -struct ralink_pinmux rt_gpio_pinmux = {
74 - .wdt_reset = rt288x_wdt_reset,
77 void __init ralink_clk_init(void)
79 unsigned long cpu_rate;
80 @@ -140,4 +116,6 @@ void prom_soc_init(struct ralink_soc_inf
81 soc_info->mem_base = RT2880_SDRAM_BASE;
82 soc_info->mem_size_min = RT2880_MEM_SIZE_MIN;
83 soc_info->mem_size_max = RT2880_MEM_SIZE_MAX;
85 + rt2880_pinmux_data = rt2880_pinmux_data_act;