Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/ker…
Browse files Browse the repository at this point in the history
…nel/avr32

* 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32:
  [AVR32] Add missing #include <linux/module.h>
  [AVR32] ssize_t should be long, not int
  [AVR32] Remove last remains of libgcc
  [AVR32] SPI platform code update
  [AVR32] Add PIOE device and reserve SDRAM pins
  [AVR32] Introduce at32_reserve_pin()
  [AVR32] Don't reset PIO state at bootup
  [AVR32] GPIO API implementation
  [AVR32] Use ARRAY_SIZE macro when appropriate
  [AVR32] Implement dma_mapping_error()
  [AVR32] Fix incorrect invalidation of shared cachelines
  [AVR32] ext int fixes
  [AVR32] fix serial port setup on ATSTK1000
  [AVR32] /proc/interrupts display
  Remove a couple final references to obsolete verify_area().
  • Loading branch information
Linus Torvalds committed Feb 9, 2007
2 parents 6204530 + 4ffabef commit d27146d
Show file tree
Hide file tree
Showing 23 changed files with 455 additions and 232 deletions.
2 changes: 1 addition & 1 deletion arch/avr32/boards/atstk1000/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
obj-y += setup.o spi.o flash.o
obj-y += setup.o flash.o
obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o
53 changes: 50 additions & 3 deletions arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@
* published by the Free Software Foundation.
*/
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/spi/spi.h>

#include <asm/io.h>
#include <asm/setup.h>
#include <asm/arch/at32ap7000.h>
#include <asm/arch/board.h>
#include <asm/arch/init.h>
#include <asm/arch/portmux.h>


#define SW2_DEFAULT /* MMCI and UART_A available */

struct eth_addr {
u8 addr[6];
Expand All @@ -29,6 +36,16 @@ static struct eth_addr __initdata hw_addr[2];
static struct eth_platform_data __initdata eth_data[2];
extern struct lcdc_platform_data atstk1000_fb0_data;

static struct spi_board_info spi_board_info[] __initdata = {
{
.modalias = "ltv350qv",
.controller_data = (void *)GPIO_PIN_PA(4),
.max_speed_hz = 16000000,
.bus_num = 0,
.chip_select = 1,
},
};

/*
* The next two functions should go away as the boot loader is
* supposed to initialize the macb address registers with a valid
Expand Down Expand Up @@ -86,23 +103,53 @@ static void __init set_hw_addr(struct platform_device *pdev)

void __init setup_board(void)
{
at32_map_usart(1, 0); /* /dev/ttyS0 */
at32_map_usart(2, 1); /* /dev/ttyS1 */
at32_map_usart(3, 2); /* /dev/ttyS2 */
#ifdef SW2_DEFAULT
at32_map_usart(1, 0); /* USART 1/A: /dev/ttyS0, DB9 */
#else
at32_map_usart(0, 1); /* USART 0/B: /dev/ttyS1, IRDA */
#endif
/* USART 2/unused: expansion connector */
at32_map_usart(3, 2); /* USART 3/C: /dev/ttyS2, DB9 */

at32_setup_serial_console(0);
}

static int __init atstk1002_init(void)
{
/*
* ATSTK1000 uses 32-bit SDRAM interface. Reserve the
* SDRAM-specific pins so that nobody messes with them.
*/
at32_reserve_pin(GPIO_PIN_PE(0)); /* DATA[16] */
at32_reserve_pin(GPIO_PIN_PE(1)); /* DATA[17] */
at32_reserve_pin(GPIO_PIN_PE(2)); /* DATA[18] */
at32_reserve_pin(GPIO_PIN_PE(3)); /* DATA[19] */
at32_reserve_pin(GPIO_PIN_PE(4)); /* DATA[20] */
at32_reserve_pin(GPIO_PIN_PE(5)); /* DATA[21] */
at32_reserve_pin(GPIO_PIN_PE(6)); /* DATA[22] */
at32_reserve_pin(GPIO_PIN_PE(7)); /* DATA[23] */
at32_reserve_pin(GPIO_PIN_PE(8)); /* DATA[24] */
at32_reserve_pin(GPIO_PIN_PE(9)); /* DATA[25] */
at32_reserve_pin(GPIO_PIN_PE(10)); /* DATA[26] */
at32_reserve_pin(GPIO_PIN_PE(11)); /* DATA[27] */
at32_reserve_pin(GPIO_PIN_PE(12)); /* DATA[28] */
at32_reserve_pin(GPIO_PIN_PE(13)); /* DATA[29] */
at32_reserve_pin(GPIO_PIN_PE(14)); /* DATA[30] */
at32_reserve_pin(GPIO_PIN_PE(15)); /* DATA[31] */
at32_reserve_pin(GPIO_PIN_PE(26)); /* SDCS */

at32_add_system_devices();

#ifdef SW2_DEFAULT
at32_add_device_usart(0);
#else
at32_add_device_usart(1);
#endif
at32_add_device_usart(2);

set_hw_addr(at32_add_device_eth(0, &eth_data[0]));

spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
at32_add_device_spi(0);
at32_add_device_lcdc(0, &atstk1000_fb0_data);

Expand Down
27 changes: 0 additions & 27 deletions arch/avr32/boards/atstk1000/spi.c

This file was deleted.

1 change: 1 addition & 0 deletions arch/avr32/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/sysdev.h>
#include <linux/seq_file.h>
#include <linux/cpu.h>
#include <linux/module.h>
#include <linux/percpu.h>
#include <linux/param.h>
#include <linux/errno.h>
Expand Down
1 change: 1 addition & 0 deletions arch/avr32/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, "%3d: ", i);
for_each_online_cpu(cpu)
seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next)
seq_printf(p, ", %s", action->name);
Expand Down
4 changes: 2 additions & 2 deletions arch/avr32/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/root_dev.h>
#include <linux/cpu.h>
#include <linux/kernel.h>

#include <asm/sections.h>
#include <asm/processor.h>
Expand Down Expand Up @@ -174,8 +175,7 @@ static int __init parse_tag_mem_range(struct tag *tag,
* Copy the data so the bootmem init code doesn't need to care
* about it.
*/
if (mem_range_next_free >=
(sizeof(mem_range_cache) / sizeof(mem_range_cache[0])))
if (mem_range_next_free >= ARRAY_SIZE(mem_range_cache))
panic("Physical memory map too complex!\n");

new = &mem_range_cache[mem_range_next_free++];
Expand Down
33 changes: 0 additions & 33 deletions arch/avr32/lib/libgcc.h

This file was deleted.

98 changes: 0 additions & 98 deletions arch/avr32/lib/longlong.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/avr32/mach-at32ap/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
obj-y += at32ap.o clock.o pio.o intc.o extint.o hsmc.o
obj-y += at32ap.o clock.o intc.o extint.o pio.o hsmc.o
obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o
Loading

0 comments on commit d27146d

Please sign in to comment.