Commit 143ed290 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge branch 'imx-fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

parents ac9cf9ff d9c92783
...@@ -331,6 +331,9 @@ int __init mx25_clocks_init(void) ...@@ -331,6 +331,9 @@ int __init mx25_clocks_init(void)
__raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0),
CRM_BASE + 0x64); CRM_BASE + 0x64);
/* Clock source for gpt is ahb_div */
__raw_writel(__raw_readl(CRM_BASE+0x64) & ~(1 << 5), CRM_BASE + 0x64);
mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54);
return 0; return 0;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <sound/tlv320aic32x4.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
...@@ -196,6 +197,17 @@ static struct pca953x_platform_data visstrim_m10_pca9555_pdata = { ...@@ -196,6 +197,17 @@ static struct pca953x_platform_data visstrim_m10_pca9555_pdata = {
.invert = 0, .invert = 0,
}; };
static struct aic32x4_pdata visstrim_m10_aic32x4_pdata = {
.power_cfg = AIC32X4_PWR_MICBIAS_2075_LDOIN |
AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE |
AIC32X4_PWR_AIC32X4_LDO_ENABLE |
AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36 |
AIC32X4_PWR_CMMODE_HP_LDOIN_POWERED,
.micpga_routing = AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K |
AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K,
.swapdacs = false,
};
static struct i2c_board_info visstrim_m10_i2c_devices[] = { static struct i2c_board_info visstrim_m10_i2c_devices[] = {
{ {
I2C_BOARD_INFO("pca9555", 0x20), I2C_BOARD_INFO("pca9555", 0x20),
...@@ -203,6 +215,7 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = { ...@@ -203,6 +215,7 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
}, },
{ {
I2C_BOARD_INFO("tlv320aic32x4", 0x18), I2C_BOARD_INFO("tlv320aic32x4", 0x18),
.platform_data = &visstrim_m10_aic32x4_pdata,
} }
}; };
......
...@@ -468,7 +468,7 @@ static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = { ...@@ -468,7 +468,7 @@ static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = {
#endif #endif
}; };
static void mxc_init_i2c(void) static void __init mxc_init_i2c(void)
{ {
i2c_register_board_info(1, mx31ads_i2c1_devices, i2c_register_board_info(1, mx31ads_i2c1_devices,
ARRAY_SIZE(mx31ads_i2c1_devices)); ARRAY_SIZE(mx31ads_i2c1_devices));
...@@ -486,7 +486,7 @@ static unsigned int ssi_pins[] = { ...@@ -486,7 +486,7 @@ static unsigned int ssi_pins[] = {
MX31_PIN_STXD5__STXD5, MX31_PIN_STXD5__STXD5,
}; };
static void mxc_init_audio(void) static void __init mxc_init_audio(void)
{ {
imx31_add_imx_ssi(0, NULL); imx31_add_imx_ssi(0, NULL);
mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi"); mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi");
......
...@@ -192,7 +192,7 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = { ...@@ -192,7 +192,7 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
.portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
}; };
static void lilly1131_usb_init(void) static void __init lilly1131_usb_init(void)
{ {
imx31_add_mxc_ehci_hs(1, &usbh1_pdata); imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
......
...@@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { ...@@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP,
}, { }, {
.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000),
.irq = irq_to_gpio(CPUIMX51_QUARTD_GPIO), .irq = gpio_to_irq(CPUIMX51_QUARTD_GPIO),
.irqflags = IRQF_TRIGGER_HIGH, .irqflags = IRQF_TRIGGER_HIGH,
.uartclk = CPUIMX51_QUART_XTAL, .uartclk = CPUIMX51_QUART_XTAL,
.regshift = CPUIMX51_QUART_REGSHIFT, .regshift = CPUIMX51_QUART_REGSHIFT,
......
...@@ -369,7 +369,7 @@ static void __init mx51_babbage_init(void) ...@@ -369,7 +369,7 @@ static void __init mx51_babbage_init(void)
ARRAY_SIZE(mx51babbage_pads)); ARRAY_SIZE(mx51babbage_pads));
imx51_add_imx_uart(0, &uart_pdata); imx51_add_imx_uart(0, &uart_pdata);
imx51_add_imx_uart(1, &uart_pdata); imx51_add_imx_uart(1, NULL);
imx51_add_imx_uart(2, &uart_pdata); imx51_add_imx_uart(2, &uart_pdata);
babbage_fec_reset(); babbage_fec_reset();
......
...@@ -108,9 +108,9 @@ static void __init mx51_efikamx_board_id(void) ...@@ -108,9 +108,9 @@ static void __init mx51_efikamx_board_id(void)
gpio_request(EFIKAMX_PCBID2, "pcbid2"); gpio_request(EFIKAMX_PCBID2, "pcbid2");
gpio_direction_input(EFIKAMX_PCBID2); gpio_direction_input(EFIKAMX_PCBID2);
id = gpio_get_value(EFIKAMX_PCBID0); id = gpio_get_value(EFIKAMX_PCBID0) ? 1 : 0;
id |= gpio_get_value(EFIKAMX_PCBID1) << 1; id |= (gpio_get_value(EFIKAMX_PCBID1) ? 1 : 0) << 1;
id |= gpio_get_value(EFIKAMX_PCBID2) << 2; id |= (gpio_get_value(EFIKAMX_PCBID2) ? 1 : 0) << 2;
switch (id) { switch (id) {
case 7: case 7:
......
...@@ -156,23 +156,24 @@ static struct gpio_keys_button mx51_efikasb_keys[] = { ...@@ -156,23 +156,24 @@ static struct gpio_keys_button mx51_efikasb_keys[] = {
{ {
.code = KEY_POWER, .code = KEY_POWER,
.gpio = EFIKASB_PWRKEY, .gpio = EFIKASB_PWRKEY,
.type = EV_PWR, .type = EV_KEY,
.desc = "Power Button", .desc = "Power Button",
.wakeup = 1, .wakeup = 1,
.debounce_interval = 10, /* ms */ .active_low = 1,
}, },
{ {
.code = SW_LID, .code = SW_LID,
.gpio = EFIKASB_LID, .gpio = EFIKASB_LID,
.type = EV_SW, .type = EV_SW,
.desc = "Lid Switch", .desc = "Lid Switch",
.active_low = 1,
}, },
{ {
/* SW_RFKILLALL vs KEY_RFKILL ? */ .code = KEY_RFKILL,
.code = SW_RFKILL_ALL,
.gpio = EFIKASB_RFKILL, .gpio = EFIKASB_RFKILL,
.type = EV_SW, .type = EV_KEY,
.desc = "rfkill", .desc = "rfkill",
.active_low = 1,
}, },
}; };
...@@ -224,8 +225,8 @@ static void __init mx51_efikasb_board_id(void) ...@@ -224,8 +225,8 @@ static void __init mx51_efikasb_board_id(void)
gpio_request(EFIKASB_PCBID1, "pcb id1"); gpio_request(EFIKASB_PCBID1, "pcb id1");
gpio_direction_input(EFIKASB_PCBID1); gpio_direction_input(EFIKASB_PCBID1);
id = gpio_get_value(EFIKASB_PCBID0); id = gpio_get_value(EFIKASB_PCBID0) ? 1 : 0;
id |= gpio_get_value(EFIKASB_PCBID1) << 1; id |= (gpio_get_value(EFIKASB_PCBID1) ? 1 : 0) << 1;
switch (id) { switch (id) {
default: default:
......
...@@ -271,7 +271,11 @@ static int _clk_pll_enable(struct clk *clk) ...@@ -271,7 +271,11 @@ static int _clk_pll_enable(struct clk *clk)
int i = 0; int i = 0;
pllbase = _get_pll_base(clk); pllbase = _get_pll_base(clk);
reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) | MXC_PLL_DP_CTL_UPEN; reg = __raw_readl(pllbase + MXC_PLL_DP_CTL);
if (reg & MXC_PLL_DP_CTL_UPEN)
return 0;
reg |= MXC_PLL_DP_CTL_UPEN;
__raw_writel(reg, pllbase + MXC_PLL_DP_CTL); __raw_writel(reg, pllbase + MXC_PLL_DP_CTL);
/* Wait for lock */ /* Wait for lock */
......
...@@ -186,7 +186,7 @@ static int initialize_usbh1_port(struct platform_device *pdev) ...@@ -186,7 +186,7 @@ static int initialize_usbh1_port(struct platform_device *pdev)
mdelay(10); mdelay(10);
return mx51_initialize_usb_hw(0, MXC_EHCI_ITC_NO_THRESHOLD); return mx51_initialize_usb_hw(pdev->id, MXC_EHCI_ITC_NO_THRESHOLD);
} }
static struct mxc_usbh_platform_data usbh1_config = { static struct mxc_usbh_platform_data usbh1_config = {
......
...@@ -44,6 +44,14 @@ ...@@ -44,6 +44,14 @@
#define UART_PADDR MX51_UART1_BASE_ADDR #define UART_PADDR MX51_UART1_BASE_ADDR
#endif #endif
/* iMX50/53 have same addresses, but not iMX51 */
#if defined(CONFIG_SOC_IMX50) || defined(CONFIG_SOC_IMX53)
#ifdef UART_PADDR
#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
#endif
#define UART_PADDR MX53_UART1_BASE_ADDR
#endif
#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)
.macro addruart, rp, rv .macro addruart, rp, rv
......
This diff is collapsed.
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