Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d27146dd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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().
parents 62045305 4ffabefb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
obj-y				+= setup.o spi.o flash.o
obj-y				+= setup.o flash.o
obj-$(CONFIG_BOARD_ATSTK1002)	+= atstk1002.o
+50 −3
Original line number Diff line number Diff line
@@ -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];
@@ -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
@@ -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);

arch/avr32/boards/atstk1000/spi.c

deleted100644 → 0
+0 −27
Original line number Diff line number Diff line
/*
 * ATSTK1000 SPI devices
 *
 * Copyright (C) 2005 Atmel Norway
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/device.h>
#include <linux/spi/spi.h>

static struct spi_board_info spi_board_info[] __initdata = {
	{
		.modalias	= "ltv350qv",
		.max_speed_hz	= 16000000,
		.bus_num	= 0,
		.chip_select	= 1,
	},
};

static int board_init_spi(void)
{
	spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
	return 0;
}
arch_initcall(board_init_spi);
+1 −0
Original line number Diff line number Diff line
@@ -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>
+1 −0
Original line number Diff line number Diff line
@@ -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);
Loading