Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (25 commits)
  sh: fix up sh7785lcr_32bit_defconfig.
  arch/sh/lib/strlen.S: Checkpatch cleanup
  sh: fix up sh7786 dmaengine build.
  sh: guard cookie consistency across termination in the DMA driver
  sh: prevent the DMA driver from unloading, while in use
  sh: fix Oops in the serial SCI driver
  sh: allow platforms to specify SD-card supported voltages
  mmc: let MFD's provide supported Vdd card voltages to tmio_mmc
  sh: disable SD-card write-protection detection on kfr2r09
  mfd: pass platform flags down to the tmio_mmc driver
  tmio: add a platform flag to disable card write-protection detection
  sh: Add SDHI DMA support to migor
  sh: Add SDHI DMA support to kfr2r09
  sh: Add SDHI DMA support to ms7724se
  sh: Add SDHI DMA support to ecovec
  mmc: add DMA support to tmio_mmc driver, when used on SuperH
  sh: prepare the SDHI MFD driver to pass DMA configuration to tmio_mmc.c
  mmc: prepare tmio_mmc for passing of DMA configuration from the MFD cell
  sh: add DMA slave definitions to sh7724
  sh: add DMA slaves for two SDHI controllers to sh7722
  ...
  • Loading branch information
Linus Torvalds committed May 24, 2010
2 parents 0163916 + 41ec7eb commit 0fed2b5
Show file tree
Hide file tree
Showing 27 changed files with 916 additions and 207 deletions.
87 changes: 85 additions & 2 deletions arch/sh/boards/mach-ecovec24/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/mfd/sh_mobile_sdhi.h>
#include <linux/mtd/physmap.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
Expand Down Expand Up @@ -442,7 +443,9 @@ static void sdhi0_set_pwr(struct platform_device *pdev, int state)
}

static struct sh_mobile_sdhi_info sdhi0_info = {
.set_pwr = sdhi0_set_pwr,
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
.set_pwr = sdhi0_set_pwr,
};

static struct resource sdhi0_resources[] = {
Expand Down Expand Up @@ -478,7 +481,9 @@ static void sdhi1_set_pwr(struct platform_device *pdev, int state)
}

static struct sh_mobile_sdhi_info sdhi1_info = {
.set_pwr = sdhi1_set_pwr,
.dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
.set_pwr = sdhi1_set_pwr,
};

static struct resource sdhi1_resources[] = {
Expand Down Expand Up @@ -769,6 +774,51 @@ static struct platform_device irda_device = {
.resource = irda_resources,
};

#include <media/ak881x.h>
#include <media/sh_vou.h>

struct ak881x_pdata ak881x_pdata = {
.flags = AK881X_IF_MODE_SLAVE,
};

static struct i2c_board_info ak8813 = {
I2C_BOARD_INFO("ak8813", 0x20),
.platform_data = &ak881x_pdata,
};

struct sh_vou_pdata sh_vou_pdata = {
.bus_fmt = SH_VOU_BUS_8BIT,
.flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW,
.board_info = &ak8813,
.i2c_adap = 0,
.module_name = "ak881x",
};

static struct resource sh_vou_resources[] = {
[0] = {
.start = 0xfe960000,
.end = 0xfe962043,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 55,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device vou_device = {
.name = "sh-vou",
.id = -1,
.num_resources = ARRAY_SIZE(sh_vou_resources),
.resource = sh_vou_resources,
.dev = {
.platform_data = &sh_vou_pdata,
},
.archdata = {
.hwblk_id = HWBLK_VOU,
},
};

static struct platform_device *ecovec_devices[] __initdata = {
&heartbeat_device,
&nor_flash_device,
Expand All @@ -790,6 +840,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
&camera_devices[2],
&fsi_device,
&irda_device,
&vou_device,
};

#ifdef CONFIG_I2C
Expand Down Expand Up @@ -1179,6 +1230,38 @@ static int __init arch_setup(void)
i2c_register_board_info(1, i2c1_devices,
ARRAY_SIZE(i2c1_devices));

/* VOU */
gpio_request(GPIO_FN_DV_D15, NULL);
gpio_request(GPIO_FN_DV_D14, NULL);
gpio_request(GPIO_FN_DV_D13, NULL);
gpio_request(GPIO_FN_DV_D12, NULL);
gpio_request(GPIO_FN_DV_D11, NULL);
gpio_request(GPIO_FN_DV_D10, NULL);
gpio_request(GPIO_FN_DV_D9, NULL);
gpio_request(GPIO_FN_DV_D8, NULL);
gpio_request(GPIO_FN_DV_CLKI, NULL);
gpio_request(GPIO_FN_DV_CLK, NULL);
gpio_request(GPIO_FN_DV_VSYNC, NULL);
gpio_request(GPIO_FN_DV_HSYNC, NULL);

/* AK8813 power / reset sequence */
gpio_request(GPIO_PTG4, NULL);
gpio_request(GPIO_PTU3, NULL);
/* Reset */
gpio_direction_output(GPIO_PTG4, 0);
/* Power down */
gpio_direction_output(GPIO_PTU3, 1);

udelay(10);

/* Power up, reset */
gpio_set_value(GPIO_PTU3, 0);

udelay(10);

/* Remove reset */
gpio_set_value(GPIO_PTG4, 1);

return platform_add_devices(ecovec_devices,
ARRAY_SIZE(ecovec_devices));
}
Expand Down
11 changes: 11 additions & 0 deletions arch/sh/boards/mach-kfr2r09/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/mfd/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/onenand.h>
#include <linux/delay.h>
Expand Down Expand Up @@ -356,10 +358,19 @@ static struct resource kfr2r09_sh_sdhi0_resources[] = {
},
};

static struct sh_mobile_sdhi_info sh7724_sdhi0_data = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
};

