diff options
-rw-r--r-- | arch/avr32/boards/atngw100/mrmt.c | 1 | ||||
-rw-r--r-- | arch/avr32/boards/atngw100/setup.c | 5 | ||||
-rw-r--r-- | arch/avr32/kernel/vmlinux.lds.S | 64 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 35 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/include/mach/board.h | 1 |
5 files changed, 30 insertions, 76 deletions
diff --git a/arch/avr32/boards/atngw100/mrmt.c b/arch/avr32/boards/atngw100/mrmt.c index bf78e516a85f..7919be311f4a 100644 --- a/arch/avr32/boards/atngw100/mrmt.c +++ b/arch/avr32/boards/atngw100/mrmt.c | |||
@@ -302,6 +302,7 @@ static int __init mrmt1_init(void) | |||
302 | at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), | 302 | at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), |
303 | GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); | 303 | GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); |
304 | set_irq_type( AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING ); | 304 | set_irq_type( AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING ); |
305 | at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info)); | ||
305 | spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info)); | 306 | spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info)); |
306 | #endif | 307 | #endif |
307 | 308 | ||
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index bc299fbbeb4e..5b022aad4bd9 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c | |||
@@ -56,13 +56,8 @@ static struct spi_board_info spi0_board_info[] __initdata = { | |||
56 | static struct mci_platform_data __initdata mci0_data = { | 56 | static struct mci_platform_data __initdata mci0_data = { |
57 | .slot[0] = { | 57 | .slot[0] = { |
58 | .bus_width = 4, | 58 | .bus_width = 4, |
59 | #if defined(CONFIG_BOARD_ATNGW100_EVKLCD10X) || defined(CONFIG_BOARD_ATNGW100_MRMT1) | ||
60 | .detect_pin = GPIO_PIN_NONE, | ||
61 | .wp_pin = GPIO_PIN_NONE, | ||
62 | #else | ||
63 | .detect_pin = GPIO_PIN_PC(25), | 59 | .detect_pin = GPIO_PIN_PC(25), |
64 | .wp_pin = GPIO_PIN_PE(0), | 60 | .wp_pin = GPIO_PIN_PE(0), |
65 | #endif | ||
66 | }, | 61 | }, |
67 | }; | 62 | }; |
68 | 63 | ||
diff --git a/arch/avr32/kernel/vmlinux.lds.S b/arch/avr32/kernel/vmlinux.lds.S index c4b56654349a..9cd2bd91d64a 100644 --- a/arch/avr32/kernel/vmlinux.lds.S +++ b/arch/avr32/kernel/vmlinux.lds.S | |||
@@ -39,30 +39,10 @@ SECTIONS | |||
39 | __tagtable_begin = .; | 39 | __tagtable_begin = .; |
40 | *(.taglist.init) | 40 | *(.taglist.init) |
41 | __tagtable_end = .; | 41 | __tagtable_end = .; |
42 | INIT_DATA | ||
43 | . = ALIGN(16); | ||
44 | __setup_start = .; | ||
45 | *(.init.setup) | ||
46 | __setup_end = .; | ||
47 | . = ALIGN(4); | ||
48 | __initcall_start = .; | ||
49 | INITCALLS | ||
50 | __initcall_end = .; | ||
51 | __con_initcall_start = .; | ||
52 | *(.con_initcall.init) | ||
53 | __con_initcall_end = .; | ||
54 | __security_initcall_start = .; | ||
55 | *(.security_initcall.init) | ||
56 | __security_initcall_end = .; | ||
57 | #ifdef CONFIG_BLK_DEV_INITRD | ||
58 | . = ALIGN(32); | ||
59 | __initramfs_start = .; | ||
60 | *(.init.ramfs) | ||
61 | __initramfs_end = .; | ||
62 | #endif | ||
63 | . = ALIGN(PAGE_SIZE); | ||
64 | __init_end = .; | ||
65 | } | 42 | } |
43 | INIT_DATA_SECTION(16) | ||
44 | . = ALIGN(PAGE_SIZE); | ||
45 | __init_end = .; | ||
66 | 46 | ||
67 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | 47 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
68 | _evba = .; | 48 | _evba = .; |
@@ -78,34 +58,16 @@ SECTIONS | |||
78 | _etext = .; | 58 | _etext = .; |
79 | } = 0xd703d703 | 59 | } = 0xd703d703 |
80 | 60 | ||
81 | . = ALIGN(4); | 61 | EXCEPTION_TABLE(4) |
82 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { | ||
83 | __start___ex_table = .; | ||
84 | *(__ex_table) | ||
85 | __stop___ex_table = .; | ||
86 | } | ||
87 | |||
88 | RODATA | 62 | RODATA |
89 | 63 | ||
90 | . = ALIGN(THREAD_SIZE); | ||
91 | |||
92 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | 64 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
93 | _data = .; | 65 | _data = .; |
94 | _sdata = .; | 66 | _sdata = .; |
95 | /* | ||
96 | * First, the init task union, aligned to an 8K boundary. | ||
97 | */ | ||
98 | *(.data.init_task) | ||
99 | 67 | ||
100 | /* Then, the page-aligned data */ | 68 | INIT_TASK_DATA(THREAD_SIZE) |
101 | . = ALIGN(PAGE_SIZE); | 69 | PAGE_ALIGNED_DATA(PAGE_SIZE); |
102 | *(.data.page_aligned) | 70 | CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) |
103 | |||
104 | /* Then, the cacheline aligned data */ | ||
105 | . = ALIGN(L1_CACHE_BYTES); | ||
106 | *(.data.cacheline_aligned) | ||
107 | |||
108 | /* And the rest... */ | ||
109 | *(.data.rel*) | 71 | *(.data.rel*) |
110 | DATA_DATA | 72 | DATA_DATA |
111 | CONSTRUCTORS | 73 | CONSTRUCTORS |
@@ -113,16 +75,8 @@ SECTIONS | |||
113 | _edata = .; | 75 | _edata = .; |
114 | } | 76 | } |
115 | 77 | ||
116 | 78 | BSS_SECTION(0, 8, 8) | |
117 | . = ALIGN(8); | 79 | _end = .; |
118 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
119 | __bss_start = .; | ||
120 | *(.bss) | ||
121 | *(COMMON) | ||
122 | . = ALIGN(8); | ||
123 | __bss_stop = .; | ||
124 | _end = .; | ||
125 | } | ||
126 | 80 | ||
127 | DWARF_DEBUG | 81 | DWARF_DEBUG |
128 | 82 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index eb9d4dc2e86d..a47592e2fc32 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1181,19 +1181,32 @@ static struct resource atmel_spi1_resource[] = { | |||
1181 | DEFINE_DEV(atmel_spi, 1); | 1181 | DEFINE_DEV(atmel_spi, 1); |
1182 | DEV_CLK(spi_clk, atmel_spi1, pba, 1); | 1182 | DEV_CLK(spi_clk, atmel_spi1, pba, 1); |
1183 | 1183 | ||
1184 | static void __init | 1184 | void __init |
1185 | at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, | 1185 | at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n) |
1186 | unsigned int n, const u8 *pins) | ||
1187 | { | 1186 | { |
1187 | /* | ||
1188 | * Manage the chipselects as GPIOs, normally using the same pins | ||
1189 | * the SPI controller expects; but boards can use other pins. | ||
1190 | */ | ||
1191 | static u8 __initdata spi_pins[][4] = { | ||
1192 | { GPIO_PIN_PA(3), GPIO_PIN_PA(4), | ||
1193 | GPIO_PIN_PA(5), GPIO_PIN_PA(20) }, | ||
1194 | { GPIO_PIN_PB(2), GPIO_PIN_PB(3), | ||
1195 | GPIO_PIN_PB(4), GPIO_PIN_PA(27) }, | ||
1196 | }; | ||
1188 | unsigned int pin, mode; | 1197 | unsigned int pin, mode; |
1189 | 1198 | ||
1199 | /* There are only 2 SPI controllers */ | ||
1200 | if (bus_num > 1) | ||
1201 | return; | ||
1202 | |||
1190 | for (; n; n--, b++) { | 1203 | for (; n; n--, b++) { |
1191 | b->bus_num = bus_num; | 1204 | b->bus_num = bus_num; |
1192 | if (b->chip_select >= 4) | 1205 | if (b->chip_select >= 4) |
1193 | continue; | 1206 | continue; |
1194 | pin = (unsigned)b->controller_data; | 1207 | pin = (unsigned)b->controller_data; |
1195 | if (!pin) { | 1208 | if (!pin) { |
1196 | pin = pins[b->chip_select]; | 1209 | pin = spi_pins[bus_num][b->chip_select]; |
1197 | b->controller_data = (void *)pin; | 1210 | b->controller_data = (void *)pin; |
1198 | } | 1211 | } |
1199 | mode = AT32_GPIOF_OUTPUT; | 1212 | mode = AT32_GPIOF_OUTPUT; |
@@ -1206,16 +1219,6 @@ at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, | |||
1206 | struct platform_device *__init | 1219 | struct platform_device *__init |
1207 | at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n) | 1220 | at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n) |
1208 | { | 1221 | { |
1209 | /* | ||
1210 | * Manage the chipselects as GPIOs, normally using the same pins | ||
1211 | * the SPI controller expects; but boards can use other pins. | ||
1212 | */ | ||
1213 | static u8 __initdata spi0_pins[] = | ||
1214 | { GPIO_PIN_PA(3), GPIO_PIN_PA(4), | ||
1215 | GPIO_PIN_PA(5), GPIO_PIN_PA(20), }; | ||
1216 | static u8 __initdata spi1_pins[] = | ||
1217 | { GPIO_PIN_PB(2), GPIO_PIN_PB(3), | ||
1218 | GPIO_PIN_PB(4), GPIO_PIN_PA(27), }; | ||
1219 | struct platform_device *pdev; | 1222 | struct platform_device *pdev; |
1220 | u32 pin_mask; | 1223 | u32 pin_mask; |
1221 | 1224 | ||
@@ -1228,7 +1231,7 @@ at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n) | |||
1228 | select_peripheral(PIOA, (1 << 0), PERIPH_A, AT32_GPIOF_PULLUP); | 1231 | select_peripheral(PIOA, (1 << 0), PERIPH_A, AT32_GPIOF_PULLUP); |
1229 | select_peripheral(PIOA, pin_mask, PERIPH_A, 0); | 1232 | select_peripheral(PIOA, pin_mask, PERIPH_A, 0); |
1230 | 1233 | ||
1231 | at32_spi_setup_slaves(0, b, n, spi0_pins); | 1234 | at32_spi_setup_slaves(0, b, n); |
1232 | break; | 1235 | break; |
1233 | 1236 | ||
1234 | case 1: | 1237 | case 1: |
@@ -1239,7 +1242,7 @@ at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n) | |||
1239 | select_peripheral(PIOB, (1 << 0), PERIPH_B, AT32_GPIOF_PULLUP); | 1242 | select_peripheral(PIOB, (1 << 0), PERIPH_B, AT32_GPIOF_PULLUP); |
1240 | select_peripheral(PIOB, pin_mask, PERIPH_B, 0); | 1243 | select_peripheral(PIOB, pin_mask, PERIPH_B, 0); |
1241 | 1244 | ||
1242 | at32_spi_setup_slaves(1, b, n, spi1_pins); | 1245 | at32_spi_setup_slaves(1, b, n); |
1243 | break; | 1246 | break; |
1244 | 1247 | ||
1245 | default: | 1248 | default: |
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index ddedb471f33e..c7f25bb1d068 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h | |||
@@ -49,6 +49,7 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data); | |||
49 | struct spi_board_info; | 49 | struct spi_board_info; |
50 | struct platform_device * | 50 | struct platform_device * |
51 | at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n); | 51 | at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n); |
52 | void at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n); | ||
52 | 53 | ||
53 | struct atmel_lcdfb_info; | 54 | struct atmel_lcdfb_info; |
54 | struct platform_device * | 55 | struct platform_device * |