Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272850
b: refs/heads/master
c: b6de943
h: refs/heads/master
v: v3
  • Loading branch information
Sascha Hauer committed Sep 26, 2011
1 parent 0492e89 commit 35aa6fa
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 151 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6132ae8154f923b9064e2d8900b10eed498f2c42
refs/heads/master: b6de943bdffdc94482dd1a29015ca75e893bb5f2
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-imx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ comment "MX25 platforms:"
config MACH_MX25_3DS
bool "Support MX25PDK (3DS) Platform"
select SOC_IMX25
select IMX_HAVE_PLATFORM_FLEXCAN
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMXDI_RTC
Expand Down Expand Up @@ -486,7 +485,6 @@ config MACH_QONG
bool "Support Dave/DENX QongEVB-LITE platform"
select SOC_IMX31
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX2_WDT
help
Include support for Dave/DENX QongEVB-LITE platform. This includes
specific configurations for the board and its peripherals.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/cache-l2x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ static int mxc_init_l2x0(void)

return 0;
}
early_initcall(mxc_init_l2x0);
arch_initcall(mxc_init_l2x0);
10 changes: 0 additions & 10 deletions trunk/arch/arm/mach-imx/mach-mx25_3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@

#include "devices-imx25.h"

#define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6)

static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
Expand Down Expand Up @@ -110,11 +108,6 @@ static iomux_v3_cfg_t mx25pdk_pads[] = {
/* I2C1 */
MX25_PAD_I2C1_CLK__I2C1_CLK,
MX25_PAD_I2C1_DAT__I2C1_DAT,

/* CAN1 */
MX25_PAD_GPIO_A__CAN1_TX,
MX25_PAD_GPIO_B__CAN1_RX,
MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */
};

static const struct fec_platform_data mx25_fec_pdata __initconst = {
Expand Down Expand Up @@ -247,9 +240,6 @@ static void __init mx25pdk_init(void)

imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);

gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
imx25_add_flexcan0(NULL);
}

static void __init mx25pdk_timer_init(void)
Expand Down
17 changes: 0 additions & 17 deletions trunk/arch/arm/mach-imx/mach-mx31moboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#include <linux/spi/spi.h>
#include <linux/types.h>
#include <linux/memblock.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/err.h>

#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
Expand Down Expand Up @@ -493,18 +490,6 @@ static int __init mx31moboard_init_cam(void)

}

static void mx31moboard_poweroff(void)
{
struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);

if (!IS_ERR(clk))
clk_enable(clk);

mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);

__raw_writew(1 << 6 | 1 << 2, MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
}

static int mx31moboard_baseboard;
core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);

Expand Down Expand Up @@ -543,8 +528,6 @@ static void __init mx31moboard_init(void)

moboard_usbh2_init();

pm_power_off = mx31moboard_poweroff;

switch (mx31moboard_baseboard) {
case MX31NOBOARD:
break;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-imx/mach-qong.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ static void __init qong_init(void)
mxc_init_imx_uart();
qong_init_nor_mtd();
qong_init_fpga();
imx31_add_imx2_wdt(NULL);
}

static void __init qong_timer_init(void)
Expand Down
11 changes: 2 additions & 9 deletions trunk/arch/arm/mach-mx5/board-mx51_efikamx.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ static const struct gpio_led_platform_data
.num_leds = ARRAY_SIZE(mx51_efikamx_leds),
};

static struct esdhc_platform_data sd_pdata = {
.cd_type = ESDHC_CD_CONTROLLER,
.wp_type = ESDHC_WP_CONTROLLER,
};