static struct platform_device kfr2r09_sh_sdhi0_device = {
.name = "sh_mobile_sdhi",
.num_resources = ARRAY_SIZE(kfr2r09_sh_sdhi0_resources),
.resource = kfr2r09_sh_sdhi0_resources,
.dev = {
.platform_data = &sh7724_sdhi0_data,
},
.archdata = {
.hwblk_id = HWBLK_SDHI0,
},
Expand Down
9 changes: 9 additions & 0 deletions arch/sh/boards/mach-migor/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
#include <linux/mfd/sh_mobile_sdhi.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/nand.h>
#include <linux/i2c.h>
Expand Down Expand Up @@ -402,10 +403,18 @@ static struct resource sdhi_cn9_resources[] = {
},
};

static struct sh_mobile_sdhi_info sh7724_sdhi_data = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
};

static struct platform_device sdhi_cn9_device = {
.name = "sh_mobile_sdhi",
.num_resources = ARRAY_SIZE(sdhi_cn9_resources),
.resource = sdhi_cn9_resources,
.dev = {
.platform_data = &sh7724_sdhi_data,
},
.archdata = {
.hwblk_id = HWBLK_SDHI,
},
Expand Down
107 changes: 99 additions & 8 deletions arch/sh/boards/mach-se/7724/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/mfd/sh_mobile_sdhi.h>
#include <linux/mtd/physmap.h>
#include <linux/delay.h>
#include <linux/smc91x.h>
Expand Down Expand Up @@ -462,11 +463,19 @@ static struct resource sdhi0_cn7_resources[] = {
},
};

static struct sh_mobile_sdhi_info sh7724_sdhi0_data = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
};

static struct platform_device sdhi0_cn7_device = {
.name = "sh_mobile_sdhi",
.id = 0,
.num_resources = ARRAY_SIZE(sdhi0_cn7_resources),
.resource = sdhi0_cn7_resources,
.dev = {
.platform_data = &sh7724_sdhi0_data,
},
.archdata = {
.hwblk_id = HWBLK_SDHI0,
},
Expand All @@ -485,11 +494,19 @@ static struct resource sdhi1_cn8_resources[] = {
},
};

static struct sh_mobile_sdhi_info sh7724_sdhi1_data = {
.dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
};

