Root/target/linux/ar71xx/patches-3.3/208-spi-ath79-make-chip-select-more-flexible.patch

1--- a/arch/mips/ath79/mach-ap121.c
2+++ b/arch/mips/ath79/mach-ap121.c
3@@ -58,12 +58,18 @@ static struct gpio_keys_button ap121_gpi
4     }
5 };
6 
7+static struct ath79_spi_controller_data ap121_spi0_data = {
8+ .cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
9+ .cs_line = 0,
10+};
11+
12 static struct spi_board_info ap121_spi_info[] = {
13     {
14         .bus_num = 0,
15         .chip_select = 0,
16         .max_speed_hz = 25000000,
17         .modalias = "mx25l1606e",
18+ .controller_data = &ap121_spi0_data,
19     }
20 };
21 
22--- a/arch/mips/ath79/mach-ap81.c
23+++ b/arch/mips/ath79/mach-ap81.c
24@@ -67,12 +67,18 @@ static struct gpio_keys_button ap81_gpio
25     }
26 };
27 
28+static struct ath79_spi_controller_data ap81_spi0_data = {
29+ .cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
30+ .cs_line = 0,
31+};
32+
33 static struct spi_board_info ap81_spi_info[] = {
34     {
35         .bus_num = 0,
36         .chip_select = 0,
37         .max_speed_hz = 25000000,
38         .modalias = "m25p64",
39+ .controller_data = &ap81_spi0_data,
40     }
41 };
42 
43--- a/arch/mips/ath79/mach-db120.c
44+++ b/arch/mips/ath79/mach-db120.c
45@@ -95,12 +95,18 @@ static struct gpio_keys_button db120_gpi
46     },
47 };
48 
49+static struct ath79_spi_controller_data db120_spi0_data = {
50+ .cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
51+ .cs_line = 0,
52+};
53+
54 static struct spi_board_info db120_spi_info[] = {
55     {
56         .bus_num = 0,
57         .chip_select = 0,
58         .max_speed_hz = 25000000,
59         .modalias = "s25sl064a",
60+ .controller_data = &db120_spi0_data,
61     }
62 };
63 
64--- a/arch/mips/ath79/mach-pb44.c
65+++ b/arch/mips/ath79/mach-pb44.c
66@@ -87,12 +87,18 @@ static struct gpio_keys_button pb44_gpio
67     }
68 };
69 
70+static struct ath79_spi_controller_data pb44_spi0_data = {
71+ .cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
72+ .cs_line = 0,
73+};
74+
75 static struct spi_board_info pb44_spi_info[] = {
76     {
77         .bus_num = 0,
78         .chip_select = 0,
79         .max_speed_hz = 25000000,
80         .modalias = "m25p64",
81+ .controller_data = &pb44_spi0_data,
82     },
83 };
84 
85--- a/arch/mips/ath79/mach-ubnt-xm.c
86+++ b/arch/mips/ath79/mach-ubnt-xm.c
87@@ -65,12 +65,18 @@ static struct gpio_keys_button ubnt_xm_g
88     }
89 };
90 
91+static struct ath79_spi_controller_data ubnt_xm_spi0_data = {
92+ .cs_type = ATH79_SPI_CS_TYPE_INTERNAL,
93+ .cs_line = 0,
94+};
95+
96 static struct spi_board_info ubnt_xm_spi_info[] = {
97     {
98         .bus_num = 0,
99         .chip_select = 0,
100         .max_speed_hz = 25000000,
101         .modalias = "mx25l6405d",
102+ .controller_data = &ubnt_xm_spi0_data,
103     }
104 };
105 
106

Archive Download this file



interactive