Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32…
Browse files Browse the repository at this point in the history
…-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Fix build failures in board code
  avr32: Allow selecting multiple pins at once
  avr32: Minor pm_power_off cleanup
  avr32: Implement {read,write}[bwl]_be
  avr32: Replace static clock list with dynamic linked list
  avr32: Use platform_driver_probe for pdc platform driver
  avr32: Use platform_driver_probe for pio platform driver
  avr32: Provide a way to deselect pins in the portmux
  ngw100: export J15 through sysfs
  avr32: Allow fine-grained control over LCDC pins
  avr32: added mem kernel command line option support
  Add kernel support for oprofile callgraphs on AVR32
  avr32: use the new byteorder headers
  • Loading branch information
Linus Torvalds committed Oct 12, 2008
2 parents 46b5e34 + 6eb3ebe commit 1a2217a
Show file tree
Hide file tree
Showing 20 changed files with 578 additions and 247 deletions.
12 changes: 11 additions & 1 deletion arch/avr32/boards/atngw100/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
#include <linux/clk.h>
#include <linux/etherdevice.h>
#include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
Expand Down Expand Up @@ -193,7 +194,7 @@ static int __init atngw100_init(void)
* PB28/EXTINT3 doesn't; it should be SMBALERT# (for PMBus),
* but it's not available off-board.
*/
at32_select_periph(GPIO_PIN_PB(28), 0, AT32_GPIOF_PULLUP);
at32_select_periph(GPIO_PIOB_BASE, 1 << 28, 0, AT32_GPIOF_PULLUP);
at32_select_gpio(i2c_gpio_data.sda_pin,
AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
at32_select_gpio(i2c_gpio_data.scl_pin,
Expand All @@ -207,6 +208,15 @@ postcore_initcall(atngw100_init);

static int __init atngw100_arch_init(void)
{
/* PB30 is the otherwise unused jumper on the mainboard, with an
* external pullup; the jumper grounds it. Use it however you
* like, including letting U-Boot or Linux tweak boot sequences.
*/
at32_select_gpio(GPIO_PIN_PB(30), 0);
gpio_request(GPIO_PIN_PB(30), "j15");
gpio_direction_input(GPIO_PIN_PB(30));
gpio_export(GPIO_PIN_PB(30), false);

/* set_irq_type() after the arch_initcall for EIC has run, and
* before the I2C subsystem could try using this IRQ.
*/
Expand Down
7 changes: 4 additions & 3 deletions arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void __init atstk1002_setup_extdac(void)
goto err_set_clk;
}

at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0);
at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0);
at73c213_data.dac_clk = gclk;

err_set_clk:
Expand Down Expand Up @@ -330,13 +330,14 @@ static int __init atstk1002_init(void)
at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
#endif
#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
at32_add_device_mci(0, &mci0_pdata);
at32_add_device_mci(0, &mci0_data);
#endif
#ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM
set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
#else
at32_add_device_lcdc(0, &atstk1000_lcdc_data,
fbmem_start, fbmem_size, 0);
fbmem_start, fbmem_size,
ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL);
#endif
at32_add_device_usba(0, NULL);
#ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM
Expand Down
3 changes: 2 additions & 1 deletion arch/avr32/boards/atstk1000/atstk1003.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/spi/spi.h>

#include <asm/setup.h>
#include <asm/atmel-mci.h>

#include <mach/at32ap700x.h>
#include <mach/board.h>
Expand Down Expand Up @@ -94,7 +95,7 @@ static void __init atstk1003_setup_extdac(void)
goto err_set_clk;
}

at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0);
at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0);
at73c213_data.dac_clk = gclk;

err_set_clk:
Expand Down
6 changes: 4 additions & 2 deletions arch/avr32/boards/atstk1000/atstk1004.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <video/atmel_lcdc.h>

#include <asm/setup.h>
#include <asm/atmel-mci.h>

#include <mach/at32ap700x.h>
#include <mach/board.h>
Expand Down Expand Up @@ -99,7 +100,7 @@ static void __init atstk1004_setup_extdac(void)
goto err_set_clk;
}

at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0);
at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0);
at73c213_data.dac_clk = gclk;

err_set_clk:
Expand Down Expand Up @@ -150,7 +151,8 @@ static int __init atstk1004_init(void)
at32_add_device_mci(0, &mci0_data);
#endif
at32_add_device_lcdc(0, &atstk1000_lcdc_data,
fbmem_start, fbmem_size, 0);
fbmem_start, fbmem_size,
ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL);
at32_add_device_usba(0, NULL);
#ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM
at32_add_device_ssc(0, ATMEL_SSC_TX);
Expand Down
22 changes: 14 additions & 8 deletions arch/avr32/include/asm/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#include <asm/types.h>
#include <linux/compiler.h>

#define __BIG_ENDIAN
#define __SWAB_64_THRU_32__

#ifdef __CHECKER__
extern unsigned long __builtin_bswap_32(unsigned long x);
extern unsigned short __builtin_bswap_16(unsigned short x);
Expand All @@ -17,15 +20,18 @@ extern unsigned short __builtin_bswap_16(unsigned short x);
* the result.
*/
#if !(__GNUC__ == 4 && __GNUC_MINOR__ < 2)
#define __arch__swab32(x) __builtin_bswap_32(x)
#define __arch__swab16(x) __builtin_bswap_16(x)
#endif
static inline __attribute_const__ __u16 __arch_swab16(__u16 val)
{
return __builtin_bswap_16(val);
}
#define __arch_swab16 __arch_swab16

#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __BYTEORDER_HAS_U64__
# define __SWAB_64_THRU_32__
static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
{
return __builtin_bswap_32(val);
}
#define __arch_swab32 __arch_swab32
#endif

#include <linux/byteorder/big_endian.h>

#include <linux/byteorder.h>
#endif /* __ASM_AVR32_BYTEORDER_H */
8 changes: 8 additions & 0 deletions arch/avr32/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ BUILDIO_IOPORT(l, u32)
#define readw_relaxed readw
#define readl_relaxed readl

#define readb_be __raw_readb
#define readw_be __raw_readw
#define readl_be __raw_readl

#define writeb_be __raw_writeb
#define writew_be __raw_writew
#define writel_be __raw_writel

#define __BUILD_MEMORY_STRING(bwl, type) \
static inline void writes##bwl(volatile void __iomem *addr, \
const void *data, unsigned int count) \
Expand Down
3 changes: 2 additions & 1 deletion arch/avr32/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/fs.h>
#include <linux/pm.h>
#include <linux/ptrace.h>
#include <linux/reboot.h>
#include <linux/tick.h>
Expand All @@ -20,7 +21,7 @@

#include <mach/pm.h>

void (*pm_power_off)(void) = NULL;
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);

/*
Expand Down
19 changes: 19 additions & 0 deletions arch/avr32/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,25 @@ static int __init early_parse_fbmem(char *p)
}
early_param("fbmem", early_parse_fbmem);

/*
* Pick out the memory size. We look for mem=size@start,
* where start and size are "size[KkMmGg]"
*/
static int __init early_mem(char *p)
{
resource_size_t size, start;

start = system_ram->start;
size = memparse(p, &p);
if (*p == '@')
start = memparse(p + 1, &p);

system_ram->start = start;
system_ram->end = system_ram->start + size - 1;
return 0;
}
early_param("mem", early_mem);

static int __init parse_tag_core(struct tag *tag)
{
if (tag->hdr.size > 2) {
Expand Down
Loading

0 comments on commit 1a2217a

Please sign in to comment.