Skip to content

Commit

Permalink
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 …
Browse files Browse the repository at this point in the history
…into devel-stable
  • Loading branch information
Russell King committed Oct 19, 2010
2 parents f779b7d + f1de161 commit 79a94c3
Show file tree
Hide file tree
Showing 33 changed files with 1,101 additions and 190 deletions.
6 changes: 3 additions & 3 deletions arch/arm/mach-mx25/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ unsigned long get_rate_arm(struct clk *clk)
unsigned long rate = get_rate_mpll();

if (cctl & (1 << 14))
rate = (rate * 3) >> 1;
rate = (rate * 3) >> 2;

return rate / ((cctl >> 30) + 1);
}
Expand All @@ -99,7 +99,7 @@ static unsigned long get_rate_per(int per)
if (readl(CRM_BASE + 0x64) & (1 << per))
fref = get_rate_upll();
else
fref = get_rate_ipg(NULL);
fref = get_rate_ahb(NULL);

return fref / (val + 1);
}
Expand Down Expand Up @@ -261,7 +261,7 @@ DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGCR1, 14, get_rate_esdhc2, NULL,
DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL);
DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk);
DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL);
DEFINE_CLOCK(can2_clk, 0, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL);
DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL);

#define _REGISTER_CLOCK(d, n, c) \
{ \
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/mach-mx25/devices-imx25.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst;
#define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata)
#define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)

#define imx25_add_esdhc0(pdata) \
imx_add_esdhc(0, MX25_ESDHC1_BASE_ADDR, SZ_16K, MX25_INT_MMC_SDHC1, pdata)
#define imx25_add_esdhc1(pdata) \
imx_add_esdhc(1, MX25_ESDHC2_BASE_ADDR, SZ_16K, MX25_INT_MMC_SDHC2, pdata)
extern const struct imx_esdhc_imx_data imx25_esdhc_data[] __initconst;
#define imx25_add_esdhc(id, pdata) \
imx_add_esdhc(&imx25_esdhc_data[id], pdata)
34 changes: 33 additions & 1 deletion arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,38 @@ static struct imx_fb_videomode eukrea_mximxsd_modes[] = {
},
.bpp = 16,
.pcr = 0xCAD08B80,
}, {
.mode = {
.name = "DVI-VGA",
.refresh = 60,
.xres = 640,
.yres = 480,
.pixclock = 32000,
.hsync_len = 7,
.left_margin = 100,
.right_margin = 100,
.vsync_len = 7,
.upper_margin = 7,
.lower_margin = 100,
},
.pcr = 0xFA208B80,
.bpp = 16,
}, {
.mode = {
.name = "DVI-SVGA",
.refresh = 60,
.xres = 800,
.yres = 600,
.pixclock = 25000,
.hsync_len = 7,
.left_margin = 75,
.right_margin = 75,
.vsync_len = 7,
.upper_margin = 7,
.lower_margin = 75,
},
.pcr = 0xFA208B80,
.bpp = 16,
},
};

Expand Down Expand Up @@ -245,7 +277,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

imx25_add_flexcan1(NULL);
imx25_add_esdhc0(NULL);
imx25_add_esdhc(0, NULL);

gpio_request(GPIO_LED1, "LED1");
gpio_direction_output(GPIO_LED1, 1);
Expand Down
14 changes: 4 additions & 10 deletions arch/arm/mach-mx25/mach-cpuimx25.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <mach/mxc_nand.h>
#include <mach/imxfb.h>
#include <mach/mxc_ehci.h>
#include <mach/ulpi.h>
#include <mach/iomux-mx25.h>

#include "devices-imx25.h"
Expand Down Expand Up @@ -134,18 +133,13 @@ static void __init eukrea_cpuimx25_init(void)
ARRAY_SIZE(eukrea_cpuimx25_i2c_devices));
imx25_add_imx_i2c0(&eukrea_cpuimx25_i2c0_data);

#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

if (otg_mode_host)
mxc_register_device(&mxc_otg, &otg_pdata);
}
mxc_register_device(&mxc_usbh2, &usbh2_pdata);
#endif
if (!otg_mode_host)
else
mxc_register_device(&otg_udc_device, &otg_device_pdata);