static struct gpio_keys_button mx51_efikamx_powerkey[] = {
{
.code = KEY_POWER,
Expand Down Expand Up @@ -244,11 +239,9 @@ static void __init mx51_efikamx_init(void)

/* on < 1.2 boards both SD controllers are used */
if (system_rev < 0x12) {
imx51_add_sdhci_esdhc_imx(0, NULL);
imx51_add_sdhci_esdhc_imx(1, &sd_pdata);
imx51_add_sdhci_esdhc_imx(1, NULL);
mx51_efikamx_leds[2].default_trigger = "mmc1";
} else
imx51_add_sdhci_esdhc_imx(0, &sd_pdata);
}

gpio_led_register_device(-1, &mx51_efikamx_leds_data);
imx_add_gpio_keys(&mx51_efikamx_powerkey_data);
Expand Down
18 changes: 1 addition & 17 deletions trunk/arch/arm/mach-mx5/board-mx51_efikasb.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define EFIKASB_RFKILL IMX_GPIO_NR(3, 1)

#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)
#define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL)

static iomux_v3_cfg_t mx51efikasb_pads[] = {
/* USB HOST2 */
Expand Down Expand Up @@ -98,8 +97,6 @@ static iomux_v3_cfg_t mx51efikasb_pads[] = {

/* BT */
MX51_PAD_EIM_A17__GPIO2_11,

MX51_PAD_SD1_CD,
};

static int initialize_usbh2_port(struct platform_device *pdev)
Expand Down Expand Up @@ -185,18 +182,6 @@ static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst =
.nbuttons = ARRAY_SIZE(mx51_efikasb_keys),
};

static struct esdhc_platform_data sd0_pdata = {
#define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27)
.cd_gpio = EFIKASB_SD1_CD,
.cd_type = ESDHC_CD_GPIO,
.wp_type = ESDHC_WP_CONTROLLER,
};

static struct esdhc_platform_data sd1_pdata = {
.cd_type = ESDHC_CD_CONTROLLER,
.wp_type = ESDHC_WP_CONTROLLER,
};

static struct regulator *pwgt1, *pwgt2;

static void mx51_efikasb_power_off(void)
Expand Down Expand Up @@ -265,8 +250,7 @@ static void __init efikasb_board_init(void)

mx51_efikasb_board_id();
mx51_efikasb_usb();
imx51_add_sdhci_esdhc_imx(0, &sd0_pdata);
imx51_add_sdhci_esdhc_imx(1, &sd1_pdata);
imx51_add_sdhci_esdhc_imx(1, NULL);

gpio_led_register_device(-1, &mx51_efikasb_leds_data);
imx_add_gpio_keys(&mx51_efikasb_keys_data);
Expand Down
20 changes: 0 additions & 20 deletions trunk/arch/arm/mach-mx5/board-mx53_loco.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/i2c.h>

#include <mach/common.h>
#include <mach/hardware.h>
Expand All @@ -43,7 +42,6 @@
#define LOCO_SD3_CD IMX_GPIO_NR(3, 11)
#define LOCO_SD3_WP IMX_GPIO_NR(3, 12)
#define LOCO_SD1_CD IMX_GPIO_NR(3, 13)
#define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14)

static iomux_v3_cfg_t mx53_loco_pads[] = {
/* FEC */
Expand All @@ -66,10 +64,6 @@ static iomux_v3_cfg_t mx53_loco_pads[] = {
MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD,
MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS,
MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD,
/* I2C1 */
MX53_PAD_CSI0_DAT8__I2C1_SDA,
MX53_PAD_CSI0_DAT9__I2C1_SCL,
MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */
/* I2C2 */
MX53_PAD_KEY_COL3__I2C2_SCL,
MX53_PAD_KEY_ROW3__I2C2_SDA,
Expand Down Expand Up @@ -263,15 +257,8 @@ static const struct gpio_led_platform_data mx53loco_leds_data __initconst = {
.num_leds = ARRAY_SIZE(mx53loco_leds),
};

static struct i2c_board_info mx53loco_i2c_devices[] = {
{
I2C_BOARD_INFO("mma8450", 0x1C),
},
};

static void __init mx53_loco_board_init(void)
{
int ret;
imx53_soc_init();

mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
Expand All @@ -280,13 +267,6 @@ static void __init mx53_loco_board_init(void)
mx53_loco_fec_reset();
imx53_add_fec(&mx53_loco_fec_data);
imx53_add_imx2_wdt(0, NULL);

ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en");
if (ret)
pr_err("Cannot request ACCEL_EN pin: %d\n", ret);

i2c_register_board_info(0, mx53loco_i2c_devices,
ARRAY_SIZE(mx53loco_i2c_devices));
imx53_add_imx_i2c(0, &mx53_loco_i2c_data);
imx53_add_imx_i2c(1, &mx53_loco_i2c_data);
imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-mx5/mx51_efika.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ void __init efika_board_common_init(void)
ARRAY_SIZE(mx51efika_pads));
imx51_add_imx_uart(0, &uart_pdata);
mx51_efika_usb();
imx51_add_sdhci_esdhc_imx(0, NULL);

/* FIXME: comes from original code. check this. */
if (mx51_revision() < IMX_CHIP_REVISION_2_0)
Expand Down
82 changes: 31 additions & 51 deletions trunk/arch/arm/plat-mxc/avic.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@

void __iomem *avic_base;

static u32 avic_saved_mask_reg[2];

#ifdef CONFIG_MXC_IRQ_PRIOR
static int avic_irq_set_priority(unsigned char irq, unsigned char prio)
{
Expand Down Expand Up @@ -92,8 +90,24 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type)
}
#endif /* CONFIG_FIQ */

/* Disable interrupt number "irq" in the AVIC */
static void mxc_mask_irq(struct irq_data *d)
{
__raw_writel(d->irq, avic_base + AVIC_INTDISNUM);
}

static struct mxc_extra_irq avic_extra_irq = {
/* Enable interrupt number "irq" in the AVIC */
static void mxc_unmask_irq(struct irq_data *d)
{
__raw_writel(d->irq, avic_base + AVIC_INTENNUM);
}

static struct mxc_irq_chip mxc_avic_chip = {
.base = {
.irq_ack = mxc_mask_irq,
.irq_mask = mxc_mask_irq,
.irq_unmask = mxc_unmask_irq,
},
#ifdef CONFIG_MXC_IRQ_PRIOR
.set_priority = avic_irq_set_priority,
#endif
Expand All @@ -102,54 +116,17 @@ static struct mxc_extra_irq avic_extra_irq = {
#endif
};


#ifdef CONFIG_PM
static void avic_irq_suspend(struct irq_data *d)
{
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
struct irq_chip_type *ct = gc->chip_types;
int idx = gc->irq_base >> 5;

avic_saved_mask_reg[idx] = __raw_readl(avic_base + ct->regs.mask);
__raw_writel(gc->wake_active, avic_base + ct->regs.mask);
}

static void avic_irq_resume(struct irq_data *d)
asmlinkage void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
{
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
struct irq_chip_type *ct = gc->chip_types;
int idx = gc->irq_base >> 5;
u32 nivector;

__raw_writel(avic_saved_mask_reg[idx], avic_base + ct->regs.mask);
}

#else
#define avic_irq_suspend NULL
#define avic_irq_resume NULL
#endif
do {
nivector = __raw_readl(avic_base + AVIC_NIVECSR) >> 16;
if (nivector == 0xffff)
break;

static __init void avic_init_gc(unsigned int irq_start)
{
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
int idx = irq_start >> 5;

gc = irq_alloc_generic_chip("mxc-avic", 1, irq_start, avic_base,
handle_level_irq);
gc->private = &avic_extra_irq;
gc->wake_enabled = IRQ_MSK(32);

ct = gc->chip_types;
ct->chip.irq_mask = irq_gc_mask_clr_bit;
ct->chip.irq_unmask = irq_gc_mask_set_bit;
ct->chip.irq_ack = irq_gc_mask_clr_bit;
ct->chip.irq_set_wake = irq_gc_set_wake;
ct->chip.irq_suspend = avic_irq_suspend;
ct->chip.irq_resume = avic_irq_resume;
ct->regs.mask = !idx ? AVIC_INTENABLEL : AVIC_INTENABLEH;
ct->regs.ack = ct->regs.mask;

irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0);
handle_IRQ(nivector, regs);
} while (1);
}

/*
Expand All @@ -176,9 +153,11 @@ void __init mxc_init_irq(void __iomem *irqbase)
/* all IRQ no FIQ */
__raw_writel(0, avic_base + AVIC_INTTYPEH);
__raw_writel(0, avic_base + AVIC_INTTYPEL);

for (i = 0; i < AVIC_NUM_IRQS; i += 32)
avic_init_gc(i);
for (i = 0; i < AVIC_NUM_IRQS; i++) {
irq_set_chip_and_handler(i, &mxc_avic_chip.base,
handle_level_irq);
set_irq_flags(i, IRQF_VALID);
}

/* Set default priority value (0) for all IRQ's */
for (i = 0; i < 8; i++)
Expand All @@ -191,3 +170,4 @@ void __init mxc_init_irq(void __iomem *irqbase)

printk(KERN_INFO "MXC IRQ initialized\n");
}

10 changes: 10 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,14 @@ extern void mxc_arch_reset_init(void __iomem *);
extern void mx51_efikamx_reset(void);
extern int mx53_revision(void);
extern int mx53_display_revision(void);

void avic_handle_irq(struct pt_regs *);

#define imx1_handle_irq avic_handle_irq
#define imx21_handle_irq avic_handle_irq
#define imx25_handle_irq avic_handle_irq
#define imx27_handle_irq avic_handle_irq
#define imx31_handle_irq avic_handle_irq
#define imx35_handle_irq avic_handle_irq

#endif
1 change: 0 additions & 1 deletion trunk/arch/arm/plat-mxc/include/mach/iomux-mx3.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,6 @@ enum iomux_pins {
#define MX31_PIN_KEY_COL5_KEY_COL5 IOMUX_MODE(MX31_PIN_KEY_COL5, IOMUX_CONFIG_FUNC)
#define MX31_PIN_KEY_COL6_KEY_COL6 IOMUX_MODE(MX31_PIN_KEY_COL6, IOMUX_CONFIG_FUNC)
#define MX31_PIN_KEY_COL7_KEY_COL7 IOMUX_MODE(MX31_PIN_KEY_COL7, IOMUX_CONFIG_FUNC)
#define MX31_PIN_WATCHDOG_RST__WATCHDOG_RST IOMUX_MODE(MX31_PIN_WATCHDOG_RST, IOMUX_CONFIG_FUNC)


/*
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/plat-mxc/include/mach/mx25.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#define MX25_SSI2_BASE_ADDR 0x50014000
#define MX25_SSI1_BASE_ADDR 0x50034000
#define MX25_NFC_BASE_ADDR 0xbb000000
#define MX25_IIM_BASE_ADDR 0x53ff0000
#define MX25_DRYICE_BASE_ADDR 0x53ffc000
#define MX25_ESDHC1_BASE_ADDR 0x53fb4000
#define MX25_ESDHC2_BASE_ADDR 0x53fb8000
Expand Down
Loading

0 comments on commit 35aa6fa

Please sign in to comment.