Commit 84c48e6f authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Fix oops on unaligned user access
  avr32: Add support for Mediama RMTx add-on board for ATNGW100
  avr32: Change Atmel ATNGW100 config to add choice of add-on board
  Fix MIMC200 board LCD init
  avr32: Fix clash in ATMEL_USART_ flags
  avr32: remove obsolete hw_interrupt_type
  avr32: Solves problem with inverted MCI detect pin on Merisc board
  atmel-mci: Add support for inverted detect pin
parents 5c55b40b bb6e6470
...@@ -2,8 +2,15 @@ ...@@ -2,8 +2,15 @@
if BOARD_ATNGW100 if BOARD_ATNGW100
choice
prompt "Select an NGW100 add-on board to support"
default BOARD_ATNGW100_ADDON_NONE
config BOARD_ATNGW100_ADDON_NONE
bool "None"
config BOARD_ATNGW100_EVKLCD10X config BOARD_ATNGW100_EVKLCD10X
bool "Add support for EVKLCD10X addon board" bool "EVKLCD10X addon board"
help help
This enables support for the EVKLCD100 (QVGA) or EVKLCD101 (VGA) This enables support for the EVKLCD100 (QVGA) or EVKLCD101 (VGA)
addon board for the NGW100. By enabling this the LCD controller and addon board for the NGW100. By enabling this the LCD controller and
...@@ -14,7 +21,19 @@ config BOARD_ATNGW100_EVKLCD10X ...@@ -14,7 +21,19 @@ config BOARD_ATNGW100_EVKLCD10X
The MCI pins can be reenabled by editing the "add device function" but The MCI pins can be reenabled by editing the "add device function" but
this may break the setup for other displays that use these pins. this may break the setup for other displays that use these pins.
Choose 'Y' here if you have a EVKLCD100/101 connected to the NGW100. config BOARD_ATNGW100_MRMT
bool "Mediama RMT1/2 add-on board"
help
This enables support for the Mediama RMT1 or RMT2 board.
RMT provides LCD support, AC97 codec and other
optional peripherals to the Atmel NGW100.
This choice disables the detect pin and the write-protect pin for the
MCI platform device, since it conflicts with the LCD platform device.
The MCI pins can be reenabled by editing the "add device function" but
this may break the setup for other displays that use these pins.
endchoice
choice choice
prompt "LCD panel resolution on EVKLCD10X" prompt "LCD panel resolution on EVKLCD10X"
...@@ -32,4 +51,8 @@ config BOARD_ATNGW100_EVKLCD10X_POW_QVGA ...@@ -32,4 +51,8 @@ config BOARD_ATNGW100_EVKLCD10X_POW_QVGA
endchoice endchoice
if BOARD_ATNGW100_MRMT
source "arch/avr32/boards/atngw100/Kconfig_mrmt"
endif
endif # BOARD_ATNGW100 endif # BOARD_ATNGW100
# RMT for NGW100 customization
choice
prompt "RMT Version"
help
Select the RMTx board version.
config BOARD_MRMT_REV1
bool "RMT1"
config BOARD_MRMT_REV2
bool "RMT2"
endchoice
config BOARD_MRMT_AC97
bool "Enable AC97 CODEC"
help
Enable the UCB1400 AC97 CODEC driver.
choice
prompt "Touchscreen Driver"
default BOARD_MRMT_ADS7846_TS
config BOARD_MRMT_UCB1400_TS
bool "Use UCB1400 Touchscreen"
config BOARD_MRMT_ADS7846_TS
bool "Use ADS7846 Touchscreen"
endchoice
choice
prompt "RMTx LCD Selection"
default BOARD_MRMT_LCD_DISABLE
config BOARD_MRMT_LCD_DISABLE
bool "LCD Disabled"
config BOARD_MRMT_LCD_LQ043T3DX0X
bool "Sharp LQ043T3DX0x or compatible"
help
If using RMT2, be sure to load the resistor pack selectors accordingly
if BOARD_MRMT_REV2
config BOARD_MRMT_LCD_KWH043GM08
bool "Formike KWH043GM08 or compatible"
help
Be sure to load the RMT2 resistor pack selectors accordingly
endif
endchoice
if !BOARD_MRMT_LCD_DISABLE
config BOARD_MRMT_BL_PWM
bool "Use PWM control for LCD Backlight"
help
Use PWM driver for controlling LCD Backlight.
Otherwise, LCD Backlight is always on.
endif
config BOARD_MRMT_RTC_I2C
bool "Use External RTC on I2C Bus"
help
RMT1 has an optional RTC device on the I2C bus.
It is a SII S35390A. Be sure to select the
matching RTC driver.
choice
prompt "Wireless Module on ttyS2"
default BOARD_MRMT_WIRELESS_ZB
config BOARD_MRMT_WIRELESS_ZB
bool "Use ZigBee/802.15.4 Module"
config BOARD_MRMT_WIRELESS_BT
bool "Use Bluetooth (HCI) Module"
config BOARD_MRMT_WIRELESS_NONE
bool "Not Installed"
endchoice
obj-y += setup.o flash.o obj-y += setup.o flash.o
obj-$(CONFIG_BOARD_ATNGW100_EVKLCD10X) += evklcd10x.o obj-$(CONFIG_BOARD_ATNGW100_EVKLCD10X) += evklcd10x.o
obj-$(CONFIG_BOARD_ATNGW100_MRMT) += mrmt.o
This diff is collapsed.
...@@ -56,8 +56,13 @@ static struct spi_board_info spi0_board_info[] __initdata = { ...@@ -56,8 +56,13 @@ static struct spi_board_info spi0_board_info[] __initdata = {
static struct mci_platform_data __initdata mci0_data = { static struct mci_platform_data __initdata mci0_data = {
.slot[0] = { .slot[0] = {
.bus_width = 4, .bus_width = 4,
#if defined(CONFIG_BOARD_ATNGW100_EVKLCD10X) || defined(CONFIG_BOARD_ATNGW100_MRMT1)
.detect_pin = GPIO_PIN_NONE,
.wp_pin = GPIO_PIN_NONE,
#else
.detect_pin = GPIO_PIN_PC(25), .detect_pin = GPIO_PIN_PC(25),
.wp_pin = GPIO_PIN_PE(0), .wp_pin = GPIO_PIN_PE(0),
#endif
}, },
}; };
......
...@@ -97,6 +97,7 @@ static struct mci_platform_data __initdata mci0_data = { ...@@ -97,6 +97,7 @@ static struct mci_platform_data __initdata mci0_data = {
.bus_width = 4, .bus_width = 4,
.detect_pin = GPIO_PIN_PE(19), .detect_pin = GPIO_PIN_PE(19),
.wp_pin = GPIO_PIN_PE(20), .wp_pin = GPIO_PIN_PE(20),
.detect_is_active_high = true,
}, },
}; };
......
...@@ -43,16 +43,16 @@ unsigned long at32_board_osc_rates[3] = { ...@@ -43,16 +43,16 @@ unsigned long at32_board_osc_rates[3] = {
/* Initialized by bootloader-specific startup code. */ /* Initialized by bootloader-specific startup code. */
struct tag *bootloader_tags __initdata; struct tag *bootloader_tags __initdata;
static struct fb_videomode __initdata tx14d14_modes[] = { static struct fb_videomode __initdata pt0434827_modes[] = {
{ {
.name = "640x480 @ 60", .name = "480x272 @ 72",
.refresh = 60, .refresh = 72,
.xres = 640, .yres = 480, .xres = 480, .yres = 272,
.pixclock = KHZ2PICOS(11666), .pixclock = KHZ2PICOS(10000),
.left_margin = 80, .right_margin = 1, .left_margin = 1, .right_margin = 1,
.upper_margin = 13, .lower_margin = 2, .upper_margin = 12, .lower_margin = 1,
.hsync_len = 64, .vsync_len = 1, .hsync_len = 42, .vsync_len = 1,
.sync = 0, .sync = 0,
.vmode = FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
...@@ -60,14 +60,14 @@ static struct fb_videomode __initdata tx14d14_modes[] = { ...@@ -60,14 +60,14 @@ static struct fb_videomode __initdata tx14d14_modes[] = {
}; };
static struct fb_monspecs __initdata mimc200_default_monspecs = { static struct fb_monspecs __initdata mimc200_default_monspecs = {
.manufacturer = "HIT", .manufacturer = "PT",
.monitor = "TX14D14VM1BAB", .monitor = "PT0434827-A401",
.modedb = tx14d14_modes, .modedb = pt0434827_modes,
.modedb_len = ARRAY_SIZE(tx14d14_modes), .modedb_len = ARRAY_SIZE(pt0434827_modes),
.hfmin = 14820, .hfmin = 14820,
.hfmax = 22230, .hfmax = 22230,
.vfmin = 60, .vfmin = 60,
.vfmax = 73.3, .vfmax = 85,
.dclkmax = 25200000, .dclkmax = 25200000,
}; };
...@@ -228,7 +228,8 @@ static int __init mimc200_init(void) ...@@ -228,7 +228,8 @@ static int __init mimc200_init(void)
i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info)); i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info));
at32_add_device_lcdc(0, &mimc200_lcdc_data, at32_add_device_lcdc(0, &mimc200_lcdc_data,
fbmem_start, fbmem_size, 1); fbmem_start, fbmem_size,
ATMEL_LCDC_CONTROL | ATMEL_LCDC_ALT_CONTROL | ATMEL_LCDC_ALT_24B_DATA);
return 0; return 0;
} }
......
This diff is collapsed.
#ifndef __ASM_AVR32_HW_IRQ_H #ifndef __ASM_AVR32_HW_IRQ_H
#define __ASM_AVR32_HW_IRQ_H #define __ASM_AVR32_HW_IRQ_H
static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) static inline void hw_resend_irq(struct irq_chip *h, unsigned int i)
{ {
/* Nothing to do */ /* Nothing to do */
} }
......
...@@ -75,8 +75,17 @@ void _exception(long signr, struct pt_regs *regs, int code, ...@@ -75,8 +75,17 @@ void _exception(long signr, struct pt_regs *regs, int code,
{ {
siginfo_t info; siginfo_t info;
if (!user_mode(regs)) if (!user_mode(regs)) {
const struct exception_table_entry *fixup;
/* Are we prepared to handle this kernel fault? */
fixup = search_exception_tables(regs->pc);
if (fixup) {
regs->pc = fixup->fixup;
return;
}
die("Unhandled exception in kernel mode", regs, signr); die("Unhandled exception in kernel mode", regs, signr);
}
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
info.si_signo = signr; info.si_signo = signr;
......
...@@ -29,7 +29,7 @@ extern struct platform_device *atmel_default_console_device; ...@@ -29,7 +29,7 @@ extern struct platform_device *atmel_default_console_device;
/* Flags for selecting USART extra pins */ /* Flags for selecting USART extra pins */
#define ATMEL_USART_RTS 0x01 #define ATMEL_USART_RTS 0x01
#define ATMEL_USART_CTS 0x02 #define ATMEL_USART_CTS 0x02
#define ATMEL_USART_CLK 0x03 #define ATMEL_USART_CLK 0x04
struct atmel_uart_data { struct atmel_uart_data {
short use_dma_tx; /* use transmit DMA? */ short use_dma_tx; /* use transmit DMA? */
......
...@@ -177,6 +177,7 @@ struct atmel_mci { ...@@ -177,6 +177,7 @@ struct atmel_mci {
* available. * available.
* @wp_pin: GPIO pin used for card write protect sending, or negative * @wp_pin: GPIO pin used for card write protect sending, or negative
* if not available. * if not available.
* @detect_is_active_high: The state of the detect pin when it is active.
* @detect_timer: Timer used for debouncing @detect_pin interrupts. * @detect_timer: Timer used for debouncing @detect_pin interrupts.
*/ */
struct atmel_mci_slot { struct atmel_mci_slot {
...@@ -196,6 +197,7 @@ struct atmel_mci_slot { ...@@ -196,6 +197,7 @@ struct atmel_mci_slot {
int detect_pin; int detect_pin;
int wp_pin; int wp_pin;
bool detect_is_active_high;
struct timer_list detect_timer; struct timer_list detect_timer;
}; };
...@@ -924,7 +926,8 @@ static int atmci_get_cd(struct mmc_host *mmc) ...@@ -924,7 +926,8 @@ static int atmci_get_cd(struct mmc_host *mmc)
struct atmel_mci_slot *slot = mmc_priv(mmc); struct atmel_mci_slot *slot = mmc_priv(mmc);
if (gpio_is_valid(slot->detect_pin)) { if (gpio_is_valid(slot->detect_pin)) {
present = !gpio_get_value(slot->detect_pin); present = !(gpio_get_value(slot->detect_pin) ^
slot->detect_is_active_high);
dev_dbg(&mmc->class_dev, "card is %spresent\n", dev_dbg(&mmc->class_dev, "card is %spresent\n",
present ? "" : "not "); present ? "" : "not ");
} }
...@@ -1028,7 +1031,8 @@ static void atmci_detect_change(unsigned long data) ...@@ -1028,7 +1031,8 @@ static void atmci_detect_change(unsigned long data)
return; return;
enable_irq(gpio_to_irq(slot->detect_pin)); enable_irq(gpio_to_irq(slot->detect_pin));
present = !gpio_get_value(slot->detect_pin); present = !(gpio_get_value(slot->detect_pin) ^
slot->detect_is_active_high);
present_old = test_bit(ATMCI_CARD_PRESENT, &slot->flags); present_old = test_bit(ATMCI_CARD_PRESENT, &slot->flags);
dev_vdbg(&slot->mmc->class_dev, "detect change: %d (was %d)\n", dev_vdbg(&slot->mmc->class_dev, "detect change: %d (was %d)\n",
...@@ -1456,6 +1460,7 @@ static int __init atmci_init_slot(struct atmel_mci *host, ...@@ -1456,6 +1460,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
slot->host = host; slot->host = host;
slot->detect_pin = slot_data->detect_pin; slot->detect_pin = slot_data->detect_pin;
slot->wp_pin = slot_data->wp_pin; slot->wp_pin = slot_data->wp_pin;
slot->detect_is_active_high = slot_data->detect_is_active_high;
slot->sdc_reg = sdc_reg; slot->sdc_reg = sdc_reg;
mmc->ops = &atmci_ops; mmc->ops = &atmci_ops;
...@@ -1477,7 +1482,8 @@ static int __init atmci_init_slot(struct atmel_mci *host, ...@@ -1477,7 +1482,8 @@ static int __init atmci_init_slot(struct atmel_mci *host,
if (gpio_request(slot->detect_pin, "mmc_detect")) { if (gpio_request(slot->detect_pin, "mmc_detect")) {
dev_dbg(&mmc->class_dev, "no detect pin available\n"); dev_dbg(&mmc->class_dev, "no detect pin available\n");
slot->detect_pin = -EBUSY; slot->detect_pin = -EBUSY;
} else if (gpio_get_value(slot->detect_pin)) { } else if (gpio_get_value(slot->detect_pin) ^
slot->detect_is_active_high) {
clear_bit(ATMCI_CARD_PRESENT, &slot->flags); clear_bit(ATMCI_CARD_PRESENT, &slot->flags);
} }
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* @bus_width: Number of data lines wired up the slot * @bus_width: Number of data lines wired up the slot
* @detect_pin: GPIO pin wired to the card detect switch * @detect_pin: GPIO pin wired to the card detect switch
* @wp_pin: GPIO pin wired to the write protect sensor * @wp_pin: GPIO pin wired to the write protect sensor
* @detect_is_active_high: The state of the detect pin when it is active
* *
* If a given slot is not present on the board, @bus_width should be * If a given slot is not present on the board, @bus_width should be
* set to 0. The other fields are ignored in this case. * set to 0. The other fields are ignored in this case.
...@@ -24,6 +25,7 @@ struct mci_slot_pdata { ...@@ -24,6 +25,7 @@ struct mci_slot_pdata {
unsigned int bus_width; unsigned int bus_width;
int detect_pin; int detect_pin;
int wp_pin; int wp_pin;
bool detect_is_active_high;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment