Merge branch 'for-rmk-rc' of git://git.pengutronix.de/git/imx/linux-2.6

This commit is contained in:
Russell King 2009-10-15 12:11:51 +01:00
commit e85d380710
10 changed files with 155 additions and 31 deletions

View File

@ -638,9 +638,9 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
_REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)
_REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk)
_REGISTER_CLOCK(NULL, "cspi1", cspi1_clk) _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk)
_REGISTER_CLOCK(NULL, "cspi2", cspi2_clk) _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk)
_REGISTER_CLOCK(NULL, "cspi3", cspi3_clk) _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk)
_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
_REGISTER_CLOCK(NULL, "csi", csi_clk) _REGISTER_CLOCK(NULL, "csi", csi_clk)
_REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk)
@ -665,7 +665,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "sahara2", sahara2_clk) _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk)
_REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK(NULL, "ata", ata_clk)
_REGISTER_CLOCK(NULL, "mstick", mstick_clk) _REGISTER_CLOCK(NULL, "mstick", mstick_clk)
_REGISTER_CLOCK(NULL, "wdog", wdog_clk) _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
_REGISTER_CLOCK(NULL, "gpio", gpio_clk) _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
_REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
_REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)

View File

@ -23,6 +23,10 @@
#include <linux/mtd/plat-ram.h> #include <linux/mtd/plat-ram.h>
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/mc13783.h>
#include <linux/spi/spi.h>
#include <linux/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -35,6 +39,7 @@
#include <mach/iomux.h> #include <mach/iomux.h>
#include <mach/imx-uart.h> #include <mach/imx-uart.h>
#include <mach/mxc_nand.h> #include <mach/mxc_nand.h>
#include <mach/spi.h>
#include "devices.h" #include "devices.h"
@ -78,8 +83,6 @@ static int pcm038_pins[] = {
PC6_PF_I2C2_SCL, PC6_PF_I2C2_SCL,
/* SPI1 */ /* SPI1 */
PD25_PF_CSPI1_RDY, PD25_PF_CSPI1_RDY,
PD27_PF_CSPI1_SS1,
PD28_PF_CSPI1_SS0,
PD29_PF_CSPI1_SCLK, PD29_PF_CSPI1_SCLK,
PD30_PF_CSPI1_MISO, PD30_PF_CSPI1_MISO,
PD31_PF_CSPI1_MOSI, PD31_PF_CSPI1_MOSI,
@ -196,6 +199,86 @@ static struct i2c_board_info pcm038_i2c_devices[] = {
} }
}; };
static int pcm038_spi_cs[] = {GPIO_PORTD + 28};
static struct spi_imx_master pcm038_spi_0_data = {
.chipselect = pcm038_spi_cs,
.num_chipselect = ARRAY_SIZE(pcm038_spi_cs),
};
static struct regulator_consumer_supply sdhc1_consumers[] = {
{
.dev = &mxc_sdhc_device1.dev,
.supply = "sdhc_vcc",
},
};
static struct regulator_init_data sdhc1_data = {
.constraints = {
.min_uV = 3000000,
.max_uV = 3400000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
.valid_modes_mask = REGULATOR_MODE_NORMAL |
REGULATOR_MODE_FAST,
.always_on = 0,
.boot_on = 0,
},
.num_consumer_supplies = ARRAY_SIZE(sdhc1_consumers),
.consumer_supplies = sdhc1_consumers,
};
static struct regulator_consumer_supply cam_consumers[] = {
{
.dev = NULL,
.supply = "imx_cam_vcc",
},
};
static struct regulator_init_data cam_data = {
.constraints = {
.min_uV = 3000000,
.max_uV = 3400000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
.valid_modes_mask = REGULATOR_MODE_NORMAL |
REGULATOR_MODE_FAST,
.always_on = 0,
.boot_on = 0,
},
.num_consumer_supplies = ARRAY_SIZE(cam_consumers),
.consumer_supplies = cam_consumers,
};
struct mc13783_regulator_init_data pcm038_regulators[] = {
{
.id = MC13783_REGU_VCAM,
.init_data = &cam_data,
}, {
.id = MC13783_REGU_VMMC1,
.init_data = &sdhc1_data,
},
};
static struct mc13783_platform_data pcm038_pmic = {
.regulators = pcm038_regulators,
.num_regulators = ARRAY_SIZE(pcm038_regulators),
.flags = MC13783_USE_ADC | MC13783_USE_REGULATOR |
MC13783_USE_TOUCHSCREEN,
};
static struct spi_board_info pcm038_spi_board_info[] __initdata = {
{
.modalias = "mc13783",
.irq = IRQ_GPIOB(23),
.max_speed_hz = 300000,
.bus_num = 0,
.chip_select = 0,
.platform_data = &pcm038_pmic,
.mode = SPI_CS_HIGH,
}
};
static void __init pcm038_init(void) static void __init pcm038_init(void)
{ {
mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins),
@ -219,6 +302,15 @@ static void __init pcm038_init(void)
/* PE18 for user-LED D40 */ /* PE18 for user-LED D40 */
mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT);
mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
/* MC13783 IRQ */
mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN);
mxc_register_device(&mxc_spi_device0, &pcm038_spi_0_data);
spi_register_board_info(pcm038_spi_board_info,
ARRAY_SIZE(pcm038_spi_board_info));
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
#ifdef CONFIG_MACH_PCM970_BASEBOARD #ifdef CONFIG_MACH_PCM970_BASEBOARD

