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: (23 commits)
  sh: sh7785lcr: Map whole PCI address space.
  sh: Fix up DSP context save/restore.
  sh: Fix up number of on-chip DMA channels on SH7091.
  sh: update defconfigs.
  sh: Kill off broken direct-mapped cache mode.
  sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle.
  sh: Add a command line option for disabling I/O trapping.
  sh: Select ARCH_HIBERNATION_POSSIBLE.
  sh: migor: Fix up CEU use flags.
  input: migor_ts: add wakeup support
  rtc: rtc-sh: use set_irq_wake()
  input: sh_keysc: use enable/disable_irq_wake()
  sh: intc: set_irq_wake() support
  sh: intc: install enable, disable and shutdown callbacks
  clocksource: sh_cmt: use remove_irq() and remove clockevent workaround
  sh: ap325 and Migo-R use new sh_mobile_ceu_info flags
  sh: Fix up -Wformat-security whining.
  sh: ap325rxa: Add ov772x support, again.
  sh: Sanitize asm/mmu.h for assembly use.
  sh: Tidy up sh7786 pinmux table.
  ...
  • Loading branch information
Linus Torvalds committed Apr 5, 2009
2 parents 87fc94d + 68b42d1 commit 45e36c1
Show file tree
Hide file tree
Showing 71 changed files with 2,754 additions and 1,515 deletions.
2 changes: 2 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,8 @@ and is between 256 and 4096 characters. It is defined in the file
Valid arguments: on, off
Default: on

noiotrap [SH] Disables trapped I/O port accesses.

noirqdebug [X86-32] Disables the code which attempts to detect and
disable unhandled interrupt sources.

Expand Down
6 changes: 5 additions & 1 deletion arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ config SUPERH32
select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_DYNAMIC_FTRACE
select HAVE_ARCH_KGDB
select ARCH_HIBERNATION_POSSIBLE if MMU

config SUPERH64
def_bool y if CPU_SH5
Expand Down Expand Up @@ -129,6 +130,9 @@ config ARCH_HAS_ILOG2_U64
config ARCH_NO_VIRT_TO_BUS
def_bool y

config ARCH_HAS_DEFAULT_IDLE
def_bool y

config IO_TRAPPED
bool

Expand Down Expand Up @@ -530,7 +534,7 @@ source kernel/Kconfig.hz

config KEXEC
bool "kexec system call (EXPERIMENTAL)"
depends on SUPERH32 && EXPERIMENTAL
depends on SUPERH32 && EXPERIMENTAL && MMU
help
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
Expand Down
57 changes: 51 additions & 6 deletions arch/sh/boards/board-ap325rxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <media/ov772x.h>
#include <media/soc_camera.h>
#include <media/soc_camera_platform.h>
#include <media/sh_mobile_ceu.h>
Expand Down Expand Up @@ -235,6 +236,7 @@ static void camera_power(int val)
}

#ifdef CONFIG_I2C
/* support for the old ncm03j camera */
static unsigned char camera_ncm03j_magic[] =
{
0x87, 0x00, 0x88, 0x08, 0x89, 0x01, 0x8A, 0xE8,
Expand All @@ -255,6 +257,23 @@ static unsigned char camera_ncm03j_magic[] =
0x63, 0xD4, 0x64, 0xEA, 0xD6, 0x0F,
};

static int camera_probe(void)
{
struct i2c_adapter *a = i2c_get_adapter(0);
struct i2c_msg msg;
int ret;

camera_power(1);
msg.addr = 0x6e;
msg.buf = camera_ncm03j_magic;
msg.len = 2;
msg.flags = 0;
ret = i2c_transfer(a, &msg, 1);
camera_power(0);

return ret;
}

static int camera_set_capture(struct soc_camera_platform_info *info,
int enable)
{
Expand Down Expand Up @@ -306,12 +325,37 @@ static struct platform_device camera_device = {
.platform_data = &camera_info,
},
};

static int __init camera_setup(void)
{
if (camera_probe() > 0)
platform_device_register(&camera_device);

return 0;
}
late_initcall(camera_setup);

#endif /* CONFIG_I2C */

static int ov7725_power(struct device *dev, int mode)
{
camera_power(0);
if (mode)
camera_power(1);

return 0;
}

static struct ov772x_camera_info ov7725_info = {
.buswidth = SOCAM_DATAWIDTH_8,
.flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
.link = {
.power = ov7725_power,
},
};

static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
.flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_HIGH | SOCAM_MASTER |
SOCAM_DATAWIDTH_8,
.flags = SH_CEU_FLAG_USE_8BIT_BUS,
};

static struct resource ceu_resources[] = {
Expand Down Expand Up @@ -359,9 +403,6 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
&ap325rxa_nor_flash_device,
&lcdc_device,
&ceu_device,
#ifdef CONFIG_I2C
&camera_device,
#endif
&nand_flash_device,
&sdcard_cn3_device,
};
Expand All @@ -370,6 +411,10 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
{
I2C_BOARD_INFO("pcf8563", 0x51),
},
{
I2C_BOARD_INFO("ov772x", 0x21),
.platform_data = &ov7725_info,
},
};

static struct spi_board_info ap325rxa_spi_devices[] = {
Expand Down
4 changes: 4 additions & 0 deletions arch/sh/boards/board-urquell.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ static int __init urquell_devices_setup(void)
gpio_request(GPIO_FN_USB_OVC0, NULL);
gpio_request(GPIO_FN_USB_PENC0, NULL);

/* enable LAN */
__raw_writew(__raw_readw(UBOARDREG(IRL2MSKR)) & ~0x00000001,
UBOARDREG(IRL2MSKR));

return platform_add_devices(urquell_devices,
ARRAY_SIZE(urquell_devices));
}
Expand Down
4 changes: 1 addition & 3 deletions arch/sh/boards/mach-migor/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,7 @@ static int tw9910_power(struct device *dev, int mode)
}

static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING
| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH
| SOCAM_DATA_ACTIVE_HIGH,
.flags = SH_CEU_FLAG_USE_8BIT_BUS,
};

static struct resource migor_ceu_resources[] = {
Expand Down
Loading

0 comments on commit 45e36c1

Please sign in to comment.