mxc_register_device(&mxc_usbh2, &usbh2_pdata);

#ifdef CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD
eukrea_mbimxsd25_baseboard_init();
#endif
Expand Down
9 changes: 3 additions & 6 deletions arch/arm/mach-mx3/devices-imx35.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst;
#define imx35_add_spi_imx0(pdata) imx35_add_cspi(0, pdata)
#define imx35_add_spi_imx1(pdata) imx35_add_cspi(1, pdata)

#define imx35_add_esdhc0(pdata) \
imx_add_esdhc(0, MX35_ESDHC1_BASE_ADDR, SZ_16K, MX35_INT_MMC_SDHC1, pdata)
#define imx35_add_esdhc1(pdata) \
imx_add_esdhc(1, MX35_ESDHC2_BASE_ADDR, SZ_16K, MX35_INT_MMC_SDHC2, pdata)
#define imx35_add_esdhc2(pdata) \
imx_add_esdhc(2, MX35_ESDHC3_BASE_ADDR, SZ_16K, MX35_INT_MMC_SDHC3, pdata)
extern const struct imx_esdhc_imx_data imx35_esdhc_data[] __initconst;
#define imx35_add_esdhc(id, pdata) \
imx_add_esdhc(&imx35_esdhc_data[id], pdata)
42 changes: 38 additions & 4 deletions arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

static const struct fb_videomode fb_modedb[] = {
{
.name = "CMO_QVGA",
.name = "CMO-QVGA",
.refresh = 60,
.xres = 320,
.yres = 240,
Expand All @@ -64,6 +64,40 @@ static const struct fb_videomode fb_modedb[] = {
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,
},
{
.name = "DVI-VGA",
.refresh = 60,
.xres = 640,
.yres = 480,
.pixclock = 32000,
.left_margin = 100,
.right_margin = 100,
.upper_margin = 7,
.lower_margin = 100,
.hsync_len = 7,
.vsync_len = 7,
.sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT |
FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT,
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,
},
{
.name = "DVI-SVGA",
.refresh = 60,
.xres = 800,
.yres = 600,
.pixclock = 25000,
.left_margin = 75,
.right_margin = 75,
.upper_margin = 7,
.lower_margin = 75,
.hsync_len = 7,
.vsync_len = 7,
.sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT |
FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT,
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,
},
};

static struct ipu_platform_data mx3_ipu_data = {
Expand All @@ -72,7 +106,7 @@ static struct ipu_platform_data mx3_ipu_data = {

static struct mx3fb_platform_data mx3fb_pdata = {
.dma_dev = &mx3_ipu.dev,
.name = "CMO_QVGA",
.name = "CMO-QVGA",
.mode = fb_modedb,
.num_modes = ARRAY_SIZE(fb_modedb),
};
Expand Down Expand Up @@ -255,7 +289,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

imx35_add_flexcan1(NULL);
imx35_add_esdhc0(NULL);
imx35_add_esdhc(0, NULL);

gpio_request(GPIO_LED1, "LED1");
gpio_direction_output(GPIO_LED1, 1);
Expand All @@ -267,7 +301,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void)

gpio_request(GPIO_LCDPWR, "LCDPWR");
gpio_direction_output(GPIO_LCDPWR, 1);
gpio_free(GPIO_SWITCH1);
gpio_free(GPIO_LCDPWR);

i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
Expand Down
14 changes: 4 additions & 10 deletions arch/arm/mach-mx3/mach-cpuimx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <mach/iomux-mx35.h>
#include <mach/mxc_nand.h>
#include <mach/mxc_ehci.h>
#include <mach/ulpi.h>

#include "devices-imx35.h"
#include "devices.h"
Expand Down Expand Up @@ -167,18 +166,13 @@ static void __init mxc_board_init(void)
ARRAY_SIZE(eukrea_cpuimx35_i2c_devices));
imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data);

#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

if (otg_mode_host)
mxc_register_device(&mxc_otg_host, &otg_pdata);
}
mxc_register_device(&mxc_usbh1, &usbh1_pdata);
#endif
if (!otg_mode_host)
else
mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);

mxc_register_device(&mxc_usbh1, &usbh1_pdata);