static struct platform_device sdhi1_cn8_device = {
.name = "sh_mobile_sdhi",
.id = 1,
.num_resources = ARRAY_SIZE(sdhi1_cn8_resources),
.resource = sdhi1_cn8_resources,
.dev = {
.platform_data = &sh7724_sdhi1_data,
},
.archdata = {
.hwblk_id = HWBLK_SDHI1,
},
Expand All @@ -515,6 +532,52 @@ static struct platform_device irda_device = {
.resource = irda_resources,
};

#include <media/ak881x.h>
#include <media/sh_vou.h>

struct ak881x_pdata ak881x_pdata = {
.flags = AK881X_IF_MODE_SLAVE,
};

static struct i2c_board_info ak8813 = {
/* With open J18 jumper address is 0x21 */
I2C_BOARD_INFO("ak8813", 0x20),
.platform_data = &ak881x_pdata,
};

struct sh_vou_pdata sh_vou_pdata = {
.bus_fmt = SH_VOU_BUS_8BIT,
.flags = SH_VOU_HSYNC_LOW | SH_VOU_VSYNC_LOW,
.board_info = &ak8813,
.i2c_adap = 0,
.module_name = "ak881x",
};

static struct resource sh_vou_resources[] = {
[0] = {
.start = 0xfe960000,
.end = 0xfe962043,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 55,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device vou_device = {
.name = "sh-vou",
.id = -1,
.num_resources = ARRAY_SIZE(sh_vou_resources),
.resource = sh_vou_resources,
.dev = {
.platform_data = &sh_vou_pdata,
},
.archdata = {
.hwblk_id = HWBLK_VOU,
},
};

static struct platform_device *ms7724se_devices[] __initdata = {
&heartbeat_device,
&smc91x_eth_device,
Expand All @@ -530,6 +593,7 @@ static struct platform_device *ms7724se_devices[] __initdata = {
&sdhi0_cn7_device,
&sdhi1_cn8_device,
&irda_device,
&vou_device,
};

/* I2C device */
Expand Down Expand Up @@ -614,6 +678,7 @@ static int __init devices_setup(void)
{
u16 sw = __raw_readw(SW4140); /* select camera, monitor */
struct clk *clk;
u16 fpga_out;

/* register board specific self-refresh code */
sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF |
Expand All @@ -623,14 +688,26 @@ static int __init devices_setup(void)
&ms7724se_sdram_leave_start,
&ms7724se_sdram_leave_end);
/* Reset Release */
__raw_writew(__raw_readw(FPGA_OUT) &
~((1 << 1) | /* LAN */
(1 << 6) | /* VIDEO DAC */
(1 << 7) | /* AK4643 */
(1 << 8) | /* IrDA */
(1 << 12) | /* USB0 */
(1 << 14)), /* RMII */
FPGA_OUT);
fpga_out = __raw_readw(FPGA_OUT);
/* bit4: NTSC_PDN, bit5: NTSC_RESET */
fpga_out &= ~((1 << 1) | /* LAN */
(1 << 4) | /* AK8813 PDN */
(1 << 5) | /* AK8813 RESET */
(1 << 6) | /* VIDEO DAC */
(1 << 7) | /* AK4643 */
(1 << 8) | /* IrDA */
(1 << 12) | /* USB0 */
(1 << 14)); /* RMII */
__raw_writew(fpga_out | (1 << 4), FPGA_OUT);

udelay(10);

/* AK8813 RESET */
__raw_writew(fpga_out | (1 << 5), FPGA_OUT);

udelay(10);

__raw_writew(fpga_out, FPGA_OUT);

/* turn on USB clocks, use external clock */
__raw_writew((__raw_readw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
Expand Down Expand Up @@ -862,6 +939,20 @@ static int __init devices_setup(void)
lcdc_info.ch[0].flags = LCDC_FLAGS_DWPOL;
}

/* VOU */
gpio_request(GPIO_FN_DV_D15, NULL);
gpio_request(GPIO_FN_DV_D14, NULL);
gpio_request(GPIO_FN_DV_D13, NULL);
gpio_request(GPIO_FN_DV_D12, NULL);
gpio_request(GPIO_FN_DV_D11, NULL);
gpio_request(GPIO_FN_DV_D10, NULL);
gpio_request(GPIO_FN_DV_D9, NULL);
gpio_request(GPIO_FN_DV_D8, NULL);
gpio_request(GPIO_FN_DV_CLKI, NULL);
gpio_request(GPIO_FN_DV_CLK, NULL);
gpio_request(GPIO_FN_DV_VSYNC, NULL);
gpio_request(GPIO_FN_DV_HSYNC, NULL);

return platform_add_devices(ms7724se_devices,
ARRAY_SIZE(ms7724se_devices));
}
Expand Down
Loading

0 comments on commit 0fed2b5

Please sign in to comment.