View File

@ -39,7 +39,6 @@ static int pcm970_pins[] = {
PB7_PF_SD2_D3, PB7_PF_SD2_D3,
PB8_PF_SD2_CMD, PB8_PF_SD2_CMD,
PB9_PF_SD2_CLK, PB9_PF_SD2_CLK,
GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN, /* card detect */
/* display */ /* display */
PA5_PF_LSCLK, PA5_PF_LSCLK,
PA6_PF_LD0, PA6_PF_LD0,
@ -228,6 +227,7 @@ void __init pcm970_baseboard_init(void)
"PCM970"); "PCM970");
mxc_register_device(&mxc_fb_device, &pcm038_fb_data); mxc_register_device(&mxc_fb_device, &pcm038_fb_data);
mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_IN);
mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata);
platform_device_register(&pcm970_sja1000); platform_device_register(&pcm970_sja1000);
} }

View File

@ -1,4 +1,23 @@
/*
* Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <mach/mx25.h> #include <mach/mx25.h>
#include <mach/irqs.h> #include <mach/irqs.h>

View File

@ -1,3 +1,21 @@
/*
* Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <linux/types.h> #include <linux/types.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/clk.h> #include <linux/clk.h>
@ -23,19 +41,12 @@ static struct imxuart_platform_data uart_pdata = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
static struct mxc_nand_platform_data nand_board_info = {
.width = 1,
.hw_ecc = 1,
};
static void __init mx25pdk_init(void) static void __init mx25pdk_init(void)
{ {
mxc_register_device(&mxc_uart_device0, &uart_pdata); mxc_register_device(&mxc_uart_device0, &uart_pdata);
mxc_register_device(&mxc_usbh2, NULL); mxc_register_device(&mxc_usbh2, NULL);
mxc_register_device(&mxc_nand_device, &nand_board_info);
} }
static void __init mx25pdk_timer_init(void) static void __init mx25pdk_timer_init(void)
{ {
mx25_clocks_init(26000000); mx25_clocks_init(26000000);

View File

@ -443,7 +443,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk)
_REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk)
_REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk)
_REGISTER_CLOCK("mxc_wdt.0", NULL, wdog_clk) _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
_REGISTER_CLOCK(NULL, "max", max_clk) _REGISTER_CLOCK(NULL, "max", max_clk)
_REGISTER_CLOCK(NULL, "admux", admux_clk) _REGISTER_CLOCK(NULL, "admux", admux_clk)
_REGISTER_CLOCK(NULL, "csi", csi_clk) _REGISTER_CLOCK(NULL, "csi", csi_clk)

View File

@ -530,7 +530,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk)
_REGISTER_CLOCK(NULL, "gpt", gpt_clk) _REGISTER_CLOCK(NULL, "gpt", gpt_clk)
_REGISTER_CLOCK(NULL, "pwm", pwm_clk) _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
_REGISTER_CLOCK(NULL, "wdog", wdog_clk) _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
_REGISTER_CLOCK(NULL, "rtc", rtc_clk) _REGISTER_CLOCK(NULL, "rtc", rtc_clk)
_REGISTER_CLOCK(NULL, "epit", epit1_clk) _REGISTER_CLOCK(NULL, "epit", epit1_clk)
_REGISTER_CLOCK(NULL, "epit", epit2_clk) _REGISTER_CLOCK(NULL, "epit", epit2_clk)

View File

@ -459,7 +459,7 @@ struct platform_device mxc_usbh2 = {
* SPI master controller * SPI master controller
* 3 channels * 3 channels
*/ */
static struct resource imx_spi_0_resources[] = { static struct resource mxc_spi_0_resources[] = {
{ {
.start = CSPI1_BASE_ADDR, .start = CSPI1_BASE_ADDR,
.end = CSPI1_BASE_ADDR + SZ_4K - 1, .end = CSPI1_BASE_ADDR + SZ_4K - 1,
@ -471,7 +471,7 @@ static struct resource imx_spi_0_resources[] = {
}, },
}; };
static struct resource imx_spi_1_resources[] = { static struct resource mxc_spi_1_resources[] = {
{ {
.start = CSPI2_BASE_ADDR, .start = CSPI2_BASE_ADDR,
.end = CSPI2_BASE_ADDR + SZ_4K - 1, .end = CSPI2_BASE_ADDR + SZ_4K - 1,
@ -483,7 +483,7 @@ static struct resource imx_spi_1_resources[] = {
}, },
}; };
static struct resource imx_spi_2_resources[] = { static struct resource mxc_spi_2_resources[] = {
{ {
.start = CSPI3_BASE_ADDR, .start = CSPI3_BASE_ADDR,
.end = CSPI3_BASE_ADDR + SZ_4K - 1, .end = CSPI3_BASE_ADDR + SZ_4K - 1,
@ -495,25 +495,25 @@ static struct resource imx_spi_2_resources[] = {
}, },
}; };
struct platform_device imx_spi_device0 = { struct platform_device mxc_spi_device0 = {
.name = "spi_imx", .name = "spi_imx",
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(imx_spi_0_resources), .num_resources = ARRAY_SIZE(mxc_spi_0_resources),
.resource = imx_spi_0_resources, .resource = mxc_spi_0_resources,
}; };
struct platform_device imx_spi_device1 = { struct platform_device mxc_spi_device1 = {
.name = "spi_imx", .name = "spi_imx",
.id = 1, .id = 1,
.num_resources = ARRAY_SIZE(imx_spi_1_resources), .num_resources = ARRAY_SIZE(mxc_spi_1_resources),
.resource = imx_spi_1_resources, .resource = mxc_spi_1_resources,
}; };
struct platform_device imx_spi_device2 = { struct platform_device mxc_spi_device2 = {
.name = "spi_imx", .name = "spi_imx",
.id = 2, .id = 2,
.num_resources = ARRAY_SIZE(imx_spi_2_resources), .num_resources = ARRAY_SIZE(mxc_spi_2_resources),
.resource = imx_spi_2_resources, .resource = mxc_spi_2_resources,
}; };
#ifdef CONFIG_ARCH_MX35 #ifdef CONFIG_ARCH_MX35

View File

@ -20,7 +20,7 @@ extern struct platform_device mxc_otg_host;
extern struct platform_device mxc_usbh1; extern struct platform_device mxc_usbh1;
extern struct platform_device mxc_usbh2; extern struct platform_device mxc_usbh2;
extern struct platform_device mxc_rnga_device; extern struct platform_device mxc_rnga_device;
extern struct platform_device imx_spi_device0; extern struct platform_device mxc_spi_device0;
extern struct platform_device imx_spi_device1; extern struct platform_device mxc_spi_device1;
extern struct platform_device imx_spi_device2; extern struct platform_device mxc_spi_device2;

View File

@ -81,6 +81,7 @@ void __init mx31_map_io(void)
iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
} }
#ifdef CONFIG_ARCH_MX35
void __init mx35_map_io(void) void __init mx35_map_io(void)
{ {
mxc_set_cpu_type(MXC_CPU_MX35); mxc_set_cpu_type(MXC_CPU_MX35);
@ -89,6 +90,7 @@ void __init mx35_map_io(void)
iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
} }
#endif
void __init mx31_init_irq(void) void __init mx31_init_irq(void)
{ {