#ifdef CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD
eukrea_mbimxsd35_baseboard_init();
#endif
Expand Down
7 changes: 1 addition & 6 deletions arch/arm/mach-mx3/mach-mx31ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <linux/i2c.h>
#include <linux/irq.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/memory.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/board-mx31ads.h>
#include <mach/iomux-mx3.h>

#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
Expand All @@ -40,10 +40,6 @@
#include "devices-imx31.h"
#include "devices.h"

/* Base address of PBC controller */
#define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT
/* Offsets for the PBC Controller register */

/* PBC Board interrupt status register */
#define PBC_INTSTATUS 0x000016

Expand All @@ -67,7 +63,6 @@
#define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS)
#define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4)

#define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START)
#define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE)

#define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10)
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-mx3/mach-pcm037_eet.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "pcm037.h"
#include "devices.h"
#include "devices-imx31.h"

static unsigned int pcm037_eet_pins[] = {
/* Reserve and hardwire GPIO 57 high - S6E63D6 chipselect */
Expand Down Expand Up @@ -181,7 +182,7 @@ static int eet_init_devices(void)
/* SPI */
spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
imx35_add_spi_imx0(&pcm037_spi1_pdata);
imx31_add_spi_imx0(&pcm037_spi1_pdata);
#endif

platform_device_register(&pcm037_gpio_keys_device);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mx3/mach-pcm043.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ static void __init mxc_board_init(void)
mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);

imx35_add_flexcan1(NULL);
imx35_add_esdhc0(NULL);
imx35_add_esdhc(0, NULL);
}

static void __init pcm043_timer_init(void)
Expand Down
28 changes: 28 additions & 0 deletions arch/arm/mach-mx5/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ config MACH_EUKREA_CPUIMX51
bool "Support Eukrea CPUIMX51 module"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
help
Include support for Eukrea CPUIMX51 platform. This includes
specific configurations for the module and its peripherals.
Expand All @@ -43,12 +45,38 @@ choice
config MACH_EUKREA_MBIMX51_BASEBOARD
prompt "Eukrea MBIMX51 development board"
bool
select IMX_HAVE_PLATFORM_ESDHC
help
This adds board specific devices that can be found on Eukrea's
MBIMX51 evaluation board.

endchoice

config MACH_EUKREA_CPUIMX51SD
bool "Support Eukrea CPUIMX51SD module"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_SPI_IMX
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_NAND
help
Include support for Eukrea CPUIMX51SD platform. This includes
specific configurations for the module and its peripherals.

choice
prompt "Baseboard"
depends on MACH_EUKREA_CPUIMX51SD
default MACH_EUKREA_MBIMXSD51_BASEBOARD

config MACH_EUKREA_MBIMXSD51_BASEBOARD
prompt "Eukrea MBIMXSD development board"
bool
select IMX_HAVE_PLATFORM_ESDHC
help
This adds board specific devices that can be found on Eukrea's
MBIMXSD evaluation board.

endchoice

config MACH_MX51_EFIKAMX
bool "Support MX51 Genesi Efika MX nettop"
select IMX_HAVE_PLATFORM_IMX_UART
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-mx5/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o
obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o
obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o
obj-$(CONFIG_MACH_MX51_EFIKAMX) += board-mx51_efikamx.o
9 changes: 9 additions & 0 deletions arch/arm/mach-mx5/board-cpuimx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ static struct pad_desc eukrea_cpuimx51_pads[] = {
MX51_PAD_USBH1_STP__USBH1_STP,
};

static const struct mxc_nand_platform_data
eukrea_cpuimx51_nand_board_info __initconst = {
.width = 1,
.hw_ecc = 1,
.flash_bbt = 1,
};

static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
Expand Down Expand Up @@ -239,6 +246,8 @@ static void __init eukrea_cpuimx51_init(void)
ARRAY_SIZE(eukrea_cpuimx51_pads));

imx51_add_imx_uart(0, &uart_pdata);
imx51_add_mxc_nand(&eukrea_cpuimx51_nand_board_info);

gpio_request(CPUIMX51_QUARTA_GPIO, "quarta_irq");
gpio_direction_input(CPUIMX51_QUARTA_GPIO);
gpio_free(CPUIMX51_QUARTA_GPIO);
Expand Down
Loading

0 comments on commit 79a94c3

Please sign in to comment.